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

chore: setup changie on Rust SDK #5676

Merged
merged 2 commits into from
Aug 25, 2023
Merged

Conversation

TomChv
Copy link
Member

@TomChv TomChv commented Aug 22, 2023

Add basic Changie setup to Rust based on #5408.

Add basic [Changie](https://changie.dev/) setup to Rust based on dagger#5408.

Signed-off-by: Vasek - Tom C <tom@epitech.eu>
@TomChv TomChv requested a review from a team as a code owner August 22, 2023 10:04
@TomChv TomChv self-assigned this Aug 22, 2023
Copy link
Member Author

Choose a reason for hiding this comment

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

Should I convert the old changelog to the new changie format?

Copy link
Contributor

Choose a reason for hiding this comment

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

Feel free to do so, if it isn't too much of a bother. Otherwise we can just archive the old changelog

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw that all commits where on your personal repository, so I'll drop this changelog so we can start with a fresh one on Dagger repository :)

Comment on lines 24 to 25
⬢ https://crates.io/crates/dagger-sdk
📒 https://docs.rs/dagger-sdk/
Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to add the exact release number but the format is major.minor.patch without v.
I can check on Changie if it's possible to trim the version number if that's important!

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks to be using gotemplates, so we could probably just strip the first character

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep it work, here's the output with a dry run for version 0.3.1

⬢ https://crates.io/crates/dagger-sdk/0.3.1
📒 https://docs.rs/dagger-sdk/0.3.1/dagger-sdk

Fixed in fd76c23

Copy link
Contributor

@kjuulh kjuulh left a comment

Choose a reason for hiding this comment

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

I don't really have any comments other than replies to what you wrote already. I will have to investigate how changie works, but it seems quite straightforward =D

@TomChv
Copy link
Member Author

TomChv commented Aug 24, 2023

Yes is it, here is an example of command: changie new --kind "Fixed" --body "Improve enum management to not conflict with string" --custom "Author=TomChv" --custom "PR=5645"

You can also check our CONTRIBUTING.md

@TomChv
Copy link
Member Author

TomChv commented Aug 24, 2023

I'll apply the changes today or tomorrow and we can merge it after that :)

Signed-off-by: Vasek - Tom C <tom@epitech.eu>
@TomChv
Copy link
Member Author

TomChv commented Aug 25, 2023

I merge that PR as soon as CI has finished :)

@TomChv TomChv merged commit f7f7052 into dagger:main Aug 25, 2023
26 of 27 checks passed
@gerhard
Copy link
Member

gerhard commented Aug 30, 2023

I see a few issues with this PR:

  1. Release notes for already released Rust SDK versions have been deleted - we need to restore these.

  2. There is no version in sdk/rust/.changes, meaning that the first Rust SDK version generated by changie will be 0.0.1. This is linked to 1, we are missing a bunch of files in sdk/rust/.changes. See https://github.com/dagger/dagger/tree/v0.8.4/sdk/go/.changes for an example.

  3. Releasing instructions have been added to generate the Rust SDK changelog, but we are missing everything else that is required to produce a Rust SDK release. We either add the rest, and produce a Rust SDK release same as other SDKs, or remove these partial instruction.

@TomChv
Copy link
Member Author

TomChv commented Aug 31, 2023

Release notes for already released Rust SDK versions have been deleted - we need to restore these.

My answer was:

I saw that all commits where on your personal repository, so I'll drop this changelog so we can start with a fresh one on Dagger repository :)

Basically, all the commits are pointing to @kjuulh, and not our, if that's not a problem I can add old changelog but I thought it would be better to tag PR from our repository that splitting commits across repos.

There is no version in sdk/rust/.changes, meaning that the first Rust SDK version generated by changie will be 0.0.1. This is linked to 1, we are missing a bunch of files in sdk/rust/.changes. See https://github.com/dagger/dagger/tree/v0.8.4/sdk/go/.changes for an example.

Right, I wasn't sure which version I should take, should we start with 0.3.0 since it's the latest?
https://crates.io/crates/dagger-sdk/0.3.0

Releasing instructions have been added to generate the Rust SDK changelog, but we are missing everything else that is required to produce a Rust SDK release. We either add the rest, and produce a Rust SDK release same as other SDKs, or remove these partial instruction

What is the best to do? @kjuulh do you want the Rust release to be part of our SDKs release or do you wanna keep doing the release yourself?

@kjuulh
Copy link
Contributor

kjuulh commented Aug 31, 2023

@TomChv @gerhard

It would be best if the rust sdk aligns with the existing release process for other sdks, that is as long as it is something I can trigger =D

Version 0.3.0 is a good starting point, so we can just start off of that. The old changelogs aren't super necessary, as we've got quite limited consumers, feel free to start off from scratch if it is easier. If people want to read changelogs, they can go back to the archived repo and read the release notes for the older releases, or read them via. crates io, where they should be included as well.

The only thing I need to do is fix the publish pipeline, it was disabled because it was too unstable I think. Rust is very finicky about releasing dependent crates (I've already fixed this issue), so I will attempt to fix the last parts missing for the publisher and we should be good to go.

The only other thing is that I need to support bumping the versions in the crates as well, rust prefers if the Cargo.toml version follows what is being released, and is in git. This is currently a missing feature, but it shouldn't be too bad to implement, maybe as part of the preparation in the release steps, or automated not quite sure what the best is here.

@TomChv
Copy link
Member Author

TomChv commented Aug 31, 2023

Version 0.3.0 is a good starting point, so we can just start off of that. The old changelogs aren't super necessary, as we've got quite limited consumers, feel free to start off from scratch if it is easier. If people want to read changelogs, they can go back to the archived repo and read the release notes for the older releases, or read them via. crates io, where they should be included as well.

Sounds good, I'll create a first version file then to pin this version!

The only thing I need to do is fix the publish pipeline, it was disabled because it was too unstable I think. Rust is very finicky about releasing dependent crates (I've already fixed this issue), so I will attempt to fix the last parts missing for the publisher and we should be good to go.

The only other thing is that I need to support bumping the versions in the crates as well, rust prefers if the Cargo.toml version follows what is being released, and is in git. This is currently a missing feature, but it shouldn't be too bad to implement, maybe as part of the preparation in the release steps, or automated not quite sure what the best is here.

Is that thing that can be integrated to our mage system? You can open a PR to add these changes for sure!

@kjuulh
Copy link
Contributor

kjuulh commented Aug 31, 2023

@TomChv probably the only thing that is a bit iffy is that it needs to commit the changes afterwards. If so I may avoid doing it there and see if I can do it in another place.

@gerhard
Copy link
Member

gerhard commented Aug 31, 2023

@kjuulh part of releasing the Engine & CLI, we also release the Go, Python, Node.js & Elixir SDKs.

We use the same version across all artefacts so that users don't get confused about version mismatches. We had multiple situations when the different versions created confusion for our users (e.g. Go SDK v0.7.4 & Python SDK v0.6.4 which both required Engine v0.6.4). We used the v0.8.0 release to match the Engine & CLI version with all SDKs. There is a single version now - v0.8.4 is the lastest stable available today - and everything that we release uses it.

I see two options:

  1. We release the Rust SDK same as all the above SDKs. This PR took a small step towards this (the RELEASING.md change). We have more work to do if we want that to happen.
  2. We let you release Rust SDK on your own schedule & don't make it part of our release cycle.

What would you prefer @kjuulh?

@kjuulh
Copy link
Contributor

kjuulh commented Aug 31, 2023

@gerhard i probably need to release it on my own then. As i may not always be available to fix issues that come up during the release process.

@TomChv
Copy link
Member Author

TomChv commented Aug 31, 2023

Alright, we can keep changie for the consistency but I'll remove Rust from RELEASING.md, do that sounds good to you?

TomChv added a commit to TomChv/dagger that referenced this pull request Aug 31, 2023
As discussed in dagger#5676, Rust will not be part of the SDK release process and will have its own pipeline.
By extension, we shall not mention rust in  `RELEASING.md` steps

Signed-off-by: Vasek - Tom C <tom@epitech.eu>
@kjuulh
Copy link
Contributor

kjuulh commented Aug 31, 2023

Yep lets do that

gerhard pushed a commit that referenced this pull request Aug 31, 2023
As discussed in #5676, Rust will not be part of the SDK release process and will have its own pipeline.
By extension, we shall not mention Rust SDK in  `RELEASING.md` steps

Signed-off-by: Vasek - Tom C <tom@epitech.eu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants