diff --git a/bin/split-repo-post-process.sh b/bin/split-repo-post-process.sh index a8e6de6b5f59..d1168f7272cc 100755 --- a/bin/split-repo-post-process.sh +++ b/bin/split-repo-post-process.sh @@ -167,7 +167,7 @@ if [[ "\${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "\${DIFF_RANGE}" -- "\${RELATIVE_PKG_PATH}"; then + if git diff --quiet "\${DIFF_RANGE}" -- ":(top)\${RELATIVE_PKG_PATH}"; then echo "No changes detected in \${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -190,8 +190,6 @@ else fi -echo "Fixing .trampolinerc for populate-secrets.sh" -gsed -i 's|source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh|source ${PROJECT_ROOT}/'"${PACKAGE_PATH}"'/.kokoro/populate-secrets.sh|' "${PACKAGE_PATH}"/.trampolinerc # add changes to local git directory git add . diff --git a/core/common/.kokoro/trampoline_v2.sh b/core/common/.kokoro/trampoline_v2.sh index a489702c20c7..97222a73da72 100755 --- a/core/common/.kokoro/trampoline_v2.sh +++ b/core/common/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/core/common" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/core/common/.trampolinerc b/core/common/.trampolinerc index a03c8d1af836..5fc2253137db 100644 --- a/core/common/.trampolinerc +++ b/core/common/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/core/common/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/core/paginator/.kokoro/trampoline_v2.sh b/core/paginator/.kokoro/trampoline_v2.sh index 1fdd89c90802..7b2b14902656 100755 --- a/core/paginator/.kokoro/trampoline_v2.sh +++ b/core/paginator/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/core/paginator" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/core/paginator/.trampolinerc b/core/paginator/.trampolinerc index 9b4f78ac8be5..5fc2253137db 100644 --- a/core/paginator/.trampolinerc +++ b/core/paginator/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/core/paginator/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/core/precise-date/.kokoro/trampoline_v2.sh b/core/precise-date/.kokoro/trampoline_v2.sh index 9db7f49f00af..a9e80657cf7b 100755 --- a/core/precise-date/.kokoro/trampoline_v2.sh +++ b/core/precise-date/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/core/precise-date" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/core/precise-date/.trampolinerc b/core/precise-date/.trampolinerc index f968f490e685..5fc2253137db 100644 --- a/core/precise-date/.trampolinerc +++ b/core/precise-date/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/core/precise-date/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/core/projectify/.kokoro/trampoline_v2.sh b/core/projectify/.kokoro/trampoline_v2.sh index f6a5f9ab9b5c..28035da14d19 100755 --- a/core/projectify/.kokoro/trampoline_v2.sh +++ b/core/projectify/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/core/projectify" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/core/projectify/.trampolinerc b/core/projectify/.trampolinerc index 6d691505b3f6..5fc2253137db 100644 --- a/core/projectify/.trampolinerc +++ b/core/projectify/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/core/projectify/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/core/promisify/.kokoro/trampoline_v2.sh b/core/promisify/.kokoro/trampoline_v2.sh index 3cbeae9261a2..073e3766384e 100755 --- a/core/promisify/.kokoro/trampoline_v2.sh +++ b/core/promisify/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/core/promisify" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/core/promisify/.trampolinerc b/core/promisify/.trampolinerc index 91b558756655..5fc2253137db 100644 --- a/core/promisify/.trampolinerc +++ b/core/promisify/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/core/promisify/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/bigquery-storage/.kokoro/trampoline_v2.sh b/handwritten/bigquery-storage/.kokoro/trampoline_v2.sh index 92312d4d09c6..e6c1448bf86e 100755 --- a/handwritten/bigquery-storage/.kokoro/trampoline_v2.sh +++ b/handwritten/bigquery-storage/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/bigquery-storage" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/bigquery-storage/.trampolinerc b/handwritten/bigquery-storage/.trampolinerc index 7a2bd550b020..5fc2253137db 100644 --- a/handwritten/bigquery-storage/.trampolinerc +++ b/handwritten/bigquery-storage/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/bigquery-storage/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/bigquery/.kokoro/trampoline_v2.sh b/handwritten/bigquery/.kokoro/trampoline_v2.sh index 7a219c425ddf..c41ceac967d8 100755 --- a/handwritten/bigquery/.kokoro/trampoline_v2.sh +++ b/handwritten/bigquery/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))"/handwritten/bigquery fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/bigquery/.trampolinerc b/handwritten/bigquery/.trampolinerc index 608c0961662a..c4f630fa614f 100644 --- a/handwritten/bigquery/.trampolinerc +++ b/handwritten/bigquery/.trampolinerc @@ -51,4 +51,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/bigquery/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/bigquery/src/types.d.ts b/handwritten/bigquery/src/types.d.ts index 0322dfbdee0f..709c5a23614f 100644 --- a/handwritten/bigquery/src/types.d.ts +++ b/handwritten/bigquery/src/types.d.ts @@ -13,7 +13,7 @@ // limitations under the License. /** - * Discovery Revision: 20260328 + * Discovery Revision: 20260429 */ /** @@ -891,6 +891,16 @@ declare namespace bigquery { dataMaskingApplied?: boolean; }; + /** + * A list of data policy options. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column). + */ + type IDataPolicyList = { + /** + * Contains a list of data policy options. At most 9 data policies are allowed per field. + */ + dataPolicies?: Array; + }; + /** * Data policy option. For more information, see [Mask data by applying data policies to a column](https://docs.cloud.google.com/bigquery/docs/column-data-masking#data-policies-on-column). */ @@ -1787,6 +1797,10 @@ declare namespace bigquery { * Optional. Amount of memory provisioned for a Python UDF container instance. Format: {number}{unit} where unit is one of "M", "G", "Mi" and "Gi" (e.g. 1G, 512Mi). If not specified, the default value is 512Mi. For more information, see [Configure container limits for Python UDFs](https://cloud.google.com/bigquery/docs/user-defined-functions-python#configure-container-limits) */ containerMemory?: string; + /** + * Optional. Maximum number of requests that a Cloud Run instance can handle concurrently. If absent or if `0`, a default concurrency is used. + */ + containerRequestConcurrency?: string; /** * Optional. Maximum number of rows in each batch sent to the external runtime. If absent or if 0, BigQuery dynamically decides the number of rows in a batch. */ @@ -1883,6 +1897,16 @@ declare namespace bigquery { errors?: Array; }; + /** + * Provides cache statistics for a GenAi function call. + */ + type IGenAiFunctionCacheStats = { + /** + * Number of rows served from cache. + */ + numCacheHitRows?: string; + }; + /** * Provides cost optimization statistics for a GenAi function call. */ @@ -1915,6 +1939,10 @@ declare namespace bigquery { * Provides statistics for each Ai function call within a query. */ type IGenAiFunctionStats = { + /** + * Cache stats for the function. + */ + cacheStats?: IGenAiFunctionCacheStats; /** * Cost optimization stats if applied on the rows processed by the function. */ @@ -3728,6 +3756,20 @@ declare namespace bigquery { refreshWatermark?: string; }; + /** + * Column Metadata Index staleness detailed infnormation. + */ + type IMetadataCacheStalenessInsight = { + /** + * Output only. Average column metadata index staleness of previous runs with the same query hash. + */ + avgPreviousStalenessMs?: string; + /** + * Output only. The percent increase in staleness between the current job and the average staleness of previous jobs with the same query hash. + */ + stalenessPercentageIncrease?: number; + }; + /** * Statistics for metadata caching in queried tables. */ @@ -4027,6 +4069,10 @@ declare namespace bigquery { * Output only. Standalone query stage performance insights, for exploring potential improvements. */ stagePerformanceStandaloneInsights?: Array; + /** + * Output only. Performance insights for table-level attributes that changed compared to previous runs. + */ + tableChangeInsights?: Array; }; /** @@ -5576,6 +5622,24 @@ declare namespace bigquery { type ITableCell = {v?: any}; + /** + * Table-level performance insights compared to previous runs. These insights don't apply to specific query stages, rather they apply to the whole table. + */ + type ITableChangeInsight = { + /** + * Output only. True if the table's column metadata index was not used in the current job, but was used in a previous job with the same query hash. + */ + metadataCacheNotUsedButUsedPreviously?: boolean; + /** + * Output only. If present, indicates that the table's metadata column index staleness has increased significantly compared to previous jobs with the same query hash. + */ + metadataCacheStalenessInsight?: IMetadataCacheStalenessInsight; + /** + * Output only. The table that was queried. + */ + tableReference?: ITableReference; + }; + /** * The TableConstraints defines the primary key and foreign key. */ @@ -5717,10 +5781,23 @@ declare namespace bigquery { * Optional. Field collation can be set only when the type of field is STRING. The following values are supported: * 'und:ci': undetermined locale, case insensitive. * '': empty string. Default to case-sensitive behavior. */ collation?: string; + /** + * Optional. Specifies the data governance tags on this field. This field works with other column-level security fields as follows: - Precedence: If a data governance tag is attached to a column, it takes precedence over the policy tag attached to the column. However, if a data policy is attached to a column, it takes precedence over the data governance tag. - Patching behavior (how this field behaves during a `Table.patch` schema update): - Unset: If the `data_governance_tags_info` field is omitted from the update request, the existing tags on the column are preserved. - Empty Field: To clear data governance tags from a column, send the `data_governance_tags_info` field as an empty object. This will remove all tags from the column. - Updating tags: To replace existing tag, send the field with the new tag. + */ + dataGovernanceTagsInfo?: { + /** + * Optional. The data governance tags added to this field are used for field-level access control. Only one data governance tag is currently supported on a field. Tag keys are globally unique. Tag key is expected to be in the namespaced format, for example "123456789012/pii" where 123456789012 is the ID of the parent organization or project resource for this tag key. Tag value is expected to be the short name, for example "sensitive". See [Tag definitions](https://cloud.google.com/iam/docs/tags-access-control#definitions) for more details. For example: "123456789012/pii": "sensitive", "myProject/cost_center": "sales" + */ + dataGovernanceTags?: {[key: string]: string}; + }; /** * Optional. Data policies attached to this field, used for field-level access control. */ dataPolicies?: Array; + /** + * Optional. Specifies data policies attached to this field, used for field-level access control. When set, this will be the source of truth for data policy information. + */ + dataPolicyList?: IDataPolicyList; /** * Optional. A SQL expression to specify the [default value] (https://cloud.google.com/bigquery/docs/default-values) for this field. */ diff --git a/handwritten/bigtable/.kokoro/trampoline_v2.sh b/handwritten/bigtable/.kokoro/trampoline_v2.sh index 0a0238900394..942a2d678202 100755 --- a/handwritten/bigtable/.kokoro/trampoline_v2.sh +++ b/handwritten/bigtable/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/bigtable" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/bigtable/.trampolinerc b/handwritten/bigtable/.trampolinerc index a38a309cd7ef..5fc2253137db 100644 --- a/handwritten/bigtable/.trampolinerc +++ b/handwritten/bigtable/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/bigtable/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/cloud-profiler/.trampolinerc b/handwritten/cloud-profiler/.trampolinerc index ad15983af29c..5fc2253137db 100644 --- a/handwritten/cloud-profiler/.trampolinerc +++ b/handwritten/cloud-profiler/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/cloud-profiler/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/datastore/.kokoro/trampoline_v2.sh b/handwritten/datastore/.kokoro/trampoline_v2.sh index 8b3b225e110e..aa09b88f7021 100755 --- a/handwritten/datastore/.kokoro/trampoline_v2.sh +++ b/handwritten/datastore/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/datastore" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/datastore/.trampolinerc b/handwritten/datastore/.trampolinerc index a085b321d44b..5fc2253137db 100644 --- a/handwritten/datastore/.trampolinerc +++ b/handwritten/datastore/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/datastore/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/error-reporting/.kokoro/trampoline_v2.sh b/handwritten/error-reporting/.kokoro/trampoline_v2.sh index 9c03d000c1f9..f4e7a9378588 100755 --- a/handwritten/error-reporting/.kokoro/trampoline_v2.sh +++ b/handwritten/error-reporting/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/error-reporting" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/error-reporting/.trampolinerc b/handwritten/error-reporting/.trampolinerc index bec8dd85c29f..5fc2253137db 100644 --- a/handwritten/error-reporting/.trampolinerc +++ b/handwritten/error-reporting/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/error-reporting/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/firestore/.kokoro/trampoline.sh b/handwritten/firestore/.kokoro/trampoline.sh index ef9cb4a426d6..bc983bd3c2b1 100755 --- a/handwritten/firestore/.kokoro/trampoline.sh +++ b/handwritten/firestore/.kokoro/trampoline.sh @@ -13,7 +13,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else diff --git a/handwritten/firestore/.trampolinerc b/handwritten/firestore/.trampolinerc index 2af668a017d0..5fc2253137db 100644 --- a/handwritten/firestore/.trampolinerc +++ b/handwritten/firestore/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/firestore/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/logging-bunyan/.kokoro/trampoline_v2.sh b/handwritten/logging-bunyan/.kokoro/trampoline_v2.sh index b13a2f79d69b..7353696416d0 100755 --- a/handwritten/logging-bunyan/.kokoro/trampoline_v2.sh +++ b/handwritten/logging-bunyan/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/logging-bunyan" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/logging-bunyan/.trampolinerc b/handwritten/logging-bunyan/.trampolinerc index 5dac5eade264..5fc2253137db 100644 --- a/handwritten/logging-bunyan/.trampolinerc +++ b/handwritten/logging-bunyan/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/logging-bunyan/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/logging-winston/.kokoro/trampoline_v2.sh b/handwritten/logging-winston/.kokoro/trampoline_v2.sh index 44b77110d0e1..d530a93e704e 100755 --- a/handwritten/logging-winston/.kokoro/trampoline_v2.sh +++ b/handwritten/logging-winston/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))"/handwritten/logging-winston fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/logging-winston/.trampolinerc b/handwritten/logging-winston/.trampolinerc index b0b7f3fcaa3f..5fc2253137db 100644 --- a/handwritten/logging-winston/.trampolinerc +++ b/handwritten/logging-winston/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/logging-winston/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/logging/.kokoro/trampoline_v2.sh b/handwritten/logging/.kokoro/trampoline_v2.sh index ce3e779c7889..720f5039eec3 100755 --- a/handwritten/logging/.kokoro/trampoline_v2.sh +++ b/handwritten/logging/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/logging" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/logging/.trampolinerc b/handwritten/logging/.trampolinerc index f1ac3ee1315e..e7bdc6334237 100644 --- a/handwritten/logging/.trampolinerc +++ b/handwritten/logging/.trampolinerc @@ -50,4 +50,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/logging/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/pubsub/.kokoro/trampoline_v2.sh b/handwritten/pubsub/.kokoro/trampoline_v2.sh index 682bdefdb061..681e66947bd0 100755 --- a/handwritten/pubsub/.kokoro/trampoline_v2.sh +++ b/handwritten/pubsub/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/pubsub" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/pubsub/.trampolinerc b/handwritten/pubsub/.trampolinerc index a04ed00bb26c..5fc2253137db 100644 --- a/handwritten/pubsub/.trampolinerc +++ b/handwritten/pubsub/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/pubsub/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/spanner/.kokoro/trampoline_v2.sh b/handwritten/spanner/.kokoro/trampoline_v2.sh index 2ed993bbdff3..3982657992a5 100755 --- a/handwritten/spanner/.kokoro/trampoline_v2.sh +++ b/handwritten/spanner/.kokoro/trampoline_v2.sh @@ -254,9 +254,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/spanner" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -269,7 +266,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -277,6 +274,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then @@ -511,3 +511,4 @@ if [[ "${update_cache}" == "true" ]] && \ fi exit "${test_retval}" + diff --git a/handwritten/spanner/.trampolinerc b/handwritten/spanner/.trampolinerc index dea7e9541e63..5fc2253137db 100644 --- a/handwritten/spanner/.trampolinerc +++ b/handwritten/spanner/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/spanner/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh diff --git a/handwritten/storage/.kokoro/trampoline_v2.sh b/handwritten/storage/.kokoro/trampoline_v2.sh index e1adcd24e9e7..5a1817a48e89 100755 --- a/handwritten/storage/.kokoro/trampoline_v2.sh +++ b/handwritten/storage/.kokoro/trampoline_v2.sh @@ -251,9 +251,6 @@ else PROJECT_ROOT="$(repo_root $(pwd))/handwritten/storage" fi -log_yellow "Changing to the project root: ${PROJECT_ROOT}." -cd "${PROJECT_ROOT}" - # Auto-injected conditional check # Check if the package directory has changes. If not, skip tests. if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then @@ -266,7 +263,7 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then # Safe default: HEAD~1..HEAD DIFF_RANGE="HEAD~1..HEAD" - if git diff --quiet "${DIFF_RANGE}" -- "${RELATIVE_PKG_PATH}"; then + if git diff --quiet "${DIFF_RANGE}" -- ":(top)${RELATIVE_PKG_PATH}"; then echo "No changes detected in ${RELATIVE_PKG_PATH}. Skipping tests." exit 0 else @@ -274,6 +271,9 @@ if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then fi fi +log_yellow "Changing to the project root: ${PROJECT_ROOT}." +cd "${PROJECT_ROOT}" + # To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need # to use this environment variable in `PROJECT_ROOT`. if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then diff --git a/handwritten/storage/.trampolinerc b/handwritten/storage/.trampolinerc index 2feed5b5844f..5fc2253137db 100644 --- a/handwritten/storage/.trampolinerc +++ b/handwritten/storage/.trampolinerc @@ -49,4 +49,4 @@ if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then fi # Secret Manager secrets. -source ${PROJECT_ROOT}/handwritten/storage/.kokoro/populate-secrets.sh +source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh