Skip to content

Commit c1d196a

Browse files
authored
Merge branch 'main' into feat/deleteSourceObjects-compose-10602500430278326901
2 parents fd8a016 + 27feef5 commit c1d196a

30 files changed

Lines changed: 1132 additions & 391 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,17 @@ jobs:
246246
JOB_TYPE: test
247247
JOB_NAME: units-8-runtime-${{matrix.java}}
248248
working-directory: ${{matrix.package}}
249+
required:
250+
needs: [ changes, split-units ]
251+
name: conditional-required-check
252+
if: ${{ always() }} # Always run even if any "needs" jobs fail
253+
runs-on: ubuntu-22.04
254+
steps:
255+
- name: Fail if any previous failure
256+
if: ${{ needs.changes.outputs.packages != '[]' && contains(needs.*.result, 'failure') }}
257+
run: exit 1
258+
- name: Success otherwise
259+
run: echo "Success!"
249260
windows:
250261
runs-on: windows-latest
251262
steps:
@@ -332,30 +343,3 @@ jobs:
332343
env:
333344
library_generation_image_tag: 2.68.0
334345
workspace_name: /workspace
335-
336-
# TODO: Uncomment the needed Github Actions
337-
# dependencies:
338-
# runs-on: ubuntu-latest
339-
# strategy:
340-
# matrix:
341-
# java: [8, 11, 17]
342-
# steps:
343-
# - uses: actions/checkout@v3
344-
# - uses: actions/setup-java@v3
345-
# with:
346-
# distribution: zulu
347-
# java-version: ${{matrix.java}}
348-
# - run: java -version
349-
# - run: .kokoro/dependencies.sh
350-
# clirr:
351-
# runs-on: ubuntu-latest
352-
# steps:
353-
# - uses: actions/checkout@v3
354-
# - uses: actions/setup-java@v3
355-
# with:
356-
# distribution: zulu
357-
# java-version: 8
358-
# - run: java -version
359-
# - run: .kokoro/build.sh
360-
# env:
361-
# JOB_TYPE: clirr

.github/workflows/google-auth-library-java-ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
filters: |
3535
library:
3636
- 'google-auth-library-java/**'
37+
- '.github/workflows/google-auth-library-java-ci.yaml'
3738
units-logging:
3839
needs: filter
3940
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -54,3 +55,14 @@ jobs:
5455
BUILD_SUBDIR: google-auth-library-java
5556
JOB_TYPE: test
5657
SUREFIRE_JVM_OPT: "-P '!slf4j2x,slf4j2x-test'"
58+
required:
59+
needs: [ units-logging ]
60+
name: conditional-required-check
61+
if: ${{ always() }} # Always run even if any "needs" jobs fail
62+
runs-on: ubuntu-22.04
63+
steps:
64+
- name: Fail if any previous failure
65+
if: ${{ contains(needs.*.result, 'failure') }}
66+
run: exit 1
67+
- name: Success otherwise
68+
run: echo "Success!"

.github/workflows/hermetic-build-scripts-ci.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,14 @@ jobs:
9797
# exclude generated golden files
9898
# exclude owlbot until further refaction
9999
black --check hermetic_build --exclude "(library_generation/tests/resources/goldens)"
100+
required:
101+
needs: [ library-generation-unit-tests, library-generation-lint-shell, library-generation-lint-python ]
102+
name: conditional-required-check
103+
if: ${{ always() }} # Always run even if any "needs" jobs fail
104+
runs-on: ubuntu-22.04
105+
steps:
106+
- name: Fail if any previous failure
107+
if: ${{ contains(needs.*.result, 'failure') }}
108+
run: exit 1
109+
- name: Success otherwise
110+
run: echo "Success!"

.github/workflows/java-spanner-jdbc-ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
filters: |
3535
library:
3636
- 'java-spanner-jdbc/**'
37+
- '.github/workflows/java-spanner-jdbc-ci.yaml'
3738
units:
3839
needs: filter
3940
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -141,3 +142,14 @@ jobs:
141142
JOB_TYPE: lint
142143
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
143144
BASE_SHA: ${{ github.event.pull_request.base.sha }}
145+
required:
146+
needs: [ units, units-java8, windows, dependencies, javadoc, lint ]
147+
name: conditional-required-check
148+
if: ${{ always() }} # Always run even if any "needs" jobs fail
149+
runs-on: ubuntu-22.04
150+
steps:
151+
- name: Fail if any previous failure
152+
if: ${{ contains(needs.*.result, 'failure') }}
153+
run: exit 1
154+
- name: Success otherwise
155+
run: echo "Success!"

.github/workflows/java-storage-nio-ci.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
filters: |
3535
library:
3636
- 'java-storage-nio/**'
37+
- '.github/workflows/java-storage-nio-ci.yaml'
3738
units:
3839
needs: filter
3940
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -141,3 +142,14 @@ jobs:
141142
JOB_TYPE: lint
142143
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
143144
BASE_SHA: ${{ github.event.pull_request.base.sha }}
145+
required:
146+
needs: [ units, units-java8, windows, dependencies, javadoc, lint ]
147+
name: conditional-required-check
148+
if: ${{ always() }} # Always run even if any "needs" jobs fail
149+
runs-on: ubuntu-22.04
150+
steps:
151+
- name: Fail if any previous failure
152+
if: ${{ contains(needs.*.result, 'failure') }}
153+
run: exit 1
154+
- name: Success otherwise
155+
run: echo "Success!"

.github/workflows/sdk-platform-java-downstream.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
library:
2525
- 'sdk-platform-java/**'
2626
- .kokoro/downstream-compatibility.sh
27+
- .github/workflows/sdk-platform-java-downstream.yaml
2728
downstream-compatibility:
2829
needs: filter
2930
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -71,3 +72,14 @@ jobs:
7172
sudo apt-get -y install libxml2-utils
7273
- name: Perform downstream compatibility testing
7374
run: .kokoro/downstream-compatibility-spring.sh
75+
required:
76+
needs: [ downstream-compatibility, downstream-compatibility-spring-generator ]
77+
name: conditional-required-check
78+
if: ${{ always() }} # Always run even if any "needs" jobs fail
79+
runs-on: ubuntu-22.04
80+
steps:
81+
- name: Fail if any previous failure
82+
if: ${{ contains(needs.*.result, 'failure') }}
83+
run: exit 1
84+
- name: Success otherwise
85+
run: echo "Success!"

.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ on:
33
branches:
44
- main
55
pull_request:
6-
paths:
7-
- .github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml
8-
- sdk-platform-java/java-shared-dependencies/**
96

107
name: sdk-platform-java Downstream Unmanaged Dependency Check
118
env:
@@ -22,7 +19,8 @@ jobs:
2219
with:
2320
filters: |
2421
library:
25-
- 'sdk-platform-java/**'
22+
- 'sdk-platform-java/java-shared-dependencies/**'
23+
- '.github/workflows/sdk-platform-java-downstream_unmanaged_dependency_check.yaml'
2624
validate:
2725
needs: filter
2826
if: ${{ needs.filter.outputs.library == 'true' }}
@@ -96,3 +94,14 @@ jobs:
9694
exit 1
9795
fi
9896
echo "Unmanaged dependency check passed"
97+
required:
98+
needs: [ validate ]
99+
name: conditional-required-check
100+
if: ${{ always() }} # Always run even if any "needs" jobs fail
101+
runs-on: ubuntu-22.04
102+
steps:
103+
- name: Fail if any previous failure
104+
if: ${{ contains(needs.*.result, 'failure') }}
105+
run: exit 1
106+
- name: Success otherwise
107+
run: echo "Success!"

.kokoro/presubmit/google-auth-library-java-graalvm-native-presubmit.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,9 @@ env_vars: {
5050
key: "BUILD_SUBDIR"
5151
value: "google-auth-library-java"
5252
}
53+
54+
env_vars: {
55+
key: "INTEGRATION_TEST_ARGS"
56+
value: "-Pslf4j2x"
57+
}
58+

google-auth-library-java/appengine/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@
4242
</archive>
4343
</configuration>
4444
</plugin>
45+
<plugin>
46+
<groupId>org.graalvm.buildtools</groupId>
47+
<artifactId>native-maven-plugin</artifactId>
48+
<configuration>
49+
<skipNativeTests>true</skipNativeTests>
50+
</configuration>
51+
</plugin>
52+
4553
</plugins>
4654
</build>
4755

google-auth-library-java/cab-token-generator/javatests/com/google/auth/credentialaccessboundary/ClientSideCredentialAccessBoundaryFactoryTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,22 +614,28 @@ private Clock createMockClock(RefreshType refreshType, GoogleCredentials sourceC
614614
// Set mocked time so that the token is fresh and no refresh is needed (before the refresh
615615
// margin).
616616
mockedTimeInMillis = expirationTimeInMillis - refreshMarginInMillis - 60000;
617+
when(mockClock.currentTimeMillis()).thenReturn(mockedTimeInMillis);
617618
break;
618619
case ASYNC:
619620
// Set mocked time so that the token is nearing expiry and an async refresh is triggered
620621
// (within the refresh margin).
621622
mockedTimeInMillis = expirationTimeInMillis - refreshMarginInMillis + 60000;
623+
when(mockClock.currentTimeMillis())
624+
.thenReturn(
625+
mockedTimeInMillis, // First call: Stale (triggers the async refresh)
626+
currentTimeInMillis // Subsequent calls: Fresh (skips redundant refreshes)
627+
);
622628
break;
623629
case BLOCKING:
624630
// Set mocked time so that the token requires immediate refresh (just after the minimum
625631
// token lifetime).
626632
mockedTimeInMillis = expirationTimeInMillis - minimumTokenLifetimeMillis + 60000;
633+
when(mockClock.currentTimeMillis()).thenReturn(mockedTimeInMillis);
627634
break;
628635
default:
629636
throw new IllegalArgumentException("Unexpected RefreshType: " + refreshType);
630637
}
631638

632-
when(mockClock.currentTimeMillis()).thenReturn(mockedTimeInMillis);
633639
return mockClock;
634640
}
635641

0 commit comments

Comments
 (0)