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] Fix usage of synthetics-* index pattern the synthetics app #152473

Merged
merged 19 commits into from
Mar 28, 2023

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Mar 1, 2023

Summary

Following things have been fixed in the PR

  1. Made sure correct usage of routes to differentiate between uptime and synthetics
  2. Copied few routes from uptime to synthetics
  3. Correct usage of synthetics-* in exploratory view
  4. Handle privileges

Since uptime and synthetics are separate app. Correct usage has been made in exploratory view and observability overview page to reflect that.

@shahzad31 shahzad31 changed the title [Synthetics] Fix usage of synthetics-* index pattern the synthetics pp [Synthetics] Fix usage of synthetics-* index pattern the synthetics app Mar 1, 2023
@shahzad31 shahzad31 added release_note:skip Skip the PR/issue when compiling release notes v8.8.0 labels Mar 27, 2023
@shahzad31 shahzad31 marked this pull request as ready for review March 27, 2023 12:30
@shahzad31 shahzad31 requested review from a team as code owners March 27, 2023 12:30
@@ -75,7 +75,7 @@ export function UptimeSection({ bucketSize }: Props) {
]
);

if (!hasDataMap.synthetics?.hasData) {
if (!hasDataMap.uptime?.hasData) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Not necessarily related to this line, but will we need to add a Synthetics section to the observability overview page before GA?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i don't think it's needed for GA

@@ -73,7 +73,7 @@ describe('HasDataContextProvider', () => {
expect(result.current).toEqual({
hasDataMap: {
apm: { hasData: undefined, status: 'success' },
synthetics: { hasData: undefined, status: 'success' },
uptime: { hasData: undefined, status: 'success' },
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't synthetics included in the hasDataMap, in addition to Uptime?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because we don't have a UI section or need for that.

@@ -100,7 +100,7 @@ export function HasDataContextProvider({ children }: { children: React.ReactNode
serviceName: resultUx?.serviceName as string,
});
break;
case SYNTHETICS_APP:
case UPTIME_APP:
Copy link
Contributor

Choose a reason for hiding this comment

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

No has data handler for synthetics app?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

because we don't have a UI section or need for that.

export const useSyntheticsPrivileges = () => {
const { error } = useSelector(selectOverviewStatus);

if (error?.body?.message?.startsWith('MissingIndicesPrivileges:')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Comparing against the error message versus the error type seems a bit brittle to me. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we wanted a more specific comparison here.

@@ -42,7 +42,7 @@ export const UptimePageTemplateComponent: React.FC<Props & EuiPageTemplateProps>
inspectorAdapters.requests.reset();
}, [inspectorAdapters.requests]);

if (error) {
if (error && path !== SETTINGS_ROUTE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this added?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for settings page , no data state doesn't make sense.

@botelastic botelastic bot added the Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability label Mar 27, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke dominiqueclarke self-requested a review March 28, 2023 13:25
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.

Smoke testing Uptime and Synthetics LGTM

Smoke tested Synthetics app pages, including exploratory view

Smoke tested Uptime pages, including changing uptime index settings, Exploratory view, and observability overview

Smoke tested no data views in Uptime and Synthetics

Smoke tested no permissions view in Uptime and Synthetics

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
synthetics 1370 1371 +1

Async chunks

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

id before after diff
observability 1.1MB 1.1MB +81.0B
synthetics 1.4MB 1.4MB +1.6KB
total +1.7KB

Page load bundle

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

id before after diff
observability 88.7KB 89.0KB +249.0B
synthetics 26.6KB 26.6KB -4.0B
total +245.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 433 436 +3

Total ESLint disabled count

id before after diff
securitySolution 513 516 +3

History

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

Copy link
Contributor

@CoenWarmer CoenWarmer left a comment

Choose a reason for hiding this comment

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

LGTM

@shahzad31 shahzad31 merged commit 55afbba into elastic:main Mar 28, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Mar 28, 2023
@shahzad31 shahzad31 deleted the fix-index-pattern-usage branch March 28, 2023 15:07
@shahzad31
Copy link
Contributor Author

POST FF Testing LGTM !!

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.8.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants