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

✨⚗️ Add additional docker image tag to simcore github actions (⚠️ DEVOPS) #4548

Merged

Conversation

mrnicegyu11
Copy link
Member

@mrnicegyu11 mrnicegyu11 commented Jul 26, 2023

What do these changes do?

Currently, we push two docker image tags to each docker image (identified by its digest) that we upload to dockerhub. One is "short" and one is "verbose" (including built date and git sha), like so:

This is equivalent for staging and production. For master, this works fine with respect to the osparc-deployment-agent. We watch (read: poll / querry) for new docker images corresponding to the tag master-github-latest, and we if we find one, we roll it out.

We do the same for staging and production, but here this approach is not perfect. Ideally, we would want to roll out not the latest staging or release docker images, but the ones corresponding to the precise git tag that we are rolling out (e.g. staging_Sundae1 or v1.56.0). The deployment-agent has the information about which staging/production he is currently rolling out, given as the git tag of the github/gitlab repositories. In the past, we had issues during releases when docker image tags (like release-github-latest) were generated some minutes after the corresponding git-tag in osparc-simcore, etc.

This PR brings a third naming convention to the docker image tags, which corresponds exactly to the current (pre-)release name. For master, no third docker image tag will be added, all will stay the same. For staging, this PR would make github actions create the following docker image tags on dockerhub:

The same would be the case for production.
In a next step, the deployment agent can be adjusted to utilize these specific docker image tags on dockerhub. This will mitigate some issues we have seen during simcore-releases in the past.

BONUS:

  • Github-Action Debug step that prints env-vars now prints them sorted alphabetically.

Related issue/s

I guess there are some, didnt go through the hazzle of compiling them here :(

How to test

Merge it and pray.

DevOps Checklist

To be checked once this is merged:

  • Master github-actions still work
  • Staging Release github-actions still work
  • Production release github-actions still work
  • Staging Hotfix github-actions still work
  • Production Hotfix github-actions still work

@mrnicegyu11 mrnicegyu11 added a:infra+ops maintenance of infrastructure or operations (discussed in retro) t:enhancement Improvement or request on an existing feature t:maintenance Some planned maintenance work idea Proposed new functionality that is still not implemented release Preparation for pre-release/release labels Jul 26, 2023
@mrnicegyu11 mrnicegyu11 added this to the Sundae milestone Jul 26, 2023
@mrnicegyu11 mrnicegyu11 requested a review from sanderegg as a code owner July 26, 2023 13:47
@mrnicegyu11 mrnicegyu11 self-assigned this Jul 26, 2023
@mrnicegyu11 mrnicegyu11 requested a review from pcrespov as a code owner July 26, 2023 13:47
@codeclimate
Copy link

codeclimate bot commented Jul 26, 2023

Code Climate has analyzed commit 3bc4cf6 and detected 0 issues on this pull request.

View more on Code Climate.

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

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

this looks ok and I do not see any issue with doing this as long as there is no overwrite of the same tag.

I guess this might simplify your code a bit.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.1% 0.1% Duplication

@mrnicegyu11 mrnicegyu11 merged commit bd7f4b4 into ITISFoundation:master Jul 26, 2023
@mrnicegyu11 mrnicegyu11 deleted the add/dockerImageReleaseTag branch July 26, 2023 17:10
@matusdrobuliak66 matusdrobuliak66 mentioned this pull request Sep 22, 2023
50 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:infra+ops maintenance of infrastructure or operations (discussed in retro) idea Proposed new functionality that is still not implemented release Preparation for pre-release/release t:enhancement Improvement or request on an existing feature t:maintenance Some planned maintenance work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants