Skip to content

Fix: sdk generation can't push new generated sdk modules #123

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

Merged
merged 1 commit into from
Jan 10, 2025
Merged
Changes from all commits
Commits
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
32 changes: 16 additions & 16 deletions scripts/sdk-create-pr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,22 +83,6 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
if [[ -n "$service_changes" ]]; then
echo -e "\n>> Detected changes in $service service"

# If lint or test fails for a service, we skip it and continue to the next one
make lint skip-non-generated-files=true service=$service || {
echo "! Linting failed for $service. THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
continue
}
# Our unit test template fails because it doesn't support fields with validations,
# such as the UUID component used by IaaS. We introduce this hardcoded skip until we fix it
if [ "${service}" = "iaas" ] || [ "${service}" = "iaasalpha" ]; then
echo ">> Skipping tests of $service service"
else
make test skip-non-generated-files=true service=$service || {
echo "! Testing failed for $service. THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
continue
}
fi

if [[ "$BRANCH_PREFIX" != "main" ]]; then
git switch main # This is needed to create a new branch for the service without including the previously committed files
branch="$BRANCH_PREFIX/$service"
Expand All @@ -116,6 +100,22 @@ for service_path in ${work_dir}/sdk_to_push/services/*; do
git add go.work
fi

# If lint or test fails for a service, we skip it and continue to the next one
make lint skip-non-generated-files=true service=$service || {
echo "! Linting failed for $service. THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
continue
}
# Our unit test template fails because it doesn't support fields with validations,
# such as the UUID component used by IaaS. We introduce this hardcoded skip until we fix it
if [ "${service}" = "iaas" ] || [ "${service}" = "iaasalpha" ]; then
echo ">> Skipping tests of $service service"
else
make test skip-non-generated-files=true service=$service || {
echo "! Testing failed for $service. THE UPDATE OF THIS SERVICE WILL BE SKIPPED."
continue
}
fi

if [[ "$branch" != "main" ]]; then
echo ">> Creating PR for $service"
git commit -m "Generate $service"
Expand Down
Loading