mckinsey / vizro

Vizro is a toolkit for creating modular data visualization applications.
https://vizro.readthedocs.io/en/stable/
Apache License 2.0
2.65k stars 136 forks source link

Add ability push to main bump version after release #305

Closed l0uden closed 7 months ago

l0uden commented 8 months ago

Description

I've changed the script for creating bump PR after the release to push the code directly to main branch. Personal access token for vizro-svc user was generated. It's stored in Repository secrets as VIZRO_SVC_PAT.

Notice

huong-li-nguyen commented 8 months ago

Hey @l0uden - thanks for this! Could you remind me what the next steps are and who needs to be involved?

I assume you need to reach out to Leon to allow the service user to bypass these protections. Anything else?

l0uden commented 8 months ago

Hey @l0uden - thanks for this! Could you remind me what the next steps are and who needs to be involved?

I assume you need to reach out to Leon to allow the service user to bypass these protections. Anything else?

Hey @huong-li-nguyen

  1. First I'll wait @maxschulz-COL, so he can share personal access token for the service user, because it connected to his phone. If this user will have ability to merge to main without extra permissions so that's it.
  2. If it doesn't I'll ask Leon about adding this user to the setting in the description (I can't do it manually)
  3. If second step is not possible for any reason, I'll ask Leon whether we can use my or anyone else account for this purpose.
l0uden commented 7 months ago
  • did you test this?

Yes, I've tested it in the vizro-qa repo. With the same settings and user.

  • should we do this after every PR, not just the release?

I don't think that every merge to main should increase dev version. For example this PR do nothing to vizro library to increase even the dev version. Looking for changes in the specific folders also will not work, because we need to create changelog for every PR (but maybe there's a way to exclude changelog folder from scan somehow).

maxschulz-COL commented 7 months ago

This looks great, thank you for figuring it all out! Just a minor tweak to the commit message would be nice.

Re @maxschulz-COL's idea of bumping on every push to main: we should not do this, since the same functionality already exists: each "build" of main is labelled by a git commit hash. It's already possible to pip install a specific commit directly. So effectively all we'd be doing is introducing some mapping from .devN to git commit, but this would also introduce lots of noise in the commit history, and we should aim to keep main commit history reasonably clean.

I agree, but I was not referring to the ability to install a specific git commit, but rather to the ability to allow us/user to know precisely what version they actually have (if they install a different intermediate build).

I fully agree that this keep main unclean, and there is better solutions to it https://github.com/ofek/hatch-vcs. In fact I have tried the latter one back when I set this all up, but there was a known issue (that I think I documented in one of the PRs)

The above suggestion is essentially trying to emulate this.

antonymilne commented 7 months ago

I agree, but I was not referring to the ability to install a specific git commit, but rather to the ability to allow us/user to know precisely what version they actually have (if they install a different intermediate build).

I fully agree that this keep main unclean, and there is better solutions to it https://github.com/ofek/hatch-vcs. In fact I have tried the latter one back when I set this all up, but there was a known issue (that I think I documented in one of the PRs)

The above suggestion is essentially trying to emulate this.

Ah ok, that makes more sense. Overall I think this is too low value compared to the noise introduced in main, since nthe number of users who install intermediate builds is very low (we should continue with our frequent releases to ensure this remains the case, and also feel free to bump the dev version manually whenever we like if we want to supply users with a particular unreleased version).