Skip to content

Try add orchestrationid into user-agent using token claim.#3945

Merged
TingluoHuang merged 1 commit into
mainfrom
users/tihuang/orchidua
Jul 16, 2025
Merged

Try add orchestrationid into user-agent using token claim.#3945
TingluoHuang merged 1 commit into
mainfrom
users/tihuang/orchidua

Conversation

@TingluoHuang

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 16, 2025 17:28
@TingluoHuang TingluoHuang requested a review from a team as a code owner July 16, 2025 17:28

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

This PR enhances the orchestration ID tracking by extracting it from JWT token claims and adding it to user-agent headers for better correlation and logging. The implementation provides fallback mechanisms and prevents duplicate entries.

Key changes:

  • Adds logic to extract orchestration ID from JWT claims with fallback to secondary claim type
  • Implements duplicate prevention when adding orchestration ID to user-agent headers
  • Centralizes orchestration ID extraction in HostContext for runner initialization

Reviewed Changes

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

File Description
src/Runner.Worker/JobRunner.cs Adds duplicate check before inserting orchestration ID into user-agent headers
src/Runner.Listener/JobDispatcher.cs Implements orchestration ID extraction from JWT claims with fallback logic
src/Runner.Common/HostContext.cs Adds JWT import and orchestration ID extraction logic during user-agent initialization

Comment thread src/Runner.Common/HostContext.cs
Comment thread src/Runner.Common/HostContext.cs
Comment thread src/Runner.Listener/JobDispatcher.cs
@TingluoHuang TingluoHuang merged commit 14856e6 into main Jul 16, 2025
10 checks passed
@TingluoHuang TingluoHuang deleted the users/tihuang/orchidua branch July 16, 2025 18:11
LouisHaftmann pushed a commit to falcondev-oss/github-actions-runner that referenced this pull request Aug 3, 2025
@seniwarna4-sys

Copy link
Copy Markdown
  • name: Checkout
    uses: actions/checkout@v5.0.0``

@khanbilal732 khanbilal732 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Done

@lopez19940503-tech lopez19940503-tech left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

users/tihuang/orchidua

@lopez19940503-tech

Copy link
Copy Markdown

gracias

using GitHub.DistributedTask.Logging;
using GitHub.Runner.Common.Util;
using GitHub.Runner.Sdk;
using GitHub.Services.WebApi.Jwt;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

18using

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.

10 participants