launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #31688
Re: [Merge] ~ines-almeida/launchpad:fix-get-blob-from-store-git into launchpad:master
Diff comments:
> diff --git a/lib/lp/code/model/gitref.py b/lib/lp/code/model/gitref.py
> index 8d5caf5..f7a426d 100644
> --- a/lib/lp/code/model/gitref.py
> +++ b/lib/lp/code/model/gitref.py
> @@ -1010,13 +1010,17 @@ def _fetch_blob_from_launchpad(repository_url, ref_path, filename):
> return response.content
>
>
> -# XXX ines-almeida 2024-10-07: Needs refactoring to allow extending more easily
> -# especially since this list will for sure grow as we allow non-staging stores.
> -# Potentially look into using a feature rule.
> -_store_hostnames = {
> - "git.staging.snapcraftcontent.com",
> - "git.staging.pkg.store",
> -}
> +def _get_store_hostnames():
> + """Return the valid hostnames that we accept for the store git
> + repositories (which use a turnip backend).
> +
> + Return value configured in the `git_repository_url.store_hostnames` feature
> + flag, or default values.
> + """
> + store_urls = getFeatureFlag("git_repository_url.store_hostnames")
> + if store_urls:
> + return store_urls.split(" ")
> + return ["git.staging.snapcraftcontent.com", "git.staging.pkg.store"]
I'd love your thoughts on the default values... These were the ones that we were requested earlier. This makes the system work exactly as it would without the feature flag.
>
>
> def _fetch_blob_from_store(repository_url, ref_path, filename):
--
https://code.launchpad.net/~ines-almeida/launchpad/+git/launchpad/+merge/474874
Your team Launchpad code reviewers is requested to review the proposed merge of ~ines-almeida/launchpad:fix-get-blob-from-store-git into launchpad:master.
Follow ups