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

[ZEPPELIN-5875] Fix flaky tests in core-modules #4556

Merged
merged 19 commits into from
Jan 16, 2023

Conversation

jongyoul
Copy link
Member

@jongyoul jongyoul commented Jan 14, 2023

What is this PR for?

Fixing flaky test in core-modules (hadoop[2|3]).

What type of PR is it?

Bug Fix

Todos

  • - Fix testTimeout_2

What is the Jira issue?

How should this be tested?

  • All CI should pass

Screenshots (if appropriate)

image

Questions:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@jongyoul jongyoul changed the title [ZEPPELIN-5875] Fix a flaky test in TimeoutLifecycleManagerTest [ZEPPELIN-5875] Fix flaky tests in core-modules Jan 15, 2023
@@ -117,6 +117,8 @@
<exclude>org/w3c/dom/**/*</exclude>
<exclude>org/xml/sax/*</exclude>
<exclude>org/xml/sax/**/*</exclude>

<exclude>org/eclipse/sisu/**</exclude>
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Bad service configuration file, or exception thrown while constructing Processor object: javax.annotation.processing.Processor: jar:file:/Users/jl/Works/Projects/zeppelin/zeppelin-interpreter-shaded/target/zeppelin-interpreter-shaded-0.11.0-SNAPSHOT.jar!/META-INF/services/javax.annotation.processing.Processor:1: Illegal provider-class name: org/apache/zeppelin/shaded/org.apache.zeppelin.shaded.org.eclipse.sisu.space.SisuIndexAPT6

@@ -44,6 +45,7 @@ public PooledRemoteClient(SupplierWithIO<T> supplier, int connectionPoolSize) {
GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
poolConfig.setMaxTotal(connectionPoolSize);
poolConfig.setMaxIdle(connectionPoolSize);
poolConfig.setEvictionPolicyClassName(DefaultEvictionPolicy.class.getName());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's similar to the above case. We can add ignore rule for shade as well but I think it's better to set up the class name explicitly

Error: Exception in thread "main" java.lang.IllegalArgumentException: Unable to create EvictionPolicy instance of type org/apache/zeppelin/shaded/org.apache.zeppelin.shaded.org.apache.commons.pool2.impl.DefaultEvictionPolicy

@@ -113,6 +113,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<createDependencyReducedPom>false</createDependencyReducedPom>
Copy link
Member Author

@jongyoul jongyoul Jan 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit complicated but let me explain it.

When we install jar, maven-instll-plugin tries to install the file under /target/*.jar into .m2 but our shade script store shaded jars under /interpreter/{interpreter.name} so the file under /target directory is an original file which is not shaded. so maven-install-plugin copies the original file into .m2 directly as a result. BTW, in case of pom file, dependency-reduced-pom would be copied into .m2 directory even if the jar is not shaded. In our old version of shade plugin, the default setting didn't create dependency-reduced-pom when using outputFile configuration but in the latest one, the plugin creates it even if we use outputFile setting. So I disabled creating it.

@jongyoul jongyoul self-assigned this Jan 15, 2023
@jongyoul
Copy link
Member Author

CI is all green now.

@zjffdu
Copy link
Contributor

zjffdu commented Jan 16, 2023

Thanks @jongyoul

@jongyoul jongyoul merged commit dd03962 into apache:master Jan 16, 2023
Copy link
Contributor

@Reamer Reamer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for correcting the tests. Since the shading still creates weird classes, I will continue to work on #4545 .

@@ -59,7 +59,8 @@ jobs:
!~/.m2/repository/org/apache/zeppelin/
~/.spark-dist
~/.cache
key: ${{ runner.os }}-zeppelin-${{ hashFiles('**/pom.xml') }}
~/conda_pkgs_dir
key: ${{ runner.os }}-zeppelin-${{ hashFiles('**/pom.xml') }}-${{ hashFiles('testing/env_python_3.7_with_R.yml') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ${{ hashFiles('testing/env_python_3.7_with_R.yml') }}? We do not have a conda environment in the CI cache.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh? really? I didn't check the time carefully but felt like it reduce the whole time to setup conda but didn't it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm afraid I don't have numbers, do you have numbers?
In order not to confuse others we should remove the suffix again.

@@ -44,6 +45,9 @@ public PooledRemoteClient(SupplierWithIO<T> supplier, int connectionPoolSize) {
GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
poolConfig.setMaxTotal(connectionPoolSize);
poolConfig.setMaxIdle(connectionPoolSize);
// ZEPPELIN-5875 maven-shade-plugin issue
// `org/apache/zeppelin/shaded/org.apache.zeppelin.shaded.org.apache.commons.pool2.impl.DefaultEvictionPolicy`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still have a shade problem.
org/apache/zeppelin/shaded/org.apache.zeppelin.shaded.org.apache.commons.pool2.impl.DefaultEvictionPolicy does not look like a good class name.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, correct. It's a kind of shade configuration issue. We need to change it but I thought we should make it normal at first. and Then, we could improve it.

@jongyoul
Copy link
Member Author

Since the shading still creates weird classes, I will continue to work on #4545 .

Agreed. It would be great if we could handle all thing this time.

proceane pushed a commit to proceane/zeppelin that referenced this pull request Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants