fetchLocalExperimentDetails reads the state.json from a local experiment branch.
(branchName, workflowID string)
| 561 | |
| 562 | // fetchLocalExperimentDetails reads the state.json from a local experiment branch. |
| 563 | func fetchLocalExperimentDetails(branchName, workflowID string) (*ExperimentDetails, error) { |
| 564 | experimentsLog.Printf("Fetching local experiment details: branch=%s", branchName) |
| 565 | |
| 566 | ref := "origin/" + branchName |
| 567 | if !gitRefExists(ref) { |
| 568 | if !gitRefExists(branchName) { |
| 569 | return nil, fmt.Errorf("experiment branch %q not found locally (tried origin/%s and %s)", |
| 570 | branchName, branchName, branchName) |
| 571 | } |
| 572 | ref = branchName |
| 573 | } |
| 574 | |
| 575 | state := readLocalExperimentState(ref) |
| 576 | return experimentDetailsFromState(workflowID, branchName, state), nil |
| 577 | } |
| 578 | |
| 579 | // fetchRemoteExperimentDetails reads the state.json from a remote experiment branch. |
| 580 | func fetchRemoteExperimentDetails(repoOverride, branchName, workflowID string) (*ExperimentDetails, error) { |
no test coverage detected