File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
rust/stackable-cockpit/src Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -95,22 +95,25 @@ pub async fn get_oci_index<'a>() -> Result<HashMap<&'a str, ChartSourceMetadata>
9595 let mut page = 1 ;
9696 let page_size = 20 ;
9797
98- while let Ok ( artifacts_page ) = client
99- . get ( format ! (
98+ loop {
99+ let url = format ! (
100100 "{}/projects/{}/repositories/{}/artifacts?page_size={}&page={}" ,
101101 base_url,
102102 encode( project_name) ,
103103 encode( repository_name) ,
104104 page_size,
105105 page
106- ) )
107- . send ( )
108- . await
109- . context ( GetArtifactsSnafu ) ?
110- . json :: < Vec < Artifact > > ( )
111- . await
112- . context ( ParseArtifactsSnafu )
113- {
106+ ) ;
107+
108+ let artifact_page = client
109+ . get ( url)
110+ . send ( )
111+ . await
112+ . context ( GetArtifactsSnafu ) ?
113+ . json :: < Vec < Artifact > > ( )
114+ . await
115+ . context ( ParseArtifactsSnafu ) ?;
116+
114117 let count = artifacts_page. len ( ) ;
115118 artifacts. extend ( artifacts_page) ;
116119 if count < page_size {
You can’t perform that action at this time.
0 commit comments