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

Add CI to validate proto compilation #59

Merged
merged 5 commits into from
Dec 8, 2024

Conversation

AlonLStarkWare
Copy link
Collaborator

@AlonLStarkWare AlonLStarkWare commented Nov 28, 2024

This change is Reviewable

Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 3 unresolved discussions (waiting on @AlonLStarkWare)


.github/workflows/starknet_p2p_specs_ci.yml line 41 at r1 (raw file):

          sudo apt-det install -y protobuf-compiler

      - name: Validate .proto files for Rust compatibility

Add a stage for go
If you can't find the go protoc, erase all of these and keep just c


.github/workflows/starknet_p2p_specs_ci.yml line 42 at r1 (raw file):

      - name: Validate .proto files for Rust compatibility
        run: protoc --rust_out=/dev/null **.proto

Add a flag to make warnings into errors


.github/workflows/starknet_p2p_specs_ci.yml line 43 at r1 (raw file):

      - name: Validate .proto files for Rust compatibility
        run: protoc --rust_out=/dev/null **.proto
      

remove spaces

* add quotations on main branch name

* cr

* testing changes

* cleaning up and swaping to Noelware proto instead of installing

* test protoc version

* add missing syntax on capabilities.proto

* attempting to fix compilation errors

* adding Classes message to snapshot.proto

* experimental-codegen

* kernel

* temp file instead of /dev/null

* package transaction duplication

* disable java compilation

* remove package declaration

* install protoc-gen-go before compiling to go

* add option go_package specification

* clean up

* testing find *.proto

* find proto step

* compiling each file seperatly

* apply changes to all compilations

* clean comments
@AlonLStarkWare AlonLStarkWare force-pushed the alonl/add_ci_to_compile_proto branch from 5a3dc54 to 5aba343 Compare December 2, 2024 13:56
Copy link
Collaborator Author

@AlonLStarkWare AlonLStarkWare left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 16 files reviewed, 3 unresolved discussions (waiting on @ShahakShama)


.github/workflows/starknet_p2p_specs_ci.yml line 41 at r1 (raw file):

Previously, ShahakShama wrote…

Add a stage for go
If you can't find the go protoc, erase all of these and keep just c

Done.


.github/workflows/starknet_p2p_specs_ci.yml line 42 at r1 (raw file):

Previously, ShahakShama wrote…

Add a flag to make warnings into errors

Done.


.github/workflows/starknet_p2p_specs_ci.yml line 43 at r1 (raw file):

Previously, ShahakShama wrote…

remove spaces

Done.

Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewed 16 of 16 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @AlonLStarkWare)


-- commits line 1 at r2:
Don't forget to squash the PR


p2p/proto/state.proto line 1 at r2 (raw file):

syntax = "proto3";

Do not rename this file


.github/workflows/starknet_p2p_specs_ci.yml line 24 at r2 (raw file):

      - name: Checkout repo
        uses: actions/checkout@v4
        

Erase spaces


.github/workflows/starknet_p2p_specs_ci.yml line 73 at r2 (raw file):

      - name: Success Message
        run: echo "All proto compilations passed!"

Please make sure that the terms "proto compilation" and "Compiling file" are commonly used on proto files

@AlonLStarkWare AlonLStarkWare force-pushed the alonl/add_ci_to_compile_proto branch from e4c7bff to fe408de Compare December 5, 2024 09:55
Copy link
Collaborator Author

@AlonLStarkWare AlonLStarkWare left a comment

Choose a reason for hiding this comment

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

Reviewable status: 14 of 16 files reviewed, 3 unresolved discussions (waiting on @ShahakShama)


.github/workflows/starknet_p2p_specs_ci.yml line 24 at r2 (raw file):

Previously, ShahakShama wrote…

Erase spaces

Done.


.github/workflows/starknet_p2p_specs_ci.yml line 73 at r2 (raw file):

Previously, ShahakShama wrote…

Please make sure that the terms "proto compilation" and "Compiling file" are commonly used on proto files

I removed the success message all together, the "Compiling file" can be removed as well IMO, I added them during debugging to make sure it goes over all of the files and just kept it. WDYT?


p2p/proto/state.proto line 1 at r2 (raw file):

Previously, ShahakShama wrote…

Do not rename this file

Done.

Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AlonLStarkWare)


.github/workflows/starknet_p2p_specs_ci.yml line 73 at r2 (raw file):

Previously, AlonLStarkWare (Alon-Lukatch-Starkware) wrote…

I removed the success message all together, the "Compiling file" can be removed as well IMO, I added them during debugging to make sure it goes over all of the files and just kept it. WDYT?

It's useful, you should keep the print. Just check what's the correct term for running protoc on a file. If you can't find, change the print to "Running protoc on $file"

Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @AlonLStarkWare)


.github/workflows/starknet_p2p_specs_ci.yml line 1 at r3 (raw file):

name: Starknet-P2p-Specs-CI

Rename this file to ci.yml

Copy link
Collaborator Author

@AlonLStarkWare AlonLStarkWare left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @ShahakShama)


.github/workflows/starknet_p2p_specs_ci.yml line 73 at r2 (raw file):

Previously, ShahakShama wrote…

It's useful, you should keep the print. Just check what's the correct term for running protoc on a file. If you can't find, change the print to "Running protoc on $file"

I was able to find some usages of this term so I kept it as Compiling file

Copy link
Collaborator

@ShahakShama ShahakShama left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AlonLStarkWare)

@ShahakShama ShahakShama merged commit 3531126 into main Dec 8, 2024
1 check passed
@ShahakShama ShahakShama deleted the alonl/add_ci_to_compile_proto branch December 8, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants