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

ci: fix makefile docker ownership #1386

Merged
merged 5 commits into from
Sep 4, 2024

Conversation

gdvalle
Copy link
Contributor

@gdvalle gdvalle commented Sep 4, 2024

Fix the docker user flag to properly fetch group and user IDs.

Without this, on linux with GNU Make 4, a new registry component will end up throwing an error:

[error] Unable to write file "docs/attributes-registry/csi.md":

because it writes out as root rather than the current user.

@gdvalle gdvalle requested review from a team September 4, 2024 15:30
@gdvalle gdvalle mentioned this pull request Sep 4, 2024
3 tasks
@lmolkova lmolkova added the Skip Changelog Label to skip the changelog check label Sep 4, 2024
@lmolkova lmolkova enabled auto-merge (squash) September 4, 2024 19:33
@lmolkova lmolkova disabled auto-merge September 4, 2024 19:35
Copy link
Contributor

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

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

it seems to break policy check :(

docker run --rm \
	-u 1001:127 \
	--mount 'type=bind,source=/home/runner/work/semantic-conventions/semantic-conventions/policies,target=/home/weaver/policies,readonly' \
	--mount 'type=bind,source=/home/runner/work/semantic-conventions/semantic-conventions/model,target=/home/weaver/source,readonly' \
	otel/weaver:v0.9.1 registry check \
	--registry=/home/weaver/source \
	--baseline-registry=https://github.com/open-telemetry/semantic-conventions/archive/refs/tags/v1.27.0.zip[model] \
	--policy=/home/weaver/policies
....

  × Cache directory not created: Permission denied (os error [13](https://github.com/open-telemetry/semantic-conventions/actions/runs/10708326730/job/29690368799?pr=1386#step:3:14))

@gdvalle
Copy link
Contributor Author

gdvalle commented Sep 4, 2024

it seems to break policy check :(

Doh. I don't think we need it here anyway, it's just a read-only mount, and unless we have world read off (not so common) this should work fine. Seems the weaver container is running under its own UID/GID.

Removed in 33d0431

@lmolkova lmolkova merged commit d73e44d into open-telemetry:main Sep 4, 2024
14 checks passed
@gdvalle gdvalle deleted the gtd.fix-makefile-docker branch September 4, 2024 21:45
drewby pushed a commit to drewby/otel-semantic-conventions that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Label to skip the changelog check
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants