← Back to issue list

docker: Need to repeat ARG in every section

View original Github issue

Metadata

Project
snapcraft
Number
#3500
Type
pull request
State
merged
Author
abitrolly
Labels
—
Created
Updated
Closed

Current evaluation

Merged in #3500 as commit 1c411e87a, repeating Docker ARG declarations per stage so RISK propagates into subsequent build sections.

Resolution: closed resolved

Reason: PR #3500 was merged as commit 1c411e87a. It repeats the RISK ARG in each Docker stage to work around Docker's stage-scoped ARG behavior.

Evaluated by: mr-cal-bot

No scores available.

Issue body

This is a followup up #2673. I've noticed that RISK is not passed down, because ARGs are scoped. https://docs.docker.com/engine/reference/builder/#scope - [x] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged in #3500 as commit 1c411e87a, repeating Docker ARG declarations per stage so RISK propagates into subsequent build sections.
stealth/space-bunny-alpha — closed resolved Merged in snapcraft#3500 as commit 1c411e87a, repeating the Docker ARG declaration per stage so RISK propagates into subsequent builds.
stealth/space-bunny-alpha — closed resolved Docker builds now repeat RISK in each stage so the argument survives section boundaries. PR #3500 merged as commit 1c411e87a.
stealth/space-bunny-alpha — closed resolved Merged in #3500 as commit 1c411e87a, repeating the Docker ARG declaration in each section so RISK is passed into subsequent build stages.
qwen/qwen3.6-35b-a3b — — Merged into master to resolve Docker ARG scoping. The change repeats the ARG declaration in each Dockerfile section, ensuring the RISK variable passes correctly. Approved by reviewer, merged with no coverage impact.
qwen3.6-35b-a3b-mtp-q6 — — Merged into master. Fixes Docker ARG scoping by repeating variable declarations in each Dockerfile stage, ensuring values like RISK propagate correctly. No coverage change.

Update history

No update history recorded yet.

Related work

  • Caused By: canonical/snapcraft#2673 (confidence 96%)

    #2673 introduced RISK and OS build parameterization; #3500 corrected the resulting ARG scope problem.

Related issues

No related issues found above the similarity threshold.