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 bug in Docker image build process which caused tags to have improper manifests in DockerHub #2648

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

tdonohue
Copy link
Member

@tdonohue tdonohue commented Nov 17, 2023

References

Description

Fix bug in Docker build process, where the manifests for the latest and latest-dist images on DockerHub were invalid.

The core issues was that in #2644, both the latest and latest-dist build processes were sharing the same artifact to store their digests. When the manifest was built for one of those tags, it was including every digest that had been built so far.

This behavior resulted in the latest tag in DockerHub having a manifest that included all the following:

  • The latest image version for AMD64
  • The latest-dist image version for AMD64
  • The latest image version for ARM64

It also meant that the latest-dist tag ONLY included the longest running image:

  • The latest-dist image for ARM64

The reason for this was a race condition where the ARM64 image took longer to build. At the point where the latest ARM64 image completed, both of the AMD64 images were already completed. Since they shared the same artifact, both AMD64 images WRONGLY ended up included in the same manifest.

This PR also does some minor cleanup in this docker.yml including:

  • Updating all action step plugins to latest versions
  • Reordering matrix parameters to list the arch first, so that step/jobs names in GitHub are clearer.
    • Previously names looked like dspace-angular (false, linux/amd64, ubuntu-latest)
    • Now, then names will look like dspace-angular (linux/amd64, ubuntu-latest, false)
    • This is just my preference, but it's also easier to tell steps apart as longer names get trimmed in the display. It moves the boolean for isPR to the end as it's not useful in the trimmed name.

Instructions for Reviewers

  • This will be merged immediately if it passes PR CI validation. The full test requires merger.

…o store digests. Other minor cleanup & comments added.
@tdonohue tdonohue added bug code task 1 APPROVAL pull request only requires a single approval to merge backend: Docker related to DSpace deployment via Docker labels Nov 17, 2023
@tdonohue tdonohue added this to the 8.0 milestone Nov 17, 2023
@tdonohue tdonohue mentioned this pull request Nov 17, 2023
8 tasks
@tdonohue tdonohue changed the title Fix bug in Docker build process which caused tags to have improper manifests Fix bug in Docker image build process which caused tags to have improper manifests in DockerHub Nov 17, 2023
@tdonohue tdonohue merged commit 99228d9 into DSpace:main Nov 17, 2023
13 checks passed
@tdonohue tdonohue deleted the fix_docker_manifest branch November 17, 2023 16:08
@tdonohue
Copy link
Member Author

This improves the Docker image builds, but still results in a failure for the latest-dist image. Finally figured out what I believe is causing the issue & it should be fixed in #2650

@tdonohue
Copy link
Member Author

Ported to dspace-7_x in #2655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 APPROVAL pull request only requires a single approval to merge backend: Docker related to DSpace deployment via Docker bug code task
Projects
No open projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant