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

[Console] Update copy when showing warnings in response headers #94270

Merged

Conversation

jloleysens
Copy link
Contributor

Summary

When receiving a response from Elasticsearch Console looks in the response headers for a "warning" entry. If this is found it is displayed as "#! Deprecation: ". However, it is not always the case that the content of the "warning" header concerns a deprecation. It could be any warning relevant to the request.

This contribution refactors some variable names and removes the "Deprecation: " prefix in order to bring Console more in line with this behaviour.

As a future enhancement we could investigate ways of categorising warnings so that we can provide more context about them when displaying them in Console.

Checklist

CC @przemekwitek

@jloleysens jloleysens added Feature:Console Dev Tools Console Feature Feature:Dev Tools v8.0.0 Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more release_note:skip Skip the PR/issue when compiling release notes v7.13.0 v7.12.1 labels Mar 10, 2021
@jloleysens jloleysens requested a review from cjcenizal March 10, 2021 09:31
@jloleysens jloleysens requested a review from a team as a code owner March 10, 2021 09:31
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

Copy link
Contributor

@przemekwitek przemekwitek left a comment

Choose a reason for hiding this comment

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

LGTM

Many thanks for cleaning this up!

@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
console 923.7KB 923.6KB -29.0B

History

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

@cjcenizal cjcenizal requested review from alisonelizabeth and removed request for cjcenizal March 10, 2021 20:01
Copy link
Contributor

@alisonelizabeth alisonelizabeth left a comment

Choose a reason for hiding this comment

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

Code LGTM. Is there an easy way to test this in Console? I'm not familiar with any deprecations that would be applicable on master/8.0 so I was not able to verify the behavior. I'm going to approve to not block you. This seems like a straightforward change and there is corresponding test coverage.

As a future enhancement we could investigate ways of categorising warnings so that we can provide more context about them when displaying them in Console.

++ I agree this would be a nice enhancement.

@jloleysens
Copy link
Contributor Author

Thanks @alisonelizabeth ! I tested this by editing the code here https://github.com/elastic/kibana/pull/94270/files#diff-26ce19407031bb24412d9471100c1ea79b49a2a055e5e6cdf4c87fa1a18970b2R89 to be a string matches the warning regex.

I agree that if that works we are in a solid spot since no logic changed and this tested that the refactor worked correctly.

@jloleysens jloleysens merged commit 1618e54 into elastic:master Mar 11, 2021
@jloleysens jloleysens deleted the fix/console-update-warnings-copy branch March 11, 2021 09:23
jloleysens added a commit to jloleysens/kibana that referenced this pull request Mar 11, 2021
…tic#94270)

* remove "deprecated: " from console warning

* refactor "deprecation" to "warning"

* complete name refactor in test files
jloleysens added a commit that referenced this pull request Mar 11, 2021
…-action

* 'master' of github.com:elastic/kibana: (43 commits)
  [Console] Update copy when showing warnings in response headers (#94270)
  [TSVB] Type public code. Step 1 (#93231)
  [ML] Functional tests - stabilize slider value selection (#94313)
  skip another suite blocking es promotion (#94367)
  [Security Solution] Eliminates a redundant external link icon (#94194)
  skip another suite blocking es promotion (#94367)
  [App Search] Role mappings migration part 1 (#94346)
  [Security Solution][Detections] Fix flaky indicator enrichment tests (#94241)
  [Workplace Search] Deduplicate icons (#94359)
  [ML] Add latest transform to intro text (#94039)
  skip test failing es promotion (#94367)
  [Maps] convert elasticsearch_utils to TS (#93984)
  [Security_Solution][Telemetry] - Update endpoint usage to use agentService (#93829)
  [Security Solution][Exceptions] Fixes OS adding method for exception enrichment (#94343)
  [ILM] Add support for frozen phase (#93068)
  [App Search] Fixed 2 relevance tuning bugs (#94312)
  remove `try` auth mode (#94287)
  Removing resolver functional tests (#94331)
  migrate warning mixin to core (#94273)
  [App Search] Add routes for Role Mappings (#94221)
  ...

# Conflicts:
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/cold_phase/cold_phase.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/phase/phase.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/components/phases/shared_fields/searchable_snapshot_field/searchable_snapshot_field.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/edit_policy.tsx
#	x-pack/plugins/index_lifecycle_management/public/application/sections/edit_policy/form/configuration_issues_context.tsx
jloleysens added a commit that referenced this pull request Mar 11, 2021
…) (#94401)

* remove "deprecated: " from console warning

* refactor "deprecation" to "warning"

* complete name refactor in test files
jloleysens added a commit that referenced this pull request Mar 11, 2021
…) (#94402)

* remove "deprecated: " from console warning

* refactor "deprecation" to "warning"

* complete name refactor in test files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Console Dev Tools Console Feature Feature:Dev Tools release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more v7.12.1 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants