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

chore: fix proto / typo #308

Merged
merged 4 commits into from
Nov 22, 2024
Merged
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ protoVer=0.14.0
protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer)
protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName)

proto-all: proto-format proto-lint proto-gen
proto-all: proto-format proto-lint proto-gen proto-swagger-gen proto-pulsar-gen
Copy link

Choose a reason for hiding this comment

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

💡 Codebase verification

Fix script permissions and verify swagger integration

The verification revealed several issues that need to be addressed:

  • protocgen-pulsar.sh exists but lacks executable permissions
  • Both scripts are properly integrated into the Makefile targets
  • protoc-swagger-gen.sh correctly integrates with update-swagger-docs target
  • The scripts contain proper error handling with set -eo pipefail

Required actions:

  • Add executable permissions to protocgen-pulsar.sh: chmod +x ./scripts/protocgen-pulsar.sh
🔗 Analysis chain

Verify the existence and permissions of protoc generation scripts.

The new targets reference shell scripts that need to be verified.

Also applies to: 166-174


Let me verify the content of these scripts and their dependencies to provide a more comprehensive response.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence and permissions of the protoc generation scripts

# Check if the scripts exist and are executable
for script in ./scripts/protoc-swagger-gen.sh ./scripts/protocgen-pulsar.sh; do
  if [[ ! -f "$script" ]]; then
    echo "Error: $script does not exist"
    exit 1
  fi
  if [[ ! -x "$script" ]]; then
    echo "Warning: $script is not executable"
  fi
done

# Verify the integration with update-swagger-docs
if ! grep -q "statik" "client/docs/Makefile" 2>/dev/null; then
  echo "Warning: statik integration might be missing in client/docs/Makefile"
fi

Length of output: 639


Script:

#!/bin/bash
# Check the content of the scripts and their dependencies
echo "=== Content of protoc-swagger-gen.sh ==="
cat ./scripts/protoc-swagger-gen.sh

echo -e "\n=== Content of protocgen-pulsar.sh ==="
cat ./scripts/protocgen-pulsar.sh

echo -e "\n=== Checking Makefile targets ==="
grep -A 5 "proto-swagger-gen:" Makefile
grep -A 5 "proto-pulsar-gen:" Makefile

Length of output: 3805


proto-gen:
@echo "Generating Protobuf files"
Expand Down
50 changes: 24 additions & 26 deletions api/ibc/applications/perm/v1/types.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions api/initia/gov/v1/gov.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions api/initia/mstaking/v1/query.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44836,7 +44836,7 @@ paths:
bonded shares

multiplied by exchange rate.
description: validators defines the the validators' info of a delegator.
description: validators defines the validators' info of a delegator.
pagination:
description: pagination defines the pagination in the response.
type: object
Expand Down Expand Up @@ -83596,7 +83596,7 @@ definitions:
exchange rate. Voting power can be calculated as total bonded shares

multiplied by exchange rate.
description: validators defines the the validators' info of a delegator.
description: validators defines the validators' info of a delegator.
pagination:
description: pagination defines the pagination in the response.
type: object
Expand Down Expand Up @@ -87557,6 +87557,7 @@ definitions:
description: >-
no_with_veto_count is the number of no with veto votes on a
proposal.
description: TallyResult defines the result of a tally.
initia.gov.v1.Vesting:
type: object
properties:
Expand Down
2 changes: 0 additions & 2 deletions proto/ibc/applications/perm/v1/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ syntax = "proto3";

package ibc.applications.perm.v1;

import "gogoproto/gogo.proto";

option go_package = "github.com/initia-labs/initia/x/ibc/perm/types";

// ChannelState defines the channel state for the specific port-id:channel-id pair.
Expand Down
1 change: 1 addition & 0 deletions proto/initia/gov/v1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ message Vesting {
string creator_addr = 3;
}

// TallyResult defines the result of a tally.
message TallyResult {
uint64 tally_height = 1;
string total_staking_power = 2 [(cosmos_proto.scalar) = "cosmos.Int"];
Expand Down
6 changes: 3 additions & 3 deletions proto/initia/mstaking/v1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ message QueryValidatorRequest {

// QueryValidatorResponse is response type for the Query/Validator RPC method
message QueryValidatorResponse {
// validator defines the the validator info.
// validator defines the validator info.
Validator validator = 1 [(gogoproto.nullable) = false];
}

Expand Down Expand Up @@ -288,7 +288,7 @@ message QueryDelegatorValidatorsRequest {
// QueryDelegatorValidatorsResponse is response type for the
// Query/DelegatorValidators RPC method.
message QueryDelegatorValidatorsResponse {
// validators defines the the validators' info of a delegator.
// validators defines the validators' info of a delegator.
repeated Validator validators = 1 [(gogoproto.nullable) = false];

// pagination defines the pagination in the response.
Expand All @@ -311,7 +311,7 @@ message QueryDelegatorValidatorRequest {
// QueryDelegatorValidatorResponse response type for the
// Query/DelegatorValidator RPC method.
message QueryDelegatorValidatorResponse {
// validator defines the the validator info.
// validator defines the validator info.
Validator validator = 1 [(gogoproto.nullable) = false];
}

Expand Down
1 change: 1 addition & 0 deletions x/gov/types/gov.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion x/ibc/nft-transfer/keeper/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet, data t
return nil
}

// OnAcknowledgementPacket responds to the the success or failure of a packet
// OnAcknowledgementPacket responds to the success or failure of a packet
// acknowledgement written on the receiving chain. If the acknowledgement
// was a success then nothing occurs. If the acknowledgement failed, then
// the sender is refunded their tokens using the refundPacketToken function.
Expand Down
34 changes: 16 additions & 18 deletions x/ibc/perm/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions x/mstaking/types/query.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading