Skip to content
This repository was archived by the owner on Aug 31, 2022. It is now read-only.

Commit 1b9292e

Browse files
committed
Preparations for move the dashboard to a new repo
We move / copy all the dashboard related files in the repository to the web-server/v0.4 directory so that that one directory can be used as the basis for the new pbench-dashboard repo.
1 parent 0bf912e commit 1b9292e

30 files changed

+1731
-0
lines changed

.travis.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
dist: bionic
2+
jobs:
3+
include:
4+
- stage: "Agent Unit Tests"
5+
name: "agent-unit-tests"
6+
language: python
7+
python:
8+
- "3.6"
9+
before_install:
10+
- sudo apt-get update
11+
install:
12+
# Perl JSON and JSON-XS required
13+
- sudo apt-get install libjson-perl libjson-xs-perl
14+
script: ./agent/run-unittests
15+
16+
- stage: "Server Unit Tests"
17+
name: "server-unit-tests"
18+
language: python
19+
python:
20+
- "3.6"
21+
env:
22+
- PBENCH_UNITTEST_SERVER_MODE=serial
23+
before_install:
24+
- sudo apt-get update
25+
install:
26+
- pip install elasticsearch sh boto3
27+
script: ./server/bin/unittests
28+
29+
- stage: "Dashboard Unit Tests"
30+
name: "dashboard-unit-tests"
31+
language: node_js
32+
node_js:
33+
- "13"
34+
sudo: required
35+
before_install:
36+
# Remove /usr/local/bin/yarn to avoid conflicts with installed version
37+
- "sudo rm /usr/local/bin/yarn"
38+
install:
39+
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
40+
- sudo echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
41+
- sudo apt-get update -y -qq
42+
- sudo apt-get install -y -qq yarn
43+
script: ./web-server/v0.4/unittests
44+
45+
- stage: "Dashboard E2E Tests"
46+
name: "dashboard-e2e-tests"
47+
language: node_js
48+
node_js:
49+
- "13"
50+
sudo: required
51+
services:
52+
# allow headless browser tests
53+
- xvfb
54+
addons:
55+
chrome: stable
56+
hostname: localhost
57+
before_install:
58+
# Enable user namespace cloning
59+
- "sysctl kernel.unprivileged_userns_clone=1"
60+
# Remove /usr/local/bin/yarn to avoid conflicts with the "old" version
61+
# provided by the TravisCI language "node_js".
62+
- "sudo rm /usr/local/bin/yarn"
63+
install:
64+
- sudo apt-key adv --fetch-keys http://dl.yarnpkg.com/debian/pubkey.gpg
65+
- sudo echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
66+
- sudo apt-get update -y -qq
67+
- sudo apt-get install -y -qq yarn
68+
script: ./web-server/v0.4/e2etests

CONTRIBUTION.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# CONTRIBUTION GUIDELINES FOR PBENCH
2+
3+
## 1. Forking the repository:
4+
![Image](https://lh3.googleusercontent.com/qzbrO61ihlrw1uZUzY-oUBV0z2AX2nQhB9mvvo_27WHMEuF1CkElqEUTTW01YJqPBaJTyT_DfPRqXAIfXetNB7yEr1foW2Q79RLgqfw-rnNlx2ZyX3gydY3Dr4xoInckbcevTq_7)
5+
6+
Forking a repository allows you to freely experiment with changes without affecting the original project. Most commonly, forks are used to either propose changes to someone else's project or to use someone else's project as a starting point for your own idea.
7+
8+
## 2. Cloning
9+
Cloning is used to create a local copy of the repository. It takes only one command in the terminal to clone the repository.
10+
git clone https://github.com/distributed-system-analysis/pbench.git
11+
## 3. Choosing an issue to work upon
12+
1. Go to the issues section, to find a list of open issues.
13+
14+
![Image](https://lh6.googleusercontent.com/4d5CY0nB21_T6iSwLDLUw2voFDPbm3miipC4vthubhUoiipTrVnqHx3vBTIqHyaOdhyUR4Xbc-OV6AXw-BSpla2QnT6EahvzQzJKm42NQn9R0AYocjA50VfPAKRCAIFmNya6IY0e)
15+
16+
2. Select the issues you are interested to work upon based upon the labels and descriptions.
17+
![Image](https://lh5.googleusercontent.com/W8IFbEHd56Ykese8OPVV8eMuakkYIO-N2XjeGSY6L3Mysr2p9-K7BMV6sh4ZJDfm1vrycqvWMflL4nx_36zUEHcZ4kgbbP5a1BHOburE8st3IuQhwIF8eq2y8Cix__E1sMGs13gj)
18+
3. It is a good practice to assign the issue to yourself to let others know you're working upon it.
19+
![Image](https://lh6.googleusercontent.com/MsF7-9lTnDgQsi888PqSFtWCOfoxnhDQVfNv6aem7AcEo06gDrCk-ISZ8C3VIe6AUfRfglRq3xgaHSzS2yfQHutWkbHingQswCYGpBqVOaa_WImECxYvKAZM-i6lr7HirFDAhA41)
20+
## Making changes to the codebase
21+
- Follow the instructions in the README.md to setup and install pbench.
22+
- Follow the instruction in the README.md to use web server (PBench Dashboard)
23+
- Save your changes by creating own local branches on git
24+
- While doing the changes, follow the style guides:
25+
- JavaScript: https://github.com/airbnb/javascript
26+
- React: https://github.com/airbnb/javascript/tree/master/react
27+
- CSS: https://github.com/airbnb/javascript/tree/master/css-in-javascript
28+
29+
## Add, Commit and Push
30+
- Follow these commands to push the changes to your branch.
31+
```
32+
git add .
33+
git commit -m "Issue solved"
34+
git push origin branch_name
35+
```
36+
37+
## Conventions on commits, PRs, and overall git best practices.
38+
- Commit messages should have a short description (50 - 70 characters) followed by a longer format description of the changes below if needed. You’ll also notice each line is formatted for a specific length in the longer format description. For example:
39+
Extend auditing to incoming, results, and users
40+
41+
```
42+
The server audit is now applied to the incoming, results, and users
43+
directory hierarchies. Any unpacked tar ball should now be compre-
44+
hensively checked to see that all is in the correct place.
45+
46+
The test-20 unit test gold file holds an example of an audit report
47+
covering all the possible outputs it can emit. Each unit test runs
48+
the report as well, and they have been updated accordingly.
49+
```
50+
- For more on best practices, check out this article for reference from time to time: https://www.git-tower.com/learn/git/ebook/en/command-line/appendix/best-practices
51+
## Opening a pull request
52+
1. **If there are multiple commits, Squash down the commits to one**
53+
2. Commit the changes.
54+
3. Click on New Pull Request
55+
4. Write appropriate Pull Request Title stating the fix.
56+
a. Use present tense (ex. Fixes, Changes, Fixing, Changing..)
57+
5. References the issue that the PR is fixing with **“Fixes #issue_number”** in the description.
58+
6. Provide a detailed description (at least 50 - 70 characters) of the changes.(If UI, add screenshots or gif)
59+
7. Make sure that the branches can be automatically merged(otherwise rebase the PR with master) and then click : Create pull request .
60+
![Image](https://lh5.googleusercontent.com/V14SjFhimKYF1fH6TXMfaoZtDCj2ZH0d9USqe8YHyn0xOOVYekiXtx2CwdOQbSvxWPB6JVEfi4jSM_mjkSMaaI7voQNYQ8gDWntMhzCMbj3wrK3H4eCSEsdVq_XP_aZMdb5h9xU4)
61+
62+
8. Assign the PR to yourself and add appropriate labels.
63+
9. Add “**WIP**” label if the work is still in progress.
64+
10. Add "**DO NOT MERGE**" label if the work is not needed to be merged or there is no agreement on the work yet.
65+
11. Make sure to add Milestone to the PR to mention specific release.
66+
12. Request for review once the work is ready for getting reviewed
67+
![Image](https://lh6.googleusercontent.com/iM-vaIsFQ8ew7vpNDUvmSY9MVjyTadTZkngdlQfo7qYe_QQuFSA8yZ_3P40fBdeNw6Q-lSJwDD59jfBoQgdNP3mGHPgrjVicsyGt8QkMMAaDYowHsIyAnukXsEiFPSOnYnrZyze3)
68+
69+
## Creating an Isssue
70+
1. Make sure to add proper details to the Issue raised
71+
2. Upload screenshot(if possible) in dashboard issues
72+
3. Apply proper labels to the Issue
73+
4. Make sure to add Milestone and Project to the issue to mention specific release.
74+
5. Try to actively respond to the communication in case of comments in the same issue.
75+
76+
## Reviewing a pull request
77+
1. Go to Files changed and check for the fixes proposed by the Pull Request
78+
2. Check for certain general criteria:
79+
a. The PR has no merge conflicts with the base branch
80+
b. The commits are squashed into one (if multiple)
81+
c. There is proper indentation and alignment
82+
d. No additional lines are added unnecessarily
83+
e. The code has proper explanation with the comment lines (If required)
84+
f. Do not merge the PR with "DO NOT MERGE" or "WIP" label.
85+
3. In case of the requirement of running the changes in the PR in local system follow the mentioned process:
86+
- To fetch a remote PR into your local repo,
87+
```
88+
git fetch origin pull/ID/head:BRANCHNAME
89+
where ID is the pull request id and BRANCHNAME is the name of the new branch that you want to create. Once you have created the branch, then simply
90+
git checkout BRANCHNAME
91+
```
92+
-If modification is required, then either “Request for changes” or add “General comments” for your feedback
93+
94+
- For more information about reviewing PR in github go through:
95+
https://help.github.com/en/articles/about-pull-request-reviews
96+
https://help.github.com/en/articles/reviewing-proposed-changes-in-a-pull-request
97+
98+
99+

0 commit comments

Comments
 (0)