Skip to content

Fix LegacyKeyValueFormat report from docker build#152305

Open
homersimpsons wants to merge 1 commit intorust-lang:mainfrom
homersimpsons:chore/fix-LegacyKeyValueFormat
Open

Fix LegacyKeyValueFormat report from docker build#152305
homersimpsons wants to merge 1 commit intorust-lang:mainfrom
homersimpsons:chore/fix-LegacyKeyValueFormat

Conversation

@homersimpsons
Copy link
Contributor

@homersimpsons homersimpsons commented Feb 7, 2026

While checking job logs (https://github.com/rust-lang/rust/actions/runs/21779827147/job/62842068357#step:28:217) I noticed:

   2 warnings found (use docker --debug to expand):
   - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 24)
   - LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 29)

I identified warnings with:

git ls-files --directory **/Dockerfile | sed -E -e "s/(\/Dockerfile)//" |xargs --verbose --replace={} docker build --check {}

I went with ENV ENVVAR="quoted" because it is the most working solution I found. Note that I did not touch lines that did not report a warning but that were written as ENV ENVVAR=unquoted or ENV ENVVAR=multi \\n line.

FROM alpine

ENV INLINE_UNQUOTE=this is a test
ENV INLINE_QUOTE="this is a test"
ENV MULTILINE_UNQUOTE= \
  this \
  is \
  a \
  test
ENV MULTILINE_QUOTE="\
  this \
  is \
  a \
  test"

Merge split:

  1. aarch64-gnu-debug: Fix LegacyKeyValueFormat report from docker build: aarch64-gnu-debug #153109

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Feb 7, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 7, 2026

r? @marcoieni

rustbot has assigned @marcoieni.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: infra-ci
  • infra-ci expanded to Kobzol, Mark-Simulacrum, jdno, jieyouxu, marcoieni
  • Random selection from Mark-Simulacrum, jdno, jieyouxu, marcoieni

@@ -76,7 +76,7 @@ ENV HOSTS=aarch64-unknown-linux-gnu

ENV CPATH=/usr/include/aarch64-linux-gnu/:$CPATH
Copy link
Contributor Author

@homersimpsons homersimpsons Feb 7, 2026

Choose a reason for hiding this comment

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

Note that here docker reports:

WARNING: UndefinedVar - https://docs.docker.com/go/dockerfile/rule/undefined-var/
Usage of undefined variable '$CPATH' (did you mean $PATH?)
src/ci/docker/host-aarch64/dist-aarch64-linux/Dockerfile:77
--------------------
  75 |     ENV HOSTS=aarch64-unknown-linux-gnu
  76 |
  77 | >>> ENV CPATH=/usr/include/aarch64-linux-gnu/:$CPATH
  78 |
  79 |     ENV RUST_CONFIGURE_ARGS=" \

I'm not sure if this warning should be fixed or if there is an error regarding this.

(That is the sole remaining warning after this commit)

@rust-log-analyzer

This comment has been minimized.

@@ -1,5 +1,5 @@
# Runs `distcheck`, which is a collection of smoke tests:
#
#
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My IDE probably did that, should I revert?

@homersimpsons homersimpsons marked this pull request as draft February 8, 2026 11:38
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 8, 2026
@homersimpsons homersimpsons force-pushed the chore/fix-LegacyKeyValueFormat branch from e408c33 to 23a41c9 Compare February 8, 2026 12:54
@rust-log-analyzer

This comment has been minimized.

@homersimpsons homersimpsons force-pushed the chore/fix-LegacyKeyValueFormat branch from 23a41c9 to baef5fd Compare February 8, 2026 13:04
@homersimpsons homersimpsons marked this pull request as ready for review February 8, 2026 13:06
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 8, 2026
@rust-log-analyzer

This comment has been minimized.

@homersimpsons homersimpsons force-pushed the chore/fix-LegacyKeyValueFormat branch from baef5fd to 2ecbcb8 Compare February 8, 2026 22:26
@rust-log-analyzer

This comment has been minimized.

@homersimpsons homersimpsons force-pushed the chore/fix-LegacyKeyValueFormat branch from 2ecbcb8 to 20f7242 Compare February 8, 2026 23:35
@homersimpsons homersimpsons force-pushed the chore/fix-LegacyKeyValueFormat branch from 20f7242 to ad71a75 Compare February 8, 2026 23:41
@rustbot

This comment was marked as outdated.

@rustbot rustbot added the A-rustc-dev-guide Area: rustc-dev-guide label Feb 8, 2026
@homersimpsons homersimpsons force-pushed the chore/fix-LegacyKeyValueFormat branch 2 times, most recently from 7254d82 to 70e2fe3 Compare February 8, 2026 23:45
@reddevilmidzy reddevilmidzy removed the A-rustc-dev-guide Area: rustc-dev-guide label Feb 13, 2026
@rust-bors

This comment has been minimized.

@marcoieni
Copy link
Member

marcoieni commented Feb 24, 2026

I'm sorry I didn't review this in time. This is still in my todo list :(
I wanted to ask you:

  • Can you review the emoji from the commit and PR title? I don't remember I saw emojis in rust commits, but maybe I'm wrong. If you saw them, please link them to me 👍
  • Can you open a smaller PR where you edit only aarch64-gnu-debug/Dockerfile‎? So that it's a small change. And once we verify it works and it's merged, we can apply the same changes to other Dockerfiles. Merging this PR is a bit scary as it changes many Dockerfile all at once. Wdyt? I would edit maximum ~5 Dockerfiles per PR.

@homersimpsons homersimpsons force-pushed the chore/fix-LegacyKeyValueFormat branch from 70e2fe3 to 1529c99 Compare February 25, 2026 21:06
@homersimpsons homersimpsons changed the title 🚨 Fix LegacyKeyValueFormat report from docker build Fix LegacyKeyValueFormat report from docker build Feb 25, 2026
@homersimpsons
Copy link
Contributor Author

Thank you for your check.

Can you review the emoji from the commit and PR title?

Done

Can you open a smaller PR where you edit only aarch64-gnu-debug/Dockerfile‎?

I opened #153109

Merging this PR is a bit scary as it changes many Dockerfile all at once. Wdyt? I would edit maximum ~5 Dockerfiles per PR.

Yes, I agree it is scary. I would hope the CI would catch anything wrong, though. Okay, I will proceed with batches of Dockerfiles (I will try to group them logically per arch or something). I keep this merge request open for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants