pipe-cd / pipecd

The One CD for All {applications, platforms, operations}
https://pipecd.dev
Apache License 2.0
1.09k stars 153 forks source link

Add InstallTool RPC method for PluginService #5218

Closed Warashi closed 1 month ago

Warashi commented 1 month ago

What this PR does / why we need it:

With pipedv1's plugin architecture, we have to provide a way to install the tool used in the plugin. I considered the following ways and propose the first way.

  1. provide InstallTool RPC at the PluginService.
  2. provide the directory path to the plugins in which the tool should be installed
  3. provide nothing to the plugins, and the plugin does all of the installation, such as making the temp dir to install the tool, ...etc

I propose the first way because we should consider multiple plugins that want to install the same tool/version at the same time. In such a situation, we should prevent race conditions, and we can handle this with a sync.Mutex or something similar in the first way.

Which issue(s) this PR fixes:

Part of #4980

Does this PR introduce a user-facing change?: No

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 22.82%. Comparing base (0e7a177) to head (c116f55). Report is 10 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5218 +/- ## ======================================= Coverage 22.82% 22.82% ======================================= Files 420 420 Lines 45309 45309 ======================================= Hits 10340 10340 Misses 34173 34173 Partials 796 796 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.