Fix devcontainer publish failures on arm64 and harden regression contract checks#239
Conversation
…ssion checks Agent-Logs-Url: https://github.com/wallstop/unity-helpers/sessions/908d7db9-bff6-4eab-87e3-5f1d4fa6328c Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
|
@copilot Can you investigate the following CI/CD failures and determine if they represent production, configuration, or test bugs? Please provide the appropriate fix (if it is a production issue, fix production, if it is a test issue, fix test, if it is a configuration issue, fix the configuration), etc. Please consider this and similar edge case and error scenarios - if it is possible to add automation that would help catch this and other, similar problems, please do so. If these are test failures, consider converting these or other tests into data-driven tests. Please add additional diagnostics to help understand the issue(s). Consider simplifying if there are too many overlapping concerns, too much complexity, or too much fragility. When changing files, make sure we abide by repo guidelines and rules. If there is any new knowledge learned, be sure to update llm info appropriately. The goal is to understand why the issues are happening, understand the root caus(es), apply relevant fixes, and create infrastructure such that the entire category of issues can not be made again. I'm only interested in general, complete fixes - this work should be generalized as much as possible. I want to avoid fragility and make these checks extremey robust and reliable. Feel free to do web searches to understand modern techniques, approaches, and best practices to this and any similar issues. Please use sub-agents to accomplish these goals. Once a sub-agent is done, have another sub-agent review its work in an adversarial fashion. If there are any recommendations, have another sub-agent consider them and implement them. Repeat this process in a loop until all sub-agents achieve consensus that the result is incredibly high quality (110/100, exceptional work, absolutely zero issues, minor or otherwise) and does not require any revisions. I want 110% here, give it all you've got! https://github.com/wallstop/unity-helpers/actions/runs/23900885598/job/69698262506?pr=239 |
There was a problem hiding this comment.
Pull request overview
This PR fixes multi-arch devcontainer build/publish failures (arm64) by removing the apt-based PowerShell install and replacing it with an architecture-aware GitHub release tarball install, plus adds regression tests to prevent future Dockerfile URL/parser drift.
Changes:
- Replace apt-installed PowerShell with a
TARGETARCH-mapped GitHub release tarball install and SHA256 verification in the devcontainer Dockerfile. - Add a bash test (
test-validate-devcontainer-urls.sh) to enforce validator/Dockerfile parsing contracts (PowerShell version/URL template/arch mapping/checksum + validator output). - Wire the new test into npm scripts and the devcontainer validation GitHub Actions workflow.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.devcontainer/Dockerfile |
Installs PowerShell from verified GitHub release tarballs with arch mapping and checksum verification to support arm64 builds. |
scripts/tests/test-validate-devcontainer-urls.sh |
Adds regression tests to ensure the URL validator continues to detect PowerShell and related Dockerfile contracts. |
package.json |
Adds test:validate-devcontainer-urls and runs it in validate:prepush. |
.github/workflows/validate-devcontainer.yml |
Runs the new contract test in CI and updates path filters to trigger on changes. |
Agent-Logs-Url: https://github.com/wallstop/unity-helpers/sessions/b4a3aee3-6293-4fa4-8189-239204d06efa Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Investigated run 23900885598/job 69698262506 and classified it as a configuration/repo-hygiene issue (not production logic): CI failed because |
|
@copilot apply changes based on the comments in this thread Can you parse through the feedback, determine if any of it is relevant, and if it is, provide a comprehensive implementation to address the identified issues and any similar issues? Consider automation, such as tests or githooks to help prevent this category of issue. Please add additional diagnostics to help understand the issue(s). Consider simplifying if there are too many overlapping concerns, too much complexity, or too much fragility. When changing files, make sure we abide by repo guidelines and rules. If there is any new knowledge learned, be sure to update llm info appropriately. The goal is to understand why the issues are happening, understand the root caus(es), apply relevant fixes, and create infrastructure such that the entire category of issues can not be made again. I'm only interested in general, complete fixes. I want to avoid fragility and make these checks extremey robust and reliable. If the feedback is relevant, when addressing it, consider the code base as a whole. Are there other files or code areas that this could apply to? If so, do a sweep of those to see if they exhibit similar issues, and if they do, apply similar, appropriate fixes. The idea is to prevent the entire concept and class of issue from happening in the future. The goal is to understand why feedback is being given, understand the root cause of the feedback, apply relevant fixes, and create infrastructure such that the issues the feedback uncovered can not be made again. I'm only interested in general, complete fixes. I want to avoid fragility and make these checks extremey robust and reliable. Feel free to do web searches to understand modern techniques, approaches, and best practices to this and any similar issues. Please use sub-agents to accomplish these goals. Once a sub-agent is done, have another sub-agent review its work in an adversarial fashion. If there are any recommendations, have another sub-agent consider them and implement them. Repeat this process in a loop until all sub-agents achieve consensus that the result is incredibly high quality (110/100, exceptional work, absolutely zero issues, minor or otherwise) and does not require any revisions. I want 110% here, give it all you've got! |
Agent-Logs-Url: https://github.com/wallstop/unity-helpers/sessions/1cf00cff-6c22-42f0-b4b2-115d959528bb Co-authored-by: wallstop <1045249+wallstop@users.noreply.github.com>
Applied the review-thread feedback in commit |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
The
Build and Publish Devcontainerworkflow was failing onmainbecausepowershellwas no longer resolvable from apt during multi-arch image builds (arm64). This PR removes that apt dependency, adds regression guards, and hardens those guards based on review feedback to avoid fragile matching behavior.PowerShell install path hardened (Dockerfile)
powershellinstall with architecture-aware GitHub release tarball install.TARGETARCHto PowerShell asset arch (amd64 -> x64,arm64 -> arm64)./opt/microsoft/powershell/7) and symlinkedpwsh/powershell.Regression prevention for devcontainer URL/parser drift
scripts/tests/test-validate-devcontainer-urls.shto enforce:powershellReview-feedback hardening for test robustness
scripts/tests/test-validate-devcontainer-urls.shto use fixed-string matching (grep -Fq --) for Dockerfile literal contract checks, including${...}tokens.Validation pipeline wiring
test:validate-devcontainer-urlsscript inpackage.json.validate:prepush..github/workflows/validate-devcontainer.yml.Follow-up CI fix from PR feedback
Unity Meta File Lintrun (UNH005) and classified it as a configuration/repo-hygiene issue.scripts/tests/test-validate-devcontainer-urls.sh.metaRelated Issue
Type of Change
Checklist