-
Notifications
You must be signed in to change notification settings - Fork 61
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
[Campaign] Ensure 1.x and 2.x branches (main should be 3.0) #142
Comments
@dblock One day ago security choose to delete its The aim of deleting this branch was to was to
While 3.0 will be released in the future and its important, these 'papercuts' impact a smaller project. If we had better mechanisms or potentially a better starting posture we would more quickly adopt the |
@peternied Do you not feel that having a working 3.0 build of the distribution is a valuable goal? |
@dblock The maintainers of security had a discussion yesterday where this topic was raised. While there are pain points as mentioned, ultimately we are in agreement we should move in this direction. By running through the process and connecting data we can generate more topics for the retro(s) if we have recommendations or the process isn't tenable. |
I like the idea of building 3 different versions in parallel to let OpenSearch breaking changes fail plugins early. |
For K-NN and geo-spatial we also moved to the approach where we will cut 3.0 branches only when we know that there are breaking changes being introduced. This keeps the back-porting to minimum and requires less maintenance. @dblock the idea suggested in this proposal aligns with the OpenSearch Core but will that be an overkill for plugins that don't have regular changes for different versions? Also, at what level we are confident that this is the right strategy going forward? |
Let's say there are no changes in the plugin ever at all. How do you propose we build a 3.0, 2.2 and 2.1 distribution that includes the plugin today? |
Core introduces breaking changes into main (now 3.0) all the time. What branch of k-nn should it include in the 3.0 daily build? |
The idea was simple, before the time of release cut the branch, as there were no changes required the cutting a branch will be simple. The problem as our team saw with multiple branches was back-porting only and second it brings the plugins and core 1:1 from a branching standpoint which has its own pros and cons, apart from that I am very much aligned with proposal is being provided. |
The main branch of K-NN and if that breaks some how then reaching out to the maintainers for fixing it and fix could be cutting a specific branch. The idea is just to delay when we need to cut a branch, for plugins with not a lot of changes. Even with branches in K-NN we still need to go ahead and fix the breaking changes. It mainly about back-porting a change from main to 2.x branches with every PR. |
The main pain point which I have experienced with breaking changes is that a breaking change will be merged into 3.0 on core, and then the plugins will run CI later on during some PR and experience the breaking change. It can be a time consuming process to track down the breaking change in core versus other dependencies and then longer to find out how to fix this breaking change in the plugins. Additionally, we have seen breaking changes go in, plugins make changes, then core modifies the breaking change and then plugins need to revert. On backporting, I am not hugely concerned, though it is more burden. For example with the non inclusive language breaking changes. When I raise a PR for 3.0 using anything related to master then I need to modify my PR for backports. Not a big deal for the non inclusive language changes but there are breaking changes which could be more burdensome, and if I am trying to get a fix into a plugin repo on code freeze date then I don't want a small change to take a day of backporting or have CI on the main branch be compromised because of some tangent breaking change which blocks my PR from getting merged and backported. Something to help with the slow feedback loop to help plugins quickly know what kind of changes to make is if core could have another github action which builds all of the plugins. Then we can open a github issue for failing plugins explaining the breaking change and required changes. Running all tests is flaky and slow so we can skip that for now, but the build alone can catch many issues. |
That means having to catch up with a lot of changes in core "in the end" or "last minute". You're only looking at it from the perspective of a plugin (e.g. index management). Right now there are tons of changes on core 3.0 and there's no index-management 3.0 AFAIK. You should have incremented main of index-management to 3.0 a long, long time ago in sync with core 3.0. So, which branch of index-management should be consumed right now by the 3.0 distribution? |
This is backwards. Core cannot "communicate" downstream about how it's going to possibly break its dependencies all the time, it can only try via campaigns for planned changes. If you adopted the same branching as core and did 3.0 development on main rn, you would be building against 3.0 core all the time, constantly fixing any breakage caused by core breaking changes, and backporting to 2.x ensuring changes work on the next 2.x. |
Yes, I looked from a perspective of a plugin owner who wants to maintain the plugin with minimal effort or at-least move towards doing minimal upgrades. Keep fixing the plugins as when core introduce a breaking change thats too much expectation from plugins standpoint. I would really like to see how this churn can be reduced. Nevertheless, I am not against a common branching strategy, but I feel there are many sharp edges to this too and we should try to find those first and see how we can reduce it. Suggestion:
|
I think we may be able to do something about it, please add your comments to opensearch-project/OpenSearch#3740. That said, breaking changes are breaking changes, and they have a "cost" and will require "work" either way. |
@navneet1v Yes! That's what we want. And this is exactly what's asked in this proposal. First note that plugins must have versions that match core. This is a limitation of the product. Plugin 2.1 cannot start on core 3.0. So at a minimum plugins need to provide a branch where the version is 3.0. The distribution builds everything and runs integration, bcw and performance tests, so the software needs to work. We do what you suggest with manifests today (read this). When the first 2.0 release start development, core does it on a 2.x branch, and increments main to 3.0. A manifest is created for 3.0 that now includes core 3.0 from main. Plugins are then asked to do the same and add themselves to the manifest pointing to a branch that has 3.0. When the build breaks, plugin tickets are cut. Instead, today, plugins are saying "we want to reduce backports, so we plan to increment to 3.0 when the last 2.x version, e.g. 2.5 ships, i.e. in 6 months to a year". We're not going to work on 3.0 at all, and not increment main to 3.0 at the same time as core. And the branching strategy proposed doesn't need to match because we don't work on 3.0 anyway, we just need main = 2.0 right now, and tomorrow main = 2.1 and we cut 2.0. |
Hey @navneet1v two problems I see with this: |
We have branching guidance published, can we can we automate workflows and raise issues with repositories that cannot be supported? |
Shall https://github.com/opensearch-project/.github/blob/main/RELEASING.md#plugin-branching be deprecated since it is for 2 releases? @prudhvigodithi |
Hey @tianleh the idea is to incline with Core and have 3 branches at given time, main -> 2.x -> 2.0. Maintain working CI for 3 releases at any given time., @dblock can you add you thoughts on the document please? |
Hey @peternied can you add some more details please? |
It was mentioned that automation is difficult because the branch naming patterns are not consistent. Rather than having some branches name out of standard to block automation efforts, instead make aligning to the standard patterns of value for processes like automated version incrementing. Then you can file bugs on the plugins/repositories that need to update the naming standard to get the value from the automating version incrementing work. |
That doc needs to be updated to say that plugins align on core. |
Moving main branch on plugins to point to 3.0.0-SNAPSHOT makes sense to me however I had a few questions on the standard for development with this setup: If main is pointing to 3.0 and we are developing features for 2.2 for example that might use methods that have name changes in 3.0 or utilizes dependencies that have changed in 3.0. Do we develop this feature from the 2.x branch and merge into 2.x only? What is the standard then for bringing that feature to main? A separate PR that addresses the breaking changes + new feature or we forward port and then address potential breaking changes there? Or should the standard be to develop to main and for every feature that we develop for a 2.x release we should already be mindful that it should pass the 3.0 CI which sometimes isn't possible on things like core name changes in 3.x vs 2.x? |
Let's close this when
|
The Notification plugin is facing constant blockers to bump the This means for Notification to have a PR to bump the version to However it is hard to get all these packages to build successfully, in I suggest that the build manifest for @dblock @bbarani @CEHENKLE @peterzhuamazon |
Build on 3.0 fails pretty frequently, which blocks development on I like @lezzago's idea to point 3.0 to a stable commit in OpenSearch core package to stablize main branch build. |
+1 @lezzago 's stable commit there should be golden build from nightly build we identify as stable build. |
@lezzago I understand your concern but running your CI against the stale core code commit defeats the purpose of the continuous CI. The whole idea of aligning with core branching strategy is to fail fast but I do see it impacting the developer velocity when using a new major branch (3.0 in this case) for development. We are already discussing possible options to reduce the blast radius on this issue and I would recommend you to add your comments there as well. |
Perhaps having a separate |
The Another perspective to consider is that if the plugins are able to bump immediately after the version bump from core and all be part of the new tracking distribution, then ideally, subsequent breaking changes wouldn't make it past the distribution workflow and update in maven if it is introducing a breaking change to the build. This won't prevent the work/potential blockers to upgrade the very first time. However, the distribution is more accurate the more components are immediately added to the manifest after a new version upgrade begins being tracked. That isn't mutually exclusive with the suggestions for a stable build but I think it would help. |
@lezzago @qreshi @ohltyler @seraphjiang You are all highlighting the same problem: several transitive dependencies, everything broken, causing pain all the time on main. I think that does prevent your contributors to making changes on main regularly so a stable(r) build makes sense. Is this something you can enable in your component CI? Instead of using "latest", hardcode build numbers of your dependencies and try that out? I think this would achieve both quick discovery of something broken in integration that builds with latest everything, and leave your main stable. If infra/opensearch-build dictates what "stable" means, you'll have the same problem I think. I am thinking an Engineer on each team could take on "increment to the latest 3.0 on main" as a routine weekly task. |
Created a github issue to track the progress of this campaign for a repo : Neural Search. |
@peterzhuamazon Do you know of any repos that don't have this? Otherwise let's close! |
From the above list I see opensearch-project/asynchronous-search#159, opensearch-project/alerting#493 and opensearch-project/alerting-dashboards-plugin#290 pending, also the above list is old, there are more new repos are added recently we should just cross check before closing this issue. Regarding this how do we ensure the that new repos created do follow this branching in future, the document is already updated, is this good enough? |
Alerting dashboards is still pending. PR is open - opensearch-project/alerting-dashboards-plugin#471 CC: @lezzago |
Closing this issue as all the teams have completed the change and all are currently following the branching strategy listed on the exit criteria of this issue. |
What kind of business use case are you trying to solve? What are your requirements?
Currently plugins follow a branching strategy where they work on
main
for the next development iteration, effectively working on 2 versions at the same time. For example, at the time of writing plugins are working on 2.0 (main) and 1.3.2 (1.3). In contrast, OpenSearch works on 3 releases at the same time. Currently on 3.0 (main), 2.0 (2.x), and 1.3.2 (1.3).What is the problem? What is preventing you from meeting the requirements?
main
branches may need to be selectively backported into multiple 1.x and 2.x releases. Without an intermediate 1.x or 2.x branch there are as many merge conflicts as branches.What are you proposing? What do you suggest we do to solve the problem or improve the existing situation?
Follow OpenSearch core branching, described in #35. Create 1.x and 2.x branches, do not create 2.0 as a branch of main, instead create main -> 2.x -> 2.0. Maintain working CI for 3 releases at any given time.
Exit Criteria
The text was updated successfully, but these errors were encountered: