Revert PR #69: feat/microservices merge into main#89
Conversation
There was a problem hiding this comment.
Pull request overview
Reverts the previously merged microservices-oriented changes to restore the repository back to a monolith-focused layout and tooling.
Changes:
- Removes the
monolith/API-Template-mono/subtree and other microservices-related infrastructure/docs. - Restores the primary solution structure (
APITemplate.slnx) and central package/dependency set back to the monolith. - Updates local/prod docker-compose and Keycloak realm configuration to match the restored monolith setup.
Reviewed changes
Copilot reviewed 48 out of 1393 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/APITemplate.Api/appsettings.Development.json | Adds development-only configuration used by the monolith API. |
| src/APITemplate.Api/Api/ExceptionHandling/ApiExceptionHandlerLogs.cs | Minor formatting changes to logger source-generator attributes. |
| monolith/API-Template-mono/tests/APITemplate.Tests/Unit/Handlers/UnitOfWorkMockExtensions.cs | Deletes monolith test helper introduced by the reverted subtree. |
| monolith/API-Template-mono/src/APITemplate.Infrastructure/Migrations/M002_AddProductDataSoftDeleteIndexes.cs | Removes MongoDB migration from the deleted monolith subtree. |
| monolith/API-Template-mono/src/APITemplate.Infrastructure/Migrations/20260315014428_DropPasswordResetTokensTable.cs | Removes EF migration from the deleted monolith subtree. |
| monolith/API-Template-mono/src/APITemplate.Infrastructure/Migrations/20260315000709_AddTenantInvitationNormalizedEmail.cs | Removes EF migration from the deleted monolith subtree. |
| monolith/API-Template-mono/src/APITemplate.Infrastructure/Migrations/20260302153430_AddCategory.cs | Removes EF migration from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/tempo/config.yml | Removes Tempo config from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/prometheus/rules/apitemplate-alerts.yml | Removes Prometheus alert rules from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/prometheus/prometheus.yml | Removes Prometheus config from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/loki/config.yml | Removes Loki config from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/grafana/provisioning/datasources/datasources.yml | Removes Grafana provisioning from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/grafana/provisioning/dashboards/dashboards.yml | Removes Grafana provisioning from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/grafana/grafana.ini | Removes Grafana INI config from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/grafana/dashboards/apitemplate-overview.json | Removes Grafana dashboard from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/observability/alloy/config.alloy | Removes Alloy config from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/kubernetes/dragonfly/dragonfly.yml | Removes Dragonfly k8s manifest from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/kubernetes/dragonfly/README.md | Removes Dragonfly k8s README from the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/keycloak/realms/api-template-realm.json | Removes an extra realm export living in the deleted monolith subtree. |
| monolith/API-Template-mono/infrastructure/dragonfly/haproxy.cfg | Removes HAProxy config from the deleted monolith subtree. |
| monolith/API-Template-mono/global.json | Removes subtree-scoped .NET SDK pinning. |
| monolith/API-Template-mono/docker-compose.yml | Removes subtree-scoped compose file. |
| monolith/API-Template-mono/docker-compose.production.yml | Removes subtree-scoped production compose file. |
| monolith/API-Template-mono/TODO.md | Removes subtree TODO document. |
| monolith/API-Template-mono/TODO-Architecture.md | Removes subtree architecture TODO document. |
| monolith/API-Template-mono/README.md | Removes subtree README (deleted subtree). |
| monolith/API-Template-mono/LICENSE | Removes subtree license file. |
| monolith/API-Template-mono/Directory.Packages.props | Removes subtree-central package versions file. |
| monolith/API-Template-mono/Directory.Build.targets | Removes subtree build targets. |
| monolith/API-Template-mono/APITemplate.slnx | Removes subtree solution file. |
| monolith/API-Template-mono/.gitignore | Removes subtree gitignore. |
| monolith/API-Template-mono/.dockerignore | Removes subtree dockerignore. |
| infrastructure/keycloak/realms/api-template-realm.json | Restores stronger password policy and updates seeded admin password in the realm export. |
| infrastructure/docker/init-microservices-databases.sql | Removes microservices DB init script. |
| docs/testing.md | Removes microservices-era testing guidance. |
| docs/monolith-migration-gaps.md | Removes microservices migration gap documentation. |
| docs/Architecture-Microservices-Plan.md | Removes microservices migration plan document. |
| docker-compose.yml | Downgrades/pins images back to monolith-era versions. |
| docker-compose.production.yml | Downgrades/pins images back to monolith-era versions. |
| docker-compose.microservices.yml | Removes the microservices compose file. |
| TODO-Architecture.md | Replaces “microservices implemented” content with monolith → microservices evolution doc. |
| README.md | Adjusts testing section to remove reference to assertion-style guidance. |
| Directory.Packages.props | Removes microservices-only packages and reverts some package versions. |
| APITemplate.slnx | Restores monolith-only solution structure and removes microservices projects. |
| .vscode/tasks.json | Removes microservices build/run tasks. |
| .vscode/launch.json | Removes microservices launch configs and disables post-debug infra teardown. |
| .github/workflows/pr-validation.yml | Adds master as an additional PR target branch for CI. |
| .github/dependabot.yml | Removes microservices Docker update entries and consolidates Docker updates to a single directory. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "verify-token-audience": true, | ||
| "credentials": { | ||
| "secret": "dev-client-secret" | ||
| }, |
There was a problem hiding this comment.
Committing appsettings.Development.json with concrete secrets (Keycloak client secret, redaction HMAC key, webhook secret) is risky because it normalizes storing secrets in source control and can be copied into non-dev environments. Prefer removing these secret values from the file (keep placeholders) and sourcing them from environment variables / dotnet user-secrets (and ensure appsettings.Development.json is ignored if that’s the repo convention).
| }, | ||
| "Redaction": { | ||
| "HmacKeyEnvironmentVariable": "APITEMPLATE_REDACTION_HMAC_KEY", | ||
| "HmacKey": "mV7XhO9YXNw1fGKxvRrQz6CkKUL5jvN3i8A0Jv3cL2Q=", |
There was a problem hiding this comment.
Committing appsettings.Development.json with concrete secrets (Keycloak client secret, redaction HMAC key, webhook secret) is risky because it normalizes storing secrets in source control and can be copied into non-dev environments. Prefer removing these secret values from the file (keep placeholders) and sourcing them from environment variables / dotnet user-secrets (and ensure appsettings.Development.json is ignored if that’s the repo convention).
| "Webhook": { | ||
| "Secret": "dev-webhook-secret-at-least-16-chars" | ||
| }, |
There was a problem hiding this comment.
Committing appsettings.Development.json with concrete secrets (Keycloak client secret, redaction HMAC key, webhook secret) is risky because it normalizes storing secrets in source control and can be copied into non-dev environments. Prefer removing these secret values from the file (keep placeholders) and sourcing them from environment variables / dotnet user-secrets (and ensure appsettings.Development.json is ignored if that’s the repo convention).
| "resetPasswordAllowed": false, | ||
| "editUsernameAllowed": false, | ||
| "passwordPolicy": "length(4)", | ||
| "passwordPolicy": "length(8) and upperCase(1) and digits(1) and forceExpiredPasswordChange(365)", |
There was a problem hiding this comment.
This realm export hard-codes a known admin password (and typically also includes client secrets elsewhere in the same file), which can lead to credential reuse and accidental promotion into shared environments. Consider importing with a temporary password that must be changed on first login and/or externalizing credentials so the committed realm JSON contains no real defaults beyond clearly marked placeholders.
| "value": "Admin123", | ||
| "temporary": false |
There was a problem hiding this comment.
This realm export hard-codes a known admin password (and typically also includes client secrets elsewhere in the same file), which can lead to credential reuse and accidental promotion into shared environments. Consider importing with a temporary password that must be changed on first login and/or externalizing credentials so the committed realm JSON contains no real defaults beyond clearly marked placeholders.
| "value": "Admin123", | |
| "temporary": false | |
| "value": "CHANGE_ME_ADMIN_PASSWORD", | |
| "temporary": true |
|
|
||
| - package-ecosystem: "docker" | ||
| directory: "/src/Gateway/Gateway.Api" | ||
| directory: "/src/APITemplate" |
There was a problem hiding this comment.
directory: "/src/APITemplate" looks inconsistent with the repository layout shown elsewhere in this PR (e.g., src/APITemplate.Api/...). If that directory does not exist or does not contain a Dockerfile, Dependabot Docker updates will silently stop. Point this to the directory that actually contains the Dockerfile(s) you want tracked (e.g., /src/APITemplate.Api).
| directory: "/src/APITemplate" | |
| directory: "/src/APITemplate.Api" |
|
|
||
| mongodb: | ||
| image: mongo:8.2.6-noble | ||
| image: mongo:8.2 |
There was a problem hiding this comment.
Some images are pinned only to major/minor tags (e.g., mongo:8.2, keycloak:26.5), which can change over time and break reproducibility (and can unintentionally pull in behavior changes). Prefer pinning to a full patch tag or, ideally, an immutable digest for consistent local/dev environments.
| image: mongo:8.2 | |
| image: mongo:8.2.0 |
|
|
||
| keycloak: | ||
| image: quay.io/keycloak/keycloak:26.5.6 | ||
| image: quay.io/keycloak/keycloak:26.5 |
There was a problem hiding this comment.
Some images are pinned only to major/minor tags (e.g., mongo:8.2, keycloak:26.5), which can change over time and break reproducibility (and can unintentionally pull in behavior changes). Prefer pinning to a full patch tag or, ideally, an immutable digest for consistent local/dev environments.
| image: quay.io/keycloak/keycloak:26.5 | |
| image: quay.io/keycloak/keycloak:26.5.0 |
| "resetPasswordAllowed": false, | ||
| "editUsernameAllowed": false, | ||
| "passwordPolicy": "length(4)", | ||
| "passwordPolicy": "length(8) and upperCase(1) and digits(1) and forceExpiredPasswordChange(365)", |
There was a problem hiding this comment.
The PR description/title frames this as a revert back to a specific pre-merge state, but this change materially alters Keycloak realm security settings (password policy and seeded admin password). If the intent is a pure revert, these edits should be dropped; if the intent is “revert + tighten realm defaults”, the PR description should be updated to explicitly call that out.
| { | ||
| "type": "password", | ||
| "value": "admin", | ||
| "value": "Admin123", |
There was a problem hiding this comment.
The PR description/title frames this as a revert back to a specific pre-merge state, but this change materially alters Keycloak realm security settings (password policy and seeded admin password). If the intent is a pure revert, these edits should be dropped; if the intent is “revert + tighten realm defaults”, the PR description should be updated to explicitly call that out.
Reverts the merge of PR #69 ("feat: update monolith migration gaps documentation to reflect new feature statuses and recommendations"), restoring
mainto the state ataee99a5.Changes
feature/microservicesmerge, including:monolith/API-Template-mono/directory (full monolith copy).github/,APITemplate.slnx,Directory.Packages.props, etc.) to their pre-merge state