gtristan commented on code in PR #1899:
URL: https://github.com/apache/buildstream/pull/1899#discussion_r1526202710


##########
src/buildstream/source.py:
##########
@@ -696,14 +696,17 @@ def get_mirror_directory(self) -> str:
 
         return self.__mirror_directory
 
-    def translate_url(self, url: str, *, alias_override: Optional[str] = None, 
primary: bool = True) -> str:
+    def translate_url(
+        self, url: str, *, alias_override: Optional[str] = None, primary: bool 
= True, suffix: Optional[str] = None
+    ) -> str:
         """Translates the given url which may be specified with an alias
         into a fully qualified url.
 
         Args:
            url: A URL, which may be using an alias
            alias_override: Optionally, an URI to override the alias with.
            primary: Whether this is the primary URL for the source.
+           suffix: an optional suffix to append to the URL (*Since: 2.2*)

Review Comment:
   I would elaborate in the following `.. note::`
   
   ```diff
   .. note::
      This must be called for every URL in the configuration during
      :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>` if
      :func:`Source.mark_download_url() 
<buildstream.source.Source.mark_download_url>`
      is not called.
   
   +   The *suffix* argument may be used to translate URLs for which only the 
base portion of
   +   the URL was previously marked with :func:`Source.mark_download_url() 
<buildstream.source.Source.mark_download_url>`
   +   at :func:`Plugin.configure() <buildstream.plugin.Plugin.configure>` time.
   
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to