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

[CT-3488] [Feature] Generate manifest at build time or in PR #9272

Open
3 tasks done
colin-rogers-dbt opened this issue Dec 12, 2023 · 5 comments
Open
3 tasks done

[CT-3488] [Feature] Generate manifest at build time or in PR #9272

colin-rogers-dbt opened this issue Dec 12, 2023 · 5 comments
Labels
awaiting_response enhancement New feature or request

Comments

@colin-rogers-dbt
Copy link
Contributor

colin-rogers-dbt commented Dec 12, 2023

Is this your first time submitting a feature request?

  • I have read the expectations for open source contributors
  • I have searched the existing issues, and I could not find an existing issue for this feature
  • I am requesting a straightforward extension of existing dbt functionality, rather than a Big Idea better suited to a discussion

Describe the feature

Currently dbt-core relies on a delicate mechanism to generate a manifest: https://github.com/dbt-labs/dbt-core/blame/6e0a38720529360d061bd4e24e140f5ec55f8c15/tests/functional/artifacts/test_previous_version_state.py#L414

Instead of relying on commenting/uncommenting out test code we should generate this as part of our CI process either on the PR or in the release.

The current setup risks us to accidentally merge a manifest change: #9195 (comment) and is unintuitive for core development

Describe alternatives you've considered

No response

Who will this benefit?

No response

Are you interested in contributing this feature?

No response

Anything else?

No response

@colin-rogers-dbt colin-rogers-dbt added enhancement New feature or request triage labels Dec 12, 2023
@github-actions github-actions bot changed the title [Feature] Generate manifest at build time [CT-3488] [Feature] Generate manifest at build time Dec 12, 2023
@colin-rogers-dbt colin-rogers-dbt changed the title [CT-3488] [Feature] Generate manifest at build time [CT-3488] [Feature] Generate manifest at build time or in PR Dec 12, 2023
@emmyoop
Copy link
Member

emmyoop commented Dec 12, 2023

@colin-rogers-dbt this isn't quite accurate. That line generates a manifest off the test project that we use to test backwards compatibility. It's not generating the new schema. It affects only the test, not dbt as a released product. The changes in the linked PR were likely timestamps so not significant. However this is not the first time those methods were not commented back out before merging a PR. This is not an ideal solution for generating the new test manifest.

@colin-rogers-dbt
Copy link
Contributor Author

Thanks for the clarification @emmyoop !

@dbeatty10
Copy link
Contributor

What do you see as the next steps here @emmyoop or @colin-rogers-dbt ?

Is it to determine an alternative mechanism to #5604 that would allow generating a new manifest that doesn't rely on remembering to re-comment an uncommented line?

Like reading an environment variable here (or something else)?

        # If we need a newly generated manifest, set the DBT_GENERATE_MANIFEST environment variable
        if os.getenv("DBT_GENERATE_MANIFEST"):
            self.generate_latest_manifest(project, current_schema_version)

@emmyoop
Copy link
Member

emmyoop commented Dec 20, 2023

One option is to have a make command that would generate the file for us. We're already use ing it to do things like generate new proto definitions.

@dbeatty10
Copy link
Contributor

@colin-rogers-dbt would it meet the need to remove these lines altogether and replace it with a command in the Makefile similar to the one for generating protos?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting_response enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants