Skip to content

Integration test fix ppa #1296

Merged
blackboxsw merged 2 commits into
canonical:mainfrom
holmanb:holmanb/integration-test-fix-ppa-try-2
Feb 23, 2022
Merged

Integration test fix ppa #1296
blackboxsw merged 2 commits into
canonical:mainfrom
holmanb:holmanb/integration-test-fix-ppa-try-2

Conversation

@holmanb
Copy link
Copy Markdown
Member

@holmanb holmanb commented Feb 23, 2022

"simplestreams-dev-ubuntu-trunk-{}.list".format(release)
)
host = "launchpad" if release == "jammy" else "launchpadcontent"
host = "launchpadcontent" if release == "jammy" else "launchpad"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but this is going to fail again Ubuntu KK. What about this diff?

-        host = "launchpad" if release == "jammy" else "launchpadcontent"
         assert (
-            f"://ppa.{host}.net/simplestreams-dev/trunk/ubuntu"
+            f"://ppa.launchpad.net/simplestreams-dev/trunk/ubuntu"
+            in ppa_path_contents
+            or f"://ppa.launchpadcontent.net/simplestreams-dev/trunk/ubuntu"
             in ppa_path_contents
         )

Copy link
Copy Markdown
Contributor

@paride paride Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we can keep the existing logic but check if release >= "jammy" to make the fix more future proof.

Copy link
Copy Markdown
Member Author

@holmanb holmanb Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... What about this diff?

-        host = "launchpad" if release == "jammy" else "launchpadcontent"
         assert (
-            f"://ppa.{host}.net/simplestreams-dev/trunk/ubuntu"
+            f"://ppa.launchpad.net/simplestreams-dev/trunk/ubuntu"
+            in ppa_path_contents
+            or f"://ppa.launchpadcontent.net/simplestreams-dev/trunk/ubuntu"
             in ppa_path_contents
         )

I'm going with this. Since release is just a string of the release name, I think this works better than your next suggestion.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still it would work until ZZ as release names are alphabetically ordered, but maybe the or is just simpler.

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw Feb 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@holmanb Sorry to originally prescribe more strict validation here. I was thinking in KK release time-frame we would grow an ImageSpecification.gt/lt dunder set of methods to make this future-proof

At the moment go with what you have as your last suggestion. The asserting is correct anyway although you don't need the f"" string now.

@holmanb holmanb force-pushed the holmanb/integration-test-fix-ppa-try-2 branch from b8e59fd to e0519ad Compare February 23, 2022 16:00
Copy link
Copy Markdown
Contributor

@paride paride left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1, but we'll need a committer approval.

Copy link
Copy Markdown
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validated lxd_container runs locally on both focal and jammy.
CLOUD_INIT_OS_IMAGE=jammy::ubuntu::jammy .tox/integration-tests/bin/pytest tests/integration_tests/modules/test_apt.py::TestApt::test_ppa_source

@blackboxsw blackboxsw merged commit dcf520d into canonical:main Feb 23, 2022
holmanb added a commit to holmanb/cloud-init that referenced this pull request Feb 25, 2022
permissively allow either launchpadcontent or launchpad
holmanb added a commit to holmanb/cloud-init that referenced this pull request Feb 25, 2022
permissively allow either launchpadcontent or launchpad
blackboxsw pushed a commit to holmanb/cloud-init that referenced this pull request Feb 25, 2022
permissively allow either launchpadcontent or launchpad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants