-
-
Notifications
You must be signed in to change notification settings - Fork 37
[DNM] [TEST] fix(config-cache): Defer CLI path resolution to execution phase #1224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
runningcode
wants to merge
17
commits into
main
Choose a base branch
from
no/fix-config-cache-cli-path
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
40fffae
ci(benchmark): Add help task configuration benchmark on PRs
runningcode 30ae4ba
fix(benchmark): Compute help benchmark mean from measured builds
runningcode bf72162
fix(config-cache): Defer CLI path resolution to execution phase
runningcode 723505a
fix(config-cache): Use abstract DirectoryProperty for CLI paths
runningcode 2166560
chore: Apply spotless formatting
runningcode 0dc9c5c
fix(config-cache): Use layout API for root dir property
runningcode 0aee71d
fix(telemetry): Restore async default org lookup
runningcode 30f6692
fix(telemetry): Defer org lookup to execution phase
runningcode 66d2709
fix(config-cache): Restore DirectoryProperty overloads in SentryCliPr…
runningcode d1509cf
fix(config-cache): Restore getIsolatedRootProjectDir for Gradle 8.8+
runningcode 3555294
fix(config-cache): Consolidate maybeExtractFromResources overloads
runningcode ebdc2f8
fix(config-cache): Restore SentryCliProvider to match main
runningcode ad14939
fix(config-cache): Remove File overloads from SentryCliProvider
runningcode 1cc1147
fix(test): Reset memoized CLI path between tests
runningcode 91d6f31
fix(config-cache): Remove memoized CLI path from SentryCliProvider
runningcode e4cc66e
fix(config-cache): Resolve CLI path via ValueSource task input
runningcode f15b88f
ref(telemetry): Use kotlin.concurrent.thread for org lookup
runningcode File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Benchmark help task configuration | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| benchmark-help-config: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout Repo | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| # Full history so gradle-profiler's git-checkout can reach both the | ||
| # base and head commits of the PR. | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Set up Java | ||
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5 | ||
| with: | ||
| distribution: 'temurin' | ||
| java-version: '17' | ||
|
|
||
| - name: Install Gradle Profiler and benchmark the help task | ||
| env: | ||
| BASE_REF: ${{ github.event.pull_request.base.sha }} | ||
| HEAD_REF: ${{ github.event.pull_request.head.sha }} | ||
| run: | | ||
| curl -s "https://get.sdkman.io" | bash | ||
| source "$HOME/.sdkman/bin/sdkman-init.sh" | ||
| sdk install gradleprofiler 0.24.0 | ||
| gradle-profiler --benchmark \ | ||
| --scenario-file scripts/benchmark/help-config-cache.scenarios \ | ||
| --output-dir out/help-config | ||
|
|
||
| - name: Upload results | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | ||
| with: | ||
| name: help-config-benchmark | ||
| path: out/help-config/ | ||
|
|
||
| - name: Build PR comment | ||
| run: python3 scripts/benchmark/help-config-comment.py out/help-config/benchmark.csv comment.md | ||
|
|
||
| - name: Post comparison comment | ||
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| const marker = '<!-- help-config-benchmark -->'; | ||
| const body = fs.readFileSync('comment.md', 'utf8'); | ||
| const { owner, repo } = context.repo; | ||
| const issue_number = context.issue.number; | ||
| const comments = await github.paginate(github.rest.issues.listComments, { | ||
| owner, repo, issue_number, | ||
| }); | ||
| const existing = comments.find((c) => c.body.includes(marker)); | ||
| if (existing) { | ||
| await github.rest.issues.updateComment({ owner, repo, comment_id: existing.id, body }); | ||
| } else { | ||
| await github.rest.issues.createComment({ owner, repo, issue_number, body }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The unsynchronized
started()method inSentryTelemetryServicecreates a race condition when accessingpendingOrgLookupParams, which is set by the synchronizedstart()method.Severity: MEDIUM
Suggested Fix
Add the
@Synchronizedannotation to thestarted()method inSentryTelemetryServiceto ensure thread-safe access to thependingOrgLookupParamsfield. Alternatively, annotate thependingOrgLookupParamsfield with@Volatileto ensure memory visibility across threads.Prompt for AI Agent
Also affects:
plugin-build/src/main/kotlin/io/sentry/android/gradle/telemetry/SentryTelemetryService.kt:115~119