Skip to content

Conversation

@munishchouhan
Copy link
Member

Summary

This PR fixes critical dependency injection issues in
Wave Lite mode and includes documentation improvements:

  • Fixed MirrorStateStore bean requirement: Changed @requires(bean = BuildEnabled) to @requires(bean = MirrorEnabled) in MirrorStateStore.groovy:38 to correctly require mirror functionality instead of buildfunctionality.
  • Fixed CleanupService null pointer issues: Made scanIdStore and scanConfig nullable in CleanupServiceImpl.groovy:70-73 and added null check before accessing scanIdStore in CleanupServiceImpl.groovy:113 to prevent crashes when scan is disabled.
  • Updated CleanupService test: Added proper mock for ScanIdStore dependency in test to match the updated implementation in CleanupServiceTest.groovy:33

These fixes ensure Wave can run properly without scan/mirror features enabled by preventing bean instantiation failures and null pointer exceptions.

Test plan

  • Verify Wave starts successfully with wave.scan.enabled: false in configuration
  • Verify Wave starts successfully with wave.mirror.enabled: false in configuration
  • Run existing test suite to ensure no regressions: ./gradlew test
  • Verify MirrorStateStore bean is not created when mirror is disabled

Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
@munishchouhan munishchouhan self-assigned this Nov 26, 2025
@munishchouhan munishchouhan changed the title Fix scan and mirror enabled flag bug Fix: scan and mirror enabled flag bug Nov 26, 2025
@munishchouhan
Copy link
Member Author

munishchouhan commented Nov 26, 2025

tested locally (scan and mirror is disabled):

% wave -i ubuntu --wave-endpoint http://localhost:9090 --scan-mode required    
Wave invalid response: [501] {"message":"Security scan service is not enabled - Check Wave configuration setting 'wave.scan.enabled' - HTTP status=501 - response=-"}
% wave -i ubuntu --wave-endpoint http://localhost:9090 --scan-mode required
Wave invalid response: [501] {"message":"Security scan service is not enabled - Check Wave configuration setting 'wave.scan.enabled' - HTTP status=501 - response=-"}
% wave -i ubuntu --wave-endpoint http://localhost:9090                     
6aeb57dccdbe.ngrok-free.app/wt/55321d262cea/library/ubuntu:latest
% docker pull 6aeb57dccdbe.ngrok-free.app/wt/55321d262cea/library/ubuntu:latest
latest: Pulling from wt/55321d262cea/library/ubuntu
% wave --conda-package bwa --wave-endpoint http://localhost:9090
6aeb57dccdbe.ngrok-free.app/wt/72e6b244738d/hrma017/dev:bwa--11fc48d89f135548
% docker pull 6aeb57dccdbe.ngrok-free.app/wt/72e6b244738d/hrma017/dev:bwa--11fc48d89f135548
bwa--11fc48d89f135548: Pulling from wt/72e6b244738d/hrma017/dev
dafa2b0c44d2: Already exists 
dec6b097362e: Already exists 
f88da01cff0b: Already exists 
4f4fb700ef54: Already exists 
92dc97a3ef36: Already exists 
403f74b0f85e: Already exists 
10b8c00c10a5: Already exists 
17dc7ea432cc: Already exists 
bb36d6c3110d: Already exists 
0ea1a16bbe82: Already exists 
030a47592a0a: Already exists 
077afbc03f8f: Pull complete 
92f50d254fdf: Pull complete 
Digest: sha256:67aafb5e31ff7e01d8cade0025cbc7306a3bd6513e8d51bb7516d35f6eaa6d55
Status: Downloaded newer image for 6aeb57dccdbe.ngrok-free.app/wt/72e6b244738d/hrma017/dev:bwa--11fc48d89f135548
6aeb57dccdbe.ngrok-free.app/wt/72e6b244738d/hrma017/dev:bwa--11fc48d89f135548

@munishchouhan
Copy link
Member Author

Screenshot 2025-11-26 at 16 28 40 Screenshot 2025-11-26 at 16 35 55

@munishchouhan
Copy link
Member Author

munishchouhan commented Nov 26, 2025

Tested on dev (scan and mirror is disabled):
https://wave.dev-seqera.io/view/builds/bd-fc7a472fd0a4b363_24

% wave -i alpine --wave-endpoint https://wave.dev-seqera.io 
wave.dev-seqera.io/wt/1fcf99578872/library/alpine:latest
% docker pull wave.dev-seqera.io/wt/1fcf99578872/library/alpine:latest
latest: Pulling from wt/1fcf99578872/library/alpine
6b59a28fa201: Pull complete 
Digest: sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
Status: Downloaded newer image for wave.dev-seqera.io/wt/1fcf99578872/library/alpine:latest
wave.dev-seqera.io/wt/1fcf99578872/library/alpine:latest
% wave --conda-package bwa --wave-endpoint https://wave.dev-seqera.io
wave.dev-seqera.io/wt/b54078566328/wave/build/dev:bwa--fc7a472fd0a4b363
% wave -i ubuntu --wave-endpoint https://wave.dev-seqera.io --scan-mode required
Wave invalid response: [501] {"message":"Security scan service is not enabled - Check Wave configuration setting 'wave.scan.enabled' - HTTP status=501 - response=-"}
% wave -i docker.io/hrma017/mirror:picard--0b917604880bf258          -m --build-repo quay.io --wave-endpoint https://wave.dev-seqera.io --tower-token eyJ0aWQiOiAzOX0uNzFkN2IzZjJmOGNiOTM3NmU3ZDNhNDEzMmQ0MDA1ZTNjMmU1NDkyZg==  --tower-endpoint https://cloud.dev-seqera.io/api

Wave invalid response: [501] {"message":"Mirror service is not enabled - Check Wave configuration setting 'wave.mirror.enabled' - HTTP status=501 - response=-"}
% docker pull wave.dev-seqera.io/wt/b54078566328/wave/build/dev:bwa--fc7a472fd0a4b363
bwa--fc7a472fd0a4b363: Pulling from wt/b54078566328/wave/build/dev
dafa2b0c44d2: Pull complete 
dec6b097362e: Pull complete 
f88da01cff0b: Pull complete 
4f4fb700ef54: Pull complete 
92dc97a3ef36: Pull complete 
403f74b0f85e: Pull complete 
10b8c00c10a5: Pull complete 
17dc7ea432cc: Pull complete 
bb36d6c3110d: Pull complete 
0ea1a16bbe82: Pull complete 
030a47592a0a: Pull complete 
19900b329685: Pull complete 
9d0f9a8088d2: Pull complete 
Digest: sha256:0de0604f8480fa25e7189f5712589dbe187cd72e30386e210786342e4656b8af
Status: Downloaded newer image for wave.dev-seqera.io/wt/b54078566328/wave/build/dev:bwa--fc7a472fd0a4b363
wave.dev-seqera.io/wt/b54078566328/wave/build/dev:bwa--fc7a472fd0a4b363

Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
Signed-off-by: munishchouhan <[email protected]>
@munishchouhan munishchouhan merged commit dc23d7b into master Nov 26, 2025
3 checks passed
@munishchouhan munishchouhan deleted the fix-scan-mirror-enabled-bug branch November 26, 2025 18:51
@pditommaso
Copy link
Collaborator

May be related #936

@munishchouhan
Copy link
Member Author

May be related #936

No I reproduced the bug with wave.scan.enabled=false

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