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

Added script to install multiple dependencies from submodules and then run E2E tests from a submodule #144

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

fernst
Copy link
Member

@fernst fernst commented Aug 19, 2022

This can be useful in multi-module projects if structured like:

Parent project
├ Submodule 1
├ Submodule 2
├ Submodule 3
└ E2E tests submodule

Note that the parent project and all submodules must be build before using this script.

Example usage in https://github.com/data-integrations/google-cloud/blob/gcp-modules-v3/.github/workflows/e2e.yml#L71

@fernst fernst force-pushed the support-for-multi-module-projects branch from d8bca97 to 826c862 Compare August 19, 2022 15:19
@fernst fernst force-pushed the support-for-multi-module-projects branch from 826c862 to 4e66196 Compare August 19, 2022 15:19
plugin_name = root.find('{http://maven.apache.org/POM/4.0.0}artifactId').text
plugin_version = root.find('{http://maven.apache.org/POM/4.0.0}version').text

os.chdir('target')
Copy link
Member

@itsankit-google itsankit-google Aug 19, 2022

Choose a reason for hiding this comment

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

We will need to build the dependency module first then only we can install it from the target folder right??

Copy link
Member Author

@fernst fernst Aug 19, 2022

Choose a reason for hiding this comment

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

yes, the entire project needs to be built using mvn package before installing all dependencies and running E2E tests

Copy link
Member

Choose a reason for hiding this comment

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

Looks like this script isn't taking care of that.

The older script first builds the plugin module and then installs it.
ref - https://github.com/cdapio/cdap-e2e-tests/blob/develop/src/main/scripts/run_e2e_test.py#L69

Copy link
Member Author

Choose a reason for hiding this comment

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

Should this be the responsibility of the plugin? With multi-module projects there may be optimizations (such as only building certain modules) or using multiple threads when compiling. I wanted to leave this for the parent project to decide how to handle.

Copy link
Member

Choose a reason for hiding this comment

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

Discussed offline to keep it as the responsibility of caller that module is built before running the script.
Can we add a comment here in the script for future reference??

Copy link
Member

@itsankit-google itsankit-google left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants