Description
I noticed that the github workflows were not working in https://github.com/roboflow-ai/roboflow-python/pull/51
There seems to be an issue referencing the branch since it exists on the forked repo rather than the main repo.
Run actions/[email protected]
Syncing repository: roboflow-ai/roboflow-python
Getting Git version info
Temporarily overriding HOME='/home/runner/work/_temp/c9897c44-666d-4cac-b37c-b1cf27451ab3' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
/usr/bin/git config --global --add safe.directory /home/runner/work/roboflow-python/roboflow-python
Deleting the contents of '/home/runner/work/roboflow-python/roboflow-python'
Initializing the repository
Disabling automatic garbage collection
Setting up auth
Fetching the repository
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/accept-JPG*:refs/remotes/origin/accept-JPG* +refs/tags/accept-JPG*:refs/tags/accept-JPG*
The process '/usr/bin/git' failed with exit code 1
Waiting [13](https://github.com/roboflow-ai/roboflow-python/actions/runs/3063095031/jobs/4944798073#step:2:14) seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/accept-JPG*:refs/remotes/origin/accept-JPG* +refs/tags/accept-JPG*:refs/tags/accept-JPG*
The process '/usr/bin/git' failed with exit code 1
Waiting 17 seconds before trying again
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +refs/heads/accept-JPG*:refs/remotes/origin/accept-JPG* +refs/tags/accept-JPG*:refs/tags/accept-JPG*
Error: The operation was canceled.
After making the change to remove the with:
block from the Checkout
step, the github action seemed to run properly, however tests failed with the following error:
Run python -m unittest
upload and label your dataset, and get an API KEY here: https://app.roboflow.com/?model=undefined&ref=undefined
E
======================================================================
loading Roboflow workspace...
ERROR: tests.test (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: tests.test
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.9.[13](https://github.com/roboflow-ai/roboflow-python/actions/runs/3063184200/jobs/4944979507#step:6:14)/x64/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
module = self._get_module_from_name(name)
File "/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
__import__(name)
File "/home/runner/work/roboflow-python/roboflow-python/tests/test.py", line 35, in <module>
class TestQueries(unittest.TestCase):
File "/home/runner/work/roboflow-python/roboflow-python/tests/test.py", line 38, in TestQueries
workspace = rf.workspace()
File "/home/runner/work/roboflow-python/roboflow-python/roboflow/__init__.py", line 88, in workspace
the_workspace = self.current_workspace
AttributeError: 'Roboflow' object has no attribute 'current_workspace'
----------------------------------------------------------------------
Ran 1 test in 0.000s
FAILED (errors=1)
Error: Process completed with exit code 1.
This seems to be due to to the main repository's secrets
not being accessible by my forked code.
Changing the pull_request
workflow to a pull_request_target
workflow, may fix this... but it also may introduce vulnerabilities. A better fix might be to mock API requests rather than make real ones.
Type of change
Please delete options that are not relevant.
- [x] Bug fix (non-breaking change which fixes an issue)
How has this change been tested, please provide a testcase or example of how you tested the change?
we'll see what github actions say 😄
Any specific deployment considerations
No