Skip to content

Fix Backend (api) CI failure in DemoSeederIT bean wiring - #6

Merged
mudabs merged 2 commits into
mainfrom
copilot/fix-backend-api-job-again
Oct 5, 2026
Merged

mudabs merged 2 commits into
mainfrom
copilot/fix-backend-api-job-again

Conversation

Copilot AI commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

The Backend (api) GitHub Actions job failed because DemoSeederIT loaded two DemoProperties beans, causing Spring context startup to fail with NoUniqueBeanDefinitionException. This PR removes the duplicate test bean registration while preserving the test’s demo configuration inputs.

  • Root cause

    • DemoSeederIT defined a local demoProperties() bean while DemoProperties was already registered via application configuration properties.
  • Changes made

    • Removed test-local @TestConfiguration/@Bean DemoProperties from DemoSeederIT.
    • Updated import to include only DemoSeeder.
    • Moved required demo config values to test property sources and dynamic properties (including demo passwords and photo count).
  • Updated wiring (example)

    @TestPropertySource(properties = {
        "spring.jpa.hibernate.ddl-auto=validate",
        "spring.flyway.enabled=true",
        "eventshare.demo.enabled=true",
        "eventshare.demo.admin-enabled=true",
        "eventshare.demo.photo-count=10"
    })
    @Import(DemoSeeder.class)
    class DemoSeederIT {
        @DynamicPropertySource
        static void datasourceProps(DynamicPropertyRegistry registry) {
            registry.add("eventshare.demo.host-password", () -> "Host-Pass-123");
            registry.add("eventshare.demo.admin-password", () -> "Admin-Pass-123");
        }
    }

@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ab42f27-f41b-411b-8912-7a1c6a679c5b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-authored-by: mudabs <92596644+mudabs@users.noreply.github.com>
@mudabs
mudabs marked this pull request as ready for review October 5, 2026 19:20
Copilot AI changed the title [WIP] Fix failing GitHub Actions job Backend (api) Fix Backend (api) CI failure in DemoSeederIT bean wiring Oct 5, 2026
@mudabs
mudabs merged commit 4502858 into main Oct 5, 2026
1 check passed
Copilot AI requested a review from mudabs October 5, 2026 19:20
Copilot stopped work on behalf of mudabs due to an error October 5, 2026 19:36
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