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

Backport updates to enable tag-based publishing for dbt-metricflow #1357

Closed

Conversation

tlento
Copy link
Contributor

@tlento tlento commented Jul 27, 2024

tlento and others added 4 commits July 26, 2024 18:37
We need to be able to start deploying dbt-metricflow via tags that
trigger a deployment action instead of relying on manual deployment.

This is necessary for two reasons:

1. The MetricFlow repository is evolving to allow for multiple
package deployments in distinctive ways, and each package would benefit
from a set of pre-deployment steps.
2. With the CLI now bundled with dbt-metricflow we need a structured way
of adding and deploying patch fixes for versions that are too far
behind the current repo main branch to deploy off of main.

Therefore, this PR splits our PyPI deployment action into two separate
versions with different tag-format triggers, one for MetricFlow and
the other for dbt-metricflow. Authentication for dbt-metricflow will
be managed via PyPI's Trusted Publisher mechanism. MetricFlow will
follow suit once the relevant PyPI enrollments are ready.

Note these are separate files with some duplication here, but it's
minimal,
and we expect further divergence over time as we develop
package-specific
pre-deployment tests for these packages.
We have changed authentication methods for PyPI to a more secure
approach, so we no longer have to store an access token in GitHub
secrets. This removes the in-code references so we can delete
the secrets themselves.
In order to use Trusted Publishing we have to do some special things.

Most of these things have been abstracted away through the official
action plugin provided by the Python Packaging Authority.

This change simply conforms our actions configs with the requirements
for the plugin. Specifically, providing the `id-token: write` permission
and the target URL for publication in the relevant environment config.
@tlento
Copy link
Contributor Author

tlento commented Jul 27, 2024

The dbt-metricflow configuration also works. See https://github.com/dbt-labs/metricflow/actions/runs/10119840135/job/27988835048 - the file exists error is expected.

@tlento tlento closed this Jul 30, 2024
@tlento tlento deleted the backport-publish-actions-updates branch July 30, 2024 01:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant