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

error when deleting inconsistent tag #1

Open
proppy opened this issue Dec 22, 2022 · 0 comments · May be fixed by #2
Open

error when deleting inconsistent tag #1

proppy opened this issue Dec 22, 2022 · 0 comments · May be fixed by #2

Comments

@proppy
Copy link
Contributor

proppy commented Dec 22, 2022

Currently conda-build-prepare relies on git describe to get the latest reachable tag: https://github.com/hdl/conda-build-prepare/blob/master/conda_build_prepare/git_helpers.py#L235

This can lead to the following Traceback when the repo has inconsistent tags:

2022-12-21T12:52:21.9200403Z error: tag 'Public_Release-7.6.0-77-g50daf8e8e069363aea2fe91cc8012a8d3038bd87' not found.
2022-12-21T12:52:21.9211902Z Traceback (most recent call last):
2022-12-21T12:52:21.9212281Z Preparing the environment, please wait...
2022-12-21T12:52:21.9213430Z   File "/tmp/really-long-path/conda/lib/python3.7/runpy.py", line 193, in _run_module_as_main
2022-12-21T12:52:21.9213827Z     "__main__", mod_spec)
2022-12-21T12:52:21.9214247Z   File "/tmp/really-long-path/conda/lib/python3.7/runpy.py", line 85, in _run_code
2022-12-21T12:52:21.9214623Z     exec(code, run_globals)
2022-12-21T12:52:21.9215159Z   File "/tmp/really-long-path/conda/lib/python3.7/site-packages/conda_build_prepare/__main__.py", line 54, in <module>
2022-12-21T12:52:21.9215597Z     prepare_recipe(recipe_dir, git_dir, env_dir)
2022-12-21T12:52:21.9216174Z   File "/tmp/really-long-path/conda/lib/python3.7/site-packages/conda_build_prepare/conda_cmds.py", line 363, in prepare_recipe
2022-12-21T12:52:21.9216616Z     git_rewrite_tags(first_git_repo_path)
2022-12-21T12:52:21.9217179Z   File "/tmp/really-long-path/conda/lib/python3.7/site-packages/conda_build_prepare/git_helpers.py", line 247, in git_rewrite_tags
2022-12-21T12:52:21.9217550Z     git_drop_tag(git_repo, tag)
2022-12-21T12:52:21.9218117Z   File "/tmp/really-long-path/conda/lib/python3.7/site-packages/conda_build_prepare/git_helpers.py", line 194, in git_drop_tag
2022-12-21T12:52:21.9218634Z     _call_custom_git_cmd(git_repo, f'tag -d {tag}')
2022-12-21T12:52:21.9219169Z   File "/tmp/really-long-path/conda/lib/python3.7/site-packages/conda_build_prepare/git_helpers.py", line 144, in _call_custom_git_cmd
2022-12-21T12:52:21.9219602Z     stdout=subprocess.PIPE).stdout
2022-12-21T12:52:21.9220095Z   File "/tmp/really-long-path/conda/lib/python3.7/subprocess.py", line 512, in run
2022-12-21T12:52:21.9220470Z     output=stdout, stderr=stderr)
2022-12-21T12:52:21.9221087Z subprocess.CalledProcessError: Command '['git', 'tag', '-d', 'Public_Release-7.6.0-77-g50daf8e8e069363aea2fe91cc8012a8d3038bd87']' returned non-zero exit status 1.
2022-12-21T12:52:21.9399623Z 
2022-12-21T12:52:21.9399759Z Cloning git sources...
2022-12-21T12:52:21.9399949Z 
2022-12-21T12:52:21.9400132Z Modifying git tags to set proper package version...
2022-12-21T12:52:21.9400342Z 
2022-12-21T12:52:21.9400662Z Rewriting tags in "/home/runner/work/conda-eda/conda-eda/workdir/git-repos/Xyce"...

This is due to a git-describe "feature" (described in https://patchwork.kernel.org/project/git/patch/fcf19a46b80322c5579142efe4ec681a4dcbdd28.1581802264.git.matheus.bernardino@usp.br/) which attempt to resolve inconsistent tags:

Xyce 🍙 git describe --tags --abbrev=0
warning: tag 'Release-7.6.0' is externally known as 'Public_Release-7.6.0'
Public_Release-7.6.0-77-g50daf8e8e069363aea2fe91cc8012a8d3038bd87

We should find a more reliable way to extract the latest reachable tag.

@proppy proppy changed the title error deleting inconsistent tag error when deleting inconsistent tag Dec 22, 2022
ajelinski added a commit that referenced this issue Jan 16, 2023
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 a pull request may close this issue.

1 participant