Skip to content

TF-28651 deprecate endpoints#1205

Merged
sahar-azizighannad merged 17 commits intomainfrom
TF-28651_deprecate
Sep 16, 2025
Merged

TF-28651 deprecate endpoints#1205
sahar-azizighannad merged 17 commits intomainfrom
TF-28651_deprecate

Conversation

@sahar-azizighannad
Copy link
Copy Markdown
Contributor

Description

We will deprecate few endpoints for stacks GA.

Testing plan

Integration test have been also removed.

External links

Output from tests

Changes to Security Controls

@sahar-azizighannad sahar-azizighannad requested a review from a team as a code owner September 2, 2025 15:39
@hashicorp-cla-app
Copy link
Copy Markdown

hashicorp-cla-app bot commented Sep 2, 2025

CLA assistant check
All committers have signed the CLA.

@hashicorp-cla-app
Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

Copy link
Copy Markdown
Collaborator

@ctrombley ctrombley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @sahar-azizighannad, this looks good so far! I left a question about the update to TestStackConverged.

Comment on lines +5 to +9
## 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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.

Comment on lines -443 to -459
for _, deployment := range deployments {
pollStackDeploymentStatus(t, ctx, client, stack.ID, deployment, "paused")
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes several deprecated endpoints from the go-tfe client library as part of the Stacks GA preparation. The changes involve removing client fields, implementation files, and associated integration tests for stack plans, stack plan operations, stack sources, and stack deployments.

Key changes include:

  • Removal of deprecated client interfaces and implementations for stack plans, operations, sources, and deployments
  • Update of stack deletion endpoints from POST to DELETE with simplified URLs
  • Cleanup of integration tests that relied on deprecated functionality

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tfe.go Removes deprecated client fields and initializations for stack plans, operations, sources, and deployments
stack_source.go Complete removal of StackSources interface and implementation
stack_plan.go Complete removal of StackPlans interface and implementation
stack_plan_operation.go Complete removal of StackPlanOperations interface and implementation
stack_deployments.go Complete removal of StackDeployments interface and implementation
stack.go Updates Delete and ForceDelete methods to use proper REST verbs and simplified endpoints
stack_*_integration_test.go Removes integration tests for deprecated endpoints
stack_integration_test.go Removes test code that used deprecated StackDeployments interface
CHANGELOG.md Documents the deprecations and endpoint changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

client *Client
}

func (s stackDeployments) Read(ctx context.Context, stackID, deploymentName string) (*StackDeployment, error) {
Copy link
Copy Markdown
Contributor

@shwetamurali shwetamurali Sep 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the StackDeployment struct definition from stacks.go? Seems like it is not being used anymore

CHANGELOG.md Outdated
Comment on lines +18 to +19
* Updates endpoint for deleting stack from `POST` to `DELETE` and removing `/delete` from endpoint by @sahar-azizighannad [#1205](https://github.com/hashicorp/go-tfe/pull/1205)
* Updates endpoint for force deleting stack from `POST` to `DELETE` and removing `/force-delete` from endpoint and adding `?force=true` by @sahar-azizighannad [#1205](https://github.com/hashicorp/go-tfe/pull/1205)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what Chris meant in his comment here didn't pertain to the change being made but rather it being called out in the CHANGELOG. Since updating the routes isn't a user facing change, we can omit these entries.

@sahar-azizighannad sahar-azizighannad merged commit 9f57f8d into main Sep 16, 2025
12 of 16 checks passed
@sahar-azizighannad sahar-azizighannad deleted the TF-28651_deprecate branch September 16, 2025 19:47
@github-actions
Copy link
Copy Markdown

Reminder to the contributor that merged this PR: if your changes have added important functionality or fixed a relevant bug, open a follow-up PR to update CHANGELOG.md with a note on your changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants