~hyask/autopkgtest-cloud:skia/default_push-amqp_dry-run

Last commit made on 2024-04-11
Get this branch:
git clone -b skia/default_push-amqp_dry-run https://git.launchpad.net/~hyask/autopkgtest-cloud
Only Skia can upload to this branch. If you are Skia please log in for upload directions.

Branch merges

Branch information

Name:
skia/default_push-amqp_dry-run
Repository:
lp:~hyask/autopkgtest-cloud

Recent commits

48d4619... by Skia

feat: pull/push-amqp: improve self-documentation

Succeeded
[SUCCEEDED] pre_commit:0 (build)
[SUCCEEDED] unit_tests:0 (build)
[SUCCEEDED] build_charms:0 (build)
13 of 3 results
ea81781... by Skia

fix: push-amqp: default to dry-run to avoid mistakes

70cab7e... by Skia

fix: install vim config on every charm upgrade

This is because the vimrc content is not part of the config, thus we
cannot detect when it changes. It may not be ideal, but it's fairly
quick, and will do its job for now.

d20f6b4... by Skia

Merge branch 'skia/fix_push_amqp'

https://code.launchpad.net/~hyask/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/463919

bbc5b2a... by Skia

Merge branch 'skia/vimrc'

https://code.launchpad.net/~hyask/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/463822

1ddf71a... by Skia

fix: cloud: push-amqp: evaluate the messages to convert them from bytes to str

`pull-amqp` outputs messages as `bytes`, meaning the usual input for
`push-amqp` will look like this:
```
b'apt\n{"triggers": ["base-passwd/3.6.3build1"], "submit-time": "2024-04-08 18:38:17"}'
b'binutils\n{"triggers": ["bison/2:3.8.2+dfsg-1build2"], "submit-time": "2024-04-08 18:38:42"}'
```
Those lines will correctly be read as string, but will still contain the
`b'`, the `\n` (as two chars `\` and `n`, not a single `\n`), and the
trailing `'`, plus some other possible bytes escaping, and will thus be
pushed like this to the queue, which is wrong.

This patch adds an heuristic (detecting the starting `b'` and trailing
`'`) to evaluate the string as bytes and then decode it again.

As our messages contain the `\n` character, having an interface between
`pull-amqp` and `push-amqp` that relies on lines too maybe is not such
a great idea, since we need to keep printing the escaped bytes in
`pull-amqp`.
We may want to change this in the future to work with something like
`\0`, or even better: change the message format to be easier to handle.

Succeeded
[SUCCEEDED] pre_commit:0 (build)
[SUCCEEDED] unit_tests:0 (build)
[SUCCEEDED] build_charms:0 (build)
13 of 3 results
d5bbd72... by Tim Andersson

Merge remote-tracking branch 'andersson123/lxd-cleanup-srv-files'

1c35b9a... by Tim Andersson

Merge remote-tracking branch 'andersson123/amend-inserts-paramstyle-named'

4f27e7e... by Tim Andersson

autopkgtest-cloud-worker: fix: remove old service files for lxd units

Whenever we introduce a new lxd remote and remove an old one, the
systemd services for that specific remote are still leftover. This MP
fixes that, and should make debugging armhf problems a bit easier.

a5f2474... by Skia

Merge branch 'skia/really_clean_workdir'

https://code.launchpad.net/~hyask/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/463993