You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you mark an entity, e.g.: a project variable, with delete: true, GitLabForm tries to add it, if it doesn't find in the project and fail because it is missing required properties.
Consider this config:
variables:
foobar:
key: FOOBAR
delete: true
If the project has a variable called FOOBAR, on first run it will be removed. This is corect.
However, on the second run, there is no FOOBAR variale and GitLabForm will try to add FOOBAR variable. But it will fail, because value property is missing.
GitLabForm version
Output of gitlabform -V
3.8.0
GitLab version
GitLab Enterprise Edition v16.7.5-ee
The text was updated successfully, but these errors were encountered:
If the project has a variable called FOOBAR, on first run it will be removed. This is corect.
However, on the second run, there is no FOOBAR variale and GitLabForm will try to add FOOBAR variable. But it will fail, because value property is missing.
Sounds like a bug. Thanks for the details. Maybe we have a missing acceptance test for the delete feature.
As an alternative, have you tried using the enforce config instead of delete for individual variable removal? Also, you mentioned "when you mark an entity with delete: true...", does that mean this issue happens with other entities or you only ran into the issue with variables config?
Thanks for your comment. I can't use enforce, because I don't want to remove other variables from my config, and I don't want to list them all in my GitLabForm config.
As for other entity types, I don't use other types of entities, but I believe this applies to other entities, because the code is common for many entity types.
Thanks for clarifying. I personally haven't used the delete feature. So not sure if it's expected to remove that config after the first run. Also a little skeptical if the issue applies to all entities. My understanding is that this key is not supported on all types of config key. I could be wrong.
Anyways, you're already trying to provide a fix via PR. Thanks for that. If you can continue with it, that'd be great. Currently that PR is not mergeable though.
Describe the bug
When you mark an entity, e.g.: a project variable, with
delete: true
, GitLabForm tries to add it, if it doesn't find in the project and fail because it is missing required properties.Consider this config:
value
property is missing.GitLabForm version
Output of
gitlabform -V
3.8.0
GitLab version
GitLab Enterprise Edition v16.7.5-ee
The text was updated successfully, but these errors were encountered: