-
Notifications
You must be signed in to change notification settings - Fork 179
feat: allow single-label hostnames in ValidateURL and improve performance #880
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
Open
Yashbhu
wants to merge
26
commits into
goharbor:main
Choose a base branch
from
Yashbhu:urlvalidationissue
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
760245f
feat: allow single-label hostnames in ValidateURL and improve perform…
Yashbhu 0c24c83
docs: update ValidateURL comment to reflect RFC 1123 support
Yashbhu bfb27e1
fix(utils): move domainNameRegex inside ValidateURL
Yashbhu 3b3780c
fix(api): use direct logrus import to avoid undefined log error in CI
Yashbhu 3e1fcb2
refactor(api): use fmt for user-facing output in instance_handler
Yashbhu 6a2f3ae
fix(api): add missing log import in instance_handler
Yashbhu 8ff6456
fix(api): remove logrus and failing log call in instance_handler
Yashbhu 0b383b7
fix(api): parse RegistryID if provided in CreateProject
Yashbhu d58f57d
fix(api): implement registry-id parsing fix only
Yashbhu c591034
fix(api): restrict registry-id parsing to proxy cache projects
Yashbhu 988dc04
revert: project_handler changes and restore log usage
Yashbhu 15973e1
style: use fmt for project handler success messages
Yashbhu 0184adf
fix: resolve linting issues and optimize regex compilation
Yashbhu ab17131
docs: add missing comments to exported validation functions
Yashbhu c7a93b9
fix: resolve linting issues in utils.go
Yashbhu 7919a0a
fix: resolve compilation errors and formatting issues
Yashbhu 9953f4a
fix: switch to fmt for logging in instance_handler to resolve CI error
Yashbhu 20a05de
refactor: move regex back into functions to match project style
Yashbhu cbe2c7d
fix: allow single-label hostnames in ValidateURL and resolve linting …
Yashbhu 9dc2e8b
fix: allow single-label hostnames in ValidateURL and restore original…
Yashbhu 5d50c3e
chore: remove unnecessary documentation comments
Yashbhu e247462
chore: remove irrelevant storage limit comment
Yashbhu a764186
fix: allow single-label hostnames in ValidateURL and restore original…
Yashbhu 46daf60
fix: allow single-label hostnames in ValidateURL and restore original…
Yashbhu 149048f
fix: use logrus directly to resolve CI unused import error
Yashbhu 3ad9e11
fix: use fmt.Printf to resolve persistent CI unused import error
Yashbhu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know why are you moving removing the var from here - just to declare above the function.
That doesnt make sense - is there any specific reason to do this.
thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the only reason to move it outside i thought of is to avoid the overhead of re-compiling the regex on every call
though you are right to address it that in a CLI it's not much needed and rather clean code setup should be much prioritized i've reverted this
thanks !