Skip to content
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

[Tooling] Add github_commit_status to all pipeline jobs #115

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Sep 10, 2024

The goal of this and related PRs is to have a reference implementation for paaHJt-78h-p2: pipeline status updates with explicit names, with Buildkite automatic status disabled.

This PR depends on https://github.com/Automattic/buildkite-ci/pull/516


  • I have considered if this change warrants release notes and have added them to the appropriate section in the CHANGELOG.md if necessary.

@iangmaia iangmaia self-assigned this Sep 10, 2024
@dangermattic
Copy link

dangermattic commented Sep 10, 2024

1 Warning
⚠️ Please add an entry in the CHANGELOG.md file to describe the changes made by this PR

Generated by 🚫 Danger

@iangmaia iangmaia marked this pull request as ready for review September 10, 2024 19:09
@iangmaia iangmaia requested a review from a team September 10, 2024 19:10

- label: ":swift: Standalone Swift Package - Explicit"
command: tests/install_swiftpm_dependencies/test_scripts/test_package_explicit.sh
notify:
- github_commit_status:
context: Standalone Swift Package - Explicit
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it would make sense to prefix the context of all of those with install_swiftpm_dependencies Tests: or [install_swiftpm_dependencies Tests], so that they make more sense when seen in as list of checks in a GitHub PR?

Suggested change
context: Standalone Swift Package - Explicit
context: install_swiftpm_dependencies Tests: Standalone Swift Package - Explicit
Suggested change
context: Standalone Swift Package - Explicit
context: [install_swiftpm_dependencies Tests] Standalone Swift Package - Explicit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's see how it looks: updated on 6d4444f

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks nicely grouped:
Screenshot 2024-09-10 at 21 25 47

Copy link
Contributor Author

@iangmaia iangmaia Sep 11, 2024

Choose a reason for hiding this comment

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

@AliSoftware @mokagio
I've deployed https://github.com/Automattic/buildkite-ci/pull/516, updated the required checks in this repo and ran CI again.

It looks good, but there's still a check for the entire pipeline, I believe, and that one uses a name based on the Buildkite slug it seems.

I guess this is represented in the setting publish_commit_status and shows up both in the commit history...
Screenshot 2024-09-11 at 12 19 24

...and in the PR checks.

Screenshot 2024-09-11 at 12 19 41

I think there's value in keeping this setting enabled, as it seems to represent the success / failure of the entire pipeline; perhaps, for this repo, that can be the only required check for this repo as opposed to individual checks.
Having the checks on the commits is also interesting (though often intermediate commits will have their builds cancelled if a newer commit is pushed, per our settings).

Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's value in keeping this setting enabled, as it seems to represent the success / failure of the entire pipeline; perhaps, for this repo, that can be the only required check for this repo as opposed to individual checks.

Sounds good to me in the context of this project. I guess that was the intention behind making it required when that setting was made (just a guess, I don't remember the early days of this repo).

Having the checks on the commits is also interesting (though often intermediate commits will have their builds cancelled if a newer commit is pushed, per our settings).

Unless I'm missing something, that is the default behavior in GitHub for every PR where you push commits after having opened the PR. Example:

image

I agree that it's interesting. The more info, the better. I've been in a handful of situations where having those checks in the GitHub UI was useful to quickly identify which commit broke the build.

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed on all counts 👍

Copy link
Contributor

@mokagio mokagio left a comment

Choose a reason for hiding this comment

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

I see @AliSoftware 's suggestion has been addressed and the result is neat.

:shipit:

@iangmaia iangmaia merged commit 07dfaa1 into trunk Sep 11, 2024
13 checks passed
@iangmaia iangmaia deleted the iangmaia/set-commit-status branch September 11, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants