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

bump query-string version to remove manual type definitions #78143

Merged
merged 6 commits into from
Sep 24, 2020

Conversation

mshustov
Copy link
Contributor

Summary

Reverts #59633 since we do not support IE 11 anymore. https://github.com/sindresorhus/query-string/releases/tag/v6.0.0

Required to remove manually maintained type definitions that we have to include in every ts project.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@mshustov mshustov added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.10.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Sep 22, 2020
{ sort: false, encode: false }
);
const newValue =
typeof urlState === 'undefined'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

stringify types do not accept undefined

expect(addEmbeddableToDashboardUrl(url, id, 'visualization')).toEqual(
`/pep/app/dashboards#/view/9b780cd0-3dd3-11e8-b2b9-5d5dc1715159?_a=%28description%3A%27%27%2Cfilters%3A%21%28%29%29&_g=%28refreshInterval%3A%28pause%3A%21t%2Cvalue%3A0%29%2Ctime%3A%28from%3Anow-15m%2Cto%3Anow%29%29&addEmbeddableId=${id}&addEmbeddableType=visualization`
expect(addEmbeddableToDashboardUrl(url, id, 'visualization')).toBe(
'/pep/app/dashboards?addEmbeddableId=123eb456cd&addEmbeddableType=visualization#%2Fview%2F9b780cd0-3dd3-11e8-b2b9-5d5dc1715159%3F_g%3D%28refreshInterval%3A%28pause%3A%21t%2Cvalue%3A0%29%2Ctime%3A%28from%3Anow-15m%2Cto%3Anow%29%29%26_a%3D%28description%3A%27%27%2Cfilters%3A%21%28%29%29'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

fragment after query seems to be the correct order https://tools.ietf.org/html/rfc3986#page-16

@@ -34,12 +34,14 @@ export function addEmbeddableToDashboardUrl(
embeddableId: string,
embeddableType: string
) {
const { url, query } = parseUrl(dashboardUrl);
const { url, query, fragmentIdentifier } = parseUrl(dashboardUrl, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

parseUrl seems to be broken in an intermediate release and fixed in 6.13.0 sindresorhus/query-string#222

@mshustov mshustov marked this pull request as ready for review September 22, 2020 14:16
@mshustov mshustov requested a review from a team as a code owner September 22, 2020 14:16
@mshustov mshustov requested a review from a team September 22, 2020 14:16
@mshustov mshustov requested review from a team as code owners September 22, 2020 14:16
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform (Team:Platform)

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

Uptime changes LGTM

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

Pinging @elastic/uptime (Team:uptime)

@afgomez afgomez self-requested a review September 23, 2020 07:28
Copy link
Contributor

@afgomez afgomez left a comment

Choose a reason for hiding this comment

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

Infra changes LGTM

Copy link
Member

@spong spong left a comment

Choose a reason for hiding this comment

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

SIEM changes LGTM! Thanks @restrry! 🙂

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

The Kibana app changes do an incompatible change AFAICT, but I'm not sure whether this part of the code is still used. Let's wait for Devon or Maja to chime in.

expect(addEmbeddableToDashboardUrl(url, id, 'visualization')).toEqual(
`/pep/app/dashboards#/view/9b780cd0-3dd3-11e8-b2b9-5d5dc1715159?_a=%28description%3A%27%27%2Cfilters%3A%21%28%29%29&_g=%28refreshInterval%3A%28pause%3A%21t%2Cvalue%3A0%29%2Ctime%3A%28from%3Anow-15m%2Cto%3Anow%29%29&addEmbeddableId=${id}&addEmbeddableType=visualization`
expect(addEmbeddableToDashboardUrl(url, id, 'visualization')).toBe(
'/pep/app/dashboards?addEmbeddableId=123eb456cd&addEmbeddableType=visualization#%2Fview%2F9b780cd0-3dd3-11e8-b2b9-5d5dc1715159%3F_g%3D%28refreshInterval%3A%28pause%3A%21t%2Cvalue%3A0%29%2Ctime%3A%28from%3Anow-15m%2Cto%3Anow%29%29%26_a%3D%28description%3A%27%27%2Cfilters%3A%21%28%29%29'
Copy link
Contributor

Choose a reason for hiding this comment

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

@restrry You are correct query comes before fragment in "regular" URLs, but in angular it's the other way around when using hash routing:

However I'm not sure whether we still need this - it seems like we switched to transport this information using the history state and this is just a leftover. @ThomThomson @majagrubic can you please verify

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for bringing this up. AFAIK, this is not used anymore and should be safe to remove entirely.

Copy link
Contributor Author

@mshustov mshustov Sep 24, 2020

Choose a reason for hiding this comment

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

@majagrubic is it okay if I merge this PR and you remove it in a follow-up? I still need an approval

Copy link
Contributor

@majagrubic majagrubic left a comment

Choose a reason for hiding this comment

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

Ok on @elastic/kibana-app side

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

@kbn/optimizer bundle module count

id value diff baseline
apm 1253 +1 1252

async chunks size

id value diff baseline
apm 4.2MB +13.1KB 4.2MB
beatsManagement 410.3KB +2.3KB 408.0KB
canvas 1.4MB +2.3KB 1.4MB
console 1.1MB +2.3KB 1.1MB
crossClusterReplication 463.5KB +2.3KB 461.1KB
enterpriseSearch 632.1KB +4.0B 632.1KB
infra 4.2MB +4.7KB 4.2MB
ingestPipelines 771.7KB +2.3KB 769.3KB
observability 300.3KB +2.3KB 298.0KB
savedObjectsManagement 206.6KB +2.3KB 204.2KB
securitySolution 10.2MB +2.3KB 10.2MB
snapshotRestore 765.9KB +2.3KB 763.5KB
uptime 1.6MB +2.3KB 1.6MB
visualize 414.0KB +2.3KB 411.6KB
total +43.5KB

page load bundle size

id value diff baseline
dashboard 711.7KB +2.4KB 709.3KB
data 1.5MB +2.3KB 1.5MB
esUiShared 996.5KB +2.3KB 994.2KB
indexManagement 265.5KB +2.3KB 263.2KB
ingestManager 521.2KB +2.3KB 518.8KB
kibanaUtils 321.3KB +2.3KB 318.9KB
ml 875.9KB +2.3KB 873.6KB
reporting 306.7KB +2.3KB 304.3KB
upgradeAssistant 64.5KB +2.0B 64.5KB
total +18.8KB

distributable file count

id value diff baseline
default 45886 +8 45878
oss 26624 +8 26616
total +16

History

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

@mshustov mshustov merged commit 8ba60a4 into elastic:master Sep 24, 2020
@mshustov mshustov deleted the bump-query-string branch September 24, 2020 15:15
mshustov added a commit to mshustov/kibana that referenced this pull request Sep 24, 2020
…78143)

* bump query-string version to remove manual type definitions

* remove manual type declaration

* fix cypress tests

* add )
# Conflicts:
#	x-pack/plugins/security_solution/cypress/integration/ml_conditional_links.spec.ts
mshustov added a commit that referenced this pull request Sep 24, 2020
…78441)

* bump query-string version to remove manual type definitions

* remove manual type declaration

* fix cypress tests

* add )
# Conflicts:
#	x-pack/plugins/security_solution/cypress/integration/ml_conditional_links.spec.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants