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

[6.15.z] New API endpoint for bulk/refresh all ACSs #1090

Conversation

Satellite-QE
Copy link
Contributor

Cherrypick of PR: #1086

Description of addition

Functional demonstration

[SETUP] Multiple ACSs created and refreshed once, then ...

[IN] (Pdb) module_target_sat.api.AlternateContentSource().bulk_refresh_all()

[OUT] {'id': '39c86797-e657-491a-aa8d-a5b3f4d38727', 'label': 'Actions::BulkAction', 'pending': False, 
'action': 'Refresh Alternate Content Source refresh alternate content source; ...', 'username': 'admin', 
'started_at': '2024-01-31 19:27:06 UTC', 'ended_at': '2024-01-31 19:27:38 UTC', 'duration': '32.910878', 
'state': 'stopped', 'result': 'success', 'progress': 1.0, 'input': {'action_class': 'Actions::Katello::AlternateContentSource::Refresh', 'target_ids': [1, 2, 3, 4, 5, 6, 7], 'target_class': 
'Katello::AlternateContentSource', 'args': [], 'kwargs': {}, 'current_request_id': '4cb592d7-a0a1-4532-8c4b-b8b1d4c7f52b', 
'current_timezone': 'UTC', 'current_organization_id': None, 'current_location_id': None, 'current_user_id': 4, 
'dynflow': {}}, 'output': {'planned_count': 7, 'cancelled_count': 0, 'total_count': 7, 'failed_count': 0, 
'pending_count': 0, 'success_count': 7}, 'humanized': {'action': 'Refresh Alternate Content Source', 
'input': ['refresh alternate content source', '...'], 'output': '7 task(s), 7 success, 0 fail', 'errors': []}, 
'cli_example': None, 'start_at': '2024-01-31 19:27:06 UTC', 'available_actions': {'cancellable': False, 'resumable': False}}      

Refreshed ACSs:

image

Tasks found:

image

BulkAction main task (the Action Name is long):

BulkAction Task Name is just "Refresh Alternate Content Source refresh alternate content source refresh alternate ... "
A long string of the subtask(s) names appended to each other.
image

BulkAction sub-tasks:

image

cover new endpoint in test_entities.py

(cherry picked from commit 68976fe)
@Satellite-QE Satellite-QE added 6.15.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches labels Feb 20, 2024
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

❗ No coverage uploaded for pull request base (6.15.z@949e877). Click here to learn what that means.

Files Patch % Lines
nailgun/entities.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             6.15.z    #1090   +/-   ##
=========================================
  Coverage          ?   92.03%           
=========================================
  Files             ?        6           
  Lines             ?     3052           
  Branches          ?        0           
=========================================
  Hits              ?     2809           
  Misses            ?      243           
  Partials          ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Gauravtalreja1 Gauravtalreja1 merged commit fe7d468 into 6.15.z Feb 21, 2024
20 checks passed
@Gauravtalreja1 Gauravtalreja1 deleted the cherry-pick-6.15.z-68976fe110ba7cee9ee9f5322d6aa80a078ad737 branch February 21, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.15.z Auto_Cherry_Picked GHA has automatically cherrypicked this PR No-CherryPick PR doesnt need CherryPick to previous branches
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants