Skip to content

feat: Enhance registry definition rendering to support RegDef V2#725

Open
BackendBits wants to merge 13 commits intomainfrom
feature/support_registry_v2
Open

feat: Enhance registry definition rendering to support RegDef V2#725
BackendBits wants to merge 13 commits intomainfrom
feature/support_registry_v2

Conversation

@BackendBits
Copy link
Collaborator

@BackendBits BackendBits commented Oct 17, 2025

Pull Request

Summary

Add RegDef V2 validation with version detection. Automatically routes to V2 schema when version: "2.0" is present, maintaining full backward compatibility with V1 RegDefs.

Issue

Supports validation of RegDef V2 files for public cloud registry configuration (AWS, Azure, GCP).

Breaking Change?

  • Yes
  • No

V1 RegDefs continue to work unchanged.

Scope / Project

qubership-envgene - RegDef validation ([scripts/build_env/main.py]

Implementation Notes

Version detection in [validate_appregdefs()]:

  • Reads version field from RegDef YAML (defaults to "1.0")
  • Routes to [regdef-v2.schema.json] when version is "2.0"
  • Uses regdef.schema.json for V1 (version "1.0" or missing)

Schema constants:

  • Added REGDEF_V1_SCHEMA, REGDEF_V2_SCHEMA, APPDEF_SCHEMA at module level
  • Follows existing pattern for schema path constants

Logging:

  • Uses logger.info() for validation messages
  • Uses logger.debug() for schema selection details

Validation approach:

  • JSON schema handles structure and field validation
  • No separate authConfig validation function (schema enforces requirements)

Tests / Evidence

  • V1 RegDefs (no version field) validate against V1 schema
  • V2 RegDefs (version: "2.0") validate against V2 schema
  • Backward compatibility preserved (existing RegDefs work unchanged)

Additional Notes

Files Modified: scripts/build_env/main.py

Migration: V1 RegDefs work as-is. V2 requires adding version: "2.0" field.

RegDef V2 schema (schemas/regdef-v2.schema.json already exists in repo with support for:

  • Cloud provider authentication (AWS, Azure, GCP)
  • Per-artifact-type authConfig references
  • Per-type repository domains

@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from a6693fd to b04afb2 Compare October 22, 2025 09:59
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from b94b0be to fa5b13c Compare October 27, 2025 11:01
@github-actions github-actions bot added the bug label Oct 27, 2025
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch 3 times, most recently from eafc0d4 to 8c65959 Compare November 21, 2025 06:14
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from 8c65959 to ee1ec14 Compare November 30, 2025 12:57
@miyamuraga miyamuraga changed the title feat: Enhance regsitry definition rendering to support RegDef V2 feat: Enhance registry definition rendering to support RegDef V2 Dec 2, 2025
Copy link
Collaborator

@miyamuraga miyamuraga left a comment

Choose a reason for hiding this comment

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

Several issues need to be resolved

@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from ee1ec14 to 42ad537 Compare December 2, 2025 19:25
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from 42ad537 to e30aaa2 Compare December 2, 2025 19:31
BackendBits added a commit to BackendBits/qubership-envgene that referenced this pull request Dec 2, 2025
- Replace print() with logger in main.py validation
- Add schema path constants (APPDEF_SCHEMA, REGDEF_V1_SCHEMA, REGDEF_V2_SCHEMA)
- Remove redundant validate_regdef_v2_authconfig() function
- Convert multi-line docstrings to single line in artifact searcher
- Use debug level for schema selection logging

Addresses same style issues flagged in PR Netcracker#725 review.
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch 2 times, most recently from b78c13b to 85ff274 Compare December 7, 2025 10:44
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch 2 times, most recently from 8a1af0f to f7086ac Compare December 16, 2025 10:39
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from 3c5f97f to 433b3fa Compare December 29, 2025 08:03
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from 433b3fa to f8431c1 Compare December 29, 2025 08:13
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.
@BackendBits BackendBits force-pushed the feature/support_registry_v2 branch from f8431c1 to 41d25bb Compare January 9, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants