redhat-developer / redhat-developer/mapt

[bug] Match expectations around versions from params

Open
#423 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
24
Forks
36
Avg merge
6d 13h
Merged PRs (30d)
8

Description

This sample:

podman run -d --rm --name fedora-create \
    -v ${PWD}:/workspace:z \
          -e ARM_TENANT_ID=$(cat arm_tenant_id) \
          -e ARM_SUBSCRIPTION_ID=$(cat arm_subscription_id) \
          -e ARM_CLIENT_ID=$(cat arm_client_id) \
          -e ARM_CLIENT_SECRET=$(cat arm_client_secret) \
    quay.io/redhat-developer/mapt:v0.8.0 azure \
        fedora create \
        --project-name "fedora-41" \
        --backed-url "file:///workspace" \
        --conn-details-output "/workspace" \
        --spot \
        --arch arm64 \
        --memory 16 \
        --cpus 8  \
        --version 41

Is failing due to

-------------------------------------------------------------------------------- 
DEBU error while checking if image available at location: GET https://management.azure.com/subscriptions/0fb0c5e8-94dc-4ebb-adee-ebdaeb9de825/providers/Microsoft.Compute/locations/westus/communityGalleries/Fedora-5e266ba4-2250-406d-adad-5d73860d958f/images/Fedora-Cloud-41-Arm64
--------------------------------------------------------------------------------
RESPONSE 404: 404 Not Found
ERROR CODE: NotFound
--------------------------------------------------------------------------------
{
  "error": {
    "code": "NotFound",
    "message": "please check if the gallery name 'Fedora-5e266ba4-2250-406d-adad-5d73860d958f' is valid and the gallery exists in 'westus' region."
  }
}
-------------------------------------------------------------------------------- 
DEBU error while checking if image available at location: GET https://management.azure.com/subscriptions/0fb0c5e8-94dc-4ebb-adee-ebdaeb9de825/providers/Microsoft.Compute/locations/westcentralus/communityGalleries/Fedora-5e266ba4-2250-406d-adad-5d73860d958f/images/Fedora-Cloud-41-Arm64
--------------------------------------------------------------------------------
RESPONSE 404: 404 Not Found
ERROR CODE: NotFound
--------------------------------------------------------------------------------

Checking https://github.com/redhat-developer/mapt/blob/2027b25e68985e280bbc4f605443087d4a3acf9f/cmd/mapt/cmd/azure/hosts/constants.go#L16 it seems versions on Azure need an extra .0

Probably we would need to treat version only by Major and if extra info is needed compose it within the code...

Also realize aws latest version is 41 vs azure 40

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with cmd/mapt/cmd/azure/hosts/constants.go at the referenced version definitions, then trace how the --version parameter is used for Azure and AWS image lookups. Reproduce the Fedora 41 command and compare the generated image versions with the values expected by each cloud provider; done means the parameter produces valid lookups for the supported versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, go
Domain
cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.