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!: support for gateway api #1510

Merged
merged 12 commits into from Jan 3, 2023

Conversation

tuunit
Copy link
Contributor

@tuunit tuunit commented Dec 26, 2022

Motivation and Context

As the Gateway API is now GA and part of the Terraform Google Provider (GoogleCloudPlatform/magic-modules#6875) release with version 4.47.0 (https://github.com/hashicorp/terraform-provider-google/releases/tag/v4.47.0).
Therefore I added full support for setting the gateway api channel to this module as well.

Resolves: #1462

@tuunit tuunit requested review from a team and Jberlinsky as code owners December 26, 2022 10:49
@tuunit tuunit mentioned this pull request Dec 26, 2022
@tuunit tuunit changed the title wip: feat: support for gateway api feat: support for gateway api Dec 26, 2022
@tuunit
Copy link
Contributor Author

tuunit commented Dec 27, 2022

@bharathkkb as mentioned in the issue my change to the terraform provider is now merged and released therefore I was able to add the gateway api to this module as well.

@Jberlinsky I'm not sure completely sure about the kitchen tests scope. I just copied the "simple_regional" kitchen test files and adapted them to include the gateway api channel attribute. What I'm not sure about is if it is really necessary to keep all the attribute checks and variables from the "simple_regional" test fixture and example.

@ericyz
Copy link
Collaborator

ericyz commented Dec 28, 2022

Hi @tuunit , thanks for the contribution. Minor comments:

  • Could you please also update google provider version in versions.tf.tmpl to over 4.47.0?
  • Could you please add the integration test in build/int.cloudbuild.yaml ?

@tuunit tuunit force-pushed the gateway-api branch 2 times, most recently from 91cf156 to ad52e25 Compare December 28, 2022 08:23
@tuunit
Copy link
Contributor Author

tuunit commented Dec 28, 2022

@tuunit Thanks for the PR! 🚀 Unfortunately it looks like some of our CI checks failed. See the Contributing Guide for details.

  • ⚠️check_generate_modules
    The modules need to be regenerated. Please run make_build.
Checking submodule's files generation
diff -r '--exclude=.terraform' '--exclude=.kitchen' '--exclude=.git' /workspace/README.md /tmp/tmp.77hqr2udQ3/workspace/README.md
304,305c304,305
< - [Terraform](https://www.terraform.io/downloads.html) 0.13+
< - [Terraform Provider for GCP][terraform-provider-google] v4.47
---
> - [Terraform](https://www.terraform.io/downloads.html) 0.12
> - [Terraform Provider for GCP][terraform-provider-google] v3.41
Error: submodule's files generation has not been run, please run the
'make build' command and commit changes

Never mind, the bot updated it's state and I had to push another fix anyway. The kitchen / cloudbuild integration and testing and how to add new test suites is not really clear. Maybe we could extend the documentation regarding adding test coverage for new features like in this PR.

@bharathkkb @Jberlinsky I don't think this is correct as I already ran make build. It might be a raise condition with two lint checks as I pushed two commits quite rapidly after another. Can you please re-run the lint check to make sure we don't have a problem 😄

@tuunit
Copy link
Contributor Author

tuunit commented Dec 28, 2022

Unfortunately, I cannot access the cloud build details to check the test failure myself.

@ericyz
Copy link
Collaborator

ericyz commented Dec 28, 2022

Hi @tuunit , the failure was not relevant to your chance. I'll try to fix it and re-trigger the build after.

@ericyz
Copy link
Collaborator

ericyz commented Dec 30, 2022

Minor comments, but LGTM after resolving the conflicts

*/

locals {
cluster_type = "simple-regional"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please update the cluster type accordingly

Copy link
Collaborator

Choose a reason for hiding this comment

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

simple-regional -> simple-regional-with-gatewayapi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Can you shortly explain to me why this is necessary? Or is it just to keep everything aligned with some kind of naming convention?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Your understanding is right. In this way, it's easier to identify the testing clusters by its name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

@ericyz ericyz Dec 30, 2022

Choose a reason for hiding this comment

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

It was the length of the cluster name exceeding the limit and it should be good now.

@tuunit
Copy link
Contributor Author

tuunit commented Dec 30, 2022

@ericyz Thanks a million for fixing the issue. Now I understand what the problem was! It is really unfortunate that normal contributors cannot view the issues of the integration pipeline.

@ericyz ericyz self-assigned this Dec 30, 2022
@comment-bot-dev
Copy link

@tuunit
Thanks for the PR! 🚀
✅ Lint checks have passed.

Copy link
Collaborator

@ericyz ericyz left a comment

Choose a reason for hiding this comment

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

LGTM. FYI - @bharathkkb

@tuunit
Copy link
Contributor Author

tuunit commented Jan 3, 2023

@Jberlinsky ready for final review 😄

Happy New Year 🥳

@bharathkkb bharathkkb changed the title feat: support for gateway api feat!: support for gateway api Jan 3, 2023
@bharathkkb bharathkkb merged commit 4181276 into terraform-google-modules:master Jan 3, 2023
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.

Gateway Controller is GA
4 participants