Skip to content

Conversation

@sdn4z
Copy link
Collaborator

@sdn4z sdn4z commented Sep 26, 2025

Test the docker image both in the PR and before publishing it.

I've split the build in the publish workflow so there's now one job per architecture. This is because gh cache does not properly work when more than one architecture is set, which results in the cache not being used when it should.

closes #350

@github-actions github-actions bot added the CI label Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot removed the CI label Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@sdn4z sdn4z changed the title ci: test --version after build ci: Improve docker cache and test that the image works Sep 26, 2025
@sdn4z
Copy link
Collaborator Author

sdn4z commented Sep 26, 2025

/lgtm review

@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🦉 lgtm Review

Score: Needs Work 🔧

🔍 Summary

Thanks for this contribution. The goal of improving Docker caching and adding tests is great, and splitting the build jobs per architecture is the correct approach for improving caching.

However, there are a couple of critical issues in the implementation that need to be addressed. The publish.yml workflow has a broken testing mechanism that will not work as it is, and the build-test.yml workflow will fail due to an invalid Docker tag being used for the cache.

I've left detailed comments on these high-severity issues with suggestions for fixes, along with a couple of minor quality suggestions. Please address the workflow issues before this can be merged.

More information
  • Id: 7a6c063af7ca47feae9957d28d878c86
  • Model: gemini-2.5-pro
  • Created at: 2025-09-26T15:21:13.325532+00:00
Usage summary
  • Request count: 2
  • Request tokens: 28,893
  • Response tokens: 14,888
  • Total tokens: 43,781

See the 📚 lgtm-ai repository for more information about lgtm.

@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
@sdn4z
Copy link
Collaborator Author

sdn4z commented Sep 26, 2025

/lgtm review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

🦉 lgtm Review

Score: Needs Work 🔧

🔍 Summary

This is a great PR that significantly improves the robustness of our Docker image pipeline. Adding tests for the built images and fixing the multi-arch caching are excellent changes.

However, there is one critical issue in the publish.yml workflow that needs to be addressed before this can be merged. The matrix configuration for the multi-architecture build contains a typo in an architecture name and also includes an unused variable. This will likely cause the release to fail for the ARM platform.

Once this is fixed, the PR should be good to go. The score reflects the critical nature of the issue.

More information
  • Id: 086a0691190140ff87cb6fcc0cff1ef3
  • Model: gemini-2.5-pro
  • Created at: 2025-09-26T15:51:16.855569+00:00
Usage summary
  • Request count: 2
  • Request tokens: 26,507
  • Response tokens: 11,781
  • Total tokens: 38,288

See the 📚 lgtm-ai repository for more information about lgtm.

@github-actions github-actions bot added CI and removed CI labels Sep 26, 2025
# Extract version IDs that do NOT have the 'buildcache' tag
ids_to_delete=$(echo "$versions" | jq -r '.[] | select(.metadata.container.tags | index("buildcache") | not) | .id')
# Extract version IDs that do NOT have any buildcache-* tags (buildcache-amd64, buildcache-arm64, etc.)
ids_to_delete=$(echo "$versions" | jq -r '.[] | select(.metadata.container.tags | map(test("^buildcache-")) | any | not) | .id')
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This will not delete current cache, I have to do it manually.

@sdn4z sdn4z marked this pull request as ready for review September 29, 2025 07:16
@sdn4z sdn4z requested a review from scastlara as a code owner September 29, 2025 07:16
@github-actions github-actions bot added CI and removed CI labels Sep 29, 2025
@sdn4z sdn4z merged commit 5bceb55 into elementsinteractive:main Sep 29, 2025
13 checks passed
@sdn4z sdn4z deleted the test-version branch September 29, 2025 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve docker cache

2 participants