Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add breaking change check #936

Merged
merged 59 commits into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from 54 commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
293774e
Test CI
wenovus Aug 1, 2023
502f994
Trigger Build
wenovus Aug 1, 2023
ec4a4ef
Try diff script
wenovus Aug 2, 2023
291f74e
try
wenovus Aug 2, 2023
aaf661b
Debug
wenovus Aug 2, 2023
f5ea3ac
Debug
wenovus Aug 2, 2023
0de6129
Debug
wenovus Aug 2, 2023
9b15f07
Debug
wenovus Aug 2, 2023
913be2c
Debug
wenovus Aug 2, 2023
3a4766a
Debug
wenovus Aug 2, 2023
fd6309a
Debug
wenovus Aug 2, 2023
40f2064
Debug
wenovus Aug 2, 2023
8ee9284
Debug
wenovus Aug 2, 2023
1a1de47
Debug
wenovus Aug 2, 2023
fa46e18
Remove a leaf without updating major version
wenovus Aug 2, 2023
5ce9702
Remove a leaf without updating major version
wenovus Aug 2, 2023
9089ca4
Now update major version
wenovus Aug 2, 2023
65dc8af
Revert YANG changes
wenovus Aug 3, 2023
f00518c
now test just minor version increment again
wenovus Aug 3, 2023
77b0dae
Remove useless output
wenovus Aug 3, 2023
0338139
Test
wenovus Aug 3, 2023
be0fb1a
Test
wenovus Aug 3, 2023
276f252
Test
wenovus Aug 3, 2023
f8a1c31
Test
wenovus Aug 3, 2023
fc2edf2
Test
wenovus Aug 3, 2023
7b1da0f
Test
wenovus Aug 3, 2023
5c3a0bd
Test
wenovus Aug 3, 2023
a5be467
Test comment
wenovus Aug 3, 2023
419a681
Test comment
wenovus Aug 3, 2023
6fbad97
Test comment
wenovus Aug 3, 2023
86559cd
Test comment
wenovus Aug 3, 2023
bf49e17
Test comment
wenovus Aug 3, 2023
c19d317
Test comment
wenovus Aug 3, 2023
60469ec
Test comment
wenovus Aug 3, 2023
1890815
Test comment
wenovus Aug 3, 2023
32c1d19
Test comment
wenovus Aug 3, 2023
00b1b30
Test comment
wenovus Aug 3, 2023
d2b47a3
Test comment
wenovus Aug 3, 2023
6aac83d
Test comment
wenovus Aug 3, 2023
1cd5a1d
Test comment
wenovus Aug 3, 2023
17f4992
Test comment
wenovus Aug 3, 2023
af64f5f
Test comment
wenovus Aug 3, 2023
0472eb2
Test comment
wenovus Aug 3, 2023
aae4497
Test comment
wenovus Aug 3, 2023
dfcca70
Test comment
wenovus Aug 3, 2023
bb5b0ff
Test comment
wenovus Aug 3, 2023
f0b510c
Test comment
wenovus Aug 3, 2023
00edd23
Test comment
wenovus Aug 3, 2023
eeed781
Now revert all model changes
wenovus Aug 3, 2023
01c13d8
Now revert all model changes
wenovus Aug 4, 2023
c876760
test
wenovus Aug 8, 2023
4f9f554
prep for submission
wenovus Aug 8, 2023
61a372b
double check
wenovus Aug 8, 2023
54162d2
revert YANG changes
wenovus Aug 8, 2023
82f67d4
double check error msg
wenovus Aug 8, 2023
666537a
Try fixing ygot
wenovus Aug 8, 2023
b7e1fad
should work now
wenovus Aug 8, 2023
76383aa
Improve Actions job name
wenovus Aug 8, 2023
098e81c
Use latest version of Go during go setup
wenovus Aug 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/diff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: OpenConfig YANG Diff

on:
pull_request:
branches: [ master ]

jobs:
build:
name: Backward Incompatibility Check
runs-on: ubuntu-latest

steps:
- name: Install go
uses: actions/setup-go@v2
with:
go-version: '1.20'

- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install openconfig-ci CLI
run: |
go install github.com/openconfig/models-ci/openconfig-ci@c880ed2

- name: Make sure all backward-incompatible changes are covered by version changes.
id: check
run: |
readonly HEAD=${{ github.event.pull_request.head.sha }}
readonly BASE="$(git merge-base origin/master "${HEAD}")"

BASEREPODIR=public_base
mkdir -p "${BASEREPODIR}/release"
git checkout "${BASE}"
cp -r release/models "${BASEREPODIR}/release"
cp -r third_party "${BASEREPODIR}"
git checkout "${HEAD}"
oldroot="${BASEREPODIR}"
newroot=.

openconfig-ci diff --disallowed-incompats --oldp "${oldroot}/third_party" --oldroot "${oldroot}/release/models" --newp "${newroot}/third_party" --newroot "${newroot}/release/models"
15 changes: 3 additions & 12 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ steps:
git clone [email protected]:openconfig/models-ci.git /go/src/github.com/openconfig/models-ci
cd /go/src/github.com/openconfig/models-ci
# Modify the major version to update models-ci version.
branch=$(git tag -l 'v10.*' | sort -V | tail -1)
branch=$(git tag -l 'v11.*' | sort -V | tail -1)
branch=c880ed2
wenovus marked this conversation as resolved.
Show resolved Hide resolved
git checkout $branch
volumes:
- name: 'ssh'
Expand Down Expand Up @@ -213,16 +214,6 @@ steps:
id: 'oc-pyang'

############### GOYANG/YGOT ###############
- name: 'golang'
entrypoint: 'go'
args: ['install', 'github.com/openconfig/ygot/generator@latest']
volumes:
- name: 'gopath'
path: /go
env:
- 'GOPATH=/go'
waitFor: ['go path creation']
id: 'goyang-ygot prep'
- name: 'us-west1-docker.pkg.dev/$PROJECT_ID/models-ci/models-ci-image'
entrypoint: 'bash'
args: ['-c', "/go/src/github.com/openconfig/models-ci/validators/goyang-ygot/test.sh"]
Expand All @@ -237,7 +228,7 @@ steps:
- 'COMMIT_SHA=$COMMIT_SHA'
- '_REPO_SLUG=$_REPO_SLUG'
- 'BRANCH_NAME=$BRANCH_NAME'
waitFor: ['validator prep', 'goyang-ygot prep', 'oc-pyang']
waitFor: ['validator prep', 'go path creation', 'oc-pyang']
id: 'goyang-ygot'

############### PYANG ###############
Expand Down
Loading