-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (94 loc) · 3.42 KB
/
main_ol_spec_changes.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Check for changes in OL
# Assumption here is that there will be a change that touches spec or spark integration
on:
push:
schedule:
- cron: "0 5 * * 0"
workflow_dispatch:
inputs:
run_tests:
description: 'Run tests'
required: false
default: 'true'
openlineage_release:
description: 'Override OpenLineage release version'
required: false
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
jobs:
initialize_workflow:
runs-on: ubuntu-latest
outputs:
changes_in_spec: ${{ github.event.inputs.run_tests || steps.check-changes.outputs.changes_found }}
ol_release: ${{ github.event.inputs.openlineage_release || steps.get-release.outputs.openlineage_release }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: create dir for ol spec and report
id: dir_for_spec
shell: bash
run: |
mkdir -p openlineage
- name: get latest OL spec
uses: actions/checkout@v4
with:
repository: OpenLineage/OpenLineage
path: openlineage
- name: check for changes in spec
id: check-changes
run: |
echo "changes_found=false" >> $GITHUB_OUTPUT
python scripts/compare_spec_versions.py \
--spec_base=./openlineage/spec \
--versions_path=./generated-files/spec_versions.json \
--new_versions_path=./updated_spec_versions.json
if [ -f updated_spec_versions.json ]; then
echo "changes_found=true" >> $GITHUB_OUTPUT
fi
- uses: actions/upload-artifact@v4
if: steps.check-changes.outputs.changes_found == 'true'
with:
name: spec-versions
path: generated-files/updated_spec_versions.json
retention-days: 1
- name: get openlineage release
if: steps.check-changes.outputs.changes_found == 'true'
id: get-release
run: |
openlineage_release=$(cat generated-files/releases.json | jq -c '.[] | select(.name | contains("openlineage")) | .latest_version ' -r)
echo "openlineage_release=${openlineage_release}" >> $GITHUB_OUTPUT
######## COMPONENT VALIDATION ########
# check if scenarios are still compatible with the new spec
scenarios_check:
needs:
- initialize_workflow
if: ${{ success() && needs.initialize_workflow.outputs.changes_in_spec == 'true' }}
uses: ./.github/workflows/check_scenarios.yml
with:
release: ${{ needs.initialize_workflow.outputs.ol_release }}
get-latest-snapshots: 'true'
fail-for-failures: false
# check if producers still produce compatible events
spark-dataproc:
needs:
- initialize_workflow
if: ${{ success() && needs.initialize_workflow.outputs.changes_in_spec == 'true' }}
uses: ./.github/workflows/producer_spark_dataproc.yml
secrets:
gcpKey: ${{ secrets.GCP_SA_KEY }}
with:
release: ${{ needs.initialize_workflow.outputs.ol_release }}
get-latest-snapshots: 'true'
######## COLLECTION OF REPORTS AND EXECUTE APPROPRIATE ACTIONS ########
collect-and-compare-reports:
needs:
- initialize_workflow
- scenarios_check
- spark-dataproc
uses: ./.github/workflows/collect_and_compare_reports.yml
notify-maintainers:
needs: collect-and-compare-reports
uses: ./.github/workflows/notify_maintainers.yml