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

Ensure version.py included before we install #56418

Merged
merged 2 commits into from
Mar 23, 2020
Merged

Conversation

Ch3LL
Copy link
Contributor

@Ch3LL Ch3LL commented Mar 19, 2020

What does this PR do?

Ensures _version.py included before we run install when running python setup.py install

What issues does this PR fix or reference?

#56415

Previous Behavior

_version.py would not be included in the build if you run python setup.py install. This is because setuptools does not call run_command('build'), whereas distutils did when we did an install and we recently migrated to setuptools.

New Behavior

_version.py included and salt --version reporting correctly.

Tests written?

Yes

Commits signed with GPG?

Yes

@Ch3LL Ch3LL requested a review from a team as a code owner March 19, 2020 21:26
@ghost ghost requested a review from Akm0d March 19, 2020 21:26
@Ch3LL Ch3LL requested a review from s0undt3ch March 19, 2020 21:27
@sagetherage sagetherage added the v3000.1 vulnerable version label Mar 19, 2020
@dwoz dwoz merged commit 74575a6 into saltstack:master Mar 23, 2020
@marbx
Copy link
Contributor

marbx commented Apr 14, 2020

@Ch3LL, I suspect another root cause.

salt/version.py contains "tag describe":

git describe --tags --first-parent --match v[0-9]* --always

I think this was appropriate for the abandoned "develop" / multi releases git scheme.

Problem with the current "master" git scheme is that "tag describe" returns from head

v3000_docs-33-g4249d7f1e1

This is maybe is the last tag, but it should be 3001, as @frogunder noted 26 days ago.

When I execute simply git describe (on git head master), I get

v3000.1-206-g4249d7f1e1

When I build the Windows installer (on git head master) with the current "tag describe" in salt/version.py I read

build :: Install Current Version of salt...
---------------------------------------------------------------------
3000-33-g4249d7f1e1

When I build the Windows installer with modified and simple git describe in salt/version.py I read

build :: Install Current Version of salt...
---------------------------------------------------------------------
3000.1-206-g4249d7f1e1

Though I fail to understand where the file content for _version.py comes from, I assume it is "git describe" and would I suggest that version.py uses it too.

I wrote to @twangboy on Slack before.

@Ch3LL
Copy link
Contributor Author

Ch3LL commented Apr 14, 2020

@markuskramerIgitt would you mind opening a new issue with these details. This is breaking because we have never before used a <version>_docs tag.

@marbx
Copy link
Contributor

marbx commented Apr 14, 2020

Hi @Ch3LL , I opened #56634

By the way, I looked for and found other <version>_docs tags.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3000.1 vulnerable version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants