Skip to content

FCT2-19239: Display Egress workspace in activity log when connecting/…#464

Merged
NeilFoubister merged 4 commits into
mainfrom
feature/fct2-19239-Show-Egress-workspace-name-in-activity-log
Jun 11, 2026
Merged

FCT2-19239: Display Egress workspace in activity log when connecting/…#464
NeilFoubister merged 4 commits into
mainfrom
feature/fct2-19239-Show-Egress-workspace-name-in-activity-log

Conversation

@NeilFoubister

Copy link
Copy Markdown
Contributor

…disconnecting.

@HasanCPS

Copy link
Copy Markdown
Collaborator

@NeilFoubister The 42703: column c.egress_workspace_name does not exist failures aren't a code bug, the test database is just behind the branch.

This branch adds EgressWorkspaceName to the CaseMetadata entity, which means EF now selects egress_workspace_name in every query that touches case_metadata. That's why tests with nothing to do with the new feature are failing as well.

The migration for the column (20260610101825_AddEgressWorkspaceNameToCaseMetadata) is in the branch, but nothing applies it automatically. The integration test fixture (IntegrationTestFixture.InitializeDbContext) connects straight to whatever CaseManagementDatastoreConnection points at and never calls Database.Migrate(). Migrations only get applied through the release pipeline scripts, so a migration that exists only on this branch won't be in the dev database yet.

Rather than applying the migration by hand every time this happens, I'd suggest having the fixture apply pending migrations itself. In IntegrationTestFixture.InitializeAsync, after the DbContext is created:

public async Task InitializeAsync()
{
    InitializeEgressClients();
    InitializeDdeiClient();
    InitializeDbContext();
    InitializeNetAppClient();

    if (DbContext != null)
    {
        await DbContext.Database.MigrateAsync();
    }
}

MigrateAsync is a no-op when the database is already up to date, so it only does work when a branch carries a new migration. That fixes this failure and stops the next migration from tripping the tests the same way.

Comment thread backend/CPS.ComplexCases.API/Functions/CreateEgressWorkspace.cs
@sonarqubecloud

Copy link
Copy Markdown

@HasanCPS HasanCPS left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@NeilFoubister NeilFoubister merged commit a6eb3a5 into main Jun 11, 2026
17 checks passed
@NeilFoubister NeilFoubister deleted the feature/fct2-19239-Show-Egress-workspace-name-in-activity-log branch June 11, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants