Tom Wieczorek
0da30de892
Make test scripts run without /bin/bash
...
The test scripts hardcoded #!/bin/bash while they are not really
requiring bash. Use the more portable #!/usr/bin/env sh instead, so that
they use the default shell.
Signed-off-by: Tom Wieczorek <twieczorek@mirantis.com>
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
1 week ago
MrJack
6495074826
Revert "Revert "feat(plugin): add --version flag to plugin update command""
...
This reverts commit d1a7fc5fa1 .
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
1 week ago
MrJack
209569af01
Revert "feat(plugin): add --version flag to plugin update command"
...
This reverts commit bd37347a06 .
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
1 week ago
MrJack
bd37347a06
feat(plugin): add --version flag to plugin update command
...
Add support for specifying a version constraint when updating plugins,
matching the existing behavior of helm plugin install.
Changes:
- Add --version flag to plugin update command
- Update VCSInstaller.Update() to resolve and checkout specified version
- Update FindSource() to accept version parameter
- Add TestVCSInstallerUpdateWithVersion test for version support
Signed-off-by: MrJack <36191829+biagiopietro@users.noreply.github.com>
3 weeks ago
Scott Rigby
4d54bea5ff
Merge pull request #31491 from benoittgt/31490-plugin-name-helper
...
feat: improve plugin name validation error messages and field name detection (v1)
1 month ago
Benoit Tigeot
71591ee63e
style: linting
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
b296cbef6c
test: split tests between valid and invalid
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
9b242dd9ed
test: convert tests to table drive tests
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
c81a09b89a
test: refactor TestMetadataLegacyValidate to be more generic
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
yxxhero
8c87024860
update tests
...
Signed-off-by: yxxhero <aiopsclub@163.com>
1 month ago
yxxhero
2d49f0cb4a
Refactor environment variable expansion in PrepareCommands and update tests
...
Signed-off-by: yxxhero <aiopsclub@163.com>
1 month ago
Benoit Tigeot
acf331a005
fix: improve plugin name validation err messages early via unmarshalling
...
- Add strict YAML unmarshalling for v1 plugins (d.KnownFields)
- Add comprehensive test coverage for validPluginName regex
- Maintain backwards compatibility for legacy plugins
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
9e1e3d21c5
fix: Make invalid name error message more similar and move tests
...
Follow Scott comment\
https://github.com/helm/helm/pull/31491/files#r2524933784
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
cf077ceb27
fix: focus only on plugin name but give more info about what we get
...
And improve test
Follow Scott comment:
> here I would have a list of valid and invalid names based on pattern, with a check and intended outcome for each one so that we comprehensively cover the rules.
https://github.com/helm/helm/pull/31491/files#r2524820312
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
f4b139a82c
Make validation error similar and explicit for both metadatas
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Benoit Tigeot
c04e18e452
fix: improve plugin name validation error messages
...
Signed-off-by: Benoit Tigeot <benoit.tigeot@lifen.fr>
1 month ago
Matt Farina
a3db5f5667
Merge pull request #31408 from AndiDog/plugin-err-msg
...
Improve error message when plugin source cannot be determined or a non-directory is passed
2 months ago
Matt Farina
97ee09d935
Merge pull request #31365 from reddaisyy/main
...
refactor: use reflect.TypeFor
2 months ago
Andreas Sommer
b05411506a
Improve error message when plugin source cannot be determined or a non-directory is passed
...
Signed-off-by: Andreas Sommer <andreas.sommer87@googlemail.com>
2 months ago
wyrapeseed
b9eadd3186
chore: fix some comment format
...
Signed-off-by: wyrapeseed <wyrapeseed@outlook.com>
2 months ago
reddaisyy
e69a12dad3
refactor: use reflect.TypeFor
...
Signed-off-by: reddaisyy <reddaisy@outlook.jp>
3 months ago
George Jenkins
a7a6a5e3b0
Merge pull request #31312 from gjenkins8/gjenkins/rm_plugin_schema_settings
...
Remove unused 'Settings' from plugin schema
3 months ago
George Jenkins
93c02523bb
Merge pull request #31249 from banjoh/em/additional-logging
...
chore: add additional logging to plugin installer
3 months ago
George Jenkins
900cf2a93d
Merge pull request #31320 from kosiew/sign-31181
...
provenance: allow RSA signing when ed25519 keys are present (switch to ProtonMail/go-crypto)
3 months ago
juejinyuxitu
69dbd6115e
chore: fix some typos in comment
...
Signed-off-by: juejinyuxitu <juejinyuxitu@outlook.com>
3 months ago
Siew Kam Onn
7c9176ae35
Update dependencies and refactor crypto imports to use ProtonMail's go-crypto package
...
Signed-off-by: Siew Kam Onn <kosiew@gmail.com>
3 months ago
George Jenkins
6bc6231bcc
Remove unused 'Settings' from plugin schema
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
3 months ago
yajianggroup
cfaf30083a
refactor: use strings.CutPrefix
...
Signed-off-by: yajianggroup <yajianggroup@outlook.com>
4 months ago
Evans Mungai
3d23230ef8
chore: add additional logging to plugin installer
...
Signed-off-by: Evans Mungai <mbuevans@gmail.com>
4 months ago
George Jenkins
a8151ef4fe
Cleanup plugin config
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
George Jenkins
5926ec83dd
Remove SetupPluginEnv
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
George Jenkins
665c5a1fc9
Merge pull request #31224 from gjenkins8/gjenkins/postrenderer_plugin_message_value
...
fix: Adjust PostRenderer plugin output to value
4 months ago
George Jenkins
d99d732542
fix: Adjust PostRenderer plugin output to value
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
George Jenkins
c35755a197
Remove legacy Command/Hooks from v1 Subprocess ( #23 )
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
Scott Rigby
591d863df5
Move Postrenderer to a plugin type
...
Fix/add back postrenderer args unit tests
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
e814ff3c38
Remove unnecessary file i/o operations from signing and verifying
...
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
9ea35da0d0
[HIP-0026] Plugin packaging, signing, and verification ( #31176 )
...
* Plugin packaging, signing and verification
Signed-off-by: Scott Rigby <scott@r6by.com>
* wrap keyring read error with more explicit message
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* skip unnecessary check
Co-authored-by: Evans Mungai <mbuevans@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Change behavior for installing plugin with missing .prov file (now warns and continues instead of failing)
Signed-off-by: Scott Rigby <scott@r6by.com>
* Add comprehensive plugin verification tests
- Test missing .prov files (warns but continues)
- Test invalid .prov file formats (fails verification)
- Test hash mismatches in .prov files (fails verification)
- Test .prov file access errors (fails appropriately)
- Test directory plugins don't support verification
- Test installation without verification enabled (succeeds)
- Test with valid .prov files (fails on empty keyring as expected)
---------
Signed-off-by: Scott Rigby <scott@r6by.com>
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Co-authored-by: Evans Mungai <mbuevans@gmail.com>
4 months ago
George Jenkins
2658a00863
fix output message value
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
George Jenkins
e5b612626e
fixup slog tmpDirInner
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
George Jenkins
b6545e903a
code review + bug fixes
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
George Jenkins
c8e51b40c2
Plugin extism/v1 runtime
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago
Scott Rigby
3d30112468
Fix LocalInstaller Path() to strip version from tarball filenames
...
Override Path() method to use existing stripPluginName function for archives
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
16924a51db
Fix: Removed unsafe umask manipulation in tests
...
Problem: Tests used syscall.Umask(0000) which could leave your shell creating
files with 777 permissions if interrupted.
Solution: Instead of changing umask, tests now detect the current umask and
calculate expected permissions after it's applied.
Result: Same test coverage, but safe from system-wide side effects.
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
5c663db853
Plugin tarball installer support for HTTP (fix) and local (feat)
...
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
d19130f69e
Fix file handle management in tar extractors
...
Use defer outFile.Close() to avoid multiple close calls and ensure proper resource cleanup
Co-authored-by: Andrew Block <andy.block@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
fd41fdd9c9
New registry plugin func GetPluginName. Re-use regsitry.reference
...
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
7d22bb25fa
Plugin OCI installer
...
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
a7578fec74
Plugin types and plugin apiVersion v1
...
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
4 months ago
Scott Rigby
be74ab72a0
[HIP-0026] Plugin runtime interface ( #31145 )
...
* Runtime abstraction to encapsulate subprocess code and enable future runtimes
Also fix race condition in TestPrepareCommandExtraArgs by replacing the shared variable modification with a local copy
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Remove commented out code
Co-authored-by: Joe Julian <me@joejulian.name>
Signed-off-by: Scott Rigby <scott@r6by.com>
* Check test failure string
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
Signed-off-by: Scott Rigby <scott@r6by.com>
---------
Signed-off-by: Scott Rigby <scott@r6by.com>
Co-authored-by: George Jenkins <gvjenkins@gmail.com>
Co-authored-by: Joe Julian <me@joejulian.name>
Co-authored-by: Jesse Simpson <jesse.simpson36@gmail.com>
4 months ago
George Jenkins
a1c84f9a4c
Move pkg/plugin -> internal/plugin
...
Signed-off-by: George Jenkins <gvjenkins@gmail.com>
4 months ago