Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSC publishes old data on subscription (with workaround) #569

Open
omarsilva1 opened this issue Nov 24, 2022 · 1 comment
Open

DSC publishes old data on subscription (with workaround) #569

omarsilva1 opened this issue Nov 24, 2022 · 1 comment

Comments

@omarsilva1
Copy link

Describe the bug
In case that a DSC has subscribed to its own artifact on update the subscriptions location receives the previous artifact data instead of the new data.

To Reproduce
Steps to reproduce the behavior:

  1. Create an artifact
  2. Create a subscription and set the location and subscriber to webhook
  3. Update the artifact with new data using the endpoint POST /api/artifact/artifactId/data
  4. See that webhook receives the value before the update

Expected behavior
The updated value should be dispatched to webhook.

@omarsilva1 omarsilva1 changed the title DSC publishes old data on subscription DSC publishes old data on subscription (with workaround) Dec 12, 2022
@omarsilva1
Copy link
Author

omarsilva1 commented Dec 12, 2022

There is a workaround for this bug. Updating only the value of the artifact leads to the aforementioned issue. However, if you update the whole artifact (using POST /api/artifact/{artifactId} with the request body containing the new value and the previous title and description) the correct value is sent.

The best way of updating an artifact value (so that it works with subscriptions)

PUT /api/artifacts/{id} HTTP/1.1
Content-Type: application/json

{
    "title": "Artifact Title",
    "description": "Artifact Description",
    "automatedDownload": false,
    "value": "new value"
}

It would be still interesting to know why POST /api/artifact/{artifactId}/data leads to the old data being sent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant