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

[Bug]Fix version conflict for plugins #312

Merged
merged 3 commits into from
Apr 24, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions packages/osd-plugin-helpers/src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,12 @@ export function runCli() {
plugin
);

if (semver.satisfies(opensearchDashboardsVersion, '<7.9')) {
if (semver.satisfies(opensearchDashboardsVersion, '>=2.0.0')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

For this, we will need to make main to 2.0 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.

This check is good for 1.x and current main.
If later we have 2.x and main is 2.x, then we need to update here.

Copy link
Contributor

Choose a reason for hiding this comment

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

this condition means, dashboard version should be >= 2.0.0 is that correct ? our current version is 1.0

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually we can remove these two condition completely, we are mostly on 7.10 which the issue doesn't persist. @ananzh let's remove it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do. Thanks for providing me the issue link.

log.error(
'These tools are not designed to work with version before 7.9, please checkout an earlier version of OpenSearch Dashboards to build your plugin'
'These tools are not designed to work with version greater than 1.x, please checkout an earlier version of OpenSearch Dashboards to build your plugin'
);
process.exit(1);
}
if (semver.satisfies(opensearchDashboardsVersion, '~7.9.0')) {
log.warning(
'These tools might work with 7.9 versions, but there are known workarounds required. See https://github.com/elastic/kibana/issues/82466 for more info'
);
}

const sourceDir = plugin.directory;
const buildDir = Path.resolve(
Expand Down