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

feat(internal/consent): UDENG-5705 ubuntu insights consent manager #3

Merged
merged 27 commits into from
Jan 21, 2025

Conversation

hk21702
Copy link
Collaborator

@hk21702 hk21702 commented Jan 10, 2025

Initial implementation of the consent manager

  • Read consent states from a given directory
  • Set consent states for a specific source/global
    • Create file if it does not exist already
    • Overwrite file if it already exists
  • Implement relevant tests

UDENG-5705

Based off #2
Dependent on #7

- Helper functions to setup consent manager test env
- RLock and Lock support
- Get all sources
- Get specific sources
- Go routined reads
@hk21702 hk21702 added the enhancement New feature or request label Jan 10, 2025
@hk21702 hk21702 self-assigned this Jan 10, 2025
@hk21702 hk21702 changed the title enhancement(internal/consent): UDENG-5705 ubuntu insights consent manager feat(internal/consent): UDENG-5705 ubuntu insights consent manager Jan 10, 2025
…gument behavior. Disable default cobra error printing. Update CLI flag descriptions
 - Respect read and write locks
 - Create new files if the target source does not exist
 - Functionality for both source specific files, and the global consent file
@hk21702 hk21702 force-pushed the UDENG-5705-Ubuntu-Insights-Consent-Manager branch from 5c963b0 to f584a4f Compare January 10, 2025 19:33
@hk21702 hk21702 force-pushed the UDENG-5705-Ubuntu-Insights-Consent-Manager branch 2 times, most recently from 3206fbc to 8dc1c72 Compare January 16, 2025 22:17
@hk21702 hk21702 force-pushed the UDENG-5705-Ubuntu-Insights-Consent-Manager branch 3 times, most recently from 693d04e to 2e873d4 Compare January 17, 2025 14:48
@hk21702 hk21702 marked this pull request as ready for review January 17, 2025 14:51
@hk21702 hk21702 requested a review from Sploder12 January 17, 2025 14:51
Copy link
Collaborator

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

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

Great job on the consent manager! Just some minor comments and questions from me.

internal/consent/consent.go Outdated Show resolved Hide resolved
internal/consent/consent.go Outdated Show resolved Hide resolved
internal/consent/consent.go Outdated Show resolved Hide resolved
internal/consent/consent_test.go Outdated Show resolved Hide resolved
internal/consent/consent_test.go Outdated Show resolved Hide resolved
internal/consent/consent_test.go Show resolved Hide resolved
internal/consent/consent_test.go Outdated Show resolved Hide resolved
internal/consent/export_test.go Show resolved Hide resolved
internal/consent/testdata/consent_files/random_file.toml Outdated Show resolved Hide resolved
@hk21702 hk21702 force-pushed the UDENG-5705-Ubuntu-Insights-Consent-Manager branch 2 times, most recently from 6613aa2 to d6c9d77 Compare January 21, 2025 14:36
@hk21702 hk21702 force-pushed the UDENG-5705-Ubuntu-Insights-Consent-Manager branch from d6c9d77 to 1c7b560 Compare January 21, 2025 14:49
@hk21702 hk21702 requested a review from Sploder12 January 21, 2025 15:32
@hk21702 hk21702 force-pushed the UDENG-5705-Ubuntu-Insights-Consent-Manager branch from 770c343 to 5ad0e21 Compare January 21, 2025 15:38
Copy link
Collaborator

@Sploder12 Sploder12 left a comment

Choose a reason for hiding this comment

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

LGTM! Nice work!

@hk21702 hk21702 merged commit 6498f00 into main Jan 21, 2025
14 checks passed
@hk21702 hk21702 deleted the UDENG-5705-Ubuntu-Insights-Consent-Manager branch January 21, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants