syncstorage-rs icon indicating copy to clipboard operation
syncstorage-rs copied to clipboard

chore: split packages

Open kristof-mattei opened this issue 8 months ago • 7 comments

Description

In #1407 the database packages were split, meaning the database choice is now a compilation choice, and thus we need individual packages.

In the PR the only package deployed is the one with DATABASE_BACKEND=spanner.

This PR changes that. Unfortunately the way Docker works it means we'll need to add 2 repos (as we can't rename old ones).

The proposal is:

Go from 2 repos (DOCKERHUB_REPO & UTILS_DOCKERHUB_REPO) to 3 (DOCKERHUB_REPO_SPANNER, DOCKERHUB_REPO_MYSQL & DOCKERHUB_REPO_UTILS).

The package for the Spanner DB would go to the DOCKERHUB_REPO_SPANNER, the one for MySQL DB to DOCKERHUB_REPO_MYSQL, and I did rename the variable for the utils repo from UTILS_DOCKERHUB_REPO to DOCKERHUB_REPO_UTILS to match the same naming structure.

That's it. It does not bring latest tags for the normal builds. That will go in another PR (should this one be accepted).

What needs to be done before merging this in?

Create the following repos in hub.docker.com (names are proposals):

  • https://hub.docker.com/r/mozilla/syncstorage-rs-spanner
  • https://hub.docker.com/r/mozilla/syncstorage-rs-mysql

Add the following Environment Variables into CircleCI:

  • DOCKERHUB_REPO_SPANNER=https://hub.docker.com/r/mozilla/syncstorage-rs-spanner
  • DOCKERHUB_REPO_MYSQL=https://hub.docker.com/r/mozilla/syncstorage-rs-mysql
  • DOCKERHUB_REPO_UTILS=https://hub.docker.com/r/mozilla/sync-spanner-py-utils

Ensure the user $DOCKER_USER has access to those 3 repos ^ for pushing.

And after merging this in?

  • Deprecate the old https://hub.docker.com/r/mozilla/syncstorage-rs
  • Delete UTILS_DOCKERHUB_REPO env var.

Testing

  1. Kick off a build in CircleCI with the changes above and see if it succeeds.
  2. Fake tag the tip of the branch and push that to ensure it deploys the package in the respective repos.

Issue(s)

  • https://github.com/mozilla-services/syncstorage-rs/issues/1482
  • https://github.com/mozilla-services/syncstorage-rs/issues/1483
  • https://github.com/mozilla-services/syncstorage-rs/issues/1495

Notes

  1. I copied the following line, as I'm not sure it has meaning (some comment parser?): https://github.com/mozilla-services/syncstorage-rs/compare/master...kristof-mattei:syncstorage-rs:feature/split-docker-packages?expand=1#diff-78a8a19706dbd2a4425dd72bdab0502ed7a2cef16365ab7030a5a0588927bf47R454

  2. My formatter made the YAML formatting more consistent. There is a view in GitHub to not display those whitespace changes. If this is not desired let me know & I'll patch them out.

kristof-mattei avatar Oct 24 '23 16:10 kristof-mattei