-
Notifications
You must be signed in to change notification settings - Fork 161
direct: Manage app lifecycle on create as well #5069
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| trace $CLI apps create my-app | ||
| trace $CLI apps create my-app --no-compute --no-wait | ||
| trace $CLI bundle generate app --existing-app-name my-app --config-dir . --key out |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,14 @@ | ||
|
|
||
| === First deploy: creates app | ||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/config-drift-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| === Second deploy: pushes code with config | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The fix to deploy on create removes this second deploy which shouldn't be there in the first place and was a sign of the bug |
||
| >>> [CLI] bundle deploy | ||
| Uploading bundle files to /Workspace/Users/[USERNAME]/.bundle/config-drift-[UNIQUE_NAME]/default/files... | ||
| Deploying resources... | ||
| Updating deployment state... | ||
| Deployment complete! | ||
|
|
||
| === Verify no drift after deploy | ||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged | ||
| >>> [CLI] bundle plan -o json | ||
|
|
||
| >>> [CLI] apps get [UNIQUE_NAME] --output json | ||
|
|
||
| === Simulate out-of-band deployment with changed command and env | ||
| === Plan should detect config drift | ||
|
|
@@ -32,15 +25,7 @@ Updating deployment state... | |
| Deployment complete! | ||
|
|
||
| === Verify no drift after fix | ||
| >>> [CLI] bundle plan | ||
| Plan: 0 to add, 0 to change, 0 to delete, 1 unchanged | ||
|
|
||
| === Simulate out-of-band deployment with git_source added | ||
| === Plan should detect git_source drift | ||
| >>> [CLI] bundle plan | ||
| update apps.myapp | ||
|
|
||
| Plan: 0 to add, 1 to change, 0 to delete, 0 unchanged | ||
| >>> [CLI] bundle plan -o json | ||
|
|
||
| >>> [CLI] bundle destroy --auto-approve | ||
| The following resources will be deleted: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,10 @@ func logProgress(ctx context.Context, msg string) { | |
|
|
||
| // BuildDeployment constructs an AppDeployment from the app's source code path, inline config and git source. | ||
| func BuildDeployment(sourcePath string, config *resources.AppConfig, gitSource *sdkapps.GitSource) sdkapps.AppDeployment { | ||
| // GitRepository is not supported in the Deploy API, only as part of Create, so we need to remove it. | ||
| if gitSource != nil { | ||
| gitSource.GitRepository = nil | ||
| } | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That sounds asymmetric. Known issue?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, GitRepository is part of only Create and you can't change it as part of Deploy |
||
| deployment := sdkapps.AppDeployment{ | ||
| Mode: sdkapps.AppDeploymentModeSnapshot, | ||
| SourceCodePath: sourcePath, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skipping actions with "skip:action" from output as not relevant for the test