Skip to content

Fixing getting the cert files form Google Storage - #783

Merged
manugarg merged 4 commits into
cloudprober:masterfrom
allagoichuk:master
Jun 25, 2024
Merged

manugarg merged 4 commits into
cloudprober:masterfrom
allagoichuk:master

Conversation

@allagoichuk

@allagoichuk allagoichuk commented Jun 22, 2024 •

Copy link
Copy Markdown
Contributor

This cl #396 breaks accessing Google Storage as path.join converts double slash into single slash

Below code returns https:/storage.googleapis.com/bbmc-cloudradar-internal-ip-only/rds/ssl/cloudprober.crt
package main

import (
	"fmt"
	"path"
)

const gcsHTTPBaseURL = "https://storage.googleapis.com"

func main() {
	fmt.Printf(path.Join(gcsHTTPBaseURL, "bbmc-cloudradar-internal-ip-only/rds/ssl/cloudprober.crt"))
}

…er#396

as path.join converts double slash into single slash
@manugarg manugarg added this to the v0.13.6 milestone Jun 24, 2024

@manugarg manugarg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@allagoichuk Many thanks for fixing this.

One minor suggestion but looks good otherwise.

Comment thread internal/file/gcs.go Resolved
@manugarg

Copy link
Copy Markdown
Contributor

Test failures are because of the missing net/url import.

manugarg and others added 2 commits June 24, 2024 12:44
Comment thread internal/file/gcs.go Resolved
@manugarg
manugarg merged commit fd07e13 into cloudprober:master Jun 25, 2024
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.

2 participants