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

Allow non-default parameter utcNow() calls #3111

Open
tsujp opened this issue Jun 8, 2021 · 3 comments
Open

Allow non-default parameter utcNow() calls #3111

tsujp opened this issue Jun 8, 2021 · 3 comments
Labels
enhancement New feature or request intermediate language Related to the intermediate language

Comments

@tsujp
Copy link

tsujp commented Jun 8, 2021

Is your feature request related to a problem? Please describe.

utcNow() as per the documentation can only be assigned as the default value of a parameter. This means if the sole function of using utcNow() is to calculate some time T in the future (for example for SAS token expiry) then a parameter is being exposed when it ought not to be.

Describe the solution you'd like

Allow utcNow() to be called anywhere inside the template and/or templateStartTime() (or better-named) to be called anywhere inside the template which has the time the instant the template was invoked (what utcNow() as a default parameter does now, but while keeping utcNow() unchanged).

@tsujp tsujp added the enhancement New feature or request label Jun 8, 2021
@ghost ghost added the Needs: Triage 🔍 label Jun 8, 2021
@alex-frankel alex-frankel added intermediate language Related to the intermediate language and removed Needs: Triage 🔍 labels Jun 9, 2021
@anthony-c-martin
Copy link
Member

What about exposing a property on the deployment object - e.g. deployment().startTime?

@tsujp
Copy link
Author

tsujp commented Jun 15, 2021

Sounds good to me.

@codehunter13
Copy link

codehunter13 commented Mar 27, 2023

any progress on this?
If (and only in that case) my container app is redeployed, i need to create a unique name for the revision suffix. don't know another way than the above solution. Passing in a date(or something else) would create a new revision each deloy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request intermediate language Related to the intermediate language
Projects
None yet
Development

No branches or pull requests

4 participants