Skip to content

[Minor][Engg]: Pipeline Improvements#2999

Open
josephpab wants to merge 13 commits into
devfrom
josephpab/pipelineImprovements
Open

[Minor][Engg]: Pipeline Improvements#2999
josephpab wants to merge 13 commits into
devfrom
josephpab/pipelineImprovements

Conversation

@josephpab
Copy link
Copy Markdown
Contributor

@josephpab josephpab commented May 22, 2026

PR Checklist (must be completed before review)

  • All tests pass locally
  • PR size is <= 500 LOC per PR Size Check policy
  • PR is independently mergeable (no hidden dependencies)
  • Appropriate reviewers are assigned
  • PR reviewed by code owner (required if Copilot-generated)
  • SME or Senior IC assigned where required

Proposed changes

Modernizes the MSAL CI/CD pipeline infrastructure for improved reliability, maintainability, and observability.

Key improvements:

Build tooling

  • Dynamic simulator targeting: UDID-based simulator destinations in build.py, spm-integration-test.sh, and tests-with-conf-file.yml to eliminate ambiguity when multiple iOS runtimes are installed
  • Xcode selection: Standardized xcode-select + symlink creation across all pipelines
  • Coverage improvements: Derive codecov architecture from built binary via lipo -archs instead of brittle ARCHS build setting
  • xcbeautify migration: Switch broker_submodule_check.yml from xcpretty to xcbeautify

CI observability

  • Inline test failure summaries: xcresulttool get test-results summary echoed directly to pipeline log — no more downloading artifacts to see what failed
  • Test result publishing: Convert .xcresult to JUnit XML via xcresulttool, then publish with PublishTestResults@2 so results appear in ADO Test tab
  • Build error handling: set -o pipefail + PIPESTATUS capture with last-200-lines log tail on failure

Cleanup & reliability

  • Removed: no-op "Check System Information" step in automation.yml
  • Fixed: retry_tests parameter type mismatch (boolean → string), vmImage casing (macos-15macOS-15)
  • Guarded: python3 availability in spm-integration-test.sh with graceful name-based fallback
  • Added: fallback warning in build.py when using name-based simulator destination

Type of change

  • Feature work
  • Bug fix
  • Documentation
  • Engineering change
  • Test
  • Logging/Telemetry

Risk

  • High
  • Medium – Errors could cause regression of 1 or more scenarios. (Example: somewhat complex bug fixes, small new features)
  • Small

Additional information

This PR only modifies CI pipeline YAML files, build.py, spm-integration-test.sh, and CHANGELOG.md. No runtime SDK code is changed.

josephpab and others added 2 commits May 21, 2026 16:14
…, xctestrun discovery, error handling

- Dynamically detect iOS simulator device and resolve UDID for unambiguous destinations
- Auto-discover .xctestrun files instead of hardcoding SDK-specific paths
- Add UDID-based simulator destinations across all CI pipelines
- Handle xcodebuild failures with log capture and surface last 200 lines on error
- Add Xcode symlink creation for consistent toolchain resolution
- Derive codecov architecture from build settings instead of hardcoding
- Switch broker_submodule_check to xcbeautify
- Improve spm-integration-test.sh with UDID-based sim targeting

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- spm-integration-test.sh: guard python3 availability before UDID
  resolution, fall back to name-based destination gracefully
- build.py: derive codecov architecture from built binary via lipo
  instead of relying on ARCHS build setting
- tests-with-conf-file.yml: add set -o pipefail alongside PIPESTATUS check

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@josephpab josephpab requested a review from a team as a code owner May 22, 2026 16:57
Copilot AI review requested due to automatic review settings May 22, 2026 16:57
@josephpab josephpab requested a review from a team as a code owner May 22, 2026 16:57
@josephpab josephpab requested review from mipetriu and swasti29 May 22, 2026 16:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates CI/build tooling to make pipeline runs more reliable by reducing simulator destination ambiguity, standardizing Xcode selection steps, and improving diagnostic output for build/test and coverage reporting.

Changes:

  • Add dynamic iOS simulator destination selection (prefer UDID) for SPM integration testing and Azure Pipelines test jobs.
  • Improve pipeline robustness with pipefail + log capture for xcodebuild build-for-testing, and adjust test-without-building invocation to rely on workspace/scheme + derived data.
  • Make code coverage reporting more resilient by determining the binary architecture via lipo.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
spm-integration-test.sh Adds UDID-based iOS Simulator destination selection for the NativeAuth sample app build.
build.py Dynamically selects an iPhone simulator destination and improves llvm-cov arch selection for code coverage.
azure_pipelines/visionos-validation.yml Updates Xcode selection steps and symlinks /Applications/Xcode.app for consistency.
azure_pipelines/templates/tests-with-conf-file.yml Adds simulator detection + sets SIM_DESTINATION, and improves build-for-testing log/error handling.
azure_pipelines/pr-validation.yml Updates Xcode selection steps and switches iOS destination to $(SIM_DESTINATION).
azure_pipelines/broker_submodule_check.yml Adjusts timeout and agent image name; removes xcpretty install steps; updates Xcode selection script style.
azure_pipelines/automation.yml Switches iOS test destinations to $(SIM_DESTINATION) via the shared template.

Comment thread spm-integration-test.sh Outdated
Comment thread azure_pipelines/templates/tests-with-conf-file.yml
Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Comment thread build.py
josephpab and others added 2 commits May 22, 2026 10:19
The system_profiler step only printed diagnostics and didn't gate anything.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
pr-validation.yml passed retry_tests as boolean (false) but the template
compares with eq(parameters.retry_tests, 'true'/'false'). Align to strings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 22, 2026 17:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.

Comment thread spm-integration-test.sh Outdated
Comment thread azure_pipelines/templates/tests-with-conf-file.yml
Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Comment thread azure_pipelines/visionos-validation.yml Outdated
Comment thread azure_pipelines/visionos-validation.yml Outdated
Comment thread azure_pipelines/pr-validation.yml Outdated
josephpab and others added 2 commits May 22, 2026 10:42
…allback warning

- Fix Python IndentationError in tests-with-conf-file.yml: remove leading
  whitespace from python3 -c snippets (YAML script block preserves indentation)
- Fix displayName 'Switch to use Xcode 26.3' → 'Select Xcode version' to match
  actual selected version (was leftover from version revert)
- Add warning when falling back to name-based simulator destination in build.py

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 22, 2026 17:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.

Comment thread spm-integration-test.sh Outdated
Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Comment thread azure_pipelines/templates/tests-with-conf-file.yml Outdated
Comment thread azure_pipelines/broker_submodule_check.yml Outdated
- Restore 8-space indentation for Python snippets in tests-with-conf-file.yml.
  YAML | block strips the common indent before delivering to shell, so the
  Python receives un-indented code. Removing the indent broke the YAML block.
- Fix vmImage casing in broker_submodule_check.yml: macos-15 → macOS-15
  to match the rest of the repo.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@josephpab
Copy link
Copy Markdown
Contributor Author

@copilot review PR

Copilot AI review requested due to automatic review settings May 22, 2026 18:56
@josephpab josephpab review requested due to automatic review settings May 22, 2026 18:56
Copilot AI review requested due to automatic review settings May 22, 2026 18:56
@josephpab josephpab review requested due to automatic review settings May 22, 2026 18:56
Copilot AI review requested due to automatic review settings May 22, 2026 18:57
@josephpab josephpab review requested due to automatic review settings May 22, 2026 18:57
Copilot AI review requested due to automatic review settings May 22, 2026 18:57
@josephpab josephpab review requested due to automatic review settings May 22, 2026 18:58
Copy link
Copy Markdown
Contributor

Copilot AI commented May 22, 2026

@copilot review PR

Reviewed and applied a fix for the simulator selection path: updated spm-integration-test.sh to use a stdin-based Python heredoc for UDID detection (no /tmp file, no indentation-prone python3 -c block). Commit: 590923b.

Convert xcresult to JUnit XML via xcresulttool, then publish with
PublishTestResults@2 so results appear in the ADO Test tab.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 22, 2026 19:47
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Comment thread azure_pipelines/templates/tests-with-conf-file.yml
Comment thread azure_pipelines/templates/tests-with-conf-file.yml
Echo xcresulttool summary to stdout so developers can see test failures
directly in the ADO log without downloading artifacts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

3 participants