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

[Uptime] [Synthetics integration] Ensure that proxy url is not overwritten #99944

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented May 12, 2021

Summary

Fixes #99907

This fix ensures that proxy_url is properly applied to the outputted Synthetics policy.

image

All the fields names for the synthetics integration are mapped to their eventual name in the package policy. These values are stored in a central object with each field name as a key. This central object is created by combining objects from various contexts, including the HTTPAdvancedFields and the TCPAdvancedFields contexts, among others. We then map over this object to build out the integration policy object.

The problem comes in when field names from these contexts are shared, causing one to potentially overwrite the other. In this case, proxy_url exists as a field both within HTTPAdvancedFields and TCPAdvancedFields.

This PR provides a fix by separating out the proxy url value when building the central config object, and ensure that it's mapped to the proper value based on monitor type.

This issue I believe highlights a larger issue of managing the config centrally. In the future, a refactor should be considered to allow managing separate config objects for each of the monitor types, preventing overlap.

@dominiqueclarke dominiqueclarke added bug Fixes for quality problems that affect the customer experience v8.0.0 Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability release_note:skip Skip the PR/issue when compiling release notes v7.14.0 v7.13.0 auto-backport Deprecated - use backport:version if exact versions are needed labels May 12, 2021
@dominiqueclarke dominiqueclarke requested a review from a team as a code owner May 12, 2021 15:30
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke dominiqueclarke changed the title ensure that proxy url is not overwritten [Uptime] [Synthetics integration] Ensure that proxy url is not overwritten May 12, 2021
@kibanamachine
Copy link
Contributor

💚 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
uptime 1.2MB 1.2MB +290.0B
Unknown metric groups

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 4 2 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 5 3 -2
licensing 18 15 -3
monitoring 109 56 -53
total -73

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

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.

I pulled this down and tested vs. master and the proxy was populated by the fix branch.

LGTM!

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.13
7.x

The backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request May 13, 2021
…itten (#99944) (#100078)

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
kibanamachine added a commit that referenced this pull request May 13, 2021
…itten (#99944) (#100077)

Co-authored-by: Dominique Clarke <doclarke71@gmail.com>
gmmorris added a commit to chrisronline/kibana that referenced this pull request May 14, 2021
* master: (27 commits)
  Disable contextMenu when event is not event.kind=event (elastic#100027)
  Updates the monorepo-packages list (elastic#100096)
  Removes circular deps for lists in tooling and bumps down byte limit for lists (elastic#100082)
  [Security Solutions] Breaks down the io-ts packages to decrease plugin size (elastic#100058)
  fix-typo: Use of `than` instead of `then` (elastic#100030)
  [Fleet] Fix error when searching for keys whose names have spaces (elastic#100056)
  [Workplace Search] Fix bug when transitioning to personal dashboard (elastic#100061)
  [index pattern field editor] Update runtime field painless docs url (elastic#100014)
  [QA] Switch tests to use importExport - visualize (elastic#98063)
  [Canvas] Remove unused legacy autocomplete component (elastic#99215)
  Re-enable formerly flaky shareable test (elastic#98826)
  [Uptime] [Synthetics Integration] ensure that proxy url is not overwritten (elastic#99944)
  [Security Solutions][Lists] Trims down list plugin size by breaking out the exception builder into chunks by using react lazy loading (elastic#99989)
  [Uptime] Increase debounce and add immediate submit to `useQueryBar` (elastic#99675)
  chore(NA): moving @kbn/docs-utils into bazel (elastic#100051)
  [Enterprise Search] Fix SchemaFieldTypeSelect axe issues (elastic#100035)
  Remove outdated comment about schema validation not working (it does work now). (elastic#100055)
  Rename alert status OK to Recovered and fix some UX issues around disabling a rule while being in an error state (elastic#98135)
  [Fleet] Do not use async method in plugin setup|start (elastic#100033)
  Skip flaky functional test suite
  ...
yctercero pushed a commit to yctercero/kibana that referenced this pull request May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.13.0 v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Uptime] [Synthetics Integration] Proxy url is not applied to integration policy
4 participants