jaegertracing / jaeger

CNCF Jaeger, a Distributed Tracing Platform
https://www.jaegertracing.io/
Apache License 2.0
20.48k stars 2.44k forks source link

Simplify contributing.md #2572

Closed albertteoh closed 4 years ago

albertteoh commented 4 years ago

This proposal is motivated by a PR comment originally posted by @yurishkuro in https://github.com/jaegertracing/jaeger/pull/2548#discussion_r502507111.

Requirement - what kind of business use case are you trying to solve?

Problem - what in Jaeger blocks you from solving the requirement?

contributing.md currently requires these prerequisite steps:

git submodule update --init --recursive
make install-tools
make test
# if you wish to build platform binaries locally - the step below is needed.
make build-ui

git submodule update --init --recursive and make build-ui are specific to UI builds. Instead of making these prerequisites, could we make these an explicit dependency within our Makefile and only run them when performing UI-related builds?

This has the added benefit of automating these steps where required and, IMHO, is more correct. Consider the following scenarios:

Proposal - what do you suggest to solve the problem or improve the existing situation?

Any open questions to address

yurishkuro commented 4 years ago

Add missing build-ui dependencies to make targets that depend on UI assets, e.g. build-all-in-one should have a dependency on UI assets, but why only build-all-in-one-linux takes the build-ui dependency?

I can answer this one: build-ui is incredibly expensive to run, takes several minutes, and is actually rarely needed unless it's part of the CI run. If the target itself was sensitive to changes in the jaeger-ui directory, then it would probably be ok to add it as dependency in many places.

yurishkuro commented 4 years ago

Add git submodule update --init --recursive as part of the build-ui target

I am not in favor of this. A target that verifies that jaeger-ui submodule has been initialized would be preferable. Doing a forced update makes it difficult to test small UI changes where the submodule may not be on the committed version.

yurishkuro commented 4 years ago

Maybe there are good reasons to having git submodule update.. and make build-ui as explicit prerequisite steps that I have overlooked?

afaik they were not prerequisites, but just included under "how to build UI" sections.

What is the reason for requiring make test as a prerequisite?

I think it generally validates that the local environment is properly set up. After all we're talking about contributing to Jaeger, if someone can't run 'make test' for whatever reason, they are probably not ready to contribute (we do not want to encourage using Travis for testing little fixes). For comparison, jaeger-ui project even has a commit hook that forces you to run yarn test before committing.

yurishkuro commented 4 years ago

+1 on most suggestions.