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

bug-1921849: support elasticsearch 8 #6741

Merged
merged 9 commits into from
Dec 3, 2024
Merged

bug-1921849: support elasticsearch 8 #6741

merged 9 commits into from
Dec 3, 2024

Conversation

relud
Copy link
Member

@relud relud commented Oct 3, 2024

use ELASTICSEARCH_MODE=PREFER_NEW to make the webapp use es8 and the processor write to both es 1.4 and es8

@relud relud force-pushed the relud-es-8-crash-storage branch 11 times, most recently from d96b425 to 9ac223f Compare October 8, 2024 18:09
@relud relud requested a review from willkg October 8, 2024 18:19
@relud

This comment was marked as resolved.

@relud relud force-pushed the relud-es-8-crash-storage branch 3 times, most recently from 32912f9 to b360970 Compare October 9, 2024 23:58
@relud relud marked this pull request as ready for review October 9, 2024 23:59
@relud relud requested a review from a team as a code owner October 9, 2024 23:59
@willkg

This comment was marked as resolved.

@relud relud force-pushed the relud-es-8-crash-storage branch 4 times, most recently from 19b3ea4 to c0e2cfd Compare October 30, 2024 17:55
@relud relud force-pushed the relud-es-8-crash-storage branch from c0e2cfd to 2704c10 Compare October 30, 2024 18:05
@relud

This comment was marked as resolved.

Copy link
Contributor

@willkg willkg left a comment

Choose a reason for hiding this comment

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

We're going to do this PR in two passes. This is a code read pass.

While you're fixing things I brought up, I'll spend some time going through some manual testing for things I'm wondering about.

Then after you make changes, I'll read through those and add anything that came up in manual testing.

socorro/external/es/crashstorage.py Outdated Show resolved Hide resolved
socorro/external/es/crashstorage.py Outdated Show resolved Hide resolved
socorro/external/es/super_search_fields.py Outdated Show resolved Hide resolved
socorro/external/es/super_search_fields.py Show resolved Hide resolved
socorro/external/es/super_search_fields.py Outdated Show resolved Hide resolved
socorro/tests/external/es/test_supersearch.py Outdated Show resolved Hide resolved
socorro/external/es/super_search_fields.py Show resolved Hide resolved
socorro/external/es/supersearch.py Show resolved Hide resolved
socorro/external/es/supersearch.py Outdated Show resolved Hide resolved
socorro/tests/external/es/test_crashstorage.py Outdated Show resolved Hide resolved
@relud relud requested a review from willkg November 7, 2024 00:25
@relud relud force-pushed the relud-es-8-crash-storage branch from b460f21 to b3a3c73 Compare November 7, 2024 00:36
except elasticsearch.exceptions.TransportError as e:
# If this is a TransportError, we try to figure out what the error
except elasticsearch.BadRequestError as e:
# If this is a BadRequestError, we try to figure out what the error
# is and fix the document and try again
Copy link
Member Author

Choose a reason for hiding this comment

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

this section removes fields that cause document_parsing_exception and retries the document. This seems like an odd choice given that it happens after value fixing occurs, which should already be preventing the three types of failure we catch here. The only way i can think of to reach this code block in production is if we are writing to a field not in our mapping.

Copy link
Contributor

Choose a reason for hiding this comment

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

It used to be the case that it wrote all the data into Elasticsearch even if it wasn't in the mapping. That way when they add new fields to the crash report, they'd get indexed even if Socorro didn't explicitly have support for it. While the intentions were good, that was terrible so I changed it such that it only indexes what's defined in super search fields and in the mapping.

@willkg willkg self-assigned this Nov 18, 2024
willkg

This comment was marked as resolved.

@relud relud force-pushed the relud-es-8-crash-storage branch 4 times, most recently from 9988801 to 0e51573 Compare November 20, 2024 23:29
@relud relud force-pushed the relud-es-8-crash-storage branch from 0e51573 to 0b51672 Compare November 20, 2024 23:34
@relud relud force-pushed the relud-es-8-crash-storage branch from 0b51672 to 8cedc0c Compare November 20, 2024 23:36
@relud relud requested a review from willkg November 20, 2024 23:39
@willkg
Copy link
Contributor

willkg commented Nov 22, 2024

@relud Can you pull in the fix in PR #6813? Then I can go through this PR again.

@relud
Copy link
Member Author

relud commented Nov 22, 2024

@relud Can you pull in the fix in PR #6813? Then I can go through this PR again.

done

Copy link
Contributor

@willkg willkg left a comment

Choose a reason for hiding this comment

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

I went through and tested the issues I raised in the previous review.

  1. bin/process_crashes.sh works now.
  2. Things correctly wait for both es and legacy_es containers to start up.
  3. TopCrashers works now.

I wrote up bug 1933824 about a curiosity I hit when uploading some crash report dump files to gcs emulator. That's not related to these changes.

My only issue is that I'm not sure why you added four new metrics to statsd_metrics.yml rather than just the one I was hitting issues with.

Everything else looks fine as far as I can tell.

r+wc

socorro/statsd_metrics.yaml Show resolved Hide resolved
@relud relud enabled auto-merge December 3, 2024 16:35
@relud relud added this pull request to the merge queue Dec 3, 2024
Merged via the queue into main with commit d533845 Dec 3, 2024
1 check passed
@relud relud deleted the relud-es-8-crash-storage branch December 3, 2024 16:59
@relud relud mentioned this pull request Dec 3, 2024
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.

2 participants