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

CLOUDP-239182: Ensure teams are always cleaned up #1481

Merged
merged 19 commits into from
Apr 11, 2024

Conversation

igor-karpukhin
Copy link
Collaborator

@igor-karpukhin igor-karpukhin commented Mar 28, 2024

All Submissions:

Ensure teams are always cleaned up

  • Have you signed our CLA?
  • Put closes #XXXX in your comment to auto-close the issue that your PR fixes (if there is one).
  • Update docs/release-notes/release-notes.md if your changes should be included in the release notes for the next release.

@igor-karpukhin igor-karpukhin requested a review from helderjs March 28, 2024 17:02
@igor-karpukhin igor-karpukhin added the cloud-tests Run expensive Cloud Tests: Integration & E2E label Mar 28, 2024
Copy link
Contributor

github-actions bot commented Apr 1, 2024

pkg/controller/atlasproject/teams.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/teams.go Outdated Show resolved Hide resolved
@igor-karpukhin igor-karpukhin marked this pull request as ready for review April 3, 2024 14:44
@igor-karpukhin igor-karpukhin force-pushed the CLOUDP-239182/teams-cleanup branch from 0d2baba to 07bf2e7 Compare April 3, 2024 19:29
pkg/api/v1/status/team.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

Looks great, just a couple of comments 👍

pkg/controller/atlasproject/atlasproject_controller.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/atlasproject_controller.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/teams.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/teams.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/teams.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/teams_test.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/teams_test.go Outdated Show resolved Hide resolved
@igor-karpukhin igor-karpukhin force-pushed the CLOUDP-239182/teams-cleanup branch from 89cc744 to f5eac7d Compare April 9, 2024 07:34
@igor-karpukhin igor-karpukhin force-pushed the CLOUDP-239182/teams-cleanup branch from f5eac7d to eac68a7 Compare April 9, 2024 07:35
pkg/controller/atlasproject/atlasproject_controller.go Outdated Show resolved Hide resolved
pkg/controller/atlasproject/teams.go Outdated Show resolved Hide resolved
@igor-karpukhin
Copy link
Collaborator Author

@helderjs please take a look when you have time. I moved changed the logic as we agreed

Copy link
Collaborator

@helderjs helderjs left a comment

Choose a reason for hiding this comment

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

LGTM, just a last comment

pkg/controller/atlasproject/atlasproject_controller.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

LGTM given @helderjs's comments are addressed 👍

Copy link
Collaborator

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

One last nit and a missing unit test.

pkg/controller/atlasproject/atlasproject_controller.go Outdated Show resolved Hide resolved
@s-urbaniak
Copy link
Collaborator

s-urbaniak commented Apr 11, 2024

@igor-karpukhin This contribution adds a unit test for updateTeamState, however the handleDeletion function in AtlasProjectReconciler has been changed here but is not tested at all. Please add a unit test covering the finalizer case which invokes the added syncAssignedTeams handling.

@igor-karpukhin
Copy link
Collaborator Author

@igor-karpukhin This contribution adds a unit test for updateTeamState, however the handleDeletion function in AtlasProjectReconciler has been changed here but is not tested at all. Please add a unit test covering the finalizer case which invokes the added syncAssignedTeams handling.

The new unit-test added for testing the team removal logic when an AtlasProject is removed

Copy link
Collaborator

@s-urbaniak s-urbaniak left a comment

Choose a reason for hiding this comment

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

@igor-karpukhin please assert the returned result from handleDeletion. Looking at the coverage profile, the zero value is returned and not an explicit OK().

@igor-karpukhin igor-karpukhin merged commit d9963bc into main Apr 11, 2024
47 checks passed
@roothorp roothorp deleted the CLOUDP-239182/teams-cleanup branch September 26, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cloud-tests Run expensive Cloud Tests: Integration & E2E
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants