Skip to content
Unverified Commit 17999553 authored by ysaito1001's avatar ysaito1001 Committed by GitHub
Browse files

Externalize `-Dwarnings` outside Dockerfile (#4209)

## Motivation and Context
Previously, our Docker image configurations had different warning
handling for internal and external use:
- External images (used in smithy-rs CI): Treated warnings as errors
- Internal images: Ignored warnings

Now that we've unified our Docker image for both internal and external
use, internal tests have inherited the stricter warning handling. This
has caused unwanted test failures within our release pipeline.

This PR moves `-Dwarnings` (warning as error) outside of the Docker
image, allowing the environment executing a Docker container to control
whether warnings should be treated as errors. With this change, warnings
won't be treated as errors in Docker containers themselves. The
smithy-rs CI can set those flags to treat warnings as errors, and the
release pipeline does not set the flags to continue ignoring warnings.

## Testing
After having externalized `-Dwarnings` outside the Docker image,
confirmed that the smithy-r CI replicates the same set of errors with a
fake change that introduced an intentional `unused` clippy warning
([main branch with a fake
change](https://github.com/smithy-lang/smithy-rs/actions/runs/16282439691),
[PR branch with a fake
change](https://github.com/smithy-lang/smithy-rs/actions/runs/16283665358))

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 1a94d1d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment