-
Notifications
You must be signed in to change notification settings - Fork 91
docs: add charm-user in the charmcraft.yaml file reference
#2195
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
Conversation
e05fb3a to
642073b
Compare
642073b to
0e10845
Compare
charm-user in the charmcraft.yaml file referencecharm-user in the charmcraft.yaml file reference
Exposes the `charm-user` field in `CharmMeta`. The field is added as a string (with type annotations providing the three possible values) rather than an enum. We have a mixture in the other meta fields - `RelationRole` is an enum, but `ResourceMeta.type` is a string and `StorageMeta.type` is a string. It seems like `charm-user` can go with the simpler form - and it's also easier to add an enum later than it is to remove one. Like most of the rest of the meta loading, there's also no validation (that it's one of the three possible values) - it seems reasonable to assume that if there's some other value in a production environment that's a `charmcraft` bug (or there's a new type we don't handle yet) and in development `charmcraft` will raise the problem when packing. See also the [charmcraft docs](https://canonical-charmcraft.readthedocs-hosted.com/en/stable/reference/files/metadata-yaml-file/#charm-user) (and a [PR to fix it being missing from charmcraft.yaml reference](canonical/charmcraft#2195)). Fixes #1396
lengau
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you do me a favour and add this key to one of the charmcraft YAML files under the basic smoke tests? I just looked and it doesn't seem like we're actually e2e testing this anywhere.
Done, assuming that adding the key is all that's required. |
Some specific fixes to the Django tutorial: * Don't need to explicitly have `python3 manage.py`. Django developers are more used to `./manage.py` instead. I have updated the tutorial and `task.yaml` file. * Any reference to `/django-hello-world` in text has been updated to `~/django-hello-world`. * Updated indentation in a code snippet that was rendering incorrectly. Additional reviewers: @jdkandersson
This PR is related to 12 Factor [SMTP PR](canonical/paas-charm#32). ## Rationale Some applications require an SMTP integration to send emails to their clients. This PR is a follow-up to the latest [12 Factor PR](canonical/paas-charm#32) for adding SMTP integration. ## Changes - Add commented-out SMTP relation required objects to extension charmcraft.yaml.j2 files. - Add references about SMTP into extension reference documents. - Add documentation about SMTP integration and generated environment variables - Add the smtp charm lib to the initializer. Reviewers: @jdkandersson @javierdelapuente @erinecon --------- Co-authored-by: Erin Conley <[email protected]>
ea10d9c to
4ebfa67
Compare
|
I'm not sure of the conventions here - do I need to squash all the commits, and/or rebase? Or will you do that as part of the merge? Let me know if I need to do more. |
|
@tonyandrewmeyer We'll squash on merge. |
…al#2195) The `charm-user` field is documented in the metadata.yaml file reference, but is missing from the charmcraft.yaml file reference, even though it does work there. This PR adds it to that reference. As the docs currently are, it gives the incorrect impression that you cannot use the combined charmcraft.yaml file to specify `charm-user`, and must have separate metadata, actions, and config files. --------- Co-authored-by: Erin Conley <[email protected]> Co-authored-by: Ali UĞUR <[email protected]>
…al#2195) The `charm-user` field is documented in the metadata.yaml file reference, but is missing from the charmcraft.yaml file reference, even though it does work there. This PR adds it to that reference. As the docs currently are, it gives the incorrect impression that you cannot use the combined charmcraft.yaml file to specify `charm-user`, and must have separate metadata, actions, and config files. --------- Co-authored-by: Erin Conley <[email protected]> Co-authored-by: Ali UĞUR <[email protected]>
Exposes the `charm-user` field in `CharmMeta`. The field is added as a string (with type annotations providing the three possible values) rather than an enum. We have a mixture in the other meta fields - `RelationRole` is an enum, but `ResourceMeta.type` is a string and `StorageMeta.type` is a string. It seems like `charm-user` can go with the simpler form - and it's also easier to add an enum later than it is to remove one. Like most of the rest of the meta loading, there's also no validation (that it's one of the three possible values) - it seems reasonable to assume that if there's some other value in a production environment that's a `charmcraft` bug (or there's a new type we don't handle yet) and in development `charmcraft` will raise the problem when packing. See also the [charmcraft docs](https://canonical-charmcraft.readthedocs-hosted.com/en/stable/reference/files/metadata-yaml-file/#charm-user) (and a [PR to fix it being missing from charmcraft.yaml reference](canonical/charmcraft#2195)). Fixes canonical#1396
The
charm-userfield is documented in the metadata.yaml file reference, but is missing from the charmcraft.yaml file reference, even though it does work there. This PR adds it to that reference.As the docs currently are, it gives the incorrect impression that you cannot use the combined charmcraft.yaml file to specify
charm-user, and must have separate metadata, actions, and config files.