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

HostMetrics: Hard auto-cleanup #14255

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

slemrmartin
Copy link
Contributor

SUMMARY

Extends

for deleting of HostMetric rows which were soft-deleted 3+ years ago and wasn't reused for automation.

https://issues.redhat.com/browse/AA-1592

ISSUE TYPE
  • New or Enhanced Feature
COMPONENT NAME
  • CLI
  • Scheduler
AWX VERSION
awx: 22.5.1.dev10+g4b53bd1352.d20230718
ADDITIONAL INFORMATION

It's part of ADR0017 - will be backported


@slemrmartin slemrmartin force-pushed the host-metrics-cleanup branch 2 times, most recently from 4a7df3f to ec8d34d Compare July 18, 2023 14:40
@slemrmartin
Copy link
Contributor Author

@AlanCoding ready for review.
Needs to be backported to 2.4

@slemrmartin slemrmartin force-pushed the host-metrics-cleanup branch 4 times, most recently from 09d541d to 5be38d0 Compare August 9, 2023 07:33
@slemrmartin slemrmartin closed this Aug 9, 2023
@slemrmartin slemrmartin reopened this Aug 9, 2023
@slemrmartin slemrmartin force-pushed the host-metrics-cleanup branch from 5be38d0 to ca42f38 Compare August 14, 2023 08:00
- - updates columns delete, deleted_counter and last_deleted
- hard cleanup
- - Permanently erase from the database all host metrics last automated 36 months ago or before.
This operation happens after the soft deletion has finished.
"""
Copy link
Member

Choose a reason for hiding this comment

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

What if you tried assigning this docstring to a help variable as in the Django docs?

https://docs.djangoproject.com/en/4.2/howto/custom-management-commands/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@AlanCoding we discussed that previously. The help variable is here below docstring and should be one-liner.
It's not supposed to be long description like the docstring (also according to the doc you posted ^)

@slemrmartin slemrmartin force-pushed the host-metrics-cleanup branch from c8e5fcc to 112bb15 Compare August 29, 2023 09:27
@slemrmartin slemrmartin force-pushed the host-metrics-cleanup branch from 112bb15 to f606e7c Compare August 29, 2023 09:37
@RedOrNot
Copy link

QA Approved!
manual testing pass

@AlanCoding AlanCoding merged commit 660dab4 into ansible:devel Aug 30, 2023
@slemrmartin slemrmartin deleted the host-metrics-cleanup branch August 31, 2023 09:04
djyasin pushed a commit to djyasin/awx that referenced this pull request Sep 16, 2024
Fix host metric settings

Cleanup_host_metric command with default params

Fix order of host metric cleanups
djyasin pushed a commit to djyasin/awx that referenced this pull request Nov 11, 2024
Fix host metric settings

Cleanup_host_metric command with default params

Fix order of host metric cleanups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants