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 scala-steward workflow #2218

Merged
merged 1 commit into from
Jun 13, 2022
Merged

add scala-steward workflow #2218

merged 1 commit into from
Jun 13, 2022

Conversation

mkrzemien
Copy link
Contributor

@mkrzemien mkrzemien commented Jun 9, 2022

Closes #2183

  • scala-steward triggers on schedule
  • scala-steward creates proper PRs
  • mergify does NOT merge created PRs
    • The problem is that PRs created by scala-steward somehow don't trigger the CI workflow which is a required condition for mergify. (Unfortunately I was unable to figure out a solution for this problem in given time.)

@mkrzemien mkrzemien requested a review from adamw June 9, 2022 10:24
- name: Launch Scala Steward
uses: scala-steward-org/scala-steward-action@v2
with:
author-name: scala-steward
Copy link
Member

Choose a reason for hiding this comment

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

so this is ignored and we always end up with github-actions? Would be nice to somehow distinguish commits coming from scala-steward, though. I'm afraid there might be other instances of automatic commits coming from the github-actions author, which might end up inadvertendly being merged. But maybe since the mergify config explicitly mentiones the files, it's not a problem

Copy link
Contributor Author

@mkrzemien mkrzemien Jun 13, 2022

Choose a reason for hiding this comment

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

  • author-name/email: scala-stuard is used as a commit author
  • github-actions is used as a user, who opened a PR
  • it is possible to distinguish PRs created by scala-stuard from inside the CI workflow (using some specific conditions) only the trouble is that the PR workflow is not triggered at all (even with no conditions inside the workflow)
  • when I manually close and reopen the PR then the CI workflow is triggered successfully (in this case I'm represented as the PR reopener)

Copy link
Contributor Author

@mkrzemien mkrzemien Jun 13, 2022

Choose a reason for hiding this comment

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

My proposal for the followup:

  • merge the scala-steward action without supporting mergify (scala-steward generates PRs properly, they just need to be accepted by hand); maybe with lower frequency (e.g. once a week?)
  • open another issue to debug the problem with workflows not triggered (if solved then add mergify to scala-steward)
  • create another issue to simplify (remove duplications) from CI workflow definitions (it's possible to extract common actions like sbt setup/cleanup)

Copy link
Member

Choose a reason for hiding this comment

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

ah ... so we cannot change the user who is opening the PR?

maybe it's a matter of clicking "allow workflow to run" until the first PR from github-actions is merged?

Copy link
Member

Choose a reason for hiding this comment

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

I'm fine with merging this without mergify and fixing it in the next PR :)

Copy link
Member

Choose a reason for hiding this comment

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

but the frequency of once-per-day is fine :)

@mkrzemien mkrzemien requested a review from adamw June 13, 2022 08:05
{groupId = "org.scala-sbt"},
{groupId = "org.scala-lang", artifactId = "scala-compiler", version = "2.12."},
{groupId = "org.scala-lang", artifactId = "scala-compiler", version = "2.13."},
{groupId = "org.scala-lang", artifactId = "scala-compiler", version = "3."}
Copy link
Member

Choose a reason for hiding this comment

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

hm don't we want scala version upgrades?

Copy link
Contributor Author

@mkrzemien mkrzemien Jun 13, 2022

Choose a reason for hiding this comment

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

With this configuration each Scala "major" version (2.12, 2.13, 3) still gets upgraded within given "major" version (e.g.: 2.12.14 -> 2.12.15) but "major" versions are not changed.
Without this configuration "major" versions also get changed: 2.12.15 -> 2.13.8, 2.13.8 -> 3.1.2)

In result you get:

val scala2_12 = "2.13.8"
val scala2_13 = "2.13.8"

Copy link
Member

Choose a reason for hiding this comment

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

ah ok :) thanks

@mkrzemien mkrzemien requested a review from adamw June 13, 2022 09:30
@adamw adamw merged commit 00f5dd3 into master Jun 13, 2022
@mergify mergify bot deleted the 2183-add-scala-steward-action branch June 13, 2022 09:34
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

Successfully merging this pull request may close these issues.

Update scala-steward action
2 participants