Skip to content

[SREP-974] feat: Add parameter parsing capability for create managedjob and testjob#731

Merged
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
MateSaary:srep-974-managed-scripts-var-parsing
Jul 17, 2025
Merged

[SREP-974] feat: Add parameter parsing capability for create managedjob and testjob#731
openshift-merge-bot[bot] merged 1 commit intoopenshift:mainfrom
MateSaary:srep-974-managed-scripts-var-parsing

Conversation

@MateSaary
Copy link
Member

@MateSaary MateSaary commented Jul 16, 2025

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please double-check both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 16, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 16, 2025

@MateSaary: This pull request references SREP-974 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please ensure both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

1 similar comment
@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 16, 2025

@MateSaary: This pull request references SREP-974 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please ensure both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 16, 2025

@MateSaary: This pull request references SREP-974 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please double-check both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from a7vicky and wanghaoran1988 July 16, 2025 13:54
@codecov-commenter
Copy link

codecov-commenter commented Jul 16, 2025

Codecov Report

Attention: Patch coverage is 73.58491% with 14 lines in your changes missing coverage. Please review.

Project coverage is 51.74%. Comparing base (9fa4165) to head (3af9b2e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
cmd/ocm-backplane/managedJob/createManagedJob.go 66.66% 7 Missing and 5 partials ⚠️
cmd/ocm-backplane/testJob/createTestJob.go 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #731      +/-   ##
==========================================
+ Coverage   51.56%   51.74%   +0.18%     
==========================================
  Files          80       80              
  Lines        5894     5945      +51     
==========================================
+ Hits         3039     3076      +37     
- Misses       2443     2451       +8     
- Partials      412      418       +6     
Files with missing lines Coverage Δ
cmd/ocm-backplane/testJob/createTestJob.go 74.47% <88.23%> (+1.03%) ⬆️
cmd/ocm-backplane/managedJob/createManagedJob.go 67.47% <66.66%> (-0.18%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@MateSaary MateSaary force-pushed the srep-974-managed-scripts-var-parsing branch from 79b8279 to 3af9b2e Compare July 17, 2025 01:04
@MateSaary
Copy link
Member Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 17, 2025

@MateSaary: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 17, 2025

@MateSaary: This pull request references SREP-974 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please double-check both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 17, 2025

@MateSaary: This pull request references SREP-974 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please double-check both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Jul 17, 2025

@MateSaary: This pull request references SREP-974 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.20.0" version, but no target version was set.

Details

In response to this:

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please double-check both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@feichashao feichashao changed the title SREP-974: Add parameter parsing capability for create managedjob and testjob [SREP-974] feat: Add parameter parsing capability for create managedjob and testjob Jul 17, 2025
@openshift-ci-robot openshift-ci-robot removed the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 17, 2025
@openshift-ci-robot
Copy link

@MateSaary: No Jira issue is referenced in the title of this pull request.
To reference a jira issue, add 'XYZ-NNN:' to the title of this pull request and request another refresh with /jira refresh.

Details

In response to this:

What type of PR is this?

  • fix (Bug Fix)
  • feat (New Feature)
  • docs (Documentation)
  • test (Test Coverage)
  • chore (Clean Up / Maintenance Tasks)
  • other (Anything that doesn't fit the above)

What this PR does / Why we need it?

This PR enables the managedjob (and testjob) create commands to pre-check the validity of parameters provided to the script. This improves the user experience as the job will no longer be created and subsequently fail. The user is instead informed of the invalid parameters upfront.

Which Jira/Github issue(s) does this PR fix?

SREP-974 (Partial, alongside a subsequent PR in managed-scripts)

Special notes for your reviewer

Please double-check both commands work locally as expected, ideally trying several script & parameter combinations.

Unit Test Coverage

Guidelines

  • If it's a new sub-command or new function to an existing sub-command, please cover at least 50% of the code
  • If it's a bug fix for an existing sub-command, please cover 70% of the code

Test coverage checks

  • Added unit tests
  • Created jira card to add unit test
  • This PR may not need unit tests

Pre-checks (if applicable)

  • Ran unit tests locally
  • Validated the changes in a cluster
  • Included documentation changes with PR
  • Backward compatible

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@feichashao
Copy link
Contributor

/label tide/merge-method-squash
/lgtm
/approve

@openshift-ci openshift-ci bot added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Jul 17, 2025
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 17, 2025
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jul 17, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: feichashao, MateSaary

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 17, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit e96b89a into openshift:main Jul 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants