Skip to content

Add the option to automatically push changes to objects when synchronizing data sources #12129

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

Closed
jeremystretch opened this issue Mar 31, 2023 · 1 comment
Assignees
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.5-beta1

Feature type

Change to existing functionality

Proposed functionality

#11558 introduced the ability to populate certain object data from remote data sources. Currently, this is a two-step process:

  1. Run a synchronization job to create/update local DataFile objects from the source.
  2. Individually sync NetBox objects to reflect the new data in those DataFiles.

This separation of tasks is intentional, and ensures a decoupling of synchronization jobs (which are expected to be automated) from effecting a change to production data. However, there may be cases where it's desirable to effect changes immediately upon synchronization with the remote source.

This FR proposes the addition of an auto_sync boolean field to the SyncedDataMixin class. Any object with auto_sync set to true shall have its sync_data() method called automatically upon its associated DataFile being updated.

Use case

This provides an alternative direct coupling approach to employing synchronized object data, while preserving the existing loose coupling as the default option.

Database changes

No response

External dependencies

No response

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation beta Concerns a bug/feature in a beta release labels Mar 31, 2023
@arjenvri
Copy link

arjenvri commented Apr 6, 2023

This is a great feature! Would this also allow for existing object data update and removal possibly based on the remote data source data?

@jeremystretch jeremystretch self-assigned this Apr 12, 2023
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Apr 12, 2023
jeremystretch added a commit that referenced this issue Apr 17, 2023
…iles are updated (#12262)

* Closes #12129: Enable automatic synchronization of objects when DataFiles are updated

* Cleanup
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta Concerns a bug/feature in a beta release status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants