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(ingest): handle multiline string coercion #9484

Merged
merged 6 commits into from
Dec 21, 2023

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Dec 19, 2023

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 ingestion PR or Issue related to the ingestion of metadata docs Issues and Improvements to docs labels Dec 19, 2023
@hsheth2 hsheth2 changed the title feat(ingest): handle multiline string coersion feat(ingest): handle multiline string coercion Dec 19, 2023
brew install java11
brew install --cask zulu8
# Install Java
brew install openjdk@17
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is different than what we're recommending in notion, does that matter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it should be fine as long as it's java 17

@@ -37,9 +37,9 @@ def fetch_urls(
except Exception as e:
if attempt < max_retries:
print(f"Attempt {attempt + 1}/{max_retries}: {e}")
time.sleep(retry_delay)
time.sleep(retry_delay * 2**attempt)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason we don't use requests and its backoff capabilities? Doesn't really matter but might be nice if we ever refactor this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We didn't want to set up a venv here, so we're using pure python without any external packages

Comment on lines +2063 to +2065
processed_view_files = processed_view_map.setdefault(
model.connection, set()
)
Copy link
Collaborator

Choose a reason for hiding this comment

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

So much nicer

assert v.b == "original"
assert v.d1 == "deprecated"
assert v.d2 == "deprecated"
assert any(["d1 is deprecated" in warning for warning in get_global_warnings()])
assert any(["d2 is deprecated" in warning for warning in get_global_warnings()])

clear_global_warnings()


def test_multiline_string_fixer():
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a test with a dash in the secret name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that will come in a follow up PR - this one doesn't fix that just yet

@hsheth2 hsheth2 merged commit a18c720 into datahub-project:master Dec 21, 2023
53 checks passed
@hsheth2 hsheth2 deleted the cleanup-stuff branch December 21, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Issues and Improvements to docs ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants