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

Match Harvester community repo check via regex #13206

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

torchiaf
Copy link
Member

@torchiaf torchiaf commented Jan 24, 2025

Summary

Contributes to #13199

Occurred changes and/or fixed issues

Technical notes summary

  • Non-Prime users will use the community repository when manually installing Harvester. We are adding some Regex strings to match the Harvester community repository url, so that it can be one of:

    • https://github.com/harvester/harvester-ui-extension
    • https://github.com/harvester/harvester-ui-extension/
    • https://github.com/{forker-repository}/harvester-ui-extension
    • https://github.com/{forker-repository}/harvester-ui-extension/
    • https://harvester.github.io/harvester-ui-extension
  • Prime users will always use https://github.com/rancher/ui-plugin-charts, so nothing to do for this case.

Areas or cases that should be tested

Instead of installing Harvester extension from Virtualization Management Page -> Install button, manually add the Harvester repository from 'Repositories' page and install Harvester from 'Extensions' page, see issue's description or steps below.

  • Add Harvester repository using one of url/branch below:

    • https://github.com/harvester/harvester-ui-extension - gh-pages
    • https://github.com/harvester/harvester-ui-extension/ - gh-pages
    • https://github.com/{forker-repository}/harvester-ui-extension - gh-pages
    • https://github.com/{forker-repository}/harvester-ui-extension/ - gh-pages
    • https://harvester.github.io/harvester-ui-extension - no branch, this is the GitHub deployment Url

    image

  • Install Harvester

    image

  • Verify that Virtualization Management page doesn't show Missing Repository error

Areas which could experience regressions

  • Install and Update Button

    • To test Harvester Install button using a fresh Rancher instance -> Go to Virtualization Management page and click on Install button

    image

    • To test Harvester Update button -> Rollback the version installed in the previous step and click on Update button in Virt page.

    image

    image

    • To test Missing Repo -> Remove the Harvester Repository from 'Repositories' page (but keep the Harvester extension installed) and check if Virt. Page shows the Missing Repo error -> click 'Update' to import the repository again and verify that it is added again on Rancher.

    image

    image

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

@torchiaf torchiaf added this to the v2.11.0 milestone Jan 24, 2025
@torchiaf torchiaf requested a review from a110605 January 24, 2025 15:11
@torchiaf torchiaf requested a review from aalves08 January 27, 2025 09:47
if (isRancherPrime()) {
return await getHelmRepositoryExact(this.$store, HARVESTER_REPO.gitRepo);
} else {
return await getHelmRepositoryMatch(this.$store, communityRepoRegexes);
Copy link
Member Author

@torchiaf torchiaf Jan 27, 2025

Choose a reason for hiding this comment

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

Non-Prime users can manually add Harvester repository. The Harvester repo should match one of urls below:

Git repo url:

  • https://github.com/harvester/harvester-ui-extension
  • https://github.com/harvester/harvester-ui-extension/
  • https://github.com/{forker-repository}/harvester-ui-extension
  • https://github.com/{forker-repository}/harvester-ui-extension/

GitHub deployments url:

  • https://harvester.github.io/harvester-ui-extension

Copy link
Member

@aalves08 aalves08 left a comment

Choose a reason for hiding this comment

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

Regex seems to work just fine, so LGTM

@torchiaf torchiaf merged commit 6501f3d into rancher:master Jan 27, 2025
47 of 49 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