Repository navigation
[MCP] Clear environment description after environment copy - #12152
Nikola Kukrika (nikolakukrika) merged 17 commits into
Conversation
Adds BLOB-backed company and database-wide environment descriptions, exposes them in the v2 company information API, and updates UI and tests across localized layers. AB#650134 AB#650130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
AB#650134 AB#650130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
AB#650134 AB#650130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
AB#650134 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
AB#650130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
AB#650134 AB#650130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
AB#650134 AB#650130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
AB#650134 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
Persist company and environment descriptions from their field validation triggers so closing a stale page cannot overwrite newer values. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
Exclude the new HTTP API test consistently with the existing company information API tests, which cannot authenticate in the BCApps integration-test environment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
Reconstruct multiline BLOB text with separators only between lines so company and environment descriptions do not gain a trailing newline. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
Refactor company and environment description getters to rebuild multiline text with the standard first-line separator pattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 163db552-26bd-4164-9d35-8b66f98611b6
Clear the database-wide environment description during environment cleanup so copied environments do not retain source context. Add coverage through the platform environment-copy trigger. AB#650134 AB#650130 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89095217-42e1-4135-9d15-45c32fb7d277
Good Sense Reviewer - Round 1Recommendation: Accept with SuggestionsWhat this PR doesThis change clears the database-wide environment description when the platform copies an environment. The subscriber uses the per-database cleanup event and clears only the environment description BLOB, so the production behavior matches the intended scope. Problem-solution fitFit: Strong The change directly prevents a copied environment from keeping source-specific context. It uses the existing database cleanup lifecycle and does not affect company descriptions. SuggestionsS1 (🟠 Moderate): Use a compatible test transaction model Risk assessment and necessityRisk: The production change is narrow: the new dependency is acyclic, the cleanup event runs after the database-copy trigger, and only the database-wide description is cleared. The main verification risk is that the current regression test can stop in an existing cleanup subscriber before it verifies this change. Necessity: Without this change, a copied environment keeps the source environment description and can give consumers misleading context. The only workaround is to clear or replace the description after each copy.
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 89095217-42e1-4135-9d15-45c32fb7d277
Avoid invoking all environment-copy cleanup subscribers from the unit test while exercising the same description-clearing implementation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2787cc43-59c7-41e2-afe0-b914d5f5863e
1a06f80
Raise the actual environment-copy trigger and use AutoCommit because the subscriber chain commits. Remove the test-only helper introduced by the previous fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2787cc43-59c7-41e2-afe0-b914d5f5863e
Good Sense Reviewer - Round 2Recommendation: AcceptWhat this PR doesThe follow-up change replaces the rollback-incompatible test path with an Status of previous suggestions
New observations (commits since round 1)None - changes only addressed the prior suggestion. Risk assessment and necessityRisk: The production change remains narrow and clears only the database-wide description during environment-copy cleanup. The updated test permits existing cleanup subscribers to commit, and the reported checks pass. Necessity: Without this cleanup, a copied environment retains source-specific descriptive context and can expose misleading information to consumers.
|
Co-authored-by: nikolakukrika <39086991+nikolakukrika@users.noreply.github.com>
Good Sense Reviewer - Round 3Recommendation: Accept with SuggestionsWhat this PR doesThe latest commit removes Status of previous suggestions
New observations (commits since round 2)None. The latest commit reopens S1 by removing Risk assessment and necessityRisk: The production change remains narrow and correct, but the test now defaults to Necessity: Without this cleanup, a copied environment retains source-specific descriptive context and can give consumers misleading information.
|
What & why
Clear the database-wide environment description when an environment is copied so the destination does not retain context describing the source environment.
OnAfterCopyEnvironmentPerDatabase.Depends on #11741.
Linked work
Fixes AB#650134
Fixes AB#650130
How I validated this
What I tested and the outcome
git diff --checkand validated the updatedapp.json.Risk & compatibility
DataPerCompany = falsescope.