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

Syncing latest changes from upstream main for ramen #436

Merged
merged 6 commits into from
Jan 14, 2025
Merged

Conversation

df-build-team
Copy link

PR containing the latest commits from upstream main branch

nirs and others added 6 commits January 13, 2025 10:04
Found by Zed typos extension. Not sure when these were introduced, but
my editor started to complains about them now.

Signed-off-by: Nir Soffer <[email protected]>
- uncomplete -> incomplete
- plcement -> placement
- exptected -> expected

There were many instances of the same typos since lot of tests code is
duplicated.

Signed-off-by: Nir Soffer <[email protected]>
In processForDeletion, we cleanup the resources that are related to
volsync. It relies on v.volSyncPVCs but the list is empty when the vrg
is secondary because it is populated by looking at the
vrg.status.ProtectedPVCs.

For managed applications, the RD,RS and Snapshots were being as a
consequence of the deletion of VRG as the VRG is the owner for them.

In the case of discovered apps, the vrg is not the owner and therefore
the RD was being left behind.

Co-Authored-by: Annaraya Narasagond <[email protected]>
Signed-off-by: Raghavendra Talur <[email protected]>
Co-Authored-by: Annaraya Narasagond <[email protected]>
Signed-off-by: Raghavendra Talur <[email protected]>
if-return has been removed from the default list of revive for a valid
reason. See the argument in mgechev/revive#843.

Comparing two snippets

1.
```
if err := v.volSyncHandler.DeleteRS(name, namespace); err != nil {
	return err
}

if err := v.volSyncHandler.DeleteRD(name, namespace); err != nil {
	return err
}

if err := v.volSyncHandler.DeleteSnapshots(namespace); err != nil {
	return err
}

return nil
```

2.
```
if err := v.volSyncHandler.DeleteRS(name, namespace); err != nil {
	return err
}

if err := v.volSyncHandler.DeleteRD(name, namespace); err != nil {
	return err
}

return v.volSyncHandler.DeleteSnapshots(namespace)
```

1 is a lot easier to read compared to 2 but if-return throws an error
for it.

Signed-off-by: Raghavendra Talur <[email protected]>
Signed-off-by: Raghavendra Talur <[email protected]>
@df-build-team df-build-team requested a review from a team January 14, 2025 08:06
Copy link

openshift-ci bot commented Jan 14, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: df-build-team

The full list of commands accepted by this bot can be found 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

@ShyamsundarR ShyamsundarR merged commit 260dad9 into main Jan 14, 2025
41 of 43 checks passed
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.

4 participants