feat(projects): remove default config-repo fetch from CLI (CLI-22)#458
Draft
fhacloid wants to merge 5 commits into
Draft
feat(projects): remove default config-repo fetch from CLI (CLI-22)#458fhacloid wants to merge 5 commits into
fhacloid wants to merge 5 commits into
Conversation
… (CLI-124) The CLI omitted the ?service_catalog_source_version_id query param when fetching component config, causing the API to return a stale version. Auto-resolve the latest version by fetching the component's stack ref and calling resolveStackVersion with empty hints (matching console behavior). An explicit --service-catalog-source-version-id flag is also added to config_get for version pinning. create/update callers now also pass the resolved latest version when pre-loading current config. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…CLI-124) Replace the internal uint32 --service-catalog-source-version-id flag with the standard --stack-version flag (tag/branch/sha/id) using the same cyargs.AddStackVersionFlags + ResolveStackVersionArg pattern as other stack commands. Internally the middleware still resolves via resolveStackVersion to service_catalog_source_version_id before the config GET. Default (no flag) auto-resolves the catalog branch head, matching console behavior. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…get (CLI-124) --stack-version=version:<id> bypasses stack ref resolution and passes the catalog source version ID directly to the config GET, useful for debugging by known ID. Other --stack-version forms (tag:/branch:/sha:) and the default auto-resolve-latest path are unchanged. ResolveStackVersionArg returns an informative error if version:<id> is used with commands that cannot accept a raw ID. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…to package (CLI-124) - cyargs.GetStackVersionID parses --stack-version=version:<id> so consumers do not inline flag reading - config_get.go uses GetStackVersionID; drops fmt/strconv/strings imports - verbose WHAT comment removed from GetComponentConfig - ComponentConfigServer moved to offline/mockserver package with exported constants; component_config_test.go references them Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The CLI was fetching the org's default config repository when --config-repository was omitted (GetDefaultConfigRepository). This logic is pushed to the backend via BE-807; once that lands, passing an empty canonical lets the API default it automatically. Replaces GetDefaultConfigRepository calls with GetConfigRepository (flag-only read) in project create and update, and removes the now- dead helper and its unused imports. DRAFT: blocked on BE-807 (backend not yet merged). Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
GetDefaultConfigRepositoryfrominternal/cyargs/— the helper fetched the org's default config repo via the API when--config-repositorywas omittedproject create,project update) withGetConfigRepository(flag-only read, returns empty string when unset)fmt,slices,client/models) from cyargs--config-repositoryflag description and removes stale commentWhy draft / blocked
Blocked on BE-807 — Make the createProject route use the default catalog if catalogRepository is empty
BE-807 is still Backlog. Until it lands, passing an empty
configRepositoryto the backend will fail. This PR must not be merged until BE-807 is done and deployed.Once BE-807 is merged: remove the draft status, verify e2e
project createwithout--config-repositoryworks, then merge.Test plan
go build ./...green in worktreego vet ./...cleango test ./cmd/cycloid/middleware/offline/...greency project createwithout--config-repository— unblock after BE-807Closes CLI-22 (after BE-807)
🤖 Generated with Claude Code