Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow charmcraft status anycharm for everyone #1652

Open
taurus-forever opened this issue Apr 15, 2024 · 3 comments
Open

Allow charmcraft status anycharm for everyone #1652

taurus-forever opened this issue Apr 15, 2024 · 3 comments
Labels
Enhancement New feature or request

Comments

@taurus-forever
Copy link

What needs to get done

Hi,

At the moment charmcraft status anycharm can be executed by the charm maintainer/publisher/collaborator only.
All the rest are rejected:

> charmcraft status grafana-agent
Store operation failed:
- permission-required: No publisher or collaborator permission for the grafana-agent charm package

Why it needs to get done

Allowing read status access will avoid bugreports like this (wrong revision chosen as invisible on charmhub).

Can anonymous read access be allowed for charmcraft status?

Thank you!

@taurus-forever taurus-forever added the Enhancement New feature or request label Apr 15, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CRAFT-2804.

This message was autogenerated

@lengau
Copy link
Collaborator

lengau commented Apr 15, 2024

Thanks for the request!

How would the information presented by an anonymous read with charmcraft status differ from what's provided currently by juju info? Currently, charmcraft status can provide information that only publishers or collaborators can access (e.g. it lists all active branches for a charm, which are not made available to the general public). The most straightforward way to do this would be to use the consumer API, but I don't think this would provide any information that's not already available through juju info.

@taurus-forever
Copy link
Author

taurus-forever commented Apr 16, 2024

Hi @lengau, thank you for the fast reply!

Yes, I agree juju info helps a bit here. However:

  1. Usability: juju info grafana-agent paged per architecture. It is huge page output with the necessary information at the bottom:
> juju info grafana-agent
...
channels: |
  latest/stable:     68  2024-03-12  (68)  18MB  arm64  ubuntu@22.04
  latest/candidate:  95  2024-04-10  (95)  14MB  amd64  ubuntu@20.04
  latest/beta:       95  2024-04-10  (95)  14MB  amd64  ubuntu@20.04
  latest/edge:       96  2024-04-10  (96)  19MB  amd64  ubuntu@22.04

User needs to know about --arch arm64 option and use it manually:

juju info grafana-agent --arch arm64
...
channels: |
  latest/stable:     68  2024-03-12  (68)  18MB  ubuntu@22.04
  latest/candidate:  68  2024-03-11  (68)  18MB  ubuntu@22.04
  latest/beta:       68  2024-03-11  (68)  18MB  ubuntu@22.04
  latest/edge:       94  2024-04-10  (94)  18MB  ubuntu@22.04
  1. Juju info doesn't show/expand all details about bases/series, compare track 1 for pgbouncer:
> juju info pgbouncer
...
channels: |
  latest/stable:     5  2022-01-17  (5)  5MB  amd64, arm64, ppc64el, riscv64, s390x  ubuntu@16.04, ubuntu@18.04, ubuntu@20.04
  latest/candidate:  ↑
  latest/beta:       ↑
  latest/edge:       ↑
  1/stable:          89   2024-02-21  (89)   8MB   amd64  ubuntu@20.04
  1/candidate:       101  2024-02-28  (101)  19MB  amd64  ubuntu@22.04
  1/beta:            105  2024-02-28  (105)  19MB  amd64  ubuntu@22.04
  1/edge:            145  2024-04-10  (145)  16MB  arm64  ubuntu@20.04


> charmcraft status pgbouncer
Track    Base                  Channel    Version    Revision                                                                                   
latest   ubuntu 16.04 (all)    stable     5          5                                                                                          
                               candidate  ↑          ↑                                                                                          
                               beta       ↑          ↑                                                                                          
                               edge       ↑          ↑                                                                                          
         ubuntu 18.04 (all)    stable     5          5                                                                                          
                               candidate  ↑          ↑                                                                                          
                               beta       ↑          ↑                                                                                          
                               edge       ↑          ↑                                                                                          
         ubuntu 20.04 (all)    stable     5          5                                                                                          
                               candidate  ↑          ↑                                                                                          
                               beta       ↑          ↑                                                                                          
                               edge       ↑          ↑                                                                                          
1        ubuntu 20.04 (amd64)  stable     89         89                                                                                         
                               candidate  89         89                                                                                         
                               beta       100        100                                                                                        
                               edge       144        144                                                                                        
         ubuntu 20.04 (arm64)  stable     -          -                                                                                          
                               candidate  -          -                                                                                          
                               beta       -          -                                                                                          
                               edge       145        145                                                                                        
         ubuntu 22.04 (amd64)  stable     88         88                                                                                         
                               candidate  101        101                                                                                        
                               beta       105        105                                                                                        
                               edge       142        142                                                                                        
         ubuntu 22.04 (arm64)  stable     -          -                                                                                          
                               candidate  -          -                                                                                          
                               beta       -          -                                                                                          
                               edge       143        143                                                                                        
  1. juju info ... --arch all is just useless:
09:58:03 ✔ taurus:~$ diff -u <(juju info grafana-agent) <(juju info grafana-agent --arch all)
09:58:05 ✔ taurus:~$ 

Users have to execute juju info --arch for each arch one by one (amd64|arm64|ppc64el|riscv64|s390x) to see the same data as charmcraft status.

  1. (separate topic) juju info is showing 'release date' (nice!) but charmcraft status doesn't (sad :-( but separate UI topic...). And even more, charmcraft status shows date as a expiration date for charmhub branches (which confuses even experienced developers due to fundamental difference in snap info+juju info to charmcraft status):

Screenshot from 2024-04-16 10-28-15

This example shows the problem of jumping between tools with different UX.

Thank you for possible improvements here!

P.S. re: ... it lists all active branches for a charm, which are not made available to the general public...

Let charmcraft status show the public information only to non-authorized users? Effectively hide all charmhub branches from the output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants