From 28d2761cbdb330c43cf9e28fbb3d746481ff4479 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Mon, 27 May 2024 16:14:22 +0200 Subject: [PATCH 1/6] Update docker-compose.mysql.yml --- development/docker-compose.mysql.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/development/docker-compose.mysql.yml b/development/docker-compose.mysql.yml index 062ada94..2f1103da 100644 --- a/development/docker-compose.mysql.yml +++ b/development/docker-compose.mysql.yml @@ -19,7 +19,6 @@ services: db: image: "mysql:8" command: - - "--default-authentication-plugin=mysql_native_password" - "--max_connections=1000" env_file: - "development.env" From 417a5e92bd3d2c9751222a8d7b9be6b169d99f26 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Mon, 27 May 2024 17:06:05 +0200 Subject: [PATCH 2/6] Add changes description --- changes/246.housekeeping | 1 + 1 file changed, 1 insertion(+) create mode 100644 changes/246.housekeeping diff --git a/changes/246.housekeeping b/changes/246.housekeeping new file mode 100644 index 00000000..53f8df5a --- /dev/null +++ b/changes/246.housekeeping @@ -0,0 +1 @@ +Fix Mysql CI setup From b68ef2e2b6b0b84e7546dcc7d619dd1e59292f75 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Tue, 28 May 2024 07:20:52 +0200 Subject: [PATCH 3/6] test: vrf is mandatory --- nautobot_firewall_models/tests/fixtures.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nautobot_firewall_models/tests/fixtures.py b/nautobot_firewall_models/tests/fixtures.py index 9fc157e7..789bf94c 100644 --- a/nautobot_firewall_models/tests/fixtures.py +++ b/nautobot_firewall_models/tests/fixtures.py @@ -1,4 +1,5 @@ """Create basic objects for use in test class setup.""" + # flake8: noqa: F403,405 from django.contrib.contenttypes.models import ContentType from nautobot.dcim.models import Device, DeviceType, Manufacturer, Platform, Location, LocationType @@ -14,9 +15,10 @@ def create_ip_range(): """Creates 3 IPRange objects.""" status = Status.objects.get(name="Active") - vrf, _ = VRF.objects.get_or_create(name="random_vrf") - IPRange.objects.get_or_create(start_address="192.168.0.1", end_address="192.168.0.10", vrf=None, status=status) - IPRange.objects.get_or_create(start_address="192.168.0.1", end_address="192.168.0.10", vrf=vrf, status=status) + vrf1, _ = VRF.objects.get_or_create(name="random_vrf") + vrf2, _ = VRF.objects.get_or_create(name="another_random_vrf") + IPRange.objects.get_or_create(start_address="192.168.0.1", end_address="192.168.0.10", vrf=vrf1, status=status) + IPRange.objects.get_or_create(start_address="192.168.0.1", end_address="192.168.0.10", vrf=vrf2, status=status) return IPRange.objects.get_or_create(start_address="192.168.0.11", end_address="192.168.0.20", status=status)[0] From 5c7df239aaf5e6e8177fa1003115e4a140de8e00 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Tue, 28 May 2024 07:43:33 +0200 Subject: [PATCH 4/6] test: vrf diambiguate --- nautobot_firewall_models/tests/fixtures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nautobot_firewall_models/tests/fixtures.py b/nautobot_firewall_models/tests/fixtures.py index 789bf94c..c8e17f1e 100644 --- a/nautobot_firewall_models/tests/fixtures.py +++ b/nautobot_firewall_models/tests/fixtures.py @@ -15,8 +15,8 @@ def create_ip_range(): """Creates 3 IPRange objects.""" status = Status.objects.get(name="Active") - vrf1, _ = VRF.objects.get_or_create(name="random_vrf") - vrf2, _ = VRF.objects.get_or_create(name="another_random_vrf") + vrf1, _ = VRF.objects.get_or_create(name="random_vrf", rd="random_rd") + vrf2, _ = VRF.objects.get_or_create(name="another_random_vrf", rd="another_random_rd") IPRange.objects.get_or_create(start_address="192.168.0.1", end_address="192.168.0.10", vrf=vrf1, status=status) IPRange.objects.get_or_create(start_address="192.168.0.1", end_address="192.168.0.10", vrf=vrf2, status=status) return IPRange.objects.get_or_create(start_address="192.168.0.11", end_address="192.168.0.20", status=status)[0] From 8a36a6a3e013dcca2c72b42080448df494342b76 Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Wed, 5 Jun 2024 15:45:56 +0200 Subject: [PATCH 5/6] Enable mysql in CI testing --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34fe4aae..a5f87052 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ --- name: "CI" -concurrency: # Cancel any existing runs of this workflow for this same PR +concurrency: # Cancel any existing runs of this workflow for this same PR group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true on: # yamllint disable-line rule:truthy rule:comments @@ -153,9 +153,9 @@ jobs: - python-version: "3.11" db-backend: "postgresql" nautobot-version: "2.0.0" - # - python-version: "3.11" - # db-backend: "mysql" - # nautobot-version: "stable" + - python-version: "3.11" + db-backend: "mysql" + nautobot-version: "stable" runs-on: "ubuntu-22.04" env: INVOKE_NAUTOBOT_FIREWALL_MODELS_PYTHON_VER: "${{ matrix.python-version }}" From dc4e3107c047bdaec8affab9771a0309e89fbd7a Mon Sep 17 00:00:00 2001 From: Christian Adell Date: Fri, 7 Jun 2024 09:30:10 +0200 Subject: [PATCH 6/6] Disable Mysql CI testing as not supported --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5f87052..6567034e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -153,9 +153,9 @@ jobs: - python-version: "3.11" db-backend: "postgresql" nautobot-version: "2.0.0" - - python-version: "3.11" - db-backend: "mysql" - nautobot-version: "stable" + # - python-version: "3.11" + # db-backend: "mysql" + # nautobot-version: "stable" runs-on: "ubuntu-22.04" env: INVOKE_NAUTOBOT_FIREWALL_MODELS_PYTHON_VER: "${{ matrix.python-version }}"