-
Notifications
You must be signed in to change notification settings - Fork 104
TF-28651 deprecate endpoints #1205
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 8 commits
2376f43
1d6004d
5a35f2b
78af404
1b5ffec
867e966
d92382a
d57e656
92940d6
ea36d56
140f0ec
f778759
ce64724
d3e1d85
ef8ec3d
bb7012f
170a21c
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 |
|---|---|---|
|
|
@@ -2,6 +2,14 @@ | |
|
|
||
| # v1.91.1 | ||
|
|
||
| ## Enhancements | ||
|
|
||
| * Updates endpoint for deleting stack from `POST` to `DELETE` and removing `/delete` from endpoint by | ||
| * Updates endpoint for force deleting stack from `POST` to `DELETE` and removing `/force-delete` from endpoint and adding `?force=true` by | ||
|
|
||
|
Comment on lines
+5
to
+16
Collaborator
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. These enhancements aren't customer-impacting, correct? If not I don't think they need to show in the changelog.
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. Shouldn't user be able to delete the stack? The post wont work anymore. |
||
| ## Deprecations | ||
|
|
||
| * The beta `StackDeployments`, `StackPlan`, `StackPlanOperation`, and `StackSource` resources have been removed, by @sahar-azizighannad [#1205](https://github.com/hashicorp/go-tfe/pull/1205) | ||
| ## Bug Fixes | ||
|
|
||
| * Fixes timestamp attribute mapping for deployment runs to use correct API field names (`created-at`/`updated-at` instead of `started-at`/`completed-at`) by @shwetamurali [#1199](https://github.com/hashicorp/go-tfe/pull/1199) | ||
|
|
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -340,37 +340,6 @@ func pollStackDeployments(t *testing.T, ctx context.Context, client *Client, sta | |
| return | ||
| } | ||
|
|
||
| func pollStackDeploymentStatus(t *testing.T, ctx context.Context, client *Client, stackID, deploymentName, status string) { | ||
| // pollStackDeployments will poll the given stack until it has deployments or the deadline is reached. | ||
| ctx, cancel := context.WithDeadline(ctx, time.Now().Add(5*time.Minute)) | ||
| defer cancel() | ||
|
|
||
| deadline, _ := ctx.Deadline() | ||
| t.Logf("Polling stack %q for deployments with deadline of %s", stackID, deadline) | ||
|
|
||
| ticker := time.NewTicker(2 * time.Second) | ||
| defer ticker.Stop() | ||
|
|
||
| for finished := false; !finished; { | ||
| t.Log("...") | ||
| select { | ||
| case <-ctx.Done(): | ||
| t.Fatalf("Stack deployment %s/%s did not have status %q at deadline", stackID, deploymentName, status) | ||
| case <-ticker.C: | ||
| var err error | ||
| deployment, err := client.StackDeployments.Read(ctx, stackID, deploymentName) | ||
| if err != nil { | ||
| t.Fatalf("Failed to read stack deployment %s/%s: %s", stackID, deploymentName, err) | ||
| } | ||
|
|
||
| t.Logf("Stack deployment %s/%s had status %q", stackID, deploymentName, deployment.Status) | ||
| if deployment.Status == status { | ||
| finished = true | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| func pollStackConfigurationStatus(t *testing.T, ctx context.Context, client *Client, stackConfigID, status string) (stackConfig *StackConfiguration) { | ||
| // pollStackDeployments will poll the given stack until it has deployments or the deadline is reached. | ||
| ctx, cancel := context.WithDeadline(ctx, time.Now().Add(5*time.Minute)) | ||
|
|
@@ -440,9 +409,5 @@ func TestStackConverged(t *testing.T) { | |
| require.ElementsMatch(t, deployments, stack.DeploymentNames) | ||
| require.NotNil(t, stack.LatestStackConfiguration) | ||
|
|
||
| for _, deployment := range deployments { | ||
| pollStackDeploymentStatus(t, ctx, client, stack.ID, deployment, "paused") | ||
| } | ||
|
|
||
|
Comment on lines
-456
to
-459
Collaborator
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. Why was this removed? Is this only needed for testing beta code? Seems like we would still need the ability to poll stack deployment status for this test even after the refactor.
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. We do not support this endpoint on GA. Unless I move it back instead of deprecating which I can.
Collaborator
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. OK I think I get it, we are still able to test if the stack converged even without checking the stack deployment statuses. Makes sense. |
||
| pollStackConfigurationStatus(t, ctx, client, stack.LatestStackConfiguration.ID, "converged") | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.