Skip to content

feat: allow tedge user to set env variable when using sudo#3688

Merged
reubenmiller merged 3 commits intothin-edge:mainfrom
reubenmiller:feat-tedge-sudo-set-env
Jun 16, 2025
Merged

feat: allow tedge user to set env variable when using sudo#3688
reubenmiller merged 3 commits intothin-edge:mainfrom
reubenmiller:feat-tedge-sudo-set-env

Conversation

@reubenmiller
Copy link
Copy Markdown
Contributor

Proposed changes

Add the SETENV option to the default tedge suoders rule to allow users to control settings via env variable when using sudo.

Before

$ sudo -u tedge sudo TEDGE_C8Y_URL=example.com tedge config get c8y.url
sudo: sorry, you are not allowed to set the following environment variables: TEDGE_C8Y_URL

After

$ sudo -u tedge sudo TEDGE_C8Y_URL=example.com tedge config get c8y.url
example.com

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (general improvements like code refactoring that doesn't explicitly fix a bug or add any new functionality)
  • Documentation Update (if none of the other choices apply)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Paste Link to the issue


Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA (in all commits with git commit -s. You can activate automatic signing by running just prepare-dev once)
  • I ran just format as mentioned in CODING_GUIDELINES
  • I used just check as mentioned in CODING_GUIDELINES
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
Signed-off-by: reubenmiller <reuben.d.miller@gmail.com>
@reubenmiller reubenmiller requested review from a team, Bravo555 and rina23q as code owners June 14, 2025 08:05
@reubenmiller reubenmiller temporarily deployed to Test Pull Request June 14, 2025 08:05 — with GitHub Actions Inactive
@codecov
Copy link
Copy Markdown

codecov bot commented Jun 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@didier-wenzek didier-wenzek left a comment

Choose a reason for hiding this comment

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

Approved

Copy link
Copy Markdown
Contributor

@albinsuresh albinsuresh left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Copy Markdown
Contributor

Robot Results

✅ Passed ❌ Failed ⏭️ Skipped Total Pass % ⏱️ Duration
642 0 3 642 100 1h52m41.542298999s

@reubenmiller reubenmiller added this pull request to the merge queue Jun 16, 2025
@reubenmiller reubenmiller added the theme:cli Theme: cli related topics label Jun 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 16, 2025
@reubenmiller reubenmiller added this pull request to the merge queue Jun 16, 2025
Merged via the queue into thin-edge:main with commit 237d8ec Jun 16, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme:cli Theme: cli related topics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants