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

accept non-prerelease baseVersion (append -0.dev) #184

Merged
merged 3 commits into from
Sep 7, 2022

Conversation

minrk
Copy link
Member

@minrk minrk commented Sep 7, 2022

allows clearer behavior, simpler config without dictating everyone add the same 0.dev suffix by default.

No practical effect, other than baseVersion: 1.2.3 is equivalent to baseVersion: 1.2.3-0.dev instead of raising an error telling you to use 1.2.3-0.dev.

Importantly, this is required for chartpress to be used with an automatic version-bumping tool like tbump.

allows clearer behavior, simpler config without
dictating everyone add the same 0.dev suffix by default
@minrk minrk added the enhancement New feature or request label Sep 7, 2022
@consideRatio
Copy link
Member

I struggle to think if I agree or not based on non-technical aspects like what our goals are. Due to that, I figure I'll write down goals as I see them so we can agree/disagree on them before thinking about technical parts.

Desired outcomes

Semver2 version sorting to position dev releases with a .git... suffix in a robust manner. An example ordering of releases would be like.

1.2.0-0.dev.git.5500.habc
1.2.0-beta.1
1.2.0-beta.1.git.5600.habc
1.2.0
2.0.0-0.dev.git.5700.h7123
2.0.0-beta.1
2.0.0-beta.1.git.5800.h234
2.0.0-beta.2
2.0.0-beta.2.git.5900.h345
2.0.0

Current developer experience (DX)

# baseVersion is 2.0.0-0.dev
2.0.0-0.dev.git.5700.h7123

2.0.0-beta.1
# baseVersion updated to 2.0.0-beta.1

2.0.0-beta.1.git.5800.h234

2.0.0-beta.2
# baseVersion updated to 2.0.0-beta.2

2.0.0-beta.2.git.5900.h345

2.0.0
# baseVersion updated to 2.0.1-0.dev

2.0.1-0.dev.git.6000.h456

Desired developer experience (DX)

Easy and reliable workflow

Desired code base

Simple logic, easy to understand, communicate how it works, and as a consequence also to maintain it long term and help this project be useful

@minrk
Copy link
Member Author

minrk commented Sep 7, 2022

I'm not sure how related this PR is to the discussion in jupyterhub/zero-to-jupyterhub-k8s#2860 . It only changes the interpretation of baseVersion without a prerelease as equivalent to version-0.dev, no other behavior is changed.

I suppose it does relate to the recommended workflow for charts that publish prerelease tags. Accepting stable versions is required for compatibility with something like tbump.

@minrk minrk changed the title append -0.dev to non-prerelease baseVersion accept non-prerelease baseVersion (append -0.dev) Sep 7, 2022
chartpress.py Outdated Show resolved Hide resolved
@consideRatio
Copy link
Member

If this enables use of tbump I'm sold, I'd love to see us able to use a tool like that as we would get something reliable and easy to document in RELEASE.md files.

@minrk
Copy link
Member Author

minrk commented Sep 7, 2022

I'm going to write a test tomorrow that goes through all the release phases using tbump with baseVersion and update the baseVersion notes to recommend use with tbump.

@consideRatio
Copy link
Member

Thank you soo much for your thorough work on this @minrk!!!!! ❤️ 🎉

and add test case covering release process

- no tag
- tbump beta
- commit
- tbump final
- back to dev
@minrk
Copy link
Member Author

minrk commented Sep 7, 2022

Added tbump test case and mentions in readme

Copy link
Member

@consideRatio consideRatio left a comment

Choose a reason for hiding this comment

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

Wieee!

@consideRatio consideRatio merged commit f568380 into jupyterhub:main Sep 7, 2022
@minrk minrk deleted the dont-require-0.dev branch September 8, 2022 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants