Merge ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.17-21.04-fix-missing-manifest into ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.17-21.04
Proposed by
Athos Ribeiro
Status: | Merged |
---|---|
Merge reported by: | Athos Ribeiro |
Merged at revision: | e1678ab3d83b66e79c880fb24caf6b0f39c3854d |
Proposed branch: | ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.17-21.04-fix-missing-manifest |
Merge into: | ~ubuntu-docker-images/ubuntu-docker-images/+git/telegraf:1.17-21.04 |
Diff against target: |
26 lines (+6/-3) 1 file modified
Dockerfile (+6/-3) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sergio Durigan Junior | Approve | ||
Ubuntu Docker Images | Pending | ||
Review via email: mp+406563@code.launchpad.net |
Description of the change
Do not use pipes in RUN commands
Using pipes without properly handling the earlier commands may conceal errors even when "set -e" is used.
Since setting the pipefail option may not be an alternative (we are using dash), we should refactor commands using pipes to avoid concealing errors.
This should avoid releasing images with missing bits.
To post a comment you must log in.
Thank you for the MP and for catching this problem, Athos. Needless to say, I totally agree with the rationale here. It crossed my mind that we'd be creating new files under /tmp, but since we're doing this in the first stage (build), that's alright.
On a side note: as I told you during standup, I think we can do better in our unit tests and make sure that the generated manifest is not empty. I will submit a PR shortly to address this.
BTW, we will need to update the 20.04 Dockerfile as well.