Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
edabf2f
Fixed copy button not hidden on diff tab in generate intended config …
gsnider2195 Apr 2, 2025
7ea2d11
Added tests to ensure that mkdocs release notes are properly set. (#898)
itdependsnetworks Apr 5, 2025
295370f
Add testing for the two issues with mkdocs versus markdown rendering …
itdependsnetworks Apr 12, 2025
fe17bd5
Fixed copy button not working on detail views (#924)
itdependsnetworks Apr 16, 2025
e78a64d
Fix 794 issue with repo syncs with multiple platforms using same netw…
jeffkala Apr 22, 2025
b21a4f3
initial fix for 906 unable to deploy in 2.4.0 (#926)
jeffkala May 9, 2025
b4bc518
Release v2.4.1a1
mattmiller87 Apr 29, 2025
b38fe22
Release v2.4.1
jeffkala May 9, 2025
20f5f3d
Merge pull request #928 from nautobot/release/2.4.1a1
jeffkala May 9, 2025
418e03c
Bump version
jeffkala May 9, 2025
fe24e14
Merge pull request #934 from nautobot/release-2.4.1-to-develop
itdependsnetworks May 9, 2025
48ee70e
Cookie updated by NetworkToCode Cookie Drift Manager Tool (#927)
nautobot-bot May 10, 2025
85cc758
Changing the settings form to use dynamic dropdowns (#916)
joewesch May 10, 2025
51e8e49
sync in develop
jeffkala May 13, 2025
1375958
renumber error codes after develop merge
jeffkala May 13, 2025
1bc1b24
Fix relative path resolution for Jinja templates when rendering (#935)
robertoduarte-codilime May 14, 2025
ada0e03
initial working gc settings
jeffkala May 15, 2025
39d4876
Change for loop to DB query for device to settings map (#941)
jeffkala May 17, 2025
f8557cd
start working through new settings methods
jeffkala May 17, 2025
fc9df61
merge in develop
jeffkala May 17, 2025
6ff5e4d
another pass of new implementation
jeffkala May 17, 2025
58f7237
more updates
jeffkala Jun 12, 2025
780488e
all jobs working poc1
jeffkala Jun 18, 2025
a99998b
initial stab at upgrading hier config in golden config
jtdub Feb 27, 2025
388a924
ruff check
jtdub Feb 27, 2025
09de272
change remediatin_config to property.
jtdub Feb 27, 2025
157662b
pylint
jtdub Feb 27, 2025
779b665
set remediation_options variable
jtdub Feb 27, 2025
7e3bf52
add remediation tests
jtdub Feb 28, 2025
eb7e733
pylint
jtdub Feb 28, 2025
315adab
Added tests to ensure that mkdocs release notes are properly set. (#898)
itdependsnetworks Apr 5, 2025
3b84708
Add testing for the two issues with mkdocs versus markdown rendering …
itdependsnetworks Apr 12, 2025
bf4bf20
Cookie updated by NetworkToCode Cookie Drift Manager Tool (#927)
nautobot-bot May 10, 2025
b62fb0a
initial stab at upgrading hier config in golden config
jtdub Feb 27, 2025
06e9fe0
update docstring and exceptions
jtdub Jun 27, 2025
0016999
ruff
jtdub Jun 27, 2025
2a52816
pylint
jtdub Jun 27, 2025
daec19b
remove duplicate line
jtdub Jun 27, 2025
a2f7004
pylint
jtdub Jun 27, 2025
5ddad5c
Merge pull request #902 from nautobot/hierv3
jtdub Jun 27, 2025
f9d822b
get unittest passing and other updates
jeffkala Jul 3, 2025
683694d
Verify no other object has same time before changing it (#952)
icovada Jul 7, 2025
cf1ce81
Added Analytics template override only to RTD docs build (#969)
cmsirbu Jul 25, 2025
aeb4569
Adding a fail option to config plan deployment job (#956)
joewesch Jul 29, 2025
699ebc7
Fix poetry lock file version (#971)
jeffkala Jul 29, 2025
a299fc2
migrate golden config setting model to ui component framework (#962)
jeffkala Aug 8, 2025
e6096af
Adding the ability to sync remediation settings via git (#958)
joewesch Aug 13, 2025
4630bdf
Cookie updated by NetworkToCode Cookie Drift Manager Tool (#980)
nautobot-bot Aug 22, 2025
afde01a
sync in develop
jeffkala Aug 30, 2025
0282f8e
commit before potentially starting over
jeffkala Aug 30, 2025
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
9 changes: 3 additions & 6 deletions .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
name: 🐛 Bug Report
about: Report a reproducible bug in the current release of nautobot-golden-config
labels:
- "type: bug"
---

### Environment
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
---
name: ✨ Feature Request
about: Propose a new feature or enhancement

labels:
- "type: feature"
---

### Environment
Expand Down
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
138 changes: 109 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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: "./"
Expand All @@ -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"
Expand All @@ -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:
Expand All @@ -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: "./"
Expand All @@ -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) &&
Expand All @@ -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')"
Expand All @@ -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 }}"
Expand All @@ -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: |
{
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -60,6 +63,7 @@ coverage.xml
*.py,cover
.hypothesis/
.pytest_cache/
lcov.info

# Translations
*.mo
Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions changes/+dynamic-form.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Changed the Golden Config Setting form to use dynamic dropdowns for the related models.
1 change: 0 additions & 1 deletion changes/+nautobot-app-v2-4-2.housekeeping

This file was deleted.

1 change: 1 addition & 0 deletions changes/+nautobot-app-v2.5.0.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebaked from the cookie `nautobot-app-v2.5.0`.
1 change: 1 addition & 0 deletions changes/+nautobot-app-v2.5.1.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rebaked from the cookie `nautobot-app-v2.5.1`.
1 change: 1 addition & 0 deletions changes/870.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added the ability to sync remediation settings from a Git repository.
1 change: 0 additions & 1 deletion changes/881.fixed

This file was deleted.

1 change: 0 additions & 1 deletion changes/886.changed

This file was deleted.

1 change: 1 addition & 0 deletions changes/898.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added tests to ensure that mkdocs release notes are properly set.
1 change: 1 addition & 0 deletions changes/899.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed template include errors during intended config rendering due to incorrect Jinja root path.
1 change: 1 addition & 0 deletions changes/902.changed
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions changes/921.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add testing for the two issues with mkdocs versus markdown rendering and associated fixes.
1 change: 1 addition & 0 deletions changes/940.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Implement a more performant ORM/DB query in-place of the existing for loop logic for device_to_settings_map.
1 change: 1 addition & 0 deletions changes/951.fixed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed potential duplicates in data migration by adding a check to validate time uniqueness.
1 change: 1 addition & 0 deletions changes/955.added
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added an option to fail the Config Plan Deployment Job if any tasks for any device fails.
1 change: 1 addition & 0 deletions changes/961.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Migrate Golden Config Setting, Config Plan, Golden Config models to UI Component Framework.
1 change: 1 addition & 0 deletions changes/969.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added Analytics GTM template override only to the public ReadTheDocs build.
1 change: 1 addition & 0 deletions changes/970.housekeeping
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Regenerate lock file with poetry 1.8 version.
Loading
Loading