[ 
https://issues.apache.org/jira/browse/GROOVY-12005?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18080150#comment-18080150
 ] 

ASF GitHub Bot commented on GROOVY-12005:
-----------------------------------------

testlens-app[bot] commented on PR #2530:
URL: https://github.com/apache/groovy/pull/2530#issuecomment-4425622879

   ## 🚨 TestLens detected 1 failed tests 🚨
   
   Here is what you can do:
   
   1) Inspect the test failures carefully.
   2) If you are convinced that some of the tests are flaky, you can mute them 
below.
   3) Finally, trigger a rerun by checking the rerun checkbox.
   
   ### Test Summary
   
   | Check | Project/Task | Test | Runs |
   |---|---|---|---|
   | [Build and test / lts \(25, 
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/25700248538/job/75458482578?pr=2530)
 | :groovy-grape-ivy:test | GrapeIvyTest > testConf2\(\) | ❌ |
   
   🏷️ Commit: 1a5f8cf42e80e5caad4aa672f092350bdad26bb7
   ▶️ Tests:  15620 executed
   🟡 Checks: 1/28 completed
   
   ### Test Failure
   
   <details>
   
   <summary><strong>GrapeIvyTest > testConf2()</strong> (:groovy-grape-ivy:test 
in <a 
href="https://github.com/apache/groovy/actions/runs/25700248538/job/75458482578?pr=2530";>Build
 and test / lts (25, ubuntu-latest)</a>)</summary>
   
   ```
   java.lang.RuntimeException: Error grabbing Grapes 

> Harden Grape against cache corruption and CDN throttling
> --------------------------------------------------------
>
>                 Key: GROOVY-12005
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12005
>             Project: Groovy
>          Issue Type: Improvement
>          Components: Grape
>            Reporter: Paul King
>            Assignee: Paul King
>            Priority: Major
>
> h2. Grape robustness measures
> Two complementary cache-validation guards plus a CDN compatibility fix, 
> addressing
> hard-to-diagnose @Grab failures caused by half-populated caches and 
> Cloudflare's
> recent filtering of the JDK URLConnection default User-Agent.
> h3. Cache resilience
> * New {{StrictLocalM2Resolver}} (extends {{IBiblioResolver}}) — rejects a
>   {{localm2}} entry when its POM has no JAR alongside (typical
>   {{staged-releases}} lineage). Resolution falls through to {{ibiblio}}
>   instead of failing with "download failed". Default-on; opt-out
>   {{-Dgroovy.grape.strict-localm2=false}}.
> * New {{StrictCachedGrapesResolver}} (extends {{FileSystemResolver}},
>   {{descriptor="required"}}) — refuses to synthesise stub descriptors from
>   artifact-only state, and refuses cached ivy descriptors lacking the
>   companion {{.original}} POM (which signals a previously-synthesised stub).
>   Self-heals existing corruption by forcing fall-through. Default-on; opt-out
>   {{-Dgroovy.grape.strict-cached-grapes=false}}.
> h3. CDN compatibility
> * {{GrapeIvy}} static initializer sets {{http.agent}} to a Maven-shaped
>   User-Agent {{Apache-Maven/x.y.z (Java X; OS X)}}, since Maven Central
>   (Fastly) returns HTTP 404 to the JDK default {{Java/<version>}}.
>   Covers CLI and standalone script use.
> * Build plugin {{org.apache.groovy-tested}} sets the same value as a JVM
>   arg for test JVMs (static init runs too late for already-warm test JVMs).
> * {{ForkedJvmExtension}} always inherits {{http.agent}} into child JVMs.
> h3. Diagnostics & generality
> * {{GrapeIvy.getDependencies}} now appends an actionable hint when a failure
>   matches the half-populated {{localm2}} pattern, naming the artifact, the
>   cache paths to clean, and the {{mvn dependency:get}} command.
> * Test plugin generically forwards any {{groovy.grape.*}} system or project
>   property to test JVMs (covers strict-localm2, strict-cached-grapes, plus
>   any future flag).
> h3. Test infrastructure
> * CI workflow pre-warms {{~/.m2/repository}} via {{mvn dependency:get}}
>   for every {{@Grab}} coord discovered in test sources (Maven uses
>   Apache HttpClient and isn't filtered by Cloudflare). Bridge copies
>   the warm cache into each test task's isolated temp at task start.
> * {{actions/cache}} extended to persist {{~/.m2/repository}} alongside
>   {{~/.groovy/grapes}} between runs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to