Skip to content

Commit

Permalink
Add deployed-at timestamp in annotations for argo-workflows (#1633)
Browse files Browse the repository at this point in the history
* Add deployed-at timestamp in annotations for argo-workflows

* Use ISO8601 timestamp

* Use better annotation name

* Rename annotation

* Formatting
  • Loading branch information
rohanrebello authored Nov 17, 2023
1 parent 6badc1d commit 6165987
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions metaflow/plugins/argo/argo_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,11 +615,16 @@ def _compile_workflow_template(self):
# generate container templates at the top level (in WorkflowSpec) and maintain
# references to them within the DAGTask.

from datetime import datetime, timezone

annotations = {
"metaflow/production_token": self.production_token,
"metaflow/owner": self.username,
"metaflow/user": "argo-workflows",
"metaflow/flow_name": self.flow.name,
"metaflow/deployment_timestamp": str(
datetime.now(timezone.utc).isoformat()
),
}

if self.parameters:
Expand Down

0 comments on commit 6165987

Please sign in to comment.