Comment 5 for bug 2064580

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

This bug received a prioritization request for SRU review.

Unfortunately, apparently the uploads for stable releases
haven't happened today so far (but I will check tomorrow).

Meanwhile, I have familiarized myself with the upload for
Oracular, which is expected to be quite similar to stable
releases (all releases will get the same version update);
and with the upstream changes (which closely match that).

AFAICT there is actually _very little_ changes to *code*
that have impacts to Ubuntu -- the bulk of changes (90%!)
are updates to the go version & vendorized dependencies.

Among the code changes, there is Windows and yum/zypper
(other package managers), all these don't affect Ubuntu.

(So, it's curious whether the actual needed changes may
be in the dep updates; otherwise, the code changes that
would be needed could be accomplished with simple patch
SRUs, as far as I can tell / if not missing something.)

Finally, considering that 90%+ of effective changes are
go deps, and that build-time tests seem to be few / not
cover it all, it is required to have plenty of testing
before releasing it for stable releases.

Notes:
-----

The upload in oracular-proposed; note it's quite big:

 $ curl -sL 'https://launchpad.net/ubuntu/+archive/primary/+files/google-osconfig-agent_20230504.00-0ubuntu3_20240320.00-0ubuntu1.diff.gz' | zcat > oracular.debdiff

 $ cat oracular.debdiff | diffstat -s
  572 files changed, 29195 insertions(+), 11535 deletions(-)

But the vendorized deps changes are literally 90% of it:
(91% of files changes, 92% of insertions, 90% of deletions)

 $ cat oracular.debdiff | filterdiff -i '*/debian/extra/vendor/*' | diffstat -s
  519 files changed, 26866 insertions(+), 10356 deletions(-)

 @ debian/rules:
   9 override_dh_auto_configure:
  10 cp -r debian/extra/vendor ./
  11 dh_auto_configure
 ...
  24 override_dh_clean:
  25 dh_clean vendor/

Plus e2e_tests which are not built/tested/shipped, and examples:
(4.2% of files changed, 6.3% of insertions, 2.9% of deletions)

 @ debian/rules:
 3 export DH_GOLANG_EXCLUDES := e2e_tests

 $ cat oracular.debdiff | filterdiff -i '*/e2e_tests/*' | diffstat -s
  14 files changed, 1179 insertions(+), 277 deletions(-)

 $ cat oracular.debdiff | filterdiff -i '*/examples/*' | diffstat -s
  10 files changed, 674 insertions(+), 10 deletions(-)

That is, approximately 95%/98%/93% of the modifications, in total.

Looking at what is left:
(5% of files changes, 1.6% of insertions, 7.7% of deletions)

 $ cat oracular.debdiff | filterdiff -x '*/debian/extra/vendor/*' -x '*/e2e_tests/*' -x '*/examples/*' | diffstat -s
  29 files changed, 476 insertions(+), 892 deletions(-)

Taking out a few other files that are not code changes either
(e.g., build-time tests, upstream docs, and changelog/series),
the list is quite small:

 $ cat oracular.debdiff | filterdiff -x '*/debian/extra/vendor/*' -x '*/e2e_tests/*' -x '*/examples/*' \
   -x '*/*_test.go' -x '*/OWNERS' -x '*/README.md' -x '*/debian/changelog' -x '*/debian/patches/series' | diffstat
  agentconfig/agentconfig.go | 2
  agentendpoint/agentendpoint.go | 2
  attributes/attributes.go | 2
  clog/clog.go | 18 +-
  config/exec_resource.go | 4
  config/repository_resource.go | 59 +++++----
  debian/patches/0001-Disable-TestGetAptGPGKey-for-LP-build-environment.patch | 21 +++
  go.mod | 43 +++++-
  go.sum | 806 ++++-------------------...
  main.go | 2
  main_linux.go | 2
  main_windows.go | 4
  ospatch/updates_windows.go | 2
  packages/wua_windows.go | 49 +++++--
  packages/yum.go | 6
  packages/zypper.go | 39 ++++--
  policies/apt.go | 40 ++++--
  policies/recipes/steps.go | 4
  util/mocks/match.go | 2
  util/util.go | 12 -
  20 files changed, 241 insertions(+), 878 deletions(-)

Reviewing that with this:

 $ cat oracular.debdiff | filterdiff ... | vim -

The actual code changes are simple, and originate from just 9 commits upstream.
These commits are mostly non-Ubuntu related stuff (Windows Updates, yum (RedHat), zypper (SUSE)).

But there are *many* go modules/deps updated, including go version changes.

The commits can be found in the diff range of the requested version update:
 https://github.com/GoogleCloudPlatform/osconfig/compare/20230504.00...20240320.00

Commits:
 Call fqdn (#481)
 https://github.com/GoogleCloudPlatform/osconfig/commit/1924d56f18944c1f29b511ad7d7187d4c4034f74

 Fix condition to have 10 attempts rather than 11. (#477)
 https://github.com/GoogleCloudPlatform/osconfig/commit/4073c4666d331b84ea8ddf721d3d2816e41e49c9

 Migrate empty interface to any (#483)
 https://github.com/GoogleCloudPlatform/osconfig/commit/e8438346cfb3ac3ec30b48575ff5e2b5430b89af

  No functional change

  For convenience, the predeclared type any is an alias for the empty interface. [Go 1.18]
  https://go.dev/ref/spec#Interface_types

 GuestPolicies e2e: Remove ed package if exist for zypper startup_script in recipe-steps tests (#532)
 https://github.com/GoogleCloudPlatform/osconfig/commit/01eb37f7efbeb470989f9f1d4ee22c40e1311f4d

 Enable OSConfig agent to read GPG keys files with multiple entities (#537)
 https://github.com/GoogleCloudPlatform/osconfig/commit/e41a055704c2b08e41d722e0b27d3ae8a40fbecc

  Perhaps disabled at build time via patch
  0001-Disable-TestGetAptGPGKey-for-LP-build-environment.patch

 Added SCODE to Windows error description (#504)
 https://github.com/GoogleCloudPlatform/osconfig/commit/bded09c43e09d0dbd7a4ccca19b45c118726a07c

 Fix parse yum updates to consider the packages under installing-dependencies keyword (#502)
 https://github.com/GoogleCloudPlatform/osconfig/commit/a361f8114fbfbaea8b48042a76726162ec8bf2be

 Change debug messages when parsing zypper patch output (#490)
 https://github.com/GoogleCloudPlatform/osconfig/commit/5ede6a110c16ecf223df37aa31371e1ab87b5340

 Fix zypper patch info parser to consider conflicts-pkgs float versions (#528)
 https://github.com/GoogleCloudPlatform/osconfig/commit/35588f995072af91b682a4d07d2d2176be3248b3

This one seems to be the only which effectively addresses Ubuntu behavior:

 Enable OSConfig agent to read GPG keys files with multiple entities (#537)

go version changes:

  244 diff -Nru google-osconfig-agent-20230504.00/go.mod google-osconfig-agent-20240320.00/go.mod

  250 -go 1.16
  251 +go 1.21

  https://github.com/GoogleCloudPlatform/osconfig/commit/b5dd4e173f734b9e4b88e99f1f97ec8da46752d6
  Update go version in go.mod (#479)
  1.16 -> 1.17

  Migrate empty interface to any (#483)
  https://github.com/GoogleCloudPlatform/osconfig/commit/e8438346cfb3ac3ec30b48575ff5e2b5430b89af
  1.17 -> 1.19

  https://github.com/GoogleCloudPlatform/osconfig/commit/fa3475e1ede95db4d9393f90720bf8509225bc58
  Update go version to 1.21 (#507)
  (empty, apparently a mistake; actually applied in 'Call fqdn (#481)'
  1.19 -> 1.21

 go version/mod deps updates in go.mod and go.sum

Worth noting:

 Remove tests for Ubuntu 18.04 (EOL) (#476)
 https://github.com/GoogleCloudPlatform/osconfig/commit/97dd6af8491591200b615277be876e56f396d33e

  Should we revert that, as an SRU to Bionic/18.04 is being requested?

Now, comparing the code-only diff above from Oracular, with the GitHub commit range for the 2 versions:

It's the same; the only difference is the patch to disable test(s) at runtime (avoid internet download),
which accounts for the missing 21 lines difference between '220/241 insertions'):
'd/p/0001-Disable-TestGetAptGPGKey-for-LP-build-environment.patch'

 $ curl -sL 'https://github.com/GoogleCloudPlatform/osconfig/compare/20230504.00...20240320.00.diff' > github.diff

 $ cat github.diff | filterdiff -x '*/debian/extra/vendor/*' -x '*/e2e_tests/*' -x '*/examples/*' \
   -x '*/*_test.go' -x '*/OWNERS' -x '*/README.md' -x '*/debian/changelog' -x '*/debian/patches/series' | diffstat
  agentconfig/agentconfig.go | 2
  agentendpoint/agentendpoint.go | 2
  attributes/attributes.go | 2
  clog/clog.go | 18 +--
  config/exec_resource.go | 4
  config/repository_resource.go | 59 ++++++-----
  go.mod | 43 ++++++--
  go.sum | 806 ++++-------------------...
  main.go | 2
  main_linux.go | 2
  main_windows.go | 4
  ospatch/updates_windows.go | 2
  packages/wua_windows.go | 49 ++++++---
  packages/yum.go | 6 -
  packages/zypper.go | 39 +++++--
  policies/apt.go | 40 ++++---
  policies/recipes/steps.go | 4
  util/mocks/match.go | 2
  util/util.go | 12 +-
  19 files changed, 220 insertions(+), 878 deletions(-)