Skip to content

Conversation

Copy link

Copilot AI commented Jan 21, 2026

📜 Description

SentryCliVersionValueSource declared a url parameter but never used it when executing sentry-cli --version. Self-hosted Sentry instances would always query the default SAAS endpoint for version info.

Changes:

  • Added URL handling to SentryCliVersionValueSource.obtain() matching the pattern in SentryCliInfoValueSource:
    parameters.url.orNull?.let { url ->
      args.add("--url")
      args.add(url)
    }
  • Added test coverage for both null and non-null URL scenarios

💡 Motivation and Context

The URL parameter was passed to SentryCliVersionValueSource (line 319) but never added to the command arguments (lines 492-500), unlike its sibling SentryCliInfoValueSource which correctly handles this.

💚 How did you test it?

  • Added SentryCliVersionValueSource returns version without custom URL - verifies null case
  • Added SentryCliVersionValueSource works with custom URL - verifies custom URL case

📝 Checklist

  • I reviewed the submitted code
  • I added tests to verify the changes
  • I updated the docs if needed
  • No breaking changes

🔮 Next steps

None - fix is complete and follows existing patterns.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • dl.google.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.xml/javax.xml.namespace=ALL-UNNAMED -XX:MaxMetaspaceSize=1536m -XX:+HeapDumpOnOutOfMemoryError -XX:+UseParallelGC -XX:+CrashOnOutOfMemoryError -Xmx4g -Dfile.encoding=UTF-8 -Duser.country (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

what happens if you pass url = null


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix handling of null URL input Fix SentryCliVersionValueSource to respect custom URL parameter Jan 21, 2026
Copilot AI requested a review from ndmanvar January 21, 2026 23:51
@romtsn romtsn marked this pull request as ready for review January 26, 2026 10:53
Copy link
Member

@romtsn romtsn left a comment

Choose a reason for hiding this comment

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

@ndmanvar did someone ask for this, or how did you discover this bug? I'm not sure if the url here makes much sense since this command just asks for sentry-cli --version but wouldn't hurt I guess

@romtsn romtsn force-pushed the copilot/handle-null-url-input branch from 15cf842 to 4f16a0e Compare January 26, 2026 10:56
@github-actions
Copy link
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Internal Changes 🔧

Deps

  • Bump getsentry/github-workflows/.github/workflows/updater.yml from 2 to 3 by dependabot in #1023
  • Bump getsentry/craft from 2.19.0 to 2.20.0 by dependabot in #1059

Other

  • Fix SentryCliVersionValueSource to respect custom URL parameter by Copilot in #1057

🤖 This preview updates automatically when you update the PR.

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