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

Stricter UpdateSettingsRequest parsing on the REST layer #79227

Merged
merged 3 commits into from
Oct 19, 2021

Conversation

ChrisHegarty
Copy link
Contributor

As per the comment in issue #29268, in 8.0 we will:

  • Change behaviour to disallow a request with mixed settings.
  • A mixed request will no longer successfully parse.
  • A mixed request will result in a 400 "Bad Request" response.

The test has been expanded to cover more cases per test invocation run,
rather than relying on randomization from run to run to cover mixed
request scenarios.

@ChrisHegarty
Copy link
Contributor Author

@elasticmachine retest this please

@gwbrown gwbrown added :Core/Infra/Settings Settings infrastructure and APIs >bug labels Oct 15, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Oct 15, 2021
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@pgomulka pgomulka left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@rjernst rjernst left a comment

Choose a reason for hiding this comment

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

The validation here is good, we no longer accept the ambiguous case. But I think we should (in a followup) still deprecate one or the other forms (preferrably passing settings since it is unnecessary).

@ChrisHegarty ChrisHegarty merged commit f6801d2 into elastic:master Oct 19, 2021
weizijun added a commit to weizijun/elasticsearch that referenced this pull request Oct 19, 2021
* upstream/master:
  Validate tsdb's routing_path (elastic#79384)
  Adjust the BWC version for the return200ForClusterHealthTimeout field (elastic#79436)
  API for adding and removing indices from a data stream (elastic#79279)
  Exposing the ability to log deprecated settings at non-critical level (elastic#79107)
  Convert operator privilege license object to LicensedFeature (elastic#79407)
  Mute SnapshotBasedIndexRecoveryIT testSeqNoBasedRecoveryIsUsedAfterPrimaryFailOver (elastic#79456)
  Create cache files with CREATE_NEW & SPARSE options (elastic#79371)
  Revert "[ML] Use a new annotations index for future annotations (elastic#79151)"
  [ML] Use a new annotations index for future annotations (elastic#79151)
  [ML] Removing legacy code from ML/transform auditor (elastic#79434)
  Fix rate agg with custom `_doc_count` (elastic#79346)
  Optimize SLM Policy Queries (elastic#79341)
  Fix execution of exists query within nested queries on field with doc_values disabled (elastic#78841)
  Stricter UpdateSettingsRequest parsing on the REST layer (elastic#79227)
  Do not release snapshot file download permit during recovery retries (elastic#79409)
  Preserve request headers in a mixed version cluster (elastic#79412)
  Adjust versions after elastic#79044 backport to 7.x (elastic#79424)
  Mute BulkByScrollUsesAllScrollDocumentsAfterConflictsIntegTests (elastic#79429)
  Fail on SSPL licensed x-pack sources (elastic#79348)

# Conflicts:
#	server/src/test/java/org/elasticsearch/index/TimeSeriesModeTests.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Core/Infra/Settings Settings infrastructure and APIs Team:Core/Infra Meta label for core/infra team v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants