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

Add oci url to the list of acceptable urls #12421

Closed
wants to merge 1 commit into from

Conversation

momesgin
Copy link
Member

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

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@momesgin momesgin self-assigned this Oct 30, 2024
@@ -1117,6 +1117,7 @@ describe('formRules', () => {
const testCases = [
['', undefined],
['https://github.com/rancher/fleet-examples.git', undefined],
['oci://test.rancher.io/charts/mychart', undefined],
Copy link
Member

Choose a reason for hiding this comment

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

@@ -1117,6 +1117,7 @@ describe('formRules', () => {
const testCases = [
['', undefined],
['https://github.com/rancher/fleet-examples.git', undefined],
['oci://test.rancher.io/charts/mychart', undefined],
Copy link
Member

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;
Copy link
Member

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)

@momesgin
Copy link
Member Author

@richard-cox based on the decision to remove the repo validation for now, I'll close this PR

@momesgin momesgin closed this Oct 30, 2024
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