-
Notifications
You must be signed in to change notification settings - Fork 5
feat: User Notes on Runs #1703
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
base: 01-26-feat_user_notes_on_pipelines
Are you sure you want to change the base?
feat: User Notes on Runs #1703
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f3dc9c4 to
48ace2d
Compare
242fda8 to
25910f5
Compare
2693c74 to
9eac2b7
Compare
| const notify = useToastNotification(); | ||
| const navigate = useNavigate(); | ||
|
|
||
| const runNotes = useRef<string>(""); |
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.
Using ref here smells - why do we need it?
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.
Ok, moving annotations to "submitPipeline" as an initial payload will solve this problem automatically
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.
Due to the chaining of queries a useState was not updating correctly and thus passing stale values.
You are correct that using submitPipelineRun to save the annotation alongside the run in one go will fix this, however, submitting annotations via that API does not work as expected.
maxy-shpfy
left a comment
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 wish the API /api/pipeline_runs/?include_pipeline_names=true&include_execution_stats=true return some annotations as well so we can display notes in the list. - I believe that could be valuable in some cases.
| const { mutate: saveNotes } = useMutation({ | ||
| mutationFn: (runId: string) => | ||
| updateRunNotes(runId, backendUrl, runNotes.current), | ||
| }); | ||
|
|
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 would change that to send annotations immediately on Run creation, and not AFTER it was created - it will simplify the logic significantly. See https://github.com/TangleML/tangle-ui/blob/master/src/utils/submitPipeline.ts#L63-L65
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.
it will simplify the logic significantly
It does and I initially tried this. But unless I'm using or understanding the API incorrectly it does not work. Annotations set via submitPipelineRun do not appear when calling GET /api/pipeline_runs/{id}/annotations/ suggesting that the two sets of annotations are stored differently
maxy-shpfy
left a comment
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 believe you should send annotations immediately on the Run creation, and not AFTER it was created - it will simplify the logic significantly. See https://github.com/TangleML/tangle-ui/blob/master/src/utils/submitPipeline.ts#L63-L65
9eac2b7 to
9de647c
Compare
0384a19 to
5606e42
Compare
9de647c to
c4ee73e
Compare
|
^ I tried this. Unfortunately it seems that sending annotations alongside the However, I could have missed something or misunderstand the API, so we can pair on this to dive deeper. |
c4ee73e to
4aa5346
Compare
4aa5346 to
af329da
Compare
5606e42 to
5b52fc6
Compare

Description
Adds a free text field to pipeline runs context panel so users can note down any thoughts or comments.
If the viewing user is not the creator of the run they will not be able to edit the notes.
Also adds an input field to the "Submit Run with Task Arguments" dialog, so that users can enter notes at the time they submit the run.
pipeline-and-run-notes-demo.mov (uploaded via Graphite)
Related Issue and Pull requests
Closes https://github.com/Shopify/oasis-frontend/issues/157
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
Additional Comments