Skip to content

Correctly handle watchNamespace flag parsing errors #493

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

Merged
merged 1 commit into from
Jan 20, 2024

Conversation

a-hilaly
Copy link
Member

@a-hilaly a-hilaly commented Jan 20, 2024

Previously, we shipped a feature (d3b23cd) where multi-namespace watch
mode was supported. It turns out that the logic was completely flipped.
We need to assign namespace when the error is NIL and not vice versa. If
the error is NOT NIL, we need to block the controller initiation and
throw an error.

How did we catch this? Nothing special, just reviewing the generated
code and asking who on earth wrote that (me).

This indeed urges us to do proper CARM/multi-namespace/cross-region
testing and write some e2e tests that we can catch these issue very early on ...
When the code-generator PRs are drafted.

The current infra doesn't allow us to that, so we'll hack something
around next week.

Signed-off-by: Amine Hilaly [email protected]

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

@ack-prow ack-prow bot requested review from jlbutler and jljaco January 20, 2024 04:04
@ack-prow ack-prow bot added the approved label Jan 20, 2024
Previously, we shipped a feature (d3b23cd) where multi-namespace watch
mode was supported. It turns out that the logic was completely flipped.
We need to assign namespace when the error is NIL and not vice versa. If
the error is NOT NIL, we need to block the controller initiation and
throw an error.

How did we catch this? Nothing special, just reviewing the generated
code and asking who on earth wrote that.

This indeed urges us to do proper CARM/multi-namespace/cross-region
testing and write some e2e tests that we can catch very early on. When
code-generator PRs are drafted.

The current infra doesn't allow us to that, so we'll hack something
around next week.

Signed-off-by: Amine Hilaly <[email protected]>
@ack-bot
Copy link
Collaborator

ack-bot commented Jan 20, 2024

/lgtm

@ack-prow ack-prow bot added the lgtm Indicates that a PR is ready to be merged. label Jan 20, 2024
Copy link

ack-prow bot commented Jan 20, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: a-hilaly, ack-bot

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@a-hilaly
Copy link
Member Author

/retest

1 similar comment
@a-hilaly
Copy link
Member Author

/retest

@ack-prow ack-prow bot merged commit 3667d16 into aws-controllers-k8s:main Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants