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

rust-consumers logs with skip-write/no-skip-write flag #5847

Closed
andrsp opened this issue May 2, 2024 · 2 comments · Fixed by #5920
Closed

rust-consumers logs with skip-write/no-skip-write flag #5847

andrsp opened this issue May 2, 2024 · 2 comments · Fixed by #5920
Assignees
Labels
bug Something isn't working

Comments

@andrsp
Copy link

andrsp commented May 2, 2024

Environment

sentry/snuba 24.4.2

Steps to Reproduce

  1. Run rust consumers with --no-skip-write flag
  2. Check logs

Expected Result

According to: https://github.com/getsentry/snuba/blob/24.4.2/snuba/cli/rust_consumer.py#L104-L109

I expect that consumer follow config flag --no-skip-write and write rows to clickhouse and correctly report it to logs

{"timestamp":"...","level":"INFO","fields":{"message":"Inserted 1 rows"},"target":"rust_snuba::strategies::clickhouse"}

Actual Result

Consumer actually writes to clickhouse with --no-skip-write, but reports that writing skipped, which looks like inverted interpretation of flag

{"timestamp":"...","level":"INFO","fields":{"message":"skipping write of 1 rows"},"target":"rust_snuba::strategies::clickhouse"}

If I run rust consumer with --skip-write flag, it stops writing to clickhouse, but reports {"message":"Inserted 1 rows"} in logs

@untitaker
Copy link
Member

I can confirm that the log output is swapped, but in terms of actual behavior the --skip-write flag should work correctly.

@untitaker untitaker self-assigned this May 15, 2024
@untitaker untitaker added the bug Something isn't working label May 15, 2024
untitaker added a commit that referenced this issue May 15, 2024
the `finish()` function returns whether the write happened, as such the
logs were messed up.

Fix #5847
@untitaker
Copy link
Member

#5920 this should fix the log

untitaker added a commit that referenced this issue May 15, 2024
the `finish()` function returns whether the write happened, as such the
logs were messed up.

Fix #5847
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants