Project

General

Profile

Actions

Bug #11412

closed

Can not delete a node property set by datasources

Added by François ARMAND about 7 years ago. Updated about 6 years ago.

Status:
Released
Priority:
N/A
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

Today, there is no way to delete a node property set by datasources, even after we have deleted/disabled the datasource.

As a workaround, one can use the "Behavior on 404 : delete" configuration for the data source, by it is just a hack.

I propose as a first step to add an api endpoint to delete a datasource property (for a node or for all nodes). We will need a full user story to behavior on what to do when the datasource is deleted, and perhaps an other user story to have some kind of "sudo" super power in the UI to force delete/update a node property, even if it is owned by an other provider.

Ex API usage:

# delete on all nodes
% curl -k -H "X-API-Token: xxxxxxx" -H "Content-Type: application/json" -X POST 'http://...rudder.../api/latest/datasources/clear/ds_test1'
{"action":"clearValueOneDatasourceAllNodes","result":"success","data":"Data for all nodes, for data source 'ds_test1', cleared"}

# delete on one node
% curl -k -H "X-API-Token: dTxvl4eL8p3YqvwefVbaJLdy8DyEt7Vw" -H "Content-Type: application/json" -X POST 'http://localhost:8085/rudder-web/api/latest/datasources/clear/ds_test1/node/f9a71efb-7c27-11e5-957f-f01faf3ee752'
{"action": "clearValueOneDatasourceOneNode","result": "success","data": "Data for node 'f9a71efb-7c27-11e5-957f-f01faf3ee752', for data source 'ds_test1', cleared"}

# can not delete for non data source prop
% curl -k -H "X-API-Token: xxxxxxxx" -H "Content-Type: application/json" -X POST 'https://...rudder.../api/latest/datasources/clear/test_non_ds/node/f9a71efb-7c27-11e5-957f-f01faf3ee752'
{"action":"clearValueOneDatasourceOneNode","result":"error","errorDetails":"Could not clear data source property <- Can not update property 'test_non_ds' on node 'f9a71efb-7c27-11e5-957f-f01faf3ee752': this property is not managed by data sou

Actions #1

Updated by François ARMAND about 7 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from François ARMAND to Vincent MEMBRÉ
  • Pull Request set to https://github.com/Normation/rudder-plugin-datasources/pull/29
Actions #2

Updated by François ARMAND about 7 years ago

  • Description updated (diff)
Actions #3

Updated by François ARMAND about 7 years ago

  • Status changed from Pending technical review to Pending release

Applied in changeset commit:rudder-plugin-datasources|bbf3034866b885b8e56c322bbca9bf3f6ba62799.

Actions #4

Updated by Vincent MEMBRÉ about 7 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 4.1.8 and 4.2.1 which were released today.

Actions #5

Updated by Vincent MEMBRÉ over 6 years ago

  • Project changed from Rudder to 54
  • Category deleted (71)
  • Target version changed from 4.1.8 to 427
Actions #6

Updated by Vincent MEMBRÉ about 6 years ago

  • Project changed from 54 to Datasources
  • Target version changed from 427 to 4.1-1.1
Actions

Also available in: Atom PDF