OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
830 stars 302 forks source link

[Bug] g.extension: testsuite/doctest.sh fails #3341

Open neteler opened 9 months ago

neteler commented 9 months ago

Describe the bug

The PR #3340 shows a failure on macOS (interestingly not elsewhere in the CI):

The CI run: https://github.com/OSGeo/grass/actions/runs/7443389462/job/20248214350?pr=3340

shows

Running ./scripts/g.extension/testsuite/doctest.sh...
========================================================================
+ set -e
+ set -x
+ g.extension --doctest
========================================================================
FAILED ./scripts/g.extension/testsuite/doctest.sh

To Reproduce Steps to reproduce the behavior:

Trying it locally (Fedora 38) also shows the error:

cd scripts/g.extension/testsuite/
grass8.dev ~/grassdata/nc_spm_08_grass7/user1/

GRASS nc_spm_08_grass7/user1:testsuite > bash -x doctest.sh
+ '[' -z '' ']'
+ case "$-" in
+ __lmod_vx=x
+ '[' -n x ']'
+ set +x
Shell debugging temporarily silenced: export LMOD_SH_DBG_ON=1 for this output (/usr/share/lmod/lmod/init/bash)
Shell debugging restarted
+ unset __lmod_vx
+ set -e
+ set -x
+ g.extension --doctest
**********************************************************************
File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/scripts/g.extension", line 2647, in __main__.resolve_source_code
Failed example:
    resolve_source_code('https://svn.osgeo.org/grass/grass-addons/grass7')
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib64/python3.11/doctest.py", line 1353, in __run
        exec(compile(example.source, filename, "single",
      File "<doctest __main__.resolve_source_code[1]>", line 1, in <module>
        resolve_source_code('https://svn.osgeo.org/grass/grass-addons/grass7')
      File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/scripts/g.extension", line 2701, in resolve_source_code
        validate_url(url)
      File "/home/mneteler/software/grass_main/dist.x86_64-pc-linux-gnu/scripts/g.extension", line 2620, in validate_url
        _("Cannot open URL <{url}>: {error}").format(url=url, error=message)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    TypeError: 'NoneType' object is not callable
**********************************************************************
1 items had failures:
   1 of   2 in __main__.resolve_source_code
***Test Failed*** 1 failures.

The svn URL exists, not sure what's wrong.

Expected behavior

The doctest should succeed.

System description (please complete the following information):

g.version -rge
version=8.4.0dev
date=2023
revision=c670734103
build_date=2024-01-08
build_platform=x86_64-pc-linux-gnu
build_off_t_size=8
libgis_revision=53c362dbd1
libgis_date=2024-01-05T17:18:52+00:00
proj=9.1.1
gdal=3.6.4
geos=3.11.1
sqlite=3.40.1

python3 -c "import sys, wx; print(sys.version); print(wx.version())"
3.11.7 (main, Dec 18 2023, 00:00:00) [GCC 13.2.1 20231011 (Red Hat 13.2.1-4)]
4.2.0 gtk3 (phoenix) wxWidgets 3.2.1
echoix commented 9 months ago

It's weird, since it doesn't seem to be a GitHub SVN url, that had brownouts before and are closed since today: https://github.blog/changelog/2023-11-06-subversion-brownouts/

As a reminder, Subversion support will be permanently removed on January 8, 2024.