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

Automatically publish mtags for Scala 3 RCs ? #269

Open
smarter opened this issue Apr 12, 2022 · 9 comments
Open

Automatically publish mtags for Scala 3 RCs ? #269

smarter opened this issue Apr 12, 2022 · 9 comments

Comments

@smarter
Copy link

smarter commented Apr 12, 2022

Is your feature request related to a problem? Please describe.

mtags is now automatically published for the last few Scala 3 nightlies which is useful for testing, but it looks like support for new Scala 3 RCs is still added manually. Having it done automatically would be really helpful for people who work on the Scala 3 compiler, because we always set the scalaVersion in our build to the latest RC in order to dogfood it.

Describe the solution you'd like

Extend the current mechanism that publishes mtags for the latest nightlies to also include RCs.

Describe alternatives you've considered

Change the release procedure of Scala 3 RCs to also include making a PR to metals adding the RC?

Additional contex

No response

Search terms

dotty

@tgodzik
Copy link
Contributor

tgodzik commented Apr 13, 2022

Thanks for reporting! @dos65 could the current action also detect new RC aside from nightlies? Maybe always release for the last RC?

@dos65
Copy link
Member

dos65 commented Apr 13, 2022

Good idea! It shouldn't be hard to do the same thing for non-nightly versions too.
Will try to look at that on the next week

@smarter
Copy link
Author

smarter commented Oct 10, 2022

I'm still interested in this feature and I'd be happy to help with the implementation if someone can point me to the relevant pieces of infrastructure that would need to be updated.

@dos65
Copy link
Member

dos65 commented Oct 10, 2022

@smarter
Sorry - I forgot about that.

There is a command in sbt that prepares a list of version for backpublish - https://github.com/scalameta/metals/blob/311d73ac50ea3b22fdd438df52c23747f4bae006/build.sbt#L152-L156

This is one is called from a scheduled workflow. Currently it's sheduled once a day.
The only issue here is that we need to run it much more often otherwise there will be anyway a problem that you switch a version in dotty and there is no mtags.

Also, there is also an alternative solution. RC has some release process that includes manual actions.
If we provide an access to scala3 team to github actions in Metals project then a person who conducts RC release will be able to run mtags release from Action-UI
Screenshot from 2022-10-10 15-32-03

@smarter
Copy link
Author

smarter commented Oct 10, 2022

If we provide an access to scala3 team to github actions in Metals project then a person who conducts RC release will be able to run mtags release from Action-UI

That's interesting, even better would be if the dotty release action could call the mtags release action, this seems like it could be possible if metals made a reusable workflow: https://docs.github.com/en/actions/using-workflows/reusing-workflows, wdyt?

@smarter
Copy link
Author

smarter commented Oct 10, 2022

Actually I realize that this probably wouldn't work since we need to wait for sonatype to publish the release, so maybe the once-a-day check is good enough?

@dos65
Copy link
Member

dos65 commented Oct 10, 2022

so maybe the once-a-day check is good enough

I don't know. Usually, after I see a notification from Scala-Contirbutors after RC release I call this action manually from UI.
In some cases I think right now we release mtags faster than it will be with once a day schedule.

That's interesting, even better would be if the dotty release action could call the mtags release action, this seems like it could be possible if metals made a reusable workflow: https://docs.github.com/en/actions/using-workflows/reusing-workflows, wdyt?

I just realized that maybe we can do an action in dotty.
There is release event.
Then once tag will be turned into release in dotty we can somehow trigger this action in Metals. I assume that it happens after it becomes available in maven-cental.

Would it fit for scala3-team workflow? Or do you switch scalaVersion in repo before publishing release?

@smarter
Copy link
Author

smarter commented Oct 10, 2022

Or do you switch scalaVersion in repo before publishing release?

I don't know exactly when the release event is triggered in our RC release process, I think @Kordyjan should be able to tell us more.

@Kordyjan
Copy link

Kordyjan commented Nov 7, 2022

Sorry for forgetting about that.
Right now the CI is preparing release notes in advance as drafts. I publish them manually once I'm sure that artifacts can be downloaded (which could be hours after finishing the "publish" step). So yeah, when the release event fires, we can be sure that the new version is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants