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

Build using local dependencies, re-enable CI #13

Merged
merged 7 commits into from
Apr 21, 2021

Conversation

dblock
Copy link
Member

@dblock dblock commented Apr 20, 2021

Signed-off-by: dblock dblock@amazon.com

Description

Fixes CI by building all the dependencies.

Only runs tests, no integ tests, packaging or distribution.

WDYT? Would need to fix all the stuff I removed from CI and the 4 failing tests afterwards, but does give us a green build.

Depends On

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dblock dblock force-pushed the build-local-ci branch 12 times, most recently from 6ae0c46 to 0186f2b Compare April 20, 2021 14:20
Signed-off-by: dblock <dblock@amazon.com>
@dblock dblock force-pushed the build-local-ci branch 3 times, most recently from 2d4a802 to 1cd53c7 Compare April 20, 2021 14:56
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
@dblock dblock changed the title WIP: Build using local dependencies. Build using local dependencies. Apr 20, 2021
@dblock dblock mentioned this pull request Apr 20, 2021
5 tasks
- name: Checkout common-utils
uses: actions/checkout@v2
with:
repository: 'dblock/common-utils'
Copy link
Collaborator

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.

Copy link
Member Author

@dblock dblock Apr 20, 2021

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.

Copy link
Collaborator

@ylwu-amzn ylwu-amzn Apr 20, 2021

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?

Copy link
Member Author

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.

Copy link
Member

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.

@dblock dblock changed the title Build using local dependencies. WIP: Build using local dependencies. Apr 20, 2021
@dblock dblock changed the title WIP: Build using local dependencies. Build using local dependencies. Apr 20, 2021
@dblock dblock changed the title Build using local dependencies. Build using local dependencies, re-enable CI Apr 20, 2021
Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven {
Copy link
Collaborator

Choose a reason for hiding this comment

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

By removing this private S3 maven, can we use ./gradlew build to build AD plugin locally?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup. Free at last!

Copy link
Member Author

Choose a reason for hiding this comment

The 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 ?: '' to them.

Copy link
Contributor

Choose a reason for hiding this comment

The 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 ./gradlew build work, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, run ./gradlew publishToMavenLocal on each dependency once.

Signed-off-by: dblock <dblock@amazon.com>
Signed-off-by: dblock <dblock@amazon.com>
@dblock
Copy link
Member Author

dblock commented Apr 20, 2021

This is now ready to merge.

Copy link
Collaborator

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the change!

@@ -111,6 +112,7 @@ public void tearDown() throws Exception {
super.tearDownLog4jForJUnit();
}

@Ignore
Copy link
Member

Choose a reason for hiding this comment

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

Just curious why these tests are not working?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure, they are legit flaky, but I opened #15 to address.

Copy link
Member

@saratvemulapalli saratvemulapalli left a comment

Choose a reason for hiding this comment

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

Changes look good to me.

Thanks dB!

@dblock dblock merged commit 839a7ed into opensearch-project:main Apr 21, 2021
@dblock dblock deleted the build-local-ci branch April 22, 2021 13:31
@ohltyler ohltyler added the infra Changes to infrastructure, testing, CI/CD, pipelines, etc. label Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra Changes to infrastructure, testing, CI/CD, pipelines, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants