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

Complete candidate route test suite #211

Merged
merged 20 commits into from
May 14, 2024
Merged

Complete candidate route test suite #211

merged 20 commits into from
May 14, 2024

Conversation

p0mvn
Copy link
Member

@p0mvn p0mvn commented May 9, 2024

Completes: https://linear.app/osmosis/issue/STABI-140/[sqs-automated-tests-in-ci][candidate-routes]

Add the following integration candidate route tests:

  • Between each listed token with liquidity and USDC
  • Between combinations of tokens in the following groups:
    1. Top 5 by-liquidity
    2. Top 5 by-volume
    3. Five low liquidity (between 5000 and 10000 USD)
    4. Five low volume (between 5000 and 10000 USD)
  • Between tokens with a transmitter route
  • Between tokens with an Astroport route

Runs these all in-parallel from 4 workers. There are 457 tests being run.

Testing

source tests/venv/bin/activate
make e2e-run-dev

@p0mvn p0mvn marked this pull request as draft May 10, 2024 14:29
Base automatically changed from roman/e2e-router-routes-pt1 to v24.x May 10, 2024 15:48
@p0mvn p0mvn changed the title more candidate route tests Complete candidate route test suite May 10, 2024
@p0mvn p0mvn added A:backport/v24.x backport patches to v24.x branch A:backport/v25.x Backport to v25.x branch and removed A:backport/v24.x backport patches to v24.x branch labels May 10, 2024
scripts/quote.sh Show resolved Hide resolved
@p0mvn p0mvn marked this pull request as ready for review May 10, 2024 22:43
Copy link
Collaborator

@cryptomatictrader cryptomatictrader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Next we will work on how to integrate it into our stage/prod deployment process. Thank you!

tests/setup.py Show resolved Hide resolved

from sqs_service import *
import constants
from conftest import SERVICE_MAP

SQS_STAGE = "https://sqs.stage.osmosis.zone"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SQS_STAGE and ROUTES_URL also exist in sqs_service.py. Shall we not duplicate them?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch - I think we will need to add a Python linter

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, I mislinked 😅 - this one: #220

@p0mvn
Copy link
Member Author

p0mvn commented May 13, 2024

Addressed comments, thanks @cryptomatictrader

Copy link
Collaborator

@cryptomatictrader cryptomatictrader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

cryptomatictrader

This comment was marked as duplicate.

@p0mvn p0mvn merged commit f5f5831 into v24.x May 14, 2024
6 checks passed
@p0mvn p0mvn deleted the roman/tests-progress branch May 14, 2024 11:43
mergify bot pushed a commit that referenced this pull request May 14, 2024
* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume

* make astroport and transmuter helpers more useful

* clean up

* clean up

* clean up

* clean up pool types

* clean up precomputed mappings

* clean up token choice

* liq filtering with pool types and more clean up

* space

* e2e: test for /tokens/metadata and router/routes

* fetch expected number of routes from config

* more candidate route tests

* Candidate routes test between every token and USDC

* complete candidate route test suite

* prevent false positives

* comment

* remove main.py

* remove obsolete constants & avoid hardcoding

(cherry picked from commit f5f5831)
p0mvn added a commit that referenced this pull request May 14, 2024
* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume

* make astroport and transmuter helpers more useful

* clean up

* clean up

* clean up

* clean up pool types

* clean up precomputed mappings

* clean up token choice

* liq filtering with pool types and more clean up

* space

* e2e: test for /tokens/metadata and router/routes

* fetch expected number of routes from config

* more candidate route tests

* Candidate routes test between every token and USDC

* complete candidate route test suite

* prevent false positives

* comment

* remove main.py

* remove obsolete constants & avoid hardcoding

(cherry picked from commit f5f5831)

Co-authored-by: Roman <[email protected]>
cryptomatictrader added a commit that referenced this pull request May 24, 2024
* fix: pools with low liquidity being included in routes (#191)

* fix: pools with low liquidity being included in routes

* fix: linting issues for pricing route code

* chore: update error messages

* fix: remove using the cache for the pricing query

* chore: add v25.x backport tag to mergify github action (#189)

* fix: increase min liquidity for routing through pools (#193)

* chore: update astroport code ID (#195)

* feat: /config-private endpoint, mask otel in /config endpoint (#202)

* feat: /config-private endpoint, mask otel in /config endpoint

* lint

* Update system/delivery/http/system_http_handler.go

* docs: remove outdated context about ingest (#200)

* docs: remove outdated context about ingest

* updates

* update config code ID for astroport PCL (#199)

* changelog update (#206)

* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume (#198)

* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume

* make astroport and transmuter helpers more useful

* clean up

* clean up

* clean up

* clean up pool types

* clean up precomputed mappings

* clean up token choice

* liq filtering with pool types and more clean up

* space

* STABI-128 - Support Coingecko Prices

* fix: DYDX spot price bug (#212)

* changelog & sqsdomain

* go mod fix

* e2e: test for /tokens/metadata and router/routes (#207)

* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume

* make astroport and transmuter helpers more useful

* clean up

* clean up

* clean up

* clean up pool types

* clean up precomputed mappings

* clean up token choice

* liq filtering with pool types and more clean up

* space

* e2e: test for /tokens/metadata and router/routes

* fetch expected number of routes from config

* Changes based on code review, except the test related changes which will be checked in later

* POC: Flight recording of slow requests (above 500ms)

* Revert "POC: Flight recording of slow requests (above 500ms)"

This reverts commit a7e9cef.

* Added coingecko url and quote currency to default sqs config and test suite config

* Updated tokens.json with coingecko_id in it

* Added test cases to verify existence of coingecko_id in asset list, and verify the function of coingecko pricing source

* Added test case to print chain denom in mainnet without coingecko support (no coingecko id in asset list)

* Reuse the original tokens.json but update it with coingecko id so that it won't break test cases

* Updated unsupported token count after adding coingeckto as fallback support

* Verify unsupported token count for coingecko pricing source

* Added the job for checking coingecko unsupported token list

* Clean up chain pricing; add quote-based and spot-price based tests; add docs (#214)

* Clean up chain pricing; add quote-based and spot-price based tests; add docs

* updates

* comments

* changelog

* Update tokens/delivery/http/tokens_delivery.go

Added comment to explain how pricingSource parameter value will be interpreted.

Co-authored-by: Roman <[email protected]>

* Update tokens/usecase/pricing/coingecko/pricing_coingecko_test.go

Removed unused function

Co-authored-by: Roman <[email protected]>

* Revision based on the comments from code review

* Fixed lint commplaint

* Complete candidate route test suite (#211)

* e2e test: foundation for getting desired testing tokens based on pool type, liquidity and volume

* make astroport and transmuter helpers more useful

* clean up

* clean up

* clean up

* clean up pool types

* clean up precomputed mappings

* clean up token choice

* liq filtering with pool types and more clean up

* space

* e2e: test for /tokens/metadata and router/routes

* fetch expected number of routes from config

* more candidate route tests

* Candidate routes test between every token and USDC

* complete candidate route test suite

* prevent false positives

* comment

* remove main.py

* remove obsolete constants & avoid hardcoding

* Update README to include coingecko documentation

* demo monkey patch pricing getter mock (#218)

* Use a mock for mocking the coingecko operation

* Return 0 if coingecko id is empty in mock coingecko getter fn

* Update tokens/usecase/pricing/coingecko/pricing_coingecko.go

Co-authored-by: Roman <[email protected]>

* negligible improvement (#188)

* negligible improvement

* lint

---------

Co-authored-by: Roman <[email protected]>

* Some comments as I looked through this code (#171)

Co-authored-by: Roman <[email protected]>

* Added test cases for checking the input validations in GetPrices in coingecko pricing source

* Fixed linter complaint

* Removed unused param, enhanced test cases for prices

* Revert get_tokens_metadata pointing to PROD after local testing

* Make returned value in coingecko mock consistent with real coingecko getter implementation

* Filled in the non-exist coingecko id for wbtc in tokens.json

* wbtc coingecko id is available, so one less unsupported token count in the assertion test

* Pricing working test should check for both nil or zero price

---------

Co-authored-by: PaddyMc <[email protected]>
Co-authored-by: Roman <[email protected]>
Co-authored-by: Dev Ojha <[email protected]>
Co-authored-by: Calvin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v25.x Backport to v25.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants