OCA / oca-ci

Container image to run OCA CI tests
MIT License
30 stars 42 forks source link

issue with same repo dependencies #67

Closed nilshamerlinck closed 8 months ago

nilshamerlinck commented 8 months ago

Hello @sbidoul

This is a follow-up to https://github.com/OCA/oca-ci/issues/57

Disclaimer: I might be missing the bigger picture here :sweat_smile:

Context: https://github.com/OCA/bank-payment/pull/1236

Adding a non-merged dependency from same repository in test-requirements.txt leads to 2 issues:

Both cases raise the exception NoScmFound in whool, here

Workarounds:

Relevant logs:

(1)

  Building wheel for odoo-addon-account_payment_order (pyproject.toml): started
  Building wheel for odoo-addon-account_payment_order (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Building wheel for odoo-addon-account_payment_order (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [31 lines of output]
      fatal: detected dubious ownership in repository at '/__w/bank-payment/bank-payment'
      To add an exception for this directory, call:

          git config --global --add safe.directory /__w/bank-payment/bank-payment
      Traceback (most recent call last):
        File "/tmp/pip-build-env-16qd0cbq/overlay/lib/python3.10/site-packages/whool/buildapi.py", line 41, in _scm_ls_files
          subprocess.check_output(
        File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/usr/lib/python3.10/subprocess.py", line 526, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['git', 'ls-files']' returned non-zero exit status 128.

(2)

  Building wheel for odoo-addon-account_payment_order (pyproject.toml): started
  Building wheel for odoo-addon-account_payment_order (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error

  × Building wheel for odoo-addon-account_payment_order (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      fatal: not a git repository (or any parent up to mount point /mnt)
      Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
      Traceback (most recent call last):
        File "/tmp/pip-build-env-7452fbi7/overlay/lib/python3.10/site-packages/whool/buildapi.py", line 41, in _scm_ls_files
          subprocess.check_output(
        File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
          return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
        File "/usr/lib/python3.10/subprocess.py", line 526, in run
          raise CalledProcessError(retcode, process.args,
      subprocess.CalledProcessError: Command '['git', 'ls-files']' returned non-zero exit status 128.
sbidoul commented 8 months ago

I have released whool 1.0, wich supports building from outside the git repo, or when git does not work for some reason. This requires pip >= 21.3 but that one exists since more than two years now, so this should be ok.

nilshamerlinck commented 8 months ago

thanks @sbidoul