ChrisCarini / intellij-platform-plugin-verifier-action

GitHub Action for executing the intellij-plugin-verifier
Apache License 2.0
27 stars 9 forks source link

Option to take advantage of `-mute` flag to work around new verification failures #76

Closed drewbrokke closed 2 months ago

drewbrokke commented 3 months ago

Is your feature request related to a problem? Please describe. I am unable to get the verifier to pass due to a new rule called TemplateWordInPluginId. This happens because our plugin's package contains intellij. This was not prohibited when we first published the plugin a while ago, but it has since become a rule. If we were just invoking the CLI manually, we could follow the instructions in the failure message:

  The following files specified for the verification are not valid plugins:
      /github/workspace/build/distributions/liferay-intellij-plugin-2.1.0.zip
          Plugin problems:
              Invalid plugin descriptor 'plugin.xml'. The plugin ID 'com.liferay.ide.intellij.plugin' should not include the word 'intellij'.
                  This plugin problem has been reported since 2024-03-26. If the plugin was previously uploaded to the JetBrains Marketplace, it can be suppressed using the `-mute TemplateWordInPluginId` command-line switch.

But since it is invoked via the action, we are not able to pass in the recommended workaround args.

Describe the solution you'd like It would be nice to have some way of passing in the mute args via the action, whether through an explicit option (e.g. muteRules) or an option to pass in arbitrary args to the verifier CLI (e.g. cliArgs).

Describe alternatives you've considered I considered pinning an older version of the verifier CLI, though I'm not certain that would fix the issue since I don't know if the exact rules and the CLI itself are tied together.

Additional context Context: New mute switch added here: https://github.com/JetBrains/intellij-plugin-verifier/releases/tag/1.367 Example failure due to package ID failure due to the plugin being published before the introduction of the TemplateWordInPluginId rule: https://github.com/liferay/liferay-intellij-plugin/actions/runs/9620275069/job/26538155734?pr=302

Please let me know if I can provide any additional info that would be helpful. Thank you!

ChrisCarini commented 3 months ago

Hi @drewbrokke,

First off, thank you for using this GitHub Action and opening this feature request!

The muteRules option reminds me of failure-levels (implemented in https://github.com/ChrisCarini/intellij-platform-plugin-verifier-action/commit/cc63b2c4fc7e29fb99cc949f2b942a843ab6cce9) and is explicit, whereas cliArgs seems like it would be more flexible (e.g. if a similar CLI argument was added to the verifier in the future).

Either solution to the problem seems reasonable to me - is there one you'd recommend over the other? Also, are you interested in having a go at the implementation?

Best, Chris

drewbrokke commented 3 months ago

Thanks for the response, @ChrisCarini.

I can see a case for either one here, as each approach has advantages. muteRules would be a more straightforward API, but cliArgs gives that maximum future-facing flexibility.

Regarding cliArgs, since the entry for inputs would just be a string, we might be getting into tricky arg-parsing territory here ("is this space inside quotes or not?"), which may be more trouble than it's worth.

I'll give it a shot. For speed's sake, let's start with mute/muteRules. Sound ok?

ChrisCarini commented 3 months ago

Yeah, I agree with your assessment.

I'll give it a shot. For speed's sake, let's start with mute/muteRules. Sound ok?

SGTM!

ChrisCarini commented 2 months ago

@all-contributors please add @drewbrokke for code and docs

allcontributors[bot] commented 2 months ago

@ChrisCarini

I've put up a pull request to add @drewbrokke! :tada:

ChrisCarini commented 2 months ago

@drewbrokke - closing this out now that #77 is merged.

Please let me know if you have any other ideas/contributions, or if you encounter any issues!

Thank you for your time and contribution! 🙏 🙇

drewbrokke commented 2 months ago

Glad to help! Thanks for the reviews and feedback @ChrisCarini!