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

Fix issue releasing dbt package: tox commands run relative to repo root #1962

Merged
merged 2 commits into from
Nov 23, 2021
Merged

Fix issue releasing dbt package: tox commands run relative to repo root #1962

merged 2 commits into from
Nov 23, 2021

Conversation

jpy-git
Copy link
Contributor

@jpy-git jpy-git commented Nov 23, 2021

Brief summary of the change made

This PR fixes #1961. sqlfluff-templater-dbt 0.8.2 release failed as tox -e build-dist runs relative to the project root rather than the cwd context. Resolved by giving posargs path option to tox build-dist command and adjusting workflow accordingly.

Are there any other side effects of this change that we should be aware of?

Should fix sqlfluff-templater-dbt release

Pull Request checklist

  • Please confirm you have completed any of the necessary steps below.

  • Included test cases to demonstrate any code changes, which may be one or more of the following:

    • .yml rule test cases in test/fixtures/rules/std_rule_cases.
    • .sql/.yml parser test cases in test/fixtures/dialects (note YML files can be auto generated with python test/generate_parse_fixture_yml.py or by running tox locally).
    • Full autofix test cases in test/fixtures/linter/autofix.
    • Other.
  • Added appropriate documentation for the change.

  • Created GitHub issues for any relevant followup/future enhancements if appropriate.

@jpy-git
Copy link
Contributor Author

jpy-git commented Nov 23, 2021

@tunetheweb this should resolve the release issue for sqlfluff-templater-dbt. I haven't run tox commands out of the root context before so was not aware of this behaviour. I've tested locally with the new solution and it builds the dist in the expected location.

@@ -4,6 +4,7 @@ on:
release:
types:
- published
workflow_dispatch:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following our discussion in the Docker PR I figure it might be worth adding these to the PyPI publish workflows as well so we can re-run manually in these situations?
Alternatively can remove and do a patch release if you prefer. Although, no package code has changed since 0.8.2 so we should be good to just re-run the build+upload

@codecov
Copy link

codecov bot commented Nov 23, 2021

Codecov Report

Merging #1962 (f323744) into main (257c047) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##              main     #1962   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          147       147           
  Lines        10279     10279           
=========================================
  Hits         10279     10279           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 257c047...f323744. Read the comment docs.

@tunetheweb tunetheweb merged commit eb0d2c9 into sqlfluff:main Nov 23, 2021
@jpy-git jpy-git deleted the dbt_package_build_hotfix branch November 23, 2021 09:35
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.

sqlfluff-templater-dbt 0.8.2 not on PyPI?
2 participants