Skip to content

Fixed EventMesh subscription deletion when OAuth not initialized #17781

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 6 commits into from
Jul 4, 2023

Conversation

mfaizanse
Copy link
Member

@mfaizanse mfaizanse commented Jun 30, 2023

Description

Changes proposed in this pull request:

  • Fixed EventMesh subscription deletion when OAuth not initialized
  • Reference snapshots: link

Related issue(s)

@kyma-bot kyma-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 30, 2023
@netlify
Copy link

netlify bot commented Jun 30, 2023

Deploy Preview for kyma-project-docs-preview ready!

Name Link
🔨 Latest commit 6fb777c
🔍 Latest deploy log https://app.netlify.com/sites/kyma-project-docs-preview/deploys/64a2dc2fbbb45d00088320f2
😎 Deploy Preview https://deploy-preview-17781--kyma-project-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kyma-bot kyma-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jun 30, 2023
@mfaizanse
Copy link
Member Author

/test all

@kyma-bot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@mfaizanse mfaizanse linked an issue Jun 30, 2023 that may be closed by this pull request
1 task
@mfaizanse mfaizanse added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jun 30, 2023
@kyma-bot kyma-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jun 30, 2023
@mfaizanse
Copy link
Member Author

/test all

@mfaizanse
Copy link
Member Author

/test all

@mfaizanse
Copy link
Member Author

/test all

@mfaizanse
Copy link
Member Author

/test pre-main-kyma-gardener-gcp-eventing-upgrade

@mfaizanse
Copy link
Member Author

/test all

@mfaizanse
Copy link
Member Author

/test all

@mfaizanse mfaizanse marked this pull request as ready for review July 3, 2023 14:36
@mfaizanse mfaizanse requested a review from a team as a code owner July 3, 2023 14:36
@mfaizanse mfaizanse requested a review from grischperl July 3, 2023 14:36
@kyma-bot kyma-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 3, 2023
@mfaizanse mfaizanse removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 3, 2023
@marcobebway marcobebway requested review from marcobebway and removed request for grischperl July 4, 2023 07:52
@@ -1000,6 +1000,10 @@ func (r *Reconciler) getMutatingAndValidatingWebHookConfig(ctx context.Context)
return &mutatingWH, &validatingWH, nil
}

func (r *Reconciler) isOauth2CredentialsInitialized() bool {
return len(r.credentials.clientID) > 0 && len(r.credentials.clientSecret) > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to also check the tokenURL and certsURL?

Copy link
Contributor

Choose a reason for hiding this comment

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

Also please write a unit test for this function.

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure atm, that certsURL would be non-empty when oauth2 feature flag is disabled. Thats why I only checked the fields which are used in both cases (i.e. oauth2 feature flag enabled/disabled)

Copy link
Member Author

Choose a reason for hiding this comment

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

I will add unit test in the next PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please also check the tokenURL and certsURL (if possible) in the followup PR.

@kyma-bot kyma-bot added the lgtm Looks good to me! label Jul 4, 2023
@mfaizanse
Copy link
Member Author

/retest

@mfaizanse
Copy link
Member Author

/test pull-eventing-controller-lint

@kyma-bot kyma-bot merged commit 0f099ef into kyma-project:main Jul 4, 2023
pPrecel pushed a commit to pPrecel/kyma that referenced this pull request Jul 17, 2023
…a-project#17781)

* Fixed EventMesh subscription deletion when OAuth not initialized

* image bump

* added init

* updated tests
@k15r k15r added the area/eventing Issues or PRs related to eventing label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/eventing Issues or PRs related to eventing lgtm Looks good to me! size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix Eventing controller logic to detect secret changes
4 participants