Skip to content

feat: force to dont run claimsyncer to see if e2e-go fails#1559

Closed
joanestebanr wants to merge 1 commit intodevelopfrom
feat/test_e2ego
Closed

feat: force to dont run claimsyncer to see if e2e-go fails#1559
joanestebanr wants to merge 1 commit intodevelopfrom
feat/test_e2ego

Conversation

@joanestebanr
Copy link
Copy Markdown
Collaborator

@joanestebanr joanestebanr commented Mar 27, 2026

🔄 Changes Summary

  • The code have a intentional bug that is no running claimsyncer so all e2e must fail. But e2e-go is green.

Running locally also fails as expected:

make e2e-go
(...)
        /home/jesteban/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.25.7.linux-amd64/src/net/http/transport.go:1947 +0x174f
FAIL    github.com/agglayer/aggkit/test/e2e     1829.222s
=== RUN   TestLoadEnv_InvalidEnvName
--- PASS: TestLoadEnv_InvalidEnvName (0.00s)
=== RUN   TestFindEnvsDir
--- PASS: TestFindEnvsDir (0.00s)
PASS
ok      github.com/agglayer/aggkit/test/e2e/envs        0.006s
FAIL
make: *** [Makefile:110: test-e2e] Error 1

@joanestebanr joanestebanr self-assigned this Mar 27, 2026
@claude
Copy link
Copy Markdown

claude bot commented Mar 27, 2026

Claude finished @joanestebanr's task in 1m 0s —— View job


Code Review Complete

Todo List

  • Read the changed file (cmd/run.go)
  • View git diff to see exact changes
  • Analyze changes for code quality and issues
  • Provide review feedback
  • Fill in the summary template

🚀 What's New

This PR temporarily disables the L2 ClaimSync component from starting by commenting out the go res.Start(ctx) call in the runClaimSyncL2IfNeeded function. This is a testing change to determine if the e2e-go tests fail when the claimsyncer is not running.

🐛 Bug Fixes

None

📋 Config Updates

None - no configuration changes are made.

⚠️ Breaking Changes

None (but see critical issue below about runtime behavior)


Review Findings

🔴 Required: Critical Issues

1. Testing Code Left in Production Path - cmd/run.go:986-988

The change leaves testing/debug code in the production code path with a warning log and commented-out functionality. This is inappropriate for merging:

log.Infof("Starting ClaimSyncL2 (autoStart=%t)", *cfg.AutoStart.Resolved)
log.Warnf("***TESTING NO RUN CLAIM SYNC L2***")
// TODO: Uncomment this line
//go res.Start(ctx)
return res

Issues:

  • The ClaimSyncL2 component is created but never started, which could cause silent failures in production
  • The warning message ***TESTING NO RUN CLAIM SYNC L2*** will appear in production logs
  • This creates a misleading state where the component exists but is non-functional
  • The TODO comment suggests this is temporary but provides no context for when/how it should be reverted

Recommendation: This type of testing change should never be merged to a main branch. Instead:

  • Run this test on a separate experimental branch
  • Use feature flags or environment variables if you need to conditionally disable components
  • If this must be tested in CI, use build tags or conditional compilation

Severity: 🔴 BLOCKING - This should not be merged as-is.


🟡 Suggested: Code Quality

2. Incomplete PR Description

The PR description template is not filled out, making it unclear:

  • What specific test is being run
  • What the expected outcome is
  • How long this change is intended to remain
  • What the revert plan is

Recommendation: Fill in the PR template with:

  • Clear description of the testing hypothesis
  • Expected CI behavior
  • Timeline and revert strategy

🟢 Optional: Process Improvement

3. Alternative Testing Approach

Consider using a component flag or configuration-based approach instead of commenting out code:

if os.Getenv("DISABLE_L2_CLAIMSYNC") == "true" {
    log.Warnf("L2 ClaimSync disabled via environment variable")
} else {
    go res.Start(ctx)
}

This would allow testing without modifying production code.


Summary

This PR appears to be a temporary testing change to diagnose e2e-go test behavior. The approach of commenting out production code is not suitable for merging to any permanent branch.

Recommended Actions:

  1. Keep this change on an ephemeral test branch only
  2. Monitor the e2e-go test results to confirm/deny the hypothesis
  3. Revert this change immediately after gathering test results
  4. If the claimsyncer is indeed causing issues, create a proper PR with a configuration-based solution or fix the root cause

@sonarqubecloud
Copy link
Copy Markdown

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