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!: DBTP-1700 Remove redundant configuration options #744

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WillGibson
Copy link
Contributor

@WillGibson WillGibson commented Jan 29, 2025

Results from DBTP-1700. I don't want to spend time documenting redundant things.


Checklist:

Title:

  • Scope included as per conventional commits
  • Ticket reference included (unless it's a quick out of ticket thing)

Description:

  • Link to ticket included (unless it's a quick out of ticket thing)
  • Includes tests (or an explanation for why it doesn't)
  • [ ] If the work includes user interface changes, before and after screenshots included in description
  • [ ] Includes any applicable changes to the documentation in this code base
  • Includes link(s) to any applicable changes to the documentation in the DBT Platform Documentation (can be to a pull request)

Tasks:

  • Run the end to end tests for this branch and confirm that they are passing

@codecov-commenter
Copy link

codecov-commenter commented Jan 29, 2025

❌ 35 Tests Failed:

Tests completed Failed Passed Skipped
683 35 648 3
View the top 3 failed tests by shortest run time
tests/platform_helper/providers/test_config.py::test_validate_platform_config_succeeds_if_pipeline_account_matches_environment_accounts[non-prod-acc-envs0]
Stack Traces | 0.007s run time
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:443: in validate
    return s.validate(data, **kwargs)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:167: in validate
    raise SchemaError(
E   schema.SchemaError: Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:405: in validate
    nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value, **kwargs)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:445: in validate
    raise SchemaError([None] + x.autos, [e.format(data) if e else None] + x.errors)
E   schema.SchemaError: Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:405: in validate
    nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value, **kwargs)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:409: in validate
    raise SchemaError([message] + x.autos, [e.format(data) if e else None] + x.errors)
E   schema.SchemaError: Key '*' error:
E   Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
dbt_platform_helper/providers/config.py:51: in load_and_validate_platform_config
    self._validate_platform_config()
dbt_platform_helper/providers/config.py:32: in _validate_platform_config
    PlatformConfigSchema.schema().validate(self.config)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:409: in validate
    raise SchemaError([message] + x.autos, [e.format(data) if e else None] + x.errors)
E   schema.SchemaError: Key 'environments' error:
E   Key '*' error:
E   Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
.../platform_helper/providers/test_config.py:87: in test_validate_platform_config_succeeds_if_pipeline_account_matches_environment_accounts
    config_provider.load_and_validate_platform_config()
dbt_platform_helper/providers/config.py:53: in load_and_validate_platform_config
    self.io.abort_with_error(f"Schema error in {path}. {e}")
dbt_platform_helper/providers/io.py:27: in abort_with_error
    exit(1)
<frozen _sitebuiltins>:26: in __call__
    ???
E   SystemExit: 1
tests/platform_helper/providers/test_config.py::test_validate_platform_config_succeeds_if_pipeline_account_matches_environment_accounts[prod-acc-envs1]
Stack Traces | 0.008s run time
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:443: in validate
    return s.validate(data, **kwargs)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:167: in validate
    raise SchemaError(
E   schema.SchemaError: Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:405: in validate
    nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value, **kwargs)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:445: in validate
    raise SchemaError([None] + x.autos, [e.format(data) if e else None] + x.errors)
E   schema.SchemaError: Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:405: in validate
    nvalue = Schema(svalue, error=e, ignore_extra_keys=i).validate(value, **kwargs)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:409: in validate
    raise SchemaError([message] + x.autos, [e.format(data) if e else None] + x.errors)
E   schema.SchemaError: Key '*' error:
E   Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
dbt_platform_helper/providers/config.py:51: in load_and_validate_platform_config
    self._validate_platform_config()
dbt_platform_helper/providers/config.py:32: in _validate_platform_config
    PlatformConfigSchema.schema().validate(self.config)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:409: in validate
    raise SchemaError([message] + x.autos, [e.format(data) if e else None] + x.errors)
E   schema.SchemaError: Key 'environments' error:
E   Key '*' error:
E   Or(None, {Optional('accounts'): {'deploy': {'name': <class 'str'>, 'id': <class 'str'>}, 'dns': {'name': <class 'str'>, 'id': <class 'str'>}}, Optional('versions'): {Optional('terraform-platform-modules'): <class 'str'>}, Optional('vpc'): <class 'str'>}) did not validate {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   None does not match {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}
E   Wrong key 'requires_approval' in {'accounts': {'deploy': {'name': 'non-prod-acc', 'id': '1122334455'}, 'dns': {'name': 'non-prod-dns-acc', 'id': '6677889900'}}, 'requires_approval': False, 'vpc': 'non-prod-vpc'}

During handling of the above exception, another exception occurred:
.../platform_helper/providers/test_config.py:87: in test_validate_platform_config_succeeds_if_pipeline_account_matches_environment_accounts
    config_provider.load_and_validate_platform_config()
dbt_platform_helper/providers/config.py:53: in load_and_validate_platform_config
    self.io.abort_with_error(f"Schema error in {path}. {e}")
dbt_platform_helper/providers/io.py:27: in abort_with_error
    exit(1)
<frozen _sitebuiltins>:26: in __call__
    ???
E   SystemExit: 1
tests/platform_helper/utils/test_validation.py::test_validate_addons_failure[no_param_addons_bad_data.yml-exp_error6]
Stack Traces | 0.031s run time
.../platform_helper/utils/test_validation.py:253: in test_validate_addons_failure
    assert bool(re.search(f"(?s)Error in {entry}:.*{error}", error_map[entry]))
E   assert False
E    +  where False = bool(None)
E    +    where None = <function search at 0x7f4acd00e700>("(?s)Error in my-vpc:.*Wrong key 'vpc_param' in", "Unsupported addon type 'vpc' in addon 'my-vpc'")
E    +      where <function search at 0x7f4acd00e700> = re.search

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

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