Skip to content

Commit

Permalink
packer/getter: don't report other os/arch as errs
Browse files Browse the repository at this point in the history
Whenever a Github release exposes an entry for another OS/arch
combination, this gets registered as an error, which in the event no
binary is compatible with the host's OS/arch, gets reported at the end
of the getter process.

While this is sound in theory, in practice we get the list of all the
combinations that don't match the host's, which is not something a
Packer user can act on, and might therefore be more confusing than
helping to solve the issue.

Therefore we opt in this commit to stop registering those cases as real
errors, and only log them as an INFO statement.
  • Loading branch information
lbajolet-hashicorp committed Apr 12, 2024
1 parent a33b220 commit 11da765
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packer/plugin-getter/plugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,7 @@ func (pr *Requirement) InstallLatest(opts InstallOptions) (*Installation, error)
continue
}
if err := entry.validate("v"+version.String(), opts.BinaryInstallationOptions); err != nil {
err := fmt.Errorf("ignoring invalid remote binary %s: %s", entry.Filename, err)
errs = multierror.Append(errs, err)
log.Printf("[TRACE] %s", err)
log.Printf("[INFO] ignoring invalid remote binary %s: %s", entry.Filename, err)
continue
}

Expand Down

0 comments on commit 11da765

Please sign in to comment.