Skip to content

Revert PR #69: feat/microservices merge into main#89

Merged
zribktad merged 2 commits intomainfrom
copilot/revert-last-pr-main
Apr 1, 2026
Merged

Revert PR #69: feat/microservices merge into main#89
zribktad merged 2 commits intomainfrom
copilot/revert-last-pr-main

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 31, 2026

Reverts the merge of PR #69 ("feat: update monolith migration gaps documentation to reflect new feature statuses and recommendations"), restoring main to the state at aee99a5.

Changes

  • Removes 1,393 files introduced by the feature/microservices merge, including:
    • monolith/API-Template-mono/ directory (full monolith copy)
    • Microservices docker-compose and infrastructure configs
    • Docs added/modified by that branch
  • Restores previously modified files (.github/, APITemplate.slnx, Directory.Packages.props, etc.) to their pre-merge state

This reverts the merge of PR #69 (feat: update monolith migration gaps documentation
to reflect new feature statuses and recommendations), reverting commit b9bc8df.

Co-authored-by: zribktad <87422929+zribktad@users.noreply.github.com>
Copilot AI changed the title [WIP] Revert last PR on main branch Revert PR #69: feat/microservices merge into main Mar 31, 2026
Copilot AI requested a review from zribktad March 31, 2026 20:07
@zribktad zribktad marked this pull request as ready for review April 1, 2026 08:18
Copilot AI review requested due to automatic review settings April 1, 2026 08:18
@zribktad zribktad merged commit d429071 into main Apr 1, 2026
2 checks passed
@zribktad zribktad deleted the copilot/revert-last-pr-main branch April 1, 2026 08:18
Copy link
Copy Markdown
Contributor

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

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.

Comment on lines +10 to +13
"verify-token-audience": true,
"credentials": {
"secret": "dev-client-secret"
},
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
},
"Redaction": {
"HmacKeyEnvironmentVariable": "APITEMPLATE_REDACTION_HMAC_KEY",
"HmacKey": "mV7XhO9YXNw1fGKxvRrQz6CkKUL5jvN3i8A0Jv3cL2Q=",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +32
"Webhook": {
"Secret": "dev-webhook-secret-at-least-16-chars"
},
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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).

Copilot uses AI. Check for mistakes.
"resetPasswordAllowed": false,
"editUsernameAllowed": false,
"passwordPolicy": "length(4)",
"passwordPolicy": "length(8) and upperCase(1) and digits(1) and forceExpiredPasswordChange(365)",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
Comment on lines +171 to 172
"value": "Admin123",
"temporary": false
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
"value": "Admin123",
"temporary": false
"value": "CHANGE_ME_ADMIN_PASSWORD",
"temporary": true

Copilot uses AI. Check for mistakes.

- package-ecosystem: "docker"
directory: "/src/Gateway/Gateway.Api"
directory: "/src/APITemplate"
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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).

Suggested change
directory: "/src/APITemplate"
directory: "/src/APITemplate.Api"

Copilot uses AI. Check for mistakes.

mongodb:
image: mongo:8.2.6-noble
image: mongo:8.2
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
image: mongo:8.2
image: mongo:8.2.0

Copilot uses AI. Check for mistakes.

keycloak:
image: quay.io/keycloak/keycloak:26.5.6
image: quay.io/keycloak/keycloak:26.5
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
image: quay.io/keycloak/keycloak:26.5
image: quay.io/keycloak/keycloak:26.5.0

Copilot uses AI. Check for mistakes.
"resetPasswordAllowed": false,
"editUsernameAllowed": false,
"passwordPolicy": "length(4)",
"passwordPolicy": "length(8) and upperCase(1) and digits(1) and forceExpiredPasswordChange(365)",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
{
"type": "password",
"value": "admin",
"value": "Admin123",
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

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.

Copilot uses AI. Check for mistakes.
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.

3 participants