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

USHIFT-1225: Remove backups for no longer existing deploys #2049

Conversation

pmtk
Copy link
Member

@pmtk pmtk commented Jul 12, 2023

/cc
/hold

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 12, 2023
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 12, 2023

@pmtk: This pull request references USHIFT-1225 which is a valid jira issue.

In response to this:

/cc
/hold

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 12, 2023
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 12, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 12, 2023

@pmtk: GitHub didn't allow me to request PR reviews from the following users: pmtk.

Note that only openshift members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc
/hold

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@pmtk pmtk changed the title WIP USHIFT-1225: Remove backups for non existent deploys WIP USHIFT-1225: Remove backups for no longer existing deploys Jul 12, 2023
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 12, 2023
@pmtk pmtk force-pushed the 1225-remove-backups-for-non-existent-deploys branch 3 times, most recently from 873d7ba to 453bef8 Compare July 13, 2023 13:24
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 13, 2023
@pmtk pmtk changed the title WIP USHIFT-1225: Remove backups for no longer existing deploys USHIFT-1225: Remove backups for no longer existing deploys Jul 13, 2023
@pmtk
Copy link
Member Author

pmtk commented Jul 13, 2023

/unhold

@pmtk
Copy link
Member Author

pmtk commented Jul 13, 2023

/cc @dhellmann @eggfoobar

@openshift-ci openshift-ci bot removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 13, 2023
// and returns a list of backups that do not belong to any of these deployments
func (bs Backups) getDangling(deploymentIDs []string) Backups {
backupsToRemove := []data.BackupName{}
sansDeploy := []data.BackupName{}
Copy link
Contributor

Choose a reason for hiding this comment

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

What do you think of changing this to unknownDeployments

Copy link
Member Author

Choose a reason for hiding this comment

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

done


if len(sansDeploy) > 0 {
// Expecting to be "4.13"
klog.InfoS("Found backups not belonging to any deployment - they need to deleted manually", "backups", sansDeploy)
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit:

they need to deleted manually > they need to be deleted manually

Copy link
Member Author

Choose a reason for hiding this comment

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

done

return backups, nil
}

func (bs Backups) filter(pred func(data.BackupName) bool) Backups {
Copy link
Contributor

Choose a reason for hiding this comment

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

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 actually intended to do other way round: remove the one from FDO PR; have this as a new impl

@pmtk pmtk force-pushed the 1225-remove-backups-for-non-existent-deploys branch from 453bef8 to c937953 Compare July 13, 2023 15:55
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 13, 2023
@pmtk pmtk force-pushed the 1225-remove-backups-for-non-existent-deploys branch from c937953 to cfd29a7 Compare July 14, 2023 10:43
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 14, 2023
@pmtk
Copy link
Member Author

pmtk commented Jul 14, 2023

/hold

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 14, 2023
@pmtk pmtk force-pushed the 1225-remove-backups-for-non-existent-deploys branch from cfd29a7 to 418e968 Compare July 14, 2023 11:06
@pmtk
Copy link
Member Author

pmtk commented Jul 14, 2023

/unhold

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 14, 2023
@eggfoobar
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 14, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eggfoobar, pmtk

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 14, 2023

@pmtk: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-openshift-conformance-reduced-arm 418e968 link false /test e2e-openshift-conformance-reduced-arm

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 02271b8 into openshift:main Jul 14, 2023
7 of 8 checks passed
@pmtk pmtk deleted the 1225-remove-backups-for-non-existent-deploys branch July 17, 2023 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants