AAP-55575 Dynamic Manual Execution Time #161
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces logic to automatically calculate and set the manual execution time for a
JobTemplatewhen no jobs exist for that template. It also adds corresponding tests and a fixture to support this new behavior. The main changes are grouped into enhancements to the parser logic and updates to the test suite.Enhancements to parser logic:
DataParser.job_templateto calculate and settime_taken_manually_execute_minutesbased on theelapsedfield when no jobs exist for the template, using rounding and boundary checks. (src/backend/apps/clusters/parser.py, src/backend/apps/clusters/parser.pyL63-R84)decimalmodule andsettingsto support the new calculation and configuration. (src/backend/apps/clusters/parser.py, src/backend/apps/clusters/parser.pyR1-R4)Test suite updates:
cluster_sync_data_elapsedto provide test data with anelapsedvalue for testing the manual execution time calculation. (src/backend/tests/conftest.py, src/backend/tests/conftest.pyR535-R548)test_job_template_calculate_manual_execution_timeto verify that the manual execution time is correctly calculated and set on theJobTemplate. (src/backend/tests/unit/test_parser.py, src/backend/tests/unit/test_parser.pyR256-R261)