Skip to content

Commit 57b5dc1

Browse files
authored
Update contribution guide (#262)
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
1 parent 439a7f1 commit 57b5dc1

2 files changed

Lines changed: 27 additions & 6 deletions

File tree

CONTRIBUTING.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,33 @@ with `git commit -s`.
1010

1111
## Contribution Flow
1212

13+
### Forking
14+
15+
We recommend forking the dbsp repository and contributing from a fork.
16+
This [page](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
17+
has instructions on how to fork a repository. After forking do not
18+
forget to add dbsp as a remote repository:
19+
20+
```shell
21+
git remote add upstream https://github.com/feldera/dbsp.git
22+
```
23+
24+
### Workflow
25+
1326
This is a rough outline of what a contributor's workflow looks like:
1427

1528
- Create a topic branch from where you want to base your work
1629
- Make commits of logical units
1730
- Make sure your commit messages are in the proper format (see below)
18-
- Push your changes to a topic branch in the repository or a fork if you don't have commit access to (the reason that pushing directly to the repo is preferred is because then CI will be able to add benchmark results to the PR in the comments).
31+
- Push your changes to a topic branch in the repository (push to your fork if
32+
you don't have commit access to the dbsp repository --- pushing directly
33+
to the repo is preferred because then CI will be able to add benchmark
34+
results to the PR in the comments).
1935
- Submit a pull request
2036

2137
Example:
2238

2339
``` shell
24-
git remote add upstream https://github.com/feldera/dbsp.git
2540
git checkout -b my-new-feature main
2641
git commit -a
2742
git push origin my-new-feature
@@ -35,6 +50,12 @@ When your branch gets out of sync with the feldera/main branch, use the followin
3550
git checkout my-new-feature
3651
git fetch -a
3752
git pull --rebase upstream main
53+
git push --force-with-lease upstream my-new-feature
54+
```
55+
56+
If you don't have permissions replace the last command with
57+
58+
```
3859
git push --force-with-lease origin my-new-feature
3960
```
4061

@@ -47,15 +68,15 @@ If your pull request contains a single commit or your changes are related to the
4768
amend the commit.
4869

4970
``` shell
50-
git add .
71+
git add <files to add>
5172
git commit --amend
5273
git push --force-with-lease origin my-new-feature
5374
```
5475

5576
If you need to squash changes into an earlier commit, you can use:
5677

5778
``` shell
58-
git add .
79+
git add <files to add>
5980
git commit --fixup <commit>
6081
git rebase -i --autosquash main
6182
git push --force-with-lease origin my-new-feature
@@ -67,7 +88,7 @@ notification when you git push.
6788
### Merging a pull request
6889

6990
Since we run benchmarks as part of CI it's good practice to preserve the commit IDs of the feature branch
70-
we've worked on (and benchmarked). Unfortunately, [the github UI does not have support for this](https://github.com/community/community/discussions/4618)
91+
we've worked on (and benchmarked). Unfortunately, [the github UI does not have support for this](https://github.com/community/community/discussions/4618)
7192
(it only allows rebase, squash and merge commits to close PRs).
7293
Therefore, it's recommended to merge PRs using the following git CLI invocation:
7394

demo/project_demo04-SecOps/simulator/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ fn main() {
522522

523523
println!("Generating repositories");
524524
let repositories = generate_repositories(NUM_REPOSITORIES);
525-
println!("repos: {repositories:#?}");
525+
// println!("repos: {repositories:#?}");
526526
producer.send_to_topic(TOPIC_REPOSITORY, &[repositories]);
527527

528528
println!("Generating commits");

0 commit comments

Comments
 (0)