-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Wily fails when enabled on GitHub workflow #141
Comments
Hi 👋 that's probably because |
Thanks a lot for your help. That resolves the problem with the bad object, but not Wily fails elsewhere Run wily build my_pkg/ test/
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/wily/commands/build.py", line 30, in build
archiver = archiver.cls(config)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/wily/archivers/git.py", line 38, in __init__
self.current_branch = self.repo.active_branch
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/git/repo/base.py", line [7](https://github.com/edmondo1984/my-pkg/pull/19/checks#step:5:7)97, in active_branch
return self.head.reference
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/git/refs/symbolic.py", line 294, in _get_reference
raise TypeError("%s is a detached symbolic reference as it points to %r" % (self, sha))
TypeError: HEAD is a detached symbolic reference as it points to '7e0196a45590b167123caab43179b6f2d[8](https://github.com/edmondo1984/my-pkg/pull/19/checks#step:5:8)b3303e'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.10.0/x64/bin/wily", line 8, in <module>
sys.exit(cli())
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/click/core.py", line 165[9](https://github.com/edmondo1984/my-pkg/pull/19/checks#step:5:9), in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/opt/hostedtoolcache/Python/3.[10](https://github.com/edmondo1984/my-pkg/pull/19/checks#step:5:10).0/x64/lib/python3.10/site-packages/click/core.py", line [13](https://github.com/edmondo1984/my-pkg/pull/19/checks#step:5:13)95, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/click/decorators.py", line [26](https://github.com/edmondo1984/my-pkg/pull/19/checks#step:5:26), in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/wily/__main__.py", line 99, in build
build(
File "/opt/hostedtoolcache/Python/3.10.0/x64/lib/python3.10/site-packages/wily/commands/build.py", line [33](https://github.com/edmondo1984/my-pkg/pull/19/checks#step:5:33), in build
logger.error(f"Failed to setup archiver: '{e.message}'")
AttributeError: 'TypeError' object has no attribute 'message' |
Are you running your action on the The problem is you are in a detached HEAD state, see this StackOverflow post for reference |
Correct, why is the pull request in detached HEAD? |
PR will copy the code at the commit hash instead of checking out the particular branch. IIRC you can use |
checkout the build docs for more https://wily.readthedocs.io/en/latest/commands/build.html#wily |
I think it is desirable to run Wily on a PR to compare with the previous result, can you please suggest how to do it? |
Describe the bug
I have added a specific job to my Github Workflow without installing wily locally and Wily fails with a git error:
To Reproduce
Add a job to a Github pipeline to your code like so:
Expected behavior
Build would succeed
Additional context
It's interesting that the git diff command copy-pasted on my machine works correctly
The text was updated successfully, but these errors were encountered: