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] Perform params API HTTP migration #160575

Merged
merged 19 commits into from
Jul 4, 2023

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Jun 26, 2023

Summary

Resolves #153490.

Converts API for global params to avoid referencing SO fields on client and separate interfaces for use on client/server when interacting with SO API.

Code is WIP as I still need to convert the getter route.

Checklist

Delete any items that are not applicable to this PR.

Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.

When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:

Risk Probability Severity Mitigation/Notes
Multiple Spaces—unexpected behavior in non-default Kibana Space. Low High Integration tests will verify that all features are still supported in non-default Kibana Space and when user switches between spaces.
Multiple nodes—Elasticsearch polling might have race conditions when multiple Kibana nodes are polling for the same tasks. High Low Tasks are idempotent, so executing them multiple times will not result in logical error, but will degrade performance. To test for this case we add plenty of unit tests around this logic and document manual testing procedure.
Code should gracefully handle cases when feature X or plugin Y are disabled. Medium High Unit tests will verify that any feature flag or plugin combination still results in our service operational.
See more potential risk examples

For maintainers

@justinkambic justinkambic added Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability release_note:skip Skip the PR/issue when compiling release notes v8.10.0 labels Jun 26, 2023
@justinkambic justinkambic self-assigned this Jun 26, 2023
@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.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@justinkambic justinkambic force-pushed the 153490/params-api-http-migration branch 2 times, most recently from baba894 to 33c5caf Compare June 28, 2023 12:16
import { SYNTHETICS_API_URLS } from '@kbn/synthetics-plugin/common/constants';
import expect from '@kbn/expect';
import { syntheticsParamType } from '@kbn/synthetics-plugin/common/types/saved_objects';
import { FtrProviderContext } from '../../ftr_provider_context';
import { PrivateLocationTestService } from './services/private_location_test_service';

function assertHas(actual: unknown, expected: object) {
Copy link
Contributor Author

@justinkambic justinkambic Jun 28, 2023

Choose a reason for hiding this comment

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

I couldn't find a good out-of-the-box assertion that did this. I want to say expect(actual).to.contain.all.keys.and.values.of(expected). If there's a cleaner way that lets me remove this helper please LMK.

EDIT: the reason for this is that the id value is dynamic. These assertions seemed to fail using the eql sort-of-equal, which I had previously believed could do this fuzzy comparison.

@justinkambic justinkambic marked this pull request as ready for review June 28, 2023 14:21
@justinkambic justinkambic requested a review from a team as a code owner June 28, 2023 14:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@justinkambic justinkambic force-pushed the 153490/params-api-http-migration branch from 0abfd8a to 4533c4a Compare June 28, 2023 14:28
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

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 907.3KB 907.2KB -45.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
enterpriseSearch 14 16 +2
securitySolution 410 414 +4
synthetics 72 70 -2
total +4

References to deprecated APIs

id before after diff
synthetics 19 12 -7

Total ESLint disabled count

id before after diff
enterpriseSearch 15 17 +2
securitySolution 489 493 +4
synthetics 79 77 -2
total +4

History

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

cc @justinkambic

@shahzad31 shahzad31 merged commit 6731eb3 into elastic:main Jul 4, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jul 4, 2023
@shahzad31 shahzad31 deleted the 153490/params-api-http-migration branch July 4, 2023 17:57
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jul 5, 2023
* main: (354 commits)
  [Synthetics] Overview page fix last refresh value display (elastic#161086)
  [Synthetics] Remove TLS alert option for ICMP monitor (elastic#161173)
  fixing the path of manifets for hints autodiscover (elastic#161075)
  [Fleet] Fix permissions in integrations Assets page (elastic#161233)
  Update publicBaseUrl warning id (elastic#161204)
  [ML] Fix Anomaly Explorer URL for alerting context with non-default space  (elastic#160899)
  [Enterprise Search]Add 404 error handling for mappings and documents endpoints (elastic#161203)
  [Logs Shared] Move LogStream and LogView into new shared plugin (elastic#161151)
  [Security Solutions] Fix  CellActions component should hide ShowTopN action for nested fields (elastic#159645)
  [SecuritySolutions] Remove filter actions from Cases alerts table and fix show_top_n action (elastic#161150)
  [Infrastructure UI] Add strict payload validation to inventory_views endpoint (elastic#160852)
  [api-docs] 2023-07-05 Daily api_docs build (elastic#161225)
  Fix errors in custom metric payload in SLO dev docs (elastic#161141)
  [data views] Fix overwrite param for create (elastic#160953)
  [Synthetics] Perform params API HTTP migration (elastic#160575)
  [Cloud Security][FTR]Refactor API FTR to use .to.eql instead of .to.be  (elastic#160694)
  Have SLO routes return a 403 instead of a 400 when user has an insufficient license (elastic#161193)
  [Discover] Fix shared links flaky test (elastic#161172)
  [ftr] Improve FTR error handling for NoSuchSessionError (elastic#161025)
  skip flaky suite (elastic#151981)
  ...
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jul 5, 2023
* main: (354 commits)
  [Synthetics] Overview page fix last refresh value display (elastic#161086)
  [Synthetics] Remove TLS alert option for ICMP monitor (elastic#161173)
  fixing the path of manifets for hints autodiscover (elastic#161075)
  [Fleet] Fix permissions in integrations Assets page (elastic#161233)
  Update publicBaseUrl warning id (elastic#161204)
  [ML] Fix Anomaly Explorer URL for alerting context with non-default space  (elastic#160899)
  [Enterprise Search]Add 404 error handling for mappings and documents endpoints (elastic#161203)
  [Logs Shared] Move LogStream and LogView into new shared plugin (elastic#161151)
  [Security Solutions] Fix  CellActions component should hide ShowTopN action for nested fields (elastic#159645)
  [SecuritySolutions] Remove filter actions from Cases alerts table and fix show_top_n action (elastic#161150)
  [Infrastructure UI] Add strict payload validation to inventory_views endpoint (elastic#160852)
  [api-docs] 2023-07-05 Daily api_docs build (elastic#161225)
  Fix errors in custom metric payload in SLO dev docs (elastic#161141)
  [data views] Fix overwrite param for create (elastic#160953)
  [Synthetics] Perform params API HTTP migration (elastic#160575)
  [Cloud Security][FTR]Refactor API FTR to use .to.eql instead of .to.be  (elastic#160694)
  Have SLO routes return a 403 instead of a 400 when user has an insufficient license (elastic#161193)
  [Discover] Fix shared links flaky test (elastic#161172)
  [ftr] Improve FTR error handling for NoSuchSessionError (elastic#161025)
  skip flaky suite (elastic#151981)
  ...
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:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Synthetics] Add / Edit / Get synthetics params API - isolate api interface from saved object interface
6 participants