-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Updates the test suite to use the transform service #30605
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -97,8 +97,8 @@ func installExtraPackages(requirementsFile string) error { | |||
return nil | ||||
} | ||||
|
||||
func getUpdatedRequirementsFile(oldRequirementsFileName string, dependenciesDir string) (string, error) { | ||||
oldExtraPackages, err := getLines(filepath.Join(dependenciesDir, oldRequirementsFileName)) | ||||
func getUpdatedRequirementsFile(oldDependenciesRequirementsFile string, dependenciesDir string) (string, error) { | ||||
oldExtraPackages, err := getLines(oldDependenciesRequirementsFile) | ||||
if err != nil { | ||||
return "", err | ||||
} | ||||
|
@@ -145,9 +145,20 @@ func launchExpansionServiceProcess() error { | |||
|
||||
args := []string{"-m", expansionServiceEntrypoint, "-p", strconv.Itoa(*port), "--fully_qualified_name_glob", "*"} | ||||
|
||||
if *requirements_file != "" { | ||||
log.Printf("Received the requirements file %v", *requirements_file) | ||||
updatedRequirementsFileName, err := getUpdatedRequirementsFile(*requirements_file, *dependencies_dir) | ||||
// Requirements file with dependencies to install. | ||||
// Note that we have to look for the requirements file in the dependencies | ||||
// volume here not the requirements file at the top level. Latter provides | ||||
// Beam dependencies. | ||||
dependencies_requirements_file := filepath.Join(*dependencies_dir, *requirements_file) | ||||
dependencies_requirements_file_exists := false | ||||
if _, err := os.Stat(dependencies_requirements_file); err == nil { | ||||
dependencies_requirements_file_exists = true | ||||
} | ||||
|
||||
// We only try to install dependencies, if the requirements file exists. | ||||
if dependencies_requirements_file_exists { | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The indentation here seems off, this should be in line with the comment, right? Non-blocking for this PR, but seems like we should catch this with a go fmt check. It would be good to bring all the boot.go files under beam/.github/workflows/go_tests.yml Line 61 in 986f67f
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For this pr, could you run There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||||
log.Printf("Received the requirements file %s with extra packages.", dependencies_requirements_file) | ||||
updatedRequirementsFileName, err := getUpdatedRequirementsFile(dependencies_requirements_file, *dependencies_dir) | ||||
if err != nil { | ||||
return err | ||||
} | ||||
|
@@ -161,7 +172,10 @@ func launchExpansionServiceProcess() error { | |||
if err != nil { | ||||
return err | ||||
} | ||||
} else { | ||||
log.Printf("Requirements file %s was provided but not available.", dependencies_requirements_file) | ||||
} | ||||
|
||||
if err := execx.Execute(pythonVersion, args...); err != nil { | ||||
return fmt.Errorf("could not start the expansion service: %s", err) | ||||
} | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets add content here and check it in like 97f8dae for consistency
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.