Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/storm/helpers/ab_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ func (h *AbUpdateHelper) checkTridentService(tc storm.TestCase) error {
}

func checkUrlIsAccessible(url string) error {
// If this is an OCI image, skip check
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: maybe add reason for skipping. something like 'skip check because oci:// is not a supported protocol for http.Head'?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

or maybe we could use the same translation code that Ayana has in trident for the tests go get the equivalent http address for an oci url.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Maybe I'll leave this to @ayaegashi then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Not sure where that translation takes place

if strings.HasPrefix(url, "oci://") {
logrus.Infof("Skipping accessibility check for OCI URL because OCI protocol is not supported by http: %s", url)
return nil
}

resp, err := http.Head(url)
if err != nil {
return fmt.Errorf("failed to check new image URL: %w", err)
Expand Down