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

Update GitHub Actions Workflow #216

Merged
merged 2 commits into from
Feb 2, 2023
Merged

Conversation

timobrembeck
Copy link
Contributor

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Thanks a lot in advance for your feedback!

@jrozner
Copy link
Member

jrozner commented Jan 31, 2023

Running the action right now. The changes look good and correct. Thanks!

@timobrembeck
Copy link
Contributor Author

Hmm, apparently there is a deeper problem with caching which was undetected before because the cache key is false by default...

My initial impression was that maybe the cached version is somehow outdated or incompatible with a newer Python version released in the meantime, so I thought incrementing the key could help.

However, the error message also states:

You have discovered a bug in aqt.

Traceback
Symlink loop from '/opt/Qt/6.4.0/gcc_64/lib/libQt6Sql.so.6'
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/pathlib.py", line 1003, in resolve
 p.stat()
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/pathlib.py", line 1013, in stat
 return os.stat(self, follow_symlinks=follow_symlinks)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 40] Too many levels of symbolic links: '/opt/Qt/6.4.0/gcc_64/lib/libQt6Sql.so.6'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/pool.py", line 125, in worker
 result = (True, func(*args, **kwds))
                 ^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/pool.py", line 51, in starmapstar
 return list(itertools.starmap(args[0], args[1]))
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/aqt/installer.py", line 893, in installer
 szf.extractall(path=base_dir)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/py7zr/py7zr.py", line 955, in extractall
 self._extract(path=path, return_dict=False, callback=callback)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/py7zr/py7zr.py", line 625, in _extract
 sym_dst = t.resolve()
           ^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/pathlib.py", line 1005, in resolve
 check_eloop(e)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/pathlib.py", line 990, in check_eloop
 raise RuntimeError("Symlink loop from %r" % e.filename)
RuntimeError: Symlink loop from '/opt/Qt/6.4.0/gcc_64/lib/libQt6Sql.so.6'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/aqt/installer.py", line 99, in run
 args.func(args)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/aqt/installer.py", line 294, in run_install_qt
 run_installer(qt_archives.get_packages(), base_dir, sevenzip, keep)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/aqt/installer.py", line 835, in run_installer
 pool.starmap(installer, tasks)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/pool.py", line 375, in starmap
 return self._map_async(func, iterable, starmapstar, chunksize).get()
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/pool.py", line 774, in get
 raise self._value
RuntimeError: Symlink loop from '/opt/Qt/6.4.0/gcc_64/lib/libQt6Sql.so.6'
Arguments: `['/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/site-packages/aqt/__main__.py', 'install-qt', 'linux', 'desktop', '6.4.0', '--outputdir', '/opt/Qt']` Host: `uname_result(system='Linux', node='fv-az989-459', release='5.15.0-1031-azure', version='#38~20.04.1-Ubuntu SMP Mon Jan 9 18:23:48 UTC 2023', machine='x86_64')`
===========================PLEASE FILE A BUG REPORT===========================
You have discovered a bug in aqt.
Please file a bug report at https://github.com/miurahr/aqtinstall/issues.
Please remember to include a copy of this program's output in your report.
Exception in thread Thread-1 (_monitor):
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
Exception ignored in: <function Pool.__del__ at 0x7fd3ae01f240>
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/pool.py", line 271, in __del__
 self._change_notifier.put(None)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/queues.py", line 377, in put
 self._writer.send_bytes(obj)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/connection.py", line 199, in send_bytes
 self._send_bytes(m[offset:offset + size])
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/connection.py", line 410, in _send_bytes
 self._send(header + buf)
File "/opt/hostedtoolcache/Python/3.11.1/x64/lib/python3.11/multiprocessing/connection.py", line 367, in _send
 n = write(self._handle, buf)
     ^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 9] Bad file descriptor
Error: Error: The process '/opt/hostedtoolcache/Python/3.11.1/x64/bin/python3' failed with exit code 1

Should I open an issue in https://github.com/miurahr/aqtinstall/issues as suggested in the error log? Could this be related to miurahr/aqtinstall#224?

@jrozner
Copy link
Member

jrozner commented Jan 31, 2023

Ya, maybe open an issue with them. We can also try bumping the version of Qt to 6.4.2 and maybe something about it changed that fixed it. Other thing we do is maybe just remove the caching action all together until we can get it working later. It's not like it's been working up until this point so we're not going to have any loss there.

@jrozner
Copy link
Member

jrozner commented Feb 1, 2023

Do we know why this succeeded now but didn't before?

@timobrembeck
Copy link
Contributor Author

Do we know why this succeeded now but didn't before?

Yes, incrementing the cache key in 646749b invalidated the cache, meaning the caching action did nothing (like before) and the installation succeeded. Would be interesting if the workflow succeeds again, with the new cache restored...

@jrozner
Copy link
Member

jrozner commented Feb 1, 2023

That makes sense. I'm re-running the job now to see if it succeeds

@timobrembeck
Copy link
Contributor Author

That makes sense. I'm re-running the job now to see if it succeeds

Seems like it 👍

So then I would blame the newer Python version and I guess this problem will only re-occur when the action runner image updates its Python version without a changed cache key (which would then require it to update v1 to v2 in case that happens)... not sure if it's possible to include the Python version (including the minor tag) of the current image in the cache key as well.

@timobrembeck
Copy link
Contributor Author

Seems like it 👍

Well, did it? After having force-pushed the branch to clean up the git history, I'm a little bit confused now which of these workflow runs was the critical 🤔

Sorry, could you approve the workflow again?

@jrozner
Copy link
Member

jrozner commented Feb 1, 2023

Just ran it again

@timobrembeck
Copy link
Contributor Author

Hmm ok, obviously the problem persists. So I removed the GitHub cache action for the time being, since I don't have any other ideas how to fix it.

Copy link
Member

@jrozner jrozner left a comment

Choose a reason for hiding this comment

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

Looks good. We can revisit caching at a later time or just forget about it since it doesn't seem to have worked in the past anyway

@jrozner jrozner merged commit 2558b48 into ashirt-ops:main Feb 2, 2023
@timobrembeck timobrembeck deleted the gh-actions branch February 3, 2023 11:23
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.

Cached action isn't setup correctly Update set-output in actions
2 participants