Skip to content

fix: remove checkout:self and fix paths for OneBranch checkout convention - #59

Merged
msftsiwei merged 1 commit into
mainfrom
fix/onebranch-path-and-no-checkout-self
Apr 20, 2026
Merged

fix: remove checkout:self and fix paths for OneBranch checkout convention#59
msftsiwei merged 1 commit into
mainfrom
fix/onebranch-path-and-no-checkout-self

Conversation

@msftsiwei

Copy link
Copy Markdown
Member

Problem

Two issues were causing the sign-and-release pipeline to fail:

  1. checkout: self deletes the OneBranch .pid file, causing the signing step to fail (documented in OneBranch Signing FileWatcher FAQ)

  2. All paths used $(Build.SourcesDirectory)\tgrep but OneBranch auto-checkout puts source in $(Build.SourcesDirectory)\s (confirmed from build log: task name is "Checkout microsoft/tgrep@main to s")

Fix

  • Remove both checkout: self blocks (OneBranch handles checkout automatically)
  • Update all path references from \tgrep to \s
  • Update configFile: 'tgrep/.cargo/config.toml' to 's/.cargo/config.toml'

Two fixes:
1. Remove checkout: self (causes .pid file deletion, breaking signing)
2. Update all $(Build.SourcesDirectory)\tgrep paths to \s
   (OneBranch auto-checkout puts source in \s subdirectory)
Copilot AI review requested due to automatic review settings April 20, 2026 09:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the OneBranch sign-and-release Azure DevOps workflow to match OneBranch’s auto-checkout behavior and avoid breaking the signing FileWatcher, so the Windows build/sign/package steps can run successfully.

Changes:

  • Removed explicit checkout: self usage (relying on OneBranch auto-checkout).
  • Updated workflow paths from $(Build.SourcesDirectory)\tgrep to $(Build.SourcesDirectory)\s.
  • Updated CargoAuthenticate configFile to point at s/.cargo/config.toml.
Show a summary per file
File Description
.github/workflows/sign-and-release.yml Removes explicit checkout and rewires build/sign/package paths to the OneBranch s checkout location, including CargoAuthenticate config path.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@msftsiwei
msftsiwei enabled auto-merge April 20, 2026 09:19
@msftsiwei
msftsiwei merged commit 152a04a into main Apr 20, 2026
13 of 14 checks passed
@msftsiwei
msftsiwei deleted the fix/onebranch-path-and-no-checkout-self branch April 20, 2026 17:53
msftsiwei added a commit that referenced this pull request Apr 20, 2026
…y the source root

PR #59 incorrectly added \s suffix to $(Build.SourcesDirectory), causing
double-path like C:\__w\1\s\s\.cargo. The variable already points to
the source root directly (C:\__w\1\s), so no subdirectory suffix needed.
msftsiwei added a commit that referenced this pull request Apr 20, 2026
The arm64 cross-compile job only builds aarch64-pc-windows-msvc target,
so it does not need [target.x86_64-pc-windows-msvc] rustflags in its
cargo config. Having x86_64 rustflags (including /CETCOMPAT) in the
arm64 job's config causes CargoAuthenticate@0 to propagate them to
CARGO_HOME/config.toml, which then gets merged with the arm64 config
during compilation, resulting in:
  LNK1246: '/CETCOMPAT' not compatible with 'ARM64' target machine

Note: PR #59's \s path fixes were correct and are preserved here.
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