Skip to content
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

pkg/backend: Delete SupportsTeams methods #12551

Merged
merged 2 commits into from
Mar 30, 2023
Merged

Conversation

abhinav
Copy link
Contributor

@abhinav abhinav commented Mar 29, 2023

This deletes the SupportsTeams method added in #11974.
It came up during review that we want to avoid too many new
"SupportsFoo" methods.

Instead, we'll let each backend report whether it supports teams
by returning ErrTeamsNotSupported.

As a result of this change, validateCreateStackOpts cannot error,
so it's been renamed to newCreateStackOptions.

Testing:
There's already a test (added in the #12499 refactor)
that verifies that we report the appropriate error
when the backend doesn't support --teams.
This updates the mock in that test.

This deletes the SupportsTeams method added in #11974.
It came up during review that we want to avoid too many new
"SupportsFoo" methods.

Instead, we'll let each backend report whether it supports teams
by returning ErrTeamsNotSupported.

As a result of this change, validateCreateStackOpts cannot error,
so it's been renamed to newCreateStackOptions.

Testing:
There's already a test (added in the #12499 refactor)
that verifies that we report the appropriate error
when the backend doesn't support --teams.
This updates the mock in that test.
Deletes the teamsUnsupportedError type.
We're not matching on this anywhere,
there are no independent tests for just the error type,
and the error message itself is really short.
This can all be replaced with a `fmt.Errorf`.
Copy link
Contributor Author

abhinav commented Mar 29, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@abhinav abhinav added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Mar 29, 2023
@pulumi-bot
Copy link
Contributor

Changelog

[uncommitted] (2023-03-29)

@abhinav abhinav requested a review from a team March 30, 2023 05:29
@abhinav
Copy link
Contributor Author

abhinav commented Mar 30, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 30, 2023

Build succeeded:

@bors bors bot merged commit d4d7159 into master Mar 30, 2023
40 checks passed
@bors bors bot deleted the abhinav/backend-no-supportsteams branch March 30, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants