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

Adds 'discontinued' to OAS meta #192331

Merged

Conversation

TinaHeiligers
Copy link
Contributor

@TinaHeiligers TinaHeiligers commented Sep 8, 2024

Summary

In this PR, we add support for a discontinued field to our router conversion logic at the operation level. discontinued indicates the version or date when the deprecation will be removed, as a string.

Closes #192292

@TinaHeiligers TinaHeiligers added Feature:http Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Feature:OAS Work or issues related to Core-provided mechanisms for generating OAS v8.16.0 labels Sep 8, 2024
@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor Author

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

Self review

TinaHeiligers and others added 5 commits September 10, 2024 07:42
…g_schema/post_process_mutations/mutations/utils.ts


fix discontinued value

Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers marked this pull request as ready for review September 10, 2024 23:21
@TinaHeiligers TinaHeiligers requested review from a team as code owners September 10, 2024 23:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@TinaHeiligers TinaHeiligers added the release_note:skip Skip the PR/issue when compiling release notes label Sep 10, 2024
@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

@TinaHeiligers
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@jloleysens jloleysens left a comment

Choose a reason for hiding this comment

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

Great job @TinaHeiligers , left a few nits up to you, otherwise looks good to go!

*
* @remarks This will be surfaced in OAS documentation.
*/
'x-discontinued'?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: What do you think about defining route definitions and kbn/config-schema meta as { discontinued: '...' } instead of { 'x-discontinued': '...' }. Just saves a few keystrokes and slightly awkward string syntax 'my-field-name'. Then when we render it out we just map it to x-discontinued.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I prefer consistency with the final output but can add a brief explanation to the field's description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in 94bcf57 & eb701a1

packages/kbn-config-schema/src/types/type.ts Show resolved Hide resolved
@TinaHeiligers TinaHeiligers enabled auto-merge (squash) September 12, 2024 22:25
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Unknown metric groups

API count

id before after diff
@kbn/core-http-server 495 496 +1

ESLint disabled line counts

id before after diff
@kbn/router-to-openapispec 2 3 +1

Total ESLint disabled count

id before after diff
@kbn/router-to-openapispec 2 3 +1

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@TinaHeiligers TinaHeiligers merged commit 303d8f2 into elastic:main Sep 13, 2024
18 checks passed
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 The branch "8.16" does not exist
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 192331

Questions ?

Please refer to the Backport tool documentation

@TinaHeiligers TinaHeiligers added backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) and removed v8.16.0 labels Sep 13, 2024
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Sep 13, 2024
## Summary

In this PR, we add support for a discontinued field to our router
conversion logic at the operation level. `discontinued` indicates the
version or date when the deprecation will be removed, as a string.

Closes elastic#192292

---------

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Jean-Louis Leysens <jloleysens@gmail.com>
(cherry picked from commit 303d8f2)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 The branch "8.16" does not exist
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 192331

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Sep 13, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [Adds &#x27;discontinued&#x27; to OAS meta
(#192331)](#192331)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Christiane (Tina)
Heiligers","email":"christiane.heiligers@elastic.co"},"sourceCommit":{"committedDate":"2024-09-13T00:06:41Z","message":"Adds
'discontinued' to OAS meta (#192331)\n\n## Summary\r\n\r\nIn this PR, we
add support for a discontinued field to our router\r\nconversion logic
at the operation level. `discontinued` indicates the\r\nversion or date
when the deprecation will be removed, as a string.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/192292\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis
Leysens
<jloleysens@gmail.com>","sha":"303d8f27e4c8cdfd541e7e6b27548cbffaf454fd","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:http","Team:Core","release_note:skip","v9.0.0","Feature:OAS","v8.16.0"],"title":"Adds
'discontinued' to OAS
meta","number":192331,"url":"https://github.com/elastic/kibana/pull/192331","mergeCommit":{"message":"Adds
'discontinued' to OAS meta (#192331)\n\n## Summary\r\n\r\nIn this PR, we
add support for a discontinued field to our router\r\nconversion logic
at the operation level. `discontinued` indicates the\r\nversion or date
when the deprecation will be removed, as a string.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/192292\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis
Leysens
<jloleysens@gmail.com>","sha":"303d8f27e4c8cdfd541e7e6b27548cbffaf454fd"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192331","number":192331,"mergeCommit":{"message":"Adds
'discontinued' to OAS meta (#192331)\n\n## Summary\r\n\r\nIn this PR, we
add support for a discontinued field to our router\r\nconversion logic
at the operation level. `discontinued` indicates the\r\nversion or date
when the deprecation will be removed, as a string.\r\n\r\nCloses
https://github.com/elastic/kibana/issues/192292\r\n\r\n---------\r\n\r\nCo-authored-by:
Elastic Machine
<elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Jean-Louis
Leysens
<jloleysens@gmail.com>","sha":"303d8f27e4c8cdfd541e7e6b27548cbffaf454fd"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Christiane (Tina) Heiligers <christiane.heiligers@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
@TinaHeiligers TinaHeiligers self-assigned this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:http Feature:OAS Work or issues related to Core-provided mechanisms for generating OAS release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HTTP/OAS] Support a discontinued field to declare when a deprecation is to be removed
7 participants