Skip to content

ci: expand plugin validation with toolkit checks and run the uploader as a package - #2835

Open
lin-snow wants to merge 2 commits into
mainfrom
feat/update-validate-difypkg-workflow
Open

ci: expand plugin validation with toolkit checks and run the uploader as a package#2835
lin-snow wants to merge 2 commits into
mainfrom
feat/update-validate-difypkg-workflow

Conversation

@lin-snow

@lin-snow lin-snow commented Aug 7, 2026

Copy link
Copy Markdown

Expands the PR pre-check with the marketplace toolkit's validators and switches the uploader to its package invocation.

flowchart LR
    PR["Plugin PR"] --> PC["pre-check:<br/>a dozen toolkit validators<br/>+ install test + packaging check"]
    PC --> S["one validation summary,<br/>fail at the end"]
    MG["merge to main"] --> UM["upload-merged:<br/>revalidate package"]
    UM --> UP["python3 .scripts/uploader"]
    UP --> M1["POST /plugins/inner-upload"]
    UP --> M2["PUT /plugin-artifacts/{checksum}/scan-report"]
Loading
  • Every check is a validator/check-*.py CLI from dify-marketplace-toolkit. Blocking findings and review warnings are collected into a single summary instead of dying on the first error.
  • The merged package is revalidated before upload.
  • pre-check-plugin-sandbox.yaml is a copy of the pre-check triggered only by PRs targeting a precheck-sandbox branch, so check changes can be exercised without touching real submissions.
  • The uploader is invoked as a package: python3 .scripts/uploader. It uploads and then submits the security scan report against the returned artifact checksum on its own — workflows carry no scan logic, and a report failure warns without failing a publish.

Merge after langgenius/dify-marketplace-toolkit#4, which ships the package entry point (the old upload-package.py path keeps working there as an alias until both plugin repositories migrate).

FFXN and others added 2 commits August 7, 2026 09:51
- add blocking and warning checks to plugin PR pre-checks
- generate a detailed validation summary before final failure
- revalidate merged packages before marketplace upload
- add a sandbox workflow for testing pre-check changes
The toolkit's uploader is now an importable package; the canonical
invocation is the package directory itself:

    python3 .scripts/uploader

Merge after langgenius/dify-marketplace-toolkit#4 — workflows clone the
toolkit at HEAD, and the package form only exists on that branch. The
toolkit keeps upload-package.py as a deprecated alias until both plugin
repositories run the package form, then removes it.
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Please select exactly one risk level in the PR template: Low risk, Medium risk, or High risk. This helps Marketplace reviewers route the submission correctly.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR strengthens the plugin CI workflows by expanding validation to include multiple dify-marketplace-toolkit validator checks, consolidating results into a summary, and updating the uploader invocation to run via the uploader package entry point.

Changes:

  • Expanded PR pre-check to run a broader set of toolkit validators and collect results into a single end-of-job summary before failing on blocking errors.
  • Added a sandbox-only copy of the pre-check workflow (triggered only for PRs targeting precheck-sandbox) to test CI changes without affecting real submissions.
  • Updated upload/publish workflows to invoke the uploader via python3 .scripts/uploader and added final package revalidation on merge before upload.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
.github/workflows/upload-merged-plugin.yaml Adds final merged-package validation steps and switches uploader invocation to package entry point.
.github/workflows/pre-check-plugin.yaml Expands PR validation using toolkit validators, improves summary reporting, and adds a final “fail on blocking errors” gate.
.github/workflows/pre-check-plugin-sandbox.yaml Introduces a sandbox-scoped duplicate of the pre-check workflow for safely exercising workflow changes.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +702 to +706
- name: Fail on Blocking Errors
if: always()
run: |
BLOCKING_ERROR_FILES=(
/tmp/manifest_errors.txt
Comment on lines +114 to +121
- name: Check Package Contents
continue-on-error: true
run: |
python3 .scripts/validator/check-package-contents.py \
-d "$PLUGIN_PATH" \
--package-file "$SUBMITTED_PLUGIN_PATH.zip" \
--error-file /tmp/package_contents_errors.txt \
--warning-file /tmp/package_contents_warnings.txt
Comment on lines +113 to +120
- name: Check Package Contents
continue-on-error: true
run: |
python3 .scripts/validator/check-package-contents.py \
-d "$PLUGIN_PATH" \
--package-file "$SUBMITTED_PLUGIN_PATH.zip" \
--error-file /tmp/package_contents_errors.txt \
--warning-file /tmp/package_contents_warnings.txt
Comment on lines +701 to +705
- name: Fail on Blocking Errors
if: always()
run: |
BLOCKING_ERROR_FILES=(
/tmp/manifest_errors.txt
Comment on lines +75 to +79
- name: Unpack Plugin for Final Validation
run: |
mkdir -p unpacked_plugin
unzip "$PLUGIN_PATH" -d unpacked_plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: missing Missing or invalid Marketplace risk selection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants