Skip to content

Fix CI parallel mode detection for org members without team access#8182

Merged
yurishkuro merged 2 commits into
jaegertracing:mainfrom
yurishkuro:fix-ci-mode
Mar 15, 2026
Merged

Fix CI parallel mode detection for org members without team access#8182
yurishkuro merged 2 commits into
jaegertracing:mainfrom
yurishkuro:fix-ci-mode

Conversation

@yurishkuro
Copy link
Copy Markdown
Member

@yurishkuro yurishkuro commented Mar 15, 2026

Problem

The CI orchestrator determines whether to run stages in parallel (faster, ~10m) or sequentially (~30m) based on whether the PR author is a trusted contributor. For org members, it relied on github.event.pull_request.author_association from the event payload, expecting it to be MEMBER.

However, GitHub sets author_association based on the user's access to the repository, not org membership. Org members who don't belong to any team with repo access (e.g., external contributors added to the org specifically for CI benefits) get author_association: CONTRIBUTOR instead of MEMBER. This caused their PRs to run in slow sequential mode despite being org members.

Discovered on PR #8138 where user Manik2708 — a verified org member for months — was incorrectly classified as "not an org member" because they had no team assignments.

Fix

Replace the author_association check with a live GitHub API call (gh api orgs/jaegertracing/members/{user}) that directly verifies org membership regardless of team/repo access. If the API call fails (e.g., due to reduced token permissions on fork PRs), falls back to the original author_association check so behavior is no worse than before.

AI Usage in this PR (choose one)

See AI Usage Policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

Signed-off-by: Yuri Shkuro <github@ysh.us>
@yurishkuro yurishkuro requested a review from a team as a code owner March 15, 2026 20:16
@yurishkuro yurishkuro added the changelog:ci Change related to continuous integration / testing label Mar 15, 2026
Copilot AI review requested due to automatic review settings March 15, 2026 20:16
@yurishkuro yurishkuro changed the title Fix CI mode determination Fix CI parallel mode detection for org members without team access Mar 15, 2026
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

Adjusts the CI Orchestrator’s “parallel vs sequential” mode selection logic to better identify trusted PR authors, aiming to reduce CI latency for maintainers while keeping external contributions on the safer sequential path.

Changes:

  • Replaces author_association-only logic with a GitHub API org membership check (with fallback to author_association).
  • Refines PR-specific mode determination messaging and flow (keeps bot + label-based parallel enablement).

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

You can also share your feedback on Copilot code review. Take the survey.

Comment thread .github/workflows/ci-orchestrator.yml Outdated
Signed-off-by: Yuri Shkuro <github@ysh.us>
Comment thread .github/workflows/ci-orchestrator.yml
@yurishkuro yurishkuro merged commit e703503 into jaegertracing:main Mar 15, 2026
64 checks passed
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.70%. Comparing base (ef50c53) to head (8860f7c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8182      +/-   ##
==========================================
+ Coverage   95.67%   95.70%   +0.02%     
==========================================
  Files         317      317              
  Lines       16747    16747              
==========================================
+ Hits        16023    16027       +4     
+ Misses        571      568       -3     
+ Partials      153      152       -1     
Flag Coverage Δ
badger_v1 9.05% <ø> (ø)
badger_v2 1.04% <ø> (ø)
cassandra-4.x-v1-manual 13.25% <ø> (ø)
cassandra-4.x-v2-auto 1.03% <ø> (ø)
cassandra-4.x-v2-manual 1.03% <ø> (ø)
cassandra-5.x-v1-manual 13.25% <ø> (ø)
cassandra-5.x-v2-auto 1.03% <ø> (ø)
cassandra-5.x-v2-manual 1.03% <ø> (ø)
clickhouse 1.16% <ø> (ø)
elasticsearch-6.x-v1 16.60% <ø> (ø)
elasticsearch-7.x-v1 16.63% <ø> (ø)
elasticsearch-8.x-v1 16.78% <ø> (ø)
elasticsearch-8.x-v2 1.04% <ø> (ø)
elasticsearch-9.x-v2 1.04% <ø> (ø)
grpc_v1 7.79% <ø> (ø)
grpc_v2 1.04% <ø> (ø)
kafka-3.x-v2 1.04% <ø> (ø)
memory_v2 1.04% <ø> (ø)
opensearch-1.x-v1 16.67% <ø> (ø)
opensearch-2.x-v1 16.67% <ø> (ø)
opensearch-2.x-v2 1.04% <ø> (ø)
opensearch-3.x-v2 1.04% <ø> (ø)
query 1.04% <ø> (ø)
tailsampling-processor 0.52% <ø> (ø)
unittests 94.38% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:ci Change related to continuous integration / testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants