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] Delete monitor API via id param !! #190210

Merged
merged 7 commits into from
Aug 12, 2024

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Aug 9, 2024

Summary

Allow deletion of monitor via id param !!

User can now delete monitor via passing id as url param

DELETE <kibana host>:<port>/api/synthetics/monitors/<config_id>

Previous bulk delete via list of ids via API body still works as well !!

Docs are updated !!

@shahzad31
Copy link
Contributor Author

/ci

Copy link
Contributor

github-actions bot commented Aug 9, 2024

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@obltmachine
Copy link

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

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

@shahzad31 shahzad31 marked this pull request as ready for review August 9, 2024 08:18
@shahzad31 shahzad31 requested a review from a team as a code owner August 9, 2024 08:18
@shahzad31 shahzad31 added the release_note:feature Makes this part of the condensed release notes label Aug 9, 2024
Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

Could you please add a single api integration test for single deletion?

@@ -200,7 +200,7 @@ export function useMonitorListColumns({
},
{
'data-test-subj': 'syntheticsMonitorCopyAction',
isPrimary: true,
isPrimary: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's about showing what is shown on management list action, delete action wasn't shown on hover !!
This make Clone action shown on click and delete on hover.

@botelastic botelastic bot added ci:project-deploy-observability Create an Observability project Team:obs-ux-management Observability Management User Experience Team labels Aug 9, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)


const result: Array<{ id: string; deleted: boolean; error?: string }> = [];
const idsToDelete = [...(ids ?? []), ...(queryId ? [queryId] : [])];
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't love this. This combines the request param and the body ids. I think we should return a 400 if they provide both. I wouldn't think that would be intended.

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 !!

Copy link
Contributor

@dominiqueclarke dominiqueclarke 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

kibana-ci commented Aug 12, 2024

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 3d90f66
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-190210-3d90f66be83a

Failed CI Steps

Metrics [docs]

✅ unchanged

History

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

@shahzad31 shahzad31 merged commit 69f6687 into elastic:main Aug 12, 2024
31 checks passed
@shahzad31 shahzad31 deleted the delete-api-params branch August 12, 2024 19:13
@kibanamachine kibanamachine added v8.16.0 backport:skip This commit does not require backporting labels Aug 12, 2024
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 ci:project-deploy-observability Create an Observability project release_note:feature Makes this part of the condensed release notes Team:obs-ux-management Observability Management User Experience Team v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants