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

Restrict env update command to specific variable and values #184

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

0xlianhu
Copy link
Contributor

@0xlianhu 0xlianhu commented Mar 4, 2024

Restrict/simplifymyhoard_mysql_env_update script can only update the MYSQLD_OPTS variable with specific values.

@0xlianhu 0xlianhu requested review from DocEmmetBrown and a team March 4, 2024 17:20
myhoard/myhoard.py Outdated Show resolved Hide resolved
@0xlianhu 0xlianhu force-pushed the 0xlianhu-BF-2436-simplify-env-file-update branch 3 times, most recently from 07eefae to dec8952 Compare March 5, 2024 16:43
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 79.31%. Comparing base (ae06c2e) to head (0739d9d).

Files Patch % Lines
myhoard/update_mysql_environment.py 0.00% 15 Missing and 1 partial ⚠️
myhoard/myhoard.py 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
- Coverage   79.87%   79.31%   -0.56%     
==========================================
  Files          17       17              
  Lines        4496     4506      +10     
  Branches     1016     1018       +2     
==========================================
- Hits         3591     3574      -17     
- Misses        670      696      +26     
- Partials      235      236       +1     

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

@0xlianhu 0xlianhu force-pushed the 0xlianhu-BF-2436-simplify-env-file-update branch from dec8952 to c863808 Compare March 7, 2024 16:39
@0xlianhu 0xlianhu changed the title Simplify environment file update without using command line Restrict env update command to specific variable and values Mar 7, 2024
@0xlianhu 0xlianhu force-pushed the 0xlianhu-BF-2436-simplify-env-file-update branch 4 times, most recently from 6562446 to a1c91bf Compare March 14, 2024 08:40
@0xlianhu 0xlianhu requested a review from rikonen March 14, 2024 09:24
Copy link
Contributor

@rikonen rikonen left a comment

Choose a reason for hiding this comment

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

Looks good to me except the value could in some cases contain extra trailing whitespace. I'd expect that to just get ignored but maybe it would be better to just construct the value the same way we used to as suggested in the other comment.

myhoard/update_mysql_environment.py Outdated Show resolved Hide resolved
@0xlianhu 0xlianhu force-pushed the 0xlianhu-BF-2436-simplify-env-file-update branch from a1c91bf to ec114a4 Compare March 14, 2024 15:46
@rikonen rikonen merged commit c53a64f into master Mar 14, 2024
6 checks passed
@rikonen rikonen deleted the 0xlianhu-BF-2436-simplify-env-file-update branch March 14, 2024 16:36
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.

4 participants