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

Rename internal/util/ssa util functions for better naming consistency #8396

Closed
ykakarap opened this issue Mar 28, 2023 · 5 comments · Fixed by #8423
Closed

Rename internal/util/ssa util functions for better naming consistency #8396

ykakarap opened this issue Mar 28, 2023 · 5 comments · Fixed by #8423
Assignees
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@ykakarap
Copy link
Contributor

Detailed Description:

Rename the following functions in the ssa package to have consistent naming scheme:

  • IsAllowedPath -> IsPathAllowed (Ref)
  • IsIgnorePath -> IsPathIgnored (Ref)
  • IsNotAllowed -> IsPathNotAllowed (Ref)

All the above functions are in internal/util/ssa package.

The comments on these functions should also be corrected. Example:
For IsAllowedPath the comment should be changed to // IsAllowedPath returns a functions that returns true when the Path is one of the AllowedPaths. (similarly for the other functions).

Additional Information:
We need to have an explicit IsPathNotAllowed and cannot simple use the negation of IsPathAllowed and ask used to use !IsPathAllowed() as both the functions return a filter function and there is no simple way to get to negation of the returned function.

/kind cleanup
/help

@k8s-ci-robot
Copy link
Contributor

@ykakarap:
This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-help command.

In response to this:

Detailed Description:

Rename the following functions in the ssa package to have consistent naming scheme:

  • IsAllowedPath -> IsPathAllowed (Ref)
  • IsIgnorePath -> IsPathIgnored (Ref)
  • IsNotAllowed -> IsPathNotAllowed (Ref)

All the above functions are in internal/util/ssa package.

The comments on these functions should also be corrected. Example:
For IsAllowedPath the comment should be changed to // IsAllowedPath returns a functions that returns true when the Path is one of the AllowedPaths. (similarly for the other functions).

Additional Information:
We need to have an explicit IsPathNotAllowed and cannot simple use the negation of IsPathAllowed and ask used to use !IsPathAllowed() as both the functions return a filter function and there is no simple way to get to negation of the returned function.

/kind cleanup
/help

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 28, 2023
@fabriziopandini
Copy link
Member

/triage accepted
/good-first-issue

@k8s-ci-robot
Copy link
Contributor

@fabriziopandini:
This request has been marked as suitable for new contributors.

Guidelines

Please ensure that the issue body includes answers to the following questions:

  • Why are we solving this issue?
  • To address this issue, are there any code changes? If there are code changes, what needs to be done in the code and what places can the assignee treat as reference points?
  • Does this issue have zero to low barrier of entry?
  • How can the assignee reach out to you for help?

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/triage accepted
/good-first-issue

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Mar 28, 2023
@cahillsf
Copy link
Member

hey @ykakarap 👋 I'd like to pick this one up

@killianmuldoon
Copy link
Contributor

/assign @cahillsf

Thanks!
(I think you should be able to assign yourself with a command like the above)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. help wanted Denotes an issue that needs help from a contributor. Must meet "help wanted" guidelines. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants