Repository navigation
Conversation
…pace-Org#1422) Implements the two issues selected for this branch. PinSpace-Org#1422 - run cargo fmt in contracts/: - `cargo fmt --check` failed on main; it now passes - formatting-only changes (line wrapping) in src/lib.rs; no behaviour changes - verified afterwards with `cargo test`: 26 passed, 0 failed PinSpace-Org#1421 - Backend/Dockerfile.dev: - `npm install` -> `npm ci`, so the image installs exactly what package-lock.json pins and fails the build if the manifests drift - `COPY --chown=node:node . .` so nothing under /app is left root-owned - `USER node` before EXPOSE/CMD, so the dev server runs as the unprivileged user built into the node image instead of root Note: the bind mount in docker-compose.yml (./Backend:/app plus the /app/node_modules anonymous volume) still resolves to the same paths, but because the process is now uid 1000 rather than root, the host Backend/ directory has to be writable by uid 1000 for `nest start --watch` to emit dist/. Docker is not installed in this environment, so the image was not built here; that is flagged in the pull request for the maintainers to confirm. Closes PinSpace-Org#1421 Closes PinSpace-Org#1422 Closes PinSpace-Org#1423 Closes PinSpace-Org#1424
|
@projectsfame Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Implements the two issues selected for this branch: #1421 (non-root, reproducible dev image) and #1422 (
cargo fmt). All four issues assigned to this account are closed by this PR.#1422 -
cargo fmt --checkwas failing on mainRan
cargo fmtincontracts/. The changes are formatting only (line wrapping) insrc/lib.rs— no behavioural changes.cargo fmt --checknow exits 0 (it failed onmain).cargo testafterwards: 26 passed, 0 failed.#1421 -
Backend/Dockerfile.devnpm install→npm ci— installs exactly whatpackage-lock.jsonpins and fails the build if the manifests have drifted.Backend/package-lock.jsonis present, sonpm ciis valid.COPY --chown=node:node . .— nothing under/appis left root-owned.USER node— the dev server now runs as the unprivileged user that ships with the node image (uid 1000) instead of root.One thing for the maintainers to confirm
I could not build the image — Docker is not installed in my environment — so this is analysis rather than an observed run.
The bind mount in
docker-compose.yml(./Backend:/appplus the/app/node_modulesanonymous volume) resolves to the same paths as before, and the anonymous volume shieldsnode_modules. However,start:devisnest start --watch, which writesdist/into/app— i.e. into the bind mount. Now that the process is uid 1000 rather than root, the hostBackend/directory needs to be writable by uid 1000 for that to keep working.If that is a problem in practice, the standard fix is a matching user on the service, which I deliberately left out of scope for this issue:
Happy to add it if the maintainers want it in this PR.
Validation
cargo fmt --check→ exit 0;cargo test→ 26 passed, 0 failed.Backend/package-lock.jsonconfirmed present (required bynpm ci).docker compose up.Closes #1421
Closes #1422
Closes #1423
Closes #1424