Skip to content

Conversation

@solmonk
Copy link
Contributor

@solmonk solmonk commented Nov 15, 2023

What type of PR is this?
enhancement

Which issue does this PR fix:
Partially - #469
Fully - #447

Also this removes gen_mocks.sh and unifies mock generation to go generate - should remove a few confusion we had on building

What does this PR do / Why do we need it:

  • Does a few dependency upgrades. This will NOT change any of the resource version we are watching - we are still watching for v1beta1 resources. However, since some of the constants has been moved to v1 package I had to update a few lines of code.
  • Upgrading to controller-runtime@v0.16.3 introduces a few breaking changes, had to fix it but they look good especially for contexts in event handler.

If an issue # is not available please add repro steps and logs from aws-gateway-controller showing the issue:

Testing done on this change:

Confirmed controller is running ok

Automation added to e2e:

Will this PR introduce any new dependencies?:

Will this break upgrades or downgrades. Has updating a running cluster been tested?:

Does this PR introduce any user-facing change?:


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment on lines +98 to +99
Watches(&gwv1beta1.Gateway{}, handler.EnqueueRequestsFromMapFunc(r.findImpactedAccessLogPolicies), pkg_builder.WithPredicates(predicate.GenerationChangedPredicate{})).
Watches(&gwv1beta1.HTTPRoute{}, handler.EnqueueRequestsFromMapFunc(r.findImpactedAccessLogPolicies), pkg_builder.WithPredicates(predicate.GenerationChangedPredicate{})).
Copy link
Contributor

Choose a reason for hiding this comment

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

should we use gwv1 everywhere now? there are other places when we watch for beta version of gw and routes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For max compatibility and safety I don't think we will watch v1 version resource right away. (and actually that is not required to support v1 - this PR is already able to watch them.)

Copy link
Contributor

Choose a reason for hiding this comment

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

did you run any e2e tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually I didn't and fixed the e2etest overall, e2etest will run on v1 (instead of v1beta1) resources to prove the controller is capable of handling them.

@mikhail-aws
Copy link
Contributor

very nice enhancements!

Copy link
Contributor

@mikhail-aws mikhail-aws left a comment

Choose a reason for hiding this comment

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

close #447
close #322

@solmonk solmonk merged commit 5f97041 into aws:main Nov 16, 2023
@solmonk solmonk mentioned this pull request Nov 20, 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.

2 participants