Skip to content

Conversation

@mailo-nr
Copy link
Contributor

@mailo-nr mailo-nr commented Aug 4, 2025

No description provided.

@mailo-nr mailo-nr force-pushed the marsac/ci-opt branch 4 times, most recently from bf98d38 to ceecfa2 Compare August 4, 2025 19:46
# Base hash for source generation (inputs that affect generation)
SOURCE_HASH="${{ hashFiles('distributions/${{ inputs.distribution }}/manifest.yaml', 'distributions/${{ inputs.distribution }}/_build/go.mod', 'distributions/${{ inputs.distribution }}/_build/go.sum', 'Makefile') }}"
# Extended hash for Docker build (includes generated sources)
DOCKER_HASH="${{ hashFiles('distributions/${{ inputs.distribution }}/Dockerfile', 'distributions/${{ inputs.distribution }}/manifest.yaml', 'distributions/${{ inputs.distribution }}/_build/go.mod', 'distributions/${{ inputs.distribution }}/_build/go.sum') }}"
Copy link
Contributor

Choose a reason for hiding this comment

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

Embedded configs probably need to be part of the docker hash, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ooh, yes, good catch

if [ ${{ inputs.nightly }} = "true" ]; then
echo "image_tag=$VERSION-nightly-$ARCH" >> $GITHUB_ENV
else
echo "image_tag=$VERSION-$ARCH" >> $GITHUB_ENV
Copy link
Contributor

Choose a reason for hiding this comment

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

The else block is in conflict with the entire step being condition on nightly?

@mailo-nr mailo-nr force-pushed the marsac/ci-opt branch 2 times, most recently from 98a43e6 to 907a478 Compare August 7, 2025 18:26
~/go/pkg/mod
key: ${{ steps.build-cache-keys.outputs.binary_key }}
restore-keys: |
goreleaser-build-${{ inputs.distribution }}-
Copy link
Contributor

Choose a reason for hiding this comment

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

The binary_key doesn't have the goreleaser-build- prefix, so will this ever hit anything?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch

Comment on lines +160 to +162
# Fallback version
VERSION="cached-$(date +%Y%m%d-%H%M)"
echo "⚠️ Warning: No metadata found, using fallback version: $VERSION"
Copy link
Contributor

Choose a reason for hiding this comment

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

Have we encountered this? Is this to have a fallback when goreleaser changes where it writes its metadata or is there a different scenario I am not thinking of? I am wondering if we should just fail the build instead of semi-silently continue?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Didn't encounter it but didn't want a scenario where build cache could get corrupted. I'm fine taking this out and we see if it's something we run into

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.

3 participants