pulumi / pulumi-kubernetes-operator

A Kubernetes Operator that automates the deployment of Pulumi Stacks
Apache License 2.0
218 stars 55 forks source link

Fall back to digest instead of checksum for Flux source #457

Closed polivbr closed 1 year ago

polivbr commented 1 year ago

What happened?

Receiving the following error:

expected a non-empty string in .status.artifact.checksum

when attempting to pull from a Flux source.

Newer versions of Flux no longer populate the checksum field on the artifact status, instead populating digest.

Expected Behavior

The sources would be successfully pulled from Flux.

Steps to reproduce

Reference a Flux source using a newer version of Flux (not sure when change was made, but it exists in the 2.0.0 RC versions).

Output of pulumi about

From within container:

root@pulumi-kubernetes-operator-5c66dbf97d-kwznf:/# pulumi about
CLI          
Version      3.68.0
Go Version   go1.20.4
Go Compiler  gc

Host     
OS       debian
Version  11.7
Arch     x86_64

Backend        
Name           pulumi.com
URL            https://app.pulumi.com/<redacted>
User           <redacted>
Organizations  <redacted>

Pulumi locates its logs in /tmp by default
warning: Failed to read project: no Pulumi.yaml project file found (searching upwards from /). If you have not created a project yet, use `pulumi new` to do so: no project file found
warning: Failed to get information about the current stack: no Pulumi.yaml project file found (searching upwards from /). If you have not created a project yet, use `pulumi new` to do so: no project file found
warning: A new version of Pulumi is available. To upgrade from version '3.68.0' to '3.71.0', visit https://pulumi.com/docs/reference/install/ for manual instructions and release notes.

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).

danielrbradley commented 1 year ago

Hi @polivbr thanks for reporting this. I'll forward this on to the team to take a look at.

rquitales commented 1 year ago

Thank you for reporting this issue. It appears that the checksum field has been deprecated by Flux in favor of digest, as you correctly observed. We will take this into account and add fallback logic to handle both cases.

Related RFC: https://github.com/fluxcd/flux2/pull/3233