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

Add check for prefect-client version in prefect-client workflow #15624

Merged
merged 18 commits into from
Oct 9, 2024

Conversation

desertaxle
Copy link
Member

@desertaxle desertaxle commented Oct 9, 2024

Fixes an issue where the __version__ attribute is not populating correctly. The root cause is that the setup.py that the prefect-client package uses doe not include a cmdclass. That cmdclass generates the _version.py file that encodes the current version when we build the library. It was likely left out because we delete files in CI, which leads to versioneer adding a .dirty to the generated version.

After trying several other approaches, I changed the version style that versioneer uses for version generation to pep440-pre, which ignores dirty changes. This isn't ideal since we lose information with this style, but it does fix the issue. We should consider alternative ways of building prefect-client that don't require such changes.

I also added a check to ensure that prefect-client correctly matches the version of prefect from this point on.

Closes #15620

Copy link

codspeed-hq bot commented Oct 9, 2024

CodSpeed Performance Report

Merging #15624 will not alter performance

Comparing fix-prefect-client-version (e72be00) with main (3fadd7f)

Summary

✅ 3 untouched benchmarks

Copy link
Member

@cicdw cicdw left a comment

Choose a reason for hiding this comment

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

nice work, works for me

@desertaxle desertaxle marked this pull request as ready for review October 9, 2024 17:57
@@ -95,7 +95,7 @@ jobs:

- name: Start server
run: |
prefect server start&
PREFECT_HOME=$(pwd) prefect server start&
Copy link
Collaborator

Choose a reason for hiding this comment

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

aha nice catch

.github/workflows/prefect-client.yaml Outdated Show resolved Hide resolved
@desertaxle desertaxle added the fix A fix for a bug in an existing feature label Oct 9, 2024
@github-actions github-actions bot added the bug Something isn't working label Oct 9, 2024
@desertaxle desertaxle merged commit 95c6276 into main Oct 9, 2024
34 checks passed
@desertaxle desertaxle deleted the fix-prefect-client-version branch October 9, 2024 18:08
@@ -49,7 +49,7 @@ def get_config() -> VersioneerConfig:
# _version.py
cfg = VersioneerConfig()
cfg.VCS = "git"
cfg.style = "pep440"
cfg.style = "pep440-pre"
Copy link
Collaborator

Choose a reason for hiding this comment

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

this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix A fix for a bug in an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prefect-client has unknown prefect.__version__
3 participants