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

juju info: get "supports" list from Charmhub instead of metadata.yaml #14554

Merged
merged 3 commits into from Sep 5, 2022

Conversation

benhoyt
Copy link
Member

@benhoyt benhoyt commented Sep 1, 2022

The series list from the metadata isn't what is available for deploy.
That comes from the Charmhub API response default-release bases (which
in turn comes from charmcraft and the manifest.yaml).

I also remove the ad-hoc isKubernetes function here and use
corecharm.IsKubernetes instead.

This commit also removes the unused Supports field from
bundleInfoOutput (it was never set so always omitted).

There are existing integration tests for juju info that check supports,
but only that it's present.

Checklist

  • Code style: imports ordered, good names, simple structure, etc
  • Comments saying why design decisions were made
  • Go unit tests, with comments saying what you're testing
  • Integration tests, with comments saying what you're testing
  • doc.go added or updated in changed packages

QA steps

# juju info [charm], then look for the "supports" field
$ juju info postgresl
$ juju info mysql
$ juju info ubuntu
$ juju info snappass-test

Bug reference

https://bugs.launchpad.net/juju/+bug/1988492

The series list from the metadata isn't what is available for deploy.
That comes from the Charmhub API response default-release bases (which
in turn comes from charmcraft and the manifest.yaml).

I also remove the ad-hoc isKubernetes function here and use
corecharm.IsKubernetes instead.

Unfortunately due to the existing TODO in convert.go:104, we don't get
the manifest.yaml and can't pass that to charmMeta / IsKubernetes, so
IsKubernetes returns the wrong value for container charms, e.g., the
likes of snappass-test. So snappass-test says it "supports: focal"
instead of what I'd expect, "supports: kubernetes". I think we'll need
to fix that in a follow-up change once ManifestYAML is provided by the
Charmhub API.

This commit also removes the unused Supports field from
bundleInfoOutput (it was never set so always omitted).
Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look ok to me, not sure if you want a 2nd +1 from heather

Copy link
Member

@hmlanigan hmlanigan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 nits, otherwise LGTM

cmd/juju/charmhub/convert.go Outdated Show resolved Hide resolved
cmd/juju/charmhub/convert.go Outdated Show resolved Hide resolved
@benhoyt
Copy link
Member Author

benhoyt commented Sep 4, 2022

/merge

@jujubot jujubot merged commit 4b73540 into juju:2.9 Sep 5, 2022
@benhoyt benhoyt deleted the info-supports branch September 5, 2022 00:25
@ycliuhw ycliuhw mentioned this pull request Sep 9, 2022
jujubot added a commit that referenced this pull request Sep 10, 2022
#14595

```
Merge branch '2.9' into 2.9-into-develop

# Conflicts:
# acceptancetests/assess_cloud.py
# acceptancetests/assess_endpoint_bindings.py
# acceptancetests/assess_heterogeneous_control.py
# state/migration_import_test.go
# apiserver/facades/client/client/status.go
# scripts/win-installer/setup.iss
# snap/snapcraft.yaml
# version/version.go
```

- #14551
- #14557
- #14560
- #14558
- #14554
- #14570
- #14577
- #14506
- #14538
- #14559
- #14574
- #14573
- #14567
- #14545
- #14541
- #14588
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants