Skip to content

Conversation

@kcagran
Copy link
Contributor

@kcagran kcagran commented Oct 29, 2025

This pull request introduces logic to automatically calculate and set the manual execution time for a JobTemplate when 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:

  • Added logic in DataParser.job_template to calculate and set time_taken_manually_execute_minutes based on the elapsed field 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)
  • Imported the decimal module and settings to support the new calculation and configuration. (src/backend/apps/clusters/parser.py, src/backend/apps/clusters/parser.pyR1-R4)

Test suite updates:

  • Added a new fixture cluster_sync_data_elapsed to provide test data with an elapsed value for testing the manual execution time calculation. (src/backend/tests/conftest.py, src/backend/tests/conftest.pyR535-R548)
  • Added a unit test test_job_template_calculate_manual_execution_time to verify that the manual execution time is correctly calculated and set on the JobTemplate. (src/backend/tests/unit/test_parser.py, src/backend/tests/unit/test_parser.pyR256-R261)

@kcagran kcagran requested a review from abwalczyk October 29, 2025 09:54
@kcagran kcagran self-assigned this Oct 29, 2025
@kcagran kcagran changed the title Dynamic Manual Execution Time AAP-55575 Dynamic Manual Execution Time Oct 29, 2025
@github-actions
Copy link

github-actions bot commented Oct 29, 2025

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
4919 3769 77% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/backend/apps/clusters/parser.py 84% 🟢
src/backend/tests/conftest.py 98% 🟢
src/backend/tests/unit/test_parser.py 100% 🟢
TOTAL 94% 🟢

updated for commit: 9f1c2d6 by action🐍

@kcagran kcagran force-pushed the dynamic_manual_execution_time branch from 8ed9a41 to e420866 Compare October 30, 2025 05:45
@kcagran kcagran requested a review from pmflanagan November 5, 2025 04:39
@kcagran kcagran force-pushed the dynamic_manual_execution_time branch from e420866 to fd41363 Compare November 5, 2025 04:58
@kcagran kcagran force-pushed the dynamic_manual_execution_time branch from fd41363 to 9f1c2d6 Compare November 6, 2025 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant