Skip to content

Commit

Permalink
chore: Update generation configuration at Thu Sep 26 02:24:52 UTC 2024 (
Browse files Browse the repository at this point in the history
#2659)

* chore: Update generation configuration at Wed Sep 25 02:25:49 UTC 2024

* update gen script

* chore: generate libraries at Wed Sep 25 20:26:37 UTC 2024

* chore: Update generation configuration at Thu Sep 26 02:24:52 UTC 2024

---------

Co-authored-by: Joe Wang <[email protected]>
  • Loading branch information
cloud-java-bot and JoeWang1127 authored Sep 26, 2024
1 parent 286b5be commit 1805476
Show file tree
Hide file tree
Showing 189 changed files with 212 additions and 213 deletions.
47 changes: 23 additions & 24 deletions .github/scripts/hermetic_library_generation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,24 @@ message="chore: generate libraries at $(date)"

git checkout "${target_branch}"
git checkout "${current_branch}"
# if the last commit doesn't contain changes to generation configuration,
# do not generate again as the result will be the same.
change_of_last_commit="$(git diff-tree --no-commit-id --name-only HEAD~1..HEAD -r)"
if [[ ! ("${change_of_last_commit}" == *"${generation_config}"*) ]]; then
echo "The last commit doesn't contain any changes to the generation_config.yaml, skipping the whole generation process." || true
exit 0
fi

# copy generation configuration from target branch to current branch.
git show "${target_branch}":"${generation_config}" > "${baseline_generation_config}"
config_diff=$(diff "${generation_config}" "${baseline_generation_config}" || true)

# parse image tag from the generation configuration.
image_tag=$(grep "gapic_generator_version" "${generation_config}" | cut -d ':' -f 2 | xargs)

repo_root_dir=$(pwd)
mkdir -p "${repo_root_dir}/output"
# download api definitions from googleapis repository
googleapis_commitish=$(grep googleapis_commitish "${generation_config}" | cut -d ":" -f 2 | xargs)
api_def_dir=$(mktemp -d)
git clone https://github.com/googleapis/googleapis.git "${api_def_dir}"
pushd "${api_def_dir}"
git checkout "${googleapis_commitish}"
cp -r google/ grafeas/ "${repo_root_dir}/output"
popd

# run hermetic code generation docker image.
docker run \
--rm \
Expand All @@ -90,28 +94,23 @@ docker run \
--baseline-generation-config-path="${workspace_name}/${baseline_generation_config}" \
--current-generation-config-path="${workspace_name}/${generation_config}"

# remove api definitions after generation
rm -rf "${api_def_dir}"

# commit the change to the pull request.
if [[ $(basename $(pwd)) == "google-cloud-java" ]]; then
git add java-* pom.xml gapic-libraries-bom/pom.xml versions.txt
else
# The image leaves intermediate folders and files it works with. Here we remove them
rm -rdf output googleapis "${baseline_generation_config}"
git add --all -- ':!pr_description.txt'
fi
rm -rdf output googleapis "${baseline_generation_config}"
git add --all -- ':!pr_description.txt' ':!hermetic_library_generation.sh'
changed_files=$(git diff --cached --name-only)
if [[ "${changed_files}" == "" ]]; then
echo "There is no generated code change with the generation config change ${config_diff}."
echo "Skip committing to the pull request."
exit 0
if [[ "${changed_files}" != "" ]]; then
echo "Commit changes..."
git commit -m "${message}"
git push
else
echo "There is no generated code change, skip commit."
fi

echo "Configuration diff:"
echo "${config_diff}"
git commit -m "${message}"
git push
# set pr body if pr_description.txt is generated.
if [[ -f "pr_description.txt" ]]; then
pr_num=$(gh pr list -s open -H "${current_branch}" -q . --json number | jq ".[] | .number")
gh pr edit "${pr_num}" --body "$(cat pr_description.txt)"
fi
fi
4 changes: 2 additions & 2 deletions generation_config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
gapic_generator_version: 2.45.0
googleapis_commitish: 534e49c0ca0b9297f4ede6f119a0db054b35dd1e
gapic_generator_version: 2.46.0
googleapis_commitish: 005df4681b89bd204a90b76168a6dc9d9e7bf4fe
libraries_bom_version: 26.47.0
libraries:
- api_shortname: bigquerystorage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/annotations.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public final class AnnotationsProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface AppendRowsRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface AppendRowsResponseOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/arrow.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public final class ArrowProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/arrow.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/arrow.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface ArrowRecordBatchOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/arrow.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/arrow.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface ArrowSchemaOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/arrow.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/arrow.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface ArrowSerializationOptionsOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/avro.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public final class AvroProto {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/avro.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/avro.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface AvroRowsOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/avro.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/avro.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface AvroSchemaOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/avro.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/avro.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface AvroSerializationOptionsOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface BatchCommitWriteStreamsRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface BatchCommitWriteStreamsResponseOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface CreateReadSessionRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface CreateWriteStreamRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/stream.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface FinalizeWriteStreamRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface FinalizeWriteStreamResponseOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

public interface FlushRowsRequestOrBuilder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/bigquery/storage/v1/storage.proto

// Protobuf Java Version: 3.25.4
// Protobuf Java Version: 3.25.5
package com.google.cloud.bigquery.storage.v1;

/**
Expand Down
Loading

0 comments on commit 1805476

Please sign in to comment.