Skip to content

Conversation

@berkes
Copy link
Contributor

@berkes berkes commented Jul 31, 2025

No description provided.

@berkes berkes requested review from Iso5786 and Copilot July 31, 2025 14:11

This comment was marked as outdated.

@berkes berkes force-pushed the feature/ewi-local-dev-seed-if-needed branch from 8b98862 to ba5192c Compare August 6, 2025 15:11
@berkes berkes requested a review from Copilot August 6, 2025 15:11
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a conditional seeding mechanism to the Django development environment. The changes allow the seed command to check if the database is already seeded before running, preventing unnecessary re-seeding in local development environments.

  • Added a --check_first flag to the seed management command
  • Modified the development entrypoint to use the new flag
  • Implemented logic to skip seeding if a BadgrApp with the configured ID already exists

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docker/entrypoint-dev.sh Updates the seed command to include the --check_first flag
apps/mainsite/management/commands/seed.py Adds the conditional seeding logic and command line argument
Comments suppressed due to low confidence (1)

@berkes berkes self-assigned this Aug 6, 2025
@berkes berkes marked this pull request as ready for review August 6, 2025 15:13
@Iso5786 Iso5786 force-pushed the feature/ewi branch 2 times, most recently from 334ffb1 to 1bd49c8 Compare September 17, 2025 12:29
@berkes berkes force-pushed the feature/ewi-local-dev-seed-if-needed branch from ba5192c to d21bfbc Compare September 30, 2025 09:37
@berkes berkes marked this pull request as draft October 15, 2025 12:16
@berkes
Copy link
Contributor Author

berkes commented Oct 15, 2025

Converted to DRAFT since this should come after #207 and #206

@berkes berkes force-pushed the feature/ewi-local-dev-seed-if-needed branch from d21bfbc to 9a93454 Compare November 26, 2025 13:50
@berkes berkes marked this pull request as ready for review November 26, 2025 13:50
@berkes berkes force-pushed the feature/ewi-local-dev-seed-if-needed branch from 9a93454 to 2098550 Compare December 22, 2025 09:07
@Iso5786
Copy link
Contributor

Iso5786 commented Jan 8, 2026

Do we still need this PR?

This adds a commandline parameter --check_first when seeding,
to skip seeding if the database already has data. We check for BadgrApp
with id=1 and if found, bail out.
@berkes berkes force-pushed the feature/ewi-local-dev-seed-if-needed branch from 2098550 to aef6a98 Compare January 13, 2026 12:04
@berkes
Copy link
Contributor Author

berkes commented Jan 13, 2026

Do we still need this PR?

@Iso5786 , yes. This MR ensures that if we run "docker compose up" or "podman compose up" locally:

  • the database doesn't get wiped
  • the service comes online immediately and not after waiting ~1 min for the migrations and seeds to finish.

@berkes
Copy link
Contributor Author

berkes commented Jan 23, 2026

@Iso5786 can you give this PR a review?

@berkes
Copy link
Contributor Author

berkes commented Feb 3, 2026

@Iso5786 bump 😉

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