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

Correctly set log_dir default in vtcombo #15153

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

ajm188
Copy link
Contributor

@ajm188 ajm188 commented Feb 6, 2024

Description

I accidentally made it so the old default of $VTDATAROOT/tmp was never set for vtcombo.

Now we manually provide this default by first checking that the flag exists, and that the user did not explicitly set a value for it.

Demo

➜  vitess git:(andrew/vtcombo/log-dir-default) ✗ ./bin/vtcombo --port 33574 --bind-address localhost --log_dir /tmp/vtdataroot/vttest445905202/logs --alsologtostderr --grpc_port 33575 --db_charset utf8mb4 --db_app_user vt_dba 2>/dev/null
log_dir=/tmp/vtdataroot/vttest445905202/logs%  
➜  vitess git:(andrew/vtcombo/log-dir-default) ✗ ./bin/vtcombo --port 33574 --bind-address localhost --alsologtostderr --grpc_port 33575 --db_charset utf8mb4 --db_app_user vt_dba 2>/dev/null 
log_dir=$VTDATAROOT/tmp% 

Related Issue(s)

#15120 (comment)

Checklist

  • "Backport to:" labels have been added if this change should be back-ported to release branches
  • If this change is to be back-ported to previous releases, a justification is included in the PR description
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on CI?
  • Documentation was added or is not required

Deployment Notes

I accidentally made it so the old default of `$VTDATAROOT/tmp` was never
set for vtcombo.

Now we manually provide this default by first checking that the flag
exists, and that the user did not explicitly set a value for it.

Signed-off-by: Andrew Mason <[email protected]>
@ajm188 ajm188 added Type: Bug Component: VTCombo Backport to: release-19.0 Needs to be back ported to release-19.0 labels Feb 6, 2024
@ajm188 ajm188 requested a review from frouioui February 6, 2024 21:32
@ajm188 ajm188 requested a review from deepthi as a code owner February 6, 2024 21:32
Copy link
Contributor

vitess-bot bot commented Feb 6, 2024

Review Checklist

Hello reviewers! 👋 Please follow this checklist when reviewing this Pull Request.

General

  • Ensure that the Pull Request has a descriptive title.
  • Ensure there is a link to an issue (except for internal cleanup and flaky test fixes), new features should have an RFC that documents use cases and test cases.

Tests

  • Bug fixes should have at least one unit or end-to-end test, enhancement and new features should have a sufficient number of tests.

Documentation

  • Apply the release notes (needs details) label if users need to know about this change.
  • New features should be documented.
  • There should be some code comments as to why things are implemented the way they are.
  • There should be a comment at the top of each new or modified test to explain what the test does.

New flags

  • Is this flag really necessary?
  • Flag names must be clear and intuitive, use dashes (-), and have a clear help text.

If a workflow is added or modified:

  • Each item in Jobs should be named in order to mark it as required.
  • If the workflow needs to be marked as required, the maintainer team must be notified.

Backward compatibility

  • Protobuf changes should be wire-compatible.
  • Changes to _vt tables and RPCs need to be backward compatible.
  • RPC changes should be compatible with vitess-operator
  • If a flag is removed, then it should also be removed from vitess-operator and arewefastyet, if used there.
  • vtctl command output order should be stable and awk-able.

@vitess-bot vitess-bot bot added NeedsBackportReason If backport labels have been applied to a PR, a justification is required NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsIssue A linked issue is missing for this Pull Request NeedsWebsiteDocsUpdate What it says labels Feb 6, 2024
@github-actions github-actions bot added this to the v20.0.0 milestone Feb 6, 2024
@frouioui frouioui removed NeedsDescriptionUpdate The description is not clear or comprehensive enough, and needs work NeedsWebsiteDocsUpdate What it says NeedsIssue A linked issue is missing for this Pull Request NeedsBackportReason If backport labels have been applied to a PR, a justification is required labels Feb 6, 2024
Copy link

codecov bot commented Feb 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c189cf4) 70.62% compared to head (e81fc92) 70.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #15153      +/-   ##
==========================================
- Coverage   70.62%   70.62%   -0.01%     
==========================================
  Files        1377     1377              
  Lines      182794   182794              
==========================================
- Hits       129102   129098       -4     
- Misses      53692    53696       +4     

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

@mattlord
Copy link
Contributor

mattlord commented Feb 6, 2024

Does this fix #15120 ? Seems like it would. If so, we should mark it as Fixing it in the description.

@ajm188
Copy link
Contributor Author

ajm188 commented Feb 6, 2024

Does this fix #15120 ? Seems like it would. If so, we should mark it as Fixing it in the description.

I thought so at first, but I think it only resolves @frouioui's one comment that I linked

@frouioui
Copy link
Member

frouioui commented Feb 6, 2024

@mattlord @ajm188, in #15120 i found that we are setting the flag correctly when starting vtcombo, in the logs I can see:

/vt/bin/vtcombo --port 33574 --bind-address localhost --log_dir /vt/vtdataroot/vttest445905202/logs ..

Meaning we wouldn't reach that default, but I might be wrong

@frouioui
Copy link
Member

frouioui commented Feb 6, 2024

I will run a quick test locally with Docker though, we never know

@frouioui
Copy link
Member

frouioui commented Feb 6, 2024

I can confirm this does not fix the issue:

vitess@787d46414584:/$ ls /vt/vtdataroot/vttest3208539665/logs/
vitess@787d46414584:/$ 

@frouioui frouioui merged commit 38cfa19 into vitessio:main Feb 6, 2024
105 of 108 checks passed
@frouioui frouioui deleted the andrew/vtcombo/log-dir-default branch February 6, 2024 22:39
vitess-bot pushed a commit that referenced this pull request Feb 6, 2024
vitess-bot pushed a commit that referenced this pull request Feb 6, 2024
vitess-bot bot added a commit to vitessio/website that referenced this pull request Feb 6, 2024
frouioui pushed a commit that referenced this pull request Feb 7, 2024
)

Signed-off-by: Andrew Mason <[email protected]>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
dbussink pushed a commit that referenced this pull request Feb 19, 2024
)

Signed-off-by: Andrew Mason <[email protected]>
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants