From 4e8e4a95faed7ce4bcf969f6bafa3ee6034d7b0b Mon Sep 17 00:00:00 2001 From: "John \"codefu\" McDole" Date: Fri, 10 Oct 2025 20:30:16 -0700 Subject: [PATCH] fix: content hash check for LUCI_CONTEXT (#176867) When running on LUCI, the environment variable is LUCI_CONTEXT fixes: #176838 --- bin/internal/content_aware_hash.ps1 | 2 +- bin/internal/content_aware_hash.sh | 2 +- dev/tools/test/content_aware_hash_test.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/internal/content_aware_hash.ps1 b/bin/internal/content_aware_hash.ps1 index a8439ae8791..275af26df36 100644 --- a/bin/internal/content_aware_hash.ps1 +++ b/bin/internal/content_aware_hash.ps1 @@ -44,7 +44,7 @@ if (($currentBranch -ne "main") -and ($currentBranch -ne "master") -and ($currentBranch -ne "stable") -and ($currentBranch -ne "beta") -and - (-not (($currentBranch -eq "HEAD") -and (-not [string]::IsNullOrEmpty($env:LUCI_CI)))) -and + (-not (($currentBranch -eq "HEAD") -and (-not [string]::IsNullOrEmpty($env:LUCI_CONTEXT)))) -and (-not $currentBranch.StartsWith("gh-readonly-queue/master/pr-")) -and (-not ($currentBranch -like "flutter-*-candidate.*")) -and (-not $isShallow)) { diff --git a/bin/internal/content_aware_hash.sh b/bin/internal/content_aware_hash.sh index b5e0945c639..b440b5c133d 100755 --- a/bin/internal/content_aware_hash.sh +++ b/bin/internal/content_aware_hash.sh @@ -44,7 +44,7 @@ if [[ "$CURRENT_BRANCH" != "main" && \ "$CURRENT_BRANCH" != "beta" && \ "$CURRENT_BRANCH" != "gh-readonly-queue/master/pr-"* && \ "$CURRENT_BRANCH" != "flutter-"*"-candidate."* && \ - ! ( "$CURRENT_BRANCH" == "HEAD" && -n "$LUCI_CI" ) && \ + ! ( "$CURRENT_BRANCH" == "HEAD" && -n "$LUCI_CONTEXT" ) && \ ! -f "$FLUTTER_ROOT/.git/shallow" ]]; then # This is a development branch. Find the merge-base. diff --git a/dev/tools/test/content_aware_hash_test.dart b/dev/tools/test/content_aware_hash_test.dart index a29fda95a8a..b31ac9be7c2 100644 --- a/dev/tools/test/content_aware_hash_test.dart +++ b/dev/tools/test/content_aware_hash_test.dart @@ -231,7 +231,7 @@ void main() { ); // Simulate being in a LUCI environment. - environment['LUCI_CI'] = 'true'; + environment['LUCI_CONTEXT'] = 'true'; expect(runContentAwareHash(), processStdout('63a6c6dc494d9a2fc3e78e8505e878d129429246')); });