Migrate to salt extension - #26
Merged
Merged
Conversation
…nexus3 as canonical tree
Contributor
There was a problem hiding this comment.
Pull request overview
Establishes a modern Salt extension package layout for the Nexus 3 modules/states, adding loader entry points, packaging metadata, updated docs, and CI/dev tooling to support the migration.
Changes:
- Introduces the
saltext.nexus3Python package (modules/states/utils + loader entry points) and a compatibility shim. - Adds unit/functional test scaffolding plus nox/pre-commit/Towncrier-based developer workflows.
- Reworks Docker/integration setup and GitHub Actions workflows to run quality gates and build artifacts/docs.
Reviewed changes
Copilot reviewed 57 out of 66 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/test_utils_nexus3.py | Unit coverage for NexusClient config defaults and request headers/payload behavior. |
| tests/unit/test_state_users.py | Unit tests for users state behavior (test mode, drift detection, password updates). |
| tests/unit/test_state_security.py | Unit tests for security states (anonymous access, realms). |
| tests/unit/test_state_scripts.py | Unit tests validating scripts state payload wiring. |
| tests/unit/test_state_roles.py | Unit tests for roles state create/update behavior and test mode. |
| tests/unit/test_state_repositories.py | Unit tests for repositories state behavior (test mode absent, type/format immutability, no-drift). |
| tests/unit/test_state_privileges.py | Unit tests for privileges state validation and test-mode update reporting. |
| tests/unit/test_state_email.py | Unit tests for email state test-mode behavior and no-drift behavior. |
| tests/unit/test_state_blobstores.py | Unit tests for blobstores state create/no-drift behavior. |
| tests/unit/test_loader.py | Unit test asserting loader directory entry points exist. |
| tests/integration/pytest.ini | Removes per-suite pytest config (moved into pyproject). |
| tests/functional/test_loader_smoke.py | Functional smoke test that Salt loader discovers modules/states. |
| tests/functional/test_loader_calls.py | Functional tests calling a loaded state in test/apply modes. |
| tests/functional/conftest.py | Functional fixtures to initialize Salt loader with local module/state/utils dirs. |
| tests/files/integration.yml | Updates integration compose to mount repo workspace and support package install. |
| tests/conftest.py | Ensures src/ is on sys.path for tests. |
| src/saltext/nexus3/utils/nexus3.py | Adds shared Nexus client/config helper under package layout. |
| src/saltext/nexus3/utils/init.py | Declares utils package. |
| src/saltext/nexus3/states/nexus3_users.py | Adds packaged users state module. |
| src/saltext/nexus3/states/nexus3_security.py | Adds packaged security state module. |
| src/saltext/nexus3/states/nexus3_scripts.py | Minor docstring formatting adjustments. |
| src/saltext/nexus3/states/nexus3_roles.py | Fixes update-flag logic and avoids unnecessary update calls. |
| src/saltext/nexus3/states/nexus3_repositories.py | Minor docstring whitespace tweaks. |
| src/saltext/nexus3/states/nexus3_privileges.py | Adds packaged privileges state module. |
| src/saltext/nexus3/states/nexus3_email.py | Adds packaged email state module. |
| src/saltext/nexus3/states/nexus3_blobstores.py | Adds packaged blobstores state module. |
| src/saltext/nexus3/states/init.py | Declares states package. |
| src/saltext/nexus3/modules/nexus3_users.py | Updates imports to use packaged utils (saltext.nexus3.utils.nexus3). |
| src/saltext/nexus3/modules/nexus3_tasks.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_status.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_roles.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_repositories.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_realms.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_readonly.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_privileges.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_email.py | Updates imports to use packaged utils; docstring formatting tweak. |
| src/saltext/nexus3/modules/nexus3_blobstores.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/nexus3_anonymous_access.py | Updates imports to use packaged utils. |
| src/saltext/nexus3/modules/init.py | Declares modules package. |
| src/saltext/nexus3/loader.py | Adds Salt loader entry points for module/state/utils dirs. |
| src/saltext/nexus3/init.py | Adds package metadata and dynamic version lookup. |
| src/saltext/init.py | Declares top-level saltext package. |
| src/nexus3.py | Adds compatibility shim for legacy import nexus3. |
| pyproject.toml | Defines packaging metadata, entry points, extras, ruff/pytest/towncrier config. |
| noxfile.py | Adds nox sessions for tests, integration, lint, docs, changelog. |
| docs/topics/migration.md | Adds migration guidance and current support statements. |
| docs/topics/installation.md | Adds package-based installation guidance. |
| docs/topics/deprecation-policy.md | Documents deprecation lifecycle and compatibility expectations. |
| docs/ref/states.rst | Adds Sphinx autodoc reference for state modules. |
| docs/ref/modules.rst | Adds Sphinx autodoc reference for execution modules. |
| docs/index.rst | Adds Sphinx index/toctrees for topics and API refs. |
| docs/conf.py | Adds Sphinx configuration with mocked Salt imports. |
| docker-compose.yml | Updates compose volumes to mount workspace for editable installs. |
| changelog/.template.jinja | Adds Towncrier template. |
| changelog/.gitkeep | Keeps changelog directory in VCS. |
| changelog/+migration-foundation.added.md | Adds Towncrier fragment describing migration foundation. |
| bin/sync_legacy_to_src.py | Adds helper to sync legacy folders into src/ when present. |
| README.md | Updates installation/dev/docs pointers for extension package workflow. |
| Makefile | Adds nox/pre-commit/towncrier targets and updates integration/start workflows. |
| .pre-commit-config.yaml | Adds Ruff lint/format hooks. |
| .gitignore | Adds Python build artifacts and Sphinx build output. |
| .github/workflows/tag.yml | Adds tag/dispatch release verification and GitHub release flow. |
| .github/workflows/push.yml | Adds push workflow for lint/changelog/docs/build + test matrix. |
| .github/workflows/pr.yml | Adds PR workflow for lint/changelog/build + test matrix + integration. |
| .github/workflows/integration.yaml | Removes legacy integration-only workflow. |
| .github/dependabot.yml | Adds Dependabot for GitHub Actions and pip dependencies. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 57 out of 66 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
jsandas
marked this pull request as ready for review
March 30, 2026 02:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request establishes the foundation for migrating the project to a modern Salt extension package layout. It removes the legacy file_root sync model, introduces a new CI/CD pipeline, updates documentation, and adds tooling for development and release workflows. The changes focus on standardizing installation, testing, and documentation processes to align with current Salt extension best practices.
Project structure and packaging:
src/saltext/nexus3, removing the legacy_modules,_states, and_utilsfile_root sync paths. [1] [2] [3] [4] [5] [6]Continuous Integration and Automation:
Documentation overhaul:
Development workflow improvements:
Makefilewith new targets for testing, linting, formatting, documentation, changelog generation, and syncing source files. [1] [2] [3]Summary:
These changes lay the groundwork for a modern, maintainable Salt extension package, streamline CI/CD, and provide clear migration and development guidance.