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: Generate terraform codebase configuration. #723

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

antroy-madetech
Copy link
Contributor

Addresses DBTP-


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

@antroy-madetech antroy-madetech requested a review from a team as a code owner January 14, 2025 16:44
@antroy-madetech antroy-madetech marked this pull request as draft January 14, 2025 16:44
@codecov-commenter
Copy link

❌ 5 Tests Failed:

Tests completed Failed Passed Skipped
639 5 634 3
View the top 3 failed tests by shortest run time
tests/platform_helper/providers/test_config.py::test_load_and_validate_config_valid_file[pipeline/platform-config.yml]
Stack Traces | 0.036s run time
dbt_platform_helper/providers/config.py:52: in load_and_validate_platform_config
    self.validate_platform_config()
dbt_platform_helper/providers/config.py:33: in validate_platform_config
    PlatformConfigSchema.schema().validate(self.config)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:426: in validate
    raise SchemaWrongKeyError(message, e.format(data) if e else None)
E   schema.SchemaWrongKeyError: Wrong key 'codebase_pipelines' in {'application': 'test-app', 'legacy_project': True, 'accounts': [111111111, 222222222], 'environments': {'dev': None, 'prod': {'requires_approval': True}}, 'codebase_pipelines': [{'name': 'application', 'slack_channel': 'CODEBASE_SLACK_CHANNEL_ID', 'repository': 'organisation/repository', 'services': [{'run_group': ['web']}], 'pipelines': [{'name': 'main', 'branch': 'main', 'environments': [{'name': 'dev'}]}, {'name': 'tagged', 'tag': True, 'environments': [{'name': 'staging'}, {'name': 'prod', 'requires_approval': True}]}]}]}

During handling of the above exception, another exception occurred:
.../platform_helper/providers/test_config.py:97: in test_load_and_validate_config_valid_file
    validated = config_provider.load_and_validate_platform_config(path=path)
dbt_platform_helper/providers/config.py:54: in load_and_validate_platform_config
    abort_with_error(f"Schema error in {path}. {e}")
dbt_platform_helper/utils/messages.py:6: in abort_with_error
    exit(1)
<frozen _sitebuiltins>:26: in __call__
    ???
E   SystemExit: 1
tests/platform_helper/providers/test_config.py::test_load_and_validate_config_valid_file[pipeline/platform-config-with-public-repo.yml]
Stack Traces | 0.037s run time
dbt_platform_helper/providers/config.py:52: in load_and_validate_platform_config
    self.validate_platform_config()
dbt_platform_helper/providers/config.py:33: in validate_platform_config
    PlatformConfigSchema.schema().validate(self.config)
../../../..../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:426: in validate
    raise SchemaWrongKeyError(message, e.format(data) if e else None)
E   schema.SchemaWrongKeyError: Wrong key 'codebase_pipelines' in {'application': 'test-app', 'legacy_project': True, 'accounts': [111111111, 222222222], 'environments': {'dev': None, 'prod': {'requires_approval': True}}, 'codebase_pipelines': [{'name': 'application', 'repository': 'organisation/repository', 'additional_ecr_repository': 'public.ecr..../uktrade-platform-sandbox/demodjango/application', 'services': [{'run_group': ['web']}], 'pipelines': [{'name': 'main', 'branch': 'main', 'environments': [{'name': 'dev'}]}, {'name': 'tagged', 'tag': True, 'environments': [{'name': 'staging'}, {'name': 'prod', 'requires_approval': True}]}]}]}

During handling of the above exception, another exception occurred:
.../platform_helper/providers/test_config.py:97: in test_load_and_validate_config_valid_file
    validated = config_provider.load_and_validate_platform_config(path=path)
dbt_platform_helper/providers/config.py:54: in load_and_validate_platform_config
    abort_with_error(f"Schema error in {path}. {e}")
dbt_platform_helper/utils/messages.py:6: in abort_with_error
    exit(1)
<frozen _sitebuiltins>:26: in __call__
    ???
E   SystemExit: 1
tests/platform_helper/providers/test_config.py::test_load_and_validate_config_valid_file[pipeline/platform-config-for-terraform.yml]
Stack Traces | 0.047s run time
.../dbt_platform_helper/providers/config.py:52: in load_and_validate_platform_config
    self.validate_platform_config()
.../dbt_platform_helper/providers/config.py:33: in validate_platform_config
    PlatformConfigSchema.schema().validate(self.config)
.../home/runner/.cache.../pypoetry/virtualenvs/dbt-platform-helper-ilj10pnZ-py3.12/lib/python3.12/site-packages/schema.py:426: in validate
    raise SchemaWrongKeyError(message, e.format(data) if e else None)
E   schema.SchemaWrongKeyError: Wrong key 'codebase_pipelines' in {'application': 'test-app', 'environments': {'dev': {'accounts': {'deploy': {'name': 'dev-deploy-account', 'id': '1111111111'}, 'dns': {'name': 'dev-dns-account', 'id': '2222222222'}}}, 'prod': {'accounts': {'deploy': {'name': 'prod-deploy-account', 'id': '3333333333'}, 'dns': {'name': 'prod-dns-account', 'id': '4444444444'}}, 'requires_approval': True}}, 'codebase_pipelines': [{'name': 'application', 'repository': 'organisation/repository', 'services': [{'run_group': ['web']}], 'pipelines': [{'name': 'main', 'branch': 'main', 'environments': [{'name': 'dev'}]}, {'name': 'tagged', 'tag': True, 'environments': [{'name': 'staging'}, {'name': 'prod', 'requires_approval': True}]}]}]}

During handling of the above exception, another exception occurred:
.../platform_helper/providers/test_config.py:97: in test_load_and_validate_config_valid_file
    validated = config_provider.load_and_validate_platform_config(path=path)
.../dbt_platform_helper/providers/config.py:54: in load_and_validate_platform_config
    abort_with_error(f"Schema error in {path}. {e}")
.../dbt_platform_helper/utils/messages.py:6: in abort_with_error
    exit(1)
<frozen _sitebuiltins>:26: in __call__
    ???
E   SystemExit: 1

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