-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] add migration to supported monitor schedules and remove deprecated zip url fields #154010
[Synthetics] add migration to supported monitor schedules and remove deprecated zip url fields #154010
Conversation
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
…-saved-object-migration-8.8.0
] as const; | ||
|
||
export enum LegacyConfigKey { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shahzad31 For the throttling feature, any keys you want to remove from the saved object you'll want to make sure you include in this enum. This will ensure that the old legacy fields are excluded from AAD when migrated, and ensure that decryption is able to progress with the legacy fields missing.
.../plugins/synthetics/server/legacy_uptime/lib/saved_objects/migrations/monitors/8.8.0.test.ts
Outdated
Show resolved
Hide resolved
Pinging @elastic/uptime (Team:uptime) |
@elasticmachine merge upstream |
…//github.com/dominiqueclarke/kibana into feat/synthetics-saved-object-migration-8.8.0
…//github.com/dominiqueclarke/kibana into feat/synthetics-saved-object-migration-8.8.0
…ts/migrations/monitors/8.8.0.test.ts
…-saved-object-migration-8.8.0
…//github.com/dominiqueclarke/kibana into feat/synthetics-saved-object-migration-8.8.0
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Works as expected !!
x-pack/plugins/synthetics/server/legacy_uptime/lib/saved_objects/migrations/monitors/8.8.0.ts
Show resolved
Hide resolved
…deprecated zip url fields (elastic#154010) ## Summary Relates to elastic#142655 Resolves elastic#142653 All monitor schedules in Uptime Monitor Management/Synthetics app apart from the [supported schedules](https://github.com/elastic/kibana/pull/154010/files#diff-6e5ef49468e646b5569e213b03876de143291ca3870a7092974793837f1ddc61R33) have been deprecated. The only allowed schedules are the below: <img width="1241" alt="Screen Shot 2023-04-02 at 10 28 20 PM" src="https://user-images.githubusercontent.com/11356435/229397972-fe2fcaa2-d3c7-450b-9b40-f8c71e6c7dcf.png"> Adds a migration to transform unsupportes schedules from Uptime Monitor Management to supported Synthetics app schedules. Also adds validation when an invalid schedule is used. Also removes zip url fields from monitors. These fields were originally included in the saved object spec anticipating a future zip url feature. That feature has now been replaced by project monitors, removing the need for zip url fields. ## Testing⚠️ Note⚠️ -- It's suggested that you use a fresh instance of ES to test this PR. This can either be done by creating a brand new oblt cluster via oblt-cli, or by running `yarn es snapshot`. If you run this PR on an existing oblt-cluster, then switch back to main on that same cluster before this PR is broken, you'll break the cluster. Instructions -- 1. Check out 8.7.0 2. Create Uptime monitors with invalid schedules. Ideally, create one of each monitor type. Some example invalid schedules are 4, 8, 11, and 16, for example. 3. Create at least one of each type of project monitor by pushing monitors via the synthetics agent 4. Check out this branch 5. Navigate to Synthetics or Uptime once Kibana is done loading. Observe that each one of the invalid schedules was transformed into a supported schedule. 6. (Testing that decryption is still working after migration). Navigate to each one of the UI monitors' edit pages. Click save to resave each monitor. Then, visit the edit page again. If you don't see any page level errors, decryption is still working successfully 7. (Testing that decryption is still working after migration for project monitors). Change the global schedule your project monitors and repush. Check the global schedule of your project monitors one more time and repush again. If both pushes are successful, decryption is still working after the migration. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Summary
Relates to #142655
Resolves #142653
Release notes
All monitor schedules in Uptime Monitor Management/Synthetics app apart from the supported schedules have been deprecated.
The only allowed schedules are the below:
Any monitor create in Uptime Monitor Management or Synthetics app using a schedule outside of the defined schedules in the screenshot have been moved to the nearest supported schedule.
Description
Adds a migration to transform unsupported schedules from Uptime Monitor Management to supported Synthetics app schedules. Also adds validation when an invalid schedule is used.
Also removes zip url fields from monitors. These fields were originally included in the saved object spec anticipating a future zip url feature. That feature has now been replaced by project monitors, removing the need for zip url fields.
Testing
It's suggested that you use a fresh instance of ES to test this PR. This can either be done by creating a brand new oblt cluster via oblt-cli, or by running
yarn es snapshot
. If you run this PR on an existing oblt-cluster, then switch back to main on that same cluster before this PR is broken, you'll break the cluster.Instructions