Introduce monkey-patch to auto-insert collapsible sections in Buildkite logs#638
Merged
AliSoftware merged 3 commits intotrunkfrom Mar 12, 2025
Merged
Introduce monkey-patch to auto-insert collapsible sections in Buildkite logs#638AliSoftware merged 3 commits intotrunkfrom
AliSoftware merged 3 commits intotrunkfrom
Conversation
AliSoftware
added a commit
to wordpress-mobile/WordPress-iOS
that referenced
this pull request
Mar 11, 2025
7188da6 to
b850a4e
Compare
twstokes
approved these changes
Mar 12, 2025
…te logs Prints a ~~~ collapsible group for every action called in your Fastfile
Co-authored-by: Tanner Stokes <tanner@tannr.com>
a657efb to
5e7c2d1
Compare
AliSoftware
added a commit
to wordpress-mobile/WordPress-iOS
that referenced
this pull request
Apr 4, 2025
Now that we've migrated to `release-toolkit` version `13.1`, which includes wordpress-mobile/release-toolkit#638 that already handles inserting Buildkite-aware collapsible groups in CI logs, the custom logic that was added in WPiOS Fastfile only is no longer needed, and in fact duplicated the logs in CI
github-merge-queue Bot
pushed a commit
to wordpress-mobile/WordPress-iOS
that referenced
this pull request
Apr 6, 2025
Now that we've migrated to `release-toolkit` version `13.1`, which includes wordpress-mobile/release-toolkit#638 that already handles inserting Buildkite-aware collapsible groups in CI logs, the custom logic that was added in WPiOS Fastfile only is no longer needed, and in fact duplicated the logs in CI
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR introduces a monkey-patch of the
Fastlane::Runner#execute_actionmethod to print a~~~ :fastlane: [lane :#{lane_name}] #{action}collapsible group log output for every action called in yourFastfile.Note
This idea was inspired by https://github.com/wordpress-mobile/WordPress-iOS/blob/trunk/fastlane/Fastfile#L156-L179
This will make the Buildkite logs for jobs running fastlane lanes better organized and easier to navigate, as each action will now have its own collapsible section.
Testing
I have created some dummy branches in
Tumblr-iOSandWordPress-iOS, making theirGemfilepoint to this PR's branch of therelease-toolkitthen triggering a Buildkite buildTumblr iOS
Buildkite build: https://buildkite.com/automattic/tumblr-ios/builds/32406
WordPress iOS
Buildkite build: https://buildkite.com/automattic/wordpress-ios/builds/26131
Compare Buildkite output from before that monkey-patch—but with the ad-hoc patch that has been in WPiOS's Fastfile since a while—with new Buildkite output from the monkey-patch (and with ad-hoc patch in WPiOS's Fastfile removed
What's Next
Once this PR lands, we should remove the ad-hoc patch code that was implemented in WPiOS's
Fastfile, to use this patch fromrelease-toolkitinstead, to avoid WPiOS having double logging of the collapsible group sections in Buildkite.