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] add migration to supported monitor schedules and remove deprecated zip url fields #154010

Conversation

dominiqueclarke
Copy link
Contributor

@dominiqueclarke dominiqueclarke commented Mar 29, 2023

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:

Screen Shot 2023-04-02 at 10 28 20 PM

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

⚠️ 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.

@apmmachine
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

] as const;

export enum LegacyConfigKey {
Copy link
Contributor Author

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.

@dominiqueclarke dominiqueclarke changed the title add migration to remove zip url [Synthetics] add migration to supported monitor schedules and remove deprecated zip url fields Apr 3, 2023
@dominiqueclarke dominiqueclarke added release_note:deprecation enhancement New value added to drive a business result Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.8.0 labels Apr 3, 2023
@dominiqueclarke dominiqueclarke marked this pull request as ready for review April 3, 2023 02:25
@dominiqueclarke dominiqueclarke requested review from a team as code owners April 3, 2023 02:25
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@dominiqueclarke
Copy link
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #29 / logstash pipelines delete "before all" hook: load pipelines archive for "should delete the specified pipelines"

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
synthetics 1.4MB 1.4MB -1.7KB
Unknown metric groups

ESLint disabled line counts

id before after diff
securitySolution 432 435 +3

Total ESLint disabled count

id before after diff
securitySolution 512 515 +3

History

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

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.

LGTM. Works as expected !!

@shahzad31 shahzad31 self-requested a review April 5, 2023 13:43
@dominiqueclarke dominiqueclarke merged commit 0e748cf into elastic:main Apr 5, 2023
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 5, 2023
@shahzad31 shahzad31 deleted the feat/synthetics-saved-object-migration-8.8.0 branch April 5, 2023 14:18
nreese pushed a commit to nreese/kibana that referenced this pull request Apr 10, 2023
…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>
paulb-elastic added a commit to paulb-elastic/kibana that referenced this pull request May 16, 2023
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 enhancement New value added to drive a business result release_note:deprecation 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.

[Synthetics 1.0] Saved object migration - migrate schedule to nearest supported value
7 participants