-
Notifications
You must be signed in to change notification settings - Fork 2
fix: detect app rename via auto-injected stable id #1118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
toiroakr
wants to merge
16
commits into
main
Choose a base branch
from
fix/rename-app
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
5ef8e01
fix: detect app rename via auto-injected stable id
toiroakr ba5614f
fix: only inject config id at apply, validate label format
toiroakr 8d8f449
feat: validate AppConfig at load time via zod schema
toiroakr e9c8653
refactor: move config-id-injector under apply command
toiroakr 79a3e8b
refactor: store plain UUID in config, prefix at metadata boundary
toiroakr ac60416
fix(e2e): use plain UUID for sharedTestAppId
toiroakr b699628
docs(cli): note that apply injects a stable id into tailor.config.ts
toiroakr 8683a73
Merge remote-tracking branch 'origin/main' into fix/rename-app
toiroakr c98d99b
docs: inject 'do not edit' comment alongside auto-generated id
toiroakr d15d1f0
Merge branch 'main' into fix/rename-app
toiroakr b04e31a
fix: address copilot review feedback on rename detection
toiroakr 42d3d74
docs: drop --config workaround from wrapper-config note
toiroakr 4c23a37
feat(deploy): dedicated prompt for id regeneration vs name mismatch
toiroakr 1746ff7
docs: clarify id-regeneration wording
toiroakr ca34eff
docs: simplify auto-injected id comment to focus on the only valid ed…
toiroakr 7196dfd
fix: skip config id injection in dry-run / build-only deploys
toiroakr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| --- | ||
| "@tailor-platform/sdk": minor | ||
| --- | ||
|
|
||
| Detect app renames via a stable, auto-injected `id` field in `tailor.config.ts`. | ||
|
|
||
| The SDK now writes a generated `id: "<uuid>"` field into the | ||
| `defineConfig({...})` call on first `deploy`, and stamps every managed | ||
| resource with an `sdk-app-id` metadata label. Subsequent deploys identify | ||
| ownership by the stable id rather than by the app name, so renaming the | ||
| app (or any of its resources) cleanly removes the old resources before | ||
| creating the new ones. The id is a plain UUID; the SDK adds the | ||
| label-compatible `app-` prefix internally at the metadata boundary. | ||
|
|
||
| Deleting the `id` field regenerates a new UUID on the next `deploy` — | ||
| typically done after copying `tailor.config.ts` from another project so | ||
| the new application does not share the original's id. Existing | ||
| resources keep their data and are re-tagged in place; `deploy` shows a | ||
| dedicated confirmation prompt for this case ("Application id was | ||
| regenerated for ..."), separate from the rename/transfer confirmation. | ||
|
|
||
| If your `tailor.config.ts` is a wrapper that re-exports `defineConfig` from | ||
| another file, the SDK skips id injection on the wrapper — add the `id` | ||
| field manually to the file that contains the actual `defineConfig({...})` | ||
| call. Existing deployments without the id continue to work and migrate | ||
| transparently on the next `deploy` run. |
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.