Skip to content

Conversation

@robertbrignull
Copy link
Contributor

@robertbrignull robertbrignull commented Jul 20, 2020

Uploads much more data in the status reports and makes the data much more specific to what was done in each action.

This follows the schema discussed previously. The only bit I don't implement in this PR is determining the performance of queries in each language and splitting default and custom queries. I could do but it would be another large change so I'm thinking it's best to split it up into a different PR to come later this week or next week.

This will fail until the github.com API endpoint has been updated to accept this kind of status report.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.

async function sendCompletedStatusReport(
startedAt: Date,
allLanguages: string[],
failingLanguage?: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be an array if there are multiple language failures? Or are we only able to record the first language failure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My reasoning is, if one language fails, why would you bother building more? I think we will always want to abort after the first one.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. I'm guessing that the autobuilding is happening serially. I had thought that it was in parallel, in which case we might have multiple failures.

And actually, looking at the source, it seems like the action only ever builds a single language, no matter how many languages are available.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you're right we currently only build one at a time. These status reports are trying to account for the plan that we will likely want to build multiple at some point. However they'll still be done in series because this is all happening on one machine, so I think we'll still only want to report one failure.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. That makes sense and so having a single failing language is the way to go.

@robertbrignull
Copy link
Contributor Author

Now the server side has been updated this is looking good and everything is passing as expected. I'm not sure who to assign to. Perhaps @sampart or @chrisgavin, or @marcogario if you're willing as you've done the other parts of this change.

Copy link
Contributor

@chrisgavin chrisgavin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 LGTM and worked on a test repository.

core.endGroup();

} catch (e) {
// For now the fields about query performance are not populated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we only populate these in the case of a failure or always? They seem like they might be useful even if everything succeeded.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan was to do them always. My hestitation in doing them in this was just that it'll require a few extra changes, so I wanted to do that in a second followup PR.

@robertbrignull robertbrignull merged commit 7426813 into main Jul 27, 2020
@robertbrignull robertbrignull deleted the status_reports_v2 branch July 27, 2020 14:58
@github-actions github-actions bot mentioned this pull request Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants