diff --git a/.cookiecutter.json b/.cookiecutter.json index cf6b786ec..779e3c36e 100644 --- a/.cookiecutter.json +++ b/.cookiecutter.json @@ -21,16 +21,13 @@ "_drift_manager": { "template": "https://github.com/nautobot/cookiecutter-nautobot-app.git", "template_dir": "nautobot-app", - "template_ref": "refs/tags/nautobot-app-v2.4.2", + "template_ref": "nautobot-app-v2.5.1", "cookie_dir": "", "branch_prefix": "drift-manager", "pull_request_strategy": "create", - "post_actions": [ - "ruff", - "poetry" - ], + "post_actions": [], "draft": false, - "baked_commit_ref": "cc1a95931455ed52b0a30b22257e5c8fbdcd212d" + "baked_commit_ref": "bef141f8bdbc25beec0f7138010447b8e8e9fee4" } } } diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8d0594cba..5c20df5aa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,6 +1,8 @@ --- name: 🐛 Bug Report about: Report a reproducible bug in the current release of nautobot-golden-config +labels: + - "type: bug" --- ### Environment diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 3506acdeb..31f9f647e 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,8 @@ --- name: ✨ Feature Request about: Propose a new feature or enhancement - +labels: + - "type: feature" --- ### Environment diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7cf1631ed..3013ce766 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -27,6 +27,7 @@ Please feel free to update todos to keep track of your own notes for WIP PRs. --> - [ ] Explanation of Change(s) +- [ ] Added change log fragment(s) (for more information see [the documentation](https://docs.nautobot.com/projects/core/en/stable/development/core/#creating-changelog-fragments)) - [ ] Attached Screenshots, Payload Example - [ ] Unit, Integration Tests - [ ] Documentation Updates (when adding/changing features) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8d8559c4b..da6d73ff4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,12 +82,26 @@ jobs: poetry-version: "1.8.5" - name: "Linting: yamllint" run: "poetry run invoke yamllint" + markdownlint: + runs-on: "ubuntu-22.04" + env: + INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True" + steps: + - name: "Check out repository code" + uses: "actions/checkout@v4" + - name: "Setup environment" + uses: "networktocode/gh-action-setup-poetry-environment@v6" + with: + poetry-version: "1.8.5" + - name: "Linting: markdownlint" + run: "poetry run invoke markdownlint" check-in-docker: needs: - "ruff-format" - "ruff-lint" - "poetry" - "yamllint" + - "markdownlint" runs-on: "ubuntu-22.04" strategy: fail-fast: true @@ -110,9 +124,9 @@ jobs: run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver" - name: "Set up Docker Buildx" id: "buildx" - uses: "docker/setup-buildx-action@v3" + uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0 - name: "Build" - uses: "docker/build-push-action@v5" + uses: "docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25" # v5.4.0 with: builder: "${{ steps.buildx.outputs.name }}" context: "./" @@ -126,8 +140,6 @@ jobs: NAUTOBOT_VER=${{ matrix.nautobot-version }} PYTHON_VER=${{ matrix.python-version }} CI=true - - name: "Copy credentials" - run: "cp development/creds.example.env development/creds.env" - name: "Linting: pylint" run: "poetry run invoke pylint" - name: "Checking: App Config" @@ -140,7 +152,7 @@ jobs: strategy: fail-fast: true matrix: - python-version: ["3.9", "3.12"] + python-version: ["3.9"] # 3.12 stable is tested in unittest_report stage. db-backend: ["postgresql"] nautobot-version: ["stable"] include: @@ -167,9 +179,60 @@ jobs: run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver" - name: "Set up Docker Buildx" id: "buildx" - uses: "docker/setup-buildx-action@v3" + uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0 + - name: "Build" + uses: "docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25" # v5.4.0 + with: + builder: "${{ steps.buildx.outputs.name }}" + context: "./" + push: false + load: true + tags: "${{ env.APP_NAME }}/nautobot:${{ matrix.nautobot-version }}-py${{ matrix.python-version }}" + file: "./development/Dockerfile" + cache-from: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}" + cache-to: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}" + build-args: | + NAUTOBOT_VER=${{ matrix.nautobot-version }} + PYTHON_VER=${{ matrix.python-version }} + CI=true + - name: "Use Mysql invoke settings when needed" + run: "cp invoke.mysql.yml invoke.yml" + if: "matrix.db-backend == 'mysql'" + - name: "Run Tests" + run: "poetry run invoke unittest" + + unittest_report: + needs: + - "check-in-docker" + strategy: + fail-fast: true + matrix: + python-version: ["3.12"] + db-backend: ["postgresql"] + nautobot-version: ["stable"] + runs-on: "ubuntu-22.04" + permissions: + pull-requests: "write" + contents: "write" + env: + INVOKE_NAUTOBOT_GOLDEN_CONFIG_PYTHON_VER: "${{ matrix.python-version }}" + INVOKE_NAUTOBOT_GOLDEN_CONFIG_NAUTOBOT_VER: "${{ matrix.nautobot-version }}" + steps: + - name: "Check out repository code" + uses: "actions/checkout@v4" + - name: "Setup environment" + uses: "networktocode/gh-action-setup-poetry-environment@v6" + with: + poetry-version: "1.8.5" + - name: "Constrain Nautobot version and regenerate lock file" + env: + INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "true" + run: "poetry run invoke lock --constrain-nautobot-ver --constrain-python-ver" + - name: "Set up Docker Buildx" + id: "buildx" + uses: "docker/setup-buildx-action@b5ca514318bd6ebac0fb2aedd5d36ec1b5c232a2" # v3.10.0 - name: "Build" - uses: "docker/build-push-action@v5" + uses: "docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25" # v5.4.0 with: builder: "${{ steps.buildx.outputs.name }}" context: "./" @@ -189,7 +252,28 @@ jobs: run: "cp invoke.mysql.yml invoke.yml" if: "matrix.db-backend == 'mysql'" - name: "Run Tests" - run: "poetry run invoke unittest" + run: "poetry run invoke unittest --coverage" + - name: "Generate Coverage Comment" + if: > + contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) && + (github.head_ref != 'main') && (!startsWith(github.head_ref, 'release')) + id: "coverage_comment" + uses: "py-cov-action/python-coverage-comment-action@d1ff8fbb5ff80feedb3faa0f6d7b424f417ad0e1" # v3.30 + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + MINIMUM_GREEN: 90 + MINIMUM_ORANGE: 80 + ANNOTATE_MISSING_LINES: true + ANNOTATION_TYPE: "warning" + - name: "Store Pull Request comment to be posted" + if: > + contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) && + (github.head_ref != 'main') && (!startsWith(github.head_ref, 'release')) + uses: "actions/upload-artifact@v4" + with: + name: "python-coverage-comment-action" + path: "python-coverage-comment-action.txt" + changelog: if: > contains(fromJson('["develop","ltm-1.6"]'), github.base_ref) && @@ -211,41 +295,39 @@ jobs: publish_gh: needs: - "unittest" + - "unittest_report" name: "Publish to GitHub" runs-on: "ubuntu-22.04" if: "startsWith(github.ref, 'refs/tags/v')" env: INVOKE_NAUTOBOT_GOLDEN_CONFIG_LOCAL: "True" + permissions: + contents: "write" steps: - name: "Check out repository code" uses: "actions/checkout@v4" - - name: "Set up Python" - uses: "actions/setup-python@v5" + - name: "Setup environment" + uses: "networktocode/gh-action-setup-poetry-environment@v6" with: + poetry-version: "1.8.5" python-version: "3.12" - - name: "Install Python Packages" - run: "pip install poetry" + poetry-install-options: "--no-root" - name: "Set env" run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV" - name: "Run Poetry Version" run: "poetry version $RELEASE_VERSION" - - name: "Install Dependencies (needed for mkdocs)" - run: "poetry install --no-root" - name: "Build Documentation" run: "poetry run invoke build-and-check-docs" - name: "Run Poetry Build" run: "poetry build" - name: "Upload binaries to release" - uses: "svenstaro/upload-release-action@v2" - with: - repo_token: "${{ secrets.GH_NAUTOBOT_BOT_TOKEN }}" - file: "dist/*" - tag: "${{ github.ref }}" - overwrite: true - file_glob: true + run: "gh release upload ${{ github.ref_name }} dist/*.{tar.gz,whl}" + env: + GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" publish_pypi: needs: - "unittest" + - "unittest_report" name: "Push Package to PyPI" runs-on: "ubuntu-22.04" if: "startsWith(github.ref, 'refs/tags/v')" @@ -254,24 +336,22 @@ jobs: steps: - name: "Check out repository code" uses: "actions/checkout@v4" - - name: "Set up Python" - uses: "actions/setup-python@v5" + - name: "Setup environment" + uses: "networktocode/gh-action-setup-poetry-environment@v6" with: + poetry-version: "1.8.5" python-version: "3.12" - - name: "Install Python Packages" - run: "pip install poetry" + poetry-install-options: "--no-root" - name: "Set env" run: "echo RELEASE_VERSION=${GITHUB_REF:10} >> $GITHUB_ENV" - name: "Run Poetry Version" run: "poetry version $RELEASE_VERSION" - - name: "Install Dependencies (needed for mkdocs)" - run: "poetry install --no-root" - name: "Build Documentation" run: "poetry run invoke build-and-check-docs" - name: "Run Poetry Build" run: "poetry build" - name: "Push to PyPI" - uses: "pypa/gh-action-pypi-publish@release/v1" + uses: "pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc" # v1.12.4 with: user: "__token__" password: "${{ secrets.PYPI_API_TOKEN }}" @@ -292,7 +372,7 @@ jobs: # ENVs cannot be used directly in job.if. This is a workaround to check # if SLACK_WEBHOOK_URL is present. if: "env.SLACK_WEBHOOK_URL != ''" - uses: "slackapi/slack-github-action@v1" + uses: "slackapi/slack-github-action@fcfb566f8b0aab22203f066d80ca1d7e4b5d05b3" # v1.27.1 with: payload: | { diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 000000000..089283094 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,36 @@ +--- +name: "Post coverage comment" + +on: # yamllint disable-line rule:truthy rule:comments + workflow_run: + workflows: ["CI"] + types: + - "completed" + +jobs: + test: + name: "Post coverage comment to PR" + runs-on: "ubuntu-latest" + if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' # yamllint disable-line rule:quoted-strings rule:comments + permissions: + # Gives the action the necessary permissions for publishing new + # comments in pull requests. + pull-requests: "write" + # Gives the action the necessary permissions for editing existing + # comments (to avoid publishing multiple comments in the same PR) + contents: "write" # yamllint disable-line rule:indentation rule:comments + # Gives the action the necessary permissions for looking up the + # workflow that launched this workflow, and download the related + # artifact that contains the comment to be published + actions: "read" + steps: + # DO NOT run actions/checkout here, for security reasons + # For details, refer to https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ + - name: "Post comment" + uses: "py-cov-action/python-coverage-comment-action@d1ff8fbb5ff80feedb3faa0f6d7b424f417ad0e13" # v3.30 + with: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GITHUB_PR_RUN_ID: "${{ github.event.workflow_run.id }}" + # Update those if you changed the default values: + # COMMENT_ARTIFACT_NAME: python-coverage-comment-action + # COMMENT_FILENAME: python-coverage-comment-action.txt diff --git a/.gitignore b/.gitignore index c812ea13e..0a1803598 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ nautobot_golden_config/transposer.py golden-config/ nautobot.sql +# Avoid accidental commit of analytics template override generated via ./docs/insert-analytics.sh +docs/assets/overrides/main.html + # Ansible Retry Files *.retry @@ -60,6 +63,7 @@ coverage.xml *.py,cover .hypothesis/ .pytest_cache/ +lcov.info # Translations *.mo diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 1aa8ad220..e18fecfb8 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,6 +11,9 @@ build: os: "ubuntu-22.04" tools: python: "3.11" + jobs: + pre_build: + - "/bin/bash ./docs/insert-analytics.sh" mkdocs: configuration: "mkdocs.yml" diff --git a/changes/+dynamic-form.changed b/changes/+dynamic-form.changed new file mode 100644 index 000000000..dbe85d0bb --- /dev/null +++ b/changes/+dynamic-form.changed @@ -0,0 +1 @@ +Changed the Golden Config Setting form to use dynamic dropdowns for the related models. \ No newline at end of file diff --git a/changes/+nautobot-app-v2-4-2.housekeeping b/changes/+nautobot-app-v2-4-2.housekeeping deleted file mode 100644 index c3274daf2..000000000 --- a/changes/+nautobot-app-v2-4-2.housekeeping +++ /dev/null @@ -1 +0,0 @@ -Rebaked from the cookie `nautobot-app-v2.4.2`. diff --git a/changes/+nautobot-app-v2.5.0.housekeeping b/changes/+nautobot-app-v2.5.0.housekeeping new file mode 100644 index 000000000..c6d9601ed --- /dev/null +++ b/changes/+nautobot-app-v2.5.0.housekeeping @@ -0,0 +1 @@ +Rebaked from the cookie `nautobot-app-v2.5.0`. diff --git a/changes/+nautobot-app-v2.5.1.housekeeping b/changes/+nautobot-app-v2.5.1.housekeeping new file mode 100644 index 000000000..2211b4807 --- /dev/null +++ b/changes/+nautobot-app-v2.5.1.housekeeping @@ -0,0 +1 @@ +Rebaked from the cookie `nautobot-app-v2.5.1`. diff --git a/changes/870.added b/changes/870.added new file mode 100644 index 000000000..f24f54f66 --- /dev/null +++ b/changes/870.added @@ -0,0 +1 @@ +Added the ability to sync remediation settings from a Git repository. \ No newline at end of file diff --git a/changes/881.fixed b/changes/881.fixed deleted file mode 100644 index f59794407..000000000 --- a/changes/881.fixed +++ /dev/null @@ -1 +0,0 @@ -Fixed generate intended config view to use Golden Config `sot_agg_transposer`. diff --git a/changes/886.changed b/changes/886.changed deleted file mode 100644 index 048c0e679..000000000 --- a/changes/886.changed +++ /dev/null @@ -1 +0,0 @@ -Updated the generate intended config api to perform a shallow git clone. diff --git a/changes/898.added b/changes/898.added new file mode 100644 index 000000000..eb133ad49 --- /dev/null +++ b/changes/898.added @@ -0,0 +1 @@ +Added tests to ensure that mkdocs release notes are properly set. \ No newline at end of file diff --git a/changes/899.fixed b/changes/899.fixed new file mode 100644 index 000000000..21a308f00 --- /dev/null +++ b/changes/899.fixed @@ -0,0 +1 @@ +Fixed template include errors during intended config rendering due to incorrect Jinja root path. \ No newline at end of file diff --git a/changes/902.changed b/changes/902.changed new file mode 100644 index 000000000..ae718bc23 --- /dev/null +++ b/changes/902.changed @@ -0,0 +1 @@ +Upgraded from hier_config v2.2.2 to v3.2.2, which is a breaking change from the hier_config side. The hier_config implementation was updated to reflect hier_config v3. \ No newline at end of file diff --git a/changes/921.added b/changes/921.added new file mode 100644 index 000000000..8f5a33b41 --- /dev/null +++ b/changes/921.added @@ -0,0 +1 @@ +Add testing for the two issues with mkdocs versus markdown rendering and associated fixes. \ No newline at end of file diff --git a/changes/940.fixed b/changes/940.fixed new file mode 100644 index 000000000..b1e66fa12 --- /dev/null +++ b/changes/940.fixed @@ -0,0 +1 @@ +Implement a more performant ORM/DB query in-place of the existing for loop logic for device_to_settings_map. diff --git a/changes/951.fixed b/changes/951.fixed new file mode 100644 index 000000000..331d5dbc6 --- /dev/null +++ b/changes/951.fixed @@ -0,0 +1 @@ +Fixed potential duplicates in data migration by adding a check to validate time uniqueness. \ No newline at end of file diff --git a/changes/955.added b/changes/955.added new file mode 100644 index 000000000..7568dd594 --- /dev/null +++ b/changes/955.added @@ -0,0 +1 @@ +Added an option to fail the Config Plan Deployment Job if any tasks for any device fails. \ No newline at end of file diff --git a/changes/961.housekeeping b/changes/961.housekeeping new file mode 100644 index 000000000..2d3fa81db --- /dev/null +++ b/changes/961.housekeeping @@ -0,0 +1 @@ +Migrate Golden Config Setting, Config Plan, Golden Config models to UI Component Framework. diff --git a/changes/969.documentation b/changes/969.documentation new file mode 100644 index 000000000..d29c88f59 --- /dev/null +++ b/changes/969.documentation @@ -0,0 +1 @@ +Added Analytics GTM template override only to the public ReadTheDocs build. diff --git a/changes/970.housekeeping b/changes/970.housekeeping new file mode 100644 index 000000000..59b48abde --- /dev/null +++ b/changes/970.housekeeping @@ -0,0 +1 @@ +Regenerate lock file with poetry 1.8 version. diff --git a/development/Dockerfile b/development/Dockerfile index b391dcb55..c59cc81ae 100644 --- a/development/Dockerfile +++ b/development/Dockerfile @@ -9,8 +9,8 @@ # Accepts a desired Nautobot version as build argument, default to 2.4.2 ARG NAUTOBOT_VER="2.4.2" -# Accepts a desired Python version as build argument, default to 3.12 -ARG PYTHON_VER="3.12" +# Accepts a desired Python version as build argument, default to 3.11 +ARG PYTHON_VER="3.11" # Retrieve published development image of Nautobot base which should include most CI dependencies FROM ghcr.io/nautobot/nautobot-dev:${NAUTOBOT_VER}-py${PYTHON_VER} diff --git a/development/development.env b/development/development.env index 175bf91af..d7b57daf4 100644 --- a/development/development.env +++ b/development/development.env @@ -38,6 +38,9 @@ MYSQL_USER=${NAUTOBOT_DB_USER} MYSQL_DATABASE=${NAUTOBOT_DB_NAME} MYSQL_ROOT_HOST=% +# Use a less verbose log level for Celery Beat +NAUTOBOT_BEAT_LOG_LEVEL=INFO + # Golden Configuration specific PER_FEATURE_WIDTH=13 PER_FEATURE_HEIGHT=4 diff --git a/development/docker-compose.base.yml b/development/docker-compose.base.yml index 0b6ac1a28..338bc27ab 100644 --- a/development/docker-compose.base.yml +++ b/development/docker-compose.base.yml @@ -41,8 +41,8 @@ services: beat: entrypoint: - "sh" - - "-c" # this is to evaluate the $NAUTOBOT_LOG_LEVEL from the env - - "nautobot-server celery beat -l $$NAUTOBOT_LOG_LEVEL" ## $$ because of docker-compose + - "-c" # this is to evaluate the $NAUTOBOT_BEAT_LOG_LEVEL from the env + - "nautobot-server celery beat -l $$NAUTOBOT_BEAT_LOG_LEVEL" ## $$ because of docker-compose depends_on: nautobot: condition: "service_healthy" diff --git a/development/docker-compose.dev.yml b/development/docker-compose.dev.yml index 2a1987278..c2e1e0179 100644 --- a/development/docker-compose.dev.yml +++ b/development/docker-compose.dev.yml @@ -15,7 +15,7 @@ services: # have all of your projects in the same directory. Uncomment out as required. # - "../../netutils/netutils:/usr/local/lib/python3.11/site-packages/netutils" # - "../../nornir-nautobot/nornir_nautobot:/usr/local/lib/python3.11/site-packages/nornir_nautobot" - # - "../../nautobot-plugin-nornir/nautobot_plugin_nornir:/usr/local/lib/python3.11/site-packages/nautobot_plugin_nornir" + - "../../nautobot-plugin-nornir/nautobot_plugin_nornir:/usr/local/lib/python3.11/site-packages/nautobot_plugin_nornir" # - "../../nautobot/nautobot:/usr/local/lib/python3.11/site-packages/nautobot" healthcheck: @@ -39,7 +39,7 @@ services: - "sh" - "-c" # this is to evaluate the $NAUTOBOT_LOG_LEVEL from the env - "watchmedo auto-restart --directory './' --pattern '*.py' --recursive -- nautobot-server celery worker -l $$NAUTOBOT_LOG_LEVEL --events" ## $$ because of docker-compose - # - "watchmedo auto-restart --directory './' --directory '/usr/local/lib/python3.11/site-packages/' --pattern '*.py' --recursive -- nautobot-server celery worker -l $$NAUTOBOT_LOG_LEVEL --events" ## $$ because of docker-compose + - "watchmedo auto-restart --directory './' --directory '/usr/local/lib/python3.11/site-packages/' --pattern '*.py' --recursive -- nautobot-server celery worker -l $$NAUTOBOT_LOG_LEVEL --events" ## $$ because of docker-compose volumes: - "./nautobot_config.py:/opt/nautobot/nautobot_config.py" - "../:/source" @@ -47,15 +47,15 @@ services: # have all of your projects in the same directory. Uncomment out as required. # - "../../netutils/netutils:/usr/local/lib/python3.11/site-packages/netutils" # - "../../nornir-nautobot/nornir_nautobot:/usr/local/lib/python3.11/site-packages/nornir_nautobot" - # - "../../nautobot-plugin-nornir/nautobot_plugin_nornir:/usr/local/lib/python3.11/site-packages/nautobot_plugin_nornir" + - "../../nautobot-plugin-nornir/nautobot_plugin_nornir:/usr/local/lib/python3.11/site-packages/nautobot_plugin_nornir" # - "../../nautobot/nautobot:/usr/local/lib/python3.11/site-packages/nautobot" healthcheck: test: ["CMD", "true"] # Due to layering, disable: true won't work. Instead, change the test beat: entrypoint: - "sh" - - "-c" # this is to evaluate the $NAUTOBOT_LOG_LEVEL from the env - - "watchmedo auto-restart --directory './' --pattern '*.py' --recursive -- nautobot-server celery beat -l $$NAUTOBOT_LOG_LEVEL" ## $$ because of docker-compose + - "-c" # this is to evaluate the $NAUTOBOT_BEAT_LOG_LEVEL from the env + - "watchmedo auto-restart --directory './' --pattern '*.py' --recursive -- nautobot-server celery beat -l $$NAUTOBOT_BEAT_LOG_LEVEL" ## $$ because of docker-compose volumes: - "./nautobot_config.py:/opt/nautobot/nautobot_config.py" - "../:/source" diff --git a/development/docker-compose.mysql.yml b/development/docker-compose.mysql.yml index 6751d7207..77190d89e 100644 --- a/development/docker-compose.mysql.yml +++ b/development/docker-compose.mysql.yml @@ -22,7 +22,7 @@ services: - "creds.env" - "development_mysql.env" db: - image: "mysql:8" + image: "mysql:lts" command: - "--max_connections=1000" env_file: diff --git a/development/docker-compose.postgres.yml b/development/docker-compose.postgres.yml index 8d96fdba9..12b8f85d3 100644 --- a/development/docker-compose.postgres.yml +++ b/development/docker-compose.postgres.yml @@ -4,7 +4,7 @@ services: environment: - "NAUTOBOT_DB_ENGINE=django.db.backends.postgresql" db: - image: "postgres:13-alpine" + image: "postgres:17-alpine" command: - "-c" - "max_connections=200" diff --git a/development/nautobot_config.py b/development/nautobot_config.py index 45b81386b..2a43f5cb1 100644 --- a/development/nautobot_config.py +++ b/development/nautobot_config.py @@ -135,6 +135,7 @@ }, }, }, + "use_config_context": {"connection_options": True}, }, "nautobot_golden_config": { "per_feature_bar_width": float(os.environ.get("PER_FEATURE_BAR_WIDTH", 0.15)), diff --git a/development/towncrier_template.j2 b/development/towncrier_template.j2 index 8b0f7f872..61903f817 100644 --- a/development/towncrier_template.j2 +++ b/development/towncrier_template.j2 @@ -1,9 +1,7 @@ # v{{ versiondata.version.split(".")[:2] | join(".") }} Release Notes -This document describes all new features and changes in the release. The format is based on [Keep a -Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic -Versioning](https://semver.org/spec/v2.0.0.html). +This document describes all new features and changes in the release. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Release Overview diff --git a/docs/admin/install.md b/docs/admin/install.md index 10549ed14..fde63f572 100644 --- a/docs/admin/install.md +++ b/docs/admin/install.md @@ -99,9 +99,9 @@ The app behavior can be controlled with the following list of settings. All of t You can easily manage these feature toggles in the UI: - 1. Navigate to **Golden Config > Golden Config Settings**. - 2. Select **Default Settings** (or your chosen Setting if multiple exist). - 3. Click **Edit** and adjust the relevant toggles (e.g., **Enable Backup**, **Enable Compliance**, **Enable Intended**, **Enable Plan**, **Enable Deploy**). +1. Navigate to **Golden Config > Golden Config Settings**. +2. Select **Default Settings** (or your chosen Setting if multiple exist). +3. Click **Edit** and adjust the relevant toggles (e.g., **Enable Backup**, **Enable Compliance**, **Enable Intended**, **Enable Plan**, **Enable Deploy**). ![Golden Config Settings List](../images/golden-config-settings-list.png) diff --git a/docs/admin/release_notes/version_0.9.md b/docs/admin/release_notes/version_0.9.md index 36470912d..7149e7768 100644 --- a/docs/admin/release_notes/version_0.9.md +++ b/docs/admin/release_notes/version_0.9.md @@ -90,9 +90,9 @@ ### Added - - [#81](https://github.com/nautobot/nautobot-app-golden-config/issues/85) Added changelog - - [#74](https://github.com/nautobot/nautobot-app-golden-config/issues/74) Added hover text to icon on app home screen - - [#84](https://github.com/nautobot/nautobot-app-golden-config/issues/84) Added auto-deploy to PyPI +- [#81](https://github.com/nautobot/nautobot-app-golden-config/issues/85) Added changelog +- [#74](https://github.com/nautobot/nautobot-app-golden-config/issues/74) Added hover text to icon on app home screen +- [#84](https://github.com/nautobot/nautobot-app-golden-config/issues/84) Added auto-deploy to PyPI ### Fixed diff --git a/docs/admin/release_notes/version_2.0.md b/docs/admin/release_notes/version_2.0.md index c59f0ee38..2916ba1eb 100755 --- a/docs/admin/release_notes/version_2.0.md +++ b/docs/admin/release_notes/version_2.0.md @@ -26,6 +26,7 @@ ### Housekeeping - [#741](https://github.com/nautobot/nautobot-app-golden-config/issues/741) - Re-baked from the latest template. + ## v2.0.3 2024-03 ### Added diff --git a/docs/admin/release_notes/version_2.4.md b/docs/admin/release_notes/version_2.4.md index 84e89525b..013b583be 100644 --- a/docs/admin/release_notes/version_2.4.md +++ b/docs/admin/release_notes/version_2.4.md @@ -16,6 +16,29 @@ Versioning](https://semver.org/spec/v2.0.0.html). - Updated nautobot-plugin-nornir dependency minimum to 2.2.1. - Changed multiple detail views to use new component UI functionality. +## [v2.4.1 (2025-05-09)](https://github.com/nautobot/nautobot-app-golden-config/releases/tag/v2.4.1) + +### Added + +- [#898](https://github.com/nautobot/nautobot-app-golden-config/issues/898) - Added tests to ensure that mkdocs release notes are properly set. +- [#921](https://github.com/nautobot/nautobot-app-golden-config/issues/921) - Add testing for the two issues with mkdocs versus markdown rendering and associated fixes. + +### Changed + +- [#886](https://github.com/nautobot/nautobot-app-golden-config/issues/886) - Updated the generate intended config api to perform a shallow git clone. + +### Fixed + +- [#794](https://github.com/nautobot/nautobot-app-golden-config/issues/794) - Fixed Git Repo Sync issue when multiple platforms use the same network_driver. +- [#881](https://github.com/nautobot/nautobot-app-golden-config/issues/881) - Fixed generate intended config view to use Golden Config `sot_agg_transposer`. +- [#887](https://github.com/nautobot/nautobot-app-golden-config/issues/887) - Fixed copy button not hidden on diff tab in generate intended config tool. +- [#924](https://github.com/nautobot/nautobot-app-golden-config/issues/924) - Fixed copy button not working on detail views. +- [#906](https://github.com/nautobot/nautobot-app-golden-config/issues/906) - Fix missing post processing enable check in deploy task. + +### Housekeeping + +- Rebaked from the cookie `nautobot-app-v2.4.2`. + ## [v2.4.0 (2025-02-20)](https://github.com/nautobot/nautobot-app-golden-config/releases/tag/v2.4.0) diff --git a/docs/admin/troubleshooting/E3032.md b/docs/admin/troubleshooting/E3032.md index 8b3a9c169..883383ed8 100644 --- a/docs/admin/troubleshooting/E3032.md +++ b/docs/admin/troubleshooting/E3032.md @@ -2,21 +2,16 @@ ## Message emitted: -`E3032: Disabled Golden Config setting.` +`E3032: Reference to {yaml_attr_name}: {yaml_attr_value}, is not unique. Please use platform_name key instead.` ## Description: -This error occurs when a required feature is disabled in Golden Config, preventing the task from executing properly. - -The features affected by this error include: -* Configuration backup -* Intended configuration -* Compliance execution +Syncing Golden Config properties using Datasource feature, but using non-unique key.. ## Troubleshooting: -Review the exception message to identify the cause of the failure. +Check the YAML file for the `platform_slug` or `platform_network_driver` key. If it is not unique, then you need to use the `platform_name` key instead. ## Recommendation: -Enable the feature in the Golden Configuration Settings to execute the task. +Migrate the YAML file keys from `platform_slug` or `platform_network_driver` to `platform_name`. diff --git a/docs/admin/troubleshooting/E3033.md b/docs/admin/troubleshooting/E3033.md index 1b17c7e9a..7735e0e33 100644 --- a/docs/admin/troubleshooting/E3033.md +++ b/docs/admin/troubleshooting/E3033.md @@ -2,16 +2,16 @@ ## Message emitted: -`E3033: Missing required settings.` +`E3033: Reference to {yaml_attr_name}: {yaml_attr_value} is not available.` ## Description: -This error occurs when a feature is missing in Golden Config, but is required to execute the task. Currently, this applies to the intended feature, which requires an SoT Agg (GraphQL) query to render templates from device data. +Searching for the platform key in the YAML file and it cannot be found in the database. ## Troubleshooting: -Review the exception message to determine the cause of the failure. +The platform key used in the YAML file cannot be found. ## Recommendation: -Double-check the intended and template configurations to ensure all required fields are populated and enabled. +Check the YAML file for misspellings or incorrect values, if using `platform_slug` or `platform_network_driver`, then migrate to `platform_name` key instead. diff --git a/docs/admin/troubleshooting/E3038.md b/docs/admin/troubleshooting/E3038.md new file mode 100644 index 000000000..165ce83b4 --- /dev/null +++ b/docs/admin/troubleshooting/E3038.md @@ -0,0 +1,23 @@ +# E3038 Details + +## Message emitted: + +`E3038: Disabled Golden Config setting.` + +## Description: + +This error occurs when a required feature is disabled in Golden Config, preventing the task from executing properly. + +The features affected by this error include: + +* Configuration backup +* Intended configuration +* Compliance execution + +## Troubleshooting: + +Review the exception message to identify the cause of the failure. + +## Recommendation: + +Enable the feature in the Golden Configuration Settings to execute the task. \ No newline at end of file diff --git a/docs/admin/troubleshooting/E3039.md b/docs/admin/troubleshooting/E3039.md new file mode 100644 index 000000000..14431facf --- /dev/null +++ b/docs/admin/troubleshooting/E3039.md @@ -0,0 +1,17 @@ +# E3039 Details + +## Message emitted: + +`E3039: Missing required settings.` + +## Description: + +This error occurs when a feature is missing in Golden Config, but is required to execute the task. Currently, this applies to the intended feature, which requires an SoT Agg (GraphQL) query to render templates from device data. + +## Troubleshooting: + +Review the exception message to determine the cause of the failure. + +## Recommendation: + +Double-check the intended and template configurations to ensure all required fields are populated and enabled. diff --git a/docs/admin/troubleshooting/E3XXX.md b/docs/admin/troubleshooting/E3XXX.md new file mode 100755 index 000000000..08859bbf4 --- /dev/null +++ b/docs/admin/troubleshooting/E3XXX.md @@ -0,0 +1,17 @@ +# E3XXX Details + +## Message emitted: + +`E3XXX: Un-Registered Error Code used.` + +## Description: + +This means a code snippet was calling get_error_code() with an error code that is not registered. + +## Troubleshooting: + +Find the error code in the traceback, and search for it in the codebase. + +## Recommendation: + +Add the error code to the `error_codes.py` file. \ No newline at end of file diff --git a/docs/assets/overrides/partials/copyright.html b/docs/assets/overrides/partials/copyright.html index b92cf5e3f..d213bc5bf 100644 --- a/docs/assets/overrides/partials/copyright.html +++ b/docs/assets/overrides/partials/copyright.html @@ -10,7 +10,7 @@