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

fix: fix the query for max withdraw #2638

Merged
merged 2 commits into from
Dec 8, 2024
Merged
Changes from 1 commit
Commits
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
Prev Previous commit
update the docker
gsk967 committed Dec 6, 2024
commit 6e30706eed357a3fffe9c4299f56f34799bfe331
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.23"
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
2 changes: 1 addition & 1 deletion .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid Go version specified

The specified Go version "1.23" is not yet released. The latest stable version is Go 1.22.x. Using an unreleased version will cause CI failures.

Apply this diff to fix the Go version:

-          go-version: "1.23"
+          go-version: "1.22"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
go-version: "1.23"
go-version: "1.22"

cache: true

- uses: actions/checkout@v4
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
go-version: "1.23"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Potential issue

Go 1.23 is not yet supported by golangci-lint

The golangci-lint tool currently uses Go 1.22.1 as specified in its go.mod file. Using Go 1.23 in the workflow could lead to compatibility issues since:

  • The linter hasn't been tested or updated for Go 1.23
  • New language features in Go 1.23 might not be properly analyzed
  • This could result in unreliable linting results or workflow failures

Please update the Go version in the workflow to 1.22 to ensure compatibility with golangci-lint.

🔗 Analysis chain

Verify golangci-lint compatibility with Go 1.23

Using an unreleased Go version (1.23) could cause compatibility issues with golangci-lint. Additionally:

  1. The linter might not fully support Go 1.23 features yet
  2. This could lead to false positives or missed issues in the lint process

Let's check golangci-lint's Go compatibility:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check golangci-lint's supported Go versions
curl -s https://raw.githubusercontent.com/golangci/golangci-lint/master/go.mod | grep -A 1 "go "

Length of output: 390

cache: true

- name: golangci-lint main
2 changes: 1 addition & 1 deletion .github/workflows/release-umee.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 6, 2024

Choose a reason for hiding this comment

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

⚠️ Potential issue

Critical: Avoid using unreleased Go version for production releases

Using Go 1.23 (unreleased) for building release binaries poses significant risks:

  1. Potential instability in production builds
  2. Lack of security patches and updates for an unreleased version
  3. Possible compatibility issues with dependencies

Consider maintaining the current stable Go version for production releases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Can you check again, it is already released
https://tip.golang.org/doc/go1.23

Copy link
Contributor

Choose a reason for hiding this comment

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

@gsk967, thank you for the clarification. You're absolutely right; Go 1.23 has been released. The update is appropriate.

(A curious rabbit tilts its head, ears perked up)


✏️ Learnings added
Learnt from: gsk967
PR: umee-network/umee#2638
File: .github/workflows/release-umee.yml:25-25
Timestamp: 2024-12-06T18:52:26.187Z
Learning: Go 1.23 has been officially released and is acceptable for production releases.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

cache: true

- name: Set Env
10 changes: 5 additions & 5 deletions .github/workflows/simulations.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"

- name: Install runsim
run: export GO111MODULE="on" && go install github.com/cosmos/tools/cmd/runsim@v1.0.0
@@ -40,7 +40,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
go-version: "1.23"
cache: true
- name: Test application non-determinism
if: env.GIT_DIFF
@@ -65,7 +65,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
go-version: "1.23"
cache: true
- uses: actions/cache@v4
if: env.GIT_DIFF
@@ -95,7 +95,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
go-version: "1.23"
cache: true
- uses: actions/cache@v4
if: env.GIT_DIFF
@@ -124,7 +124,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
go-version: "1.23"
cache: true
- uses: actions/cache@v4
if: env.GIT_DIFF
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
- uses: actions/cache@v4
id: cache-go-tparse
with:
@@ -52,7 +52,7 @@ jobs:
if: steps.cache-binaries.outputs.cache-hit != 'true' && env.GIT_DIFF
uses: actions/setup-go@v5
with:
go-version: "1.22"
go-version: "1.23"
cache: true
env:
GOOS: ${{ matrix.targetos }}
@@ -78,7 +78,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
go-version: "1.23"
cache: true
- name: Test and Create Coverage Report
if: env.GIT_DIFF
@@ -110,7 +110,7 @@ jobs:
- uses: actions/setup-go@v5
if: env.GIT_DIFF
with:
go-version: "1.22"
go-version: "1.23"
cache: true

- name: Test E2E
4 changes: 2 additions & 2 deletions contrib/images/umee.e2e.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Docker for e2e testing
# Creates dynamic binaries, by building from the latest version of umeed

FROM golang:1.22-bookworm AS builder
FROM golang:1.23-bookworm AS builder
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid Go version in base image

The specified Go version "1.23" in the base image is not yet released. The latest stable version is Go 1.22.x.

Apply this diff to fix the base image:

-FROM golang:1.23-bookworm AS builder
+FROM golang:1.22-bookworm AS builder
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM golang:1.23-bookworm AS builder
FROM golang:1.22-bookworm AS builder

ARG EXPERIMENTAL=true

## Download go module dependencies for umeed
@@ -18,7 +18,7 @@ RUN if [ "$EXPERIMENTAL" = "true" ] ; then echo "Installing experimental build";
RUN make install

## Prepare the final clear binary
FROM ubuntu:23.04
FROM ubuntu:24.04
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid Ubuntu version in base image

Ubuntu 24.04 is not yet released. Consider using Ubuntu 22.04 LTS for better stability and long-term support.

Apply this diff to fix the base image:

-FROM ubuntu:24.04
+FROM ubuntu:22.04
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM ubuntu:24.04
FROM ubuntu:22.04

EXPOSE 26656 26657 1317 9090 7171
ENTRYPOINT ["umeed", "start"]

4 changes: 2 additions & 2 deletions contrib/images/umeed.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Stage-1: build
# We use Debian Bullseye rather then Alpine because Alpine has problem building libwasmvm
# - requires to download libwasmvm_muslc from external source. Build with glibc is straightforward.
FROM golang:1.22-bookworm AS builder
FROM golang:1.23-bookworm AS builder
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid Go version in base image

The specified Go version "1.23" in the base image is not yet released. The latest stable version is Go 1.22.x.

Apply this diff to fix the base image:

-FROM golang:1.23-bookworm AS builder
+FROM golang:1.22-bookworm AS builder
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM golang:1.23-bookworm AS builder
FROM golang:1.22-bookworm AS builder


WORKDIR /src/
# optimization: if go.sum didn't change, docker will use cached image
@@ -14,7 +14,7 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=badgerdb make install

# Stage-2: copy binary and required artifacts to a fresh image
# we need to use debian compatible system.
FROM ubuntu:23.04
FROM ubuntu:24.04
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Invalid Ubuntu version in base image

Ubuntu 24.04 is not yet released. Consider using Ubuntu 22.04 LTS for better stability and long-term support.

Apply this diff to fix the base image:

-FROM ubuntu:24.04
+FROM ubuntu:22.04
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
FROM ubuntu:24.04
FROM ubuntu:22.04

EXPOSE 26656 26657 1317 9090
# Run umeed by default, omit entrypoint to ease using container with CLI
CMD ["umeed"]