Skip to content

Nats web - core seperation#293

Merged
sonus21 merged 18 commits intomasterfrom
nats-web
May 2, 2026
Merged

Nats web - core seperation#293
sonus21 merged 18 commits intomasterfrom
nats-web

Conversation

@sonus21
Copy link
Copy Markdown
Owner

@sonus21 sonus21 commented May 2, 2026

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Unit Test
  • Integration Test
  • Reactive Integration Test

Test Configuration:

  • Spring Version
  • Spring Boot Version
  • Redis Driver Version

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

sonus21 added 7 commits May 2, 2026 20:05
Release notes cover:
- NATS JetStream consumer configuration improvements
- Queue name validation for NATS backend
- QueueType multi-backend architecture
- Enhanced public API documentation
- Bug fixes and maintenance updates

Assisted-By: Claude Code
Restructured release notes to highlight NATS JetStream as the major
feature of 4.0.0-RC4:

- Added NATS backend as primary feature announcement
- Included backend comparison table
- Added migration guide for opt-in NATS support
- Clarified backward compatibility with 3.x
- Updated roadmap to focus on NATS GA and ecosystem

Assisted-By: Claude Code
…package

Move backend-agnostic service interface definitions to rqueue-core/src/main/java/com/github/sonus21/rqueue/web/, eliminating unnecessary coupling between backend implementations (rqueue-redis, rqueue-nats) and the dashboard layer (rqueue-web).

Service interfaces moved:
- RqueueSystemManagerService
- RqueueQDetailService
- RqueueJobService
- RqueueDashboardChartService
- RqueueViewControllerService
- RqueueJobMetricsAggregatorService

The interfaces are now in rqueue-core's web package, allowing backend modules to depend only on rqueue-core instead of the full web layer. The rqueue-web module continues to depend on rqueue-core and hosts the implementations (in the .service.impl package).

This architectural refactoring aligns with the multi-backend SPI framework by ensuring backend implementations are independent of UI layers. Spring integration modules (rqueue-spring, rqueue-spring-boot-starter) continue to depend on rqueue-web for controller and template resources.

Assisted-By: Claude Code
…and rqueue-web

Move backend-agnostic service interfaces to rqueue-core, ensuring clean separation between core abstractions and the dashboard UI layer:

**Service Interfaces Relocated:**
- Dashboard services → rqueue-core/src/main/java/com/github/sonus21/rqueue/web/
  - RqueueSystemManagerService
  - RqueueQDetailService
  - RqueueJobService
  - RqueueDashboardChartService
  - RqueueViewControllerService

- Metrics service → rqueue-core/src/main/java/com/github/sonus21/rqueue/metrics/
  - RqueueMetricsAggregatorService (renamed from RqueueJobMetricsAggregatorService)

**Package Organization Improvements:**
- Move Pebble template functions from rqueue-web/utils/pebble/ to rqueue-web/web/pebble/
  - DateTimeFunction, DeadLetterQueuesFunction, DefaultFunction, DurationFunction
  - ReadableDateTimeFunction, ResourceLoader, RqueuePebbleExtension
  - Aligns template utilities with web package structure

**Impact:**
- Backend modules (rqueue-redis, rqueue-nats) now depend only on rqueue-core
- rqueue-web continues to depend on rqueue-core and hosts service implementations
- Spring integration modules (rqueue-spring, rqueue-spring-boot-starter) keep rqueue-web dependency
- Improved package organization with utilities co-located with the packages they serve

Assisted-By: Claude Code
Clean up duplicate RqueueJobMetricsAggregatorService from rqueue-web/src/main/java after moving the interface to rqueue-core/metrics as RqueueMetricsAggregatorService.

Move the test RqueueTaskMetricsAggregatorServiceTest from rqueue-web to rqueue-core/src/test/java/com/github/sonus21/rqueue/metrics/, updating package declarations and class references to use the renamed RqueueMetricsAggregatorService.

This ensures a single source of truth for the metrics aggregator interface in the core module.

Assisted-By: Claude Code
Remove duplicate service interface definitions from rqueue-web/src/main/java/com/github/sonus21/rqueue/web/service/ since they now live in rqueue-core:

- RqueueDashboardChartService
- RqueueJobService
- RqueueQDetailService
- RqueueSystemManagerService
- RqueueViewControllerService

The implementation classes in rqueue-web/service/impl remain unchanged, now implementing interfaces from rqueue-core. This completes the architectural refactoring with a single source of truth for service interfaces in rqueue-core.

Assisted-By: Claude Code
Delete RELEASE_NOTES.md - release notes will be managed elsewhere.

Assisted-By: Claude Code
Add imports for service interfaces that were moved from rqueue-web to rqueue-core/web package:
- RqueueDashboardChartService
- RqueueJobService
- RqueueQDetailService
- RqueueSystemManagerService
- RqueueViewControllerService

Update test files in rqueue-web/src/test/java to import these interfaces from rqueue-core.web instead of local package.

Assisted-By: Claude Code
Add imports for service interfaces that were moved from rqueue-web to rqueue-core/web package in test files that reference them:
- RqueueDashboardChartService
- RqueueJobService
- RqueueQDetailService
- RqueueSystemManagerService
- RqueueViewControllerService

Update test files in rqueue-web/src/test/java to import these interfaces from rqueue-core.web instead of local package.

Assisted-By: Claude Code
Add Coveralls step to CI workflow to push JaCoCo coverage reports. This was missing from the coverage_report job, causing coverage data to not be uploaded to Coveralls.

The step downloads merged coverage report and pushes it to Coveralls using the GitHub token.

Assisted-By: Claude Code
@sonus21 sonus21 changed the title Nats web Nats web - core seperation May 2, 2026
sonus21 added 8 commits May 2, 2026 23:52
- Only run coverallsJacoco if COVERALLS_REPO_TOKEN is set
- Add --info flag for detailed logging to diagnose issues

Assisted-By: Claude Code
Ensures the build fails if the token is missing so we can diagnose
why coverage is not being sent to Coveralls.

Assisted-By: Claude Code
Log coveralls requests and errors to diagnose why coverage is not being sent.

Assisted-By: Claude Code
Provide CI metadata (CI_NAME, CI_BUILD_NUMBER, CI_BRANCH, etc.) so the
coveralls plugin can properly identify the build context and send coverage
data with correct metadata to Coveralls API.

Assisted-By: Claude Code
Write coveralls request JSON to file for debugging and display it in CI
logs so we can see exactly what data is being sent to Coveralls API.

Assisted-By: Claude Code
The nbaztec coveralls-jacoco plugin auto-detects GitHub Actions and parses
PR/branch info from GitHub's environment variables. Only need to set CI_BRANCH
since GitHub_ACTIONS and GITHUB_TOKEN are auto-provided.

Assisted-By: Claude Code
For GitHub Actions pull requests, github.ref_name returns the PR reference
(e.g., "293/merge") instead of the actual branch name. The coveralls-jacoco
plugin uses CI_BRANCH to identify the branch in coverage reports. By using
github.head_ref (which provides the branch name for PRs) with github.ref_name
as a fallback (for push events), we ensure the correct branch is reported.

Assisted-By: Claude Code
The nbaztec coveralls-jacoco v1.2.20 plugin has a quirky GitHub Actions
detection path. Reading its source (ServiceInfoParser.kt):

  - If GITHUB_ACTIONS is set but GITHUB_TOKEN is not, it emits
    service_name="github-actions" — which the Coveralls API does not
    recognize as a first-class service, so PR comments and branch
    correlation silently no-op.
  - When BOTH GITHUB_ACTIONS and GITHUB_TOKEN are set, it switches to
    service_name="github" (the canonical name).
  - service_job_id is read from BUILD_NUMBER (Jenkins-style), not
    GITHUB_RUN_ID — so we map github.run_id onto BUILD_NUMBER explicitly.
  - Branch is read from CI_BRANCH; github.head_ref is used so PR builds
    report the source branch instead of "<num>/merge".

Verified locally by running coverallsJacoco with the production token
plus a CircleCI-shaped env block (the plugin's CircleCI branch is the
best-supported one) — Coveralls returned OK and the build appeared in
the dashboard.

Also re-adds coverallsRequest = file(...) so the request payload is
written to build/coveralls-request.json. The workflow's "Push coverage
to Coveralls" step already cats this file, which makes future
regressions diagnosable from the CI log alone.

Assisted-By: Claude Code
@coveralls
Copy link
Copy Markdown

coveralls commented May 2, 2026

Coverage Report for CI Build 0

Warning

No base build found for commit acad531 on master.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 51.631%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 8063
Covered Lines: 4324
Line Coverage: 53.63%
Relevant Branches: 2911
Covered Branches: 1342
Branch Coverage: 46.1%
Branches in Coverage %: Yes
Coverage Strength: 0.54 hits per line

💛 - Coveralls

@sonus21 sonus21 merged commit e1d3fc6 into master May 2, 2026
10 of 12 checks passed
@sonus21 sonus21 deleted the nats-web branch May 3, 2026 04:30
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.

2 participants