-
Notifications
You must be signed in to change notification settings - Fork 54
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: Stop chowning in tedge-agent #3148
Merged
Bravo555
merged 1 commit into
thin-edge:main
from
Bravo555:fix/3143/collectd-config-permission
Oct 2, 2024
Merged
fix: Stop chowning in tedge-agent #3148
Bravo555
merged 1 commit into
thin-edge:main
from
Bravo555:fix/3143/collectd-config-permission
Oct 2, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bravo555
requested review from
didier-wenzek,
albinsuresh,
jarhodes314,
rina23q,
gligorisaev and
a team
as code owners
October 1, 2024 12:02
Bravo555
temporarily deployed
to
Test Pull Request
October 1, 2024 12:02
— with
GitHub Actions
Inactive
Codecov ReportAll modified and coverable lines are covered by tests ✅ Additional details and impacted files📢 Thoughts on this report? Let us know! |
Robot Results
|
Bravo555
force-pushed
the
fix/3143/collectd-config-permission
branch
from
October 1, 2024 13:50
b382473
to
c3da4c7
Compare
Bravo555
temporarily deployed
to
Test Pull Request
October 1, 2024 13:50
— with
GitHub Actions
Inactive
Bravo555
force-pushed
the
fix/3143/collectd-config-permission
branch
from
October 1, 2024 14:45
c3da4c7
to
e92db8f
Compare
Bravo555
temporarily deployed
to
Test Pull Request
October 1, 2024 14:45
— with
GitHub Actions
Inactive
Bravo555
changed the title
Stop chowning in tedge-agent
fix: Stop chowning in tedge-agent
Oct 1, 2024
Bravo555
force-pushed
the
fix/3143/collectd-config-permission
branch
from
October 2, 2024 09:10
e92db8f
to
e01d391
Compare
Bravo555
temporarily deployed
to
Test Pull Request
October 2, 2024 09:10
— with
GitHub Actions
Inactive
Stop setting file ownership in tedge-agent, which runs as `tedge` user. Also added a missing test for a case when a file is owned by root. Setting file ownership is a privileged operation, which should be done by tedge-write. It's also unnecessary to change permissions on a temporary file which is atomically moved into destination by config-manager anyway. Signed-off-by: Marcel Guzik <marcel.guzik@inetum.com>
Bravo555
force-pushed
the
fix/3143/collectd-config-permission
branch
from
October 2, 2024 09:46
e01d391
to
fcd1679
Compare
Bravo555
temporarily deployed
to
Test Pull Request
October 2, 2024 09:46
— with
GitHub Actions
Inactive
didier-wenzek
approved these changes
Oct 2, 2024
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.
Approved
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 2, 2024
github-merge-queue
bot
removed this pull request from the merge queue due to failed status checks
Oct 2, 2024
Tried to merge 2 times, 3 tests failed, but they don't repeat across both tries, seems they're flakes? Going to test them with flake-finder:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed changes
Stop setting file ownership in tedge-agent, which runs as
tedge
user. Also added a missing test for a case when a file is owned by root.Setting file ownership is a privileged operation, which should be done by tedge-write. It's also unnecessary to change permissions on a temporary file which is atomically moved into destination by config-manager anyway.
Types of changes
Paste Link to the issue
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments
This change should resolve the issue and is small, so it'd be good to merge it ASAP. It resolves first 2 points of #3143 (comment), i.e. adds missing test case and removes the usage of
chown
while running astedge
.We still unnecessarily leave temporary files, but that will be done in a follow-up PR.