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

[BUG]: Fixed replay starts execution before the app is started #1823

Open
wants to merge 415 commits into
base: main
Choose a base branch
from

Conversation

Yaxhveer
Copy link
Contributor

@Yaxhveer Yaxhveer commented Apr 14, 2024

Related Issue

  • Info about Issue or bug

Closes: #1810
Closes: #1795

Describe the changes you've made

Currently keploy would wait till delay (5s) as provided using delay flag for user application to start , but it is required only for native env and for docker related application we have to have till the application starts or buildDelay time is completed. This pr fix this bug by adding a channel to signal the start of application or cancel the service if buildDelay is reached. Also the PR fixes the panic in keploy during an error by adding an err channel on the required goroutine which became unreachable due to the error.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Please let us know if any test cases are added

Please describe the tests(if any). Provide instructions how its affecting the coverage.

Describe if there is any unusual behaviour of your code(Write NA if there isn't)

A clear and concise description of it.

Checklist:

  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

Screenshots (if any)

Original Updated
original screenshot updated screenshot

PranshuSrivastava and others added 30 commits October 23, 2023 14:11
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
* removed repitive function definitions

Signed-off-by: EraKin575 <tejaskumar574@gmail.com>

* removed unnecessary func definition

Signed-off-by: EraKin575 <tejaskumar574@gmail.com>

---------

Signed-off-by: EraKin575 <tejaskumar574@gmail.com>
…ff-color-for-each-level

feat: logger with different color for each level
* feat: create a keploy config file

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* feat: add keploy-config.yaml

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* feat: add testset entry in keploy-config.yaml

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

---------

Signed-off-by: Akash Kumar <meakash7902@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
* MySQLparser-v2

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

* node changes

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

* node app changes

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

* WIP

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

* ok packet changes

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

* Bug fix

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

* Bug fix

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

* Removed log

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>

---------

Signed-off-by: Hermione Dadheech <hermionedadheech@gmail.com>
Co-authored-by: Sarthak Shyngle <50234097+Sarthak160@users.noreply.github.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
* fix: removed unnecessary log

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* fix: testing version problem change

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* fix: updated path of keploy logs and added function to delete them

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* fix: testing sentry

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* fix: checking

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* fix: made changes according to the comments

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

---------

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
* fix: https mock not generating in docker

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* docs: update README.md

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
* add:one click install example

Signed-off-by: shivamsouravjha <2019145@iiitdmj.ac.in>

* refactor:without one click update

Signed-off-by: shivamsouravjha <2019145@iiitdmj.ac.in>

* refactor:flag name

---------

Signed-off-by: shivamsouravjha <2019145@iiitdmj.ac.in>
the decode function is not able to distinguish the closing braces of the string json and sectionSingle, so used the prefix and suffix in place of regex to extract the document correctly

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
…le to decode (keploy#1047)

* feat: create a keploy config file

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* feat: add keploy-config.yaml

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* feat: add testset entry in keploy-config.yaml

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* feat: added code for fetching noise config

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* fix: build

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* feat: add regex code

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* fix: keploy commands failing when no config file

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* fix: update keploy-config

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* feat: added the removed function

Signed-off-by: Akash Kumar <meakash7902@gmail.com>

* refactor: condition to match non readable payload

Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>

* refactor: condition to match non readable payload

Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>

* refactor: save encoded string in case of large buffer data

Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>

* refactor: remove buffered string from pg response

Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>

* feat: make unreadable data base64 in datarow packet

Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>

---------

Signed-off-by: Akash Kumar <meakash7902@gmail.com>
Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>
Co-authored-by: Akash Kumar <meakash7902@gmail.com>
Co-authored-by: Akash Kumar <91385321+AkashKumar7902@users.noreply.github.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Signed-off-by: Aditya Tomar <adi02032002@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
* fix: api request time for mock filtering

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* refactor: update amd c files

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
…lity (keploy#1072)

Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>
* update:serve with app command

* refactor:serve cmd

* refactor:remove fetch hook command

* fix:path for serve

Signed-off-by: shivamsouravjha <shivamsouravjha@gmail.com>

---------

Signed-off-by: shivamsouravjha <shivamsouravjha@gmail.com>
* added flag for req timestamp

Signed-off-by: 404fixer <govindtomar94@gmail.com>

* renamed flag

Signed-off-by: 404fixer <govindtomar94@gmail.com>

* fixed formatting

Signed-off-by: 404fixer <govindtomar94@gmail.com>

---------

Signed-off-by: 404fixer <govindtomar94@gmail.com>
…olve conflct in matching (keploy#1075)

* fix: updates the decode function for OpMsg section

the decode function is not able to distinguish the closing braces of the string json and sectionSingle, so used the prefix and suffix in place of regex to extract the document correctly

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>

* fix: adds the ismaster query in mongo config for node

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>

---------

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
* update:serve with app command

* refactor:remove fetch hook command

* refactor:keploy example flag

Signed-off-by: shivamsouravjha <shivamsouravjha@gmail.com>

* refactor:removing unused flag

* removing keploy.sh file after install

---------

Signed-off-by: shivamsouravjha <shivamsouravjha@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
…y#1089)

* feat: add support for authentication of mongo

adds scram support to authenticate into mongoDb during test. DocumentDB is supported since it uses SCRAM-SHA-1 for authentication

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>

---------

Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
Signed-off-by: re-Tick <jain.ritik.1001@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
gouravkrosx and others added 7 commits April 10, 2024 21:43
…y#1776)

* feat: record test cases using test-bench

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: update branch against main

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* feat:add abs match

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: error getting from keploy test binary

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: fix exit logs

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* update amd ebpf c files

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: disable compression when encoding is not present in headers

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: fix lint issue

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: fix lint issue

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: fix incorrect integer convertions

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: remove print statements

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: addressed PR comments

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: docker pipeline failing due to blocking unbuffered error channel

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: address PR comments

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* refactor: remove redundant code

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
Co-authored-by: Shubham Jain <shubhamkjain@outlook.com>
* fix: closing of keploy due to panic in any parser

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: move parser panic recoverer to proxy utils for more context

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
* fix:go coverage

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: nil pointer exception in http parser

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: logs in decodeHttp

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* restored umask even if err

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: format

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
* fix: high priority static check bugs

* chore: update go version to 1.22

Signed-off-by: Shubham Jain <shubhamkjain@outlook.com>

---------

Signed-off-by: Shubham Jain <shubhamkjain@outlook.com>
* docs: correct docs link and change language for features and running guide

Signed-off-by: Neha Gupta <gneha21@yahoo.in>

* docs: add adopters list and remove platform requirements

Signed-off-by: Neha Gupta <gneha21@yahoo.in>

---------

Signed-off-by: Neha Gupta <gneha21@yahoo.in>
* fix: pass through not working in case of https request

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* fix: remove unnecessary timeout

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
@Yaxhveer Yaxhveer changed the title [BUG]: Fixed Replay starts test-set execution before the containers are started [BUG]: Fixed replay starts execution before the app is started Apr 14, 2024
Yaxhveer and others added 21 commits April 15, 2024 02:20
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
* Bug Fix: Keply test runs succcesfully with no test cases

Signed-off-by: Akash <akashsingh2210670@gmail.com>

* Added warnings for Missing Keploy Folder, Missing test sets

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

* Fixed Liny

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

* Refactored requested changes

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

* Changed log statement

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

---------

Signed-off-by: Akash <akashsingh2210670@gmail.com>
Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
Co-authored-by: Animesh Pathak <53110238+Sonichigo@users.noreply.github.com>
Co-authored-by: Neha Gupta <gneha21@yahoo.in>
* refactor: time date format

* refactor: unix check

* refactor: 24 hhour check for time

* refactoeL ceck of time

---------

Co-authored-by: Gourav kumar <44055698+gouravkrosx@users.noreply.github.com>
* fix: returns error for detach mode in the user docker cmd

Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
---------

Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
Co-authored-by: Ritik Jain <60597329+re-Tick@users.noreply.github.com>
* fix: added schema match for JSON body and debug logs in case the other matches fail

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* chore: removed incorrect log

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* chore: added deleted filtered mock to the logic

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* chore: added more debug logs

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* chore: fix lint

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* chore: added log when not deleting mocks

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* chore: added log for fuzzy match

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>

* fix: schema match in http parser

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: Pranshu Srivastava <iampranshu24@gmail.com>
Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
Co-authored-by: Gourav kumar <44055698+gouravkrosx@users.noreply.github.com>
Co-authored-by: gouravkrosx <gouravgreatkr@gmail.com>
Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
Signed-off-by: Sarthak160 <rocksarthak45@gmail.com>
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
Signed-off-by: Yaxhveer <yaxhcod@gmail.com>
* feat: add support for async http matching

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: remove print statements

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

* chore: addressed PR comments

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>

---------

Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
…des (keploy#1526)

* Feat: Added --enableColor Flag to CLI to enable/disable ASNI Color Codes

Signed-off-by: Akash <akashsingh2210670@gmail.com>

* Replaced flag to --disableANSI

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

---------

Signed-off-by: Akash <akashsingh2210670@gmail.com>
Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
Co-authored-by: Pranshu Srivastava <37413698+PranshuSrivastava@users.noreply.github.com>
Co-authored-by: Sarthak Shyngle <50234097+Sarthak160@users.noreply.github.com>
Signed-off-by: gouravkrosx <gouravgreatkr@gmail.com>
…sion is lower than 5.15 (keploy#1828)

* Added Validate function to check if the linux kernel version is lower than 5.15

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

* Integrated github.com/moby/moby/pkg/parsers/kernel for kernel level check

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

* Refactored var name

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>

---------

Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet