Skip to content

fix(superset): Patch pinned packages and re-generate lock file#1456

Merged
Techassi merged 5 commits intomainfrom
fix/superset-pin-@types/offscreencanvas
Apr 8, 2026
Merged

fix(superset): Patch pinned packages and re-generate lock file#1456
Techassi merged 5 commits intomainfrom
fix/superset-pin-@types/offscreencanvas

Conversation

@Techassi
Copy link
Copy Markdown
Member

@Techassi Techassi commented Apr 7, 2026

This PR pins the @types/offscreencanvas package of Superset (frontend) 4.1.4 to 2019.7.0 in order to fix the following issue encountered since the last few scheduled CI runs. Additionally, it adds a patch with a re-generated package-lock.json file which fully fixes the following error:

Invalid: lock file's @types/offscreencanvas@2019.7.0 does not satisfy @types/offscreencanvas@2019.7.3

This error is very similar to errors fixed in #1363, #1315, and #1316. This is a known weakness/bug in npm.

Test builds in CI:

@Techassi Techassi self-assigned this Apr 7, 2026
@Techassi Techassi moved this to Development: In Progress in Stackable Engineering Apr 7, 2026
@Techassi
Copy link
Copy Markdown
Member Author

Techassi commented Apr 7, 2026

Well, now I'm even more confused:

2026-04-07T07:15:38.9532090Z #64 125.8 npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
2026-04-07T07:15:38.9537843Z #64 125.8 npm error
2026-04-07T07:15:38.9538287Z #64 125.8 npm error Missing: @swc/helpers@0.5.21 from lock file
2026-04-07T07:15:38.9538880Z #64 125.8 npm error Missing: tslib@2.8.1 from lock file

@Techassi
Copy link
Copy Markdown
Member Author

Techassi commented Apr 7, 2026

Okay one image build succeeded, one failed because of an unsuccessful SSL/TLS handshake. Re-running.

@Techassi
Copy link
Copy Markdown
Member Author

Techassi commented Apr 7, 2026

Well, the image builds this PR was supposed to fix are failing because of the error above.

@Techassi
Copy link
Copy Markdown
Member Author

Techassi commented Apr 7, 2026

Okay I tried pinning to 2019.7.3 instead, but that resulted in:

161.3 npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
161.3 npm error
161.3 npm error Invalid: lock file's @types/offscreencanvas@2019.7.0 does not satisfy @types/offscreencanvas@2019.7.3
161.3 npm error Missing: @swc/helpers@0.5.21 from lock file
161.3 npm error Missing: tslib@2.8.1 from lock file

So yeah, we apparently need even more doctoring to get this fixed. npm is just very, very weird :/

@dervoeti
Copy link
Copy Markdown
Member

dervoeti commented Apr 7, 2026

So currently we decided to play whack-a-mole with patches, which I think is a good approach if we want to try to guarantee we use the same dependencies as upstream used when building the product. It is annoying however.

The problem seems to be that the lockfile is somewhat broken and does not pin all dependencies correctly.

It seems like NPM has fixed some bugs related to lockfile generation in newer versions (e.g. npm/cli#8981). So what we could try to do: regenerate package-lock.json with the latest version of NPM and commit that as a patch (will be a huge diff though). And then use that NPM version inside the Dockerfile to build the Superset frontend. That might remove the need for playing whack-a-mole with dependency pinning.

@Techassi
Copy link
Copy Markdown
Member Author

Techassi commented Apr 8, 2026

That approach definitely also crossed my mind. I can first try to only use a newer npm version before regenerating the whole lock file.

@dervoeti
Copy link
Copy Markdown
Member

dervoeti commented Apr 8, 2026

You can try it, but I think the problem is that the lockfile does not lock everything properly 😕 With a newer version the lockfile should contain more dependencies.

@Techassi Techassi changed the title fix(superset): Add patch to pin @types/offscreencanvas to 2019.7.0 fix(superset): Patch pinned packages and re-generate lock file Apr 8, 2026
@Techassi
Copy link
Copy Markdown
Member Author

Techassi commented Apr 8, 2026

You can try it

I tried, and failed. Re-generating the lock file fixed it.

@Techassi Techassi marked this pull request as ready for review April 8, 2026 12:21
@Techassi Techassi moved this from Development: In Progress to Development: Done in Stackable Engineering Apr 8, 2026
@Techassi Techassi moved this from Development: Done to Development: Waiting for Review in Stackable Engineering Apr 8, 2026
Copy link
Copy Markdown
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I would recommend using the container image (also keeps the Dockerfile simpler)

@Techassi Techassi added this pull request to the merge queue Apr 8, 2026
@Techassi Techassi moved this from Development: Waiting for Review to Development: Done in Stackable Engineering Apr 8, 2026
Merged via the queue into main with commit f12fcf4 Apr 8, 2026
12 checks passed
@Techassi Techassi deleted the fix/superset-pin-@types/offscreencanvas branch April 8, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Done

Development

Successfully merging this pull request may close these issues.

3 participants