Skip to content

fix: add refType parameter to configuration_get tool so version tags resolve correctly - #97

Merged
ThisIsDemetrio merged 1 commit into
mainfrom
fix/gh-668-configuration-refType
Jul 28, 2026
Merged

fix: add refType parameter to configuration_get tool so version tags resolve correctly#97
ThisIsDemetrio merged 1 commit into
mainfrom
fix/gh-668-configuration-refType

Conversation

@ThisIsDemetrio

Copy link
Copy Markdown
Contributor

What this PR is for?

The configuration_get tool always queried the Console backend's configuration endpoint using the revisions path segment, regardless of whether the caller's refId was actually a revision name or a version tag. Since the backend route is generic (GET /projects/:projectId/:refType/:refName/configuration, supporting both revisions and versions), a version tag looked up under revisions failed to resolve and fell back to a mostly-empty configuration document (only cmsSettings/fastDataConfig remained populated).

This PR adds an explicit refType: 'revision' | 'version' parameter to configuration_get (defaulting to 'revision' to preserve existing behavior), and threads it through IAPIClient.getConfiguration and BackendClient so the correct path segment (revisions/versions) is used when querying the backend.

Tests were added first to reproduce the bug (asserting the request path used revisions even for a version ref), then the fix was implemented to make them pass, alongside new coverage for the version ref type.

@ThisIsDemetrio
ThisIsDemetrio marked this pull request as ready for review July 28, 2026 09:15
@ThisIsDemetrio
ThisIsDemetrio merged commit 4b351a9 into main Jul 28, 2026
8 checks passed
@ThisIsDemetrio
ThisIsDemetrio deleted the fix/gh-668-configuration-refType branch July 28, 2026 09:15
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.

1 participant