Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: debian version pinning #3528

Merged
merged 4 commits into from
Jun 20, 2023

Conversation

mightyguava
Copy link
Contributor

@mightyguava mightyguava commented Jun 14, 2023

what

Unpin debian packages as was intended. Also removing bash as it's already installed on the debian image.

why

apt-get doesn't support >= or any other kind of version constraints. It only supports version pinning via =. The hadolint error about multiple redirections was correct.

The actual behavior of the existing code was that stuff like curl>=7.74 was being interpreted as curl > "=7.74". Files like =7.74 and =1:2.30 were being created at / and all of the logs from the install went into the last redirect at =1.1.1n. None of the versions were being pinned.

tests

Checked that the installed versions didn't change using apt list.

references

@mightyguava mightyguava requested a review from a team as a code owner June 14, 2023 16:08
@github-actions github-actions bot added the build Relating to how we build Atlantis label Jun 14, 2023
@mightyguava mightyguava changed the title fix debian version pinning fix: debian version pinning Jun 14, 2023
Dockerfile Outdated
libcap2=1:2.44-1 \
dumb-init=1.2.5-1 \
gnupg=2.2.27-2+deb11u2 \
openssl=1.1.1n-0+deb11u4 && \
Copy link
Member

Choose a reason for hiding this comment

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

We do not want to pin here (even if that's the current result). The intention of using >= qualifier was to get the latest version since ~> qualifier isn't supported by apt.

If we change this then let's find a way to achieve the original intention.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good, updated.

Dockerfile Outdated
Comment on lines 38 to 41
# hadolint ignore explanation
# DL3008 (pin versions using "=") - Ignored to avoid failing the build
# SC2261 (multiple redirections) - This is a bug https://github.com/hadolint/hadolint/issues/782
# hadolint ignore=DL3008,SC2261
Copy link
Contributor

Choose a reason for hiding this comment

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

you need this comments back otherwise hadolint will complain

Copy link
Contributor Author

@mightyguava mightyguava Jun 15, 2023

Choose a reason for hiding this comment

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

oops! I thought the comment meant the opposite, that you shouldn't pin the versions 🤦

Reverted!

@GenPage GenPage merged commit 74c07ba into runatlantis:main Jun 20, 2023
mtavaresmedeiros pushed a commit to mtavaresmedeiros/atlantis that referenced this pull request Jul 3, 2023
* fix debian version pinning

* unpin packages

---------

Co-authored-by: PePe Amengual <[email protected]>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* fix debian version pinning

* unpin packages

---------

Co-authored-by: PePe Amengual <[email protected]>
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
* fix debian version pinning

* unpin packages

---------

Co-authored-by: PePe Amengual <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Relating to how we build Atlantis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants