Charmcraft should warn about invalid endpoint names
Metadata
Current evaluation
Enhancement was deferred to internal CHARMCRAFT-645 and closed without a linked Charmcraft PR or implementation commit.
Resolution: closed stale
Reason: The issue received only triage acknowledgment and an internal Jira ticket, then closed with no resolving PR or commit. The public issue metadata confirms that no implementation was linked.
Evaluated by: mr-cal-bot
No scores available.
Issue body
### Bug Description
When packing a charm with a relation name containing a `.` in it, charmcraft packs it without any issue.
However, when deploying to juju, it then fails complaining that this endpoints is not a valid field name.
It fails with
```
$ juju deploy ./bug-charmcraft_amd64.charm
ERROR Put https://localhost:40609/model-4a471354-e9b6-4232-8f73-bad9becf626b/charms/bug-charmcraft-3097777: cannot upload charm: invalid charm data: "dead.beef" is not a valid field name
```
I have the feeling a part of it should be in juju but I don't know how much, but also, charmcraft should be a bit stricter on the names.
This [function](https://github.com/juju/juju/blob/3.6/mongo/utils/validfield.go#L15) checks what are valid field names or not.
### To Reproduce
* Create a charm with one `requires` interface containing a `.` in it
```
requires:
dead.beef:
interface: deadbeef
```
### Environment
```
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.3 LTS
Release: 24.04
Codename: noble
$ charmcraft version
charmcraft 3.5.3
```
### charmcraft.yaml
```yaml
type: charm
name: bug-charmcraft
title: Charm Template
summary: A very short one-line summary of the charm.
description: |
A single sentence that says what the charm is, concisely and memorably.
A paragraph of one to three short sentences, that describe what the charm does.
A third paragraph that explains what need the charm meets.
Finally, a paragraph that describes whom the charm is useful for.
base: ubuntu@22.04
platforms:
amd64:
arm64:
parts:
charm:
plugin: charm
source: .
requires:
dead.beef:
interface: deadbeef
```
### Relevant log output
```shell
ERROR Put https://localhost:40609/model-4a471354-e9b6-4232-8f73-bad9becf626b/charms/bug-charmcraft-3097777: cannot upload charm: invalid charm data: "dead.beef" is not a valid field name
```
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed stale | Enhancement was deferred to internal CHARMCRAFT-645 and closed without a linked Charmcraft PR or implementation commit. | |
| stealth/space-bunny-alpha | — | closed stale | Enhancement was triaged and closed without a linked implementation; follow-up was deferred to internal ticket CHARMCRAFT-645. | |
| stealth/space-bunny-alpha | — | closed resolved | Invalid endpoint names are now rejected earlier via merged PR #2433, commit 3db4a71f, which tightened project field-name validation. | |
| stealth/space-bunny-alpha | — | closed stale | Enhancement was triaged and closed without implementation; work was deferred to internal ticket CHARMCRAFT-645, with no linked PR or commit. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without implementation. The request to validate endpoint names was triaged and deferred to internal ticket CHARMCRAFT-645. No fix or merge was provided. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The enhancement request to validate endpoint names was tracked via internal Jira ticket CHARMCRAFT-645. No code changes or pull requests were merged. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed after triage and logging as internal enhancement CHARMCRAFT-645. No pull request or fix was merged; the endpoint validation request remains deferred for future development. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Triaged and tracked internally via Jira ticket CHARMCRAFT-645. Maintainers acknowledged the enhancement request and referenced Juju validation logic. Closed without a public fix or implementation. |
Update history
No update history recorded yet.
Related issues
No related issues found above the similarity threshold.