Add owner.type field to indicate package support level#568
Add owner.type field to indicate package support level#568jsoriano merged 9 commits intoelastic:mainfrom
Conversation
- Add new owner.type field to indicate the support level of a package. - The 'elastic' value indicates the package is built and supported by Elastic - The 'vendor' value indiciates the package is built and supported by a vendor and may include involvement from Elastic - The 'community' value indicates the package is built and supported by non-Elastic community members - The field is currently not required
spec/integration/manifest.spec.yml
Outdated
| type: string | ||
| pattern: '^(([a-zA-Z0-9-]+)|([a-zA-Z0-9-]+\/[a-zA-Z0-9-]+))$' | ||
| type: | ||
| description: Describes who owns the package and the level of support that is provided. |
There was a problem hiding this comment.
We should probably define what to expect when this value is not set.
In principle I see two options:
elasticas default, as most existing packages are ours. This may give problems if publishers forget to set the value in the future.- Add this field starting on next package-spec version (2.10.0). Assume
communityas default from this version of the spec, andelasticfor current packages. We could add something in our CI to ensure that we set the field.
There was a problem hiding this comment.
++ to defining a default.
I prefer the second option of having elastic needing set explicitly for future packages we release.
There was a problem hiding this comment.
I definitely agree on setting a default and also agree with defaulting to community for the next package-spec version. For existing packages, I think I saw a before constraint that we can set to satisfy this:
elasticfor current packages.
I saw this, for example:
- before: 2.3.0
patch:
- op: add
path: "/properties/release"
value:
description: The stability of the package (deprecated, use prerelease tags in the version).
deprecated: true # See https://github.com/elastic/package-spec/issues/225
type: string
enum:
- experimental
- beta
- ga
default: ga
examples:
- experimentalWould I do something similar for owner.type and default it to elastic when the version is before 2.10.0?
There was a problem hiding this comment.
Basically, this:
# JSON patches for newer versions should be placed on top
versions:
- before: 2.10.0
patch:
- op: remove
path: "/definitions/conditions/properties/elastic/properties/capabilities"
+ - op: add
+ path: "/definitions/owner/properties/type"
+ value:
+ description: Describes who owns the package and the level of support that is provided.
+ type: string
+ default: elastic
+ enum:
+ - elastic
+ - partner
+ - community
+ examples:
+ - community
- before: 2.3.0There was a problem hiding this comment.
Well, you could replace only the default, with something like:
+ - op: replace
+ path: "/definitions/owner/properties/type/default"
+ value: elastic
Or directly remove the definition so it cannot be used in older versions to avoid confusion:
+ - op: remove
+ path: "/definitions/owner/properties/type"
There was a problem hiding this comment.
I'm leaning towards the "replacing the default" option so that way a value is always present, rather than the definition being absent in some cases. If you don't think that'd be a concern, then I'm okay with removing the definition as well. Either change seems pretty straightforward to add.
|
@jsoriano, looks like |
Hi, I am very sorry that we missed this change. Yes, In principle I am afraid that it will have to wait for 2.11.0. |
jsoriano
left a comment
There was a problem hiding this comment.
Sorry we didn't review it before 2.10.0 release!
spec/integration/manifest.spec.yml
Outdated
| type: string | ||
| pattern: '^(([a-zA-Z0-9-]+)|([a-zA-Z0-9-]+\/[a-zA-Z0-9-]+))$' | ||
| type: | ||
| description: Describes who owns the package and the level of support that is provided. |
There was a problem hiding this comment.
Nit. Please add to the description what each possible value is intended for.
| patch: | ||
| - op: remove | ||
| path: "/definitions/conditions/properties/elastic/properties/capabilities" | ||
| - op: replace |
There was a problem hiding this comment.
This will need to be moved to a new section - before: 2.11.0.
| title: Collect sample logs from instances | ||
| description: Collecting sample logs | ||
| owner: | ||
| type: invalid |
There was a problem hiding this comment.
Please add also an owner to the good_v2 test package.
spec/changelog.yml
Outdated
| changes: | ||
| - description: Add owner.type field to indicate package support level | ||
| type: enhancement | ||
| link: https://github.com/elastic/package-spec/pull/568 |
There was a problem hiding this comment.
Please, remove this block as it won't be needed.
There was a problem hiding this comment.
Not quite sure I understand, do you want me to put the changelog entry under 2.10.1-next instead?
There was a problem hiding this comment.
No, we have to remove at some point the 2.10.1-next block, but no worries, we can also remove it later.
There was a problem hiding this comment.
I'll put it under 2.10.1-next so at least the entry is in there, but we can remove/rearrange later like you say.
| and maintained by Elastic. The 'partner' value indicates that the | ||
| package is built and maintained by a partner vendor and may include | ||
| involvement from Elastic. The 'community' value indicates the package | ||
| is built and maintained by non-Elastic community members. |
|
Let's merge this before we forget again 🙂 |
What does this PR do?
Why is it important?
Identifies the expected support owner and level of our packages. Other areas, such as the Kibana Integrations UI, can display notices on the support level or provide for filtering to only show Elastic-supported packages, for instance.
Checklist
test/packagesthat prove my change is effective.spec/changelog.yml.Related issues