-
Notifications
You must be signed in to change notification settings - Fork 916
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
Extends plugin-helpers to be used for automating version changes #2398
Extends plugin-helpers to be used for automating version changes #2398
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2398 +/- ##
==========================================
+ Coverage 66.55% 66.75% +0.19%
==========================================
Files 3169 3194 +25
Lines 60313 60803 +490
Branches 9182 9238 +56
==========================================
+ Hits 40141 40587 +446
- Misses 17979 18008 +29
- Partials 2193 2208 +15
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Thanks for doing this! I think we need to just be a little more explicit about the fact that this script updates source files, so must be run before build
. And I think small examples will make any version formatting errors much easier to navigate.
0302300
to
486ce66
Compare
|
||
Options: | ||
--skip-archive Don't create the zip file, just create the build/opensearch-dashboards directory | ||
--opensearch-dashboards-version, -v OpenSearch Dashboards version that the built plugin will target |
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.
looks like we have two options that both use the flag -v
. Log verbosity and versioning. We may need a new shorthand for this since it can be a little confusing for folks who want to turn on verbose logging during build only to realize that they updated the version.
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.
What a terrible decision. Sadly changing this would be a "breaking change" and will need to be scheduled for a major release.
|
||
Options: | ||
--sync Update the versions to match Dashboards' (default) | ||
--set Update the version to a specific semantic version value |
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.
I agree with josh, a simple example here will definitely be more helpful. semantic is well understood but but given our x.x.x.x versioning system it may be a little confusing as to what we expect as the semantic version. Also its a lot easier with examples
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.
I added some text.
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.
Awesome improvement!
One thing I want to mention, it doesn't currently support qualifiers.
For example, yarn plugin-helpers version --set 3.0.0-alpha
or yarn plugin-helpers version --sync
when my core is defined as 3.0.0-alpha
sets the plugin to 3.0.0.0
and opensearchDashboardsVersion: 3.0.0
.
But I'm fine with iterating on this and opening an issue to support qualifiers.
--opensearch-dashboards-version, -v OpenSearch Dashboards version that the | ||
|
||
Options: | ||
--sync Update the versions to match Dashboards' (default) |
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.
nit: Dashboards'
--> OpenSearch Dashboards'
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.
Originally, I did that suffix stripping intentionally. I have reverted that in the latest iteration.
dff3e50
to
103399f
Compare
Signed-off-by: Miki <miki@amazon.com>
103399f
to
7cf0bab
Compare
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.
Nice! LGTM qualifiers work as well!
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.
nice, I like the addition of compatibility updates and legacy version support
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.x 1.x
# Navigate to the new working tree
cd .worktrees/backport-1.x
# Create a new branch
git switch --create backport/backport-2398-to-1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 48fe60b40661c0bb19ed73d3426f5d5ec418887c
# Push it to GitHub
git push --set-upstream origin backport/backport-2398-to-1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.x Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-1.3 1.3
# Navigate to the new working tree
cd .worktrees/backport-1.3
# Create a new branch
git switch --create backport/backport-2398-to-1.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 48fe60b40661c0bb19ed73d3426f5d5ec418887c
# Push it to GitHub
git push --set-upstream origin backport/backport-2398-to-1.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-1.3 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.x 2.x
# Navigate to the new working tree
cd .worktrees/backport-2.x
# Create a new branch
git switch --create backport/backport-2398-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 48fe60b40661c0bb19ed73d3426f5d5ec418887c
# Push it to GitHub
git push --set-upstream origin backport/backport-2398-to-2.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.x Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-2.3 2.3
# Navigate to the new working tree
cd .worktrees/backport-2.3
# Create a new branch
git switch --create backport/backport-2398-to-2.3
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 48fe60b40661c0bb19ed73d3426f5d5ec418887c
# Push it to GitHub
git push --set-upstream origin backport/backport-2398-to-2.3
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-2.3 Then, create a pull request where the |
Signed-off-by: Miki <miki@amazon.com>
Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <miki@amazon.com> (cherry picked from commit 48fe60b)
Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <miki@amazon.com> (cherry picked from commit 48fe60b)
Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <miki@amazon.com> (cherry picked from commit 48fe60b)
Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Miki <miki@amazon.com> Signed-off-by: Sergey V. Osipov <sipopo@yandex.ru>
Signed-off-by: Miki miki@amazon.com
Description
This extends the existing plugin-helpers package by adding a
version
command to facilitate updating the versions in the manifest and package files of a plugin.Issues Resolved
Addresses the #1801 for OSD plugins
Check List
yarn test:jest
yarn test:jest_integration
yarn test:ftr