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

[8.x](backport #40747) Fix wrong user for installing Synthetics #40763

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot 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

The current user must be used instead of `root`.

(cherry picked from commit 7474918)
@mergify mergify bot requested a review from a team as a code owner September 11, 2024 15:29
@mergify mergify bot requested review from AndersonQ and removed request for a team September 11, 2024 15:29
@mergify mergify bot added the backport label Sep 11, 2024
@mergify mergify bot requested a review from rdner September 11, 2024 15:29
@mergify mergify bot assigned rdner Sep 11, 2024
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 11, 2024
@botelastic
Copy link

botelastic bot commented Sep 11, 2024

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

@rdner rdner enabled auto-merge (squash) September 11, 2024 16:23
@rdner rdner merged commit 5cb6cf4 into 8.x Sep 11, 2024
124 checks passed
@rdner rdner deleted the mergify/bp/8.x/pr-40747 branch September 11, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport needs_team Indicates that the issue/PR needs a Team:* label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant