Page MenuHomePhabricator

Regression in webservice 0.59 due to deprecation change
Closed, ResolvedPublic

Description

toollabs-webservice version 0.59 is only deployed to toolsbeta right now, but it fails when run with this traceback:

toolsbeta.test@toolsbeta-sgebastion-04:~$ webservice stop
Traceback (most recent call last):
  File "/usr/local/bin/webservice", line 296, in <module>
    if job.is_deprecated(args.type):
  File "/usr/lib/python2.7/dist-packages/toolforge/webservice/backends/backend.py", line 72, in is_deprecated
    return type(self).CONFIG[type].get("deprecated", False)
TypeError: 'str' object is not callable

This would be due to something in commit 01c276f "Deprecate Jessie based Kubernetes types"

This should be fixed before any further deployment or merges.

Event Timeline

Bstorm triaged this task as High priority.Feb 7 2020, 10:00 PM
Bstorm created this task.

Change 570957 had a related patch set uploaded (by BryanDavis; owner: Bryan Davis):
[operations/software/tools-webservice@master] Fix local 'type' variable shadowing global type() function

https://gerrit.wikimedia.org/r/570957

Change 570957 merged by jenkins-bot:
[operations/software/tools-webservice@master] Fix local 'type' variable shadowing global type() function

https://gerrit.wikimedia.org/r/570957

Mentioned in SAL (#wikimedia-cloud) [2020-02-07T23:07:48Z] <bstorm_> upgraded toollabs-webservice for stetch toolsbeta to 0.60 T244611

Likely totally unrelated to this particular error, since the upgrades I'm now seeing this:

Starting webservice...............toolsbeta.test@toolsbeta-sgebastion-04:~$

A newline has gone missing...

Likely totally unrelated to this particular error, since the upgrades I'm now seeing this:

Starting webservice...............toolsbeta.test@toolsbeta-sgebastion-04:~$

A newline has gone missing...

Ugh. I thought I fixed that, but apparently did not. That is from my stderr changes I think.

It all looks good now!

toolsbeta.test@toolsbeta-sgebastion-04:~$ webservice migrate
/usr/lib/python2.7/dist-packages/urllib3/connection.py:337: SubjectAltNameWarning: Certificate for toolsbeta-k8s-master-01.toolsbeta.eqiad.wmflabs has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SubjectAltNameWarning
Stopping webservice on legacy Kubernetes cluster
Switched to context "toolforge".
Starting webservice on 2020 Kubernetes cluster...............
toolsbeta.test@toolsbeta-sgebastion-04:~$ curl -L test.toolsbeta.wmflabs.org -H "Host:test.toolforge.org"
Hello World, from Toolsbeta!
toolsbeta.test@toolsbeta-sgebastion-04:~$ curl http://toolsbeta.wmflabs.org/test/
Hello World, from Toolsbeta!
toolsbeta.test@toolsbeta-sgebastion-04:~$ /usr/bin/kubectl get ingress
NAME             HOSTS                   ADDRESS   PORTS   AGE
test-legacy      toolsbeta.wmflabs.org             80      114s
test-subdomain   test.toolforge.org                80      114s
toolsbeta.test@toolsbeta-sgebastion-04:~$
Bstorm claimed this task.