-
Notifications
You must be signed in to change notification settings - Fork 266
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
Add oci url to the list of acceptable urls #12421
Conversation
@@ -1117,6 +1117,7 @@ describe('formRules', () => { | |||
const testCases = [ | |||
['', undefined], | |||
['https://github.com/rancher/fleet-examples.git', undefined], | |||
['oci://test.rancher.io/charts/mychart', undefined], |
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.
can this be expanded to cover all types defined in https://ranchermanager.docs.rancher.com/v2.9/how-to-guides/new-user-guides/helm-charts-in-rancher/oci-repositories#add-an-oci-based-helm-chart-repository
@@ -1117,6 +1117,7 @@ describe('formRules', () => { | |||
const testCases = [ | |||
['', undefined], | |||
['https://github.com/rancher/fleet-examples.git', undefined], | |||
['oci://test.rancher.io/charts/mychart', undefined], |
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.
can this be expanded to cover more url types? the regex has me scared
@@ -458,7 +458,7 @@ export default function(t: Translation, { key = 'Value' }: ValidationOptions): { | |||
return runValidators(val, [startHyphen('label'), endHyphen('label'), startDot('label'), endDot('label'), required]); | |||
}; | |||
|
|||
const repo: Validator = (val) => val && !/((git|ssh|http(s)?)|(git@[\w\.]+))(\:(\/\/)?)([\w\.@\:/\-~]+)(\.git)?(\/)?/.test(val) ? t('validation.setting.repo') : undefined; | |||
const repo: Validator = (val) => val && !/((git|ssh|oci|http(s)?)|(git@[\w\.]+))(\:(\/\/)?)([\w\.@\:/\-~]+)(\.git)?(\/)?/.test(val) ? t('validation.setting.repo') : undefined; |
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.
Tan made a good point in slack, fleet doesn't support oci for their git repo's (helm repos though do)
@richard-cox based on the decision to remove the repo validation for now, I'll close this PR |
Summary
contributes to #12204
Occurred changes and/or fixed issues
Technical notes summary
Areas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
Checklist