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

[Reporting] Add deprecation notice to the upgrade assistant #104303

Merged

Conversation

jloleysens
Copy link
Contributor

@jloleysens jloleysens commented Jul 5, 2021

Summary

Continuation of #100130 and fix #81544

This contribution adds an integration with the deprecation service. The deprecation flags the new reporting policy and provides a "quick resolution" in the upgrade assistant which uses the new "PUT /deprecations" endpoint.

How to test

  1. Start Kibana and ES, on basic license level
  2. Make the following request against the ES:
curl --request PUT \
  --url 'http://localhost:9200/.reporting-*/_settings' \
  --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' \
  --header 'Content-Type: application/json' \
  --data '{
	"settings": {
		"index.lifecycle.name": null
	}
}'
  1. Go the Upgrade Assistant (in code) and do the following:
diff --git i/x-pack/plugins/upgrade_assistant/public/plugin.ts w/x-pack/plugins/upgrade_assistant/public/plugin.ts
index 4cffd40faf3..701eefc33b6 100644
--- i/x-pack/plugins/upgrade_assistant/public/plugin.ts
+++ w/x-pack/plugins/upgrade_assistant/public/plugin.ts
@@ -58,7 +58,7 @@ export class UpgradeAssistantUIPlugin implements Plugin {
           coreSetup,
           params,
           kibanaVersionInfo,
-          readonly
+          false
         );
 
         return () => {
  1. Go the upgrade assistant in the UI and see the deprecation warning there

Screenshots

Please note: the current Upgrade Assistant UI is subject to a lot of change prior to 8.0.

Screenshot 2021-07-05 at 16 06 24

Checklist

Delete any items that are not applicable to this PR.

@jloleysens jloleysens added v8.0.0 Team:AppServices release_note:skip Skip the PR/issue when compiling release notes auto-backport Deprecated - use backport:version if exact versions are needed v7.15.0 labels Jul 5, 2021
@jloleysens jloleysens requested a review from tsullivan July 5, 2021 14:07
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServices)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

This policy is automatically created in a newly set up environment, right? I'm wondering what is the best way to test this for reviewers. Can you add a writeup of how to test this PR?

I'm not sure if it would help, but perhaps it is handy to use our es_archive called reporting/archived_reports. The index created from this archive does not come with the new built-in policy. However, there are only archived reports belonging to test_user.

> node scripts/es_archiver.js \
  --config x-pack/test/functional/config.js \
  load x-pack/test/functional/es_archives/reporting/archived_reports \
  --es-ca config/cert-bundle/ca/ca.crt \ #  (use this example if you run Elasticsearch over HTTPS)
  --es-url https://elastic:changeme@localhost:9200 \ # (change to http if needed)
  --kibana-url http://elastic:changeme@localhost:5601 # (change to http if needed)

Edit: edited my thoughts

@jloleysens
Copy link
Contributor Author

@elasticmachine merge upstream

@jloleysens
Copy link
Contributor Author

Great points @tsullivan ! I'll update the PR description with that information. The way I was testing this locally is by running the following request against the cluster:

curl --request PUT \
  --url 'http://localhost:9200/.reporting-*/_settings' \
  --header 'Authorization: Basic ZWxhc3RpYzpjaGFuZ2VtZQ==' \
  --header 'Content-Type: application/json' \
  --data '{
	"settings": {
		"index.lifecycle.name": null
	}
}'

We also have API integration tests for creating a situation where reporting indices are "unmanaged":

const makeAllReportingIndicesUnmanaged = async () => {

Granted, this does not test all possible permutations of reporting indices out there (maybe some are already set up to be managed by an index template), but it does simulate the "default" state you would end up in (no index lifecycle policy set on reporting indices).

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

Copy link
Member

@tsullivan tsullivan left a comment

Choose a reason for hiding this comment

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

LGTM

@jloleysens jloleysens merged commit 58e2dd3 into elastic:master Jul 22, 2021
@jloleysens jloleysens deleted the reporting/ua-deprecation-ilm-policy-2 branch July 22, 2021 13:36
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jul 22, 2021
…104303)

* add deprecation notice to the upgrade assistant

* fix types and update jest snapshot

Co-authored-by: Kibana Machine <[email protected]>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Jul 22, 2021
…#106537)

* add deprecation notice to the upgrade assistant

* fix types and update jest snapshot

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Jean-Louis Leysens <[email protected]>
@sophiec20 sophiec20 added the (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead label Aug 21, 2024
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 (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead release_note:skip Skip the PR/issue when compiling release notes v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reporting ILM policy
5 participants