dave2wave commented on PR #1394:
URL: 
https://github.com/apache/tooling-trusted-releases/pull/1394#issuecomment-4939489804

   Before merging the following need to be handled:
   
   In `path.py`:
   
   ```
   def committee_downloads_url(host: str, committee: sql.Committee) -> str:
       # This is a slight extension of the intended paths concept               
                                                                                
              
       # But URLs contain paths, so atr.paths does not have to be limited to 
filesystem paths                                                                
                 
       if committee.is_podling:
           return f"https://{host}/downloads/incubator/{committee.key}";
       return f"https://{host}/downloads/{committee.key}";
   ```
   
   And in `util.py`:
   
   ```
   def download_url_for_path(
       relpath: safe.RelPath, kind: DownloadFile, host: str | None = None, 
archived: bool = False
   ) -> str:
       # Where a file at a known dist-relative path is fetched from, by 
lifecycle (archived vs beta vs                                                  
                      
       # released) and role (artifact vs metadata). The catalogue stores each 
artifact's exact path, so                                                       
                
       # nothing has to be reconstructed from a committee here                  
                                                                                
              
       if archived:
           # archive.apache.org keeps every release ever published, on every 
host                                                                            
                 
           return paths.archive_download_url(relpath)
       if not config.get().SVN_PUBLISH_URL:
           # No SVN publishing configured (dev), so ATR serves the downloads 
itself                                                                          
                 
           return f"https://{host or config.get().APP_HOST}/downloads/{relpath}"
       match svn_publish_target():
           case SvnPublishTarget.ATR:
               # Beta: files are still in ATR's area of the distribution SVN, 
not yet mirrored                                                                
                
               return 
f"{config.get().SVN_DIST_PUBLIC_URL.rstrip('/')}/{relpath}"
           case SvnPublishTarget.RELEASE:
               if kind is DownloadFile.ARTIFACT:
                   return paths.closer_download_url(relpath)
               return paths.downloads_url(relpath)
   ```
   
   and in `api/__init__.py`
   
   ```
   def _committee_keys_url(host: str, committee: sql.Committee) -> str:
       if committee.is_podling:
           return f"https://{host}/downloads/incubator/{committee.key}/KEYS";
       return f"https://{host}/downloads/{committee.key}/KEYS";
   ```


-- 
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