-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Improve the deprecation messages around include_type_name. #38052
Improve the deprecation messages around include_type_name. #38052
Conversation
This PR standardizes the message across the different indices APIs and makes sure to mention that mappings should no longer be nested under the type name.
Pinging @elastic/es-search |
"requests is deprecated. The parameter include_type_name should be provided and set to false to be " + | ||
"compatible with the next major version."; | ||
"requests is deprecated. To be compatible with 7.0, the mapping definition should not nested under the " + | ||
"type name, and the parameter include_type_name must be provided and set to false."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"should not nested"
Worrying, this decline in the be population.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the mapping definition should not nested under the type name"
Thanks Julie, I am ok with this message as well, but may be more explicit instruction what needs to be done could be more clear, e.g using Mark's comment "To be compatible with 7.0, the type must be removed from the usual mapping -> type -> properties hierarchy, and the parameter ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worrying, this decline in the be population.
Indeed!
"compatible with the next major version."; | ||
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] Specifying types in create index " + | ||
"requests is deprecated. To be compatible with 7.0, the mapping definition should not nested under the " + | ||
"type name, and the parameter include_type_name must be provided and set to false."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another missing "be".
Do you think it would be overkill to make a constant for parts of this message? It may come in handy if we decide to change the message with with another idea I had - at some pointing adding a url e.g. "see http://elastic.co/migrating_types.html for more". We could have JSON examples of the old and new formats there. I found such a warning message pretty useful the other day. I was running an npm install which warned of potential vulnerabilities in code being installed and it included a URL to a page giving useful details behind the particular vulnerability. Way more info than you can pack into a warning message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Julie!
"requests is deprecated. The parameter include_type_name should be provided and set to false to be " + | ||
"compatible with the next major version."; | ||
"requests is deprecated. To be compatible with 7.0, the mapping definition should not nested under the " + | ||
"type name, and the parameter include_type_name must be provided and set to false."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"the mapping definition should not nested under the type name"
Thanks Julie, I am ok with this message as well, but may be more explicit instruction what needs to be done could be more clear, e.g using Mark's comment "To be compatible with 7.0, the type must be removed from the usual mapping -> type -> properties hierarchy, and the parameter ..."
" mapping requests is deprecated. The parameter will be removed in the next major version."; | ||
|
||
public static final String TYPES_DEPRECATION_MESSAGE = "[types removal] The response format of get index " + | ||
"template requests will change in 7.0. Please start using the include_type_name parameter set to false to " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
index template requests
Shouldn't it be "get mapping requests"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thank you both for the review and for catching my typos, I must have been staring at these deprecation messages for too long!
I didn't see a huge benefit to doing so in this PR, since there are a small number of uses of each message and it would cause us to diverge from 7.0 more. However, we've discussed doing a better job unifying the messages in general (and maybe pulling them out of the
Just a note that in #38003 we've added high-level examples of the changes users will have to make in 7.0 to the existing 'removal of types' page. Pulling these examples out into their own page like 'migrating types' and expanding on them could be really nice! If we ended up updating the deprecation warnings to refer to the page, I think we would want to do that in a separate PR against master, since it is not just these messages here that would need updating.
This is a helpful description, but I didn't think it was quite precise because you don't always have |
This PR standardizes the message across the different indices APIs and makes
sure to mention that mappings should no longer be nested under the type name.
Thanks @markharwood for this feedback in #37944 (comment).