Skip to content

Add owner.type field to indicate package support level#568

Merged
jsoriano merged 9 commits intoelastic:mainfrom
taylor-swanson:owner-type-tagging
Aug 15, 2023
Merged

Add owner.type field to indicate package support level#568
jsoriano merged 9 commits intoelastic:mainfrom
taylor-swanson:owner-type-tagging

Conversation

@taylor-swanson
Copy link
Copy Markdown
Contributor

@taylor-swanson taylor-swanson commented Jul 20, 2023

What does this PR do?

  • Add new owner.type field to indicate the support level of a package in the manifest.yml file.
  • The 'elastic' value indicates the package is built and supported by Elastic
  • The 'partner' value indicates the package is built and supported by a partner/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

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

Related issues

- 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
@taylor-swanson taylor-swanson self-assigned this Jul 20, 2023
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably define what to expect when this value is not set.

In principle I see two options:

  • elastic as 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 community as default from this version of the spec, and elastic for current packages. We could add something in our CI to ensure that we set the field.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++ to defining a default.

I prefer the second option of having elastic needing set explicitly for future packages we release.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

elastic for 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:
          - experimental

Would I do something similar for owner.type and default it to elastic when the version is before 2.10.0?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@taylor-swanson taylor-swanson marked this pull request as ready for review July 27, 2023 13:01
@taylor-swanson taylor-swanson requested a review from a team as a code owner July 27, 2023 13:01
@taylor-swanson
Copy link
Copy Markdown
Contributor Author

@jsoriano, looks like 2.10.0 was just released. I'd imagine we'd want this going into 2.11.0 now and not 2.10.1?

@jsoriano
Copy link
Copy Markdown
Member

@jsoriano, looks like 2.10.0 was just released. I'd imagine we'd want this going into 2.11.0 now and not 2.10.1?

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.

Copy link
Copy Markdown
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry we didn't review it before 2.10.0 release!

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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add also an owner to the good_v2 test package.

jsoriano
jsoriano previously approved these changes Aug 10, 2023
changes:
- description: Add owner.type field to indicate package support level
type: enhancement
link: https://github.com/elastic/package-spec/pull/568
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, remove this block as it won't be needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite sure I understand, do you want me to put the changelog entry under 2.10.1-next instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we have to remove at some point the 2.10.1-next block, but no worries, we can also remove it later.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 thanks

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

History

cc @taylor-swanson

@jsoriano
Copy link
Copy Markdown
Member

Let's merge this before we forget again 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants