-
Notifications
You must be signed in to change notification settings - Fork 1
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
Upload a link to the GitHub job #20
Conversation
53490e8
to
db6efa8
Compare
Add new github_job_html_url and github_job_api_url parameters to the upload endpoint, and save them on the upload. Add a link to the github_job_html_url on the upload details page. See ably/test-observability-action#20 for an example of specifying these new parameters.
Add new github_job_html_url and github_job_api_url parameters to the create upload endpoint, and save them on the upload. Add a link to the github_job_html_url on the upload details page. See ably/test-observability-action#20 for an example of specifying these new parameters.
@owenpearson or @VeskeR — I'll also need one of you to update the required checks in this repo’s settings (I don't have the permissions, I'm guessing maybe you do?) |
db6efa8
to
d4d651c
Compare
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.
LGTM! Happy to merge after minor comments are resolved.
I don't have access to set the required checks either. Will probably need @owenpearson for that.
76d178d
to
87a4910
Compare
OK, I need to rethink this approach. Turns out that the order in which the jobs are listed in the action YAML file don't necessarily match that in which they are returned from the API — see e.g. https://github.com/ably/test-observability-action/actions/runs/7476602315/job/20347351917?pr=20. |
Wow, that's unexpected. Yeah, the API request for the workflow mentioned has I couldn't find any other way to get a unique identifier for a job either. It seems that the next best thing is to find the correct job in the API response by its name. There is a @lawrence-forooghian WDYT? |
c246daf
to
3a486ca
Compare
@VeskeR I've implemented your suggestion of using the job’s |
Currently, the observability server UI links to the workflow run attempt that the upload corresponds to. This is fine in the case where the workflow only contains a single job, as it did in ably-cocoa. But in the case where there’s more than one job in a workflow (e.g. in the case of a matrix build), there’s no way to tell which job an upload corresponds to. So, include this information in the upload. I originally tried implementing this by passing a job-index input, whose value was the index to which the current job corresponds in the response from the "list jobs for a workflow run attempt" GitHub API. However, some experimentation then showed that that the order in which the jobs are listed in the action YAML file doesn’t necessarily match that in which they are returned from the API, so there was no way to calculate the value to pass for job-index. Hence, switched to using the job’s `name` instead. Resolves #18.
3a486ca
to
518bc5e
Compare
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.
LGTM
Currently, the observability server UI links to the workflow run attempt that the upload corresponds to. This is fine in the case where the workflow only contains a single job, as it did in ably-cocoa. But in the case where there’s more than one job in a workflow (e.g. in the case of a matrix build), there’s no way to tell which job an upload corresponds to. So, include this information in the upload.
ably/test-observability#76 adds the observability server functionality for handling these new parameters in the upload.
Resolves #18.