Manual triggered Robot diff for release
Currently the automated diff uses cl-edit to built files - while this is correct, it would be useful to have one that can be manually triggered for releases that compares the cl.owl file in the release with the cl.owl file in master (change cl to ONT of course) see https://github.com/obophenotype/cell-ontology/pull/1449#issuecomment-1041362003 I'll set this for next milestone
Unless I misunderstood what you want, I believe that you already have what you need in PR #547 ?
There’s already a workflow_dispatch trigger in the diff.yml Action, so you can manually trigger the action on any arbitrarily chosen branch or tag. So as long as each release has its own tag, you can trigger a diff between the ${ONT}.owl file in the master branch and the ${ONT}.owl file in the release tag.
yeah we basically have everything there is already. I just don't want me getting to this to hold up the next release. I don't think it would be release tag - would still be PR vs master, just not built from the edit file, so basically the edit pipeline of the actions but pointing to the -full file
Ok won't be able to get to this in time, but basically I tried just letting it manually trigger, and issue is that the comment doesn't know where to comment on cause it isn't on a PR, I'm sure the solution is super simple and im just overlooking something small, will get back to this later, but don't let this hold up the upcoming release :)
But for regular pull requests, this works, yea?
yeah normal PRs work 100% fine now :)
@shawntanzk when you have time after you are back from leave, can you outline what needs doing here?
ping @shawntanzk
sorry about that, totally slipped my radar. I'm not 100% sure how to handle this but what we want is a diff that compared cl.owl in the release branch compared to master branch. I initially thought a manual trigger would work, however, with manual triggers, it doesn't seem to be able to post on the PR as it doesn't get a github token or something - basically it cant post the comment. So we could:
- figure how to fix it so that it can post a comment with manual trigger, or
- set it so that when actions sees that its a release, it triggers the workflow
Possibly stupid idea:
What if we could control the triggering of the diff action with some custom keywords in the first comment of a PR?
That is:
- we set up the action to always be automatically triggered on a PR;
- first thing in the workflow, we look for some keywords in the first comment of the PR (not sure yet how to do that, but I think it must be possible);
- if we don’t detect any keyword, end the workflow immediately without doing anything;
- if we detect a
#DiffWantedkeyword, then the workflow performs the diff stuff.
This way, we can control when the workflow is run (it would run only on PRs with the appropriate keyword instead of all the PRs), while avoiding the problem of manual triggers (the fact that the comment step does not know where to post).
I actually really like that idea if its possible. I think that way we can have multiple types of diff (eg release diff, edit diff, reasoned diff, etc.) that we can just add # to trigger as we see fit :)
I actually really like that idea if its possible.
A quick search suggests it is indeed possible to look for keywords in the PR’s text: https://github.com/JJ/github-pr-contains-action
I think that way we can have multiple types of diff (eg release diff, edit diff, reasoned diff, etc.) that we can just add # to trigger as we see fit :)
Exactly. :)
Yay! finally got this done!
Proof of concept here: https://github.com/obophenotype/cell-ontology/pull/1730
Behaviour: If keyword found -> run robot diff on cl.owl If keyword not found -> skip steps (no failure so ppl won't freak out)
What I need now:
- what keyword for release diff (the more ridiculous the happier I will be :p )
- should we do this on cl.owl or cl-base.owl?
My 2 cents:
what keyword for release diff (the more ridiculous the happier I will be :p )
You’re the one doing the coding, so in my book you’re the one who gets to choose. :D Feel free to go for #MasterShawnShowMeADiffPlease …
On a more serious note, as we discussed yesterday this kind of “on-demand actions” is likely to become more and more frequent, so whatever keyword you choose for now, at some point in the future we might need to coordinate among OBO projects to have some consistency.
You’re the one doing the coding, so in my book you’re the one who gets to choose.
#gogoreleasediff it is then, it at least amuses me that its like inspector gadget/Rick and Morty parody on inspector gadget.
At least sensible enough to OBO projects it with #gogo____
(If anyone asks, I will deny having encouraged you to choose a silly keyword. :ninja: )
Added some other requirements in the issue description (based on our tech call yesterday)
After a year, we're doing everything differently.
This workflow will post a comment with a link to the release diff file in the PR so reviewers can use it. We know when this happens because only during release time we generate the release_diff.md. This needs to be used in conjunction with release_diff: true in the config odk.yml
Example in CL https://github.com/obophenotype/cell-ontology/pull/2258#issuecomment-1877123312