-
Notifications
You must be signed in to change notification settings - Fork 29
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
Develop: Rebase for OCP resource cleanup on AWS #137
base: develop
Are you sure you want to change the base?
Conversation
30d9792
to
efbdc4f
Compare
awscleanup.ocps.cleanup() | ||
if is_dry_run: | ||
echo_dry(dry_data) | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not want to use else
since the cleanup can be set to execute OCPs and other resources as well (or use kwargs["_all"]
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see a scenario where OCPs and other resources in the list would be called at the same time for cleanup. ?
If yes, we should rather say ocp-clusters
to be more specific, so it would look like a resource type within AWS provider.
I thought it is good to keep OCP cluster cleanup separate from other resources cleanup as cluster cleanup will anyways cleanup what it suppose to.
Thoughts ?
if is_dry_run: | ||
echo_dry(dry_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following the last comment, since the cleanup can be executed on multiple resources (OCPs and others), I think the if is_dry_run:
component should be outside both sections and appear once only, post all resources cleanup executions.
if is_dry_run: | |
echo_dry(dry_data) | |
if is_dry_run: | |
echo_dry(dry_data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dry run printing here is per region basis hence having it within a loop makes sense.
If we make it at the end of loop it will only print resources from the last region only as a buggy behavior .
Will take a look on the comments tomorrow in brief but did you see any logical failures via static check or execution ? |
Edit: links in this comment breaked due to force push Other than the "else" I noted (will break any cleanup contains with both OCPs and other types of AWS resources); The only thing I suscpected is here, needs to be approachable in any case. I thought it maybe should be |
@oharan2 We will make the dry run and in general reporting improvements as a next goal. But for now we should be good to go. Also could you find the time to validate this code on actual cleanup ? |
ac3c7a9
to
a892bfb
Compare
The new |
cff4a1e
to
19f9c94
Compare
19f9c94
to
f792de6
Compare
@oharan2 I have now fixed it and the OCP reporting in HTML would look something like this: |
Rebasing #134 with Develop branch.