Skip to content

Conversation

@casionone
Copy link

This commit merges improvements from WDS linkis-spring-cloud-services module into Apache Linkis master branch, following the strategy of keeping all Apache features while selectively integrating WDS enhancements.

Changes Summary

Database Schema (Stage 1)

  • Added token_sign field support to linkis_token table
    • MySQL: linkis-dist/package/db/upgrade/1.7.0_schema/mysql/linkis_ddl.sql
    • PostgreSQL: linkis-dist/package/db/upgrade/1.7.0_schema/postgresql/linkis_ddl.sql (new)

Service Discovery (Stage 1)

  • linkis-eureka: Added Spring Boot Actuator and Prometheus monitoring support
  • linkis-eureka/pom.xml: Added actuator and micrometer-registry-prometheus dependencies
  • linkis-eureka/distribution.xml: Updated BouncyCastle and Jersey dependencies

Token Authentication (Stage 2)

  • TokenConfiguration.scala: Set token cache expiry to 10 minutes (balanced security/performance)
  • CachedTokenService.scala: Changed cache strategy from refreshAfterWrite to expireAfterWrite
  • CachedTokenServiceTest.java: Added test cases for invalid and expired tokens
  • Test resources: Enhanced test data with comprehensive token coverage (8 tokens including LINKIS-UNAVAILABLE-TOKEN)

Gateway Core (Stage 3)

  • linkis-gateway-core/pom.xml: Added classgraph dependency with proper version management
  • GatewayConfiguration.scala: Removed OAuth2 configuration constants (preserved OAuth2 implementation in separate classes)
  • Parent pom.xml: Added classgraph.version=4.8.112 property definition

Spring Cloud Gateway (Stage 4)

  • linkis-spring-cloud-gateway/pom.xml:
    • Added jackson-core-asl exclusion
    • Added reactor-netty-http explicit dependency management
    • Preserved Apache's bouncycastle jdk18on security enhancement
  • All new load balancer files verified as already present and correct

DSS Integration (Stage 5)

  • All DSS gateway parser files verified as identical to WDS or improved by Apache refactoring
  • No Maven Profile needed (DSS files already integrated)

Technical Decisions

  1. Token Cache Strategy: 10 minutes with expireAfterWrite

    • WDS used 2 minutes, Apache used 12 hours
    • 10 minutes balances security (fresher validation) and performance
  2. Preserved All Apache Features:

    • OAuth2Authentication integration in SecurityFilter and UserRestful
    • linkis-jobhistory dependency in gateway-server-support
    • BouncyCastle jdk18on security upgrade
  3. Selective WDS Integration:

    • Monitoring support (actuator, prometheus)
    • Improved token validation and caching
    • Enhanced test coverage
    • Better dependency management

Testing

  • Compilation: ✅ BUILD SUCCESS
  • Unit Tests: ✅ 6/6 tests passed (TokenDao + CachedTokenService)
  • Code Coverage: Jacoco report generated successfully

Files Modified: 12 files changed, 2 files added

  • Database: 2 files (MySQL modified, PostgreSQL added)
  • Service Discovery: 2 files (pom.xml, distribution.xml)
  • Token Authentication: 6 files (core logic + test resources)
  • Gateway Core: 2 files (pom.xml, configuration)
  • Spring Cloud Gateway: 1 file (pom.xml)
  • Parent POM: 1 file (added classgraph.version property)

🤖 Generated with Claude Code

What is the purpose of the change

EngineConn-Core defines the the abstractions and interfaces of the EngineConn core functions.
The Engine Service in Linkis 0.x is refactored, EngineConn will handle the engine connection
and session management.

Related issues/PRs

Related issues: close #590 close #591
Related pr:#591

Brief change log

  • Define the core abstraction and interfaces of the EngineConn Factory;
  • Define the core abstraction and interfaces of Executor Manager.

Checklist

  • I have read the Contributing Guidelines on pull requests.
  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the Linkis mailing list first)
  • If this is a code change: I have written unit tests to fully verify the new behavior.

kinghao007 and others added 7 commits December 25, 2025 13:05
This commit merges improvements from WDS linkis-spring-cloud-services module
into Apache Linkis master branch, following the strategy of keeping all
Apache features while selectively integrating WDS enhancements.

## Changes Summary

### Database Schema (Stage 1)
- Added token_sign field support to linkis_token table
  * MySQL: linkis-dist/package/db/upgrade/1.7.0_schema/mysql/linkis_ddl.sql
  * PostgreSQL: linkis-dist/package/db/upgrade/1.7.0_schema/postgresql/linkis_ddl.sql (new)

### Service Discovery (Stage 1)
- linkis-eureka: Added Spring Boot Actuator and Prometheus monitoring support
- linkis-eureka/pom.xml: Added actuator and micrometer-registry-prometheus dependencies
- linkis-eureka/distribution.xml: Updated BouncyCastle and Jersey dependencies

### Token Authentication (Stage 2)
- TokenConfiguration.scala: Set token cache expiry to 10 minutes (balanced security/performance)
- CachedTokenService.scala: Changed cache strategy from refreshAfterWrite to expireAfterWrite
- CachedTokenServiceTest.java: Added test cases for invalid and expired tokens
- Test resources: Enhanced test data with comprehensive token coverage (8 tokens including LINKIS-UNAVAILABLE-TOKEN)

### Gateway Core (Stage 3)
- linkis-gateway-core/pom.xml: Added classgraph dependency with proper version management
- GatewayConfiguration.scala: Removed OAuth2 configuration constants (preserved OAuth2 implementation in separate classes)
- Parent pom.xml: Added classgraph.version=4.8.112 property definition

### Spring Cloud Gateway (Stage 4)
- linkis-spring-cloud-gateway/pom.xml:
  * Added jackson-core-asl exclusion
  * Added reactor-netty-http explicit dependency management
  * Preserved Apache's bouncycastle jdk18on security enhancement
- All new load balancer files verified as already present and correct

### DSS Integration (Stage 5)
- All DSS gateway parser files verified as identical to WDS or improved by Apache refactoring
- No Maven Profile needed (DSS files already integrated)

## Technical Decisions

1. Token Cache Strategy: 10 minutes with expireAfterWrite
   - WDS used 2 minutes, Apache used 12 hours
   - 10 minutes balances security (fresher validation) and performance

2. Preserved All Apache Features:
   - OAuth2Authentication integration in SecurityFilter and UserRestful
   - linkis-jobhistory dependency in gateway-server-support
   - BouncyCastle jdk18on security upgrade

3. Selective WDS Integration:
   - Monitoring support (actuator, prometheus)
   - Improved token validation and caching
   - Enhanced test coverage
   - Better dependency management

## Testing
- Compilation: ✅ BUILD SUCCESS
- Unit Tests: ✅ 6/6 tests passed (TokenDao + CachedTokenService)
- Code Coverage: Jacoco report generated successfully

## Files Modified: 12 files changed, 2 files added
- Database: 2 files (MySQL modified, PostgreSQL added)
- Service Discovery: 2 files (pom.xml, distribution.xml)
- Token Authentication: 6 files (core logic + test resources)
- Gateway Core: 2 files (pom.xml, configuration)
- Spring Cloud Gateway: 1 file (pom.xml)
- Parent POM: 1 file (added classgraph.version property)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Removed comments regarding actuator and Prometheus monitoring support.
Removed multiple default token entries from the SQL script.
Removed multiple authentication token entries from the SQL data file.
@casionone casionone merged commit 66807d1 into apache-master Dec 25, 2025
10 of 20 checks passed
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