Skip to content

RPM repository content modify base-version expects the wrong type #618

@decko

Description

@decko

Summary

When using the following command:

pulp rpm repository content modify

the --base-version flag asks for an INTEGER instead of an URL, which is the correct.

Steps to reproduce

pulp rpm repository content modify --repository $REPO_NAME --base-version `$BASEVERSION_HREF`

should trigger an error message.
Also, you could use

pulp rpm repository content modify --help

and it gonna show that the --base-version flag expects an INTEGER instead of an URL.

Expected behavior

It's expected that --base-versions accepts an URL. Using an API call directly works flawlessly.

Stacktrace/Error log

Error: Invalid value for '--base-version': '/pulp/api/v3/repositories/rpm/rpm/8587fd87-494a-492e-a0af-ca0653e24a04/versions/1/' is not a valid integer.

Pulp and pulp-cli version info

pulp3 command line interface, version 0.17.0.dev0

{
  "versions": [
    {
      "component": "core",
      "version": "3.23.0.dev",
      "package": "pulpcore"
    },
    {
      "component": "rpm",
      "version": "3.19.0.dev",
      "package": "pulp-rpm"
    },
    {
      "component": "deb",
      "version": "2.21.0.dev",
      "package": "pulp_deb"
    },
    {
      "component": "container",
      "version": "2.15.0.dev",
      "package": "pulp-container"
    },
    {
      "component": "file",
      "version": "1.12.0.dev",
      "package": "pulp-file"
    }
  ],
  "online_workers": [
    {
      "pulp_href": "/pulp/api/v3/workers/750cbf26-8422-4827-8b9a-78306e9e7f4b/",
      "pulp_created": "2023-01-16T20:33:36.590792Z",
      "name": "569@9dcb6220b2d5",
      "last_heartbeat": "2023-01-16T20:56:10.028775Z",
      "current_task": null
    },
    {
      "pulp_href": "/pulp/api/v3/workers/9d3fa93a-f8ec-43df-839f-305dd64ab1d7/",
      "pulp_created": "2023-01-16T20:33:36.555093Z",
      "name": "525@9dcb6220b2d5",
      "last_heartbeat": "2023-01-16T20:56:10.032191Z",
      "current_task": null
    }
  ],
  "online_content_apps": [
    {
      "name": "578@9dcb6220b2d5",
      "last_heartbeat": "2023-01-16T20:56:10.735000Z"
    },
    {
      "name": "579@9dcb6220b2d5",
      "last_heartbeat": "2023-01-16T20:56:11.222660Z"
    }
  ],
  "database_connection": {
    "connected": true
  },
  "redis_connection": {
    "connected": false
  },
  "storage": {
    "total": 435432861696,
    "used": 56704614400,
    "free": 378728247296
  },
  "content_settings": {
    "content_origin": "http://localhost:5001",
    "content_path_prefix": "/pulp/content/"
  }
}

Additonal context

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis request doesn't seem right

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions