Merge ~renanrodrigo/ubuntu/+source/ubuntu-advantage-tools:upload-30-mantic into ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel

Proposed by Renan Rodrigo
Status: Merged
Merge reported by: Andreas Hasenack
Merged at revision: af525f1830824cdf8132346a0f166f51fb8c0f7f
Proposed branch: ~renanrodrigo/ubuntu/+source/ubuntu-advantage-tools:upload-30-mantic
Merge into: ubuntu/+source/ubuntu-advantage-tools:ubuntu/devel
Diff against target: 36851 lines (+18318/-4441)
220 files modified
.github/ISSUE_TEMPLATE/bug_report.md (+35/-0)
.github/ISSUE_TEMPLATE/feature_request.md (+23/-0)
.github/ISSUE_TEMPLATE/question.md (+18/-0)
.github/workflows/ci-base.yaml (+6/-2)
apport/source_ubuntu-advantage-tools.py (+1/-4)
apt-hook/json-hook-main.cc (+4/-0)
apt-hook/json-hook.cc (+285/-77)
apt-hook/json-hook.hh (+3/-3)
debian/changelog (+72/-0)
debian/control (+9/-0)
debian/po/Makefile (+10/-0)
debian/po/POTFILES.in (+2/-0)
debian/po/pt_BR.po (+3428/-0)
debian/po/ubuntu-pro.pot (+3056/-0)
debian/rules (+1/-0)
debian/tests/control (+1/-1)
debian/ubuntu-advantage-tools.maintscript (+1/-0)
debian/ubuntu-pro-client-l10n.install (+1/-0)
dev/null (+0/-10)
features/airgapped.feature (+3/-3)
features/anbox.feature (+8/-10)
features/api.feature (+20/-18)
features/api_fix_execute.feature (+273/-0)
features/api_fix_plan.feature (+42/-26)
features/api_magic_attach.feature (+1/-1)
features/api_packages.feature (+1/-1)
features/api_unattended_upgrades.feature (+6/-0)
features/apt_messages.feature (+25/-25)
features/attach_invalidtoken.feature (+3/-3)
features/attach_validtoken.feature (+10/-7)
features/attached_commands.feature (+435/-103)
features/attached_enable.feature (+78/-65)
features/attached_status.feature (+18/-12)
features/cloud.py (+11/-2)
features/cloud_pro_clone.feature (+1/-0)
features/collect_logs.feature (+4/-12)
features/daemon.feature (+37/-36)
features/docker.feature (+6/-6)
features/enable_fips_cloud.feature (+55/-4)
features/enable_fips_container.feature (+4/-3)
features/enable_fips_pro.feature (+9/-9)
features/enable_fips_vm.feature (+70/-13)
features/environment.py (+7/-0)
features/fix.feature (+15/-9)
features/i18n.feature (+84/-4)
features/landscape.feature (+5/-11)
features/livepatch.feature (+61/-0)
features/motd_messages.feature (+12/-17)
features/proxy_config.feature (+1/-1)
features/realtime_kernel.feature (+13/-10)
features/retry_auto_attach.feature (+2/-2)
features/schemas/cve_fix_execute.json (+73/-0)
features/schemas/cve_fix_plan.json (+12/-0)
features/schemas/ua_status.json (+0/-6)
features/schemas/usn_fix_execute.json (+89/-0)
features/schemas/usn_fix_plan.json (+28/-2)
features/steps/machines.py (+11/-0)
features/steps/packages.py (+19/-4)
features/steps/ubuntu_advantage_tools.py (+11/-4)
features/ubuntu_pro.feature (+72/-63)
features/ubuntu_pro_fips.feature (+59/-55)
features/ubuntu_upgrade.feature (+3/-3)
features/ubuntu_upgrade_unattached.feature (+2/-2)
features/unattached_commands.feature (+20/-21)
features/unattached_status.feature (+69/-43)
features/util.py (+77/-5)
integration-requirements.txt (+1/-1)
lib/daemon.py (+10/-39)
lib/migrate_user_config.py (+0/-2)
lib/patch_status_json.py (+4/-6)
lib/reboot_cmds.py (+5/-11)
lib/timer.py (+17/-28)
lib/upgrade_lts_contract.py (+1/-1)
preferences.d/ubuntu-pro-esm-apps (+11/-0)
preferences.d/ubuntu-pro-esm-infra (+10/-0)
setup.py (+2/-1)
sru/release-30/test-status-output-when-translated.sh (+94/-0)
systemd/ubuntu-advantage.service (+0/-2)
test-requirements.txt (+5/-0)
tools/README.md (+0/-1)
tools/create-lp-release-branches.sh (+1/-1)
tools/test-in-lxd.sh (+6/-3)
tools/test-in-multipass.sh (+10/-5)
tools/update-pos.sh (+9/-0)
tox.ini (+4/-35)
uaclient-devel.conf (+0/-2)
uaclient/actions.py (+10/-45)
uaclient/api/api.py (+18/-47)
uaclient/api/errors.py (+27/-15)
uaclient/api/exceptions.py (+5/-9)
uaclient/api/tests/test_api.py (+44/-46)
uaclient/api/tests/test_api_u_pro_attach_auto_full_auto_attach_v1.py (+24/-14)
uaclient/api/tests/test_api_u_pro_attach_auto_should_auto_attach.py (+4/-4)
uaclient/api/tests/test_api_u_pro_packages_updates.py (+1/-1)
uaclient/api/tests/test_api_u_pro_security_fix_execute.py (+345/-0)
uaclient/api/tests/test_api_u_pro_version.py (+5/-5)
uaclient/api/tests/test_api_u_unattended_upgrades_status_v1.py (+28/-0)
uaclient/api/tests/test_fix.py (+356/-277)
uaclient/api/u/pro/attach/auto/full_auto_attach/v1.py (+4/-3)
uaclient/api/u/pro/packages/updates/v1.py (+2/-2)
uaclient/api/u/pro/security/fix/__init__.py (+302/-94)
uaclient/api/u/pro/security/fix/_common/__init__.py (+47/-0)
uaclient/api/u/pro/security/fix/_common/execute/__init__.py (+0/-0)
uaclient/api/u/pro/security/fix/_common/execute/v1.py (+273/-0)
uaclient/api/u/pro/security/fix/cve/execute/__init__.py (+0/-0)
uaclient/api/u/pro/security/fix/cve/execute/v1.py (+77/-0)
uaclient/api/u/pro/security/fix/cve/plan/v1.py (+2/-23)
uaclient/api/u/pro/security/fix/usn/execute/__init__.py (+0/-0)
uaclient/api/u/pro/security/fix/usn/execute/v1.py (+108/-0)
uaclient/api/u/pro/security/fix/usn/plan/v1.py (+2/-23)
uaclient/api/u/pro/version/v1.py (+3/-2)
uaclient/api/u/unattended_upgrades/status/v1.py (+22/-3)
uaclient/apt.py (+292/-111)
uaclient/apt_news.py (+8/-5)
uaclient/cli/__init__.py (+202/-473)
uaclient/cli/constants.py (+8/-0)
uaclient/cli/fix.py (+921/-0)
uaclient/cli/tests/test_cli.py (+88/-92)
uaclient/cli/tests/test_cli_api.py (+4/-3)
uaclient/cli/tests/test_cli_attach.py (+41/-33)
uaclient/cli/tests/test_cli_auto_attach.py (+9/-8)
uaclient/cli/tests/test_cli_collect_logs.py (+16/-9)
uaclient/cli/tests/test_cli_config.py (+4/-3)
uaclient/cli/tests/test_cli_config_set.py (+6/-4)
uaclient/cli/tests/test_cli_config_unset.py (+1/-0)
uaclient/cli/tests/test_cli_detach.py (+9/-4)
uaclient/cli/tests/test_cli_disable.py (+72/-17)
uaclient/cli/tests/test_cli_enable.py (+77/-29)
uaclient/cli/tests/test_cli_fix.py (+10/-13)
uaclient/cli/tests/test_cli_refresh.py (+6/-6)
uaclient/cli/tests/test_cli_security_status.py (+2/-1)
uaclient/cli/tests/test_cli_status.py (+53/-42)
uaclient/clouds/aws.py (+12/-11)
uaclient/clouds/azure.py (+1/-1)
uaclient/clouds/gcp.py (+6/-9)
uaclient/clouds/identity.py (+10/-6)
uaclient/clouds/tests/test_aws.py (+7/-7)
uaclient/clouds/tests/test_azure.py (+3/-3)
uaclient/clouds/tests/test_gcp.py (+5/-9)
uaclient/clouds/tests/test_identity.py (+1/-1)
uaclient/config.py (+25/-36)
uaclient/conftest.py (+14/-14)
uaclient/contract.py (+67/-70)
uaclient/daemon/__init__.py (+2/-2)
uaclient/daemon/poll_for_pro_license.py (+2/-3)
uaclient/daemon/retry_auto_attach.py (+10/-6)
uaclient/daemon/tests/test_daemon.py (+2/-2)
uaclient/daemon/tests/test_poll_for_pro_license.py (+7/-6)
uaclient/daemon/tests/test_retry_auto_attach.py (+13/-7)
uaclient/data_types.py (+45/-41)
uaclient/defaults.py (+3/-15)
uaclient/entitlements/__init__.py (+7/-6)
uaclient/entitlements/anbox.py (+6/-4)
uaclient/entitlements/base.py (+96/-45)
uaclient/entitlements/cc.py (+8/-12)
uaclient/entitlements/cis.py (+12/-22)
uaclient/entitlements/entitlement_status.py (+2/-0)
uaclient/entitlements/esm.py (+8/-6)
uaclient/entitlements/fips.py (+99/-29)
uaclient/entitlements/landscape.py (+20/-18)
uaclient/entitlements/livepatch.py (+47/-17)
uaclient/entitlements/realtime.py (+21/-15)
uaclient/entitlements/repo.py (+215/-44)
uaclient/entitlements/ros.py (+10/-5)
uaclient/entitlements/tests/conftest.py (+1/-0)
uaclient/entitlements/tests/test_base.py (+45/-12)
uaclient/entitlements/tests/test_cc.py (+7/-9)
uaclient/entitlements/tests/test_cis.py (+10/-10)
uaclient/entitlements/tests/test_entitlements.py (+3/-1)
uaclient/entitlements/tests/test_fips.py (+58/-30)
uaclient/entitlements/tests/test_livepatch.py (+113/-13)
uaclient/entitlements/tests/test_repo.py (+311/-20)
uaclient/exceptions.py (+383/-374)
uaclient/files/data_types.py (+2/-2)
uaclient/files/files.py (+18/-28)
uaclient/files/notices.py (+15/-13)
uaclient/files/tests/test_notices.py (+4/-2)
uaclient/gpg.py (+2/-4)
uaclient/http/__init__.py (+20/-23)
uaclient/http/tests/test_http.py (+7/-11)
uaclient/livepatch.py (+18/-30)
uaclient/lock.py (+2/-4)
uaclient/log.py (+9/-0)
uaclient/messages/__init__.py (+2524/-0)
uaclient/messages/urls.py (+48/-0)
uaclient/security.py (+128/-119)
uaclient/security_status.py (+98/-106)
uaclient/snap.py (+26/-16)
uaclient/status.py (+102/-60)
uaclient/system.py (+57/-27)
uaclient/testing/fakes.py (+5/-1)
uaclient/tests/test_actions.py (+10/-75)
uaclient/tests/test_apt.py (+343/-67)
uaclient/tests/test_apt_news.py (+4/-4)
uaclient/tests/test_config.py (+11/-58)
uaclient/tests/test_contract.py (+68/-49)
uaclient/tests/test_data_types.py (+112/-51)
uaclient/tests/test_esm_cache.py (+6/-6)
uaclient/tests/test_gpg.py (+2/-2)
uaclient/tests/test_lib_auto_attach.py (+1/-1)
uaclient/tests/test_lock.py (+14/-6)
uaclient/tests/test_reboot_cmds.py (+10/-4)
uaclient/tests/test_security.py (+40/-44)
uaclient/tests/test_security_status.py (+48/-77)
uaclient/tests/test_snap.py (+44/-1)
uaclient/tests/test_status.py (+3/-3)
uaclient/tests/test_system.py (+106/-8)
uaclient/tests/test_ua_timer.py (+3/-1)
uaclient/tests/test_upgrade_lts_contract.py (+13/-19)
uaclient/tests/test_util.py (+4/-92)
uaclient/tests/test_version.py (+16/-22)
uaclient/timer/__init__.py (+2/-2)
uaclient/timer/tests/test_update_messaging.py (+18/-14)
uaclient/timer/update_contract_info.py (+6/-6)
uaclient/timer/update_messaging.py (+12/-7)
uaclient/upgrade_lts_contract.py (+21/-15)
uaclient/util.py (+31/-70)
uaclient/version.py (+8/-12)
uaclient/yaml.py (+9/-6)
ubuntu-advantage.1 (+2/-10)
Reviewer Review Type Date Requested Status
Bryce Harrington (community) Approve
Andreas Hasenack Approve
Canonical Server Reporter Pending
Review via email: mp+452846@code.staging.launchpad.net

Description of the change

This is the release of ubuntu-advantage-tools version 30.

See the CHANGELOG and related bug for more information.

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :
Download full text (3.7 KiB)

It is a bit confusing that only 10 commits are listed on this MP, but there seem to be a lot more referenced in d/changelog, and indeed `git log pkg/import/29.. | grep ^commit | wc -l` shows 185 commits?

Below is review on the 10 from this MP, the other 175 will take me awhile assuming they also need reviewed. Nothing major (these 10 are pretty straightforward) but a couple questions/fixups:

### Commit-by-Commit Review ###

15f4506... by Renan Rodrigo on 2023-10-03
    messages: add gettext to new purge messages

+1 Simple refactor to add gettext() calls

------------------------------------------------------------------------
573c3ec... by Renan Rodrigo on 2023-10-03
    disable: messages to warn that --purge is experimental

- Changelog entry should be "messages that warn that --purge"

- For the warning itself, I'd suggest a slightly different wording:

  +PURGE_EXPERIMENTAL = t.gettext(
  + "(The --purge flag is still experimental - use with caution)"
  +)

------------------------------------------------------------------------
629fc4d... by Renan Rodrigo on 2023-10-03
    po: run tools/update-pos.sh

+1 (Just translations)

------------------------------------------------------------------------
fa7505d... by Renan Rodrigo 5 hours ago
    fix: reposition message to avoid po conflicts

+1 (Trivial refactor, no actual code change)

------------------------------------------------------------------------
9e5cfc2... by Renan Rodrigo 16 hours ago
    chore: archive release-29 sru scripts
    also create a folder for release-30 and let the esm pinning test rest
    there

+1 (Just directory housekeeping)

------------------------------------------------------------------------
9bb2be3... by Renan Rodrigo 20 hours ago
    esm: pin repositories to a higher priority using static files
    This reverts commit 1dfcade40602ff820017bdf6b260b066e77f740d.

? I grepped the codebase for '500' for any other pinning instances.
   The following files seem to all be tests, and may not be app or infra
   related, so I'm guessing these are not affected, but can you confirm?

  ./features/anbox.feature
  ./features/attached_enable.feature
  ./features/realtime_kernel.feature
  ./uaclient/tests/test_apt.py
  ./uaclient/entitlements/tests/test_repo.py
  ./apt-hook/json-hook.test.cc

------------------------------------------------------------------------
a8e1aca... by Renan Rodrigo 20 hours ago
    esm: add comment to preference files
    This reverts commit 71aab656ea44aa1421fa59c8fec3d6935d9ec6c7.

+1 Comments in a preferences config file, entirely replaced in next
    commit...

------------------------------------------------------------------------
bef8bad... by Renan Rodrigo 20 hours ago
    Update esm pin file comment
    This reverts commit a8d66f68088c267cdf7a6f5a114547f4a3360fc5.

+1 Comments in a preferences config file, so safe. No errors in
    grammar, and the changes read ok.

I'm curious though why this isn't squashed with a8e1aca?

------------------------------------------------------------------------
a334bcf... by Lucas Albuquerque Medeiros de Moura 4 hours ago
    fips-preview: add gpg key for the service
    To enable ...

Read more...

review: Needs Information
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote (last edit ):

You are correct, 154 commits should be part of the MR... I wonder what did happen here - will try to fix it up

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Nothing to fix it seems \_("/)_/

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for doublechecking, I suppose Launchpad is the thing needing fixed in this case...

Revision history for this message
Bryce Harrington (bryce) wrote :

I've performed the required commit-by-commit review, in particular focusing on the types of changes identified by https://wiki.ubuntu.com/UbuntuAdvantageToolsUpdates - apt, systemd, config files, etc. Due to the number of commits in this release, the full report is pretty long, so rather than paste it into Launchpad I put it in Ubuntu's pastebin, which hopefully will be easier to read, copy, and/or download.

    https://paste.ubuntu.com/p/fQYm9QfGWm/

Hopefully this works ok for you. I have flagged all the actual notes with 'FIXME' tags for your search convenience, though as you'll see in some cases it's just questions or reminders on things to do or check later.

There were >180 commits in the branch to be reviewed. I reduced this list somewhat by using this command:

    last_release="29.4"

    # Exclude commits that *only* touch translations, tests, gpg keys, and
    # team internal tooling.
    git log pkg/import/${last_release}.. -- . \
        ':(exclude)debian/po' \
        ':(exclude)features' \
        ':(exclude)keyrings' \
        ':(exclude)tools' \
        ':(exclude)uaclient/cli/tests' \
        ':(exclude)uaclient/util.py'

I understand Robie used a similar approach, and he may have a more extensive set of excludes than me. This would be a good thing to add to the review docs for future reviewers. In my case, for R30.0 this reduced the number of commits by only 30. Despite that, I think this could be a good approach to help narrow the scope of work for review; as it was it ate the better part of 2 days just to glance through the 150 commits to find the ones needing deeper review. Being able to further filter the list of items requiring our review would be super helpful.

review: Needs Fixing
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Thanks again for the review, Bryce.
I will be working on the FIXME items, and posting answers here when that's the case.

There is a new (small) set of commits to add to this branch, most tests and fixes for the purge things. I will add everything before asking for a new review.

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Added 9 new commits adressing test changes and fixes related to those tests.

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote (last edit ):

Added 14 commits addressing Bryce's 'Needs Fixing' review.
Besides that, I have a reply to the pastebin with some answers and excuses for those changes added here:

https://paste.ubuntu.com/p/mjgXyZZnw5/

Revision history for this message
Bryce Harrington (bryce) wrote :

5f0434a6b57825464591e6892c4a4ba7b0c538f2
  LGTM, +1

f126a05dcfaf3fb39526675be07edae2f52a0063
  LGTM, +1

67f8d1c4f8219d816b70b2847ab2f26a0b86a68b
  "test(aws): include deprecated aws pro fips images (CPC-3030)"
  Verified that pycloudlib 5.6.0 updates the api to add the include_deprecated param
  https://github.com/canonical/pycloudlib/releases/tag/1!5.6.0
  https://github.com/canonical/pycloudlib/pull/320/commits/3b13a3ace4871ea5fc5c702e65a3ec57f9cc1965

I don't fully understand the original problem that this is solving, or if there might be any side effects from the fix. The original bug report is terse, is there another discussion somewhere that could be referenced?

Moreover, if I understand the pycloudlib commit correctly the include_deprecated parameter only applies to the EC2 Cloud Class and classes derived from it, but here in uatools it's being used in uatool's Cloud base class which I assume is intended to work not just with EC2 clouds but others as well? Is that true, or can you help clear my misunderstanding?

Test case coverage would be nice to have as well, if at all possible...

bd8089d7f06661bf1fb457881778f2eedef71493
  "apt: change algorithm to look for valid versions"

This looks like a good refactoring, particularly in that it eliminates the extra looping for exclude_origin.

The first paragraph of the commit message is a bit confusing, and I don't quite understand the condition that leads to the issue, however shouldn't whatever that was also have a corresponding check added in the test cases?

I notice that one of the changes is an added check for `file.component != "now"`, which may be a bit obscure (I didn't know it offhand, at least), so may be worth a comment in either the code or commit message. I don't know if there is an Apt reference doc explaining it, but https://askubuntu.com/questions/892572/what-does-a-component-or-archive-now-mean-in-the-apt-python-api has a sensible answer.

4a73dd2a4fe4f56c029ccb0b2f148bdcca2bf9a3
  LGTM, +1

0e5d48afbbc2bb3aca1b405258818e8c2c8efbbc
  LGTM, +1

  The commit messages Real-time kernel as an exception but I don't see anything about that in the code; hopefully that doesn't indicate anything is missing?

fdc278965eb7980fbfd9f5ca27d7ee130b4b1568
  LGTM, +1
  Great to see the extra tests for the kernel purge case!

7dde9c533c07fba7a896c974ef85e876cc7ef032
  po update, +1

ee1e66de621ad98814f6e4be741e38fa67196fff
  tests ftw, +1

review: Needs Information
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

#: ../../uaclient/messages/__init__.py:697
#, python-brace-format
msgid ""
"This machine is receiving security patching for Ubuntu Main/Restricted\n"
"repository until {date}."
msgstr ""
"Esta máquina está recebendo patches de segurança para o repositório\n"
"Main/Restricted do Ubuntu até"

The pt_BR translation is missing the "{date}." variable.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

There are a few fuzzy pt_BR translations still:
$ grep fuzzy -r debian/po/ | grep -v \\.pot
debian/po/pt_BR.po:#, fuzzy
debian/po/pt_BR.po:#, fuzzy
debian/po/pt_BR.po:#, fuzzy, python-brace-format
debian/po/pt_BR.po:#, fuzzy
debian/po/pt_BR.po:#, fuzzy, python-brace-format
debian/po/pt_BR.po:#, fuzzy, python-brace-format
debian/po/pt_BR.po:#, fuzzy, python-brace-format
debian/po/pt_BR.po:#, fuzzy

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

We talked about this already, but just so we don't forget (as there won't be bionic-specific MPs here in LP):

bionic doesn't support systemd's type exec:

/lib/systemd/system/ubuntu-advantage.service:27: Failed to parse service type, ignoring: exec

review: Needs Fixing
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I filed https://github.com/canonical/ubuntu-pro-client/issues/2805 about an issue with `pro disable fips --purge`. I know --purge is marked as experimental, so I'll leave it up to you to decide how to handle it.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Also a reminder about https://github.com/canonical/ubuntu-pro-client/pull/2804, if you would like to have that in the release too.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

misaligned columns in translated status output: https://github.com/canonical/ubuntu-pro-client/issues/2806

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

unattached status output has untranslated pt_BR strings:

# pro status
SERVIÇO DISPONÍVEL DESCRIÇÃO
anbox-cloud yes Android escalável na nuvem
esm-apps yes Expanded Security Maintenance for Applications
esm-infra yes Expanded Security Maintenance for Infrastructure
livepatch yes Canonical Livepatch service
realtime-kernel yes Ubuntu kernel with PREEMPT_RT patches integrated
usg yes Security compliance and audit tools

That "yes" needs to be handled carefully: there are places where it must not be translated I heard, like machine-parsable output (json).

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

There seem to be different encodings at play in the `pro status --format` output, at least for json and yaml.

json:
"execution_details": "Nenhuma opera\u00e7\u00e3o Ubuntu Pro est\u00e1 sendo executada"

yaml:
execution_details: "Nenhuma opera\xE7\xE3o Ubuntu Pro est\xE1 sendo executada"

Unsure if this is a problem. I quickly imported those into python using json and yaml, and nothing crashed at least.

Revision history for this message
Grant Orndorff (orndorffgrant) wrote :

On the unicode character encoding differences: we use python stdlib json, and pyyaml without any customization, so all should be fine. And I went ahead and checked the JSON and YAML specs and this is the correct encoding for each, respectively.

JSON requires the "\u1234" encoding even for codepoints < 0xFF. See "9 String" here: https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf

YAML allows different encoding for 8-bit, 16-bit and 32-bit codepoints. The 8-bit encoding looks like "\x12" and that is what is being used here. See "rule-ns-esc-8-bit" here: https://yaml.org/spec/1.2.2/#escaped-characters

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

@bryce:

> 67f8d1c4f8219d816b70b2847ab2f26a0b86a68b
> I don't fully understand the original problem that this is
> solving, or if there might be any side effects from the
> fix. The original bug report is terse, is there another
> discussion somewhere that could be referenced?

The referenced Jira ticket is the best we have
https://warthogs.atlassian.net/browse/CPC-3030

There should be no side effects: when testing, we include deprecated images in the search for the daily image.
That is pretty much it.
It happens because AWS is (incorrectly) setting some valid images as deprecated, and it was breaking us.
CPC is now aware and monitoring those things with AWS.

> Moreover, if I understand the pycloudlib commit correctly
> the include_deprecated parameter only applies to the EC2
> Cloud Class and classes derived from it, but here in
> uatools it's being used in uatool's Cloud base class which
> I assume is intended to work not just with EC2 clouds but
> others as well? Is that true, or can you help clear my
> misunderstanding?
Yes, this is currently only implemented on EC2, and could be implemented in the respective module... However, we only use this for our own test suite - we may change it if something breaks but it is unlikely.

> Test case coverage would be nice to have as well, if at all possible...
This is mostly a pycloudlib change that we adapted, and it is only part of our test suite - does not affect the package at all, so we don't have tests for these changes.

> 0e5d48afbbc2bb3aca1b405258818e8c2c8efbbc
> The commit messages Real-time kernel as an exception but
> I don't see anything about that in the code; hopefully
> that doesn't indicate anything is missing?

I double checked that, and supports_purge is set to False in Real-time kernel - so we should be good here, all set.

Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Added 21 more commits, addressing Andreas' review, and rounding up integration tests and PO file structure. This MP should be ready for another round now.

Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks for adding the test case I flagged.

I still think you should leave some breadcrumbs for the deprecated images issue, since that seems like one of those weird glitchy corner cases that'll pop up some day, and a future engineer might appreciate pointers. And I also still think that using it from the base Cloud class will eventually cause problems. However, you're right this is only affecting test code, so irrelevant for the release as long as the test cases pass, and can be addressed/ignored at your discretion.

I don't spot anything in the new complaints to raise any concerns about.

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

+1

review: Approve
Revision history for this message
Renan Rodrigo (renanrodrigo) wrote :

Thanks for the approval, Andreas!

We still need to coordinate uploads, because of pkgbinarymangler (https://bugs.launchpad.net/ubuntu/+source/pkgbinarymangler/+bug/2037584) - will get in touch soon so we can do it correctly

Revision history for this message
Bryce Harrington (bryce) wrote :

The two code changes and changelog entry LGTM, rest are just test updates.

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

This landed already. For some reason the bot didn't pick up the approval votes.

I'm marking this MP as merged to reflect the current status.

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: