Skip to content

Conversation

adrian-kong
Copy link
Contributor

@adrian-kong adrian-kong commented Nov 13, 2022

Dispatching the github workflow to sign, frontend, zip, release all in one.
This won';t show the logs, would need you to manually go inside https://github.com/swift-nav/toolbox-backend-ci repo to see

Think the stages could be decoupled more ** inside that repo ^^ i.e. splitting out into different callers and let toolbox decide whether it wants to release (?) but for simplicity was done all in one.

https://github.com/swift-nav/toolbox-backend-ci <-- requires bench, and those self hosted machines etc...

^^ needs a test run with those self hosted machines

@adrian-kong adrian-kong marked this pull request as ready for review November 18, 2022 03:12
@john-michaelburke
Copy link
Collaborator

Half-baked idea but could be really nice addition. In the toolbox CI workflow you can add an action that will comment on each PR that kicks off a job. They should also allow the ability to update the existing comment.

  • When a PR kicks off a workflow in swift-toolbox, post a comment like:
Frontend and Release Workflow Started...
You can access the workflow results here:
<url to toolbox backend CI workflow job>
  • Then when the workflow completes, update the message with the results and the same url.

I stumbled upon this github action which seems promising. You would need to pass the PR number along to point to it in the toolbox backend CI:
https://github.com/marketplace/actions/create-or-update-comment

To generate the workflow for a toolbox backend CI job, you might need to do some digging. It looks like it might just require the github.run_id so the url might be:

https://github.com/swift-nav/toolbox-backend-ci/actions/runs/${{ github.run_id }}

@john-michaelburke
Copy link
Collaborator

Another thing you might need to consider, although it may be a low priority, would be the auto-cancellation workflow. Feel free to address this at a later time but I could see possibly having an "always run" cleanup step in the swift-toolbox workflow that will always try to kill a job in the toolbox backend ci if a failure occurs. The difficult thing will be synchronizing the external workflow id to know what job to kill. I'm not sure what the best approach would be.

shell: bash
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
retry_wait_seconds: 300
command: gh run -R swift-nav/swift-toolbox download ${{ github.run_id }} -n Linux-artifacts
Copy link
Contributor Author

Choose a reason for hiding this comment

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

huh this is super annoying...

cant fetch the uploaded artifacts from other repo, but works when you re-run it...
might really have to move the entire build into the frontend bench / distribute as well

Copy link
Contributor Author

@adrian-kong adrian-kong left a comment

Choose a reason for hiding this comment

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

will just move build stage into frontend distribute.yml

@adrian-kong
Copy link
Contributor Author

@silverjam
Copy link
Contributor

@adrian-kong adrian-kong requested a review from a team November 24, 2022 00:52
@silverjam
Copy link
Contributor

@adrian-kong is there any way for the external CI to post a comment back to this PR with a link to the log?

@swiftnav-travis
Copy link

Frontend and Release Workflow Started here

@john-michaelburke
Copy link
Collaborator

I would definitely suggest creating a test release to see if that release process is working as well.

Feel free to do this in another PR, if you could have a final job run at the end of the workflow that replaces the comment and says the checks were successful or failed that would be super cool, possibly even a list of which ones passed or failed. Maybe add an emoji or two to quickly convey pass or fail at the beginning like ✅✅ or ❌❌

@adrian-kong
Copy link
Contributor Author

possibly even a list of which ones passed or failed.

that might be super cool, but maybe hard to identify which PR changes corresponds to which run 🤔,
in fact,
we don't actually need this PR comment as it can be retrieved via the run

The workflow logs can be found at https://github.com/swift-nav/toolbox-backend-ci/actions/runs/3537247797

just to know which run corresponded to which log.
do we still want this PR comment?

@swiftnav-travis
Copy link

Frontend and Release Workflow Started here

@adrian-kong
Copy link
Contributor Author

signing failure : no identity found
missing key?

@john-michaelburke
Copy link
Collaborator

Frontend and Release Workflow Started here

We should see if we can replace this comment using that api provided by that github action. If you have a million commits it will post a million comments.

@swiftnav-travis
Copy link

Frontend and Release Workflow Started here

Copy link
Contributor

@silverjam silverjam left a comment

Choose a reason for hiding this comment

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

:shipit:

@adrian-kong adrian-kong merged commit effcf90 into main Dec 2, 2022
@adrian-kong adrian-kong deleted the adrian/ci_2 branch December 2, 2022 10:10
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