fix(installer): check parsePlatformSourceURL error, wait for PackageSource in E2E
Explicitly check error from parsePlatformSourceURL instead of relying on the implicit guarantee that installPlatformSourceResource already checked it. This prevents latent bugs if startup order is ever restructured. Add wait for platform PackageSource existence in E2E test before creating Package resource, preventing flaky failures when operator startup is slow. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Aleksei Sviridkin <f@lex.la>
This commit is contained in:
parent
58e2b646be
commit
dbfdbc8298
2 changed files with 8 additions and 2 deletions
|
|
@ -230,8 +230,11 @@ func main() {
|
|||
{
|
||||
sourceRefKind := "OCIRepository"
|
||||
if platformSourceURL != "" {
|
||||
sourceType, _, _ := parsePlatformSourceURL(platformSourceURL)
|
||||
// Error already checked by installPlatformSourceResource above
|
||||
sourceType, _, err := parsePlatformSourceURL(platformSourceURL)
|
||||
if err != nil {
|
||||
setupLog.Error(err, "failed to parse platform source URL for PackageSource")
|
||||
os.Exit(1)
|
||||
}
|
||||
if sourceType == "git" {
|
||||
sourceRefKind = "GitRepository"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue