Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: cachix/install-nix-action@v31
- name: Build
run: |
set -euxo pipefail
nix build --show-trace \
--option max-jobs 1 \
--option cores 4 \
.#tests.x86_64-linux.openstack-default-setup.driver
Comment on lines +17 to +23
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify both test drivers are defined as flake outputs

nix flake show --json 2>/dev/null | jq -e '
  .tests."x86_64-linux"."openstack-default-setup".driver and
  .tests."x86_64-linux"."openstack-live-migration".driver
'
if [ $? -eq 0 ]; then
  echo "✓ Both drivers exist as flake outputs"
else
  echo "✗ One or both drivers missing"
  exit 1
fi

Repository: cobaltcore-dev/openstack-nix

Length of output: 110


🏁 Script executed:

cat -n .github/workflows/qa.yml | head -50

Repository: cobaltcore-dev/openstack-nix

Length of output: 1139


Pre-build both test drivers in the Build step.

The Build step only pre-builds openstack-default-setup.driver, but the Live migration step (line 29) runs openstack-live-migration.driver which is not included here. This means the live-migration test will build on-demand without the stability constraints (max-jobs 1, cores 4), defeating the PR's stated objective of making CI more stable by reducing parallel execution.

🔧 Proposed fix to include both drivers
       - name: Build
         run: |
           set -euxo pipefail
           nix build --show-trace \
             --option max-jobs 1 \
             --option cores 4 \
-            .#tests.x86_64-linux.openstack-default-setup.driver
+            .#tests.x86_64-linux.openstack-default-setup.driver \
+            .#tests.x86_64-linux.openstack-live-migration.driver
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Build
run: |
set -euxo pipefail
nix build --show-trace \
--option max-jobs 1 \
--option cores 4 \
.#tests.x86_64-linux.openstack-default-setup.driver
- name: Build
run: |
set -euxo pipefail
nix build --show-trace \
--option max-jobs 1 \
--option cores 4 \
.#tests.x86_64-linux.openstack-default-setup.driver \
.#tests.x86_64-linux.openstack-live-migration.driver
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/qa.yml around lines 17 - 23, The Build step currently only
pre-builds .#tests.x86_64-linux.openstack-default-setup.driver but the workflow
later runs .#tests.x86_64-linux.openstack-live-migration.driver; update the
Build step to pre-build both targets (openstack-default-setup.driver and
openstack-live-migration.driver) with the same nix build options (set -euxo
pipefail, --option max-jobs 1, --option cores 4) so the live-migration driver is
built with the same stability constraints instead of on-demand during the Live
migration job.

- name: Basic setup
run: |
nix build -Lv .#tests.x86_64-linux.openstack-default-setup.driver
./result/bin/nixos-test-driver
nix run .#tests.x86_64-linux.openstack-default-setup.driver
- name: Live migration
run: |
nix build -Lv .#tests.x86_64-linux.openstack-live-migration.driver
./result/bin/nixos-test-driver
nix run .#tests.x86_64-linux.openstack-live-migration.driver
1 change: 1 addition & 0 deletions packages/nova.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ let
"test_inject_admin_password"
"test_server_pool_waitall"
"test_validation_errors_19_traits_multiple_additional_traits_two_invalid"
"test_schedule_and_build_multiple_cells"
];

excludeListFile = writeScript "test_excludes" (lib.concatStringsSep "\n" testExcludes);
Expand Down
2 changes: 1 addition & 1 deletion tests/openstack-default-setup.nix
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ pkgs.nixosTest {
print(f"openstack volume show test_vol: {output}")

# wait until volume is attached
assert retry_until_succeed(controllerVM, "openstack volume show test_vol -f value -c status | grep 'in-use'", 20)
assert retry_until_succeed(controllerVM, "openstack volume show test_vol -f value -c status | grep 'in-use'", 40)

# add ssh host key to known_hosts
retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ssh-keyscan {vm_ip} > ~/.ssh/known_hosts", 60)
Expand Down
Loading