← Back to issue list

export-login --expires silently ignores dates given in ISO 8601 format

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1928756
Type
issue
State
open
Author
~bjornt
Labels
craft-215
Created
Updated
Closed
—

Current evaluation

export-login now accepts the reported date-only expiry, retains timestamp support, and rejects unparseable values; the Launchpad issue remains open despite the resolved implementation.

Suggested action: close resolved

Reason: Commit e766db5ee1de7d131374bc0576e4406071955dca contains the resolving implementation: _VALID_DATE_FORMATS includes %Y-%m-%d and %Y-%m-%dT%H:%M:%SZ, and run() raises ArgumentParsingError when neither parses. The unit test test_export_login_with_params passes 2030-12-12 and asserts a TTL, directly covering the report and the maintainer's requested validation.

Evaluated by: mr-cal-bot

Impact: 48 Quick Win: 38 Complexity: 16 Confidence: 97 Actionability: 94

Issue body

If you pass the data in ISO 8601 format to export-login --expires: snapcraft export-login --expires 2022-01-01 --snaps maas --acls package_release macaroon You get a macaroon with expiry of None: Login successfully exported to 'macroon'. This can now be used with snapcraft login --with macaroon to log in to this account with no password and have these capabilities: snaps: ['maas'] channels: No restriction permissions: ['package_release'] expires: None If I pass the date, including the time, it works. But the documentation for export-login says that a date should be enough.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 48
Quick Win: 38
Complexity: 16
Confidence: 97
Actionability: 94
close resolved export-login now accepts the reported date-only expiry, retains timestamp support, and rejects unparseable values; the Launchpad issue remains open despite the resolved implementation.
stealth/space-bunny-alpha
Impact: 48
Quick Win: 39
Complexity: 12
Confidence: 96
Actionability: 92
close resolved `export-login --expires 2022-01-01` silently produced a macaroon with no expiry; current code accepts date-only ISO values and rejects malformed values.
stealth/space-bunny-alpha
Impact: 50
Quick Win: 34
Complexity: 25
Confidence: 96
Actionability: 90
close resolved Snapcraft now parses date-only and full ISO 8601 expiry values in export-login and rejects malformed values, resolving the reported silent non-expiry behavior.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 22
Complexity: 10
Confidence: 80
Actionability: 80
keep open export-login --expires silently produces no expiry when a past date is provided, because negative TTL is passed to the store API without validation.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 26
Staleness: 85
Complexity: 25
Confidence: 45
Support Request: 10
needs triage export-login --expires silently drops date-only ISO 8601 strings (e.g. 2022-01-01), producing a macaroon with expires: None. Requires full datetime to work. 5+ years old, zero comments, labelled craft-215, no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 5
close stale snapcraft export-login --expires silently sets expiry to None when given a date-only ISO 8601 string, despite documentation stating it should work. Issue has been inactive for over five years with no maintainer response.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 20
Confidence: 90
Support Request: 5
close stale snapcraft export-login --expires silently sets expiry to None when given ISO 8601 dates without time. Untriaged, inactive for over 5 years, and likely superseded by newer project versions.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 60
Support Request: 5
needs triage CLI export-login --expires silently defaults to None when given date-only ISO 8601 strings, despite documentation stating dates should suffice. Issue has zero maintainer engagement after over five years.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.