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

Implement Rust Wasm Plugin Build & Publish Action #1483

Merged
merged 4 commits into from
Nov 7, 2024

Conversation

007gzs
Copy link
Collaborator

@007gzs 007gzs commented Nov 6, 2024

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

fixes #1469

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-commenter
Copy link

codecov-commenter commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.44%. Comparing base (ef31e09) to head (ada695c).
Report is 185 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1483      +/-   ##
==========================================
+ Coverage   35.91%   43.44%   +7.53%     
==========================================
  Files          69       76       +7     
  Lines       11576    12320     +744     
==========================================
+ Hits         4157     5352    +1195     
+ Misses       7104     6631     -473     
- Partials      315      337      +22     

see 69 files with indirect coverage changes

GO_VERSION: 1.19
TINYGO_VERSION: 0.28.1
ORAS_VERSION: 1.0.0
steps:
- name: Set plugin_name and version from inputs or ref_name
- name: Set plugin_type、 plugin_name and version from inputs or ref_name
Copy link
Collaborator

Choose a reason for hiding this comment

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

don't use full width character in english comments

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@@ -0,0 +1,38 @@

Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need another Dockerfile to build?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I referred to the builder used for packaging and publishing in the go-lang https://github.com/alibaba/higress/blob/main/plugins/wasm-go/DockerfileBuilder

Copy link
Collaborator

Choose a reason for hiding this comment

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

Dockerfile is enough, no need additional files

Copy link
Collaborator

Choose a reason for hiding this comment

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

Both Dockerfile and DockerfileBuilder are for building an artifact named plugin.wasm, but the oras is a client which aims to publish artifact to registry. It means no matter which language is, the only different is how to build an artifact but using same way to publish artifact.

In a word, I think the oras should be a independent image, but not mixed in builders.

cc @johnlanni

Copy link
Collaborator

Choose a reason for hiding this comment

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

builder mainly facilitates developers by eliminating the need to download corresponding versions of oras, as well as Rust build tools, etc

Copy link
Collaborator

Choose a reason for hiding this comment

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

For developers, devcontainer might be the best solution and I still think it should keep simple for OCI building

Copy link
Collaborator

Choose a reason for hiding this comment

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

Well, you're right, developers just need the Dockerfile, but it seems that the DockerfileBuilder used for building images allows the workflow for publishing wasm plugins to remain consistent with Go. From this perspective, it still makes sense

Copy link
Collaborator

@johnlanni johnlanni left a comment

Choose a reason for hiding this comment

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

LGTM

@johnlanni johnlanni merged commit aee37c5 into alibaba:main Nov 7, 2024
12 checks passed
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.

Implement Rust Wasm Plugin Build & Publish Action
4 participants