Skip to content
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

[infra] Improve srcmap support for Go projects (#3355, #2714). #3664

Merged
merged 2 commits into from
Apr 17, 2020
Merged

Conversation

Dor1s
Copy link
Contributor

@Dor1s Dor1s commented Apr 16, 2020

Haven't properly tested this yet, please consider it as a draft, but should be fine to review.

I also wanted to pass FUZZING_LANGUAGE to the helper.py shell, but we can't parse yaml without installing pyyaml module, so not sure about that, probably not necessary, as users don't typically run srcmap command.

@TravisBuddy
Copy link

Travis tests have failed

Hey @Dor1s,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: 6e5a6a70-8036-11ea-ac79-d7a1e92f42eb

Copy link
Collaborator

@inferno-chromium inferno-chromium left a comment

Choose a reason for hiding this comment

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

Thanks so much!

},
]
build_steps = build_lib.project_image_steps(name, image,
project_yaml['language'])
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: move project_yaml['language'] to local var language like others. same for other use below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

]
build_steps = build_lib.project_image_steps(name, image,
project_yaml['language'])
build_steps.append({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add a comment on why msan-builder is only used here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, it's not used in the coverage job because we don't use MSan there

Copy link
Collaborator

@oliverchang oliverchang left a comment

Choose a reason for hiding this comment

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

LGTM with a question

PATHS_TO_SCAN="$SRC"

if [[ $FUZZING_LANGUAGE == "go" ]]; then
PATHS_TO_SCAN="$PATHS_TO_SCAN $GOPATH"
Copy link
Collaborator

Choose a reason for hiding this comment

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

What's in $GOPATH if this isn't a Go project? Can we use that to determining whether or not to scan it, rather than introducing another env var?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's always set to /root/go in the base-builder and always has a few packages we install, so scanning unconditionally will result in irrelevant Go packages revisions in srcmap of any project we build

Copy link
Contributor Author

@Dor1s Dor1s left a comment

Choose a reason for hiding this comment

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

Thanks for the reviews! I'll merge after testing.

},
]
build_steps = build_lib.project_image_steps(name, image,
project_yaml['language'])
Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

]
build_steps = build_lib.project_image_steps(name, image,
project_yaml['language'])
build_steps.append({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, it's not used in the coverage job because we don't use MSan there

@TravisBuddy
Copy link

Travis tests have failed

Hey @Dor1s,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.

TravisBuddy Request Identifier: e53a8fd0-8054-11ea-a03b-f348d6d5339b

@Dor1s
Copy link
Contributor Author

Dor1s commented Apr 17, 2020

Tested on GCB (without updated srcmap inside the base-builder) and with an updated srcmap locally. Merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants