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

feat(elasticsearch): Updates to elasticsearch configuration, dao, tests #6269

Conversation

david-leifker
Copy link
Collaborator

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the product PR or Issue related to the DataHub UI/UX label Oct 23, 2022
@github-actions
Copy link

github-actions bot commented Oct 23, 2022

Unit Test Results (build & test)

622 tests  +98   618 ✔️ +94   15m 50s ⏱️ + 14m 48s
157 suites +36       4 💤 +  4 
157 files   +36       0 ±  0 

Results for commit bec9354. ± Comparison against base commit fc26cf3.

♻️ This comment has been updated with latest results.

@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch 2 times, most recently from d87a802 to 8f4e7bf Compare October 23, 2022 12:09
Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

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

Reviewed Internally. Looks good to me.

@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch 3 times, most recently from 492ed0f to 588d2a3 Compare October 24, 2022 17:03
@david-leifker david-leifker marked this pull request as draft October 24, 2022 18:09
@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch from 99c1b5d to 32b81d1 Compare October 25, 2022 22:30
@github-actions
Copy link

github-actions bot commented Oct 25, 2022

Unit Test Results (metadata ingestion)

       8 files         8 suites   58m 25s ⏱️
   758 tests    755 ✔️ 3 💤 0
1 518 runs  1 511 ✔️ 7 💤 0

Results for commit bec9354.

♻️ This comment has been updated with latest results.

@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch 3 times, most recently from 11fd53f to d5568d9 Compare October 26, 2022 23:11
@david-leifker david-leifker marked this pull request as ready for review October 31, 2022 19:07
@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch from f1d2c22 to b8ef061 Compare November 3, 2022 13:06
@@ -17,6 +17,7 @@
import pydantic
import requests
from expandvars import expandvars
from requests_file import FileAdapter
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note that intent here is to exercise the same logic that fetches compose files from github to be able to use file:// in the same way. There is logic in this class that is generally useful for running the smoke test locally.

@@ -38,15 +38,22 @@ public class ElasticSearchBulkProcessorFactory {
@Value("${elasticsearch.bulkProcessor.retryInterval}")
private Long retryInterval;

@Value("#{new Boolean('${elasticsearch.bulkProcessor.async}')}")
Copy link
Collaborator

@RyanHolstien RyanHolstien Nov 3, 2022

Choose a reason for hiding this comment

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

Does this cause any weird behavior if there are typos/field missing? SPEL stuff can be a little wonky sometimes so this is usually better done in code IMO. I also thought it would auto try to coerce it to boolean without this, but that may also have wonkiness.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I copied this from somewhere else in the code base. At one point I tried a few alternatives but they didn't seem to work so sticking with convention for this.

@@ -0,0 +1,28 @@
import requests
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rather than sprinkle sleep statements everywhere we wrap the requests library and sleep in a single place. There are now only a few places that are not using this injected requests wrapper.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Love this!

@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch from b8ef061 to 3f8dbb7 Compare November 3, 2022 19:45
Copy link
Collaborator

@jjoyce0510 jjoyce0510 left a comment

Choose a reason for hiding this comment

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

LGTM. This is a big PR so let's watch OSS closely after merging.

Great work, David!

@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch 2 times, most recently from f3e54cf to 2dcac9d Compare November 15, 2022 19:51
@david-leifker david-leifker force-pushed the david-leifker/elasticsearch-improvements branch from 2dcac9d to bec9354 Compare November 15, 2022 21:56
@jjoyce0510 jjoyce0510 merged commit 33fd876 into datahub-project:master Nov 16, 2022
cccs-Dustin pushed a commit to CybercentreCanada/datahub that referenced this pull request Feb 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product PR or Issue related to the DataHub UI/UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants