Skip to content

Conversation

Copy link

Copilot AI commented Dec 3, 2025

Fix

Refactored CI build metrics collection to be more flexible and self-contained:

  • Parameterized paths: track-apple-metrics.sh now accepts xcresult and DerivedData paths as mandatory inputs (script fails if not provided)
  • Self-managed artifact uploads: Script uses buildkite-agent artifact upload directly instead of relying on artifact_paths enumeration in pipeline.yml
  • Immediate uploads: Each file is uploaded immediately after generation, ensuring artifacts are tracked even if subsequent steps fail
# Before: hardcoded paths
xcrun xcresulttool get build-results --path build/results/Simplenote.xcresult ...
xclogparser dump --derived_data ./DerivedData ...

# After: required path arguments (fails if not provided)
XCRESULT_PATH="${1:?Error: xcresult path required as first argument}"
DERIVED_DATA_PATH="${2:?Error: DerivedData path required as second argument}"
xcrun xcresulttool get build-results --path "$XCRESULT_PATH" ...
xclogparser dump --derived_data "$DERIVED_DATA_PATH" ...

Test

  1. Push to trigger CI
  2. Verify build/xcresulttool/*.json and build/xclogparser-reports/*.json appear in Buildkite artifacts
  3. Verify xclogparser and xcresulttool commands complete successfully in logs
  4. Verify script fails with clear error if paths are not provided

Review

Standard CI change review. One developer sufficient.

Release

These changes do not require release notes.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Make CI upload xcactivitylog Make CI upload xcactivitylog and improve metrics script flexibility Dec 3, 2025
Copilot AI requested a review from mokagio December 3, 2025 03:38
Copilot finished work on behalf of mokagio December 3, 2025 03:38
@mokagio
Copy link
Contributor

mokagio commented Dec 3, 2025

@copilot do not use a default if paths not found. Fail the script instead.

Also, upload files as soon as generated, not at the end, so if something fails along the way, the files that had been generated before will be tracked anyway.

Copy link
Author

Copilot AI commented Dec 3, 2025

@copilot do not use a default if paths not found. Fail the script instead.

Also, upload files as soon as generated, not at the end, so if something fails along the way, the files that had been genera...

Done in 7990804. Changed to use ${1:?Error: ...} syntax to require paths and fail if not provided. Each file is now uploaded immediately after generation using individual buildkite-agent artifact upload calls.

Copilot finished work on behalf of mokagio December 3, 2025 04:09
@mokagio mokagio marked this pull request as ready for review December 3, 2025 06:14
@mokagio mokagio merged commit 5d7bbf2 into apps-infra-meetup Dec 3, 2025
3 of 5 checks passed
@mokagio mokagio deleted the copilot/sub-pr-1721 branch December 3, 2025 06:15
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.

2 participants