Skip to content

Commit 7ae48b5

Browse files
authored
CLOUDP-206550: regression in breaking changes (#223)
1 parent d0d783c commit 7ae48b5

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/autoupdate-prod.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ jobs:
7575
## Manual Review Procedure
7676
7777
1. Review changes in the OpenAPI file (openapi/atlas-api.yaml)
78-
2. Review breaking changes information in generated `./releaser/breaking_changes/{release_version}.md` file
79-
3. Merge PR into the main branch
78+
2. If PR contains breaking changes, review `./releaser/breaking_changes/{release_version}.md` file
79+
3. Approve and merge PR into the main branch
8080
4. After the merge automated release process will be triggered.
8181
8282

tools/releaser/scripts/breaking-changes.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
22
set +e
3+
set +u
34
GOPATH=$(go env GOPATH)
45

56
# Inputs:
@@ -14,7 +15,10 @@ go install github.com/joelanford/go-apidiff@latest > /dev/null
1415
GIT_BASE_REF=${GIT_BASE_REF:-git rev-parse head || echo}
1516

1617
echo "Running breaking changes check for $GIT_BASE_REF"
17-
BREAKING_CHANGES=$("$GOPATH/bin/go-apidiff" "$GIT_BASE_REF" --compare-imports="false" --print-compatible="false" --repo-path="../")
18+
19+
pushd "$script_path/../../../" || exit ## workaround for --repo-path="../" not working
20+
BREAKING_CHANGES=$("$GOPATH/bin/go-apidiff" "$GIT_BASE_REF" --compare-imports="false" --print-compatible="false")
21+
popd || exit
1822

1923
if [ -z "$BREAKING_CHANGES" ]; then
2024
echo "No breaking changes detected"
@@ -24,7 +28,7 @@ else
2428
echo "$BREAKING_CHANGES"
2529
else
2630
echo "Creating breaking changes file"
27-
echo -e "# Breaking Changes \n ## SDK changes\n$BREAKING_CHANGES\n## API Changelog\n https://www.mongodb.com/docs/atlas/reference/api-resources-spec/changelog" \
31+
echo -e "# Breaking Changes\n## SDK changes\n$BREAKING_CHANGES\n## API Changelog\n https://www.mongodb.com/docs/atlas/reference/api-resources-spec/changelog" \
2832
> "$script_path/../breaking_changes/${TARGET_BREAKING_CHANGES_FILE}.md"
2933
fi
3034
fi

0 commit comments

Comments
 (0)