-
Notifications
You must be signed in to change notification settings - Fork 935
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
[PROPOSAL] Incorporate a generic build system (something like Gradle). #1801
Comments
I'm not entirely sure why we need a full Gradle system just to increment a version bump. The current build system uses webpack and is responsible for a lot of the bundling and build processes. Migrating all of them to Gradle would be a huge lift. It would be much easier to just have a script that uses Dashboards existing build system to trigger a version upgrade that the build repo can call when releasing. I'd really love to weigh the pros and cons of having a unified build system vs letting each repo (atleast the node and java repos) have separate build systems tailored to each of their use cases. We can also consider having a unified build contract that each build system needs to support irrespective of the underlying tool, giving us more flexibility for each project while keeping the build/release process simple. |
Hey @ashwin-pc, it can be the best supported one, other than gradle, my point is it should be a best fit for any other automations in future (build system). I have tried few solutions that related to npm Considering the version increment automation: If noticed there are more than one place (not only just package.json) where the version has to be updated, some generic solution like a gradle task, a feasible one, generic for all dashboard repos should be integrated to auto bump the version. FOr gradle projects there is already a solution for this . Any suggestions @ashwin-pc ? |
Got it, yeah i'm aligned with that :) I'd suggest just using a simple node script like the ones we have in our |
@prudhvigodithi, could you please clarify which one of these the ask is? We had a discussion internally and there was some confusion here.
|
Hey @AMoo-Miki The cli's and packages that support version increment but targets only semver, but we use something like 2.0.0.0, the extra .0, and some cli's fail to update this in |
Hello @prudhvigodithi, It appears that the current proposal is for all future build scripts is to move to Gradle, which would call for refactoring to existing mechanism. The reason to refactor would be that future maintainers will be confused why half the project is build one way but another is built another way if all new mechanisms are added in Gradle. If we don't do a major refactor and live in a hybrid state, I see a negative impact to this repo while adding positive value to another repo. But if do execute a major refactor it will be outside of priorities and scope as well. However, if the proposal is we introduce Gradle that calls a bunch of Node scripts then I can maybe get behind this (as proposed by @AMoo-Miki). From the build repo's perspective, it already does this somewhat with |
@prudhvigodithi @AMoo-Miki @kavilla @seanneumann @dblock Having automated the version increment process for OpenSearch, I would like to focus on automating the same for OpenSearch Dashboards as well. I am totally fine with using a different solution for Dashboards but at the same time dont want to add too much overhead on the build and release process. Do you have any specific recommendations? |
Hey all, definitely this process has to be changed, for OpenSearch the workflow action already in place which [AUTO] raises the version increment PR's, but whereas for dashboard its still manual and a person has to spend hours of time to do this. |
@prudhvigodithi do you have list of build automations you intend on introducing? version increment is too simple an automation to disscuss the pros and cons of different approaches since almost any approach should be able to do that. |
One option we have is to introduce a package in e.g.
workflows can use this for the different automations it needs without a lot of rewiring. |
Hey @ashwin-pc thanks, with list of build automations, its starts with version increment and it could extend more in future, one other scenario I see integrating a testing framework, this can also be done using a build tool, that can call a task to run the tests and many more ;), majority of the cli's I see goes with strict semVer, can you add more about this |
One other way I see is, probably better for node projects
Now call |
Yep, we can definitely do that.
|
@seanneumann @seraphjiang Can you please help with this effort? We would need your help to understand the feasibility of the using npm script based solution. |
@ashwin-pc proposed |
Hey @ashwin-pc, is this related to npm-run-script or something different with |
@prudhvigodithi |
@ashwin-pc Can you work with @prudhvigodithi on a POC to use scripts for incrementing the version for core OR any 1 plugin? |
As far as Dashboards is concerned, this should be just bumping the version in
Ref: https://classic.yarnpkg.com/lang/en/docs/cli/version/ Plugins will be very different since they don't follow semantic versioning. |
|
Running |
@AMoo-Miki @kavilla do we have any solution for the issue I have mentioned above, recently noticed the version increment is failing opensearch-dashboards-functional-test repo, looks like some change with jq cli, I have raised a PR to fix this. |
Is your feature request related to a problem? Please describe.
Coming from opensearch-project/opensearch-build#1375.
Adding gradle to the project will help ease the automation part by working with simple gradle tasks, gradle also supports a bunch of node plugins that run node specific tasks, example https://plugins.gradle.org/plugin/com.github.node-gradle.node. Using gradle it's also easy to incorporate any future automation tasks.
One being auto increment the development iteration solution. Having gradle as build systems the automation will be consistent for OpenSearch core and OpenSearch Dashboards as well.
Describe the solution you'd like
To start with gradle build system, implement the solution to increment the development iteration upon every release. Right now since OpenSearch-Dashboards do not have gradle, there is some limitation to perform the automation that will launch a workflow which will trigger gradle tasks to auto-increment the version.
Describe alternatives you've considered
For node, using npm or yarn or any other packages could fullfil the the version increment, but this is only limited to JSON file and some with only strict semantic version. Looking at this example PR, its beyond just a JSON file and more that just having a
version
in the JSON file, the version increment is required in multiple files.The other alternate solutions particularly for version increment problem is to create a workflow with linux parsing tools like awk, sed, but this so brittle and requires developer effort to modify the logic when ever the file changes.
Additional context
Considering for current and future automations, gradle would help ease to implement them with custom tasks and plugins, once gradle build system is part of OpenSearch-Dashboards, its associated plugins can implement the gradle build system.
The text was updated successfully, but these errors were encountered: