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

chore(eap): write script to send scrubbed data into a gcs bucket #6698

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

davidtsuk
Copy link
Contributor

@davidtsuk davidtsuk commented Dec 20, 2024

@phacops phacops requested a review from mdtro December 20, 2024 20:31
snuba/manual_jobs/extract_span_data.py Outdated Show resolved Hide resolved
snuba/manual_jobs/extract_span_data.py Show resolved Hide resolved
Copy link

codecov bot commented Jan 6, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
1161 1 1160 3
View the top 1 failed tests by shortest run time
tests.manual_jobs.test_extract_span_data::test_extract_span_data
Stack Traces | 0.28s run time
Traceback (most recent call last):
  File ".../tests/manual_jobs/test_extract_span_data.py", line 111, in test_extract_span_data
    assert (
AssertionError: assert <JobStatus.FAILED: 'failed'> == <JobStatus.FINISHED: 'finished'>
  - finished
  + failed

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@davidtsuk davidtsuk marked this pull request as ready for review January 7, 2025 18:20
@davidtsuk davidtsuk requested a review from a team as a code owner January 7, 2025 18:20
Copy link
Member

@onkar onkar left a comment

Choose a reason for hiding this comment

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

LGTM, left a minor comment.

Comment on lines 14 to 25
assert params
required_params = [
"organization_ids",
"start_timestamp",
"end_timestamp",
"table_name",
"limit",
"gcp_bucket_name",
"output_file_path",
]
for param in required_params:
assert param in params
Copy link
Member

@onkar onkar Jan 9, 2025

Choose a reason for hiding this comment

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

I think you can use Counter() to compare two unordered lists.

Python 3.11.8 (main, Aug 16 2024, 10:27:21) [Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from collections import Counter
>>> l1 = ["one", "two", "three"]
>>> l2 = ["two", "one", "three"]
>>> assert Counter(l1) == Counter(l2), "Lists must be same!"
>>> l1.append("four")
>>> assert Counter(l1) == Counter(l2), "Lists must be same!"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AssertionError: Lists must be same!

Also, consider adding a message along with assert to make debugging easier.

@davidtsuk davidtsuk requested a review from phacops January 13, 2025 18:55
@davidtsuk davidtsuk merged commit 9aba6cf into master Jan 13, 2025
32 checks passed
@davidtsuk davidtsuk deleted the david/data-extraction-job branch January 13, 2025 19:26
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.

3 participants