Skip to content

Commit

Permalink
Merge pull request #5065 from nautobot/release/2.1.1
Browse files Browse the repository at this point in the history
Release/2.1.1
  • Loading branch information
gsnider2195 committed Jan 8, 2024
2 parents ff3c81d + 2f5d9a9 commit cf31f79
Show file tree
Hide file tree
Showing 624 changed files with 1,744 additions and 33,108 deletions.
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,3 @@

# Add specific exclusions
**/__pycache__
nautobot/ui/build
nautobot/ui/generated
nautobot/ui/node_modules
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions .flake8

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/ci_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,27 +115,6 @@ jobs:
run: "poetry run invoke unittest --failfast --keepdb"
- name: "Run coverage"
run: "poetry run invoke unittest-coverage"
tests-ui:
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Install NPM Dependencies"
working-directory: ./nautobot/ui
run: "npm ci"
- name: "Setup base aliases for tests"
working-directory: ./nautobot/ui
run: "mkdir generated && cp src/file_templates/jsconfig-base.json generated/jsconfig.paths.json"
- name: "Setup base app_imports for mock"
working-directory: ./nautobot/ui
run: "echo 'export const NautobotApps = {}; export default NautobotApps;' > generated/app_imports.js"
- name: "Run unittest-ui"
working-directory: ./nautobot/ui
run: "poetry run invoke unittest-ui"
migration-tests-mysql:
name: "Run migrations against test dataset (MySQL and Python 3.8)"
runs-on: "ubuntu-20.04"
Expand Down Expand Up @@ -259,7 +238,6 @@ jobs:
- "migration-tests-postgres"
- "tests-mysql"
- "tests-postgres"
- "tests-ui"
strategy:
fail-fast: true
matrix:
Expand Down
94 changes: 3 additions & 91 deletions .github/workflows/ci_pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,6 @@ on: # yamllint disable
workflow_call:

jobs:
black:
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Linting: black"
run: "poetry run invoke black"
flake8:
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Linting: flake8"
run: "poetry run invoke flake8"
ruff:
runs-on: "ubuntu-20.04"
env:
Expand All @@ -42,34 +20,6 @@ jobs:
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Linting: ruff"
run: "poetry run invoke ruff --output-format github"
prettier:
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Install NPM Dependencies"
working-directory: "./nautobot/ui"
run: "npm ci"
- name: "Linting: prettier"
run: "poetry run invoke prettier"
eslint:
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Install NPM Dependencies"
working-directory: "./nautobot/ui"
run: "npm ci"
- name: "Linting: eslint"
run: "poetry run invoke eslint"
yamllint:
runs-on: "ubuntu-20.04"
env:
Expand All @@ -90,9 +40,8 @@ jobs:
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Install NPM Dependencies"
working-directory: "./nautobot/ui"
run: "npm ci"
- name: "Install markdownlint"
run: "npm install markdownlint-cli@0.38.0"
- name: "Linting: markdownlint"
run: "poetry run invoke markdownlint"
hadolint:
Expand Down Expand Up @@ -217,10 +166,8 @@ jobs:
- name: "Run coverage"
run: "poetry run invoke unittest-coverage"
needs:
- "black"
- "check-migrations"
- "check-schema"
- "flake8"
- "hadolint"
- "markdownlint"
- "ruff"
Expand Down Expand Up @@ -268,38 +215,12 @@ jobs:
- name: "Run coverage"
run: "poetry run invoke unittest-coverage"
needs:
- "black"
- "check-migrations"
- "check-schema"
- "flake8"
- "hadolint"
- "markdownlint"
- "ruff"
- "yamllint"
tests-ui:
runs-on: "ubuntu-20.04"
env:
INVOKE_NAUTOBOT_LOCAL: "True"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v2"
- name: "Install NPM Dependencies"
working-directory: ./nautobot/ui
run: "npm ci"
- name: "Setup base aliases for tests"
working-directory: ./nautobot/ui
run: "mkdir generated && cp src/file_templates/jsconfig-base.json generated/jsconfig.paths.json"
- name: "Setup base app_imports for mock"
working-directory: ./nautobot/ui
run: "echo 'export const NautobotApps = {}; export default NautobotApps;' > generated/app_imports.js"
- name: "Run unittest-ui"
working-directory: ./nautobot/ui
run: "poetry run invoke unittest-ui"
needs:
- "prettier"
- "eslint"
migration-tests-mysql:
name: "Run migrations against test dataset (MySQL and Python 3.8)"
runs-on: "ubuntu-20.04"
Expand Down Expand Up @@ -339,10 +260,8 @@ jobs:
- name: "Run migration test"
run: "poetry run invoke migration-test --db-engine mysql --dataset $MIGRATION_TEST_DATASET"
needs:
- "black"
- "check-migrations"
- "check-schema"
- "flake8"
- "hadolint"
- "markdownlint"
- "ruff"
Expand Down Expand Up @@ -381,10 +300,8 @@ jobs:
- name: "Run migration test"
run: "poetry run invoke migration-test --db-engine postgres --dataset $MIGRATION_TEST_DATASET"
needs:
- "black"
- "check-migrations"
- "check-schema"
- "flake8"
- "hadolint"
- "markdownlint"
- "ruff"
Expand Down Expand Up @@ -429,16 +346,14 @@ jobs:
- name: "Run coverage"
run: "poetry run invoke unittest-coverage"
needs:
- "black"
- "check-migrations"
- "check-schema"
- "flake8"
- "hadolint"
- "markdownlint"
- "ruff"
- "yamllint"
changelog:
if: contains(fromJson('["develop","next","develop-1.6"]'), github.base_ref)
if: ${{ (contains(fromJson('["develop","next"]'), github.base_ref)) || (startsWith(github.base_ref, 'ltm')) }}
runs-on: "ubuntu-20.04"
steps:
- name: "Check out repository code"
Expand All @@ -455,10 +370,8 @@ jobs:
name: "Test Container Build (amd64 only on Python 3.11)"
runs-on: "ubuntu-22.04"
needs:
- "black"
- "check-migrations"
- "check-schema"
- "flake8"
- "hadolint"
- "markdownlint"
- "ruff"
Expand Down Expand Up @@ -500,4 +413,3 @@ jobs:
- "pylint"
- "tests-mysql"
- "tests-postgres"
- "tests-ui"
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ htmlcov/*
/examples/example_plugin/example_plugin/static/example_plugin/docs/
development/factory_dump.json
node_modules
nautobot/ui/generated
7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

27 changes: 0 additions & 27 deletions development/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,3 @@ services:
mkdocs:
volumes:
- ../:/source
nodejs:
image: "local/nautobot-dev:local-py${PYTHON_VER}"
environment:
PORT: "3000"
# DEBUG: "express:*" # nodejs web server debug logging
ports:
- "3000:3000"
working_dir: /opt/nautobot/ui
volumes:
- ../:/source
- ../nautobot/ui/lib:/opt/nautobot/ui/lib
- ../nautobot/ui/public:/opt/nautobot/ui/public
- ../nautobot/ui/src:/opt/nautobot/ui/src
entrypoint: >
bash -c "npm run start"
storybook:
profiles:
- storybook
# TODO: can we use a lighter-weight base image?
image: "local/nautobot-dev:local-py${PYTHON_VER}"
environment:
PORT: "6006"
ports:
- "6006:6006"
entrypoint: ""
# TODO this needs to ensure the version of nautobot-ui remains in sync with package-lock.json
command: bash -c "git clone https://github.com/nautobot/nautobot-ui.git && cd nautobot-ui && npm ci && npm run storybook|| npm run storybook"
2 changes: 1 addition & 1 deletion development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
healthcheck:
interval: 5s
timeout: 5s
start_period: 10m # intentionally conservative upper bound for `npm install` time in a fresh setup
start_period: 1m
retries: 3
test:
- "CMD"
Expand Down
10 changes: 7 additions & 3 deletions development/nautobot_config.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
"""Nautobot development configuration file."""
import os

from nautobot.core.settings import * # noqa: F403
from nautobot.core.settings import * # noqa: F403 # undefined-local-with-import-star

# The above results in various F405 undefined-local-with-import-star-usage,
# "may be undefined, or defined from star imports",
# which we suppress on a case-by-case basis below
from nautobot.core.settings_funcs import is_truthy

SECRET_KEY = os.getenv("NAUTOBOT_SECRET_KEY", "012345678901234567890123456789012345678901234567890123456789")
Expand Down Expand Up @@ -59,12 +63,12 @@
"nautobot.core.authentication.ObjectPermissionBackend",
)
SOCIAL_AUTH_KEYCLOAK_KEY = "nautobot"
SOCIAL_AUTH_KEYCLOAK_SECRET = "7b1c3527-8702-4742-af69-2b74ee5742e8"
SOCIAL_AUTH_KEYCLOAK_SECRET = "7b1c3527-8702-4742-af69-2b74ee5742e8" # noqa: S105 # hardcoded-password-string
SOCIAL_AUTH_KEYCLOAK_PUBLIC_KEY = requests.get("http://keycloak:8087/realms/nautobot/", timeout=15).json()[
"public_key"
]
SOCIAL_AUTH_KEYCLOAK_AUTHORIZATION_URL = "http://localhost:8087/realms/nautobot/protocol/openid-connect/auth"
SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL = "http://keycloak:8087/realms/nautobot/protocol/openid-connect/token"
SOCIAL_AUTH_KEYCLOAK_ACCESS_TOKEN_URL = "http://keycloak:8087/realms/nautobot/protocol/openid-connect/token" # noqa: S105 # hardcoded-password-string
SOCIAL_AUTH_KEYCLOAK_VERIFY_SSL = False

METRICS_ENABLED = True
Expand Down

0 comments on commit cf31f79

Please sign in to comment.