Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 6 additions & 1 deletion .github/actions/setup-ubuntu/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
---
name: setup-ubuntu
inputs:
go-cache:
description: 'Enable actions/setup-go module cache restore/save. Disable on self-hosted runners where the module cache persists on disk.'
required: false
default: 'false'
Comment thread
olebel marked this conversation as resolved.
runs:
using: 'composite'
steps:
Expand Down Expand Up @@ -33,7 +38,7 @@ runs:
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GOVERSION }}"
check-latest: true
cache: "${{ inputs.go-cache }}"
- name: set environment
uses: HatsuneMiku3939/direnv-action@v1
with:
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ on:

jobs:
build-bins:
runs-on: ubuntu-latest
runs-on: core-runner
steps:
- name: Cleanup build folder
run: |
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
Comment on lines +21 to +24
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Don’t suppress cleanup failures with || true.

Line 23/24 and Line 51/52 currently mask cleanup errors. That can silently keep stale state on persistent runners and reintroduce flaky builds.

Safer fail-fast cleanup
-      - name: Cleanup build folder
-        run: |
-          sudo rm -rf ./* || true
-          sudo rm -rf ./.??* || true
+      - name: Cleanup build folder
+        run: |
+          sudo find . -mindepth 1 -maxdepth 1 -exec rm -rf -- {} +

Also applies to: 49-52

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/tests.yaml around lines 21 - 24, The cleanup step named
"Cleanup build folder" currently masks failures by appending "|| true" to the rm
commands (sudo rm -rf ./* || true and sudo rm -rf ./.??* || true); remove the
"|| true" and replace the brittle suppression with a safe existence check or a
find-based removal so failures surface — e.g. wrap removals in conditionals (if
[ -e ./* ] || [ -e ./.??* ]; then sudo rm -rf ./* ./.??*; fi) or use a tolerant
deletion like find . -maxdepth 1 -mindepth 1 -exec sudo rm -rf {} +; apply the
same change to the other occurrence (the second pair of rm commands) so cleanup
fails fast instead of being silently ignored.

- name: Checkout code
uses: actions/checkout@v4
- name: Free Disk Space (Ubuntu)
Expand All @@ -40,8 +44,12 @@ jobs:
- run: make docker-image

tests:
runs-on: ubuntu-latest
runs-on: core-runner
steps:
- name: Cleanup build folder
run: |
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
- name: Checkout code
uses: actions/checkout@v4
- name: Setup environment
Expand Down Expand Up @@ -97,14 +105,19 @@ jobs:
run: make test-sim-fullapp

release-dry-run:
runs-on: core-e2e
runs-on: core-runner
steps:
- name: Cleanup build folder
run: |
sudo rm -rf ./* || true
sudo rm -rf ./.??* || true
- name: Checkout code
uses: actions/checkout@v4
- name: Cache wasmvm libs
uses: actions/cache@v4
with:
path: .cache/lib
key: wasmvm-${{ hashFiles('go.sum') }}
- name: Setup environment
uses: ./.github/actions/setup-ubuntu
- name: Set up QEMU
Expand Down
2 changes: 1 addition & 1 deletion app/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import (

var mbasics = module.NewBasicManager(
append([]module.AppModuleBasic{
// accounts, fees.
// accounts, fees.
auth.AppModuleBasic{},
// authorizations
authzmodule.AppModuleBasic{},
Expand Down
2 changes: 1 addition & 1 deletion x/deployment/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
ownerRange := collections.NewPrefixedPairRange[string, uint64](owner)

var r *collections.PairRange[string, uint64]
if resumePK != nil {

Check failure on line 186 in x/deployment/keeper/grpc_query.go

View workflow job for this annotation

GitHub Actions / lint-go

ifElseChain: rewrite if-else to switch statement (gocritic)
if req.Pagination.Reverse {
r = collections.NewPrefixedPairRange[string, uint64](owner).EndInclusive(resumePK.K2()).Descending()
} else {
Expand Down Expand Up @@ -283,7 +283,7 @@
var iter indexes.MultiIterator[int32, keys.DeploymentPrimaryKey]
var err error

if idx == 0 && resumePK != nil {

Check failure on line 286 in x/deployment/keeper/grpc_query.go

View workflow job for this annotation

GitHub Actions / lint-go

ifElseChain: rewrite if-else to switch statement (gocritic)
r := collections.NewPrefixedPairRange[int32, keys.DeploymentPrimaryKey](int32(state)).StartInclusive(*resumePK)
if req.Pagination.Reverse {
r = collections.NewPrefixedPairRange[int32, keys.DeploymentPrimaryKey](int32(state)).EndInclusive(*resumePK).Descending()
Expand Down Expand Up @@ -430,7 +430,7 @@
sdkCtx := sdk.UnwrapSDKContext(ctx)
params, err := k.GetParams(sdkCtx)
if err != nil {
return nil, status.Errorf(codes.NotFound, err.Error())
return nil, status.Error(codes.NotFound, err.Error())
}

return &types.QueryParamsResponse{Params: params}, nil
Expand Down
2 changes: 1 addition & 1 deletion x/market/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
var iter indexes.MultiIterator[int32, keys.OrderPrimaryKey]
var err error

if idx == 0 && resumePK != nil {

Check failure on line 252 in x/market/keeper/grpc_query.go

View workflow job for this annotation

GitHub Actions / lint-go

ifElseChain: rewrite if-else to switch statement (gocritic)
r := collections.NewPrefixedPairRange[int32, keys.OrderPrimaryKey](int32(state)).StartInclusive(*resumePK)
if req.Pagination.Reverse {
r = collections.NewPrefixedPairRange[int32, keys.OrderPrimaryKey](int32(state)).EndInclusive(*resumePK).Descending()
Expand Down Expand Up @@ -1167,7 +1167,7 @@
sdkCtx := sdk.UnwrapSDKContext(ctx)
params, err := k.GetParams(sdkCtx)
if err != nil {
return nil, status.Errorf(codes.NotFound, err.Error())
return nil, status.Error(codes.NotFound, err.Error())
}

return &types.QueryParamsResponse{Params: params}, nil
Expand Down
Loading