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

Fix wrong user for installing Synthetics #40747

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

rdner
Copy link
Member

@rdner rdner commented Sep 11, 2024

The current user must be used instead of root.

How to test this PR locally

I copied the testing steps from #40689 and followed them.

  • Build heartbeat wolfi image locally with:
cd ./x-pack/heartbeat
PLATFORMS=linux/arm64 PACKAGES=docker mage package
  • Create the following monitor configuration (heartbeat.docker.yml):
heartbeat.monitors:
- type: browser
  id: korean-characters
  name: korean_characters_test
  schedule: '@every 1m'
  source:
    inline:
      script: |-
        step("first", async () => {
          await page.goto('https://www.naver.com/');
        });
- type: browser
  id: chinese-characters
  name: chinese_characters_test
  schedule: '@every 1m'
  source:
    inline:
      script: |-
        step("first", async () => {
          await page.goto('https://baike.baidu.com/');
        });
- type: browser
  id: russian-characters
  name: russian_characters_test
  schedule: '@every 1m'
  source:
    inline:
      script: |-
        step("first", async () => {
          await page.goto('https://yandex.ru/');
        });
- type: browser
  id: arabic-characters
  name: arabic_characters_test
  schedule: '@every 1m'
  source:
    inline:
      script: |-
        step("first", async () => {
          await page.goto('https://www.bbc.com/arabic');
        });
  • Run the container with this configuration:
#!/bin/bash

docker run -it --rm \
  --name=heartbeat \
  --user=heartbeat \
  --volume="$(pwd)/heartbeat.docker.yml:/usr/share/heartbeat/heartbeat.yml:ro" \
  --cap-add=NET_RAW \
  docker.elastic.co/beats/heartbeat-wolfi:9.0.0 \
  --strict.perms=false \
  -E output.console.pretty=true
  • Run and check monitors are executed correctly with status: up.

Related issues

@rdner rdner added bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team backport-8.x Automated backport to the 8.x branch with mergify labels Sep 11, 2024
@rdner rdner self-assigned this Sep 11, 2024
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 11, 2024
Copy link
Contributor

mergify bot commented Sep 11, 2024

backport-v8.x has been added to help with the transition to the new branch 8.x.

The current user must be used instead of `root`.
@rdner rdner force-pushed the fix-heartbeat-browser-monitor branch from f4030ef to 515f3dc Compare September 11, 2024 10:53
@v1v v1v removed the backport-v8.x label Sep 11, 2024
@rdner rdner marked this pull request as ready for review September 11, 2024 14:57
@rdner rdner requested a review from a team as a code owner September 11, 2024 14:57
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@rdner rdner requested review from emilioalvap and belimawr and removed request for faec September 11, 2024 14:57
Copy link
Collaborator

@emilioalvap emilioalvap left a comment

Choose a reason for hiding this comment

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

LGTM

@rdner rdner merged commit 7474918 into elastic:main Sep 11, 2024
125 checks passed
@rdner rdner deleted the fix-heartbeat-browser-monitor branch September 11, 2024 15:28
mergify bot pushed a commit that referenced this pull request Sep 11, 2024
The current user must be used instead of `root`.

(cherry picked from commit 7474918)
rdner added a commit that referenced this pull request Sep 11, 2024
The current user must be used instead of `root`.

(cherry picked from commit 7474918)

Co-authored-by: Denis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-8.x Automated backport to the 8.x branch with mergify bug Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants