-
Notifications
You must be signed in to change notification settings - Fork 73
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
[Change Proposal] Remove release tag from packages #225
Comments
Overall I like the direction this is going. Few points from my end:
One thing that came to mind reading the above: What if we have only a single registry for everything? One of the changes needed would be that it would be acceptable to remove pre release packages. |
Yes, I am also thinking on the community, and for that I also think that it would be better to simplify this in some direction 🙂 Maybe we can leave open to the owner of the integration how to use versioning and the different registries, but I would like to remove one of the three things. For pre-release packages I see two possible approaches:
+1, we should consider offering only stable packages by default.
Filtering in general would be actually easier, because it would be less needed: users have configured by default only the production registry, and packages there should be stable enough. The open question here is to decide if we allow < 1.0 packages in the production registry, if we don't, then all the packages in the production registry are going to be stable. If we do, we should show something in the UI, but still no filtering would be needed.
This would be another valid proposal, it would also remove one of the three things I mention, so we would only have:
But I still see some overlap there (should we check that no package is published as There is a third option, that is to remove both things, the multiple registries, and the |
Lets focus for a moment on one vs multiple registries. There is the registry we run and there are going to be the registries that are run by users. Likely the registries run by users could also have additional packages inside at one point. These could be prerelease or GA. Requiring multiple registries for prerelease packages seems to put some limitations in that are not necessarily required. My take take is we should allow prerelease packages in the production registry. In Fleet today we allow a single registry. You can point it to the production, testing, your own but not multiple registries. This keeps things simple for Fleet. One source of truth, no conflicting packages, only one remote request for search etc. If possible, it is a model I would like to keep for simplicity reasons. But assuming at some point we would allow pointing users to multiple registries, it would be likely n registries. And it would not only be for beta vs GA but different packages. And each of these registries could contain beta packages. Here again, we are back to each registry itself should support prerelease packages. One of the reasons for the snapshot registry we have today was also to new registry releases out in the wild to make sure we don't break anything. But the value of this has decreased over time as the package-registry has become more stable and the test suite increased. I'm more and more leaning in the direction there should be likely a single registry and prereleases also go into it. This has at least 2 requirements:
|
I would prefer to go in the direction of removing the Still, I think that some things would still be a bit complicated, specially for package developers, and a bit counter-intuitive for users. for example, how would be steps to make a prerelease of a GA package to make a prerelease:
With multiple repositories:
(Still, having "not validated" versions would create additional versions not seen by users). Also, take into account that the snapshot/staging/production registries being now different registries is almost an implementation detail, they could be different "stages" in a single registry. |
@ruflin and I had a discussion offline about this (Nicolas, feel free to edit the comment 🙂), we had common agreement on some points:
Not directly related, we also discussed about the relationship between the different registries and the maturity of packages. Currently snapshot/staging is used both to test new versions of packages, and to test new versions of the registry. We discussed that:
|
Updated description after the latest comments. |
Adding some use case regarding the topic of one vs. multiple registries: |
The issue I linked above shows some use cases for the release tag and presentation in docs. Let's keep in mind too. |
This is an anti-pattern and you shouldn't follow this path at all. The endpoint team creates new revisions with release tags, for example: 1.2.3-dev1, 1.2.3-dev2, 1.2.3-dev3, 1.2.3. Revisions marked with "devX" are subjected to QA tests. BTW we are actively working on signing package revisions and forbidding direct pushes to the Package Storage, so you will need to address these problems in the future. |
Regarding this, this would be covered by the current proposal, even with a single registry. A package that follows stack versioning, for example for 8.2.2, could be released as |
@jsoriano I navigated to this PR from the Package Storage v2 doc. I'd like to double-check one thing: It won't be possible anymore to consider an existing package a "stable" one, right? Currently: I'm working on With the proposal: I'm working on the I'm not sure if it's an improvement in terms of developer experience as the package owner has to publish the package twice. I think this will be useful if we also decide to deprecate stages as we talk in the package storage v2 doc. |
With the proposal a package is stable following the semver premises: if its version is >= 1.0.0, and it doesn't include prerelease labels. It doesn't depend on where it is published.
Yes, this is one of the parts that made me reluctant of removing the staging repository on a first phase, I see the value of multiple registries or delivery channels for this use case, I talk a bit about this in #225 (comment).
The improvement would be in removing different options to do similar things. Another improvement is to get rid of the promoting step, that has proven to be confusing for developers, we would only publish packages. Perhaps we have to think about the act of publishing. Merging a change and having a build of the package that can be internally used by the developer team doesn't imply that this package should be made available to the public in any form. For example, for the case of the nginx package you mention, if the only reason of publishing the prerelease is to do some internal validation, then maybe the package shouldn't have been published to any public registry. Each developer team might decide about using or not prerelease labels and for what packages and versions. |
On my end, I try to stop thinking about a PR as the release mechanism but more an API that a few minutes later I can check, if the release was successful or not. As soon as "publish" is done on a package, it will be released a few minutes later assuming all checks passed. |
It is optional now, and considered GA when not set. Semver pre-release tags should be used now to publish non-ga versions. See elastic#225
After some internal discussions we have decided to keep the |
It is optional now, and considered GA when not set. Semver pre-release tags should be used now to publish non-ga versions. More information in #225
Implements support for prerelease semver tags in the package registry, in the context of elastic/package-spec#225. After this change, the package registry will return versions of packages in development only if `prerelease=true` or `experimental=true` parameters are included in the search requests. This shouldn't be breaking in current versions of Kibana because Kibana is currently always including `experimental=true`. Summarizing changes here: * In-development versions of packages are not returned by default on search queries. A version is considered an in-development prerelease if it includes a prerelease tag, or if its major is 0. * `prerelease` parameter is added to include versions of packages in development in search requests. * `experimental` parameter is deprecated. * For compatibility with current versions of Kibana, when `experimental` is set to `true`, `prerelease` is also set to `true`. * Packages without a release tag and a stable version according to semver are considered GA for legacy API purposes, or beta if they are prerelease versions. Datastreams without a release tag have the same release level as its parent package.
@joshdover thanks for your detailed explanation and the proposals. Please take into account that this situation can already happen now without any change. A developer may release a prerelease version according to semver, and forget to change the We could right now remove the We can also consider adding an additional validation in the package spec, so it is not possible to have non-ga packages according to semver with I think we agree that anything we do regarding this, should target addressing the incoherences between semver and the Regarding your proposals:
I wouldn't like to enforce any kibana version for this, this would discourage the support of broader ranges of versions, something we want to encourage.
This is the approach proposed here, and already implemented in the registry.
Then packages with prerelease suffixes wouldn't appear on current versions of Kibana, right? I think they should still appear, if not, package developers would need to release different sets of prereleases for the different implementations of Kibana. In any case I think that the ideal place to place any compatibility logic is here, when
|
Yes, it could happen today but is unlikely due to the fact that we have snapshot and staging registries. Whenever we deprecate/remove those, this situation becomes the norm: all prerelease packages (including
To be clear, the versions I'm most worried about are the
Yes that's a good point, let's drop this idea for now.
Apologies, I missed that this new flag was already added, had to look at the specific PRs to realize this. ProblemI'd like to focus on and agree on the problem before jumping to solutions too quickly. Here's how I see it:
Solution
I think we may be able to use some version of this idea to solve this problem, if we do indeed agree it's worth solving. However, it wouldn't be without some drawbacks. Here's what I'm thinking:
The main drawback here is step (3) since this would need to be something developers remember to do. Alternatively, we could make this behavior automatic. Maybe something like this would work:
|
@joshdover I think that you are bringing many good points, and this is by itself a complex discussion, many cases to contemplate 🙂 It may be easier to see if we split the different problems, it looks to me that we are mixing different things here. This proposal is mostly about the deprecation of the The removal of the registry stages is mentioned in this proposal because relying on semver has some related consequences mentioned in the description above:
The removal of the registry stages is being taken more into consideration in the Package Storage v2 efforts. There we are focusing on having a single public registry (as there is a single docker hub, or a single npm). Worst case, alternatives could be considered, as duplicating the registry, or keeping current deployments till the sunset of 7.17. But this is separated to the use of semantic versioning. If we remove the removal of the staging/snapshot registries from the equation, there are still the questions about tech preview/beta vs dev packages. In my opinion we shouldn't do any special handling between them. Main reasons:
Regarding your proposals, first one looks complicated and a bit error prone for developers as you mention. This would also discourage developers of maintaining their packages for broader versions of the stack, something we want to encourage. I will open an issue to discuss possible improvements in the registry to support old versions, and a github discussion to discuss about the removal of the staging and snapshot registries.
One comment about these points. At some point package developers shouldn't even need a registry to test their packages, they should be able to build it (elastic/elastic-package#550), and install it directly in Kibana (elastic/kibana#70582). |
Discussion to discuss about the removal of the staging and snapshot registries: elastic/package-storage#3666 |
@jsoriano I have a question on deprecating release tag. Are packages going to publish release tag at all going forward? And if so, for how long? |
The For backwards compatibility with new packages without a So at the API level, packages without a We don't plan to remove this compatibility logic anytime soon, this will likely stay there while there are versions of Kibana using it (we can assume forever). We also expect that nothing new is built relying on the |
@jsoriano |
Thanks @juliaElastic, please let me know if you find a case where not having the |
Apologize for the delay, thanks for taking the time to answer these questions, @jsoriano.
Great point. Let's focus on just this change for the registry in general. Thank you for clarifying they are being considered separately.
A few questions:
+1 it would be helpful to have a build number or git sha in addition to a semantic version number, like we do for stack builds |
@joshdover I asked the same question here: elastic/kibana#122973 (comment) |
I partially answer this also in elastic/kibana#122973 (comment). Functionally there shouldn't be any difference between any public non-GA versions. The labels will give users information about what to expect in these cases. I think it should be easy to keep a cluster with GA packages only, as well as discovering any kind of packages, but installing non-GA versions should require some extra action or acknowledgement, specially for users currently using GA versions of the package. Beta shouldn't be an exception here.
I don't think we have a policy like this one at the moment and anyone could publish now an experimental package and it would be available for everyone. Has this caused any issue so far? We may be afraid of this being more an issue with the long support of 7.17, but other factors make me think that this may not be such a probable issue: Users staying in 7.x are probably not going to do unattended upgrades, or install new packages. New packages are the main candidates to have more unstable technical previews, and developers creating these packages are probably going to target 8.x only. |
It has not become an issue so far. Do keep in mind that some internal packages do automatically run package upgrades on Kibana startup as of 7.16.0 (apm, endpoint, synthetics, fleet_server, elastic_agent). Of these, fleet_server and elastic_agent are still using a version constraint that would ship to both 7.16 and 8.0 and endpoint uses a constraint that would ship to 8.0. apm and synthetics seem to bumping their version constraint on each stack release, so those should not be problems. |
Closing this, in principle the only pending change is in Fleet, that is being discussed in elastic/kibana#122973. |
This is based on recommendations in elastic/kibana#122973 and elastic/package-spec#225
* Remove release field, add preview1 identifier This is based on recommendations in elastic/kibana#122973 and elastic/package-spec#225 * Bump SM packages to 3.0.0-preview1 This avoids sorting behind the `release: experimental` packages. We could have ES be 2.0.0 but seemed good to align them as part of agent-based monitoring. * Use minor version bumps instead
There is currently a partial overlap in different features regarding the stability level of a package, that uses to bring confusion to integration developers and users:
release
label in manifests can be experimental/beta/ga.Apart of the overlap, there is no enforcement between these features, so it can be possible to find in the production repository a 1.0.0 package marked as experimental.
The proposal would be:
release
labels from the main manifest. To avoid breaking changes they could be marked as optional in the spec, and eventually be ignored everywhere, package registry API could do best-effort interpretation for old experimental-related queries.Some examples with this model:
Discarded ideas:
release
tag at the datastream level delayed as it belongs to a broader discussion about how to tag experimental/beta features in GA packages.Required changes
security_detection_engine
mislabeled in 7.x Some GA packages no longer appear in/search
without experimental/pre-release flag package-registry#793.apm
always usesrelease: ga
, even for non-ga versions Remove release tag from APM package apm-server#7792.release
, extend documentation ofversion
to describe the use of pre-release semver fields./search
argument that lists packages with pre-release semver fields, disable it by default or depending on a flag, and try to keep compatibility with current API arguments related to versioning (experimental
...).package-storage/distribution: If a flag is added to control this behaviour, decide the default option for each registry.Not needed, currently kibana always useexperimental=true
.The text was updated successfully, but these errors were encountered: