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

V1.x Release #117

Closed
YOU54F opened this issue Aug 30, 2023 · 8 comments · Fixed by #118 or #120
Closed

V1.x Release #117

YOU54F opened this issue Aug 30, 2023 · 8 comments · Fixed by #118 or #120

Comments

@YOU54F
Copy link
Member

YOU54F commented Aug 30, 2023

Hey all,

Just to let you know we will be promoting to a V1.x release very shortly,

It will do the following at the moment

@YOU54F YOU54F reopened this Sep 8, 2023
@YOU54F
Copy link
Member Author

YOU54F commented Sep 8, 2023

So,

  1. first off, I am a numpty. I did a minor release, rather than a major!

  2. For reasons I cannot fathom at the moment, the only one now with a multi arches, is the major tag 0

Screenshot 2023-09-08 at 19 32 05

It doesn't make sense as the script is running the same command , albeit with a different tag, each time

https://github.com/pact-foundation/pact-ruby-cli/blob/master/script/release-workflow/docker-push.sh

@YOU54F
Copy link
Member Author

YOU54F commented Sep 11, 2023

Pulled the changes into my fork, released, and the manifests are correct 🤔

Screenshot 2023-09-11 at 17 21 53

@YOU54F
Copy link
Member Author

YOU54F commented Sep 11, 2023

Right, so it doesn't look like the version increment is considered in this release workflow, so regardless of the user input, its defaulting to minor

  1. on release workflow, we set an increment, this might be set manually when dispatching the workflow, or automatically by the gem update, which invokes the release workflow
  1. we pass it through to script/release-workflow/run.sh
  1. The env vars are setup in this script . ${script_dir}/set-env-vars.sh
  1. set-env-vars.sh calls out to script/release-workflow/next-docker-tag.sh to get the docker tag name
  1. the docker tag is computed and constructed using the version from lib/pact/cli/version.rb
  • uses the format ${gem_version}-<dupe_identifier>
    • This provides a distinct docker tag, where a new Docker image is released, and the underlying gems haven't been updated (example would be alpine base image update, or ruby version update with no updates to the gems)
  • tag="${gem_version}.${next_release_number}"

How should we compute the Docker tag version?

Should we record all the changes, simply, in the pact cli gem version?

  • major/minor/patch update to pact cli gem version depending on the update of a packaged pact-* gem
    • triggers a release of the workflow, with the major/minor/patch INCREMENT set, as triggered by the underlying pact-* gem update
  • a major/minor/patch update to the docker image, but not the gem, should trigger a pact cli gem version update

@YOU54F
Copy link
Member Author

YOU54F commented Sep 11, 2023

hmm

snags.

  1. incorrect referencing of pact broker here

do we want something like

  if [ -n "$INCREMENT" ]; then
    bundle exec bump $INCREMENT --no-commit --replace-in $PWD/lib/pact/cli/version.rb > /dev/null
  fi

in

and commit back the updated versions, as part of the docker release, which will catch docker release changes, and also releases triggered by gem updates

@YOU54F
Copy link
Member Author

YOU54F commented Sep 11, 2023

also wat?! These were the same codebases albeit in different forks. - still not publishing multi manifests correctly

Screenshot 2023-09-11 at 20 27 11

but did on the fork see #117 (comment)

@YOU54F
Copy link
Member Author

YOU54F commented Nov 13, 2023

Published 0.56.0.5 and oddly, one of the pushes gets associated with @bethesque account, but the other two which are published linux/amd64 only are associated with the pactfoundation account.

image

This doesn't really make sense, as there is only one set of credentials (DOCKERHUB_USERNAME and DOCKERHUB_TOKEN which are set at the pactfoundation org level, so not sure why Beth's account is being picked up here)

I tested out again on my fork, but forget there was a hard-coded org name, so I published to the pact-foundation account.

This has published the multi-manifests across all builds, with no other code changes. Could it be that we just need to update the org wide docker account and token in gh actions. Such confuse 😬

Screenshot 2023-11-13 at 15 37 30

@bethesque
Copy link
Member

I'm as confused as you are, if not more.

@YOU54F
Copy link
Member Author

YOU54F commented Jan 23, 2024

So I've worked it out now, there was an automated build trigger in docker, which was clobbering the multi-manifest builds, with an amd64 only. Disabled now in Dockerhub and pushed out a patch version to go out.

image

What a doozy! I thought I was literally going mad.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Closed
2 participants