Skip to content

Remove redundant code and simplify input parsing during HTTPTrigger creation #2990

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

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

elastic17
Copy link
Contributor

@elastic17 elastic17 commented Aug 14, 2024

Description

1、Even if the user does not set the flagkey. HtMethod field, there will still be a default value GET, so the following judgment logic is currently redundant. Personally, I think it is more appropriate to replace the return error with a log prompt or delete it.
image

image
image

2、Both createIngress and host are only used for parsing user input and do not perform any other operations. They can be directly parsed during the construction of the HTTPTrigger CR.
image

3、The parsing of the KeepPrefix field below is redundant
image

Which issue(s) this PR fixes:

Fixes #

Testing

Checklist:

  • I ran tests as well as code linting locally to verify my changes.
  • I have done manual verification of my changes, changes working as expected.
  • I have added new tests to cover my changes.
  • My changes follow contributing guidelines of Fission.
  • I have signed all of my commits.

@sanketsudake sanketsudake merged commit 7203cbf into fission:main Aug 14, 2024
9 checks passed
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.

2 participants