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

Store reason of discarded payloads #283

Merged
merged 7 commits into from
Mar 29, 2023
Merged

Conversation

OlivierCavadenti
Copy link
Contributor

  • Store if a payload is skipped, valid or error.
  • Store the reason of the error, when a user defined validation error occurs.

- Store if a payload is skipped, valid or error.
- Store the reason of the error, when a user
defined validation error occurs.
@OlivierCavadenti OlivierCavadenti self-assigned this Mar 24, 2023
@OlivierCavadenti OlivierCavadenti changed the title Store reason of discard payload Store reason of discarded payloads Mar 24, 2023
@github-advanced-security
Copy link

You have successfully added a new CodeQL configuration /language:javascript. As part of the setup process, we have scanned this repository and found 118 existing alerts. Please check the repository Security tab to see all alerts.

Copy link
Contributor

@Aschen Aschen left a comment

Choose a reason for hiding this comment

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

@@ -57,23 +59,36 @@ export class PayloadService {

const uuid = request.input.args.uuid || uuidv4();
let valid = true;
let state: StateDecoder = StateDecoder.VALID;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let state: StateDecoder = StateDecoder.VALID;
let state = StateDecoder.VALID;

lib/modules/decoder/StateDecoder.ts Outdated Show resolved Hide resolved
lib/modules/decoder/PayloadService.ts Outdated Show resolved Hide resolved
lib/modules/decoder/SkipError.ts Outdated Show resolved Hide resolved
@OlivierCavadenti
Copy link
Contributor Author

ingestion/index.md?plain=1#L109

And also add the state and reason here https://github.com/kuzzleio/kuzzle-device-manager/blob/master/doc/2/guides/measures-ingestion/index.md?plain=1#L232

I still need to do that.
Btw, the state enum is stored in ES with a number, maybe could be better, for queries and clarity, to store the name of the value and not the number (0,1, 2) ? @Aschen

@Aschen
Copy link
Contributor

Aschen commented Mar 28, 2023

Btw, the state enum is stored in ES with a number, maybe could be better, for queries and clarity, to store the name of the value and not the number (0,1, 2)

Yes it would be better to have string values 👍

@OlivierCavadenti OlivierCavadenti merged commit cc8545f into 2-dev Mar 29, 2023
@Aschen Aschen mentioned this pull request Apr 17, 2023
Aschen added a commit that referenced this pull request Apr 17, 2023
# [2.2.0](https://github.com/kuzzleio/kuzzle-device-manager/releases/tag/2.2.0) (2023-04-17)


#### Bug fixes

- [ [#290](#290) ] Historize asset for each same measurements   ([tdislay](https://github.com/tdislay))
- [ [#288](#288) ] Full path nested metadata when create/update assets   ([OlivierCavadenti](https://github.com/OlivierCavadenti))
- [ [#286](#286) ] ModelService upsert -> createOrReplace   ([fmauNeko](https://github.com/fmauNeko))
- [ [#282](#282) ] Fix engine creation   ([Aschen](https://github.com/Aschen))

#### New features

- [ [#296](#296) ] Export measures to CSV   ([Aschen](https://github.com/Aschen))
- [ [#291](#291) ] Add type of measure linked in each links of asset measures.   ([OlivierCavadenti](https://github.com/OlivierCavadenti))

#### Enhancements

- [ [#295](#295) ] Export default mappings   ([Aschen](https://github.com/Aschen))
- [ [#293](#293) ] Allow JSONObject in metadata   ([Aschen](https://github.com/Aschen))
- [ [#287](#287) ] Update metadata in existing assets when the model is modified   ([fmauNeko](https://github.com/fmauNeko))
- [ [#283](#283) ] Store reason of discarded payloads   ([OlivierCavadenti](https://github.com/OlivierCavadenti))

#### Others

- [ [#289](#289) ] Split tsconfig for tests   ([fmauNeko](https://github.com/fmauNeko))
---
@sebtiz13 sebtiz13 deleted the fix/145-payload-errors branch March 13, 2024 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants