Skip to content

feat: Registry v2 artifact searcher#805

Open
BackendBits wants to merge 73 commits intomainfrom
registry-v2-artifact-searcher
Open

feat: Registry v2 artifact searcher#805
BackendBits wants to merge 73 commits intomainfrom
registry-v2-artifact-searcher

Conversation

@BackendBits
Copy link
Collaborator

@BackendBits BackendBits commented Nov 18, 2025

Summary

Add support for Registry V2 cloud registries in the Python artifact searcher and fix build_env tests so CI passes.

Issue

Internal need to:

  • Use AWS CodeArtifact and GCP Artifact Registry via RegDef V2.
  • Unblock the open-source CI pipeline, which was failing in scripts/build_env tests due to a [tests] package conflict.

Breaking Change?

  • Yes
  • No

No existing flows are changed; V2 support is used only when configured.

Scope / Project

  • python/artifact-searcher
  • scripts/build_env

Implementation Notes

  • Added CloudAuthHelper in artifact_searcher to:

    • Resolve authConfig entries from RegDef V2.
    • Resolve credentials from env_creds.
    • Configure MavenArtifactSearcher for:
      • AWS CodeArtifact.
      • GCP Artifact Registry (service account).
  • Updated build_env RegDef V2 handling to:

    • Detect version 2.0.
    • Validate V2 RegDefs with the correct schema.
    • Check authConfig references in V2 config sections.
  • Fixed build_env tests by:

    • Adding [scripts/build_env/tests/init.py] so the local [tests] package is used in CI.
    • Keeping imports as from tests.test_helpers import TestHelpers.

Tests / Evidence

  • Existing pytest suites for:

    • python/envgene/envgenehelper
    • scripts/build_env

    run in the GitHub Actions [tests] job.

  • After the changes, the previous ModuleNotFoundError in scripts/build_env tests is resolved and the suite runs to completion (subject to any functional test failures).

Additional Notes

  • No new external dependencies beyond what artifact_searcher already requires.
  • [CloudAuthHelper] logs clear errors when configuration or credentials are incomplete, making misconfigurations easier to diagnose.

@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch 3 times, most recently from 7047995 to f4408c0 Compare November 21, 2025 07:22
@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch from f4408c0 to 4c67632 Compare November 30, 2025 13:01
@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch from 4c67632 to 43d5a27 Compare December 1, 2025 09:58
@github-actions github-actions bot added the bug label Dec 1, 2025
Detect version field in RegDef files and validate against V2 schema when version is 2.0.
Use logger for validation messages and move schema paths to constants.
- Add AuthConfig model for V2 authentication configuration
- Add version and auth_config fields to Registry model
- Add V2 routing in check_artifact_async with fallback to V1
- Add CloudAuthHelper for AWS/GCP cloud registry authentication
- Add environment credential loading for V2 cloud registries
- Add V2 cloud registry dependencies (boto3, google-auth)
- Add comprehensive tests for V2 models and routing

Preserves all V1 functionality including:
- Nexus detection and URL conversion
- Snapshot version resolution
- URL-based artifact search
@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch from 5ffc9b1 to f556b46 Compare December 2, 2025 23:57
@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch from 0f21053 to e2bc8bf Compare December 3, 2025 06:31
@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch from c4a4175 to 05467d1 Compare December 14, 2025 06:28
- Simplified retry logic (2 retries, 5s fixed delay)

- Reduced timeouts to reasonable values (60s search, 120s download)

- Removed debug/diagnostic code

- Removed unnecessary test files

- Clean up code style
@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch from 05467d1 to 186f166 Compare December 14, 2025 06:55
@popoveugene popoveugene removed their request for review January 27, 2026 17:39
@BackendBits BackendBits force-pushed the registry-v2-artifact-searcher branch from 0d7e82e to 6477573 Compare February 5, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug documentation Improvements or additions to documentation enhancement refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants