Project

General

Profile

Actions

Bug #27953

closed

If we give the same rules id two times in export API, it's included two time in archive

Bug #27953: If we give the same rules id two times in export API, it's included two time in archive

Added by François ARMAND 10 months ago. Updated 9 months ago.

Status:
Released
Priority:
N/A
Category:
Web - Maintenance
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

For ex,

curl -k  -H "X-API-Token: xxxx -H "Content-Type: application/json" -X GET 'http://localhost:8082/rudder-web/api/latest/archives/export?rules=eff9e40d-5ccf-450a-801a-d4432a7592e4,eff9e40d-5ccf-450a-801a-d4432a7592e4'  --output archive.zip

Leads to archive:

#in rudder/archives/archive
❯ ls rules
050__Test_grouping_by_value.json  050__Test_grouping_by_value.json_1

Updated by François ARMAND 10 months ago Actions #1

  • Status changed from New to In progress

Updated by François ARMAND 10 months ago Actions #2

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Clark ANDRIANASOLO
  • Pull Request set to https://github.com/Normation/rudder/pull/6752

Updated by Anonymous 9 months ago Actions #3

  • Status changed from Pending technical review to Pending release

Updated by Clark ANDRIANASOLO 9 months ago Actions #4

  • Fix check changed from To do to Checked

✓ in the Archive I got only a single occurrence

 curl --silent -k -H @/var/rudder/run/api-token-header 'https://localhost/rudder/api/latest/archives/export?rules=c976f1c5-3088-4482-87b4-361e17e0a21f,c976f1c5-3088-4482-87b4-361e17e0a21f'   --output export-duplicate-rule.zip

ends up with a single entry :

>>> unzip export-duplicate-rule.zip
>>> ls archive/rules/
Test_linked_directive_enable_disable.json
>>> ls -A archive/rules/ | wc -l
1

Updated by Félix DALLIDET 9 months ago Actions #5

  • Subject changed from If we give the same category id two times in export API, it's included two time in archive to If we give the same rules id two times in export API, it's included two time in archive
  • Fix check changed from Checked to To do

Updated by Clark ANDRIANASOLO 9 months ago Actions #6

  • Fix check changed from To do to Checked

Updated by Vincent MEMBRÉ 9 months ago Actions #7

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 8.3.7 and 9.0.2 which were released today.

Actions

Also available in: PDF Atom