Skip to content

Conversation

Hinton
Copy link
Member

@Hinton Hinton commented Oct 7, 2025

🎟️ Tracking

📔 Objective

Adds a standalone API service which allows you to run and destroy seeds. The intention is to allow integration tests to seed the database.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link

codecov bot commented Oct 7, 2025

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.71%. Comparing base (685ee37) to head (fd41332).

Files with missing lines Patch % Lines
...nfrastructure.EntityFramework/Models/SeededData.cs 0.00% 4 Missing ⚠️
...SharedWeb/Utilities/ServiceCollectionExtensions.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           arch/seeder-sdk    #6424      +/-   ##
===================================================
- Coverage            50.73%   50.71%   -0.02%     
===================================================
  Files                 1869     1867       -2     
  Lines                82798    82701      -97     
  Branches              7322     7307      -15     
===================================================
- Hits                 42004    41945      -59     
+ Misses               39191    39158      -33     
+ Partials              1603     1598       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

github-actions bot commented Oct 7, 2025

Logo
Checkmarx One – Scan Summary & Details072d0e69-b5b1-47e2-92b4-5de57bd3def0

New Issues (1)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Use_Of_Hardcoded_Password /util/Seeder/Factories/UserSeeder.cs: 61
detailsThe application uses the hard-coded password MasterPassword for authentication purposes, either using it to verify users' identities, or to access...
ID: UFsrfd47ViLFGJQpFxMFK%2B7Yu1w%3D
Attack Vector
Fixed Issues (1)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM Use_Of_Hardcoded_Password /util/Seeder/Factories/UserSeeder.cs: 16

Copy link
Contributor

@theMickster theMickster left a comment

Choose a reason for hiding this comment

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

Small things that I recommend we change.
I think we also need a README.md & a simple CLAUDE.md

{
public Guid Id { get; set; }
public required string RecipeName { get; set; }
public required string Data { get; set; } // JSON blob with entity tracking info
Copy link
Contributor

Choose a reason for hiding this comment

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

❌ We should refrain from inline comments as they don't help us craft clean code. I recommend that we either remove or add an XML comment but I prefer the prior and avoid it altogether.

Copy link
Contributor

Choose a reason for hiding this comment

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

❌ None of the comments in the Program.cs file help the next teammate understand the program better than intellisense already does. I recommend that we remove them.

MGibson1 and others added 2 commits October 9, 2025 15:36
Fixup single user recipe to inform of seeded entities
…ch/seeder-api

# Conflicts:
#	util/Seeder/Factories/UserSeeder.cs
@Hinton Hinton changed the base branch from main to arch/seeder-sdk October 9, 2025 22:54
[Active] BIT NOT NULL CONSTRAINT [DF_Device_Active] DEFAULT (1),
CONSTRAINT [PK_Device] PRIMARY KEY CLUSTERED ([Id] ASC),
CONSTRAINT [FK_Device_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id])
CONSTRAINT [FK_Device_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id]) ON DELETE CASCADE
Copy link
Member Author

Choose a reason for hiding this comment

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

@MGibson1 did we want to revert this?

Copy link
Member

Choose a reason for hiding this comment

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

That was undecided. I believe we don't need it anymore with the full repository injection we're using, but it's not wrong.

@rkac-bw @withinfocus Care to comment on using cascading delete here vs needing to understand delete through sprocs?

Copy link
Contributor

Choose a reason for hiding this comment

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

I am not a fan of cascades personally and try to avoid them, but they were here when I showed up so I am working with it. Our approach -- and this could use documentation on our revamped SQL code style page -- is to manage deletions that touch critical tables explicitly e.g. Organization_DeleteById, and for smaller children of those tables to allow cascades so as to keep the coding pattern simple enough.

One example: OrganizationIntegration, being linked to the critical Organization table, is deleted via the above proc. Its child table OrganizationIntegrationConfiguration has a cascade delete on it.

Copy link

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.

4 participants