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 a migration script #240

Merged
merged 5 commits into from
Apr 16, 2024
Merged

Conversation

llucax
Copy link
Contributor

@llucax llucax commented Apr 15, 2024

This might not be the most advanced approach, but it should be a good starting point to greatly improve the UX of the upgrade process.

@llucax llucax requested a review from a team as a code owner April 15, 2024 15:12
@github-actions github-actions bot added part:cookiecutter Affects the generation of projects using cookiecutter part:doc labels Apr 15, 2024
llucax added 4 commits April 15, 2024 12:21
Signed-off-by: Leandro Lucarella <[email protected]>
Add a step to reset the migration script.

Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax force-pushed the migration-script branch from d717965 to b0d6ba5 Compare April 15, 2024 15:21
@llucax llucax requested a review from Marenz April 15, 2024 15:21
@llucax llucax self-assigned this Apr 15, 2024
@llucax llucax added part:tooling Affects the development tooling (CI, deployment, dependency management, etc.) part:cli Affects the command-line tool labels Apr 15, 2024
@llucax llucax added this to the v0.10.0 milestone Apr 15, 2024
@llucax llucax mentioned this pull request Apr 15, 2024
it directly.

```sh
curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/{{ ref_name }}/cookiecutter/migrate.sh \
Copy link
Contributor

Choose a reason for hiding this comment

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

why not call it version instead of ref_name? refname seems to be for some script or tool, not for the user guide text? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a macro, it is expanded in the docs, the user never sees it.

To run it, the simplest way is to fetch it from GitHub and run it directly:

```console
curl -sSL https://raw.githubusercontent.com/frequenz-floss/frequenz-repo-config-python/v0.10.0/cookiecutter/migrate.sh | sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we also provide something like python -m frequenz.repo-config.migrate v0.10.0 or so? Might be more accessible

Copy link
Contributor Author

@llucax llucax Apr 16, 2024

Choose a reason for hiding this comment

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

Yes, that's the end goal, I even created a repo label part:cli but the cli tool never came because of time issues. I prefer not to start now because I want to split this repo soon ™️ (to smaller libraries, like https://github.com/frequenz-floss/setuptools-betterproto/) and a repository for the cookiecutter templates. The migration tool should definitely live in the cookiecutter template repo, but other commands should live elsewhere (like the version calculation tools used by the CI).

So for now I preferred to go with something very simple, to see how it works and not to build a huge thing that will need to be teared apart soon.

Marenz
Marenz previously approved these changes Apr 16, 2024
Copy link
Contributor

@Marenz Marenz left a comment

Choose a reason for hiding this comment

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

Some comments, but generally okay. Approving in case you want to move forward

Copy link
Contributor

@daniel-zullo-frequenz daniel-zullo-frequenz left a comment

Choose a reason for hiding this comment

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

Same, only some optional cosmetics.

Co-authored-by: daniel-zullo-frequenz <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
@llucax llucax dismissed stale reviews from daniel-zullo-frequenz and Marenz via 4511f87 April 16, 2024 11:27
@llucax llucax enabled auto-merge April 16, 2024 11:28
@llucax
Copy link
Contributor Author

llucax commented Apr 16, 2024

Enabling auto-merge, as the comments were optional and I think they are sort of addressed.

@llucax
Copy link
Contributor Author

llucax commented Apr 16, 2024

Oh, it needs a new approval anyway.

@llucax llucax added this pull request to the merge queue Apr 16, 2024
Merged via the queue into frequenz-floss:v0.x.x with commit 54a4e57 Apr 16, 2024
14 checks passed
@llucax llucax deleted the migration-script branch April 16, 2024 11:48
@llucax llucax added part:docs Affects the documentation and removed part:doc labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
part:cli Affects the command-line tool part:cookiecutter Affects the generation of projects using cookiecutter part:docs Affects the documentation part:tooling Affects the development tooling (CI, deployment, dependency management, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants