upstream patch from opendev - double encoding-decoding

Bug #1965325 reported by Heather Lemon
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-etcd3gw (Ubuntu)
Fix Released
High
Heather Lemon
Bionic
Fix Released
High
Heather Lemon
Focal
Fix Released
High
Heather Lemon
Impish
Fix Released
High
Heather Lemon
Jammy
Fix Released
High
Heather Lemon
Kinetic
Fix Released
High
Heather Lemon

Bug Description

[Impact]
We cannot decode payloads sent to etcd in Python3.
Which means key, value pairs can not longer be accessed.

Both iter_content and the first line of the loop in the
etcd3gw watch code were decoding the chunk received.

Thus, etcd3gw's watch is broken in python3. This commit
fixes it by only decoding the line once.

[Test Plan]
Run unittests, ensure success

In python2, this works fine:
```
$ python2 -c "print(b'hello_world'.decode().decode('utf-8'))"
hello_world
```

In python3, it raises an AttributeError:
```
$ python3 -c "print(b'hello_world'.decode().decode('utf-8'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'
```

[Regression potential]
unit test failure,
Which means key, value pairs can not longer be accessed.

In bionic patch, applying the patch fails the unit tests in Python27.
This is fixed by fixing the imports to:
+-from unittest import mock
++from mock import patch, MagicMock

[Other Info]
Link to upstream patch: https://opendev.org/openstack/etcd3gw/commit/ed899b34e464862525f76fff2377a2cceeb65af7

python-etcd3gw-0.2.5 (focal)

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :
Changed in python-etcd3gw (Ubuntu):
assignee: nobody → Heather Lemon (hypothetical-lemon)
importance: Undecided → High
status: New → In Progress
Changed in python-etcd3gw (Ubuntu Focal):
status: New → In Progress
Changed in python-etcd3gw (Ubuntu Bionic):
status: New → In Progress
Changed in python-etcd3gw (Ubuntu Focal):
assignee: nobody → Heather Lemon (hypothetical-lemon)
Changed in python-etcd3gw (Ubuntu Bionic):
assignee: nobody → Heather Lemon (hypothetical-lemon)
Changed in python-etcd3gw (Ubuntu Focal):
importance: Undecided → High
Changed in python-etcd3gw (Ubuntu Bionic):
importance: Undecided → High
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

focal debdiff upload march 21, 2022.

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

focal debdiff upload march 21, 2022.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "fix-lp1965325-focal.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

I have no idea why it uploaded 2x ><

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

impish debdiff upload march 21, 2022.

Changed in python-etcd3gw (Ubuntu Impish):
importance: Undecided → High
status: New → In Progress
assignee: nobody → Heather Lemon (hypothetical-lemon)
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

jammy patch - march 23, 2022

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

bionic patch march 23, 2022.

There are additional pyc files in the debdiff due to the failing python27 unit tests after applying the upstream patch.

tags: added: verification-needed-bionic verification-needed-focal verification-needed-impish verification-needed-jammy
tags: added: sts-sponsor
description: updated
description: updated
description: updated
tags: added: sts-sponsor-halves
removed: sts-sponsor
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

updated the bionic patch to fix failing Python27 unit tests.

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

ready for sru review

tags: added: verification-needed-kinetic
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

May 03, 2022 kinetic debdiff

Revision history for this message
Dan Streetman (ddstreet) wrote :

uploaded to kinetic, thanks!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-etcd3gw - 0.2.5-1ubuntu2

---------------
python-etcd3gw (0.2.5-1ubuntu2) kinetic; urgency=medium

  * d/p/lp1965325-watch-avoid-double-decoding-in-python3.patch
  - avoid double decoding in python3 (LP: #1965325)

 -- Heather Lemon <email address hidden> Tue, 03 May 2022 15:23:03 +0000

Changed in python-etcd3gw (Ubuntu Kinetic):
status: In Progress → Fix Released
Revision history for this message
Heitor Alves de Siqueira (halves) wrote :

Uploaded to stable releases, thanks!
I had to adjust some minor things (package versions) due to the new kinetic upload, but the patches themselves were good.

Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Heather, or anyone else affected,

Accepted python-etcd3gw into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-etcd3gw/0.2.5-1ubuntu1.22.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in python-etcd3gw (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in python-etcd3gw (Ubuntu Impish):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Heather, or anyone else affected,

Accepted python-etcd3gw into impish-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-etcd3gw/0.2.5-1ubuntu1.21.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-impish to verification-done-impish. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-impish. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in python-etcd3gw (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Heather, or anyone else affected,

Accepted python-etcd3gw into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-etcd3gw/0.2.1-3ubuntu1.20.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Heather, or anyone else affected,

Accepted python-etcd3gw into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/python-etcd3gw/0.2.1-1ubuntu0.18.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in python-etcd3gw (Ubuntu Bionic):
status: In Progress → Fix Committed
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote (last edit ):

### VERIFICATION DONE JAMMY ###

# Previous package
package name: python-etcd3gw
package version: python-etcd3gw_0.2.5-1ubuntu1
series: Jammy

Before enabling proposed
root@etcdjammy:~/etcd-old/python-etcd3gw-0.2.5# python2 -c "print(b'hello_world'.decode().decode('utf-8'))"
hello_world
root@etcdjammy:~/etcd-old/python-etcd3gw-0.2.5# python3 -c "print(b'hello_world'.decode().decode('utf-8'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
root@etcdjammy:~/etcd-old/python-etcd3gw-0.2.5#

All unit tests passed.

#start etcd server
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

The watch is working and responsive to etcdctl commands
the etcdctl watch command is working as intended shown in separate terminal

upgrade to proposed
-----
root@etcdjammy:/etc/apt/sources.list.d# ls
ubuntu-jammy-proposed.list

# enable proposed
deb http://archive.ubuntu.com/ubuntu/ jammy-proposed restricted main multiverse universe

sudo apt-get update
output:
Hit:3 http://archive.ubuntu.com/ubuntu jammy-proposed InRelease

apt-get install python3-etcd3gw/jammy-proposed

# Proposed package Info
package name: python-etcd3gw
package version: python-etcd3gw_0.2.5-1ubuntu1.22.04.1
series: Jammy

pull-lp-source python3-etcd3gw jammy
debuild -us -uc

All unit tests pass.

#start etcd server
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

the etcdctl watch command is working as intended shown in separate terminal

etcdctl --debug cluster-health
Cluster-Endpoints: http://127.0.0.1:2379, http://127.0.0.1:4001
cURL Command: curl -X GET http://127.0.0.1:2379/v2/members
member 8e9e05c52164694d is healthy: got healthy result from http://localhost:2379
cluster is healthy

* Note should you run with etcd enabled and run debuild -us -uc for any python-etcd3gw package from source
There will be failing unit tests
======================================================================
FAIL: etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_client_locks
etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_client_locks
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/root/etcdjammy/python-etcd3gw-0.2.5/etcd3gw/tests/test_etcd3gw.py", line 382, in test_client_locks
    lock = self.client.lock(id='xyz-%s' % time.clock(), ttl=60)
AttributeError: module 'time' has no attribute 'clock'

### VERIFICATION DONE JAMMY ###

Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

I am asking for more detailed reproducer steps there doesn't seem to be any difference in the etcdctl watch function in etcd. I'm not sure how that works with the python-etcd3gw package.

tags: added: verification-done-jammy
removed: verification-needed-jammy
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

### VERIFICATION DONE IMPISH ###

# Previous package
package name: python-etcd3gw
package version: 0.2.5-1ubuntu1
series: Impish

# Before enabling proposed
pull-lp-source python-etcd3gw impish 0.2.5-1ubuntu1

python2 -c "print(b'hello_world'.decode().decode('utf-8'))"
hello_world
python3 -c "print(b'hello_world'.decode().decode('utf-8'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
~/etcd-old/python-etcd3gw-0.2.5#

apt build-dep .
debuild -us -uc
All unit tests passed.

#start etcd server
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

The watch is working and responsive to etcdctl commands
the etcdctl watch command is working as intended shown in seperate terminal

upgrade to proposed
-----
ubuntu-impish-proposed.list

# enable proposed
deb http://archive.ubuntu.com/ubuntu/ impish-proposed restricted main multiverse universe

sudo apt-get update
output:
Hit:3 http://archive.ubuntu.com/ubuntu impish-proposed InRelease

apt-get install python3-etcd3gw/impish-proposed

# Proposed package Info
package name: python-etcd3gw
package version: python-etcd3gw_0.2.5-1ubuntu1.21.10.1
series: impish

pull-lp-source python3-etcd3gw impish
debuild -us -uc

All unit tests pass.

#start etcd server
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

the etcdctl watch command is working as intended shown in seperate terminal

etcdctl --debug cluster-health
Cluster-Endpoints: http://127.0.0.1:2379, http://127.0.0.1:4001
cURL Command: curl -X GET http://127.0.0.1:2379/v2/members
member 8e9e05c52164694d is healthy: got healthy result from http://localhost:2379
cluster is healthy

* Note should you run with etcd enabled and run debuild -us -uc for any python-etcd3gw package from source
There will be failing unit tests
======================================================================
FAIL: etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_client_locks
etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_client_locks
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/root/etcdimpish/python-etcd3gw-0.2.5/etcd3gw/tests/test_etcd3gw.py", line 382, in test_client_locks
    lock = self.client.lock(id='xyz-%s' % time.clock(), ttl=60)
AttributeError: module 'time' has no attribute 'clock'

### VERIFICATION DONE IMPISH ###

tags: added: verification-done-impish
removed: verification-needed-impish
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

### VERIFICATION DONE FOCAL ###

# Previous package
package name: python-etcd3gw
package version: python-etcd3gw focal-updates
series: Focal

# Before enabling proposed
pull-lp-source python-etcd3gw focal-updates

python2 -c "print(b'hello_world'.decode().decode('utf-8'))"
hello_world
python3 -c "print(b'hello_world'.decode().decode('utf-8'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

apt build-dep .
debuild -us -uc
All unit tests passed.

#start etcd server in new shell
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

The watch is working and responsive to etcdctl commands
the etcdctl watch command is working as intended shown in seperate terminal

root@etcdfocal:~# etcdctl watch foo -f
bar
bar
foodbarbar
PrevNode.Value: foodbarbar
foobarbar

upgrade to proposed
-----
ubuntu-focal-proposed.list

# enable proposed
deb http://archive.ubuntu.com/ubuntu/ focal-proposed restricted main multiverse universe

sudo apt-get update
output:
Hit:3 http://archive.ubuntu.com/ubuntu focal-proposed InRelease

apt-get install python3-etcd3gw/focal-proposed

# Proposed package Info
package name: python-etcd3gw
package version: python-etcd3gw_0.2.1-3ubuntu1.20.04.2
series: focal

pull-lp-source python3-etcd3gw focal
debuild -us -uc

All unit tests pass. Building from source passes.

#start etcd server
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

the etcdctl watch command is working as intended shown in seperate terminal

etcdctl --debug cluster-health
Cluster-Endpoints: http://127.0.0.1:2379, http://127.0.0.1:4001
cURL Command: curl -X GET http://127.0.0.1:2379/v2/members
member 8e9e05c52164694d is healthy: got healthy result from http://localhost:2379
cluster is healthy

* Note should you run with etcd enabled and run debuild -us -uc for any python-etcd3gw package from source
There will be failing unit tests
etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_watch_prefix ... Exception in thread update_key_prefix:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/root/new/python-etcd3gw-0.2.1/etcd3gw/tests/test_etcd3gw.py", line 266, in update_key
    update_etcd('0')
  File "/root/new/python-etcd3gw-0.2.1/etcd3gw/tests/test_etcd3gw.py", line 261, in update_etcd
    self.assertEqual([v], out)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 415, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python3/dist-packages/testtools/testcase.py", line 502, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: ['0'] != [b'0']
FAIL

### VERIFICATION DONE FOCAL ###

tags: added: verification-done-focal verification-needed-impish
removed: verification-done-impish verification-needed-focal
tags: added: verification-done-impish
removed: verification-needed-impish
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote (last edit ):

### VERIFICATION DONE BIONIC ###

# Previous package
package name: python-etcd3gw
package version: python-etcd3gw_0.2.1-1ubuntu0.18.04.1
series: Bionic

# Before enabling proposed
pull-lp-source python-etcd3gw bionic-updates

python2 -c "print(b'hello_world'.decode().decode('utf-8'))"
hello_world
root@etcdbionic:~/old/python-etcd3gw-0.2.1# python3 -c "print(b'hello_world'.decode().decode('utf-8'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'

apt build-dep .
debuild -us -uc
All unit tests passed.

#start etcd server in new shell
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

The watch is working and responsive to etcdctl commands
the etcdctl watch command is working as intended shown in seperate terminal

root@etcdfocal:~# etcdctl watch foo -f
bar
bar
foodbarbar
PrevNode.Value: foodbarbar
foobarbar

upgrade to proposed
-----
ubuntu-bionic-proposed.list

# enable proposed
cat <<EOF >/etc/apt/sources.list.d/ubuntu-$(lsb_release -cs)-proposed.list
# Enable Ubuntu proposed archive
deb http://archive.ubuntu.com/ubuntu/ $(lsb_release -cs)-proposed restricted main multiverse universe
EOF

sudo apt-get update
output:
Hit:3 http://archive.ubuntu.com/ubuntu bionic-proposed InRelease

apt-get install python3-etcd3gw/bionic-proposed

# Proposed package Info
package name: python-etcd3gw
package version: python-etcd3gw_0.2.1-1ubuntu0.18.04.2
series: bionic

pull-lp-source python3-etcd3gw bionic-proposed
apt build-dep .
debuild -us -uc

All unit tests pass. Building from source passes.

#start etcd server
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

the etcdctl watch command is working as intended shown in seperate terminal

root@etcdbionic:~/new/python-etcd3gw-0.2.1# etcdctl --debug cluster-health
Cluster-Endpoints: http://127.0.0.1:4001, http://127.0.0.1:2379
cURL Command: curl -X GET http://127.0.0.1:4001/v2/members
cURL Command: curl -X GET http://127.0.0.1:2379/v2/members
member 8e9e05c52164694d is healthy: got healthy result from http://localhost:2379
cluster is healthy

* Note should you run with etcd enabled and run debuild -us -uc for any python-etcd3gw package from source
etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_watch_prefix
etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_watch_prefix ... ok

The watcher from the etcd3gw package hangs indefinitely

### VERIFICATION DONE BIONIC ###

tags: added: verification-done-bionic verification-doneverification-needed-kinetic verification-needed-impish
removed: verification-done-impish verification-needed verification-needed-bionic verification-needed-kinetic
tags: added: verification-done verification-done-impish verification-needed-kinetic
removed: verification-doneverification-needed-kinetic verification-needed-impish
Revision history for this message
Heather Lemon (hypothetical-lemon) wrote :

### VERIFICATION DONE KINETIC ###

# create lxc
lxc launch images:ubuntu/kinetic etcdkinetic

# Previous package
package name: python-etcd3gw
package version: python-etcd3gw_0.2.5-1ubuntu2
series: Kinetic

python2 -c "print(b'hello_world'.decode().decode('utf-8'))"
hello_world
root@etcdkinetic:~/python-etcd3gw-0.2.5# python3 -c "print(b'hello_world'.decode().decode('utf-8'))"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?

apt build-dep .
debuild -us -uc
All unit tests passed.

#start etcd server in new shell
etcd

# open new shell, add a watch on foo

etcdctl watch foo -f

# run etcdctl commands
etcdctl set foo bar
etcdctl update foo foodbarbar
etcdctl rm foo
etcdctl mk foo foobarbar

The watch is working and responsive to etcdctl commands
the etcdctl watch command is working as intended shown in seperate terminal

etcdctl watch foo -f
bar
bar
foodbarbar
PrevNode.Value: foodbarbar
foobarbar

etcdctl --debug cluster-health
Cluster-Endpoints: http://127.0.0.1:4001, http://127.0.0.1:2379
cURL Command: curl -X GET http://127.0.0.1:4001/v2/members
cURL Command: curl -X GET http://127.0.0.1:2379/v2/members
member 8e9e05c52164694d is healthy: got healthy result from http://localhost:2379
cluster is healthy

* Note should you run with etcd enabled and run debuild -us -uc for any python-etcd3gw package from source
======================================================================
FAIL: etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_client_locks
etcd3gw.tests.test_etcd3gw.TestEtcd3Gateway.test_client_locks
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/root/python-etcd3gw-0.2.5/etcd3gw/tests/test_etcd3gw.py", line 351, in test_client_locks
    lock = self.client.lock(id='xyz-%s' % time.clock(), ttl=60)
AttributeError: module 'time' has no attribute 'clock'

### VERIFICATION DONE KINETIC ###

tags: added: verification-done-kinetic
removed: verification-needed-kinetic
Revision history for this message
Brian Murray (brian-murray) wrote :

Looking at this SRU again the testcase, specifically the python print statements, doesn't have anything to do with python-etcd3gw but the added unit test case does test the code change sufficiently. The regression testing in the comments looks good so I'm releasing this update.

Revision history for this message
Brian Murray (brian-murray) wrote :

Also running `debuild` as a part of the verification isn't necessary as the package having built in Launchpad verifies that.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-etcd3gw - 0.2.1-1ubuntu0.18.04.2

---------------
python-etcd3gw (0.2.1-1ubuntu0.18.04.2) bionic; urgency=medium

  * d/p/lp1965325-watch-avoid-double-decoding-in-python3.patch
    - avoid double decoding in python3 (LP: #1965325)

 -- Heather Lemon <email address hidden> Tue, 19 Apr 2022 15:43:07 +0000

Changed in python-etcd3gw (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for python-etcd3gw has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-etcd3gw - 0.2.1-3ubuntu1.20.04.2

---------------
python-etcd3gw (0.2.1-3ubuntu1.20.04.2) focal; urgency=medium

  * d/p/lp1965325-watch-avoid-double-decoding-in-python3.patch
    - avoid double decoding in python3 (LP: #1965325)

 -- Heather Lemon <email address hidden> Mon, 21 Mar 2022 14:15:43 +0000

Changed in python-etcd3gw (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-etcd3gw - 0.2.5-1ubuntu1.21.10.1

---------------
python-etcd3gw (0.2.5-1ubuntu1.21.10.1) impish; urgency=medium

  * d/p/lp1965325-watch-avoid-double-decoding-in-python3.patch
    - avoid double decoding in python3 (LP: #1965325)

 -- Heather Lemon <email address hidden> Mon, 21 Mar 2022 16:48:57 +0000

Changed in python-etcd3gw (Ubuntu Impish):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-etcd3gw - 0.2.5-1ubuntu1.22.04.1

---------------
python-etcd3gw (0.2.5-1ubuntu1.22.04.1) jammy; urgency=medium

  * d/p/lp1965325-watch-avoid-double-decoding-in-python3.patch
    - avoid double decoding in python3 (LP: #1965325)

 -- Heather Lemon <email address hidden> Wed, 23 Mar 2022 14:21:07 +0000

Changed in python-etcd3gw (Ubuntu Jammy):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.