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

Make rebuilding the app images smarter #694

Open
wants to merge 1 commit into
base: latest
Choose a base branch
from

Conversation

gerrod3
Copy link
Collaborator

@gerrod3 gerrod3 commented Nov 20, 2024

When running the build app image CI for a release (nightly, on-merge, manual) the build action will check to see if it can skip rebuilding the image if no new versions of Pulp have been released for that branch. This should make our nightly runs do less work and avoid publishing what are practically duplicate images.

Copy link
Member

@mdellweg mdellweg left a comment

Choose a reason for hiding this comment

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

I did not know that you can get dependencies from pypi without fetching the actual wheels. This is nice!

echo "BUILD=true" >> $GITHUB_ENV
else
# Script returns non-zero (100) when new versions are available
if python .ci/scripts/check_for_updates.py ${{ github.ref_name }} versions.freeze; then
Copy link
Member

Choose a reason for hiding this comment

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

This name would help reading the if clause:

Suggested change
if python .ci/scripts/check_for_updates.py ${{ github.ref_name }} versions.freeze; then
if python .ci/scripts/check_up_to_date.py ${{ github.ref_name }} versions.freeze; then

if: env.BUILD == 'true' && github.event_name != 'pull_request'
uses: actions/cache/save@v4
with:
key: ${{ env.VERSIONKEY }}
Copy link
Member

Choose a reason for hiding this comment

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

Is this the same cache that we key with base_images={{ env.VERSIONKEY }}?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's the same cache container, but not the same entry. base_images={{ env.VERSIONKEY }} was a typo left over from copy-pasting. I fixed it, now the key should only be {{ env.VERSIONKEY }} for the versions.freeze file.

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

Successfully merging this pull request may close these issues.

2 participants