Skip to content

Conversation

@Ahoo-Wang
Copy link
Owner

  • Replace okhttp3 with CoAPI for HTTP communication
  • Refactor ProxyMachineIdDistributor and ProxyIdSegmentDistributor to use CoAPI
  • Update CosIdProxyMachineIdDistributorAutoConfiguration and CosIdProxySegmentAutoConfiguration for CoAPI integration
  • Rename and repackage ErrorResponse to proxy/api package
  • Update ProxyServerLauncher for CoAPI compatibility
  • Add loadBalanced property to ProxyProperties

- Replace okhttp3 with CoAPI for HTTP communication
- Refactor ProxyMachineIdDistributor and ProxyIdSegmentDistributor to use CoAPI
- Update CosIdProxyMachineIdDistributorAutoConfiguration and CosIdProxySegmentAutoConfiguration for CoAPI integration
- Rename and repackage ErrorResponse to proxy/api package
- Update ProxyServerLauncher for CoAPI compatibility
- Add loadBalanced property to ProxyProperties
@Ahoo-Wang Ahoo-Wang added the enhancement New feature or request label May 12, 2025
Ahoo-Wang added 20 commits May 12, 2025 18:04
- Remove unused import for @DeleteMapping
- Update @DeleteExchange annotation to use default value
… parameters

- Add @RequestParam annotation to long parameters in createDistributor and nextMaxId methods
- This change improves API clarity and ensures proper parameter handling in the controller layer
- Extract createApiClient method to generalize API client creation
- Use generics to allow creation of different API clients
- Refactor createMachineApi and createSegmentApi to use the new method
- Add proxy host and load-balanced configuration to application.yaml
- Introduce NestedConfigurationProperty for proxy properties in CosIdProperties class
…ration

- Set Redis container version to 7.4.1
- Configure network with specific ID "cosid-proxy-network"
- Remove unused import of BeforeAll
…configuration

- Add coapi-spring-boot-starter dependency
- Simplify network configuration for test containers
- Expose redis port in container
- Remove the exposed port 6379 from the Redis container configuration
- This change simplifies the test setup by removing unnecessary port exposure
- Add --stacktrace option to the Test CosId-Proxy command in the integration test workflow
- This change will provide more detailed error information if the test fails
- Remove unnecessary push and pull_request triggers from various workflow files
- Simplify trigger conditions to improve clarity and reduce maintenance overhead
- Affected files:
  - benchmark-test.yml
  - codecov.yml
  - document-deploy.yml
  - example-test.yml
  - integration-test.yml
- Add paths-ignore for push events to align with pull request settings
- Exclude cosid-benchmark, docs, document, documentation, examples, and wiki folders
# Conflicts:
#	.github/workflows/benchmark-test.yml
- Create ApiClientFactory class to centralize API client creation
- Update ProxyIdSegmentDistributorTest and ProxyMachineIdDistributorTest to use ApiClientFactory
- Remove createApiClient methods from ProxyServerLauncher
- Reorder imports in MachineController.java for better organization
- Update Redis container version to 'latest' in ProxyServerLauncher.java
- Remove unnecessary empty lines and improve code formatting
- Replace MachineApi and SegmentApi with MachineClient and SegmentClient
- Update client creation and usage in proxy package
- Modify spring boot starter configurations for new client classes
- Remove load-balanced property from ProxyProperties
- Update gradle dependencies and application yaml for coapi integration
- Update log message to include both name and namespace information
- Remove unused import of SegmentApi
- Adjust spacing and formatting for better readability
- Update GitHub Actions workflow for integration tests
- Change the run command for CosId-Proxy to use --debug instead of --stacktrace
- This modification aims to provide more detailed output during test execution
- Remove .withReuse(true) from Redis and CosId Proxy containers
- Simplify the container initialization code
- Change the log level from --debug to --info for the CosId-Proxy test step
- Enable Gradle build caching, parallel execution, and increase JVM memory
- Adjust test timing in MillisecondSnowflakeIdTest to ensure more reliable results
- Disable ProxyIdSegmentDistributorTest and ProxyMachineIdDistributorTest
- Add new SegmentClientTest class with a test for creating distributor and getting next max ID
- Include necessary imports and setup for the new test class
@codecov
Copy link

codecov bot commented May 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.33%. Comparing base (1a84192) to head (dd18c24).
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #788      +/-   ##
============================================
+ Coverage     84.83%   85.33%   +0.49%     
- Complexity     1312     1318       +6     
============================================
  Files           212      212              
  Lines          4241     4172      -69     
  Branches        425      411      -14     
============================================
- Hits           3598     3560      -38     
+ Misses          358      340      -18     
+ Partials        285      272      -13     
Flag Coverage Δ
unittests 85.33% <100.00%> (+0.49%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Ahoo-Wang added 5 commits May 13, 2025 14:47
- Remove @disabled annotation from ProxyMachineIdDistributorTest class
- Keep @timeout annotation for long-running test
…nt distributor

- Improve code readability in DistributeConcurrent class
- Add timeout annotation to ProxyIdSegmentDistributorTest class
- Refactor test verification logic in DistributeConcurrent class
…iguration

- Create new test class CosIdProxyMachineIdDistributorAutoConfigurationTest
- Add contextLoads test method to verify bean initialization
- Update ProxyIdSegmentDistributorTest with placeholder methods for concurrent testing
- Remove `CosIdProperties` from `CosIdProxyMachineIdDistributorAutoConfiguration`
- Remove `CosIdProperties` from `CosIdProxySegmentAutoConfiguration`
- Add test case for `CosIdProxySegmentAutoConfiguration`
- Uncommented test methods for concurrent ID generation and multi-instance testing
- Added `generateConcurrentOfChain` test method
- Disabled tests in CI environment to prevent GitHub Actions from hanging
@Ahoo-Wang Ahoo-Wang merged commit 78b1fc4 into main May 13, 2025
25 checks passed
@Ahoo-Wang Ahoo-Wang deleted the proxy-coapi branch May 13, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants