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

ci(mergify): upgrade configuration to current format #569

Open
wants to merge 23 commits into
base: v27.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
458297d
BE-659 | Update import paths (#579)
deividaspetraitis Dec 3, 2024
bc47293
BE-659 | Bump deps (#580)
deividaspetraitis Dec 3, 2024
6743fcc
BE-636-backwards-compatibility | Backwards compatibility support (#58…
mergify[bot] Dec 4, 2024
d322a6d
BE-659 | Update required labels (#585) (#586)
mergify[bot] Dec 4, 2024
5255848
BE-636 | Fix search bug (#584) (#587)
mergify[bot] Dec 4, 2024
162445b
BE-636 | Fix search bug (#588) (#589)
mergify[bot] Dec 4, 2024
047b530
BE-636 | Update CHANGELOG.md (#590) (#591)
mergify[bot] Dec 4, 2024
361febf
Update golang lint version and GH action version (#592)
pablin-10 Dec 5, 2024
22afbf9
BE-664 | Add denoms filter for /pools endpoint (#593) (#594)
mergify[bot] Dec 6, 2024
1aac3c9
BE-664 | Update CHANGELOG.md (#595) (#596)
mergify[bot] Dec 6, 2024
3b5880f
BE-661 | Fix: claimbot panics (#597) (#598)
mergify[bot] Dec 6, 2024
c3508fe
Bump osmosis version for docker-compose.yaml (#600)
deividaspetraitis Dec 17, 2024
be4b7b4
BE-658 | Decouple Node releases from SQS (#599)
deividaspetraitis Jan 16, 2025
e083e06
BE-658 | Update CHANGELOG.md (#602)
deividaspetraitis Jan 16, 2025
f4e918c
BE-675 | InGivenOut APIs for balancer, stableswap, transmuter pools (…
deividaspetraitis Jan 21, 2025
b410a2a
BE-676 | Implement InGivenOut APIs for CL pool (#604)
deividaspetraitis Jan 28, 2025
bdcbb21
BE-677 | InGivenOut APIs for Alloyed pool (#605)
deividaspetraitis Jan 28, 2025
fb5ce38
BE-678 | InGivenOut APIs for Cosmwasm pool (#606)
deividaspetraitis Jan 30, 2025
e2980dc
BE-682 | Set isBestEffort on error processing orderbook active orders…
deividaspetraitis Jan 30, 2025
f89bc00
BE-682 | Set isBestEffort when there are no orderbooks in the system …
deividaspetraitis Jan 31, 2025
4f4b2b3
BE-682 | Release v28.2.0 (#610)
deividaspetraitis Jan 31, 2025
0bb6b95
chore: remove toolchain go1.23.3 (#611)
p0mvn Feb 13, 2025
d2fef84
ci(mergify): upgrade configuration to current format
mergify[bot] Feb 13, 2025
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
26 changes: 13 additions & 13 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,18 @@ defaults:

queue_rules:
- name: default
conditions:
- "#approved-reviews-by>=1"

pull_request_rules:
- name: automerge to the base branch with label automerge and branch protection passing
conditions:
queue_conditions:
- "#approved-reviews-by>=1"
- base=v21.x
- label=A:automerge
actions:
queue:
name: default
method: squash
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
merge_conditions:
- "#approved-reviews-by>=1"
commit_message_template: |
{{ title }} (#{{ number }})
{{ body }}
merge_method: squash

pull_request_rules:
- name: backport patches to osmosis-main branch
conditions:
- base=v22.x
Expand Down Expand Up @@ -62,3 +58,7 @@ pull_request_rules:
backport:
branches:
- v25.x
- name: automerge to the base branch with label automerge and branch protection passing
conditions: []
actions:
queue:
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
go-version-file: go.mod
- name: Run golangci-lint
if: env.GIT_DIFF
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v5
with:
version: v1.54
version: v1.62
skip-cache: true
4 changes: 2 additions & 2 deletions .github/workflows/required-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
branches:
- "v26.x"
- "v27.x"

jobs:
backport_labels:
Expand All @@ -26,4 +26,4 @@ jobs:
with: #Require one of the following labels
mode: exactly
count: 1
labels: "A:backport/v27.x"
labels: "A:backport/v28.x"
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,27 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## v28.2.0

- #609 - BE-682 | Set isBestEffort when there are no orderbooks in the system to process
- #608 - BE-682 | Set isBestEffort on error processing orderbook active orders

## v28.1.0

- #599 - Decouple Node releases from SQS

## v28.0.0

- #598 - Fixed claimbot panics due nil routerrepo.RouterRepository in txGasCalulator

## v27.2.0

- #593 - Add denoms filter for /pools endpoint

## v27.1.0

- #553 - Add pagination + sorting + query filtering support for /pools endpoint

## v26.2.0

- #554 - [FIX] Add missing checks for transmuter's limiter
Expand Down
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ endif


# --- Tooling & Variables ----------------------------------------------------------------
include ./scripts/makefiles/proto.mk
include ./misc/make/tools.Makefile

# Install local dependencies
Expand Down Expand Up @@ -176,9 +177,6 @@ sqs-update-mainnet-state:
bench-pricing:
go test -bench BenchmarkGetPrices -run BenchmarkGetPrices github.com/osmosis-labs/sqs/tokens/usecase -count=6

proto-gen:
protoc --go_out=./ --go-grpc_out=./ --proto_path=./sqsdomain/proto ./sqsdomain/proto/ingest.proto

test-prices-mainnet:
CI_SQS_PRICING_WORKER_TEST=true go test \
-timeout 300s \
Expand Down
2 changes: 1 addition & 1 deletion app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"

"github.com/osmosis-labs/osmosis/v27/app"
"github.com/osmosis-labs/osmosis/v28/app"
)

const (
Expand Down
7 changes: 4 additions & 3 deletions app/sidecar_query_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"

"github.com/osmosis-labs/osmosis/v27/app"
txfeestypes "github.com/osmosis-labs/osmosis/v27/x/txfees/types"
"github.com/osmosis-labs/osmosis/v28/app"
txfeestypes "github.com/osmosis-labs/osmosis/v28/x/txfees/types"
"github.com/osmosis-labs/sqs/domain/cosmos/auth/types"
ingestrpcdelivry "github.com/osmosis-labs/sqs/ingest/delivery/grpc"
ingestusecase "github.com/osmosis-labs/sqs/ingest/usecase"
Expand All @@ -46,6 +46,7 @@ import (
"github.com/osmosis-labs/sqs/tokens/usecase/pricing"
pricingWorker "github.com/osmosis-labs/sqs/tokens/usecase/pricing/worker"

sqspassthroughdomain "github.com/osmosis-labs/osmosis/v28/ingest/types/passthroughdomain"
"github.com/osmosis-labs/sqs/domain"
"github.com/osmosis-labs/sqs/domain/cache"
"github.com/osmosis-labs/sqs/domain/cosmos/tx"
Expand All @@ -56,7 +57,6 @@ import (
passthroughdomain "github.com/osmosis-labs/sqs/domain/passthrough"
"github.com/osmosis-labs/sqs/log"
"github.com/osmosis-labs/sqs/middleware"
sqspassthroughdomain "github.com/osmosis-labs/sqs/sqsdomain/passthroughdomain"

routerHttpDelivery "github.com/osmosis-labs/sqs/router/delivery/http"
routerUseCase "github.com/osmosis-labs/sqs/router/usecase"
Expand Down Expand Up @@ -317,6 +317,7 @@ func NewSideCarQueryServer(appCodec codec.Codec, config domain.Config, logger lo
keyring,
orderBookUseCase,
poolsUseCase,
gasCalculator,
logger,
config.ChainGRPCGatewayEndpoint,
config.ChainID,
Expand Down
8 changes: 4 additions & 4 deletions chaininfo/client/chain_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
rpchttp "github.com/cometbft/cometbft/rpc/client/http"
"github.com/cosmos/cosmos-sdk/client"

clpoolmodel "github.com/osmosis-labs/osmosis/v27/x/concentrated-liquidity/model"
cwpoolmodel "github.com/osmosis-labs/osmosis/v27/x/cosmwasmpool/model"
"github.com/osmosis-labs/osmosis/v27/x/gamm/pool-models/balancer"
"github.com/osmosis-labs/osmosis/v27/x/gamm/pool-models/stableswap"
clpoolmodel "github.com/osmosis-labs/osmosis/v28/x/concentrated-liquidity/model"
cwpoolmodel "github.com/osmosis-labs/osmosis/v28/x/cosmwasmpool/model"
"github.com/osmosis-labs/osmosis/v28/x/gamm/pool-models/balancer"
"github.com/osmosis-labs/osmosis/v28/x/gamm/pool-models/stableswap"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
)
Expand Down
16 changes: 8 additions & 8 deletions domain/candidate_routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package domain

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/osmosis-labs/sqs/sqsdomain"
ingesttypes "github.com/osmosis-labs/sqs/ingest/types"
)

// CandidateRoutePoolFiltrerCb defines a candidate route pool filter
// that takes in a pool and returns true if the pool should be skipped.
type CandidateRoutePoolFiltrerCb func(*sqsdomain.PoolWrapper) bool
type CandidateRoutePoolFiltrerCb func(*ingesttypes.PoolWrapper) bool

// CandidateRouteSearchOptions represents the options for finding candidate routes.
type CandidateRouteSearchOptions struct {
Expand All @@ -30,7 +30,7 @@ type CandidateRouteSearchOptions struct {

// ShouldSkipPool returns true if the candidate route algorithm should skip
// a given pool by matching at least one of the pool filters
func (c CandidateRouteSearchOptions) ShouldSkipPool(pool *sqsdomain.PoolWrapper) bool {
func (c CandidateRouteSearchOptions) ShouldSkipPool(pool *ingesttypes.PoolWrapper) bool {
for _, filter := range c.PoolFiltersAnyOf {
if filter(pool) {
return true
Expand All @@ -47,7 +47,7 @@ type CandidateRoutePoolIDFilterOptionCb struct {
}

// ShouldSkipPool returns true of the given pool has ID that is present in c.PoolIDsToSkip
func (c CandidateRoutePoolIDFilterOptionCb) ShouldSkipPool(pool *sqsdomain.PoolWrapper) bool {
func (c CandidateRoutePoolIDFilterOptionCb) ShouldSkipPool(pool *ingesttypes.PoolWrapper) bool {
poolID := pool.GetId()
_, ok := c.PoolIDsToSkip[poolID]
return ok
Expand All @@ -57,7 +57,7 @@ var (
// ShouldSkipOrderbookPool skips orderbook pools
// by returning true if pool.SQSModel.CosmWasmPoolModel is not nil
// and pool.SQSModel.CosmWasmPoolModel.IsOrderbook() returns true.
ShouldSkipOrderbookPool CandidateRoutePoolFiltrerCb = func(pool *sqsdomain.PoolWrapper) bool {
ShouldSkipOrderbookPool CandidateRoutePoolFiltrerCb = func(pool *ingesttypes.PoolWrapper) bool {
cosmWasmPoolModel := pool.SQSModel.CosmWasmPoolModel
return cosmWasmPoolModel != nil && cosmWasmPoolModel.IsOrderbook()
}
Expand All @@ -68,15 +68,15 @@ type CandidateRouteSearcher interface {
// FindCandidateRoutes finds candidate routes for a given tokenIn and tokenOutDenom
// using the given options.
// Returns the candidate routes and an error if any.
FindCandidateRoutes(tokenIn sdk.Coin, tokenOutDenom string, options CandidateRouteSearchOptions) (sqsdomain.CandidateRoutes, error)
FindCandidateRoutes(tokenIn sdk.Coin, tokenOutDenom string, options CandidateRouteSearchOptions) (ingesttypes.CandidateRoutes, error)
}

// CandidateRouteDenomData represents the data for a candidate route for a given denom.
type CandidateRouteDenomData struct {
// SortedPools is the sorted list of pools for the denom.
SortedPools []sqsdomain.PoolI
SortedPools []ingesttypes.PoolI
// CanonicalOrderbooks is the map of canonical orderbooks keyed by the pair token.
// For example if this is candidate route denom data for OSMO and there is a canonical orderbook with ID 23
// for ATOM/OSMO, we would have an entry from ATOM to 23 in this map.
CanonicalOrderbooks map[string]sqsdomain.PoolI
CanonicalOrderbooks map[string]ingesttypes.PoolI
}
14 changes: 7 additions & 7 deletions domain/candidate_routes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package domain_test
import (
"testing"

"github.com/osmosis-labs/osmosis/v28/ingest/types/cosmwasmpool"
"github.com/osmosis-labs/sqs/domain"
"github.com/osmosis-labs/sqs/domain/mocks"
"github.com/osmosis-labs/sqs/sqsdomain"
"github.com/osmosis-labs/sqs/sqsdomain/cosmwasmpool"
ingesttypes "github.com/osmosis-labs/sqs/ingest/types"
"github.com/stretchr/testify/require"
)

Expand All @@ -24,15 +24,15 @@ func TestCandidateRouteSearchOptions_ShouldSkipPool(t *testing.T) {
)

var (
defaultNonOrderBookPool = sqsdomain.PoolWrapper{
defaultNonOrderBookPool = ingesttypes.PoolWrapper{
ChainModel: &mocks.ChainPoolMock{
ID: defaultPoolID,
},
}

// instruments the given pool with orderbook data, returning new copy.
withOrderBookPool = func(pool sqsdomain.PoolWrapper) sqsdomain.PoolWrapper {
pool.SQSModel = sqsdomain.SQSPool{
withOrderBookPool = func(pool ingesttypes.PoolWrapper) ingesttypes.PoolWrapper {
pool.SQSModel = ingesttypes.SQSPool{
CosmWasmPoolModel: &cosmwasmpool.CosmWasmPoolModel{
ContractInfo: cosmwasmpool.ContractInfo{
Contract: cosmwasmpool.ORDERBOOK_CONTRACT_NAME,
Expand All @@ -48,7 +48,7 @@ func TestCandidateRouteSearchOptions_ShouldSkipPool(t *testing.T) {
}

// instruments the given pool with a new id returning new copy
withPoolID = func(pool sqsdomain.PoolWrapper, newPoolID uint64) sqsdomain.PoolWrapper {
withPoolID = func(pool ingesttypes.PoolWrapper, newPoolID uint64) ingesttypes.PoolWrapper {
pool.ChainModel = &mocks.ChainPoolMock{
ID: newPoolID,
}
Expand All @@ -63,7 +63,7 @@ func TestCandidateRouteSearchOptions_ShouldSkipPool(t *testing.T) {

poolIDsToFilter map[uint64]struct{}

poolToTest sqsdomain.PoolWrapper
poolToTest ingesttypes.PoolWrapper

expectedShouldSkip bool
}{
Expand Down
2 changes: 1 addition & 1 deletion domain/cosmos/auth/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/gogoproto/grpc"
"github.com/osmosis-labs/osmosis/v27/app"
"github.com/osmosis-labs/osmosis/v28/app"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion domain/cosmos/tx/msg_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"

"github.com/osmosis-labs/osmosis/v27/app/params"
"github.com/osmosis-labs/osmosis/v28/app/params"
"github.com/osmosis-labs/sqs/domain"
"github.com/osmosis-labs/sqs/domain/keyring"
routerrepo "github.com/osmosis-labs/sqs/router/repository"
Expand Down
2 changes: 1 addition & 1 deletion domain/cosmos/tx/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/osmosis-labs/osmosis/osmomath"
"github.com/osmosis-labs/sqs/domain"

txfeestypes "github.com/osmosis-labs/osmosis/v27/x/txfees/types"
txfeestypes "github.com/osmosis-labs/osmosis/v28/x/txfees/types"

cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
2 changes: 1 addition & 1 deletion domain/cosmos/tx/tx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/osmosis-labs/sqs/domain/mocks"

"github.com/osmosis-labs/osmosis/osmomath"
"github.com/osmosis-labs/osmosis/v27/app"
"github.com/osmosis-labs/osmosis/v28/app"

"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
Expand Down
2 changes: 1 addition & 1 deletion domain/cosmwasm/cosmwasm_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cosmwasmdomain
import (
"context"

"github.com/osmosis-labs/sqs/sqsdomain/json"
"github.com/osmosis-labs/osmosis/v28/ingest/types/json"

wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/osmosis-labs/sqs/domain"
Expand Down
11 changes: 8 additions & 3 deletions domain/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,17 @@ func (e ConcentratedZeroCurrentSqrtPriceError) Error() string {
}

type ConcentratedNotEnoughLiquidityToCompleteSwapError struct {
PoolId uint64
AmountIn string
PoolId uint64
AmountIn string
AmountOut string
}

func (e ConcentratedNotEnoughLiquidityToCompleteSwapError) Error() string {
return fmt.Sprintf("not enough liquidity to complete swap in pool (%d) with amount in (%s)", e.PoolId, e.AmountIn)
if e.AmountIn != "" {
return fmt.Sprintf("not enough liquidity to complete swap in pool (%d) with amount in (%s)", e.PoolId, e.AmountIn)
}

return fmt.Sprintf("not enough liquidity to complete swap in pool (%d) with amount out (%s)", e.PoolId, e.AmountOut)
}

type ConcentratedTickModelNotSetError struct {
Expand Down
6 changes: 3 additions & 3 deletions domain/mocks/candidate_route_finder_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ package mocks
import (
"github.com/cosmos/cosmos-sdk/types"
"github.com/osmosis-labs/sqs/domain"
"github.com/osmosis-labs/sqs/sqsdomain"
ingesttypes "github.com/osmosis-labs/sqs/ingest/types"
)

type CandidateRouteFinderMock struct {
Routes sqsdomain.CandidateRoutes
Routes ingesttypes.CandidateRoutes
Error error
}

var _ domain.CandidateRouteSearcher = CandidateRouteFinderMock{}

// FindCandidateRoutes implements domain.CandidateRouteSearcher.
func (c CandidateRouteFinderMock) FindCandidateRoutes(tokenIn types.Coin, tokenOutDenom string, options domain.CandidateRouteSearchOptions) (sqsdomain.CandidateRoutes, error) {
func (c CandidateRouteFinderMock) FindCandidateRoutes(tokenIn types.Coin, tokenOutDenom string, options domain.CandidateRouteSearchOptions) (ingesttypes.CandidateRoutes, error) {
return c.Routes, c.Error
}
2 changes: 1 addition & 1 deletion domain/mocks/chain_pool_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"cosmossdk.io/math"
"github.com/cosmos/cosmos-sdk/types"
"github.com/osmosis-labs/osmosis/osmomath"
poolmanagertypes "github.com/osmosis-labs/osmosis/v27/x/poolmanager/types"
poolmanagertypes "github.com/osmosis-labs/osmosis/v28/x/poolmanager/types"
)

type ChainPoolMock struct {
Expand Down
2 changes: 1 addition & 1 deletion domain/mocks/msg_simulator_mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
txtypes "github.com/cosmos/cosmos-sdk/types/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/osmosis-labs/osmosis/v27/app/params"
"github.com/osmosis-labs/osmosis/v28/app/params"
"github.com/osmosis-labs/sqs/domain"
sqstx "github.com/osmosis-labs/sqs/domain/cosmos/tx"
"github.com/osmosis-labs/sqs/domain/keyring"
Expand Down
Loading