Repository navigation
feat: list spaces for OIDC and parameter-held API keys, as an autocomplete field - #260
Merged
matt-richardson merged 1 commit intoOct 13, 2026
Merged
Conversation
The space field becomes TeamCity's autocomplete text field, so a space can still be chosen by id while parameter references keep working. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NickJosevski
approved these changes
Oct 13, 2026
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.
Builds on #239. Part of DPT-3614.
Why
#239 lists spaces only for connections with a literal API key. Connections that authenticate with OIDC, or hold the key in a build parameter, fell back to a typed name — the case that goes stale when a space is renamed. This lists spaces for those too:
The dropdown is replaced with a text field that suggests the connection's spaces, because space names can be parameter references (
%octopus.space%), which a dropdown can't hold. Choosing a suggestion, or typing a space's exact name, stores the id; anything else is stored as the name and resolved by TeamCity when the build runs.Notes
%parameter references. The picker drives that widget and delegates to TeamCity's parameter-completion functions after a%. These aren't a public API: if they change, the field falls back to suggesting spaces only, and always accepts typed text. An e2e test breaks them on the page to check this.connections-api-coredependency (provided, 2025.11 — the last version compiled for Java 8). The credentials API it holds exists from TeamCity 2023.05; on older servers, or with an OIDC plugin without Octopus-TeamCity vulnerable to CVE-2025-68161 #185, OIDC connections fall back to the text field with an "update the OIDC plugin" reason.https://teamcity-tls), set as the root URL, with Octopus trusting its CA — the OIDC plugin only issues tokens for an HTTPS issuer. The full suite passes with this.OIDC_PLUGIN_ZIPto run it).SpacePickerManualTest(the manual screenshot driver, skipped in CI) still targets the old dropdown and is left for a follow-up.Screenshots
With no connection selected, the field is a plain text box with a note saying why there's nothing to suggest.
Choosing a connection loads its spaces, which are suggested as soon as the field is focused.
Picking a suggestion fills in the name and stores the space's id (Spaces-1).
After the space is renamed in Octopus, the step finds it by id and shows the new name, "Swordfish".
Spaces are still listed when the connection's API key comes from a password build parameter.
When the API key parameter is only set during a build, the spaces can't be listed and the field asks for a name.
Hovering over the help icon shows the specific reason.
An OIDC connection lists spaces: Octopus accepted the edit-time token for this build configuration.
The same OIDC connection, on a build configuration Octopus doesn't trust, can't list spaces.
The tooltip gives Octopus's reason for refusing the token.
A saved space that no longer exists in Octopus is flagged, and the saved value is left alone.
Typing
%switches the suggestions to TeamCity's own parameter completion, so a space can be a parameter reference.The connections used in these screenshots.
🤖 Generated with Claude Code