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

Added multiple URLs support in FinderFactory #7250

Merged
merged 3 commits into from
Jul 24, 2023

Conversation

mackdk
Copy link
Contributor

@mackdk mackdk commented Jul 7, 2023

What does this PR change?

This PR fixes how FinderFactory associates the packages to their physical locations. In fact, the class is currently based on the wrong assumption that a package maps to only one physical location. In reality, a package can be available on the classpath from multiple directories/jars.

This is currently not an issue as the test and production code is compiled and bundled together by the ant build file, but it will be if we want to properly separate them, split the production code into separate modules and/or we move to any other build tool that separates the main and test context (like Maven/Gradle). In this cases the Finder, as it is currently implemented, won't be able to resolve the resources (for example, the hibernate mappings) that are in different jar/context but shares the same package.

This change evaluates instead all the possible URLs for a package and processes them all with the correct Finder, aggregating the results.

GUI diff

No difference.

  • DONE

Documentation

  • No documentation needed: only internal and user invisible changes

  • DONE

Test coverage

  • No tests: already covered

  • DONE

Changelogs

Make sure the changelogs entries you are adding are compliant with https://github.com/uyuni-project/uyuni/wiki/Contributing#changelogs and https://github.com/uyuni-project/uyuni/wiki/Contributing#uyuni-projectuyuni-repository

If you don't need a changelog check, please mark this checkbox:

  • No changelog needed

If you uncheck the checkbox after the PR is created, you will need to re-run changelog_test (see below)

Re-run a test

If you need to re-run a test, please mark the related checkbox, it will be unchecked automatically once it has re-run:

  • Re-run test "changelog_test"
  • Re-run test "backend_unittests_pgsql"
  • Re-run test "java_pgsql_tests"
  • Re-run test "schema_migration_test_pgsql"
  • Re-run test "susemanager_unittests"
  • Re-run test "javascript_lint"
  • Re-run test "spacecmd_unittests"

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2023

Suggested tests to cover this Pull Request
  • srv_monitoring
  • proxy_cobbler_pxeboot
  • srv_rename_hostname
  • proxy_branch_network
  • allcli_sanity

@mackdk mackdk requested a review from cbosdo July 17, 2023 11:23
@mackdk mackdk marked this pull request as ready for review July 17, 2023 11:24
@mackdk mackdk requested a review from a team as a code owner July 17, 2023 11:24
@mackdk mackdk merged commit 1deb35e into uyuni-project:master Jul 24, 2023
13 checks passed
@mackdk mackdk deleted the fix-finder-logic branch July 24, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants