Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed issue with dynamic groups not being called in 2.3.0. #798

Merged
merged 4 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
1 change: 0 additions & 1 deletion changes/786.housekeeping

This file was deleted.

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

This file was deleted.

23 changes: 18 additions & 5 deletions docs/admin/release_notes/version_2.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
- Hide Compliance tab if no compliance result exists.


### Added

- [#1501](https://github.com/nautobot/nautobot-app-golden-config/issues/1501) - Add Support for XML Compliance
## v2.1.2 2024-08

### Fixed

- [#723](https://github.com/nautobot/nautobot-app-golden-config/issues/723) - Hide compliance tab in device view if no compliance results exist.
- [#792](https://github.com/nautobot/nautobot-app-golden-config/issues/792) - Fixed issue with dynamic groups not being called in 2.3.0.

### Housekeeping

## v2.1.1
- [#786](https://github.com/nautobot/nautobot-app-golden-config/issues/786) - Fixed incorrect test data setup for `test_tags_filter()` test for `ConfigPlanFilterTestCase`.
- [#788](https://github.com/nautobot/nautobot-app-golden-config/issues/788) - Rebaked from the cookie `nautobot-app-v2.3.0`.

## v2.1.1 - 2024-07

### Fixed

Expand All @@ -33,3 +35,14 @@
### Housekeeping

- [#769](https://github.com/nautobot/nautobot-app-golden-config/issues/769) - Added view tests for ConfigComplianceUIViewSet.


## v2.1.0 - 2024-05

### Added

- [#708](https://github.com/nautobot/nautobot-app-golden-config/issues/708) - Add Support for XML Compliance

### Fixed

- [#723](https://github.com/nautobot/nautobot-app-golden-config/issues/723) - Hide compliance tab in device view if no compliance results exist.
9 changes: 5 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mkdocs==1.5.2
mkdocs-material==9.2.4
mkdocs==1.6.0
mkdocs-material==9.5.32
markdown-version-annotations==1.0.1
mkdocstrings-python==1.5.2
mkdocstrings==0.22.0
griffe==1.1.1
mkdocstrings-python==1.10.8
mkdocstrings==0.25.2
10 changes: 9 additions & 1 deletion nautobot_golden_config/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
generate_config_set_from_manual,
)
from nautobot_golden_config.utilities.git import GitRepo
from nautobot_golden_config.utilities.helper import get_device_to_settings_map, get_job_filter
from nautobot_golden_config.utilities.helper import get_device_to_settings_map, get_job_filter, update_dynamic_groups_cache

InventoryPluginRegister.register("nautobot-inventory", NautobotORMInventory)

Expand Down Expand Up @@ -478,6 +478,8 @@ def _generate_config_plan_from_manual(self):

def run(self, **data):
"""Run config plan generation process."""
self.logger.debug("Updating Dynamic Group Cache.")
update_dynamic_groups_cache()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should do a job input. Should "we" force this, or allow a job user to say I want to force the refresh.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps its a non-issue now but the refreshing of the cache was always the biggest time consumer.

self.logger.debug("Starting config plan generation job.")
self._validate_inputs(data)
try:
Expand Down Expand Up @@ -518,6 +520,8 @@ def __init__(self, *args, **kwargs):

def run(self, **data): # pylint: disable=arguments-differ
"""Run config plan deployment process."""
self.logger.debug("Updating Dynamic Group Cache.")
update_dynamic_groups_cache()
self.logger.debug("Starting config plan deployment job.")
self.data = data
config_deployment(self)
Expand All @@ -539,6 +543,8 @@ def __init__(self, *args, **kwargs):

def receive_job_button(self, obj):
"""Run config plan deployment process."""
self.logger.debug("Updating Dynamic Group Cache.")
update_dynamic_groups_cache()
self.logger.debug("Starting config plan deployment job.")
self.data = {"debug": False, "config_plan": ConfigPlan.objects.filter(id=obj.id)}
config_deployment(self)
Expand All @@ -556,6 +562,8 @@ class Meta:

def run(self):
"""Run GoldenConfig sync."""
self.logger.debug("Updating Dynamic Group Cache.")
update_dynamic_groups_cache()
self.logger.debug("Starting sync of GoldenConfig with DynamicGroup membership.")
gc_dynamic_group_device_pks = GoldenConfig.get_dynamic_group_device_pks()
gc_device_pks = GoldenConfig.get_golden_config_device_ids()
Expand Down
Loading
Loading