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

feat: prototype update action #5

Merged
merged 2 commits into from
Feb 27, 2024
Merged

feat: prototype update action #5

merged 2 commits into from
Feb 27, 2024

Conversation

oliver-butterley
Copy link
Collaborator

There didn't appear to be any actions available for doing this task.

This workflow will periodically run lean update and try lean build if there is an available update.

There are three possible outcomes:

  • No update available (silent)
  • Update available and build succeeds (open PR)
  • Update available and build fails (open issue)

I've tested it quite a bit and seems to do as required. Are you will for us to try it for a while?

I would like to improve some of the details once I clearly understand what is most comfortable and then package it as an easy to use action for others.

@mseri mseri merged commit bef99f5 into mseri:main Feb 27, 2024
1 check passed
Run `lake update` and then investigate why this update causes the lean build to fail.
Files changed in update: ${{ steps.check-update.outputs.changed_files }}

# To do: Update action so that it will not create another issue until this present issue is closed.
Copy link
Owner

Choose a reason for hiding this comment

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

If tracking issues is tricky, this is a good compromise since we can easily close the old one by hand

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A previous version had a bit of code which detected if there was still an issue produced from a prior run and then avoid creating a new issue. However it didn't work as expected and I failed to find my error. I'm sure it was just something stupid with the syntax. Another day I'll be able to find a way.

However I'm uncertain exactly what behaviour is preferred when it detects that an update is available but needs manual intervention. Options are:

  • Open new issue only if there is no open issue from a prior run
  • Close the prior issue and open a new issue
  • Do nothing with issues and send a message to the maintainers
  • Fail the workflow so notify the maintainers that there is something to do

We'll see what is best as we progress. I return to focus on completing the stuff in topology. It's been going well and soon should be done. Sebastien suggested to me to PR the alternate version of Cantor's theorem which we use into mathlib so that's also in progress.

Talk to you on Thursday!

Copy link
Owner

Choose a reason for hiding this comment

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

I think "Fail the workflow so notify the maintainers that there is something to do" is already enough, at least I would see it in my github notifications anyway.

"Open new issue only if there is no open issue from a prior run" is a stronger signal than just a job failure, since in this case I would also get an email. I don't mind if it does not close the job though

@oliver-butterley
Copy link
Collaborator Author

I just noticed that the action failed.

In the repo's Settings -> Actions -> General there is an option to allow actions to open pull requests. This needs to be activated for the new action to work properly.

@mseri
Copy link
Owner

mseri commented Feb 28, 2024

Done!

@oliver-butterley
Copy link
Collaborator Author

Done!

Now our action can do some work for us!

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.

2 participants