-
Notifications
You must be signed in to change notification settings - Fork 588
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
refactor: remove unnecessary deps from 08-wasm by reusing top level simapp binary #7445
base: main
Are you sure you want to change the base?
Conversation
@@ -569,6 +614,7 @@ func NewSimApp( | |||
mockModule, | |||
|
|||
// IBC light clients | |||
wasm.NewAppModule(app.WasmClientKeeper), // TODO(damian): see if we want to pass the lightclient module here, keeper is used in AppModule.RegisterServices etc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copied this over, is this todo still relevant? I'm not sure I see how the light client module could be passed?
…osmos/ibc-go into colin/7231-rm-wasm-callbacks-bin-logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I try to remove all the custom wasm workflows? I feel like now that we have a single place for a simapp, we should just be building a single simd. What do people think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea! would be fine in follow up if you'd prefer.
.github/workflows/docker.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice if someone could double check all the workflow changes, especially release.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also add the install python step here? (unless I am not seeing something)
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this is necessary to use the script to get the libwasm version and checksum
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should I simply delete this file now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -24,7 +35,7 @@ COPY go.sum . | |||
|
|||
RUN go mod download | |||
|
|||
RUN make build | |||
RUN cd simapp && GOOS=linux GOARCH=amd64 go build -mod=readonly -tags "netgo ledger muslc" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=sim -X github.com/cosmos/cosmos-sdk/version.AppName=simd -X github.com/cosmos/cosmos-sdk/version.Version= -X github.com/cosmos/cosmos-sdk/version.Commit= -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger muslc," -w -s -linkmode=external -extldflags "-Wl,-z,muldefs -static"' -trimpath -o /go/build/ ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like -linkmode=external -extldflags "-Wl,-z,muldefs -static"
is not usually included when we run make build
. Should I try to include these changes there as well? Folks okay if I hardcode it for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did a quick peek into changing this, but ran into a little difficulties, so I'll let someone be my guest if they want to adjust it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can open an issue but personally fine with hardcoding it for now, seems like a nice to have someone can pick up in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left some initial comments, loving the direction these changes are headed in
@@ -24,7 +35,7 @@ COPY go.sum . | |||
|
|||
RUN go mod download | |||
|
|||
RUN make build | |||
RUN cd simapp && GOOS=linux GOARCH=amd64 go build -mod=readonly -tags "netgo ledger muslc" -ldflags '-X github.com/cosmos/cosmos-sdk/version.Name=sim -X github.com/cosmos/cosmos-sdk/version.AppName=simd -X github.com/cosmos/cosmos-sdk/version.Version= -X github.com/cosmos/cosmos-sdk/version.Commit= -X "github.com/cosmos/cosmos-sdk/version.BuildTags=netgo ledger muslc," -w -s -linkmode=external -extldflags "-Wl,-z,muldefs -static"' -trimpath -o /go/build/ ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can open an issue but personally fine with hardcoding it for now, seems like a nice to have someone can pick up in future.
.github/workflows/docker.yml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also add the install python step here? (unless I am not seeing something)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea! would be fine in follow up if you'd prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
func main() { | ||
rootCmd := cmd.NewRootCmd() | ||
if err := svrcmd.Execute(rootCmd, "", simapp.DefaultNodeHome); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this stay in until we remove all references to the wasm dockerfile? (Think it is still referenced in some fork
workflows)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that direction. I can split this work up:
- add wasm into top level simapp
- switch over wasm workflows to main workflow (I think there's some consideration around image building off release branches)
- remove simd in wasm directory + Dockerfile (removes unnecessary deps)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through the reference in the fork workflow and it looks like running wasm tests on forks is currently disabled
@@ -9,18 +9,12 @@ replace github.com/cosmos/ibc-go/v9 => ../../../ | |||
replace github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 | |||
|
|||
require ( | |||
cosmossdk.io/api v0.7.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn, 7 dependencies 🪓
…sm-callbacks-bin-logic
@@ -18,14 +18,15 @@ | |||
# Copy relevant files before go mod download. Replace directives to local paths break if local | |||
# files are not copied before go mod download. | |||
ADD internal internal | |||
ADD simapp simapp |
Check notice
Code scanning / SonarCloud
Prefer COPY over ADD for copying local resources Low
bfb05ec
to
af2113c
Compare
Quality Gate passed for 'ibc-go'Issues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
won't smash through, will wait for another review. looks good to me! 🥇
Description
The general idea:
closes: #7231
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.