meson: Cannot use subprojects: Meson wrap seems to be down

Describe the bug

Wrap db not working. Cannot download projects and cannot use locally.

To Reproduce

This simple line won’t work:

1. Type meson wrap search sdl

Expected behavior

Meson wrap should download packages for subprojects

** Error message in Ubuntu Linux 19.10 (Windows error is the same, but with a bit different output)**

SSL connection failed. Falling back to unencrypted connections.
Traceback (most recent call last):
  File "/usr/lib/python3.7/urllib/request.py", line 1317, in do_open
    encode_chunked=req.has_header('Transfer-encoding'))
  File "/usr/lib/python3.7/http/client.py", line 1252, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1298, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1247, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1026, in _send_output
    self.send(msg)
  File "/usr/lib/python3.7/http/client.py", line 966, in send
    self.connect()
  File "/usr/lib/python3.7/http/client.py", line 938, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib/python3.7/socket.py", line 727, in create_connection
    raise err
  File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/mesonbuild/mesonmain.py", line 129, in run
    return options.run_func(options)
  File "/usr/local/lib/python3.7/dist-packages/mesonbuild/wrap/wraptool.py", line 216, in run
    options.wrap_func(options)
  File "/usr/local/lib/python3.7/dist-packages/mesonbuild/wrap/wraptool.py", line 78, in search
    jd = get_result(API_ROOT + 'query/byname/' + name)
  File "/usr/local/lib/python3.7/dist-packages/mesonbuild/wrap/wraptool.py", line 57, in get_result
    u = open_wrapdburl(urlstring)
  File "/usr/local/lib/python3.7/dist-packages/mesonbuild/wrap/wrap.py", line 72, in open_wrapdburl
    return urllib.request.urlopen(urlstring, timeout=req_timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.7/urllib/request.py", line 525, in open
    response = self._open(req, data)
  File "/usr/lib/python3.7/urllib/request.py", line 543, in _open
    '_open', req)
  File "/usr/lib/python3.7/urllib/request.py", line 503, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.7/urllib/request.py", line 1345, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.7/urllib/request.py", line 1319, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [Errno 113] No route to host>

system parameters

  • Is this a cross build or just a plain native build (for the same computer)? No
  • what operating system (e.g. MacOS Catalina, Windows 10, CentOS 8.0, Ubuntu 18.04, etc.). Any. I tried Ubuntu Linux 19.10, Windows 10 and Mac Catalina
  • what Python version are you using e.g. 3.8.0 3.7.5
  • what meson --version 0.52.1
  • what ninja --version if it’s a Ninja build 1.9.0

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 6
  • Comments: 15 (12 by maintainers)

Commits related to this issue

Most upvoted comments

it’s being worked on

I have a server ready to go, if anyone wants to help set it up let me know.

My suggestion would be to first restore the existing service as it was and then focus on where to go in future.

I would not like to sound unnice, since this is open-source and all voluntary work, but using wrap and having a failure like this for almost one week seems to me like a high bar to adoption.

This impacted my workflow heavily (yes, I was maybe erroneously relying on wrapdb when using Jenkins pipeline).

There are some mitigations for the problem in the comments above, but I think it would be a good idea to have a proposal to make guarantees and/or fallbacks?

It comes to mind for me that if the concern about github hosting of packages is a problem, why not do the following (in the wrap logic in python):

  1. use the wrap service
  2. use github as a fallback transparently (maybe with some kind of switch in meson setup)
  3. being able to use an option to use a subprojects cached data --> this gets copied into your project when the project is setup.

This way we could guarantee 100% availability for the time being with no additional cost, I understand. In all fairness, there are mitigations mentioned in the guide, but the last thing that someone (like me) with a pipeline wants is that it gets difficult to modify things depending on when a service fails or not, and since this can happen, I would propose to have some behavior similar to the one I drafted above implemented for minimal switching costs.

so for example:

meson setup --wrap-fallback-to=https://github.com/wrap-projects/,/my/subprojects-pool/

How would this behave?

  1. redirect wraps and point them to use fallback if mesonwrap db does not work. Security-wise, not sure if this is a good idea without a warning of some kind.
  2. in case it works, we are done.
  3. in case it does not, it continues with the subprojects directory, that has the cached files as found by the normal wrap. The files get uncompressed and everything works as usual.

Feedback and refinements are welcome.

Since mesonbuild will not delete all their repos (thus removing historical, archived data) – right??? – this is perfectly safe and can’t stop working.

github is owned by Microsoft, they can change terms, add adds, whatever… Many reasons why we could some day have to delete github account. Not saying this is likely, but could happen, it wouldn’t be the first time in internet history that big companies screw up services and plainly shut it down.

Ping (I know, everyone hates pings - sorry!). Can we get this fixed? It is also breaking a couple of AUR repos.