ARPA-SIMC / moncic-ci

Continuous integration tool and development helper.
GNU General Public License v2.0
2 stars 0 forks source link

Errori su `monci ci` in v0.8 #91

Closed brancomat closed 1 year ago

brancomat commented 1 year ago

Dopo l'upgrade da 0.7 a 0.8 (e relativi aggiustamenti di sintassi) abbiamo questo problema nei build:

# monci ci --verbose -I /moncic-ci --branch master --source-type rpm-arpa centos8 https://github.com/arpa-simc/dballe-web
2023-05-12 09:36:12 INFO run /tmp/tmphv8_gyqb# git -c advice.detachedHead=false clone --quiet https://github.com/arpa-simc/dballe-web --branch master
2023-05-12 09:36:15 INFO run /tmp/tmpww3ivp3x# git -c advice.detachedHead=false clone --quiet /tmp/tmphv8_gyqb/dballe-web --branch master
2023-05-12 09:36:15 INFO moncic.cli.build Source type: rpm-arpa
{
 "source": {
  "source": "https://github.com/arpa-simc/dballe-web",
  "host_path": "/tmp/tmpww3ivp3x/dballe-web",
  "guest_path": "/srv/moncic-ci/source/dballe-web"
 },
 "name": null,
 "success": false,
 "artifacts": [],
 "artifacts_dir": null,
 "source_only": false,
 "on_success": [],
 "on_fail": [],
 "on_end": [],
 "specfile": null
}
Traceback (most recent call last):
  File "/usr/bin/monci", line 42, in <module>
    cli.run_main(main)
  File "/usr/lib/python3.10/site-packages/moncic/cli/base.py", line 68, in run_main
    sys.exit(func())
  File "/usr/bin/monci", line 38, in main
    return handler.run()
  File "/usr/lib/python3.10/site-packages/moncic/cli/build.py", line 96, in run
    builder.run_build()
  File "/usr/lib/python3.10/site-packages/moncic/utils/guest.py", line 19, in wrapper
    return f(*args, **kw)
  File "/usr/lib/python3.10/site-packages/moncic/build/builder.py", line 119, in run_build
    with self.container() as container:
  File "/usr/lib64/python3.10/contextlib.py", line 135, in __enter__
    return next(self.gen)
  File "/usr/lib/python3.10/site-packages/moncic/build/builder.py", line 102, in container
    container_config.configure_workdir(
  File "/usr/lib/python3.10/site-packages/moncic/container.py", line 291, in configure_workdir
    self.forward_user = UserConfig.from_file(workdir)
  File "/usr/lib/python3.10/site-packages/moncic/runner.py", line 55, in from_file
    st = os.stat(pathname)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpww3ivp3x/dballe-web'

Errori analoghi usando -s debian-gbp-upstream.

Togliendo l'opzione --branch, l'errore cambia:

# monci ci --verbose -I /moncic-ci --source-type rpm-arpa centos8 https://github.com/arpa-simc/dballe-web
2023-05-12 09:59:52 INFO run /tmp/tmpd48jycw0# git -c advice.detachedHead=false clone --quiet https://github.com/arpa-simc/dballe-web
2023-05-12 09:59:56 INFO moncic.cli.build Source type: rpm-arpa
2023-05-12 09:59:56 INFO system.centos8 Starting system centos8 as mc-bicute using image /moncic-ci/centos8
2023-05-12 09:59:56 INFO system.centos8 Running systemd-run --property=KillMode=mixed --property=Type=notify --property=RestartForceExitStatus=133 --property=SuccessExitStatus=133 --property=Slice=machine.slice --property=Delegate=yes --property=TasksMax=16384 --property=WatchdogSec=3min systemd-nspawn --quiet --directory=/moncic-ci/centos8 --machine=mc-bicute --boot --notify-ready=yes --resolv-conf=replace-host --bind-ro=/tmp/tmpd48jycw0/dballe-web:/srv/moncic-ci/source/dballe-web --ephemeral --suppress-sync=yes systemd.hostname=mc-bicute
2023-05-12 09:59:58 INFO system.centos8 Running check or create user 'root' and group 'root'
2023-05-12 09:59:58 INFO system.centos8 Running Run setup scripts from binds
2023-05-12 09:59:58 INFO moncic.build.builder Build strategy: ARPA
2023-05-12 09:59:58 INFO system.centos8 Running Run the build
{
 "source": {
  "source": "https://github.com/arpa-simc/dballe-web",
  "host_path": "/tmp/tmpd48jycw0/dballe-web",
  "guest_path": "/srv/moncic-ci/source/dballe-web"
 },
 "name": null,
 "success": false,
 "artifacts": [],
 "artifacts_dir": null,
 "source_only": false,
 "on_success": [],
 "on_fail": [],
 "on_end": [],
 "specfile": null
}
Traceback (most recent call last):
  File "/usr/bin/monci", line 42, in <module>
    cli.run_main(main)
  File "/usr/lib/python3.10/site-packages/moncic/cli/base.py", line 68, in run_main
    sys.exit(func())
  File "/usr/bin/monci", line 38, in main
    return handler.run()
  File "/usr/lib/python3.10/site-packages/moncic/cli/build.py", line 96, in run
    builder.run_build()
  File "/usr/lib/python3.10/site-packages/moncic/utils/guest.py", line 19, in wrapper
    return f(*args, **kw)
  File "/usr/lib/python3.10/site-packages/moncic/build/builder.py", line 138, in run_build
    self.build = container.run_callable(
  File "/usr/lib/python3.10/site-packages/moncic/container.py", line 462, in run_callable
    return completed.result()
  File "/usr/lib/python3.10/site-packages/moncic/runner.py", line 178, in result
    raise self.exc_info[1].with_traceback(self.exc_info[2])
  File "/usr/lib/python3.10/site-packages/moncic/runner.py", line 509, in execute
    res = self.func(*self.args)
  File "/usr/lib/python3.10/site-packages/moncic/utils/guest.py", line 32, in wrapper
    return f(*args, **kw)
  File "/usr/lib/python3.10/site-packages/moncic/build/builder.py", line 194, in build_in_container
    self.build.build()
  File "/usr/lib/python3.10/site-packages/moncic/utils/guest.py", line 32, in wrapper
    return f(*args, **kw)
  File "/usr/lib/python3.10/site-packages/moncic/build/arpa.py", line 109, in build
    pkgname = os.path.basename(self.specfile)[:-5]
  File "/usr/lib64/python3.10/posixpath.py", line 142, in basename
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType