-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 permissions for synthetics docker image #23576
Conversation
The permissions were incorrect, and mostly set for the wrong UID. This fixes that, performing most tasks as a regular user.
Pinging @elastic/uptime (Team:Uptime) |
/packaging |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, tested the new image with synthetics examples and it works 🎉 .
# Setup node | ||
RUN cd /usr/share/heartbeat/.node \ | ||
&& mkdir -p node \ | ||
&& curl https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-x64.tar.xz | tar -xJ --strip 1 -C node \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use NODE_VERSION var here as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's fix this in a follow-up, I think we want to bump this version before beta anyway.
&& mkdir -p node \ | ||
&& curl https://nodejs.org/dist/v12.18.4/node-v12.18.4-linux-x64.tar.xz | tar -xJ --strip 1 -C node \ | ||
&& chmod ug+rwX -R $NODE_PATH \ | ||
&& npm i -g -f @elastic/synthetics && chmod ug+rwX -R $NODE_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still need -f for this as this happens only when we build the heartbeat image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this is tested and works, I'd rather postpone this change to a subsequent PR and unbreak the current build
The permissions were incorrect, and mostly set for the wrong UID. This fixes that, performing most tasks as a regular user. (cherry picked from commit f527935)
The permissions were incorrect, and mostly set for the wrong UID, running synthetic monitors would fail completely. This fixes that, performing most tasks as a regular user.
Fixes: #23577
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.How to test this PR locally
Run
env PLATFORMS="+all linux/amd64" mage package
inx-pack/heartbeat
. Then, using the synthetics repo, run./run.sh docker.elastic.co/beats/heartbeat:8.0.0
from theexamples/docker
dir.