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

[kjobctl][builder] Detect surplus flags #2534

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

trasc
Copy link
Contributor

@trasc trasc commented Jul 4, 2024

What type of PR is this?

/kind feature

What this PR does / why we need it:

Detect unnecessary profile flags provided.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

None

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jul 4, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: trasc

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

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jul 4, 2024
Copy link

netlify bot commented Jul 4, 2024

Deploy Preview for kubernetes-sigs-kueue canceled.

Name Link
🔨 Latest commit 1a41128
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-sigs-kueue/deploys/66868c7c8c5bc20008c7ec1a

@trasc
Copy link
Contributor Author

trasc commented Jul 4, 2024

/cc @mwielgus @IrvingMg @mbobrovskyi

return noCompletionsSpecifiedErr
}
missing := requiredSet.Difference(providedSet)
extra := providedSet.Difference(requiredSet)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this is correct. We should allow all flags to be applied, but only if it's possible to add to this profile. So we need to know all possible flags on each builder or template.

For example, PodTemplate don't have parallelism. So we can't use this flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the profile is the place where the admin will configure the needed flags we should use that list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's correct for required fields. But what about optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have the concept of "optional flag"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we might. Some values might be prepopulated in the template. While currently most of the flags are required, we may soon add additional ones like image name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When there is the case we can think of adding the API support for that kind of flag, for now I think that hard-coding a list of flags that are usable or not for interactive and job is not the way to go.

@alculquicondor
Copy link
Contributor

/assign @mwielgus

@alculquicondor
Copy link
Contributor

cc @pajakd

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants