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

fix: Juju passes the expiry in a field 'expiry', not 'expires' #1317

Merged

Conversation

tonyandrewmeyer
Copy link
Contributor

@tonyandrewmeyer tonyandrewmeyer commented Aug 15, 2024

secret-info-get gives the expiry back in a field called "expiry":

$ juju exec --unit thirteensixteen/0 -- secret-info-get cqv88thtvhl393c8hs20
cqv88thtvhl393c8hs20:
  revision: 1
  label: food
  owner: application
  rotation: daily
  expiry: 2024-09-04T23:12:09Z
  rotates: 2024-08-16T23:12:10Z

We were incorrectly looking for it in a field called "expires", which is the attribute name we use.

Fixes #1316

Copy link
Collaborator

@benhoyt benhoyt left a comment

Choose a reason for hiding this comment

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

Thanks! Oddly, though the JSON/YAML field is called expiry, the Go field name is LatestExpireTime: https://github.com/juju/juju/blob/55ca71ee96903fbcbf45c2f1fa2326d14173152a/worker/uniter/runner/jujuc/secret-info-get.go#L83

@tonyandrewmeyer tonyandrewmeyer merged commit 43b5af9 into canonical:main Aug 16, 2024
28 checks passed
@tonyandrewmeyer tonyandrewmeyer deleted the fix-expiry-field-name-1316 branch August 16, 2024 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Juju secret expiry is null
3 participants