Showing application credentials that don't exist does not raise an error

Bug #2126565 reported by Matt Anson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Undecided
Unassigned

Bug Description

Since python-openstackclient==8.2.0, running "application credential show" on a non-existent application credential returns an empty, formatted result and no errors:

(osc) [matta@matt-top]$ openstack application credential show i-dont-exist
+--------------+-------+
| Field | Value |
+--------------+-------+
| ID | |
| Name | |
| Description | |
| Project ID | |
| Roles | |
| Unrestricted | |
| Access Rules | |
| Expires At | |
+--------------+-------+
(osc) [matta@matt-top]$ echo $?
0

This action should raise an exception.

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (stable/2025.2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.opendev.org/c/openstack/python-openstackclient/+/962663
Committed: https://opendev.org/openstack/python-openstackclient/commit/fb8cdd44414d0e16001d52d90d49d16dcc7a9509
Submitter: "Zuul (22348)"
Branch: master

commit fb8cdd44414d0e16001d52d90d49d16dcc7a9509
Author: Matt Anson <email address hidden>
Date: Wed Oct 1 12:31:05 2025 +0100

    Ensure show on absent appcreds raises exception

    Currently, running ``application credential show`` on a
    non-existent appcred will exit normally and display a
    formatted application credential with no data, despite
    the Keystone API returning a 404.

    Ensure that querying a non-existent application
    credential raises an exception message and an exit-code
    1 to the user.

    Closes-Bug: #2126565
    Change-Id: I597d2d4064f1020c5ac40862ecc556f3c94b53eb
    Signed-off-by: Matt Anson <email address hidden>

Changed in python-openstackclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (stable/2025.2)

Reviewed: https://review.opendev.org/c/openstack/python-openstackclient/+/962779
Committed: https://opendev.org/openstack/python-openstackclient/commit/9916aa6bc15a165b4ae91e4f116be0f80a1d6a9e
Submitter: "Zuul (22348)"
Branch: stable/2025.2

commit 9916aa6bc15a165b4ae91e4f116be0f80a1d6a9e
Author: Matt Anson <email address hidden>
Date: Wed Oct 1 12:31:05 2025 +0100

    Ensure show on absent appcreds raises exception

    Currently, running ``application credential show`` on a
    non-existent appcred will exit normally and display a
    formatted application credential with no data, despite
    the Keystone API returning a 404.

    Ensure that querying a non-existent application
    credential raises an exception message and an exit-code
    1 to the user.

    Closes-Bug: #2126565
    Change-Id: I597d2d4064f1020c5ac40862ecc556f3c94b53eb
    Signed-off-by: Matt Anson <email address hidden>
    (cherry picked from commit fb8cdd44414d0e16001d52d90d49d16dcc7a9509)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-openstackclient 8.3.0

This issue was fixed in the openstack/python-openstackclient 8.3.0 Gazpacho release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.