-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
roachprod: configure logging in roachprod library #74223
Conversation
Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. I was unable to automatically find a reviewer. You can try CCing one of the following members:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
5a68f92
to
51e94c0
Compare
Thank you for updating your pull request. My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 152 of 152 files at r1, all commit messages.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei, @healthy-pod, and @RaduBerinde)
pkg/cmd/roachprod/main.go, line 891 at r1 (raw file):
loggerCfg := logger.Config{Stdout: os.Stdout, Stderr: os.Stderr} var loggerError error roachprodLibraryLogger, loggerError = loggerCfg.NewLogger("/Users/ahmad/desktop/roachprod.log")
hello ahmad :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @andreimatei, @RaduBerinde, and @tbg)
pkg/cmd/roachprod/main.go, line 891 at r1 (raw file):
Previously, tbg (Tobias Grieger) wrote…
hello ahmad :-)
Oops! I will remove it. TFTR
59793b3
to
78ac4e1
Compare
bors r=tbg |
Merge conflict. |
This patch moves `pkg/cmd/roachtest/logger` to `pkg/roachprod/logger` to be used as a logger by the roachprod library. `roachtest` and the roachprod binary are then configured to use/pass instances of `logger` as needed by `pkg/roachprod`. All calls to `fmt.Printf` and `fmt.Println` were removed from `pkg/roachprod` except in few cases specific to the roachprod binary. In the future, using `fmt.Printf` and `fmt.Println` in the library (i.e. `pkg/roachprod`) should be discouraged. Release note: None
78ac4e1
to
21a286f
Compare
bors r=tbg |
Build succeeded: |
`roachprod.Get` and `roachprod.Put` behaved differently when it comes to logging of errors: the former would not log errors found while running `scp` if there was a file backing the logger, while the latter would. However, there is no reason for this difference, and it was probably an oversight introduced in an old, really large PR (cockroachdb#74223). This commit makes behavior consistent in both calls and should allow us to see `Get` errors in logs, especially important in `roachtest` failures. Epic: None. Release note: None.
89329: cdcevent: only fetch relevant columns in the rowfetcher r=jayshrivastava a=jayshrivastava Previously, a rowfetcher would be configured to fetch all public columns in a table, including virtual columns. Then, if we only wanted to read columns belonging to a particular family, we would index into this row. This change updates row fetchers to only fetch relevant data, including only the primary key columns and columns in a specified family. This change also updates the row fetcher such that it does not fetch virtual columns. Instead, they are added on by the event descriptor. If the descriptor specifies a column outside of the physical row, the row iterator will fill in a null value upon iteration, representing a virtual column. Release note (enterprise change): When a changefeed is run with the option virtual_columns = "null", the virtual column will be ordered last in each row. Informs: #80976 Epic: none 89781: sql: fix logic test option typos r=mgartner a=mgartner This commit fixes a few tests that incorrectly separated test options with a space instead of a comma. Release note: None 89850: roachprod: log Get failures in roachtests r=srosenberg a=renatolabs `roachprod.Get` and `roachprod.Put` behaved differently when it comes to logging of errors: the former would not log errors found while running `scp` if there was a file backing the logger, while the latter would. However, there is no reason for this difference, and it was probably an oversight introduced in an old, really large PR (#74223). This commit makes behavior consistent in both calls and should allow us to see `Get` errors in logs, especially important in `roachtest` failures. Epic: None. Release note: None. 89867: ui: fix undefined table stats r=maryliag a=maryliag Previously, if no value was being passed as totalCount, the table stats were showing an "undefined value". This commit as a default value as 0 for the total. Fixes #89869 Before <img width="411" alt="Screen Shot 2022-10-11 at 8 43 04 PM" src="https://user-images.githubusercontent.com/1017486/195453624-52ad8c79-95ee-4dda-a703-b7492b7e2fe3.png"> After <img width="281" alt="Screen Shot 2022-10-12 at 5 21 52 PM" src="https://user-images.githubusercontent.com/1017486/195453705-e4fff03c-770f-4f32-8b87-3d26b9b072ff.png"> Release note (bug fix): show correct value on table stats on UI, when there is no values to show. 89919: release: generate archives once, fix checksum format r=celiala a=rail Previously, the release archives were generated multiple times and we ended up uploading different binary content to different cloud providers. Also, the checksum format was missing an extra space, what prevents non coreutils checksum tools from working properly. This change makes the releae process to generate archives only once and fixes the checksum format. Fixes: #89915 Fixes: #89917 Release note: None Co-authored-by: Jayant Shrivastava <jayants@cockroachlabs.com> Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com> Co-authored-by: Renato Costa <renato@cockroachlabs.com> Co-authored-by: maryliag <marylia@cockroachlabs.com> Co-authored-by: Rail Aliiev <rail@iqchoice.com>
`roachprod.Get` and `roachprod.Put` behaved differently when it comes to logging of errors: the former would not log errors found while running `scp` if there was a file backing the logger, while the latter would. However, there is no reason for this difference, and it was probably an oversight introduced in an old, really large PR (cockroachdb#74223). This commit makes behavior consistent in both calls and should allow us to see `Get` errors in logs, especially important in `roachtest` failures. Epic: None. Release note: None.
`roachprod.Get` and `roachprod.Put` behaved differently when it comes to logging of errors: the former would not log errors found while running `scp` if there was a file backing the logger, while the latter would. However, there is no reason for this difference, and it was probably an oversight introduced in an old, really large PR (cockroachdb#74223). This commit makes behavior consistent in both calls and should allow us to see `Get` errors in logs, especially important in `roachtest` failures. Epic: None. Release note: None.
This patch moves
pkg/cmd/roachtest/logger
topkg/roachprod/logger
to be used as a logger by the roachprod library.
roachtest
and theroachprod binary are then configured to use/pass instances of
logger
as needed by
pkg/roachprod
.All calls to
fmt.Printf
andfmt.Println
were removed frompkg/roachprod
except in few cases specific to the roachprodbinary. In the future, using
fmt.Printf
andfmt.Println
inthe library (i.e.
pkg/roachprod
) should be discouraged.Closes #73234.
Release note: None