opensearch-project / opensearch-dashboards-test-library

Provides utility functions, page object models, test fixture handling for developers to write functional tests for OpenSearch Dashboards and plugins
Apache License 2.0
3 stars 18 forks source link

Support opensearch-dashboard repository to depend on test library #23

Open Tengda-He opened 2 years ago

Tengda-He commented 2 years ago

Is your feature request related to a problem?

need for a consensus approach for opensearch-dashboard repository to use the opensearch-dashboards-test-library

What solution would you like?

opensearch-dashboard team prefers to consume the test library as a published npm package, like other dependent packages it currently uses.

we need to establish a standard process for npm package publish, currently it is tribe knowledge.

What alternatives have you considered?

Instead of consume the test library as a publish npm version. opensearch-dashboard can also directly use it by branch reference, like how the opensearch-dashboards-functional-test repo imports it now: https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/package.json#L39

Trade-off comparison?

Publishing a version npm packages allows us to have version control. And avoid introducing breaking changes from test library to consuming repositories.

Using the branch reference approach saves us from conducting npm package publish process on test library, and package upgrade on consuming repositories. But it requires the change on test library must be backward compatible, otherwise this may lead to breaking changes or regression on client repositories. Increased development and test difficulty.

Do you have any additional context?

related issues: https://github.com/opensearch-project/opensearch-dashboards-functional-test/issues/29

Tengda-He commented 2 years ago

add @tianleh @ananzh @kavilla @peterzhuamazon @seraphjiang for visibility

tianleh commented 2 years ago

Can we follow the similar style https://github.com/opensearch-project/opensearch-dashboards-functional-test/blob/main/package.json#L39 to use a branch or a tag? This can avoid NPM publish.

kavilla commented 2 years ago

https://github.com/kavilla/anomaly-detection-dashboards-plugin/runs/6361986510?check_suite_focus=true

AD plugin is seeing issues, I attempted to mitigate it by updating the package-lock file but I'm not positive where to find that identity.

Unfortunately if anytime the main branch gets version bumped or changed, then it will cause the compilation of this package to fail if the lock file's sha does not match what is expected.

tianleh commented 2 years ago

@kavilla @ananzh Do you know the org's official process to publish in NPM?

cc @peterzhuamazon @seraphjiang

wbeckler commented 1 year ago

This needs to get onboarded to the build process. @tianleh you can fill out this issue template to kick off the process of releasing an artifact: https://github.com/opensearch-project/opensearch-build/issues/new?assignees=&labels=release%2Cuntriaged&projects=&template=standalone_releases_template.yaml&title=%5Brelease%5D%3A+