-
Notifications
You must be signed in to change notification settings - Fork 75
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
Build using local dependencies, re-enable CI #13
Changes from 3 commits
3b25864
e78c1ca
bfa694b
faa2b26
09bbebd
f6496e2
54e6f38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,19 +30,13 @@ import org.opensearch.gradle.test.RestIntegTestTask | |
buildscript { | ||
ext { | ||
opensearch_group = "org.opensearch" | ||
opensearch_version = '7.10.3' | ||
opensearch_version = '1.0.0' | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
maven { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. By removing this private S3 maven, can we use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup. Free at last! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Btw the S3 credentials being required could also be worked around by tagging There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After removing this s3 maven, I think we need build all of other dependencies and publish them to local maven repo in our laptop, just similar as the CI workflow to make the local There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correct, run |
||
url = 's3://search-vemsarat/' | ||
credentials(AwsCredentials) { | ||
accessKey = System.env.AWS_ACCESS_KEY_ID ?: findProperty('aws_access_key_id') | ||
secretKey = System.env.AWS_SECRET_ACCESS_KEY ?: findProperty('aws_secret_access_key') | ||
} | ||
} | ||
jcenter() | ||
} | ||
|
||
|
@@ -59,15 +53,9 @@ plugins { | |
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
maven { | ||
url = 's3://search-vemsarat/' | ||
credentials(AwsCredentials) { | ||
accessKey = System.env.AWS_ACCESS_KEY_ID ?: findProperty('aws_access_key_id') | ||
secretKey = System.env.AWS_SECRET_ACCESS_KEY ?: findProperty('aws_secret_access_key') | ||
} | ||
} | ||
jcenter() | ||
} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.core.Logger; | ||
import org.junit.Assert; | ||
import org.junit.Ignore; | ||
import org.mockito.Answers; | ||
import org.mockito.Mock; | ||
import org.mockito.MockitoAnnotations; | ||
|
@@ -111,6 +112,7 @@ public void tearDown() throws Exception { | |
super.tearDownLog4jForJUnit(); | ||
} | ||
|
||
@Ignore | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just curious why these tests are not working? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not sure, they are legit flaky, but I opened #15 to address. |
||
public void testDeleteDocsBasedOnShardSizeWithCleanupNeededAsTrue() throws Exception { | ||
long maxShardSize = 1000; | ||
when(storeStats.getSizeInBytes()).thenReturn(maxShardSize + 1); | ||
|
@@ -120,6 +122,7 @@ public void testDeleteDocsBasedOnShardSizeWithCleanupNeededAsTrue() throws Excep | |
}, exception -> { throw new RuntimeException(exception); })); | ||
} | ||
|
||
@Ignore | ||
public void testDeleteDocsBasedOnShardSizeWithCleanupNeededAsFalse() throws Exception { | ||
long maxShardSize = 1000; | ||
when(storeStats.getSizeInBytes()).thenReturn(maxShardSize - 1); | ||
|
@@ -132,6 +135,7 @@ public void testDeleteDocsBasedOnShardSizeWithCleanupNeededAsFalse() throws Exce | |
); | ||
} | ||
|
||
@Ignore | ||
public void testDeleteDocsBasedOnShardSizeIndexNotExisted() throws Exception { | ||
when(clusterService.state().getRoutingTable().hasIndex(anyString())).thenReturn(false); | ||
Logger logger = (Logger) LogManager.getLogger(IndexCleanup.class); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: can we avoid using a personal repository name?
Ignore this comment if this is just WIP/temporary solution/testing purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not that minor. This is opensearch-project/common-utils#4 that would need to be merged and that's incompatible with the current S3 build setup - the whole build fails without S3 ENV regardless of whether you try to build to maven local or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. I mean it's good to remove this personal S3 maven repo
url = 's3://search-vemsarat/'
, but seems we use another personal local path with name'dblock/...
.Currently it's not convenient to build/test locally. Will we publish all dependencies to public maven/integrate with jitpack soon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The personal path is just pending PRs being merged if we decide to go this route.
We'll (I'll) evaluate jitpack to compare. It currently doesn't "just work", needs to successfully be able to check out and build these dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, once we evaluate jitpack, we should make changes to common-utils and job-scheduler, build them locally here in the workflows instead of fork repositories.