SP-2712: expose the LIVE package pointer as config pointer - #421
Closed
Albnor (albnorleku) wants to merge 1 commit into
Closed
SP-2712: expose the LIVE package pointer as config pointer#421Albnor (albnorleku) wants to merge 1 commit into
Albnor (albnorleku) wants to merge 1 commit into
Conversation
A content-cli release of a Context Model branch had no final step: the branch could be cut and validated, but selecting it as LIVE was only possible through the Studio UI, so no CLI-driven or agent-driven flow could finish a release. The new beta `config pointer` group takes the main package key and the branch key separately and composes the branched key itself, so callers never assemble `<main>@<branch>` by hand. `set` reports a package-pointer-blocking-problems conflict as terminal and names the command that lists the problems; there is no override, matching the frontend dropping "Set live anyway". `get` distinguishes an unset pointer from an error, since consumers reading the main package is the normal default rather than a failure. Neither `set` nor a dry-run of it accepts a validate flag. Pacman's OpenAPI spec declares `validate` on the PUT but the controller never binds it, so such a flag would report a successful validation while performing a real release. Includes-AI-Code: true Co-authored-by: Cursor <cursoragent@cursor.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.



Why
A content-cli release of a Context Model branch had no final step. The branch could be cut with
config branch createand checked withconfig package validate, but selecting it as LIVE — the act that redirects the package's consumers to that branch — was only possible through the Studio UI. Any CLI-driven or agent-driven release therefore stopped one step short of finishing.Pacman has exposed the pointer publicly at
/api/core/pointers/packages/{packageKey}for a while; nothing in content-cli referenced it.Problem context: SP-2712. Parent epic: SP-1989.
What changed
A beta
config pointergroup with two commands:pointer/api/pointer.api.tsPUT/GETpointer routes, mirroring thebranchmodulepointer/interfaces/pointer.interfaces.tsPackagePointerTransport,SetPackagePointerTransport, and the conflict-body shapepointer/pointer.command.service.tsmodule.tscore/http/http-client.tsputStatusAndData, so a204is distinguishable from a bodyFour decisions worth flagging for review:
settakes the two keys separately and composes<main>@<branch>itself. Callers never hand-assemble the branched form, and a branched key passed as--packageKeyis rejected before a request goes out.maincannot be selected, since returning consumers to the main package is a merge, not a selection.A
409carryingpackage-pointer-blocking-problemsis terminal. The message says the branch's problems must be resolved and namesconfig package validateas the way to list them. There is deliberately no override flag — this matches the frontend dropping "Set live anyway" in celonis/ems-frontend#66094.There is no
--validateflag. Pacman's OpenAPI spec declares avalidatequery parameter on thePUT, butPublicPackagePointerController.setnever binds it, so Spring silently discards it. A flag wired to it would report a successful dry run while having performed a real release. I removed the flag rather than ship that. The spec discrepancy is worth fixing separately on the Pacman side.getdistinguishes "no selection" from an error. Pacman answers204when the pointer is unset, which is the normal default — consumers read the main package — not a failure.DELETEis intentionally not wrapped. Moving the selection forward to a corrected branch is a release; clearing it leaves consumers pointed at nothing.A
403is reported as ambiguous by design: the route answers403both for missing permission and for an inactivepacman.live-branch-pointerfeature, with nothing in the body separating them. Claiming one cause would send users to request access they already have.Testing
yarn test— 621 tests across 71 suites pass, no regressions. New coverage:tests/commands/configuration-management/pointer/pointer-set.spec.ts— key composition, themainrejection, the409and403messages, and an explicit assertion thatvalidatenever appears on the requesttests/commands/configuration-management/pointer/pointer-get.spec.ts— the selected case and the204empty casetests/integration/commands/configuration-management.spec.ts— command wiringTwo pre-existing
tslintno-shadowed-variableerrors inlogger.tsandhttp-client.tscome from a tslint/TypeScript version mismatch onDeprecationErrorand are unrelated to this change.Docs
docs/user-guide/branch-commands.mdgains a LIVE-selection section that states there is no dry run and points atconfig package validateinstead.Made with Cursor