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

[Uptime] Add ability to rerun edited monitor #132639

Merged
merged 1 commit into from
May 23, 2022

Conversation

lucasfcosta
Copy link
Contributor

⚠️ Given there were testing overlaps, this PR builds on top of #132325

Summary

This PR will cause edited monitors to be rerun immediately.

As discussed on Slack, we decided that simply kicking-off another job was enough to re-run a monitor rather than having a more complex flow to reinstate cronJobs at the right time.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

Release Note

Immediately re-run monitors in the synthetics service when they're edited.

How to test this PR

  1. Checkout the appropriate Kibana version and start it pointing to the service (this branch)
    # Use the URL of the service here
    xpack.uptime.service.devUrl: https://localhost:10001
  2. Checkout the appropriate version of the service, build it, and start it
  3. Create a monitor in Kibana
    step("visit google", async () => {
        await page.goto("https://google.com");
    });
  4. Go to Uptime and check the time this monitor has last run
  5. Edit the monitor's code
    step("visit HackerNews", async () => {
        await page.goto("https://news.ycombinator.com");
    });
  6. Once you've saved it, give it a few seconds to re-run and check the Uptime page. You should soon get results for the edited monitor with the new URL.

@lucasfcosta lucasfcosta requested a review from a team as a code owner May 20, 2022 16:14
@lucasfcosta lucasfcosta added enhancement New value added to drive a business result Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.3.0 labels May 20, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@lucasfcosta
Copy link
Contributor Author

@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.

It also send is_edit true in case of disabling monitors, which seems to be triggering a test run !!

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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 !!

Disabled part will be handled on the service side.

Kibana side of things looks good !!

@lucasfcosta lucasfcosta merged commit 9754e0b into elastic:main May 23, 2022
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label May 23, 2022
@lucasfcosta lucasfcosta deleted the rerun-on-edit branch May 23, 2022 14:16
j-bennet pushed a commit to j-bennet/kibana that referenced this pull request Jun 2, 2022
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:enhancement Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants