os icon indicating copy to clipboard operation
os copied to clipboard

build remaining components of crossplane-provider-aws family

Open Aditevil opened this issue 7 months ago • 1 comments

Builds all of the crossplane-provider-aws components. https://github.com/crossplane-contrib/provider-upjet-aws/tree/main/cmd/provider

Aditevil avatar May 24 '25 16:05 Aditevil

📡 Build Failed: Network

up: error: failed to fetch package from remote: GET https://xpkg.upbound.io/service/token?scope=repository%3Aupbound%2Fprovider-aws-config%3Apull&service=xpkg.upbound.io: unexpected status code 404 Not Found

Build Details

Category Details
Build System melange
Failure Point running pipeline for subpackage crossplane-provider-aws-config

Root Cause Analysis 🔍

The build process attempted to download a package from the remote repository at xpkg.upbound.io but received a 404 Not Found response. The specific package 'upbound/provider-aws-config' could not be found at the specified location.


🔍 Build failure fix suggestions

Found similar build failures that have been fixed in the past and analyzed them to suggest a fix:

Suggested Changes

File: package.yaml

  • modify at line around line 139-144 in subpackages section (In the subpackages pipeline section) Original:
up xpkg xp-extract xpkg.upbound.io/upbound/${{range.value}}:v${{package.version}}

Replacement:

up xpkg xp-extract xpkg.upbound.io/upbound/${{range.value}}:v${{package.version}} || up xpkg xp-extract xpkg.upbound.io/crossplane-contrib/${{range.value}}:v${{package.version}}

File: package.yaml

  • modify at line around line 139-144 in subpackages section - alternative approach (In the subpackages pipeline section) Original:
up xpkg xp-extract xpkg.upbound.io/upbound/${{range.value}}:v${{package.version}}

Replacement:

# Try first with upbound namespace
if ! up xpkg xp-extract xpkg.upbound.io/upbound/${{range.value}}:v${{package.version}}; then
  # Fallback to crossplane-contrib namespace
  up xpkg xp-extract xpkg.upbound.io/crossplane-contrib/${{range.value}}:v${{package.version}}
fi
Click to expand fix analysis

Analysis

The build failure occurs when attempting to fetch a package from the remote repository at xpkg.upbound.io. The specific error is a 404 Not Found when trying to access "upbound/provider-aws-config". This suggests that either the package name is incorrect, the repository structure has changed, or there could be an issue with the package versioning or naming convention.

The subpackage pipeline is attempting to use the 'up' CLI tool to extract packages with a pattern that might no longer be valid. Looking at the pipeline, it's using a naming pattern of "xpkg.upbound.io/upbound/provider-aws-{component}:v{version}" which appears to be incorrect for at least some components.

Click to expand fix explanation

Explanation

The error is occurring because the build is trying to download a package from xpkg.upbound.io/upbound/provider-aws-config but is receiving a 404 Not Found error. This suggests that the package might be located in a different namespace or repository.

Upbound, the company behind Crossplane, has been moving some providers from the 'upbound' namespace to other namespaces like 'crossplane-contrib'. The error specifically mentions 'provider-aws-config', which might now be under a different namespace.

The suggested fix attempts to handle this by trying both possible namespaces: first attempting to download from the original 'upbound' namespace, and if that fails, falling back to the 'crossplane-contrib' namespace. This approach is resilient to changes in repository structure and will work regardless of which namespace the package is actually in.

The || operator in the first solution ensures that if the first command fails, the second one will be executed. The second solution uses a more explicit if/then approach to accomplish the same thing but with clearer error handling.

This is a common pattern when dealing with changing repository structures or namespaces in package management systems.

Click to expand alternative approaches

Alternative Approaches

  • Update the 'range: packages' data to use the correct namespaces for each provider component. This would require checking each component individually to determine its correct location.
  • Modify the script to check if the package exists before attempting to extract it, using a command like 'curl -s -I https://xpkg.upbound.io/upbound/${{range.value}}/v${{package.version}} | grep -q "200 OK"'
  • Update to a newer version of the 'up' CLI tool if available, as newer versions might handle repository changes more gracefully
  • Contact Upbound support to confirm the correct package locations and update the build configuration accordingly

Was this comment helpful? Please use 👍 or 👎 reactions on this comment.

octo-sts[bot] avatar May 24 '25 16:05 octo-sts[bot]