Skip to content

fix(BRE2-804): various polish#315

Merged
patelspratik merged 2 commits intomainfrom
BRE2-804-registerpolish
Mar 6, 2026
Merged

fix(BRE2-804): various polish#315
patelspratik merged 2 commits intomainfrom
BRE2-804-registerpolish

Conversation

@patelspratik
Copy link
Contributor

@patelspratik patelspratik commented Mar 5, 2026

polish: name sanitization, interfaces email caching, etc

@patelspratik patelspratik force-pushed the BRE2-804-registerpolish branch from 8f06d5f to acc2ff8 Compare March 5, 2026 23:56
@patelspratik patelspratik force-pushed the BRE2-804-registerpolish branch from acc2ff8 to 39ff195 Compare March 6, 2026 00:03
@patelspratik patelspratik marked this pull request as ready for review March 6, 2026 00:16
@patelspratik patelspratik requested a review from a team as a code owner March 6, 2026 00:16
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 36.66667% with 76 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.63%. Comparing base (88dc335) to head (80b7284).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cmd/cmd.go 0.00% 21 Missing ⚠️
pkg/cmd/register/providers.go 0.00% 18 Missing ⚠️
pkg/store/email_cache.go 51.51% 11 Missing and 5 partials ⚠️
pkg/cmd/register/register.go 44.00% 10 Missing and 4 partials ⚠️
pkg/cmd/register/device_registration_store.go 50.00% 3 Missing ⚠️
pkg/cmd/gpucreate/gpucreate.go 0.00% 2 Missing ⚠️
pkg/store/organization.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #315      +/-   ##
==========================================
+ Coverage   14.77%   15.63%   +0.85%     
==========================================
  Files         127      130       +3     
  Lines       16977    17273     +296     
==========================================
+ Hits         2508     2700     +192     
- Misses      14182    14263      +81     
- Partials      287      310      +23     
Flag Coverage Δ
Linux 15.63% <36.66%> (+0.85%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@patelspratik patelspratik changed the title fix(BRE2-804): various polish: name sanitization fix(BRE2-804): various polish Mar 6, 2026
@patelspratik patelspratik force-pushed the BRE2-804-registerpolish branch from 80b7284 to 848737d Compare March 6, 2026 18:36
if err := cmd.Run(); err != nil {
return fmt.Errorf("sudo tee %s failed: %w", path, err)
}
if err := exec.Command("sudo", "chmod", "644", path).Run(); err != nil { //nolint:gosec // fixed base path
Copy link
Member

Choose a reason for hiding this comment

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

Its best practice for us to not run sudo our selves but ask the user to run the command with sudo and elevate permisions. Can we make this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we run sudo commands in a few other places as well without asking the user (open and write-connection-event in particular).

I can do this in a follow up, and move the register and deregister commands to check if current user is sudo and prompt for password instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@patelspratik patelspratik merged commit 08b1024 into main Mar 6, 2026
9 checks passed
@patelspratik patelspratik deleted the BRE2-804-registerpolish branch March 6, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants