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

Bugfix: Return created task ID when posting document to API #2279

Merged
merged 2 commits into from Dec 30, 2022

Conversation

stumpylog
Copy link
Member

Proposed change

When posting a document, the response now includes the UUID of the created celery task. This can in turn be provided to the /api/tasks as a query parameter to get the status of the particular task.

Web UI uploads seemed fine, frontend task view also works are per normally. Only when exploring the API and providing the query parameter did this do anything (as expected)

Fixes #2278

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain)

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@stumpylog stumpylog requested a review from a team as a code owner December 30, 2022 22:03
@paperless-ngx-secretary paperless-ngx-secretary bot added backend non-trivial Requires approval by several team members labels Dec 30, 2022
@github-actions github-actions bot added the bug Bug report or a Bug-fix label Dec 30, 2022
@stumpylog stumpylog added this to the v1.11.1 milestone Dec 30, 2022
@stumpylog stumpylog linked an issue Dec 30, 2022 that may be closed by this pull request
@shamoon shamoon modified the milestones: v1.11.1, v1.11.2 Dec 30, 2022
@stumpylog stumpylog modified the milestones: v1.11.3, v1.11.2 Dec 30, 2022
Copy link
Member

@shamoon shamoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. I guess the only question is whether any existing apps are expecting the "OK" but hopefully theyre doing something more reliable like testing the HTTP status...

@shamoon shamoon modified the milestones: v1.11.2, v1.11.3 Dec 30, 2022
@shamoon shamoon merged commit 20e586f into dev Dec 30, 2022
@shamoon shamoon deleted the fix/2278-include-task-id branch December 30, 2022 23:45
@christf
Copy link

christf commented Dec 31, 2022

I think this is a breaking change in the api. An existing value is being assigned a different/new meaning.

While at it, the return data could be turned into a JSON structure with explicit task id field, avoiding future breaking changes when adding different values.

@shamoon
Copy link
Member

shamoon commented Dec 31, 2022

Yea agree, hence my comment above but hopefully most are using something more reliable such as http status.

We can mention this in the release notes, on balance, I think it’s useful

@github-actions
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend breaking-change bug Bug report or a Bug-fix non-trivial Requires approval by several team members
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] data loss in import: temporary failure in name resolution
3 participants