[PR #10890] [MERGED] Closes #10851: New staging mechanism #13709

Closed
opened 2025-12-29 23:20:22 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10890
Author: @jeremystretch
Created: 11/10/2022
Status: Merged
Merged: 11/14/2022
Merged by: @jeremystretch

Base: featureHead: 10851-staging


📝 Commits (10+)

  • c2e6853 WIP
  • 5fb96a6 Convert checkout() context manager to a class
  • dde069c Misc cleanup
  • d5e76a3 Drop unique constraint from Change model
  • 53725c3 Extend staging tests
  • f4cec1e Misc cleanup
  • b57616e Incorporate M2M changes
  • d6f1e18 Don't cancel wipe out creation records when an object is deleted
  • 18aafce Rename Change to StagedChange
  • 1849a38 Add documentation for change staging

📊 Changes

11 files changed (+646 additions, -5 deletions)

View changed files

docs/models/extras/branch.md (+13 -0)
docs/models/extras/stagedchange.md (+26 -0)
docs/plugins/development/staged-changes.md (+42 -0)
📝 mkdocs.yml (+3 -0)
📝 netbox/extras/choices.py (+17 -0)
netbox/extras/migrations/0084_staging.py (+45 -0)
📝 netbox/extras/models/__init__.py (+3 -0)
netbox/extras/models/staging.py (+114 -0)
netbox/netbox/staging.py (+148 -0)
netbox/netbox/tests/test_staging.py (+210 -0)
📝 netbox/utilities/utils.py (+25 -5)

📄 Description

Fixes: #10851

  • Introduce the Branch and Change models, under extras
  • Introduce a context manager for activating and deactivating a branch
  • Add deserialize_object() as a complement to the serialize_object() utility function (still need tests for this)
  • Tests

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/10890 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 11/10/2022 **Status:** ✅ Merged **Merged:** 11/14/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `10851-staging` --- ### 📝 Commits (10+) - [`c2e6853`](https://github.com/netbox-community/netbox/commit/c2e6853031d373cb6bf74c6883c0a4b45993f5f8) WIP - [`5fb96a6`](https://github.com/netbox-community/netbox/commit/5fb96a6b6f0afd60964344f36a5b1f58f53923d7) Convert checkout() context manager to a class - [`dde069c`](https://github.com/netbox-community/netbox/commit/dde069c7e5f65995cec4dd50b742e06fe8263cdd) Misc cleanup - [`d5e76a3`](https://github.com/netbox-community/netbox/commit/d5e76a34b807318746c6281d825c2a6226eb8f60) Drop unique constraint from Change model - [`53725c3`](https://github.com/netbox-community/netbox/commit/53725c382cd1dd6f724b6f03b7fcfab9f4322778) Extend staging tests - [`f4cec1e`](https://github.com/netbox-community/netbox/commit/f4cec1e6c8afbc5e1cefaa4d3263d41c3ddc528b) Misc cleanup - [`b57616e`](https://github.com/netbox-community/netbox/commit/b57616e9ce5c953f574ee608d519a11537c2b804) Incorporate M2M changes - [`d6f1e18`](https://github.com/netbox-community/netbox/commit/d6f1e181929f17b9f0173502df7341090ef791bd) Don't cancel wipe out creation records when an object is deleted - [`18aafce`](https://github.com/netbox-community/netbox/commit/18aafcef1878d33ec0fc47c5238e67435051d0ce) Rename Change to StagedChange - [`1849a38`](https://github.com/netbox-community/netbox/commit/1849a38abafab8da1d6b3c0f05060aba3dd4aa64) Add documentation for change staging ### 📊 Changes **11 files changed** (+646 additions, -5 deletions) <details> <summary>View changed files</summary> ➕ `docs/models/extras/branch.md` (+13 -0) ➕ `docs/models/extras/stagedchange.md` (+26 -0) ➕ `docs/plugins/development/staged-changes.md` (+42 -0) 📝 `mkdocs.yml` (+3 -0) 📝 `netbox/extras/choices.py` (+17 -0) ➕ `netbox/extras/migrations/0084_staging.py` (+45 -0) 📝 `netbox/extras/models/__init__.py` (+3 -0) ➕ `netbox/extras/models/staging.py` (+114 -0) ➕ `netbox/netbox/staging.py` (+148 -0) ➕ `netbox/netbox/tests/test_staging.py` (+210 -0) 📝 `netbox/utilities/utils.py` (+25 -5) </details> ### 📄 Description ### Fixes: #10851 - Introduce the Branch and Change models, under `extras` - Introduce a context manager for activating and deactivating a branch - Add `deserialize_object()` as a complement to the `serialize_object()` utility function (still need tests for this) - Tests --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:20:22 +01:00
adam closed this issue 2025-12-29 23:20:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13709