Skip to content

Commit

Permalink
Merge pull request #94 from nautobot/releases/nautobot-app-v2.2.0
Browse files Browse the repository at this point in the history
Release nautobot-app-v2.2.0
  • Loading branch information
snaselj authored Mar 6, 2024
2 parents bd9eb53 + e496fc5 commit cb606c9
Show file tree
Hide file tree
Showing 35 changed files with 325 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Rebake Tag"
on: # yamllint disable-line rule:truthy
push:
tags:
- "nautobot-app-v2*"
- "nautobot-app-v2.*"
jobs:
rebake:
container: "ghcr.io/nautobot/cookiecutter-nautobot-app-drift-manager/prod:latest"
Expand All @@ -19,16 +19,17 @@ jobs:
- "chatops"
- "circuit-maintenance"
- "data-validation-engine"
- "dev-example"
- "device-lifecycle-mgmt"
- "device-onboarding"
- "firewall-models"
- "floor-plan"
- "golden-config"
- "netbox-importer"
- "nornir"
# - "nornir" # Postponed
- "secrets-providers"
- "ssot"
- "version-control"
# - "version-control" # Disabled as not Nautobot 2.0 ready
- "welcome-wizard"
steps:
- name: "Re-bake"
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ venv.bak/
# Rope project settings
.ropeproject

# Invoke overrides
invoke.yml

# mkdocs documentation
/site

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The following templates are available:
- [`nautobot-app-ssot`](./nautobot-app-ssot) - A template for creating a new Nautobot App that extends the capabilities of the Nautobot Single Source of Truth (SSoT) App. The [Nautobot SSoT App](https://github.com/nautobot/nautobot-app-ssot) facilitates integration and data synchronization between various "source of truth" (SoT) systems, with Nautobot acting as a central clearinghouse for data.
- [`nautobot-app-chatops`](./nautobot-app-chatops) - A template for creating a new Nautobot App that extends the capabilities of the Nautobot ChatOps App. The [Nautobot ChatOps App](https://github.com/nautobot/nautobot-app-chatops) provides a multi-chat-vendor framework for developing chat bots for Slack, Microsoft Teams, Cisco WebEx, & Mattermost.

To find out which template version corresponds to which Nautobot version, please check out the [Compatibility Matrix](https://docs.nautobot.com/projects/cookiecutter-nautobot-app/en/latest/admin/compatibility_matrix/) in the online documentation.

## Usage with Cookiecutter

Expand Down
38 changes: 38 additions & 0 deletions docs/admin/drift_management.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Drift Management

Drift management is a process that allows semi-automated updates of cookies (Nautobot apps) based on the changes to the cookiecutter template. Network to Code has built and maintains a private project that is used for drift management.

This process consists of the steps explained below.

## Push the Tag to the Repository

Pushing the release tag, e.g., `nautobot-app-v2.X.Y`, to the repository will trigger the GitHub Actions workflow. This workflow uses the latest `Drift Manager` Docker image to re-bake all the cookies specified in the workflow file.

## Examining the Workflow

The workflow runs individual jobs for each cookie. Each job runs the Drift Manager and creates a pull request with the drift changes since the last re-bake.

Individual jobs can fail for various reasons, including the presence of a stale drift pull request.

Stale drift pull requests must be either merged or closed manually; the drift management process will include the changes again along with any new drift in the next re-bake.

After resolving the cause of the failure, the job can be re-run by clicking the `Re-run jobs` button in the workflow.

## Pull Request Cleanup

Once the workflow finishes, it creates a pull request with the drift changes since the last re-bake for each cookie. If there are no changes, a pull request will not be generated.

Drift pull requests often require manual cleanup before being marked as ready for review. The reasons for this include:

- An obsolete `poetry.lock` file.
To resolve this, run `poetry lock --no-update` and commit the changes.
- Linter issues after updating the tooling.
To resolve these, run `invoke autoformat`. Manual code updates may also be needed.
- Code or documentation changes.
The drift manager might rewrite existing code or documentation. In such cases, the changes must be reverted manually.

## Reviewing and Merging the Pull Request

The standard review and merging procedures apply to drift pull requests. These pull requests can be merged only after the review is complete, and the CI checks have passed.

It is good practice to merge pull requests promptly to manage subsequent drift pull requests effectively and avoid issues with conflicts if other changes are pushed to the repository's `HEAD`.
18 changes: 18 additions & 0 deletions docs/admin/release_notes/version_2.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# v2.1 Release Notes

## [v2.1.0] - 2024-01-29

**Full Changelog**: https://github.com/nautobot/cookiecutter-nautobot-app/compare/nautobot-app-v2.0.0...nautobot-app-v2.1.0

### Added

- Added Drift Manager integration by @snaselj in https://github.com/nautobot/cookiecutter-nautobot-app/pull/30

### Changed

- Changed posthook by @whitej6 in https://github.com/nautobot/cookiecutter-nautobot-app/pull/70

### Fixed

- Fixed ruff exclude by @snaselj in https://github.com/nautobot/cookiecutter-nautobot-app/pull/65
- Fixed private selfhosted docs by @whitej6 in https://github.com/nautobot/cookiecutter-nautobot-app/pull/74
28 changes: 28 additions & 0 deletions docs/admin/release_notes/version_2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# v2.2 Release Notes

## [v2.2.0] - 2024-03-06

**Full Changelog**: https://github.com/nautobot/cookiecutter-nautobot-app/compare/nautobot-app-v2.1.0...nautobot-app-v2.2.0

### Added

- Added `nautobot-app-dev-example` to the drift management. #88
- Added link to compatibility matrix to `README.md`. #68
- Added mermaid support to docs. #83
- Added app config schema generation and validation. #75

### Changed

- Bumped CI actions versions. #92
- Changed logging to be single-line. #90
- Changed `invoke autoformat` not to use `ruff format`. #91
- Changed `README.md` references, to point to docs.nautobot.com. #79

### Fixed

- Fixed docs based on [NetBox importer PR](https://github.com/nautobot/nautobot-app-netbox-importer/pull/126). #86
- Fixed template on [ChatOps](https://github.com/nautobot/nautobot-app-chatops). #81

### Removed

- Removed `nautobot-app-nornir` from managed apps. #84
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ nav:
- "admin/release_notes/index.md"
- v1.0: "admin/release_notes/version_1.0.md"
- v2.0: "admin/release_notes/version_2.0.md"
- v2.1: "admin/release_notes/version_2.1.md"
- v2.2: "admin/release_notes/version_2.2.md"
- Drift Management: "admin/drift_management.md"
- Developer Guide:
- Contributing: "dev/contributing.md"
- Development Environment: "dev/dev_environment.md"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To avoid extra work and temporary links, make sure that publishing docs (or merg
<img src="https://raw.githubusercontent.com/{{ cookiecutter.github_org }}/{{ cookiecutter.project_slug }}/develop/docs/images/icon-{{ cookiecutter.app_slug }}.png" class="logo" height="200px">
<br>
<a href="{{ cookiecutter.repo_url }}/actions"><img src="{{ cookiecutter.repo_url }}/actions/workflows/ci.yml/badge.svg?branch=main"></a>
<a href="{{ cookiecutter.docs_app_url }}"><img src="https://readthedocs.org/projects/{{ cookiecutter.project_slug }}/badge/"></a>
<a href="{{ cookiecutter.docs_app_url }}/"><img src="https://readthedocs.org/projects/nautobot-plugin-{{ cookiecutter.base_url }}/badge/"></a>
<a href="https://pypi.org/project/{{ cookiecutter.app_slug }}/"><img src="https://img.shields.io/pypi/v/{{ cookiecutter.app_slug }}"></a>
<a href="https://pypi.org/project/{{ cookiecutter.app_slug }}/"><img src="https://img.shields.io/pypi/dm/{{ cookiecutter.app_slug }}"></a>
<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
"disable_existing_loggers": False,
"formatters": {
"normal": {
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)s :\n %(message)s",
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)s : %(message)s",
"datefmt": "%H:%M:%S",
},
"verbose": {
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)-20s %(filename)-15s %(funcName)30s() :\n %(message)s",
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)-20s %(filename)-15s %(funcName)30s() : %(message)s",
"datefmt": "%H:%M:%S",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Here you will find detailed instructions on how to **install** and **configure**
## Install Guide

!!! note
Apps can be installed manually or using Python's `pip`. See the [nautobot documentation](https://nautobot.readthedocs.io/en/latest/plugins/#install-the-package) for more details. The pip package name for this app is [`{{ cookiecutter.app_slug }}`](https://pypi.org/project/{{ cookiecutter.app_slug }}/).
Apps can be installed manually or using Python's `pip`. See the [nautobot documentation](https://docs.nautobot.com/projects/core/en/stable/plugins/#install-the-package) for more details. The pip package name for this app is [`{{ cookiecutter.app_slug }}`](https://pypi.org/project/{{ cookiecutter.app_slug }}/).

The app is available as a Python package via PyPI and can be installed with `pip`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license = "{{ cookiecutter.open_source_license }}"
readme = "README.md"
homepage = "{{ cookiecutter.repo_url }}"
repository = "{{ cookiecutter.repo_url }}"
documentation = "{{ cookiecutter.docs_app_url }}/"
keywords = ["nautobot", "nautobot-app", "nautobot-plugin", "nautobot-chatops"]
classifiers = [
"Intended Audience :: Developers",
Expand Down Expand Up @@ -61,6 +62,8 @@ mkdocs-version-annotations = "1.0.0"
mkdocstrings = "0.22.0"
mkdocstrings-python = "1.5.2"
towncrier = "~23.6.0"
to-json-schema = "*"
jsonschema = "*"

[tool.poetry.extras]
all = [
Expand Down Expand Up @@ -159,7 +162,7 @@ requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.towncrier]
package = "nautobot"
package = "{{ cookiecutter.app_name }}"
directory = "changes"
filename = "docs/admin/release_notes/version_X.Y.md"
template = "development/towncrier_template.j2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To avoid extra work and temporary links, make sure that publishing docs (or merg
<img src="https://raw.githubusercontent.com/{{ cookiecutter.github_org }}/{{ cookiecutter.project_slug }}/develop/docs/images/icon-{{ cookiecutter.app_slug }}.png" class="logo" height="200px">
<br>
<a href="{{ cookiecutter.repo_url }}/actions"><img src="{{ cookiecutter.repo_url }}/actions/workflows/ci.yml/badge.svg?branch=main"></a>
<a href="{{ cookiecutter.docs_app_url }}"><img src="https://readthedocs.org/projects/{{ cookiecutter.project_slug }}/badge/"></a>
<a href="{{ cookiecutter.docs_app_url }}/"><img src="https://readthedocs.org/projects/nautobot-plugin-{{ cookiecutter.base_url }}/badge/"></a>
<a href="https://pypi.org/project/{{ cookiecutter.app_slug }}/"><img src="https://img.shields.io/pypi/v/{{ cookiecutter.app_slug }}"></a>
<a href="https://pypi.org/project/{{ cookiecutter.app_slug }}/"><img src="https://img.shields.io/pypi/dm/{{ cookiecutter.app_slug }}"></a>
<br>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@
"disable_existing_loggers": False,
"formatters": {
"normal": {
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)s :\n %(message)s",
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)s : %(message)s",
"datefmt": "%H:%M:%S",
},
"verbose": {
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)-20s %(filename)-15s %(funcName)30s() :\n %(message)s",
"format": "%(asctime)s.%(msecs)03d %(levelname)-7s %(name)-20s %(filename)-15s %(funcName)30s() : %(message)s",
"datefmt": "%H:%M:%S",
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Here you will find detailed instructions on how to **install** and **configure**
## Install Guide

!!! note
Apps can be installed manually or using Python's `pip`. See the [nautobot documentation](https://nautobot.readthedocs.io/en/latest/plugins/#install-the-package) for more details. The pip package name for this app is [`{{ cookiecutter.app_slug }}`](https://pypi.org/project/{{ cookiecutter.app_slug }}/).
Apps can be installed manually or using Python's `pip`. See the [nautobot documentation](https://docs.nautobot.com/projects/core/en/stable/plugins/#install-the-package) for more details. The pip package name for this app is [`{{ cookiecutter.app_slug }}`](https://pypi.org/project/{{ cookiecutter.app_slug }}/).

The app is available as a Python package via PyPI and can be installed with `pip`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license = "{{ cookiecutter.open_source_license }}"
readme = "README.md"
homepage = "{{ cookiecutter.repo_url }}"
repository = "{{ cookiecutter.repo_url }}"
documentation = "{{ cookiecutter.docs_app_url }}/"
keywords = ["nautobot", "nautobot-app", "nautobot-plugin"]
classifiers = [
"Intended Audience :: Developers",
Expand Down Expand Up @@ -58,6 +59,8 @@ mkdocs-version-annotations = "1.0.0"
mkdocstrings = "0.22.0"
mkdocstrings-python = "1.5.2"
towncrier = "~23.6.0"
to-json-schema = "*"
jsonschema = "*"

[tool.poetry.extras]
all = [
Expand Down Expand Up @@ -156,7 +159,7 @@ requires = ["poetry_core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.towncrier]
package = "nautobot"
package = "{{ cookiecutter.app_name }}"
directory = "changes"
filename = "docs/admin/release_notes/version_X.Y.md"
template = "development/towncrier_template.j2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@
- [ ] Attached Screenshots, Payload Example
- [ ] Unit, Integration Tests
- [ ] Documentation Updates (when adding/changing features)
- [ ] Example App Updates (when adding/changing features)
- [ ] Outline Remaining Work, Constraints from Design
Loading

0 comments on commit cb606c9

Please sign in to comment.