Skip to content

Commit 8e3044d

Browse files
committed
Feat: Add metadata validation workflow and scripts
Signed-off-by: alyssacgoins <agoins@redhat.com>
1 parent 00758af commit 8e3044d

35 files changed

+1069
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: validate-metadata-metadata.yml
2+
env:
3+
PYTHON_VERSION: "3.9"
4+
TARGET_DIR: "component/pipelines"
5+
on:
6+
pull_request:
7+
paths:
8+
- 'component/pipelines/**'
9+
10+
jobs:
11+
validate-component-metadata:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v5
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v6
18+
with:
19+
python-version: 3.9
20+
21+
- name: Retrieve new components
22+
id: get-new-components
23+
run: |
24+
COMMIT_RANGE=${{ github.event.before }}..${{ github.sha }}
25+
NEW_COMPONENTS=$(git diff --name-only --diff-filter=A $COMMIT_RANGE -- "$TARGET_DIR")
26+
echo "Found new components: NEW_COMPONENTS"
27+
echo "new_components_list=NEW_COMPONENTS" >> "$GITHUB_OUTPUT"
28+
29+
- name: Process new components
30+
if: steps.get-new-components.outputs.new-components != ''
31+
run: |
32+
NEW_COMPONENTS_ARRAY="${{ steps.find_new_files.outputs.new_components_list }}"
33+
for component in $NEW_COMPONENTS_ARRAY; do
34+
echo "Processing component: $component"
35+
python validate_metadata.py $component
36+
done
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
approvers:
2+
- sample-approver
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
tier: third_party
2+
name: happy-path-component
3+
stability: alpha | beta | stable
4+
dependencies:
5+
kubeflow:
6+
- name: Pipelines
7+
version: '>=2.5'
8+
- name: Trainer
9+
version: '>=2.0'
10+
external_services:
11+
- name: Argo Workflows
12+
version: "3.6"
13+
tags:
14+
- training
15+
- evaluation
16+
lastVerified: 2025-03-15T00:00:00Z
17+
ci:
18+
skip_dependency_probe: false
19+
pytest: optional
20+
links:
21+
documentation: https://kubeflow.org/components/happy-path-component
22+
issue_tracker: https://github.com/kubeflow/kfp-components/issues
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
approvers:
2+
- sample-approver
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
tier: third-party
2+
name: happy-path-component
3+
stability: alpha
4+
dependencies:
5+
kubeflow:
6+
- name: Pipelines
7+
version: '2.5.0'
8+
- name: Trainer
9+
version: '2.0.0'
10+
external_services:
11+
- name: Argo Workflows
12+
version: "3.6.0"
13+
tags:
14+
- training
15+
- evaluation
16+
lastVerified: 2025-03-15T00:00:00Z
17+
ci:
18+
skip_dependency_probe: false
19+
pytest: optional
20+
links:
21+
documentation: https://kubeflow.org/components/happy-path-component
22+
issue_tracker: https://github.com/kubeflow/kfp-components/issues
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: invalid-ci
2+
tier: core
3+
stability: alpha
4+
dependencies:
5+
kubeflow:
6+
- name: Pipelines
7+
version: '>=2.5.0'
8+
- name: Trainer
9+
version: '>=2.0.0'
10+
external_services:
11+
- name: Argo Workflows
12+
version: "3.6.0"
13+
tags:
14+
- training
15+
- evaluation
16+
lastVerified: 2025-03-15T00:00:00Z
17+
ci: invalid-ci-value
18+
links:
19+
documentation: https://kubeflow.org/components/happy-path-component
20+
issue_tracker: https://github.com/kubeflow/kfp-components/issues
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: invalid-ci-category
2+
tier: core
3+
stability: stable
4+
dependencies:
5+
kubeflow:
6+
- name: Pipelines
7+
version: '>=2.5.0'
8+
- name: Trainer
9+
version: '>=2.0.0'
10+
external_services:
11+
- name: Argo Workflows
12+
version: "3.6.0"
13+
tags:
14+
- training
15+
- evaluation
16+
lastVerified: 2025-03-15T00:00:00Z
17+
ci:
18+
skip_dependency_probe: false
19+
invalid_ci_category: invalid_value
20+
links:
21+
documentation: https://kubeflow.org/components/happy-path-component
22+
issue_tracker: https://github.com/kubeflow/kfp-components/issues
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: invalid-ci-dependency-probe
2+
tier: third_party
3+
stability: beta
4+
dependencies:
5+
kubeflow:
6+
- name: Pipelines
7+
version: '>=2.5.0'
8+
- name: Trainer
9+
version: '>=2.0.0'
10+
external_services:
11+
- name: Argo Workflows
12+
version: "3.6.0"
13+
tags:
14+
- training
15+
- evaluation
16+
lastVerified: 2025-03-15T00:00:00Z
17+
ci:
18+
skip_dependency_probe: invalid-probe-value
19+
links:
20+
documentation: https://kubeflow.org/components/happy-path-component
21+
issue_tracker: https://github.com/kubeflow/kfp-components/issues
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: invalid-dependencies-category
2+
tier: core
3+
stability: beta
4+
dependencies:
5+
kubeflow:
6+
- name: Pipelines
7+
version: '>=2.5.0'
8+
- name: Trainer
9+
version: '>=2.0.0'
10+
external_services:
11+
- name: Argo Workflows
12+
version: "3.6.0"
13+
invalid_dependency_category:
14+
- name: Invalid Dependency
15+
version: "1.0"
16+
tags:
17+
- training
18+
- evaluation
19+
lastVerified: 2025-03-15T00:00:00Z
20+
ci:
21+
skip_dependency_probe: false
22+
links:
23+
documentation: https://kubeflow.org/components/happy-path-component
24+
issue_tracker: https://github.com/kubeflow/kfp-components/issues
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: invalid-dependencies-type
2+
tier: third_party
3+
stability: alpha
4+
dependencies: "invalid-dependencies-type"
5+
tags:
6+
- training
7+
- evaluation
8+
lastVerified: 2025-03-15T00:00:00Z
9+
ci:
10+
skip_dependency_probe: false
11+
links:
12+
documentation: https://kubeflow.org/components/happy-path-component
13+
issue_tracker: https://github.com/kubeflow/kfp-components/issues

0 commit comments

Comments
 (0)