experimentLastRun returns the date (YYYY-MM-DD) of the most recent run, or "" if unknown.
(state *ExperimentState)
| 728 | |
| 729 | // experimentLastRun returns the date (YYYY-MM-DD) of the most recent run, or "" if unknown. |
| 730 | func experimentLastRun(state *ExperimentState) string { |
| 731 | if len(state.Runs) == 0 { |
| 732 | return "" |
| 733 | } |
| 734 | ts := state.Runs[len(state.Runs)-1].Timestamp |
| 735 | if len(ts) >= 10 { |
| 736 | return ts[:10] |
| 737 | } |
| 738 | return ts |
| 739 | } |
| 740 | |
| 741 | // extractExperimentName extracts the workflow ID from a branch ref. |
| 742 | // |
no outgoing calls