Skip to content
This repository has been archived by the owner on Jul 14, 2022. It is now read-only.

Feat/pre genesis wf #59

Merged
merged 3 commits into from
Oct 12, 2021
Merged

Feat/pre genesis wf #59

merged 3 commits into from
Oct 12, 2021

Conversation

UchicagoZchen138
Copy link
Contributor

@UchicagoZchen138 UchicagoZchen138 commented Oct 12, 2021

Jira Ticket: PXP-8788 PXP-8788 PXP-8843

Feature

We have via this PR fixed a variety of bugs described in the tickets above. Also by fixing these bugs we are finally able to run the pre-genesis workflow.

Bug fix

  1. Right now initworkdir will put all commons and user files into the working directory, this PR will fix that issue
  2. We are adding a temp fix for {} expression evaluation in javascript

mariner/tool.go Outdated
path, err := filePath(v)
if err != nil {
tool.Task.infof("failed to extract path from file: %v", v)
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not continue here, instead we should return the error

mariner/tool.go Outdated
path, err := filePath(f)
if err != nil {
tool.Task.infof("failed to extract path from file: %v", f)
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not continue, but return error

mariner/tool.go Outdated
switch x := output.(type) {
case *File:
path := output.(*File).Path
tool.Task.infof("*File - Path: %v", path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently i dont handle this case, so either we handle it here or we just remove this and the []*File case below to be caught in default and throw the exception

mariner/tool.go Outdated
continue
}
switch {
case strings.HasPrefix(path, userPrefix):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this series of case logic is repeated in many different areas here so perhaps should be turned into a function?

engine.IsInitWorkDir = "true"
tool.Task.infof("s3input paths: %v", tool.S3Input.Paths)
tool.Task.infof("initWorkDirFiles: %v", tool.initWorkDirFiles)
continue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dislike how this function has to use the continue for this situation

@UchicagoZchen138 UchicagoZchen138 force-pushed the feat/pre-genesis-wf branch 2 times, most recently from b0ce0a3 to b8a463c Compare October 12, 2021 19:24
Copy link
Contributor

@kmhernan kmhernan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@UchicagoZchen138 UchicagoZchen138 merged commit 19e1d37 into master Oct 12, 2021
@UchicagoZchen138 UchicagoZchen138 deleted the feat/pre-genesis-wf branch October 12, 2021 20:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants