Project

General

Profile

Actions

Bug #24853

closed

Cannot remove rules create with API

Added by Gael Richier 6 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
N/A
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
No

Related issues 1 (1 open0 closed)

Related to Rudder - Bug #24859: Creating IDs with special characters should not be supportedNewClark ANDRIANASOLOActions
Actions #1

Updated by Gael Richier 6 months ago · Edited

  • Category set to API

Hello,
I create a rule using API, with spaces (2) in the ID and name.
When I tried to remove this rules from UI or API, I have the following error:

2024-05-13 12:53:39+0000 ERROR api-processing - Inconsistency: Error when parsing 'Audit+all+host' as a rudder id. At most one '+' is authorized.

Do you have a workaround to remove it ? (I tried remove the rules file from /var/rudder/configuration-repository/rules and restart the server, but the issue still there)

Actions #2

Updated by Clark ANDRIANASOLO 6 months ago

Hello @Gael Richier !

Unfortunately having spaces within the ID can lead to errors, we recommend only using alphanumeric characters and '-' or '_' for the ID

A workaround is effectively to remove the rule from /var/rudder/configuration-repository/rules as you did, but you need to commit that on the git repository, AND also commit all other changes on rules. In practice :


git add ./rules
git commit -m "Delete 'Audit all host' rule, ..." 

Then you would need to use to archiving feature of Rudder : in the menu, open Utilities > Archives, and scroll to Archive rules, then restore rules with Latest Git commit.
After that, the rule should have been deleted from Rudder.

Beware that if you don't correctly commit your changes on rules, you may lose data. So you should double check that !

Actions #3

Updated by Gael Richier 6 months ago

Thanks for the workaround, it's working !

Maybe add a control on the create API side to avoid spaces in ID could be a good improvement like you do in delete.

I'll use a "slugification" in a future to avoid this again

Actions #4

Updated by Clark ANDRIANASOLO 6 months ago · Edited

  • Status changed from New to Resolved
  • Assignee set to Clark ANDRIANASOLO
  • Target version set to 7.3.15

Happy to hear that grichier
Yes, we definitely should add the control...
By default if you leave the @ID
empty, an UUID would be generated which is the case when creating it from the Rudder UI.

Actions #5

Updated by Clark ANDRIANASOLO 6 months ago

  • Related to Bug #24859: Creating IDs with special characters should not be supported added
Actions

Also available in: Atom PDF