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

feat: add labels validations #10387

Merged

Conversation

EladLeev
Copy link
Contributor

@EladLeev EladLeev commented Apr 6, 2024

Hey 👋
A quick PR to add some labels validations based on the documentation.
The problem this PR is trying to solve is that nothing validates that the labels are correct before the apply phase which gets an error from the API.

Release Note Template for Downstream PRs (will be copied)

storage: added labels validation to 'google_storage_bucket' resource

Copy link

github-actions bot commented Apr 6, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@rileykarson, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@rileykarson rileykarson requested review from zli82016 and removed request for rileykarson April 8, 2024 20:49
@rileykarson
Copy link
Member

@zli82016 do you mind taking this review? Would this conflict with the customizediff at all?

@zli82016
Copy link
Member

zli82016 commented Apr 8, 2024

@zli82016 do you mind taking this review? Would this conflict with the customizediff at all?

I will take this review.

@zli82016
Copy link
Member

zli82016 commented Apr 9, 2024

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests service/storage and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Apr 9, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 21 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 1 file changed, 21 insertions(+), 4 deletions(-))

Errors

google provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

google-beta provider:

  • The diff processor failed to build. This is usually due to the downstream provider failing to compile.

@zli82016
Copy link
Member

zli82016 commented Apr 9, 2024

I run tests locally. ValidateFunc and CustomizeDiff don't conflict. ValidateFunc is called before CustomizeDiff

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests: 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • storage

$\textcolor{red}{\textsf{Errors occurred during RECORDING mode. Please fix them to complete your PR.}}$
View the build log

@zli82016
Copy link
Member

zli82016 commented Apr 9, 2024

Tests analytics

Total tests: 0 Passed tests: 0 Skipped tests: 0 Affected tests: 0

Click here to see the affected service packages
Errors occurred during RECORDING mode. Please fix them to complete your PR. View the build log

@EladLeev , can you please fix the build error? Thanks.

# github.com/hashicorp/terraform-provider-google-beta/google-beta/services/storage [github.com/hashicorp/terraform-provider-google-beta/google-beta/services/storage.test]
google-beta/services/storage/resource_storage_bucket.go:523:21: undefined: regexp

@EladLeev
Copy link
Contributor Author

EladLeev commented Apr 9, 2024

That's embarrassing 🤦 haha, sorry for that.
I've updated the branch - can you please check again?

@zli82016
Copy link
Member

zli82016 commented Apr 9, 2024

/gcbrun

@modular-magician modular-magician added awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests and removed awaiting-approval Pull requests that needs reviewer's approval to run presubmit tests labels Apr 9, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 22 insertions(+), 4 deletions(-))
google-beta provider: Diff ( 1 file changed, 22 insertions(+), 4 deletions(-))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 91
Passed tests: 85
Skipped tests: 6
Affected tests: 0

Click here to see the affected service packages
  • storage

$\textcolor{green}{\textsf{All tests passed!}}$
View the build log

@zli82016
Copy link
Member

zli82016 commented Apr 9, 2024

@EladLeev , is there a Github issue or buganizer issue for this PR? If yes, can you please add it to the description section of this PR with the format fixes xxxx?

@EladLeev
Copy link
Contributor Author

EladLeev commented Apr 9, 2024

Not really tbh. I can search the open issues to see if someone mentioned it, but it's something I'm facing from time to time (with many providers) and might give a better DevEx to users

Copy link
Member

@zli82016 zli82016 left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM.

balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request Apr 19, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request May 8, 2024
pawelJas pushed a commit to pawelJas/magic-modules that referenced this pull request May 16, 2024
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
Cheriit pushed a commit to Cheriit/magic-modules that referenced this pull request Jun 4, 2024
pcostell pushed a commit to pcostell/magic-modules that referenced this pull request Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants