Skip to content

Commit

Permalink
Merge pull request #538 from nautobot/release-3.1.0-to-develop
Browse files Browse the repository at this point in the history
Sync Main to Develop for 3.1.0
  • Loading branch information
smk4664 authored Sep 7, 2024
2 parents 63868e0 + 774672c commit 091fb3a
Show file tree
Hide file tree
Showing 17 changed files with 73 additions and 56 deletions.
1 change: 0 additions & 1 deletion changes/520.added

This file was deleted.

1 change: 0 additions & 1 deletion changes/521.fixed

This file was deleted.

2 changes: 0 additions & 2 deletions changes/526.changed

This file was deleted.

1 change: 0 additions & 1 deletion changes/527.added

This file was deleted.

1 change: 0 additions & 1 deletion changes/527.housekeeping

This file was deleted.

1 change: 0 additions & 1 deletion changes/528.added

This file was deleted.

2 changes: 0 additions & 2 deletions changes/528.fixed

This file was deleted.

1 change: 0 additions & 1 deletion changes/530.fixed

This file was deleted.

1 change: 1 addition & 0 deletions changes/536.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Cut release for 3.1.0
1 change: 0 additions & 1 deletion changes/562.housekeeping

This file was deleted.

27 changes: 14 additions & 13 deletions docs/admin/compatibility_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,17 @@ While that last supported version will not be strictly enforced--via the max_ver
| 2.0.0-beta.2 | 2.0.0b2 | 2.0.0b2 |
| 2.0.0-rc.1 | 2.0.0rc1 | 2.0.0rc1 |
| 2.0.0-rc.2 | 2.0.0rc2 | 2.0.0rc99 |
| 2.0.0 | 2.0.0 | 2.99.09 |
| 2.0.1 | 2.0.0 | 2.99.09 |
| 2.0.2 | 2.0.0 | 2.99.09 |
| 2.1.0 | 2.0.0 | 2.99.09 |
| 2.2.0 | 2.0.0 | 2.99.09 |
| 2.3.0 | 2.1.0 | 2.99.09 |
| 2.4.0 | 2.1.0 | 2.99.09 |
| 2.5.0 | 2.1.0 | 2.99.09 |
| 2.6.0 | 2.1.0 | 2.99.09 |
| 2.7.0 | 2.1.0 | 2.99.09 |
| 2.8.0 | 2.1.0 | 2.99.09 |
| 3.0.0 | 2.1.0 | 2.99.09 |
| 3.0.1 | 2.1.0 | 2.99.09 |
| 2.0.0 | 2.0.0 | 2.99.99 |
| 2.0.1 | 2.0.0 | 2.99.99 |
| 2.0.2 | 2.0.0 | 2.99.99 |
| 2.1.0 | 2.0.0 | 2.99.99 |
| 2.2.0 | 2.0.0 | 2.99.99 |
| 2.3.0 | 2.1.0 | 2.99.99 |
| 2.4.0 | 2.1.0 | 2.99.99 |
| 2.5.0 | 2.1.0 | 2.99.99 |
| 2.6.0 | 2.1.0 | 2.99.99 |
| 2.7.0 | 2.1.0 | 2.99.99 |
| 2.8.0 | 2.1.0 | 2.99.99 |
| 3.0.0 | 2.1.0 | 2.99.99 |
| 3.0.1 | 2.1.0 | 2.99.99 |
| 3.1.0 | 2.1.0 | 2.99.99 |
27 changes: 27 additions & 0 deletions docs/admin/release_notes/version_3.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

## [v3.1.0 (2024-09-06)](https://github.com/nautobot/nautobot-app-ssot/releases/tag/v3.1.0)

### Added

- [#527](https://github.com/nautobot/nautobot-app-ssot/issues/527) - Added Python 3.12 support.
- [#528](https://github.com/nautobot/nautobot-app-ssot/issues/528) - Added DNA Center integration to _MIN_NAUTOBOT_VERSION as it requires Nautobot 2.2 for Controller object.

### Changed

- [#526](https://github.com/nautobot/nautobot-app-ssot/issues/526) - Updated the ExampleDataSource job to improve memory utilization with large data sets.
- [#526](https://github.com/nautobot/nautobot-app-ssot/issues/526) - Changed memory profiling logging output to format bytes into KiB/MiB.

### Fixed

- [#521](https://github.com/nautobot/nautobot-app-ssot/issues/521) - Fixed generalized Exception with SecretsGroup and add custom Exception in case SecretsGroup not found on ExternalIntegration.
- [#528](https://github.com/nautobot/nautobot-app-ssot/issues/528) - Fixed bug preventing use of Nautobot 2.1 due to ACI requiring 2.2.
- [#528](https://github.com/nautobot/nautobot-app-ssot/issues/528) - Fixed JobResult association to Sync object to CASCADE instead of PROTECT so Sync object is deleted when JobResult is instead of preventing deletion.
- [#530](https://github.com/nautobot/nautobot-app-ssot/issues/530) - Fixed Infoblox Configuration List Bug when on Nautobot 2.3 by disabling SSOTInfobloxConfig from being a saved view.

### Documentation

- [#520](https://github.com/nautobot/nautobot-app-ssot/issues/520) - Added instructions for enabling Infoblox integration.

### Housekeeping

- [#527](https://github.com/nautobot/nautobot-app-ssot/issues/527) - Rebaked from the cookie 'nautobot-app-v2.3.2'.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ nav:
- Compatibility Matrix: "admin/compatibility_matrix.md"
- Release Notes:
- "admin/release_notes/index.md"
- v3.1: "admin/release_notes/version_3.1.md"
- v3.0: "admin/release_notes/version_3.0.md"
- v2.8: "admin/release_notes/version_2.8.md"
- v2.7: "admin/release_notes/version_2.7.md"
Expand Down
27 changes: 1 addition & 26 deletions nautobot_ssot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import os
from importlib import metadata

import packaging
from django.conf import settings
from nautobot.core.settings_funcs import is_truthy
from nautobot.extras.plugins import NautobotAppConfig

from nautobot_ssot.integrations.utils import each_enabled_integration, each_enabled_integration_module
from nautobot_ssot.integrations.utils import each_enabled_integration_module

logger = logging.getLogger("nautobot.ssot")
__version__ = metadata.version(__name__)
Expand All @@ -25,28 +24,6 @@
"nautobot_ssot_servicenow",
]

_MIN_NAUTOBOT_VERSION = {
"nautobot_ssot_aci": "2.2",
"nautobot_ssot_dna_center": "2.2",
}


def _check_min_nautobot_version_met():
incompatible_apps_msg = []
nautobot_version = metadata.version("nautobot")
enabled_integrations = list(each_enabled_integration())
for app, nb_ver in _MIN_NAUTOBOT_VERSION.items():
if app.replace("nautobot_ssot_", "") in enabled_integrations and packaging.version.parse(
nb_ver
) > packaging.version.parse(nautobot_version):
incompatible_apps_msg.append(f"The `{app}` requires Nautobot version {nb_ver} or higher.\n")

if incompatible_apps_msg:
raise RuntimeError(
f"This version of Nautobot ({nautobot_version}) does not meet minimum requirements for the following apps:\n {''.join(incompatible_apps_msg)}."
"See: https://docs.nautobot.com/projects/ssot/en/latest/admin/upgrade/#potential-apps-conflicts"
)


def _check_for_conflicting_apps():
intersection = set(_CONFLICTING_APP_NAMES).intersection(set(settings.PLUGINS))
Expand All @@ -60,8 +37,6 @@ def _check_for_conflicting_apps():
if not is_truthy(os.getenv("NAUTOBOT_SSOT_ALLOW_CONFLICTING_APPS", "False")):
_check_for_conflicting_apps()

_check_min_nautobot_version_met()


class NautobotSSOTAppConfig(NautobotAppConfig):
"""App configuration for the nautobot_ssot app."""
Expand Down
28 changes: 27 additions & 1 deletion nautobot_ssot/jobs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
"""App provision of Nautobot Job subclasses."""

import logging
from importlib import metadata

import packaging
from django.conf import settings
from nautobot.core.celery import register_jobs
from nautobot.core.settings_funcs import is_truthy
from nautobot.extras.models import Job

from nautobot_ssot.integrations.utils import each_enabled_integration_module
from nautobot_ssot.integrations.utils import each_enabled_integration, each_enabled_integration_module
from nautobot_ssot.jobs.base import DataSource, DataTarget
from nautobot_ssot.jobs.examples import ExampleDataSource, ExampleDataTarget

logger = logging.getLogger("nautobot.ssot")

_MIN_NAUTOBOT_VERSION = {
"nautobot_ssot_aci": "2.2",
"nautobot_ssot_dna_center": "2.2",
}


hide_jobs_setting = settings.PLUGINS_CONFIG["nautobot_ssot"].get("hide_example_jobs", False)
if is_truthy(hide_jobs_setting):
jobs = []
Expand All @@ -29,6 +37,23 @@ def __init__(self, message):
super().__init__(self.message)


def _check_min_nautobot_version_met():
incompatible_apps_msg = []
nautobot_version = metadata.version("nautobot")
enabled_integrations = list(each_enabled_integration())
for app, nb_ver in _MIN_NAUTOBOT_VERSION.items():
if app.replace("nautobot_ssot_", "") in enabled_integrations and packaging.version.parse(
nb_ver
) > packaging.version.parse(nautobot_version):
incompatible_apps_msg.append(f"The `{app}` requires Nautobot version {nb_ver} or higher.\n")

if incompatible_apps_msg:
raise RuntimeError(
f"This version of Nautobot ({nautobot_version}) does not meet minimum requirements for the following apps:\n {''.join(incompatible_apps_msg)}."
"See: https://docs.nautobot.com/projects/ssot/en/latest/admin/upgrade/#potential-apps-conflicts"
)


def _add_integrations():
for module in each_enabled_integration_module("jobs"):
for job in module.jobs:
Expand All @@ -38,6 +63,7 @@ def _add_integrations():
jobs.append(job)


_check_min_nautobot_version_met()
_add_integrations()
register_jobs(*jobs)

Expand Down
5 changes: 1 addition & 4 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nautobot-ssot"
version = "3.0.1"
version = "3.1.1a0"
description = "Nautobot Single Source of Truth"
authors = ["Network to Code, LLC <[email protected]>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 091fb3a

Please sign in to comment.