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

Dedup algo #1

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c55b0d6
feat: add grpc-server support for record and replay (#242)
iamskp99 Feb 1, 2023
0049d3d
ci: updates the test job of main.yml (#295)
re-Tick Feb 1, 2023
2bfc01e
updates to latest go-sdk version (#298)
re-Tick Feb 1, 2023
a9592a5
docs: updated readme (#300)
nehagup Feb 3, 2023
cc3a4bc
ci: use the latest keploy binary in test jobs (#299)
re-Tick Feb 3, 2023
63bcaad
docs: removed caching on badge (#301)
nehagup Feb 3, 2023
d429aeb
feat: filter captured fields for data compliance (#289)
PranshuSrivastava Feb 8, 2023
2033fcb
docs: updating Contribution Guide (#307)
Sonichigo Feb 9, 2023
6b55c86
Added telemetry events at service level
charankamarapu Feb 20, 2023
a3dffab
adding telemetry object in testCases
charankamarapu Feb 20, 2023
6b0e38b
Added telemetry github action
charankamarapu Feb 22, 2023
11bd8f6
docs : update readme UI Link Removed (#313)
Sonichigo Feb 24, 2023
69edc21
chnaged java project to samples-java
charankamarapu Feb 24, 2023
2bb0fc0
Merge branch 'main' into bug/telemetry-update
charankamarapu Feb 24, 2023
c63c6a3
removing unnecessary comments
charankamarapu Feb 24, 2023
7dee72f
Merge pull request #315 from keploy/bug/telemetry-update
charankamarapu Mar 1, 2023
cfd295e
Predefining Installation_id in telemetry-check
charankamarapu Mar 2, 2023
0759fa6
docs: adding details of the only unit test case file needed (#330)
Hermione2408 Mar 3, 2023
4059a2f
Removing caching from telemetry-check.yml
charankamarapu Mar 3, 2023
ee04bcb
Merge pull request #336 from keploy/telemetry-check-update
charankamarapu Mar 3, 2023
690884c
Adding permissions to telemetry-check
charankamarapu Mar 3, 2023
94b8056
Merge branch 'main' into telemetry-check-update
charankamarapu Mar 3, 2023
9d0d875
Merge pull request #339 from keploy/telemetry-check-update
charankamarapu Mar 3, 2023
9612ffa
Correcting telemetry-check github action
charankamarapu Mar 3, 2023
67f58b4
Merge pull request #341 from keploy/telemetry-correction
charankamarapu Mar 3, 2023
e2c7c33
fix: typo in ReadMe (#364)
Ananya2001-an Mar 4, 2023
d31cada
docs: updated Code of Conduct (#308)
ItsRoy69 Mar 6, 2023
74bcf7c
chore: update installation link in README (#440)
ADV1K Mar 6, 2023
0036aaf
Telemetry change
charankamarapu Mar 9, 2023
c69f9aa
Merge pull request #459 from keploy/Telemetry-Change
charankamarapu Mar 9, 2023
ec2b1ff
refactor: add field in testcase in proto (#393)
re-Tick Mar 10, 2023
ee0e9c3
docs: Update README.md (#462)
himanshu1221 Mar 11, 2023
77a6453
feat: add dedup logic
Sarthak160 Mar 31, 2023
d580c69
feat: add extract.js for javascript dedup
Sarthak160 Apr 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,37 @@ jobs:
- name: Build
run: go build -v ./...

- name: Test-Export
run: |
go test -coverpkg=./... -coverprofile=coverage1.tmp.txt -covermode=atomic ./...
cat coverage1.tmp.txt | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage1.txt
env:
KEPLOY_API_KEY: 81f83aeeedddf453966347dc136c66
ENABLE_DEDUP: false
ENABLE_TEST_EXPORT: true
KEPLOY_APP_NAME: Keploy-Test-App-2
KEPLOY_REPORT_PATH: ./
# - name: Test-Export
# run: |
# go test -coverpkg=./... -coverprofile=coverage1.tmp.txt -covermode=atomic ./...
# cat coverage1.tmp.txt | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage1.txt
# env:
# KEPLOY_API_KEY: 81f83aeeedddf453966347dc136c66
# ENABLE_DEDUP: false
# ENABLE_TEST_EXPORT: true
# KEPLOY_APP_NAME: Keploy-Test-App-2
# KEPLOY_REPORT_PATH: ./

- name: Test
run: |
go test -coverpkg=./... -coverprofile=coverage2.tmp.txt -covermode=atomic ./...
cat coverage2.tmp.txt | grep -v "mode: atomic" | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage2.txt
env:
KEPLOY_API_KEY: 81f83aeeedddf453966347dc136c66
ENABLE_DEDUP: false
ENABLE_TEST_EXPORT: false

- name: Test-withDeDupEnabled
run: |
go test -coverpkg=./... -coverprofile=coverage3.tmp.txt -covermode=atomic ./...
cat coverage3.tmp.txt | grep -v "mode: atomic" | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage3.txt
cat coverage1.txt coverage2.txt coverage3.txt > coverage.txt
export PORT=6790
curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/keploy /usr/local/bin && export KEPLOY_MODE=off && keploy &
export PORT=6789 && export ENABLE_TEST_EXPORT=false && go test -coverpkg=./... -coverprofile=coverage.tmp.txt -covermode=atomic ./...
cat coverage.tmp.txt | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage.txt
env:
KEPLOY_API_KEY: 81f83aeeedddf453966347dc136c66
ENABLE_DEDUP: true
ENABLE_TEST_EXPORT: false
ENABLE_TELEMETRY: false

# - name: Test-withDeDupEnabled
# run: |
# go test -coverpkg=./... -coverprofile=coverage3.tmp.txt -covermode=atomic ./...
# cat coverage3.tmp.txt | grep -v "mode: atomic" | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage3.txt
# cat coverage1.txt coverage2.txt coverage3.txt > coverage.txt
# env:
# KEPLOY_API_KEY: 81f83aeeedddf453966347dc136c66
# ENABLE_DEDUP: true
# ENABLE_TEST_EXPORT: false


# - uses: codecov/codecov-action@v2
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,14 @@ jobs:

- name: Test
run: |
go test -coverpkg=./... -coverprofile=coverage.tmp.txt -covermode=atomic ./...
export PORT=6790
curl --silent --location "https://github.com/keploy/keploy/releases/latest/download/keploy_linux_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/keploy /usr/local/bin && export KEPLOY_MODE=off && keploy &
export PORT=6789 && export ENABLE_TEST_EXPORT=false && go test -coverpkg=./... -coverprofile=coverage.tmp.txt -covermode=atomic ./...
cat coverage.tmp.txt | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage.txt
env:
KEPLOY_API_KEY: 81f83aeeedddf453966347dc136c66
ENABLE_DEDUP: false
ENABLE_TEST_EXPORT: false

- name: Test-withDeDupEnabled
run: |
go test -coverpkg=./... -coverprofile=coverage.tmp.txt -covermode=atomic ./...
cat coverage.tmp.txt | grep -v -e "generated.go" -e "_gen.go" | grep -v -e "services.pb.go" -e "services_grpc.pb.go" > coverage.txt
env:
KEPLOY_API_KEY: 81f83aeeedddf453966347dc136c66
ENABLE_DEDUP: true
ENABLE_TEST_EXPORT: false

ENABLE_TELEMETRY: false



Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/telemetry-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Telemetry

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Build Keploy
run: |
go build -v ./...

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: "11"
distribution: "temurin"

- name: Setup java Sample project
run: |
git clone https://github.com/keploy/samples-java.git &&
curl 'https://repo1.maven.org/maven2/io/keploy/agent/1.2.6/agent-1.2.6.jar' --compressed --output samples-java/agent.jar -slient

- name: Run Keploy and java project
run: |
sudo mkdir /root/keploy-config &&
sudo touch /root/keploy-config/installation-id.yaml &&
echo "ObjectID(\"6400772dd1bc96b3c5ebffec\")" > sudo /root/keploy-config/installation-id.yaml &&
go run ./cmd/server/main.go &
sudo apt update &&
sudo apt install maven -y &&
cd samples-java &&
export KEPLOY_MODE=test &&
export JAVA_TOOL_OPTIONS=-javaagent:${PWD}/agent.jar &&
count=5
for i in $(seq $count); do
mvn spring-boot:run
done
echo installation-id &&
sudo cat /root/keploy-config/installation-id.yaml
62 changes: 30 additions & 32 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributor Covenant Code of Conduct
# Contributor Code of Conduct for Keploy

## Our Pledge

Expand All @@ -12,45 +12,47 @@ and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards
## Expected Behavior

Examples of behaviour that contributes to a positive environment for our
community include:
The following behaviors are expected and requested of all community members:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Act authentically and participate actively in the community to help maintain a positive and productive environment.
* Show consideration and respect in all your actions and speech. Avoid any behavior that is demeaning, discriminatory, or harassing.
* Seek collaboration as an initial step instead of conflict.
* Refrain from demeaning, discriminatory, or harassing behavior and speech.
* Report any unsafe situations, distress or violations of the code of conduct to the maintainers through [Slack](https://join.slack.com/t/keploy/shared_invite/zt-12rfbvc01-o54cOG0X1G6eVJTuI_orSA).
* Practice empathy and kindness towards other community members.
* Respect diverse opinions, perspectives, and experiences.
* Give and receive constructive feedback in a gracious manner.
* Take responsibility for your actions and apologize for mistakes. Use them as learning opportunities.
* Prioritize the well-being and success of the community as a whole over individual gain.

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
* Violence, threats of violence or any language that incites violence towards any individual or group is prohibited.
* Discriminatory jokes and language, such as those based on gender, race, sexual orientation, religion, ability, or any other characteristic, is strictly forbidden.
* Displaying or sharing sexually explicit or violent content is prohibited.
* Any form of harassment, including but not limited to "doxing" (posting or threatening to post other people's personally identifying information) is prohibited.
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Publishing any personal information of others without their explicit consent is strictly forbidden.
* Using sexualized language or imagery, or making any sexual advances towards another person is prohibited.
* Harassment, whether it be public or private, will not be tolerated.

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
Organizations' maintainers are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
They have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
This Code of Conduct applies within all community spaces related to Keploy, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
Expand Down Expand Up @@ -112,17 +114,13 @@ individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.

## Attribution
## Contact info

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
* [Slack](https://join.slack.com/t/keploy/shared_invite/zt-12rfbvc01-o54cOG0X1G6eVJTuI_orSA)
* [Mail]([email protected])

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
## Support 🙏

[homepage]: https://www.contributor-covenant.org
This project needs a ⭐️ from you. Don't forget to leave a star ⭐️

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
## Happy Contributions !!
126 changes: 116 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,133 @@
# Contributing to Keploy

Thank you for your interest in Keploy and for taking the time to contribute to this project. 🙌
Keploy is a project by developers for developers and there are a lot of ways you can contribute.
Thank you for your interest in Keploy and for taking the time to contribute to this project. 🙌 Keploy is a project by developers for developers and there are a lot of ways you can contribute.

If you don't know where to start contributing, ask us on our [Slack channel](https://join.slack.com/t/keploy/shared_invite/zt-12rfbvc01-o54cOG0X1G6eVJTuI_orSA).

## Code of conduct

Read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing
Contributors are expected to adhere to the [Code of Conduct](CODE_OF_CONDUCT.md).

## Prerequisites for the contributors

Contributors should have knowledge of git, go, and markdown for most projects since the project work heavily depends on them.
We encourage Contributors to set up Keploy for local development and play around with the code and tests to get more comfortable with the project.

Sections

- <a name="contributing"> General Contribution Flow</a>
- <a name="#commit-signing">Developer Certificate of Origin</a>
- <a name="contributing-keploy">Keploy Contribution Flow</a>
- <a name="keploy-server">Keploy Server</a>
- <a name="keploy-docs">Keploy Documentation</a>
- <a name="keploy-sdks">Keploy SDK Integration</a>

# <a name="contributing">General Contribution Flow</a>

## <a name="commit-signing">Signing-off on Commits (Developer Certificate of Origin)</a>

To contribute to this project, you must agree to the Developer Certificate of
Origin (DCO) for each commit you make. The DCO is a simple statement that you,
as a contributor, have the legal right to make the contribution.

See the [DCO](https://developercertificate.org) file for the full text of what you must agree to
and how it works [here](https://github.com/probot/dco#how-it-works).
To signify that you agree to the DCO for contributions, you simply add a line to each of your
git commit messages:

```
Signed-off-by: Jane Smith <[email protected]>
```

In most cases, you can add this signoff to your commit automatically with the
`-s` or `--signoff` flag to `git commit`. You must use your real name and a reachable email
address (sorry, no pseudonyms or anonymous contributions). An example of signing off on a commit:

```
$ commit -s -m “my commit message w/signoff”
```

To ensure all your commits are signed, you may choose to add this alias to your global `.gitconfig`:

_~/.gitconfig_

```
[alias]
amend = commit -s --amend
cm = commit -s -m
commit = commit -s
```

# How to contribute ?

We encourage contributions from the community.

**Create a [GitHub issue](https://github.com/keploy/keploy/issues) for any changes beyond typos and small fixes.**

We review GitHub issues and PRs on a regular schedule.

To ensure that each change is relevant and properly peer reviewed, please adhere to best practices for open-source contributions.
This means that if you are outside the Keploy organization, you must fork the repository and create PRs from branches on your own fork.
The README in GitHub's [first-contributions repo](https://github.com/firstcontributions/first-contributions) provides an example.

## ## How to set up the docs website locally?

## How can I contribute?
1. Fork the repository

<br/>

2. Clone the repository with the following command. Replace the <GITHUB_USERNAME> with your username

```sh
git clone https://github.com/<GITHUB_USERNAME>/keploy.git
```

<br/>

3. Go into the directory containing the project and edit the changes.


When we merge your PR, a new build automatically occurs and your changes publish to [https://keploy.io](https://github.com/keploy/keploy).

## <a name="contributing-keploy">Keploy Contribution Flow</a>

Keploy is written in `Go` (Golang) and leverages Go Modules. Relevant coding style guidelines are the [Go Code Review Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) and the _Formatting and style_ section of Peter Bourgon's [Go: Best
Practices for Production Environments](https://peter.bourgon.org/go-in-production/#formatting-and-style).

There are many ways in which you can contribute to Keploy.

#### 🐛 Report a bug
### <a name="keploy-server">Keploy Server</a>

#### Report a Bug
Report all issues through GitHub Issues using the [Report a Bug](https://github.com/keploy/keploy/issues/new?assignees=&labels=&template=bug_report.md&title=) template.
To help resolve your issue as quickly as possible, read the template and provide all the requested information.

#### 🛠 File a feature request
#### Feature request
We welcome all feature requests, whether it's to add new functionality to an existing extension or to offer an idea for a brand new extension.
File your feature request through GitHub Issues using the [Feature Request](https://github.com/keploy/keploy/issues/new?assignees=&labels=&template=feature_request.md&title=) template.

#### 📝 Improve the documentation
In the process of shipping features quickly, we may forget to keep our docs up to date. You can help by suggesting improvements to our documentation using the [Documentation Improvement](https://github.com/keploy/docs/issues) template!
#### Close a Bug
We welcome contributions that help make keploy bug free & improve the experience of our users. You can also find issues tagged [Good First Issues](https://github.com/keploy/keploy/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).

### <a name="keploy-docs">Keploy Documentation</a>

The Keploy documentation site uses Docusaurus 2, which is a static website generator, you can make changes locally without previewing them in the browser.

In the process of shipping features quickly, we may forget to keep our docs up to date. You can help by suggesting improvements to our documentation using the [Documentation Improvement](https://github.com/keploy/docs/issues) template.

Please refer to [Keploy Docs Contributing Guide](https://github.com/keploy/docs/blob/main/CONTRIBUTING.md#-how-to-set-up-the-docs-website-locally) for setting up your development environment and the follow [Keploy Style Guide](https://github.com/keploy/docs/blob/main/STYLE.md).

### <a name="keploy-sdks">Keploy SDKs</a>

Keploy provides stable support for ``Go``, ``Java`` and ``Ts`` language based applications.

- [x] [Go SDK](https://github.com/keploy/go-sdk)
- [x] [Java SDK](https://github.com/keploy/java-sdk)
- [x] [TypeScript SDK](https://github.com/keploy/typescript-sdk)

Every SDKs support the popular and common Routers and Databases.


# Contact

#### ⚙️ Close a Bug / Feature issue
We welcome contributions that help make keploy bug free & improve the experience of our users. You can also find issues tagged [Good First Issues](https://github.com/keploy/keploy/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22).
Feel free to join [slack](https://join.slack.com/t/keploy/shared_invite/zt-12rfbvc01-o54cOG0X1G6eVJTuI_orSA) to start a conversation with us.
Loading