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

[Heartbeat] Fix enabled flag usage in case of streams #33293

Merged
merged 3 commits into from
Oct 10, 2022

Conversation

shahzad31
Copy link
Contributor

Fixes usage of Enabled incase of data streams !!

Fix #33270

Example to test

- id: >-
    synthetics/browser-synthetics-e1a84561-a0df-49a1-b61f-0c09e0e4f25f-elastic-agent-managed-ep-default
  name: My first monitor-Test private location-default
  revision: 3
  type: synthetics/browser
  use_output: default
  meta:
    package:
      name: synthetics
      version: 0.11.0
  data_stream:
    namespace: default
  package_policy_id: e1a84561-a0df-49a1-b61f-0c09e0e4f25f-elastic-agent-managed-ep-default
  streams:
    - id: >-
        synthetics/browser-browser.screenshot-e1a84561-a0df-49a1-b61f-0c09e0e4f25f-elastic-agent-managed-ep-default
      data_stream:
        dataset: browser.screenshot
        type: synthetics
      processors:
        - add_observer_metadata:
            geo:
              name: Fleet managed
        - add_fields:
            fields:
              monitor.fleet_managed: true
            target: ''
    - id: e1a84561-a0df-49a1-b61f-0c09e0e4f25f
      name: My first monitor
      type: browser
      enabled: false
      data_stream:
        dataset: browser
        type: synthetics
      schedule: '@every 1m'
      throttling: 5d/3u/20l
      source.inline.script: |-
        step('Go to https://www.google.com', async () => {
          await page.goto('https://www.google.com');
        });
      origin: ui
      __ui:
        script_source:
          file_name: ''
          is_generated_script: false
        is_tls_enabled: true
        is_zip_url_tls_enabled: false
      processors:
        - add_observer_metadata:
            geo:
              name: Test private location
        - add_fields:
            fields:
              config_id: e1a84561-a0df-49a1-b61f-0c09e0e4f25f
              monitor.fleet_managed: true
            target: ''
      timeout: null
      screenshots: 'on'
    - id: >-
        synthetics/browser-browser.network-e1a84561-a0df-49a1-b61f-0c09e0e4f25f-elastic-agent-managed-ep-default
      data_stream:
        dataset: browser.network
        type: synthetics
      processors:
        - add_observer_metadata:
            geo:
              name: Fleet managed
        - add_fields:
            fields:
              monitor.fleet_managed: true
            target: ''

@shahzad31 shahzad31 requested a review from a team as a code owner October 10, 2022 15:19
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 10, 2022
@mergify
Copy link
Contributor

mergify bot commented Oct 10, 2022

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @shahzad31? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v8./d.0 is the label to automatically backport to the 8./d branch. /d is the digit

@shahzad31 shahzad31 added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Oct 10, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 10, 2022
@shahzad31 shahzad31 added bug needs_team Indicates that the issue/PR needs a Team:* label labels Oct 10, 2022
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 10, 2022
@botelastic
Copy link

botelastic bot commented Oct 10, 2022

This pull request doesn't have a Team:<team> label.

@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 10, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-10-10T19:06:39.122+0000

  • Duration: 46 min 32 sec

Test stats 🧪

Test Results
Failed 0
Passed 1857
Skipped 25
Total 1882

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

Looks good, but needs a unit test. Can you add it? If not, I can submit one, just let me know

Copy link
Contributor

@andrewvc andrewvc left a comment

Choose a reason for hiding this comment

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

LGTM now that there's a unit test and Changelog

@andrewvc andrewvc added the backport-v8.5.0 Automated backport with mergify label Oct 10, 2022
@andrewvc andrewvc merged commit 7bddf80 into elastic:main Oct 10, 2022
mergify bot pushed a commit that referenced this pull request Oct 10, 2022
Fixes usage of Enabled incase of data streams

Fixes #33270

(cherry picked from commit 7bddf80)
andrewvc pushed a commit that referenced this pull request Oct 11, 2022
Fixes usage of Enabled incase of data streams

Fixes #33270

(cherry picked from commit 7bddf80)

Co-authored-by: Shahzad <[email protected]>
chrisberkhout pushed a commit that referenced this pull request Jun 1, 2023
Fixes usage of Enabled incase of data streams

Fixes #33270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v8.5.0 Automated backport with mergify bug Team:obs-ds-hosted-services Label for the Observability Hosted Services team v8.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabled synthetics agent policy continue to run with heartbeat
3 participants