Skip to content

Add retry mechanism for the Launchpad API#686

Merged
freyes merged 1 commit intoopenstack-charmers:masterfrom
wilkmar:retry_launchpad_request
Apr 22, 2026
Merged

Add retry mechanism for the Launchpad API#686
freyes merged 1 commit intoopenstack-charmers:masterfrom
wilkmar:retry_launchpad_request

Conversation

@wilkmar
Copy link
Copy Markdown

@wilkmar wilkmar commented Sep 17, 2025

Quite often Launchpad API is temporarily unavailable. In such cases, without this patch, a request to get all Ubuntu releases from Launchpad fails immediately, causing the entire test to fail. For example for the charm-octavia it can take up to 2 hours before the functional tests get to this point. And if it fails because of the Launchapad API unavailability, the whole tests suite needs to be restarted. In order to save time and resources, a simple request retry mechanism is introduced by this patch.

Quite often Launchpad API is temporarily unavailable. In such cases, without this patch,
a request to get all Ubuntu releases from Launchpad fails immediately, causing the
entire test to fail. For example for the charm-octavia it can take up to 2 hours before
the functional tests get to this point. And if it fails because of the Launchapad API
unavailability, the whole tests suite needs to be restarted. In order to save time and
resources, a simple request retry mechanism is introduced by this patch.

Signed-off-by: Marcin Wilk <marcin.wilk@canonical.com>
@wilkmar wilkmar force-pushed the retry_launchpad_request branch from c760cf7 to 4fa84bf Compare April 22, 2026 09:24
Copy link
Copy Markdown

@dosaboy dosaboy left a comment

Choose a reason for hiding this comment

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

I have done a run of charmed-openstack-tester with this patch included in an environment that frequently has connection failures to Launchpad and it worked well for me.

Copy link
Copy Markdown
Member

@freyes freyes left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @wilkmar

@freyes
Copy link
Copy Markdown
Member

freyes commented Apr 22, 2026

The CI was stuck, it has no relation to this change, there is something with the ntp charm and the github runner, they don't reach the desired state, I've seen it. I won't block this change on that CI issue.

@freyes freyes merged commit d3f1d55 into openstack-charmers:master Apr 22, 2026
4 of 8 checks passed
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