MavenHttpModule.groovy

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Backport test fixture improvements from 6.0 branch

  1. … 2 more files in changeset.
Backport test fixture improvements from 6.0 branch

  1. … 2 more files in changeset.
Backport test fixture improvements from 6.0 branch

  1. … 2 more files in changeset.
Extend test fixture for testing artifact selectors in GMM

  1. … 9 more files in changeset.
Add support for adding variants and files to component metadata rules

  1. … 32 more files in changeset.
Add support for adding variants and files to component metadata rules

  1. … 32 more files in changeset.
Add support for adding variants and files to component metadata rules

  1. … 31 more files in changeset.
Add support for adding variants and files to component metadata rules

  1. … 32 more files in changeset.
Add support for adding variants and files to component metadata rules

  1. … 32 more files in changeset.
Trust missing components when resolution is trying a virtual platform

This commit adds a special case in the resolution engine for missing modules.

The default behavior, when a module is missing, is to cache the result. However,

when there are multiple repositories, it is possible for a module to be found

in a subsequent repository, in which case the result is deemed authoritative,

and we wouldn't try again on the repositories which had "missing metadata". But,

for UX reasons, if a module is missing from _all_ repositories, we would always

try again on the next build, despite knowing that the module would be absent.

This was intended to solve the following use case:

- BuildA attempts to resolve org:module:1.1, but the user forgot to publish this module version, so resolution fails

- BuildB executes, publishing org:module:1.1

- BuildA executes again, without using --refresh-dependencies. We prefer making additional network calls rather than failing the build again.

This behavior interferes with the "virtual platform" use case, where we need

to pre-emptively try to find a module, without knowing if it actually exists.

This commit adds a flag, `retryMissing`, which is by default `true`, but can be set

to false when we resolve a module. If so, then the engine will trust the cached missing

status. Virtual platforms (and edges) use this new method, bypassing the old path.

  1. … 10 more files in changeset.
Renamed the module metadata file in a Maven repo from `x-module.json` to `x.module`.

  1. … 9 more files in changeset.
Added a bunch of int test coverage for caching and error handling for module metadata files and the files defined in them.

  1. … 1 more file in changeset.
Some changes to `MavenModule` test fixtures to allow an artifact in a module to be defined using a path relative to the module directory, moved up some methods to more general interfaces, and some other tidy-ups.

  1. … 13 more files in changeset.
Changed the Maven repository test fixtures to support publishing and resolving the Gradle module metadata.

  1. … 8 more files in changeset.
Added `BlockingHttpServer.put()` to allow a test to expect PUT requests, and `missing()` to allow a test to specify that a 404 response should be returned for an expected GET request.

  1. … 12 more files in changeset.
Change repository test fixtures to allow the repository path and backing file of artifacts to be queried by test.

  1. … 17 more files in changeset.
Add integration test to ensure that --refresh-dependencies causes a cached artifact to be retrieved with Cache-Control:max-age=0

  1. … 2 more files in changeset.
Some consolidation in the MavenModule fixtures.

  1. … 6 more files in changeset.
Inject VersionComparator into the various placed it is required, rather than using a static comparator. Also moved a couple of services out of the maven plugins and tasks.

  1. … 27 more files in changeset.
Hoisted method up from MavenFileModule to MavenModule.

  1. … 3 more files in changeset.
Added test coverage for querying metadata artifacts.

+review REVIEW-5282

  1. … 5 more files in changeset.
Cache plugin portal responses.

+review

  1. … 22 more files in changeset.
Start abstracting sftp and http repository transport tests to unify coverage

    • -0
    • +145
    ./MavenHttpModule.groovy
  1. … 79 more files in changeset.