Upgrade to Java 11, Gradle 6.9.4, and modernize Docker images - #2085
Open
rica2852 wants to merge 15 commits into
Open
Upgrade to Java 11, Gradle 6.9.4, and modernize Docker images#2085rica2852 wants to merge 15 commits into
rica2852 wants to merge 15 commits into
Conversation
- This doesn't include tests yet, since they were problematic. More to come.
Repose upgrade to Java 11
- Add IP address validation to catch malformed IPs (e.g., 'banana-phone') - Implement isValidIpAddress() method using InetAddress validation - Return 400 Bad Request for invalid X-Forwarded-For headers - Add gradle.properties with Java 11 configuration for WSL - Clean up JaCoCo cache corruption issues Fixes 2 failing tests in IpUserFilterTest: - should return a 400 when X-Forwarded-For is malformed
Java 11 w tests
Java 11 w tests
- Re-enabled Scoverage plugin for Scala code coverage (upgraded to 1.4.11) - Added processScoverageResources to functional-test-framework and repose-core - Added Java 11 JVM args to integration tests for reflection compatibility - Created jacocoIntegrationTestReport task for integration test coverage - Created jacocoMergedReport task for combined unit + integration coverage - Added jacocoMergedCoverageVerification to check combined coverage thresholds - Updated check task to verify merged coverage instead of unit tests only This provides comprehensive coverage tracking across all test types and ensures proper Java 11 module access for integration tests.
Re-enable Scoverage and enhance coverage reporting
- Restore processScoverageResources block in valve build.gradle - Update scoverageScalaVersion to use full Scala version (2.12.8) instead of major.minor only, resolving missing scalac-scoverage-plugin_2.12:1.4.11 artifact - Add Lombok to scoverageCompileOnly and scoverageAnnotationProcessor configurations so @Data-generated methods are available during scoverage compilation - Add JAXB generated sources to scoverage source set classpath and wire compileScoverageJava/Scala task dependencies on compileGeneratedJava - Add explicit annotationProcessor for Lombok in http-client-service-api
- Add gradle-scalafix plugin (io.github.cosmicsilence:gradle-scalafix:0.2.6)
- Create .scalafix.conf with DisableSyntax, LeakingImplicitClassVal, NoValInForComprehension, and ProcedureSyntax rules
- Wire checkScalafix into the check lifecycle for main source sets
- Auto-fix all ProcedureSyntax violations (def foo() { -> def foo(): Unit = {)
- Exclude test/integrationTest source sets from linting (Java interop patterns)
- Remove all commented-out Scalastyle plugin references
- DisableSyntax checks (noVars/noNulls/noThrows) disabled pending incremental cleanup of Java Servlet API interop code
Replaced depracated Scalastyle with Scalafix for Scala linting
- Rewrite PLUGIN-ALTERNATIVES.md as post-migration record - Rewrite BUILD-DOCKER.md with original pipeline history and new approach - Rewrite UPGRADE-SUMMARY.md with tech debt section - Simplify QUICK-START.md - Fix Dockerfile: add filter bundle EARs, fix maintainer label - Remove Dockerfile-new, Dockerfile-old-reconstructed, build-docker.sh, build-docker.bat - Gitignore gradle.properties (machine-specific) - Add .kiro/steering/local-development.md for local setup notes - Update docker-compose.yaml to reference Dockerfile
- Added Rocky as an alternative to EOL CentOS 7 - Upgraded Ubuntu to 22.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Security-driven upgrade of Repose from Java 8 to Java 11, addressing CVE-2023-41993 (CVSS 8.8). Includes build toolchain modernization and Docker image updates.
Changes
Runtime & Build
--add-opensJVM args for Java module system compatibility in testsintegrationTestsource set/task manually (replaces unavailabletestSetsplugin)Linting & Code Quality
io.github.cosmicsilence:gradle-scalafix:0.2.6) — Scalastyle is deprecated and incompatible with Scala 2.12+JavaConversionsdeprecation warningsDocker
Dockerfileat repo root: builds from source, runs on Ubuntu 22.04 + Temurin 11 JREcentos/directories torocky/inartifacts/docker/to reflect the new base OSfile/(build from source) andrepo/(install from package repo) variantsdocker-compose.yamlfor convenienceRemoved Plugins
Test Fixes
ValidatorConfiguratorTest— fixed URL-encoded path handling for Saxon WADL resolutionSystemModelInterrogatorTest— refactored Groovy bytecode incompatible with Java 11's stricter verifierIpAddressRangeTest.shouldThrowExceptionForInvalidAddress(pre-existing flaky test)What's NOT Changed
compile/testCompile(migration toimplementation/apideferred)How to Verify