Zulip Chat Archive
Stream: Equational
Topic: PRs Welcome : CI actions to manage the project
Shreyas Srinivas (Sep 28 2024 at 00:56):
Hi all, I just want to leave this task list for CI actions we need to automate the management of outstanding tasks:
- A CI action that takes a user comment "claim" on an issue and if it isn't assigned to anyone else, then assigns it to that user.
- A CI action that takes a user comment "disclaim" on an issue and removes the issue assignment to the user.
- A CI comment that takes a user comment that reads "propose PR #xyz", checks if that issue is assigned to the user, and if yes, then attaches that PR as the resolving PR for that issue.
- A CI comment that takes a user comment that reads "withdraw PR #xyz" to remove the PR from this position.
- A CI comment that takes a user comment "awaiting-review" and adds the label as well as changes the project status to the correct label. Similar actions forother project statuses (github provides an action template for this: https://github.com/github/update-project-action#inputs)
Shreyas Srinivas (Sep 28 2024 at 00:56):
PRs for adding these actions are welcome
Shreyas Srinivas (Sep 28 2024 at 00:59):
I'll review the PRs as soon as I can (mostly 10-15 hours from now)
Shreyas Srinivas (Sep 28 2024 at 01:04):
Combined with the existing workflow, we should have a functional task table. The expected workflow is roughly:
- @Terence Tao posts an issue for each task with the label
project-task
. - A user claims the task by commenting "claim" under it. If you wish to drop your claim, then please comment "disclaim" on the issue.
- If there is no other user assigned to the task, the user gets assigned to the issue.
- The user creates a PR and then comments "propose PR #xyz" under the issue. If it is already assigned to them, their PR is now linked to the issue. To withdraw your PR, please comment "withdraw PR #xyz".
- The user finishes the PR and comments "awaiting-review". This puts the PR in the
PR Review
list on the dashboard. - Maintainers review and merge it.
- The project dashboard gets updated in all teh above steps.
Shreyas Srinivas (Sep 28 2024 at 01:11):
An example dashboard : https://github.com/users/teorth/projects/1
Shreyas Srinivas (Sep 28 2024 at 01:12):
You can change the things you wish to see by clicking on the arrow with blue dot. See screenshot for example:
Screenshot from 2024-09-28 03-12-12.png
Shreyas Srinivas (Sep 28 2024 at 01:14):
Also, until the CI actions are up : the maintainers (me, @Pietro Monticone and @Joachim Breitner ) will do our best to manually move the PRs around. And now I am off to catch some sleep.
Pietro Monticone (Sep 28 2024 at 15:28):
Ok, I have just tested task 1 and it should work fine now.
Screenshot 2024-09-28 at 17.28.08.png
Pietro Monticone (Sep 28 2024 at 15:33):
Task 2 done https://github.com/teorth/equational_theories/issues/57
Shreyas Srinivas (Sep 28 2024 at 15:34):
Nice
Shreyas Srinivas (Sep 28 2024 at 15:34):
could we alter the project status in the same files?
Shreyas Srinivas (Sep 28 2024 at 15:35):
or do we need to add separate tasks for those?
Shreyas Srinivas (Sep 28 2024 at 15:37):
the moving of tasks to "Completed Tasks" status happens with the default workflow already
Pietro Monticone (Sep 28 2024 at 15:38):
Task 3 and 4 don't require CI since the GitHub browser GUI already allows to do that.
The user just have to go to the Development
section in the right column (under Assignees
) and click on Create a branch
that will be connected with this issue so that when the PR gets merged the related issue gets closed too.
Shreyas Srinivas (Sep 28 2024 at 15:39):
So far I have had to manually assign them
Shreyas Srinivas (Sep 28 2024 at 15:40):
I think the GUI only allows admins and moderators to link a PR to a task
Shreyas Srinivas (Sep 28 2024 at 15:42):
Ideally we only want an assigned user to link the PR.
Shreyas Srinivas (Sep 28 2024 at 15:42):
At scale this makes sure we don't have to mediate among competing claims
Pietro Monticone (Sep 28 2024 at 15:45):
Ok, can you expand a bit on task 3?
Shreyas Srinivas (Sep 28 2024 at 15:46):
We don't want a second user writing "claim" to overwrite a previous assigned user
Shreyas Srinivas (Sep 28 2024 at 15:47):
If person A is already assigned to an issue, then as long A remains the assignee, B can't claim the issue.
Pietro Monticone (Sep 28 2024 at 15:55):
Ok, I'll work on that
Shreyas Srinivas (Sep 28 2024 at 15:59):
Similarly in task 4, we want only an existing assignee to be able to propose and withdraw PRs. This avoids a lot of hassles with parallel PRs
Shreyas Srinivas (Sep 28 2024 at 17:03):
@Pietro Monticone : I am using an issue as the unit of work in the project. PR's get linked to issues. So the comments propose PR #xyz
and withdraw PR #xyz
need to be made on the issue, not the PR.
Pietro Monticone (Sep 28 2024 at 17:05):
I know. I am developing that propose-pr workflow.
Shreyas Srinivas (Sep 28 2024 at 17:06):
okay. I was confused by the comments being on the PR: https://github.com/teorth/equational_theories/pull/66
Pietro Monticone (Sep 28 2024 at 17:08):
No, wait. Then it's not clear what you want exactly...
Shreyas Srinivas (Sep 28 2024 at 17:08):
See this workflow message:
Shreyas Srinivas said:
Combined with the existing workflow, we should have a functional task table. The expected workflow is roughly:
- Terence Tao posts an issue for each task with the label
project-task
.- A user claims the task by commenting "claim" under it. If you wish to drop your claim, then please comment "disclaim" on the issue.
- If there is no other user assigned to the task, the user gets assigned to the issue.
- The user creates a PR and then comments "propose PR #xyz" under the issue. If it is already assigned to them, their PR is now linked to the issue. To withdraw your PR, please comment "withdraw PR #xyz".
- The user finishes the PR and comments "awaiting-review". This puts the PR in the
PR Review
list on the dashboard.- Maintainers review and merge it.
- The project dashboard gets updated in all teh above steps.
Pietro Monticone (Sep 28 2024 at 17:09):
I see. I'll work on it later.
Shreyas Srinivas (Sep 28 2024 at 17:09):
a more detailed version in Contributing.md : https://github.com/teorth/equational_theories/blob/main/CONTRIBUTING.md#the-contributions-process
Pietro Monticone (Sep 28 2024 at 17:36):
Task 3 is done.
Shreyas Srinivas (Sep 28 2024 at 17:39):
5 is actually multiple tasks bundled into one. It is about manipulating the task status in the project
Shreyas Srinivas (Sep 28 2024 at 17:39):
The most complete documentation of my design is i the contribution page link I posted above
Shreyas Srinivas (Sep 28 2024 at 17:40):
Currently the project workflow already adds issues with "project-task" labels to be added with the status "Unclaimed Outstanding Tasks"
Shreyas Srinivas (Sep 28 2024 at 17:40):
Further, when a project is in the "In Progress" state and a PR is merged, the issue is automatically moved to the "completed tasks" state
Shreyas Srinivas (Sep 28 2024 at 17:41):
what remains to be done are the following :
- When a user is assigned a task, the task is moved to the state "Claimed Tasks"
Shreyas Srinivas (Sep 28 2024 at 17:41):
- When a PR is linked to the task, the task moves to the "In Progress" state
Shreyas Srinivas (Sep 28 2024 at 17:42):
- When an "In Progress" task's linked PR is given the
awaiting-review
label, the issue is moved to the "PR Reviews" state
Shreyas Srinivas (Sep 28 2024 at 17:43):
The state names correspond to the column names in the project dashboard's task view
Pietro Monticone (Sep 28 2024 at 17:45):
Task 4 is done.
These workflow files aren't perfect, but decent enough I guess.
Shreyas Srinivas (Sep 28 2024 at 17:45):
One key check for all the actions of task 5 is to check that they are only triggered on issues which are part of the project "equational theories project"
Shreyas Srinivas (Sep 28 2024 at 17:46):
with task 5, we will essentially have automated the entire job of the "Outstanding tasks" threads and any manual interventions we need to do will be limited
Pietro Monticone (Sep 28 2024 at 17:49):
I will probably find a little bit of time tomorrow to attack task 5.
Shreyas Srinivas (Sep 28 2024 at 17:49):
okay. I will give it a shot later today, but this weird mixing of yaml and bash still trips me up, so it is likely to remain open
Pietro Monticone (Sep 28 2024 at 17:50):
I'm sorry for the inefficiency (you have already published the CONTRIBUTING file with those commands taken for granted but I haven't finished yet).
Pietro Monticone (Sep 28 2024 at 17:51):
But have many other things to do I can't pospone.
Shreyas Srinivas (Sep 28 2024 at 17:51):
Why apologise? There's no need for that
Shreyas Srinivas (Sep 28 2024 at 17:51):
Ideally I should be doing this all by myself
Pietro Monticone (Sep 28 2024 at 17:51):
Shreyas Srinivas said:
okay. I will give it a shot later today, but this weird mixing of yaml and bash still trips me up, so it is likely to remain open
Don't worry, I claim task 5.
Pietro Monticone (Sep 28 2024 at 21:36):
The task "claim
: assign issue and move task card from 'Unclaimed Outstanding Tasks' to 'Claimed Tasks'" is done.
Shreyas Srinivas (Sep 28 2024 at 21:37):
I bow to your CI mastery
Pietro Monticone (Sep 28 2024 at 21:37):
The task "disclaim
: unassign issue and move task card from 'Claimed Tasks' to 'Unclaimed Outstanding Tasks'" is done.
Pietro Monticone (Sep 28 2024 at 21:38):
Shreyas Srinivas said:
I bow to your CI mastery
Not a master at all as can be seen by the commit history (aka wall of shame).
Pietro Monticone (Sep 28 2024 at 21:39):
Now that we activated the PAT, the awaiting-CI
will work on PRs coming from forks too.
Shreyas Srinivas (Sep 28 2024 at 21:47):
Nice
Shreyas Srinivas (Sep 28 2024 at 21:47):
Unintended and pleasant consequences
Pietro Monticone (Sep 28 2024 at 22:17):
The task "propose PR #PR_NUMBER
: move task card from 'Claimed Tasks' to 'In Progress'" is done.
Shreyas Srinivas (Sep 28 2024 at 22:18):
I think with this we have already automated the current workflow. The awaiting-review task will come in handy if we are flooded with PRs
Shreyas Srinivas (Sep 28 2024 at 22:18):
But that doesn't seem to be the case yet
Pietro Monticone (Sep 28 2024 at 22:20):
The task "withdraw PR #PR_NUMBER
: move task card from 'In Progress' to 'Claimed Tasks'" is still missing.
Pietro Monticone (Sep 28 2024 at 22:21):
Should withdraw PR #PR_NUMBER
close the related PR too?
Shreyas Srinivas (Sep 28 2024 at 22:21):
I think we should let the author decide that
Shreyas Srinivas (Sep 28 2024 at 22:21):
It just shouldn't appear on our task view
Shreyas Srinivas (Sep 28 2024 at 22:21):
And that means getting delinked from the issue
Pietro Monticone (Sep 28 2024 at 22:22):
Ok
Shreyas Srinivas (Sep 28 2024 at 22:22):
Amazing job btw. I expected that it would take much longer to have this whole thing automated out
Shreyas Srinivas (Sep 28 2024 at 22:23):
You've done all this in one day
Shreyas Srinivas (Sep 28 2024 at 22:23):
Brilliant
Pietro Monticone (Sep 28 2024 at 22:31):
The task "withdraw PR #PR_NUMBER
: move task card from 'In Progress' to 'Claimed Tasks'" is done.
Pietro Monticone (Sep 28 2024 at 22:32):
There is still a lot to optimise and polish, but it seems to work decently now.
Shreyas Srinivas (Sep 28 2024 at 22:33):
That automates everything we need for now
Shreyas Srinivas (Sep 28 2024 at 23:46):
I think in a couple of weeks we should write an addendum on managing large scale lean projects with blueprint. I see a clear structure for documenting this and collecting the GitHub action scripts we used. Maybe they could become part of the blueprint template
Shreyas Srinivas (Sep 28 2024 at 23:47):
Or maybe a fork called blueprint-template++ for large scale collabs
Shreyas Srinivas (Sep 28 2024 at 23:51):
@Terence Tao : this could be a sequel to your blogpost from last year
Terence Tao (Sep 28 2024 at 23:54):
Certainly I'm going to try to document my "user experience" as much as possible, for instance in the thoughts and impressions thread. I recently got contacted by the editors of a proof formalization journal on whether I wanted to contribute a paper reporting on PFR but I felt that as it had been almost a year since the main activity of that project, it was too late to try to scramble to document everything (although we did at least have a retrospective thread that had some information, and also the tour blog post you mentioned). For this project I definitely foresee a paper coming out of it, which is why I am trying to be proactive in recording thoughts before they fade away. I hope you also continue contributing your own impressions to that thread!
Terence Tao (Sep 29 2024 at 00:03):
I think it is also good that we are working on improving CONTRIBUTING.md continuously as we progress. I'm trying to make a point of mentioning even small speedbumps. An example: I started a list of scripts on README.md and just added a note to CONTRIBUTING.md to encourage contributors of code to also update README.md with their pull request so that their new tool gets some visibility. Similarly for contributors of generated files (who can also contribute a blueprint chapter outlining their methodology).
Pietro Monticone (Sep 29 2024 at 15:12):
Shreyas Srinivas said:
I think with this we have already automated the current workflow. The awaiting-review task will come in handy if we are flooded with PRs
Is the awaiting-review
automated labelling working as wanted or some more work is needed?
Shreyas Srinivas (Sep 29 2024 at 15:13):
I would label it as optional for now, because there aren't too many PRs. I guess this can change when more self contained and smaller tasks are posted a la PFR
Shreyas Srinivas (Sep 29 2024 at 15:14):
OTOH, for large collaborations we want to separate "in progress" PRs from PRs awaiting review having passed CI
Shreyas Srinivas (Sep 29 2024 at 15:14):
This is to give maintainers a queue of PRs to review and merge
Shreyas Srinivas (Sep 29 2024 at 16:20):
@Pietro Monticone : sorry, I didn't realise that you mean you already added it
Shreyas Srinivas (Sep 29 2024 at 16:23):
For the moment I think the number of PRs has been small enough that they are getting reviewed rather quickly, but @Joachim Breitner : maybe we could trial this with your PR?
Pietro Monticone (Sep 29 2024 at 16:25):
Shreyas Srinivas said:
Pietro Monticone : sorry, I didn't realise that you mean you already added it
No I didn't add it. It's seems there is another workflow file I have never touched.
Shreyas Srinivas (Sep 29 2024 at 16:26):
I added that one. It only creates the label awaiting-review
on the PR. It doesn't move the issue to the PR review status
Pietro Monticone (Sep 29 2024 at 16:27):
Ok, I will work on it later today or tomorrow
Shreyas Srinivas (Sep 29 2024 at 16:28):
It's not urgent
Pietro Monticone (Sep 29 2024 at 16:29):
Next week, then.
Pietro Monticone (Sep 29 2024 at 22:02):
I temporarily disabled this action to avoid interferences with the awaiting-review.yml
I am working on.
Shreyas Srinivas (Sep 29 2024 at 22:03):
okay. thanks for the heads up
Shreyas Srinivas (Sep 29 2024 at 22:21):
so for the awaiting reviews task, we must check that the CI actually builds and that the awaiting-review label has been added.
Pietro Monticone (Sep 29 2024 at 22:25):
The task "awaiting-review
: add label and move task card from 'In Progress' to 'PRs in Review'" is done.
Shreyas Srinivas (Sep 29 2024 at 22:26):
:bow: :bow: :bow:
Pietro Monticone (Sep 29 2024 at 22:27):
This pair {issue, PR} showcases the entire workflow we have at the moment.
Again, not at all perfect, but decent enough. Now the development is faster because it's basically copy-pasting-tweaking previous project-interacting workflows.
Shreyas Srinivas (Sep 29 2024 at 22:30):
Thanks a lot for putting your time into this. When I started the project I assumed that I would be adding one automation per day in my spare time between other work. We should document this setup.
Pietro Monticone (Sep 29 2024 at 22:31):
In the next days I will optimise, polish and document those scripts of course.
Shreyas Srinivas (Sep 29 2024 at 22:36):
I envision a markdown document structured as follows:
- An brief introduction of the process we are replicating and the reasons for doing this..
- An automation types section: Here we need two subsections. In the first I can explain github's default workflows iand in the second, you could give a brief explanation of how github actions works and how to write one's own actions.
- An expanded version of the contribution process I have put into CONTRIBUTION.md. Here we additionally explain how the automation is used in each step. We also provided a flow chart view of the whole thing. Here you could describe the scripts you wrote as well.
- A comparison and reflection section: This should ideally be written by @Terence Tao who compares this process with the PFR and relates his experiences in terms of workload and process.
Programmers already know all this. But in the math formalisation world, the best practices are still evolving and providing some detailed "steps" can be helpful.
Shreyas Srinivas (Sep 29 2024 at 22:38):
We would also benefit from a scripts section that just collects the action scripts in one place.
Last updated: May 02 2025 at 03:31 UTC