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] Standardize the uses of MONITOR_QUERY_ID and CONFIG_ID throughout the app #144176

Merged

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented Oct 28, 2022

Summary

Resolves #143309

Standardizes the uses of ConfigKey.MONITOR_QUERY_ID and CONFIG_KEY.CONFIG_ID throughout the public app.

ConfigKey string value of config key Responsibility
CONFIG_ID 'id' Represents the id which should be used for ES queries
CONFIG_ID 'config_id' Represents the id which should be used for fetching saved object configuration

Regression testing

This PR requires full manual regression testing for the Synthetics app.

  1. Create a UI browser monitor and lightweight monitor
  2. Create a project monitor browser monitor and lightweight monitor
  3. Navigate to Uptime.
  4. Ensure that when you click on the edit button, it navigates to the monitor edit page
  5. Ensure that when you click on the name, it navigates to the monitor pings page
  6. Navigate to Synthetics UI
  7. Ensure that the metric item is populated with the average duration
  8. Ensure that clicking on the metric item populates the monitor flyout with correct information and the duration chart
  9. Click the actions and disable the monitor. Ensure the monitor is able to be disabled
  10. Click the edit button and ensure it navigates to the monitor appropriately
  11. Click on the monitor grid item. Ensure the the monitor details page populates appropriately.
  12. Click view history on the last 10 pings. Ensure the history is populated appropriately
  13. For browser monitors: ensure that step details page works correctly

@dominiqueclarke dominiqueclarke force-pushed the feature/synthetics-monitor-id-hook branch from 30b6411 to 53c1d9e Compare October 28, 2022 21:14
@dominiqueclarke dominiqueclarke requested a review from a team as a code owner November 9, 2022 19:02
@dominiqueclarke dominiqueclarke added bug Fixes for quality problems that affect the customer experience Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Nov 9, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke dominiqueclarke added v8.6.0 enhancement New value added to drive a business result bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes and removed bug Fixes for quality problems that affect the customer experience enhancement New value added to drive a business result labels Nov 9, 2022
@dominiqueclarke dominiqueclarke changed the title Feature/synthetics monitor id hook [Synthetics] Standardize the uses of MONITOR_QUERY_ID and CONFIG_ID throughout the app Nov 9, 2022
const monitorId = useMonitorQueryId();

if (!monitorId) {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

May be a loading here? or maybe monitorId should be passed from parent component and there we can a central loading.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What loader do you think we should have, since most of these are exploratory view visualizations.

@@ -75,7 +75,6 @@ export const fetchSyntheticsMonitor = async ({

return {
...savedObject.attributes,
id: savedObject.id,
Copy link
Contributor

Choose a reason for hiding this comment

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

why is this removed?

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 was removed in favor of MONITOR_QUERY_ID, which is on the attributes. Now, there's no longer an id field on the front end that is the monitor saved object id. Instead, we rely on CONFIG_ID for that value.

@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 1.1MB 1.1MB +88.0B
Unknown metric groups

ESLint disabled in files

id before after diff
osquery 1 2 +1

ESLint disabled line counts

id before after diff
enterpriseSearch 19 21 +2
fleet 59 65 +6
osquery 108 113 +5
securitySolution 441 447 +6
total +19

Total ESLint disabled count

id before after diff
enterpriseSearch 20 22 +2
fleet 67 73 +6
osquery 109 115 +6
securitySolution 518 524 +6
total +20

History

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

@shahzad31 shahzad31 merged commit 95a0f2e into elastic:main Nov 15, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Nov 15, 2022
@shahzad31 shahzad31 deleted the feature/synthetics-monitor-id-hook branch November 15, 2022 11:18
benakansara pushed a commit to benakansara/kibana that referenced this pull request Nov 17, 2022
…hroughout the app (elastic#144176)

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: shahzad31 <shahzad.muhammad@elastic.co>
Co-authored-by: Shahzad <shahzad31comp@gmail.com>
Resolves elastic#143309
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 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 v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Synthetics] Prefer ConfigKey.MONITOR_QUERY_ID as the single source of truth for monitor queries
5 participants