Skip to content
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

Affix settings should work with validators #52933

Closed
stu-elastic opened this issue Feb 27, 2020 · 2 comments · Fixed by #52973
Closed

Affix settings should work with validators #52933

stu-elastic opened this issue Feb 27, 2020 · 2 comments · Fixed by #52973
Assignees
Labels
:Core/Infra/Settings Settings infrastructure and APIs >enhancement

Comments

@stu-elastic
Copy link
Contributor

stu-elastic commented Feb 27, 2020

If you use a validator that returns AffixSettings from Setting.Validator.settings() then trying to perform validation fails with

Caused by: java.lang.UnsupportedOperationException: affix settings can't return values use #getConcreteSetting to obtain a concrete setting

Affix settings should be usable from Setting.Validator.settings()

@stu-elastic stu-elastic added >enhancement :Core/Infra/Settings Settings infrastructure and APIs labels Feb 27, 2020
@stu-elastic stu-elastic self-assigned this Feb 27, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Settings)

@stu-elastic
Copy link
Contributor Author

stu-elastic commented Feb 27, 2020

After addressing this issue:
1) Affix settings will be able to use validators (already done)
2) Affix settings will be usable as dependencies in validators

stu-elastic added a commit to stu-elastic/elasticsearch that referenced this issue Feb 28, 2020
Allow AffixSetting as validator dependencies.  If a validator
specifies AffixSettings as a dependency, then `validate(T, Map)`
will have the concrete setting in a map.

Fixes: elastic#52933
stu-elastic added a commit that referenced this issue Feb 29, 2020
Allow AffixSetting as validator dependencies.  If a validator
specifies AffixSettings as a dependency, then `validate(T, Map)`
will have the concrete setting in a map.

Fixes: #52933
stu-elastic added a commit to stu-elastic/elasticsearch that referenced this issue Feb 29, 2020
Allow AffixSetting as validator dependencies.  If a validator
specifies AffixSettings as a dependency, then `validate(T, Map)`
will have the concrete setting in a map.

Fixes: elastic#52933
stu-elastic added a commit that referenced this issue Feb 29, 2020
Allow AffixSetting as validator dependencies.  If a validator
specifies AffixSettings as a dependency, then `validate(T, Map)`
will have the concrete setting in a map.

Backport of: #52973, 1e0ba70
Fixes: #52933
stu-elastic added a commit to stu-elastic/elasticsearch that referenced this issue Mar 4, 2020
Allow AffixSetting as validator dependencies.  If a validator
specifies AffixSettings as a dependency, then `validate(T, Map)`
will have the concrete setting in a map.

Fixes: elastic#52933
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Settings Settings infrastructure and APIs >enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants