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): list referenced env variables in recipe #6043

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

hsheth2
Copy link
Collaborator

@hsheth2 hsheth2 commented Sep 24, 2022

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 ingestion PR or Issue related to the ingestion of metadata label Sep 24, 2022
@github-actions
Copy link

Unit Test Results (metadata ingestion)

       8 files  ±0         8 suites  ±0   56m 41s ⏱️ - 1m 51s
   717 tests ±0     714 ✔️ ±0  3 💤 ±0  0 ±0 
1 436 runs  ±0  1 430 ✔️ ±0  6 💤 ±0  0 ±0 

Results for commit 623ca4d. ± Comparison against base commit 325b959.

This pull request removes 8 and adds 8 tests. Note that renamed tests count towards both.
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/bad_complex_variable_expansion.yml-None-env6-MissingClosingBrace]
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/bad_extension.whatevenisthis-None-env5-ConfigurationError]
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/bad_variable_expansion.yml-None-env3-ParameterNullOrNotSet]
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/basic.toml-golden_config1-env1-None]
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/basic.yml-golden_config0-env0-None]
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/complex_variable_expansion.yml-golden_config7-env7-None]
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/simple_variable_expansion.yml-golden_config2-env2-None]
tests.unit.config.test_config_loader ‑ test_load[tests/unit/config/this_file_does_not_exist.yml-None-env4-ConfigurationError]
tests.unit.config.test_config_loader ‑ test_load_error[tests/unit/config/bad_complex_variable_expansion.yml-env3-MissingClosingBrace]
tests.unit.config.test_config_loader ‑ test_load_error[tests/unit/config/bad_extension.whatevenisthis-env2-ConfigurationError]
tests.unit.config.test_config_loader ‑ test_load_error[tests/unit/config/bad_variable_expansion.yml-env0-ParameterNullOrNotSet]
tests.unit.config.test_config_loader ‑ test_load_error[tests/unit/config/this_file_does_not_exist.yml-env1-ConfigurationError]
tests.unit.config.test_config_loader ‑ test_load_success[tests/unit/config/basic.toml-golden_config1-env1-None]
tests.unit.config.test_config_loader ‑ test_load_success[tests/unit/config/basic.yml-golden_config0-env0-referenced_env_vars0]
tests.unit.config.test_config_loader ‑ test_load_success[tests/unit/config/complex_variable_expansion.yml-golden_config3-env3-referenced_env_vars3]
tests.unit.config.test_config_loader ‑ test_load_success[tests/unit/config/simple_variable_expansion.yml-golden_config2-env2-referenced_env_vars2]

@github-actions
Copy link

Unit Test Results (build & test)

584 tests  ±0   580 ✔️ ±0   13m 13s ⏱️ +20s
143 suites ±0       4 💤 ±0 
143 files   ±0       0 ±0 

Results for commit 623ca4d. ± Comparison against base commit 325b959.

@@ -51,6 +52,19 @@ def resolve_env_variables(config: dict) -> dict:
return new_dict


def list_referenced_env_variables(config: dict) -> Set[str]:
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this function being used anywhere (other than the test). So what's the purpose of this function?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we want to fetch secrets from an external secret store rather than env vars, we'll need to be able to list the required variables. This function will be used by the acryl executor.

Copy link
Contributor

@shirshanka shirshanka left a comment

Choose a reason for hiding this comment

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

LGTM

@shirshanka shirshanka merged commit 3f1d47c into datahub-project:master Sep 27, 2022
@hsheth2 hsheth2 deleted the list-env-required branch February 14, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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