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

[Synthetics] Global params Public APIs #169669

Merged
merged 33 commits into from Oct 27, 2023
Merged

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Oct 24, 2023

Summary

fixes #167048
Part of #169547

Global params Public APIs !!

Local testing

set this config to set default version, production already sets it.

server.versioned.versionResolution: oldest

Following API have been made public

  1. Get a parameter by ID
  2. Get List of params
  3. Create a param
  4. Edit a param
  5. Delete a parm

Docs can be tested locally by node scripts/docs --open

image

@github-actions
Copy link

Documentation preview:

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • /oblt-deploy-serverless : Deploy a serverless Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@shahzad31 shahzad31 added release_note:feature Makes this part of the condensed release notes v8.12.0 labels Oct 24, 2023
@shahzad31 shahzad31 marked this pull request as ready for review October 24, 2023 17:44
@shahzad31 shahzad31 requested a review from a team as a code owner October 24, 2023 17:44
@botelastic botelastic bot added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Oct 25, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

Trying to follow the docs, I can't interact with the API. It looks like the original ~/internal/synthetics/params path is still in place to edit the params. This should correspond to the docs, if I'm understanding the intention here correctly.

Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

Summary

Functionality LGTM - I have some concerns about the docs, a couple are nit but I think we need to have another pass on these to make sure we're giving people the best explanation of using the API that we can give.

Concerns

There are comments detailing the specific places in the diff I think we can improve.

  1. The docs for Edit do not seem to reflect the reality of using the API for editing params. It specifies that we can include a param's ID in the path, and it shows this in an example. When I try that I get a 404. If I include the ID in the body of the request, the API behaves in the expected manner.
  2. Let's include example request code for POST and DELETE like we have for the PUT route.
  3. (Optional) I think it might be worth mentioning that kbn-xsrf header is required? That can be a real head scratcher as it's specific to Kibana, unlike something like Content-Type header which is standard. If we don't include it in other docs though, I guess we don't have to here.

Testing log

  1. created some params, example:
image 2. created multiple params in same request 3. Fetch params, all and by id image 4. Edit a param image 5. Delete a param image 6. I ensured that cross-space params showed up, and those configured not to share spaces are encapsulated within the appropriate space.

docs/api/synthetics/params/edit-param.asciidoc Outdated Show resolved Hide resolved
docs/api/synthetics/params/edit-param.asciidoc Outdated Show resolved Hide resolved
docs/api/synthetics/params/delete-param.asciidoc Outdated Show resolved Hide resolved
docs/api/synthetics/params/add-param.asciidoc Outdated Show resolved Hide resolved
docs/api/synthetics/params/edit-param.asciidoc Outdated Show resolved Hide resolved
docs/api/synthetics/params/add-param.asciidoc Show resolved Hide resolved
docs/api/synthetics/params/add-param.asciidoc Show resolved Hide resolved
docs/api/synthetics/params/add-param.asciidoc Show resolved Hide resolved
docs/api/synthetics/params/add-param.asciidoc Outdated Show resolved Hide resolved
Copy link
Contributor

@justinkambic justinkambic left a comment

Choose a reason for hiding this comment

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

LGTM!!

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
synthetics 864.9KB 865.0KB +128.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
synthetics 19.3KB 19.4KB +49.0B

History

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

@shahzad31 shahzad31 merged commit 8bbb58f into elastic:main Oct 27, 2023
29 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Oct 27, 2023
@shahzad31 shahzad31 deleted the params-api branch October 27, 2023 14:16
fkanout pushed a commit to fkanout/kibana that referenced this pull request Oct 30, 2023
bryce-b pushed a commit to bryce-b/kibana that referenced this pull request Oct 30, 2023
awahab07 pushed a commit to awahab07/kibana that referenced this pull request Oct 31, 2023
@shahzad31 shahzad31 mentioned this pull request Nov 6, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:feature Makes this part of the condensed release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.12.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding an public API for modifying Global Parameters.
6 participants