Commit Graph

34 Commits

Author SHA1 Message Date
Julio Chana
31b37540e3 fix: Allow patches with empty files with multiple newlines or comments (#5771)
* fix: Add test, when an empty patch file is given, it should not fail

* fix: Add code so there's no error given if an empty file is given as a patch

* chore: Generate plugin with pluginator

* chore: fix tests

Signed-off-by: Julio Chana <julio.chana@lokalise.com>

* Add t.helper() at start of test function

Signed-off-by: Julio Chana <julio.chana@lokalise.com>

---------

Signed-off-by: Julio Chana <julio.chana@lokalise.com>
2025-03-16 19:15:48 -07:00
yugo kobayashi
59696d1ace fix a patch files accept multiple patches (#5194)
* fix a patch files accept multiple patches

* fix comments and variable name

* add error handling when using not allowed multiple strategic-merge patches

* fix error message of Multiple Strategic-Merge Patch file

* refactor transformStrategicMerge()

* add TODO comment and test for Multiple JSON patch Yaml documents are not allowed

* refactoring PatchTransformer

* add multiple patch test for PatchTransformer package

* improve error message to PatchTransformer

* refactor const and error message check

* fix some error messages
2023-09-15 16:20:13 -07:00
Yutaro
42bf3c0e2b prevent all uses of YAML aliases from being overwritten by a transformer (#5096)
* return copied Node

* add a test case about imageTagTransformer for anchor scenario

* add TestPatchTransformerAnchor

* TestReplacementTransformerAnchor
2023-03-31 16:07:50 -07:00
Natasha Sarkar
f96ac2d61e allow general name and kind changes via an options field in patches 2021-03-10 14:58:58 -08:00
Natasha Sarkar
71f4cecb4c fixed ports merging issue and refactored some kyaml.walk code 2021-02-08 17:49:10 -08:00
Natasha Sarkar
bd4580d73a Manage name changes (prefix/suffix) via YAML annotations rather than via in-memory-only fields. 2021-01-11 13:08:45 -08:00
Natasha Sarkar
6788af083b updated tests for multiple merge keys 2020-11-09 11:35:37 -08:00
Natasha Sarkar
df0576a270 use merge key tuple instead of single merge key 2020-11-09 11:34:31 -08:00
Donny Xia
78c26f55b5 support regex in GVK selection 2020-11-06 13:23:55 -08:00
Natasha Sarkar
ee9a4f2526 changed port merge key back to containerport 2020-10-15 11:43:14 -07:00
Natasha Sarkar
aee6ccb05c added documentation comments 2020-10-06 17:20:18 -07:00
Natasha Sarkar
3cd2a0a2f7 removed comments documenting broken test 2020-10-06 14:48:49 -07:00
Natasha Sarkar
ad01d8d34e updated schema to fix port merging issue 2020-10-06 14:30:30 -07:00
Donny Xia
74d0d7960e add option to choose prepend/append in merge 2020-10-02 09:56:59 -07:00
Donny Xia
31b395a33f handle the "$patch: delete" in patch transformer 2020-09-21 11:46:39 -07:00
Paul Kent
34e0ade3e7 respond to PR feedback 2020-08-04 17:25:38 -04:00
Paul Kent
729544b9f4 adds test for issue 2767 2020-07-25 15:37:07 -04:00
Paul Kent
69d497ccdd add test for issue #2767 2020-07-25 13:17:23 -04:00
jregan
33e68c0f97 Removing YAMLSupport==false code path.
This continues work on the master and v3.8.* branches
to eliminate apimachinery dependence.
2020-07-10 19:06:26 -07:00
jregan
2c615d78a2 Remove static cling in plugin development flow. 2020-04-20 08:29:01 -07:00
Jeffrey Regan
9c75afca58 PatchTransfomer readability mods. 2020-04-15 18:48:59 -07:00
Morten Torkildsen
ef592606a0 Update PatchTransformer to use kyaml filters 2020-04-13 21:25:02 -07:00
jregan
b1e48a46c7 Add more patch transformer coverage. 2020-04-10 18:21:12 -07:00
Morten Torkildsen
e7e7648c55 Update tests for PatchTransformer 2020-04-10 16:12:53 -07:00
Jeffrey Regan
861c86a70a Simplify plugin tests. 2019-12-02 17:12:59 -08:00
Jeffrey Regan
382c330f5b Consolidate test harness to one package. 2019-12-02 12:29:10 -08:00
jregan
f3e735153f More tests, better errors. 2019-11-26 19:29:06 -08:00
Jeffrey Regan
46524d3b6a Introduce API module. 2019-10-21 13:30:31 -07:00
jregan
951d15bf17 Make api/plugins 2019-10-20 15:12:13 -07:00
Jeffrey Regan
e5c8b5ec8f Start api directory, which will become a module. 2019-10-17 14:01:20 -07:00
Jeffrey Regan
41a008e9a3 Start pluglib, a set of public, plugin specific functions. 2019-10-14 19:43:55 -07:00
Jeffrey Regan
baa0296a12 Reduce size of pgmconfig package 2019-10-03 18:22:05 -07:00
jingfangliu
28d1bad3cb fix the ci failure 2019-07-15 18:58:52 -05:00
jingfangliu
3c05e2d664 add extended patch transformer 2019-07-12 14:34:08 -07:00