Skip to content

Guard 12.2 CDB AWR startup snapshots against container-switch failures#31

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-failing-github-actions-job
Draft

Guard 12.2 CDB AWR startup snapshots against container-switch failures#31
Copilot wants to merge 3 commits into
masterfrom
copilot/fix-failing-github-actions-job

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 4, 2026

The test_12_2-ee_CDB / test (dp) job was failing because the Oracle test container aborted its startup AWR snapshot script with ORA-01031, leaving no usable current-startup AWR history for DbaWaitsControllerTest. This change narrows the fix to the test DB bootstrap path.

  • Root cause

    • The prebuilt Oracle test image runs create_awr_snapshots.sql at container startup.
    • In 12.2 CDB mode, cross-container snapshot setup could fail on ALTER SESSION SET CONTAINER, aborting the script before snapshots were available for the active container.
  • What changed

    • Updated test/docker/oracle_db_prebuilt_panorama_test/create_awr_snapshots.sql.
    • Capture the current container at startup and create snapshots there first.
    • Wrap container switching / per-container snapshot creation in a best-effort path so one failed container switch does not abort the whole script.
    • Skip duplicate work when the session already starts in CDB$ROOT or the target PDB.
  • Behavioral impact

    • The startup script now preserves usable AWR snapshot creation for the connected container even if additional CDB/PDB snapshot attempts are not permitted in that runtime context.
    • This keeps history-based DB tests from failing due to missing startup-time AWR data.
  • Illustrative change

    Create_AWR_Snapshots_Safe(Original_Container);
    
    IF Original_Container <> 'CDB$ROOT' THEN
      Create_AWR_Snapshots_Safe('CDB$ROOT');
    END IF;
    
    IF PDB_Name <> Original_Container THEN
      Create_AWR_Snapshots_Safe(PDB_Name);
    END IF;

Copilot AI changed the title [WIP] Fix the failing GitHub Actions job test_12_2-ee_CDB Guard 12.2 CDB AWR startup snapshots against container-switch failures Jun 4, 2026
Copilot AI requested a review from rammpeter June 4, 2026 14:34
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.

2 participants