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

Use latest directory commit timestamp as tag #286

Merged
merged 3 commits into from
Aug 5, 2024

Conversation

Artyop
Copy link
Contributor

@Artyop Artyop commented Jul 12, 2024

This commit change the way of tagging image, from using git-lfs-tree sha256 to using directory's last commit timestamp. It will permit renovate to sort versions and update properly new images, where renovate wasn't able to do so before due to its inability to sort SHAs.
The git log command, when given a specific directory in parameter, retrieve the last commit were changes were made in said directory. This means that we can ensure different image versions same as used to be with git-tree.
Renovate can sort versions from left to right, using a timestamp as a tag value allows it to retrieve the latest version deployed with ease.

Fixes #285

@Artyop Artyop requested a review from a team as a code owner July 12, 2024 15:05
@Artyop Artyop requested a review from borkmann July 12, 2024 15:05
@Artyop Artyop changed the title Signed-off-by: Anto <[email protected]> Use latest directory commit timestamp as tag Jul 12, 2024
@Artyop Artyop force-pushed the pr/fix-image-tag-renovate branch 4 times, most recently from 38d4a0a to e79d616 Compare July 16, 2024 08:30
@Artyop Artyop requested review from a team as code owners July 16, 2024 08:30
@Artyop Artyop force-pushed the pr/fix-image-tag-renovate branch from e79d616 to d579daa Compare July 16, 2024 08:51
@Artyop
Copy link
Contributor Author

Artyop commented Jul 16, 2024

Bit of an issue with libc version while creating the images it seems
ImportError: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /lib64/libgcc_s.so.1)` when trying to use dnf for anything other than an install, looking into it

@sayboras
Copy link
Member

sayboras commented Jul 17, 2024

Can you rebase with main branch to pick up #281 to avoid any surprise?

@Artyop Artyop force-pushed the pr/fix-image-tag-renovate branch from 6bb158e to b665af2 Compare July 17, 2024 09:19
@Artyop
Copy link
Contributor Author

Artyop commented Jul 17, 2024

Rebased from main branch, checking for the key issue on the iptables-20.04-image

@sayboras
Copy link
Member

checking for the key issue on the iptables-20.04-image

iptables-20.04-image might not be used anymore, as we moved to snapshot build for specific iptables version.

#287

@sayboras
Copy link
Member

#287 is merged, so you might need to rebase again 😅 , good news is no need to check for key issue 🔑

@Artyop
Copy link
Contributor Author

Artyop commented Jul 17, 2024

#287 is merged, so you might need to rebase again 😅 , good news is no need to check for key issue 🔑

well that sounds like a good deal to me!

This commit change the way of tagging image, from using git-lfs-tree sha256 to using directory's last commit timestamp.
It will permit renovate to sort versions and update properly new images, where renovate wasn't able to do so before due to its inability to sort SHAs.

Signed-off-by: Antony Reynaud <[email protected]>
Redhat ubi8:8.9-1136 dnf was generating issue to perform remove of gcc and make.
Bumping redhat version to ubi8/ubi (from https://catalog.redhat.com/software/base-images) fixed it.

Signed-off-by: Antony Reynaud <[email protected]>
@Artyop Artyop force-pushed the pr/fix-image-tag-renovate branch from b665af2 to 63ec437 Compare July 17, 2024 12:31
Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

it might still be useful to have commit sha as a part of the tag (like $timestamp-$sha or something) so that it's easy to see which commit the image got built from.

This commit adds the short commit after the timestamp.
Will help to know which commit the image version will be coming from.

Signed-off-by: Antony Reynaud <[email protected]>
@Artyop
Copy link
Contributor Author

Artyop commented Jul 31, 2024

@michi-covalent added the short commit right after the timestamp separated with a "-", let me know if it sounds good for you
(tested it, renovate seems to be ok with it)

Copy link
Contributor

@michi-covalent michi-covalent left a comment

Choose a reason for hiding this comment

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

🥰

@qmonnet qmonnet merged commit 353d2d8 into cilium:master Aug 5, 2024
2 checks passed
Artyop added a commit to Artyop/image-tools that referenced this pull request Aug 5, 2024
Following the pr cilium#286, update of the readme about how the
tagging mechanic works

Signed-off-by: Antony Reynaud <[email protected]>
Artyop added a commit to Artyop/image-tools that referenced this pull request Aug 7, 2024
Following the pr cilium#286, update of the readme about how the
tagging mechanic works

Signed-off-by: Antony Reynaud <[email protected]>
tklauser pushed a commit that referenced this pull request Aug 7, 2024
Following the pr #286, update of the readme about how the
tagging mechanic works

Signed-off-by: Antony Reynaud <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: renovate is unable to track image updates (unsupported/unversioned value)
6 participants