Repository navigation
feat: list an Octopus server's spaces for a connection with a stored API key - #262
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…API key Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ackage Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
APErebus
approved these changes
Oct 14, 2026
APErebus
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Just 1 nit that might be worth fixing
Comment on lines
+87
to
+88
| "The Octopus server did not return a spaces list. Check the URL points at an Octopus" | ||
| + " server."); |
Contributor
There was a problem hiding this comment.
The `"Check the URL points at an Octopus server." is a slightly strange error message imo
Comment on lines
+36
to
+37
| /** How many spaces we ask for. Far above any realistic instance. */ | ||
| static final int TAKE = 1000; |
Contributor
There was a problem hiding this comment.
you might as well do int.MaxValue (or the java equivalent) so you just get all of them
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Part of DPT-3630 (Renaming an Octopus space breaks TeamCity configurations that name it). Stacked on #261.
Why
The space picker needs to list the spaces on a connection's Octopus server, which means a server-side endpoint,
/octopus/listSpaces.html. Nothing calls it yet; the picker UI comes in the next PR. This PR covers only connections that store their API key. Parameter-held keys and OIDC follow separately, and until then those connections get a message asking for the space name instead.Security
The endpoint makes an outbound request on the caller's behalf, so it is deliberately narrow, and each point has a test:
EDIT_PROJECTon the project. That is the same permission needed to configure a connection at all, so it grants no reach they did not already have.serverUrl/apiKeyvalues are ignored.Cache-Control: no-store.A side effect of naming a saved connection: a brand-new connection must be saved once before its spaces can be listed. That's unavoidable anyway, because TeamCity renders a saved secret as a placeholder, so the browser never holds the real key.
Notes
The lookup uses
HttpURLConnectionand gson, followingCommitHistoryFetcher, rather thancom.octopus:octopus-sdk. The SDK is test-scope only today and would drag a gson upgrade into the shipped plugin.🤖 Generated with Claude Code