Skip to content

PackageToWrapperCacheResolver refactor and resolver tests#1586

Merged
nerfZael merged 48 commits intoorigin-devfrom
nefzael-resolver-and-tests-refactor
Mar 16, 2023
Merged

PackageToWrapperCacheResolver refactor and resolver tests#1586
nerfZael merged 48 commits intoorigin-devfrom
nefzael-resolver-and-tests-refactor

Conversation

@nerfZael
Copy link
Contributor

@nerfZael nerfZael commented Feb 27, 2023

This PR separates the PackageToWrapperCacheResolver into two resolvers:

  • PackageToWrapperResolver
  • WrapperCacheResolver
    This accomplishes the separation of concerns between turning packages into wrappers and actually caching the wrappers. With this PR the resolvers can be used separately and combined with other resolvers.

In addition to the refactor, this PR removes all except a couple of tests from the client URI resolution set.
The remaining tests are:

  • sanity (which serves to confirm that the default PolywrapClient configuration resolves URIs as expected)
  • can resolve uri with custom resolver (which serves to confirm that the default PolywrapClient configuration works with custom resolvers)

Other tests have been either removed, since they're no longer applicable (such as can resolve uri with custom resolver at invoke-time) or moved into unit tests in the uri-resolvers-js and uri-resolver-extensions-js repo.
Additional unit tests have also been added to those repos.

The tests also exposed an issue with the WrapperCacheResolver (as well as the previous PackageToWrapperCacheResolver) not caching the final resolved URI, since it only cached the resolution path which does not contain it.
This issue has also been fixed in this PR.

@nerfZael nerfZael changed the title PackageToWrapperCacheResolver refactor and tests PackageToWrapperCacheResolver refactor and resolver tests Feb 27, 2023
@nerfZael nerfZael requested a review from Niraj-Kamdar March 7, 2023 22:44
dOrgJelli
dOrgJelli previously approved these changes Mar 8, 2023
Copy link
Contributor

@dOrgJelli dOrgJelli left a comment

Choose a reason for hiding this comment

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

Very minor NITs, everything looks great 👏

dOrgJelli
dOrgJelli previously approved these changes Mar 16, 2023
@nerfZael nerfZael requested a review from pileks March 16, 2023 11:22
@nerfZael nerfZael merged commit 155f1d7 into origin-dev Mar 16, 2023
@dOrgJelli dOrgJelli deleted the nefzael-resolver-and-tests-refactor branch April 10, 2023 16:57
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.

3 participants