-
Notifications
You must be signed in to change notification settings - Fork 18
Github action to update FLS every 24 hours #191
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
Open
plaindocs
wants to merge
3
commits into
rustfoundation:main
Choose a base branch
from
plaindocs:update-fls-cron
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Update FLS | ||
on: | ||
schedule: | ||
- cron: "05 0 * * *" | ||
workflow_dispatch: | ||
jobs: | ||
update-fls: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: Install uv | ||
uses: astral-sh/setup-uv@v6 | ||
- name: Update FLS | ||
run: "./make.py --update-spec-lock-file" | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
commit-message: Update FLS (automated PR) | ||
title: Update FLS (automated PR) | ||
body: Update FLS (automated PR) | ||
base: main | ||
labels: automated-pr | ||
branch: update-fls | ||
delete-branch: true |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one thing that worries me is whether this would open a PR if there are affected guidelines: https://github.com/rustfoundation/safety-critical-rust-coding-guidelines?tab=readme-ov-file#if-you-need-to-audit-the-difference
I'm assuming that perhaps this is skipping the next step depending on the return value of the command? And that in turn handles this edge case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plaindocs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with @felix91gr --
It's important to first attempt a normal build using
./make.py
and if it fails due to FLS upstream being changed to determine:If there are no affected guidelines, I think it can proceed as you've written here with opening a PR for human review to update the spec lock file.
If there are affected guidelines, I think opening an issue highlighting which ones were affected would be amazing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh interesting, my thought was that we open the PR if there are changes, and let the human decides if the PR affects guidelines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll poke at this with a view to checking the normal build first, but not till next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@plaindocs I wonder if the script is capable of returning some kind of metadata that we can use from another program (like eg this automation) to know what the result was.
If not, perhaps that's a task to work on to as to enable easier automation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha. Here's my 2c:
We have linkage to the FLS which should be vetted when the coding guideline is merged, to help us understand if one is impacted. When we have tens or hundreds of guidelines I think we'd have to lean on this automatation more.
Hope what I wrote made sense.