Optum / dce-cli

Disposable Cloud Environment CLI
Apache License 2.0
38 stars 20 forks source link

Creating an account with a expiration parameter doesn't seem to work correctly #77

Closed JacobWeyer closed 4 years ago

JacobWeyer commented 4 years ago

Version information DCE v0.27.0

Describe the bug When leasing an account with an expiration of 1h the account defaults to one week

To Reproduce Steps to reproduce the behavior:

dce leases create -b 500 -c USD -e jacobweyer@example.com -E 1h -p jacob.weyer12

Lease created: {
    "accountId": "889727206689",
    "budgetAmount": 500,
    "budgetCurrency": "USD",
    "budgetNotificationEmails": [
        "jacobweyer@gmail.com"
    ],
    "createdOn": 1582563804,
    "expiresOn": 1583168603, --> 03/02/2020 @ 5:03pm (UTC)
    "id": "5eb3f56b-d9e8-4025-a70e-baba17411c7c",
    "lastModifiedOn": 1582563804,
    "leaseStatus": "Active",
    "leaseStatusModifiedOn": 1582563804, -> 02/24/2020 @ 5:03pm (UTC)
    "leaseStatusReason": "Active",
    "principalId": "jacob.weyer12"
}

Doing the same with 2w still leased for only one week. Also trying just "1h" with quotes did not work.

Expected behavior It should lease for only one hour, rather than one week

eschwartz commented 4 years ago

Thanks for bringing this up @JacobWeyer . I'm going to have to dig a bit deeper to figure out what's going on here.

eschwartz commented 4 years ago

@JacobWeyer I found the issue, its a bug in the dce-cli code around the time parsing. I'll get a fix out shortly, and we'll try to get a release out the door soon.

JacobWeyer commented 4 years ago

Awesome, thanks for the update and for putting in the effort! Hoping my confidence with Go increases a bit for me to do these things as well.

On Tue, Feb 25, 2020 at 5:12 PM Edan Schwartz notifications@github.com wrote:

@JacobWeyer https://github.com/JacobWeyer I found the issue, its a bug in the dce-cli code around the time parsing. I'll get a fix out shortly, and we'll try to get a release out the door soon.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Optum/dce-cli/issues/77?email_source=notifications&email_token=ACFEQJXY4KCFGY55I5VNUF3REWJTPA5CNFSM4K2MNPH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM5WZMA#issuecomment-591097008, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFEQJT5UULAPLDK2GKJP23REWJTPANCNFSM4K2MNPHQ .

eschwartz commented 4 years ago

@JacobWeyer this should be resolved by #78 We'll get a release of the dce-cli out as soon as we can

JacobWeyer commented 4 years ago

Don’t rush on my account, just glad it’s an actual issue rather than me using the tool wrong.

On Wed, Feb 26, 2020 at 4:43 PM Edan Schwartz notifications@github.com wrote:

@JacobWeyer https://github.com/JacobWeyer this should be resolved by #78 https://github.com/Optum/dce-cli/pull/78 We'll get a release of the dce-cli out as soon as we can

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Optum/dce-cli/issues/77?email_source=notifications&email_token=ACFEQJSSW2HVDYGOSYRE2K3RE3O7NA5CNFSM4K2MNPH2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENCAD2Y#issuecomment-591659499, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFEQJSUX2ZHOTSWZYSJK23RE3O7NANCNFSM4K2MNPHQ .