kubernetes/kops · error

getting image from the marketplace: %w

Error message

getting image from the marketplace: %w

What it means

In checkImageDifferences, the marketplace API GetLocalImageByLabel call failed while resolving the expected image label to a concrete local image for the server's zone and commercial type. This blocks drift detection for the server's image; the wrapped error is the SDK response (unknown label, unavailable in zone, transient failure).

Source

Thrown at upup/pkg/fi/cloudup/scalewaytasks/instance.go:404

			return err
		}

		err = t.RenderResource("scaleway_instance_server", tfName, tfInstance)
		if err != nil {
			return err
		}
	}
	return nil
}

func checkImageDifferences(c *fi.CloudupContext, cloud scaleway.ScwCloud, actualServer *instance.Server, expectedImage string) (bool, error) {
	localImage, err := cloud.MarketplaceService().GetLocalImageByLabel(&marketplace.GetLocalImageByLabelRequest{
		ImageLabel:     expectedImage,
		Zone:           actualServer.Zone,
		CommercialType: actualServer.CommercialType,
	}, scw.WithContext(c.Context()))
	if err != nil {
		return false, fmt.Errorf("getting image from the marketplace: %w", err)
	}

	if actualServer.Image.ID != localImage.ID {
		return true, nil
	}
	return false, nil
}

func checkUserDataDifferences(c *fi.CloudupContext, cloud scaleway.ScwCloud, actualServer *instance.Server, expectedUserData *fi.Resource) (bool, error) {
	actualUserData, err := cloud.InstanceService().GetServerUserData(&instance.GetServerUserDataRequest{
		Zone:     actualServer.Zone,
		ServerID: actualServer.ID,
		Key:      "cloud-init",
	}, scw.WithContext(c.Context()))
	if err != nil {
		return false, fmt.Errorf("getting actual user-data: %w", err)
	}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Verify the image label exists in the Scaleway marketplace
  2. Check availability of the image in the server's zone and for its commercial type
  3. Retry on transient marketplace API failures
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/scalewaytasks/instance.go:404 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/75fb548e86147189. Report an issue: GitHub.