Skip to content

Cherry-pick #7703 to 6.x: Adding more flexibility to describe a feature#8571

Merged
ph merged 1 commit intoelastic:6.xfrom
ph:backport_7703_6.x
Oct 5, 2018
Merged

Cherry-pick #7703 to 6.x: Adding more flexibility to describe a feature#8571
ph merged 1 commit intoelastic:6.xfrom
ph:backport_7703_6.x

Conversation

@ph
Copy link
Copy Markdown
Contributor

@ph ph commented Oct 4, 2018

Cherry-pick of PR #7703 to 6.x branch. Original message:

Motivation:

Only adding a stability to describe a feature is often not enough,
instead we now allow to add the following information.

Fullname:
This is a more human readable version of the feature.
Example: Jolokia autodiscovery

Doc:
This is a one liner describing what you can do with the feature.
Example: The dissect processor allows to extract useful parts of the
original string.

Stability:
Describe how stable is the current feature.

From the conversation in #7443 (comment) to make the feature concept a bit more future proof.

Note: I've decided to use an interface in that case because it will be easier to give an upgrade path for feature developers.

@exekias
Copy link
Copy Markdown
Contributor

exekias commented Oct 4, 2018

I approved too fast 😇, It seems tests are failing

@ph
Copy link
Copy Markdown
Contributor Author

ph commented Oct 4, 2018

hmm weird, I will fix that and ping you for it.

* Adding more flexibility to describe a feature

Motivation:

Only adding a stability to describe a feature is often not enough,
instead we now allow to add the following information.

Fullname:
This is a more human readable version of the feature.
Example: Jolokia autodiscovery

Doc:
This is a one liner describing what you can do with the feature.
Example: The dissect processor allows to extract useful parts of the
original string.

Stability:
Describe how stable is the current feature.

* Remove the String() but keep the stringer interface implementation

* s/Describeable/Describer

* Add FilterWith that take a function predicate to filter the feature.

Currently we only provide the HasStabilityPred to filter feature from a
bundle, but this change open the door to chainable filterWith.

Example:

```
bundle.FilterWith(NamespaceMatchPred("processor"))
   .FilterWith(HasStabilityPred(feature.Beta))
 ```

* Update overwrite signature.

(cherry picked from commit 91af9a7)
@ph
Copy link
Copy Markdown
Contributor Author

ph commented Oct 4, 2018

@exekias I've updated the PR I had a conflict but I have opted for the wrong resolution.

@ph
Copy link
Copy Markdown
Contributor Author

ph commented Oct 4, 2018

I think #7476 should also be present, it was missing the need_backport label

@ph
Copy link
Copy Markdown
Contributor Author

ph commented Oct 4, 2018

jenkins test this please

@exekias
Copy link
Copy Markdown
Contributor

exekias commented Oct 5, 2018

thank you for opening these @ph

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants