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

Update comments about Backend interface implementation, add implementation assertion #36168

Merged
merged 2 commits into from
Dec 6, 2024

Conversation

SarahFrench
Copy link
Member

While working through the docs at docs/architecture.md
I realised that the backend package has some old comments that predate when the backend.Enhanced interface was replaced in #34818.

This PR:

  • Updates old comments
  • Adds a missing check that the Local backend implements the new interface backendrun.OperationsBackend

Target Release

N/A

Draft CHANGELOG entry

N/A

@SarahFrench SarahFrench marked this pull request as ready for review December 6, 2024 14:10
@SarahFrench SarahFrench requested a review from a team as a code owner December 6, 2024 14:10
@@ -92,6 +92,7 @@ type Local struct {
}

var _ backend.Backend = (*Local)(nil)
var _ backendrun.OperationsBackend = (*Local)(nil)
Copy link
Member Author

Choose a reason for hiding this comment

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

To be fair, this was already checked in a test:

func TestLocal_impl(t *testing.T) {
var _ backendrun.OperationsBackend = New()
var _ backendrun.Local = New()
var _ backendrun.CLI = New()
}

But this assertion will run at compile time

@SarahFrench SarahFrench merged commit 0daf6e8 into hashicorp:main Dec 6, 2024
12 checks passed
@SarahFrench SarahFrench deleted the update-backend-comments branch December 6, 2024 17:05
Copy link
Contributor

github-actions bot commented Dec 6, 2024

Reminder for the merging maintainer: if this is a user-visible change, please update the changelog on the appropriate release branch.

Copy link
Contributor

github-actions bot commented Jan 6, 2025

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants