fix: hardcoded deno version publishing broken image for 8.4.x#286
Draft
d-gubert wants to merge 3 commits into
Draft
fix: hardcoded deno version publishing broken image for 8.4.x#286d-gubert wants to merge 3 commits into
d-gubert wants to merge 3 commits into
Conversation
Member
Author
|
@coderabbitai review |
There was a problem hiding this comment.
Pull request overview
This PR aims to fix Rocket.Chat image generation/build issues caused by hardcoded Deno version/checksum handling (notably for 8.4.x), and wires Deno version updates into the automation that generates versioned Dockerfiles.
Changes:
- Update the node22 template to derive the Deno zip checksum dynamically (with a legacy fallback).
- Extend
build-automation.mjsto also rewriteENV DENO_VERSIONwhen generating version directories. - Adjust CI to run the automation script during build-test, and change
8.4/Dockerfile’s pinnedRC_VERSION.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| templates/node22/Dockerfile | Adds dynamic Deno checksum retrieval and a legacy digest fallback. |
| build-automation.mjs | Updates generated Dockerfiles to set DENO_VERSION from Rocket.Chat release info. |
| 8.4/Dockerfile | Changes pinned Rocket.Chat patch version for the 8.4 minor line. |
| .github/workflows/build-test.yml | Runs the destructive version-regeneration automation during CI builds. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
3
to
6
| ENV DENO_VERSION=1.43.5 | ||
| # Digest for zip version 1.43.5 is not available in the release assets, so we keep it hardcoded as a fallback | ||
| ENV DENO_LEGACY_DIGEST='246bf818932c5e11adb85afaaf3c90e65d5cbe14bcaa8ea14d35fc085869775d' | ||
|
|
Comment on lines
+15
to
+18
| && DENO_ZIP_NAME=deno-${ARCH}-unknown-linux-gnu.zip \ | ||
| && DENO_DIGEST=$( (curl -fs https://dl.deno.land/release/v${DENO_VERSION}/${DENO_ZIP_NAME}.sha256sum || echo ${DENO_LEGACY_DIGEST}) | awk '{print $1}') \ | ||
| && curl -fsSL https://dl.deno.land/release/v${DENO_VERSION}/${DENO_ZIP_NAME} --output /tmp/${DENO_ZIP_NAME} \ | ||
| && echo "${DENO_DIGEST} /tmp/${DENO_ZIP_NAME}" | sha256sum -c - \ |
Comment on lines
+73
to
82
| const { nodeVersion, denoVersion } = info; | ||
|
|
||
| const nodeMajor = nodeVersion.replace(/([0-9]+)\..*/, '$1'); | ||
|
|
||
| await exec(`cp -r ./templates/node${nodeMajor} ${minor}`, { shell: "bash" }); | ||
|
|
||
| await exec(`sed -ri 's/^(ENV RC_VERSION=).*/\\1'"${fullVersion}"'/;' ${minor}/Dockerfile`, { shell: "bash" }); | ||
| await exec(`sed -ri 's/^(ENV NODE_VERSION=).*/\\1'"${nodeVersion}"'/;' ${minor}/Dockerfile`, { shell: "bash" }); | ||
| await exec(`sed -ri 's/^(ENV DENO_VERSION=).*/\\1'"${denoVersion}"'/;' ${minor}/Dockerfile`, { shell: "bash" }); | ||
| } |
Comment on lines
+77
to
+85
| - name: Run automation script | ||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | ||
| id: updt | ||
| with: | ||
| result-encoding: string | ||
| script: | | ||
| const { default: script } = await import(`${process.env.GITHUB_WORKSPACE}/build-automation.mjs`); | ||
| return script(github); | ||
|
|
Member
Author
There was a problem hiding this comment.
This was done to trigger CI and see the workflow running. It will be removed before merge.
| ENV NODE_ENV=production | ||
|
|
||
| ENV RC_VERSION=8.4.1 | ||
| ENV RC_VERSION=8.4.0 |
Member
Author
There was a problem hiding this comment.
This was done to trigger CI and see the workflow running. It will be removed before merge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.