Add CAMARA release metadata schemas (Issue #337)#339
Add CAMARA release metadata schemas (Issue #337)#339hdamker merged 18 commits intocamaraproject:mainfrom
Conversation
Implement JSON Schema definitions for release planning and metadata: Schema files: - release-plan-schema.yaml: Planning metadata for main branch - release-metadata-schema.yaml: Generated metadata for release branches - Both schemas allow additional properties for future extensibility - Full JSON Schema Draft 7 compliance with format validation Example files covering key scenarios: - New repository with Sandbox meta-release - Multi-API repository with mixed maturity - Release candidate preparation - Maintenance patch release - Generated release metadata format Validation: - Python validation script with schema and semantic checks - Auto-detects schema type (release-plan vs release-metadata) - Optional file existence validation - All examples validate successfully Documentation: - Comprehensive README with usage examples - Future JavaScript implementation guidance (ajv library) - Schema extensibility benefits explained - CI integration examples Design decisions: - Removed additionalProperties restrictions for forward compatibility - Deferred schema_version field to Phase 1B - Supports future fields: changelog, artifacts, compliance_checks - Maintains strict validation of required fields and data types Related to Issue camaraproject#337 (CAMARA Release Workflow automation)
Align release-metadata.yaml structure with master-metadata-schema.yaml to enable release-collector to extract all needed data from release tags. Schema changes: - Add repository_name field (immutable repository identifier) - Rename release_number → release_tag (consistent naming) - Update release_date to ISO 8601 datetime format (UTC) - Rename apis[].name → api_name (leading identifier) - Add apis[].title field (from OpenAPI info.title) - Remove apis[].main_contacts from release-metadata (not immutable) Updated all examples, documentation, and validation script. All 5 examples validate successfully.
Prevents ambiguity with workflow status or lifecycle status. The field accurately describes the release type classification.
|
@camaraproject/release-management_maintainers @camaraproject/release-management_codeowners Please review this PR carefully and as soon as possible as it creates the base for our release process automation (see the dependencies within the implementation plan in #338). For the alignment with the Release Collector workflow I have created already camaraproject/project-administration#52 |
|
Is there any specific need to use |
The question is more if there is a specific need to use the latest. "draft-07 is the safer and fully sufficient choice; moving to 2020-12 mainly brings theoretical advantages and future extensibility, but at the cost of more careful tooling validation and possible friction for consumers". |
|
@camaraproject/release-management_maintainers Any further comments? Would be good if we can finalize / approve the schemata within the ReleaseManagement call on Tuesday Dec 2nd. |
tanjadegroot
left a comment
There was a problem hiding this comment.
first comments set
artifacts/metadata-schemas/examples/02-multi-api-mixed-maturity.yaml
Outdated
Show resolved
Hide resolved
artifacts/metadata-schemas/schemas/release-metadata-schema.yaml
Outdated
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Show resolved
Hide resolved
Key changes based on reviewer feedback: Terminology: - Rename api_status enum: 'planned' → 'draft', remove 'unchanged' - Rename dependency fields: xxx_version → xxx_release - Rename 'version' → 'api_version' in release-metadata apis[] New properties: - Add 'release_scope' (none, sandbox, meta-release) to clarify meta-release participation vs sandbox releases - Add 'pre-release-alpha' to release_readiness enum for M2 milestone Schema fixes: - Update release_tag pattern to exclude zeros (r1.1 valid, r0.1 invalid) - Remove 'Sandbox' from meta_release pattern (use release_scope instead) Validation improvements: - Add release_scope/meta_release consistency check - Add patch-release validation (requires all APIs public) - Remove incorrect 0.x version warning (initial public is valid) - Improve error messages to list specific API names Documentation: - Update concept document with all terminology changes - Update README with new field documentation - Rename and update all 5 example files
The term 'scope' conflicts with API repository scope terminology where repositories define a 'scope' for their target release. Terminology change: - Rename 'release_scope' → 'release_track' in release-plan schema - Update description to clarify this defines how repository participates in CAMARA releases (none, sandbox, meta-release) Updated files: - release-plan-schema.yaml: field name, required array, description - README.md: all field references and documentation sections - Concept document: terminology table and example YAML - All 4 release-plan example files (01-04) - validate-release-plan.py: method name, variable names, error messages Validation: All 5 examples pass schema validation after rename.
- Clarify release_readiness as codeowner-declared, CI-validated - Improve api_status descriptions in schema and docs - Use "extension" consistently instead of "suffix" - Fix typos in schema descriptions - Minor wording improvements in example comments
Propagate three field renames across all metadata schema artifacts: - release_readiness → target_release_type - api_status → target_api_status - target_version → target_api_version Rationale: Fields in release-plan.yaml represent planning targets, not actual values. The target_* prefix clearly distinguishes planning intent from generated release-metadata.yaml fields (release_type, api_version) which contain actual release values. Updated files: - schemas/release-plan-schema.yaml: Field definitions and descriptions - schemas/release-metadata-schema.yaml: Cross-reference descriptions - examples/01-04: All example release-plan files - scripts/validate-release-plan.py: Detection logic, semantic checks, and error messages - README.md: Documentation, field reference, error examples - CAMARA-Release-Workflow-and-Metadata-Concept.md: Terminology table, example YAML blocks, and workflow descriptions All 5 example files validated successfully against updated schemas.
|
Thank you @tanjadegroot for the thorough review! It helped a lot to improve the schemata. Here's a summary of the decision I have taken on each topic - hope that fits for you: TerminologyTopic 1: "maturity" vs "status" Topic 2: "suffix" vs "extension" Field NamingTopic 3:
Note: In CI validates that the repository content supports the declared target. Topic 4: Additional proposed changes:
Topic 5: Version field renames Additionally renamed Topic 6: Dependencies format Meta-Release HandlingTopic 7:
This clarifies semantics: Note: Initially named Patterns and EnumsTopic 8: Topic 9:
Topic 10: Example FilesTopic 11: File naming
Topic 12: Example 03 clarification DocumentationTopics 14-18: Summary of Changes
|
Open QuestionsDropping
|
I would prefer to keep the api_ part as not very long and consoistent with definition elswhere (api_name, api-version in Commonalities dicumentation)
why would we need at all the release tag in the plan if you can find and generate the latest_ Can it no be derived from the api-status ? Today the release tracker does not require to specify the release tag (or cycle) - that would avoid introducing the release cycle concept. |
Thanks very much Herbert for the summary and for taking into account all these comments. I would have one more comment: |
tanjadegroot
left a comment
There was a problem hiding this comment.
still some points to check
| repository_name: QualityOnDemand | ||
| release_tag: r4.4 | ||
| meta_release: Fall26 | ||
| release_date: "2025-09-30T10:00:00Z" |
There was a problem hiding this comment.
I presume the release date is automatically generated ? but when exactly ? is it the date/time of the release PR merge ?
however the schema validator checks this before the merge I suppose:
... if 'release_date' in repo and 'src_commit_sha' in repo: ...
so it has to be set before the validation, and cannot be after the release PR commit ?
I probably missed something (I hope) ...
Also, in the example for "Fall26", logically it should say "2026-..." (iso "2025-... ) ?
There was a problem hiding this comment.
See #339 (comment) for an explanation how release_date and src_commit_sha are generated. release_date is more or less the time of the last commit done by the automation on the release branch (after the release PR is merged). During the release PR both fields will be validated to be null.
The example is updated.
artifacts/metadata-schemas/schemas/release-metadata-schema.yaml
Outdated
Show resolved
Hide resolved
| type: string | ||
| description: | | ||
| Last commit SHA from main or maintenance branch included in this release. | ||
| Generated during release creation. |
There was a problem hiding this comment.
Same comment as for release_date. "generated during release creation" seems too late as the file has to go into the release.
There was a problem hiding this comment.
See #339 (comment) for explanation.
Your question has triggered the simplification ... with subsequent updates of the release branch from main branch, the calculation of this value would become complex.
artifacts/metadata-schemas/schemas/release-metadata-schema.yaml
Outdated
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Outdated
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Show resolved
Hide resolved
Co-authored-by: Tanja de Groot <87864067+tanjadegroot@users.noreply.github.com>
|
Thank you @tanjadegroot for the second round of thorough review! Your questions about the metadata timing and terminology helped clarify important aspects of the release workflow, especially Phase 4 (automated release creation). Terminology & Field Name Consistency
Generated Metadata Timing and WorkflowRegarding the questions about when Phase 1: Release Branch Preparation (with PR review)
Phase 2: Finalization (after PR merge)
Files updated
|
This commit addresses feedback from Tanja's second review round (Dec 9, 2025),
implementing four main topics and validation script enhancements for the
two-phase release workflow.
Changes:
1. Terminology consistency: patch-release → maintenance-release
- Renamed example file: 04-patch-release.yaml → 04-maintenance-release.yaml
- Updated schema enums in release-metadata-schema.yaml and release-plan-schema.yaml
- Updated validation script messages and comments
- Updated README.md references (4 occurrences)
- Updated workflow documentation (5 occurrences, carefully distinguishing
repository maintenance releases from API patch versions)
CAMARA terminology clarification:
- Maintenance release: Repository release with r-tag (e.g., r3.4, r3.5)
- Patch version: API version increment (e.g., 1.0.1, 2.3.4)
2. Field naming consistency: title → api_title
- Updated release-metadata-schema.yaml required fields
- Updated example file 05-generated-release-metadata.yaml (3 occurrences)
- Updated workflow documentation (3 occurrences)
- Aligns with api_ prefix pattern used by api_name and api_version
Related: camaraproject/project-administration#69
3. Two-phase workflow with immutable release branches
- Updated schema descriptions for release_date and src_commit_sha
- Enhanced Step 3: Added abandon-and-retrigger process for API corrections
- Enhanced Step 4: Added comprehensive two-phase workflow explanation
- Added Step 5d: Notes about temporary release branch lifecycle
- Marked forward-merge approach for future consideration (Appendix)
Initial implementation approach:
- Release branches are immutable after creation (except CHANGELOG.md)
- Corrections require abandon (close PR + delete branch) and retrigger
- src_commit_sha uses base branch HEAD at creation time
- Simpler validation and CI/CD workflows
4. Example date accuracy
- Fixed 05-generated-release-metadata.yaml: 2025 → 2026 (matches Fall26)
5. Validation script enhancements for two-phase workflow
- Updated schema type definitions to allow null values:
* release_date: type: string → type: [string, "null"]
* src_commit_sha: type: string → type: [string, "null"]
- Added --strict-phase1 flag for Phase 1 validation
- Added _check_two_phase_workflow() method
- Updated README.md with validation examples and CI integration
Validation modes:
- Lenient (default): Accepts both null (Phase 1) and valid values (Phase 2)
- Strict Phase 1: Enforces null values for release branch PR review
Files modified: 7 files (10 total including validation script changes)
- artifacts/metadata-schemas/schemas/release-metadata-schema.yaml
- artifacts/metadata-schemas/schemas/release-plan-schema.yaml
- artifacts/metadata-schemas/scripts/validate-release-plan.py
- artifacts/metadata-schemas/examples/04-maintenance-release.yaml (renamed)
- artifacts/metadata-schemas/examples/05-generated-release-metadata.yaml
- artifacts/metadata-schemas/README.md
- documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Addresses: PR camaraproject#339 review comments from @tanjadegroot (Dec 9, 2025)
tanjadegroot
left a comment
There was a problem hiding this comment.
All OK for the round 2 comments but sorry, I ended up with another batch.
please skip as you see fit.
per your guidance I should not approve this yet
artifacts/metadata-schemas/README.md
Outdated
| Defines the structure for `release-plan.yaml` files maintained on the main branch. | ||
|
|
||
| **Key fields:** | ||
| - `repository.release_track` - Release track (none, sandbox, meta-release) |
There was a problem hiding this comment.
I think the "sandbox" value would be impacted by the new name for "independent" release e.g. step/intermediate/solo/individual
"indepedent" would work for me as well (as indeed this has started to be used and not sure that people use "Independent Sandbox" very often, rather just "Sandbox")
individual would be good as opposed to the meta-release being a grouped release (though we do not really use that term).
the change will impact the example files
There was a problem hiding this comment.
We can change this when we concluded the discussion. I will then change consistently across the files.
Current candidate none, independent, meta-release
There was a problem hiding this comment.
Update: have done the change to none, independent, meta-release in 5251ef0
| repository: | ||
| release_track: sandbox | ||
| release_tag: r1.1 | ||
| target_release_type: none |
There was a problem hiding this comment.
Question, but could be ignored, as "none" would imply to ignore the release tag I guess.
- if there is a (target) release_tag given, should the target_release_type not be at least 'pre-release-alpha' ? (as none - No release planned or not ready yet)
- or should the (target) release_tag value initially be "r-.-" or empty.
- or if we consider the first pre-release is always at least alpha, then do we need the "none" value ?
There was a problem hiding this comment.
logically (but maybe cosmetic) I would put the target_release_type before the (target) release tag.
There was a problem hiding this comment.
in the beginning the repository is not ready for any release (no API definition), so 'pre-release-alpha' would be invalid. My proposal is to set the line initially to
target_release_tag: null # replace with r1.1 for first release
| release_tag: r4.4 | ||
| meta_release: Fall26 | ||
| release_date: "2026-09-30T10:00:00Z" | ||
| release_type: public-release |
There was a problem hiding this comment.
logically I would put the release_type before the release_tag
There was a problem hiding this comment.
I keep the current order. Every release_type has a release_tag and the release_tag is the first thing I see after the repository in GitHub -- it is together with the repository the identifier of the release.
artifacts/metadata-schemas/examples/05-generated-release-metadata.yaml
Outdated
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Outdated
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Outdated
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Outdated
Show resolved
Hide resolved
documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Outdated
Show resolved
Hide resolved
|
|
||
| ``` | ||
| main ────┬───[fix]───────┬──────► | ||
| main ────┬───[fix]───────┬──────► |
There was a problem hiding this comment.
online 437 below what is a Post-Release PR ? do we need it ?
There was a problem hiding this comment.
Yes, we do. It is the same as described in step 5.1.
Updates release-plan.yaml schema to use target_release_tag instead of
release_tag, aligning with the consistent target_* prefix pattern used
by all other planning fields.
Rationale:
All four planning properties in release-plan.yaml describe values the
release SHOULD have when successfully created. The target_ prefix makes
this planning/intent semantic consistent:
- target_release_tag: The release tag this release should have
- target_release_type: The release type this release should have
- target_api_version: The API version each API should have
- target_api_status: The API status each API should have
Changes:
1. Schema files (2 files):
- release-plan-schema.yaml: Renamed field and updated descriptions
- release-metadata-schema.yaml: Updated description to reference
target_release_tag in release-plan.yaml (field stays release_tag
in release-metadata as it contains actual values, not targets)
2. Example files (4 files):
- Updated all release-plan examples to use target_release_tag
- 05-generated-release-metadata.yaml unchanged (uses release_tag)
3. Documentation (2 files):
- README.md: Updated field references and naming standards
- CAMARA-Release-Workflow-and-Metadata-Concept.md: Updated
terminology table and example
Files modified: 8 files
- artifacts/metadata-schemas/schemas/release-plan-schema.yaml
- artifacts/metadata-schemas/schemas/release-metadata-schema.yaml
- artifacts/metadata-schemas/examples/01-new-repo-sandbox.yaml
- artifacts/metadata-schemas/examples/02-multi-api-mixed-status.yaml
- artifacts/metadata-schemas/examples/03-rc-preparation.yaml
- artifacts/metadata-schemas/examples/04-maintenance-release.yaml
- artifacts/metadata-schemas/README.md
- documentation/SupportingDocuments/CAMARA-Release-Workflow-and-Metadata-Concept.md
Validation: All example files pass schema validation
Breaking change: Existing release-plan.yaml files will need field rename
Co-authored-by: Tanja de Groot <87864067+tanjadegroot@users.noreply.github.com>
…easeManagement into 337-metadata-schemas
Key changes based on Tanja's review feedback: Schema improvements: - Remove $id from both schemas (not needed for copied schemas) - Change "or better" → "or higher status" for precise terminology - Standardize "release numbers" → "release_tag" terminology (4 locations) Documentation clarifications: - Remove "unchanged" status historical reference from README - Change "bundles" → "Bundled OpenAPI specifications (later phase)" Example fixes: - Update 01-new-repo-sandbox.yaml: use null target_release_tag with target_release_type: none (semantic consistency) Files modified: 5 files across schemas, examples, and documentation Related: camaraproject#339
Remove meta_release field from release-metadata.yaml schema and examples, as meta-release participation is not finalized at tagging time and can be reverted before the actual meta-release. Meta-release field remains in release-plan-schema.yaml for planning purposes. Changes: - Remove meta_release property from release-metadata-schema.yaml - Remove meta_release from example 05-generated-release-metadata.yaml - Remove meta_release from concept document example
|
@tanjadegroot The changes for your third round of comments are within the commits b0c6de5, 1764119, and 09386f6. Details are in the commit descriptions. One point is open: the value which replace the "sandbox" track. See my comment on this conversation. One additional change which I have decided in 50e45ad: I removed the meta-release property from the release-metadata.yaml as I'm convinced that this is not immutable already at the time of the release commit and tagging. Definitely not for pre-releases, but also not for public releases (M4 -> M5). We won't be able to change this affiliation any more if it is in the release itself. Instead we should define the relationship between a repository rx release series and a concrete meta-release in a configuration file and enrich the generated reports with that. |
|
@camaraproject/release-management_codeowners We should get this merged soon. Further fine-tuning of descriptions is possible later, also updates of the schema itself (with some effort). |
Update release-plan-schema.yaml to allow null values for target_release_tag when target_release_type is "none", matching the semantic meaning that the repository is not yet ready for a release. This fixes validation for example 01-new-repo-sandbox.yaml which uses target_release_tag: null with target_release_type: none.
Change the release_track enum value from "sandbox" to "independent" to better reflect that these are professional independent releases on their own schedule, not experimental releases. "Sandbox" terminology is preserved when referring to repository categories (Sandbox API Repositories, Sandbox teams), only the release_track enum value and its references have been changed. Changes: - Update enum and descriptions in release-plan-schema.yaml - Update example 01-new-repo-sandbox.yaml (file name unchanged - refers to repository category) - Update 6 occurrences in README.md - Update 2 occurrences in concept document - Update validation script semantic check All examples pass validation with the new enum value.
@tanjadegroot that's done now as well in 5251ef0 |
What type of PR is this?
enhancement/feature
What this PR does / why we need it:
Implements JSON Schema definitions and validation for CAMARA release metadata files as specified in the Release Workflow and Metadata Concept document.
This PR adds:
Schema harmonization (2nd commit):
Concept document updates:
Additional change: Renamed
statustorelease_typein release-metadata schema to prevent ambiguity with workflow status or lifecycle status.All 5 examples validate successfully against the schemas.
Which issue(s) this PR fixes:
Fixes #337
Special notes for reviewers:
Changelog input
Additional documentation