Skip to content
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

chore: Update nightly.yaml to investigate flaky InstantiatingGrpcChannelProviderTest #2891

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
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
52 changes: 26 additions & 26 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,59 +11,59 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macOS-12, ubuntu-22.04, windows-2022 ]
os: [ macOS-12, macos-13, macos-14, ubuntu-22.04, windows-2022 ]
java: [ 11, 17 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: temurin
distribution: zulu
cache: maven
- run: mvn -version
- name: Install
run: mvn install --errors --batch-mode --no-transfer-progress -Dcheckstyle.skip -T 1C
- name: Create issue if previous step fails
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create \
--title "Nightly build for Java ${{ matrix.java }} on ${{ matrix.os }} failed." \
--body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
# - name: Create issue if previous step fails
# if: ${{ failure() }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh issue create \
# --title "Nightly build for Java ${{ matrix.java }} on ${{ matrix.os }} failed." \
# --body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
nightly-java8: # Compile with JDK 11. Run tests with JDK 8.
strategy:
fail-fast: false
matrix:
os: [ macOS-12, ubuntu-22.04, windows-2022 ]
os: [ macOS-12, macos-13, macos-14, ubuntu-22.04, windows-2022 ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.longpaths true
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
distribution: zulu
cache: maven
- run: mvn -version
- name: Install with Java 11
run: mvn install --errors --batch-mode --no-transfer-progress -Dcheckstyle.skip -DskipTests -T 1C

- uses: actions/setup-java@v3
- uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
distribution: zulu
- run: mvn -version
- name: Test with Java 8
# Direct goal invocation ("surefire:test") prevents recompiling tests
run: mvn surefire:test --errors --batch-mode --no-transfer-progress -T 1C
- name: Create issue if previous step fails
if: ${{ failure() }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh issue create \
--title "Nightly-java8 build on ${{ matrix.os }} failed." \
--body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
# - name: Create issue if previous step fails
# if: ${{ failure() }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# gh issue create \
# --title "Nightly-java8 build on ${{ matrix.os }} failed." \
# --body "The build has failed : https://github.com/googleapis/gapic-generator-java/actions/runs/${GITHUB_RUN_ID}"
2 changes: 1 addition & 1 deletion gapic-generator-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.5.3</version>
<executions>
<execution>
<phase>package</phase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,13 +331,13 @@ boolean isCredentialDirectPathCompatible() {
// Notice Windows is supported for now.
@VisibleForTesting
static boolean isOnComputeEngine() {
String osName = System.getProperty("os.name");
if ("Linux".equals(osName)) {
String systemProductName = getSystemProductName();
// systemProductName will be empty string if not on Compute Engine
return systemProductName.contains(GCE_PRODUCTION_NAME_PRIOR_2016)
|| systemProductName.contains(GCE_PRODUCTION_NAME_AFTER_2016);
}
// String osName = System.getProperty("os.name");
// if ("Linux".equals(osName)) {
// String systemProductName = getSystemProductName();
// // systemProductName will be empty string if not on Compute Engine
// return systemProductName.contains(GCE_PRODUCTION_NAME_PRIOR_2016)
// || systemProductName.contains(GCE_PRODUCTION_NAME_AFTER_2016);
// }
return false;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor;
import org.mockito.Mockito;
Expand Down Expand Up @@ -657,6 +658,7 @@ void testLogDirectPathMisconfigNotOnGCE() throws Exception {
transportChannel.awaitTermination(10, TimeUnit.SECONDS);
}

@Disabled
@Test
public void canUseDirectPath_happyPath() {
EnvironmentProvider envProvider = Mockito.mock(EnvironmentProvider.class);
Expand Down Expand Up @@ -693,6 +695,7 @@ public void canUseDirectPath_directPathEnvVarDisabled() {
Truth.assertThat(provider.canUseDirectPath()).isFalse();
}

@Disabled
@Test
public void canUseDirectPath_directPathEnvVarNotSet_attemptDirectPathIsTrue() {
InstantiatingGrpcChannelProvider.Builder builder =
Expand Down
Loading