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

feat: jobs check enhancement #162

Closed
wants to merge 5 commits into from
Closed

feat: jobs check enhancement #162

wants to merge 5 commits into from

Conversation

acelebanski
Copy link
Contributor

Description

I modified the method check_non_finished_jobs in CheckFirewall class and renamed it to check_jobs. Now it allows to pass some parameters (job_type, job_status, job_result) to the method and now we can query any of those 3 keys values.

So we can not only check whether the status is FIN but also if the type is Commit or the result is OK (or any different combination). Default parameters check only for status of FIN, so method's default behaviour remains the same.

Motivation and Context

#161

How Has This Been Tested?

Unit tests within the repo.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

@acelebanski acelebanski linked an issue Mar 6, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Mar 6, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  panos_upgrade_assurance
  check_firewall.py 1072-1074, 1091
Project Total  

This report was generated by python-coverage-comment-action

Copy link

github-actions bot commented Mar 6, 2024

A Preview PR in PanDev repo has been created. You can view it here.

@acelebanski
Copy link
Contributor Author

We figured out that original check_non_finished_jobs method actually does the job (we don't have to check the result for PEND value because that equals to status other than FIN).

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.

Enhancement of JOBS check
1 participant