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

Data type conflict on message fields with intermittent alphanumeric values prevents writing to influx #138

Open
adev4a opened this issue Apr 17, 2023 · 0 comments
Labels
anomaly anomaly is an irregularity or disproportion.

Comments

@adev4a
Copy link
Collaborator

adev4a commented Apr 17, 2023

Summary

During verification testing it was seen that some message fields like bsm_id from v2xhub_mobility_path_in and req_id from TCR, TCM messages change in values from being alphanumeric at times to complete integers at other times.

Screenshot below shows logs from streets bridge where the value is '3029826' and '5e59b61e'

image

While processing these messages in the messaging server, the alphanumeric strings are treated as strings and the strings with only numerical values are treated as integers/floats.
https://github.com/usdot-fhwa-stol/cda-telematics/blob/release/k900/telematic_system/telematic_cloud_messaging/src/main/java/com/telematic/telematic_cloud_messaging/message_converters/JSON2KeyValuePairsConverter.java#L30

image

Writing to influx requires that the data type of fields remain constant, this change prevents the message from being written.

Commit

release/k900

Expected Behavior

Data type of message fields should be static

Actual Behavior

Data type of message fields is not static

Steps to Reproduce the Actual Behavior

  1. Start the telematic messaging server
  2. Start the streets bridge and publish a message on the topic v2xhub_mobility_operation with hostBSMId as an alphanumeric string like '5ef9b61e', and another message with the value completely numerical like '30291826'
  3. If testing with tcr.req_id, start the cloud bridge and publish messages with the req_id field taking alphanumeric and numeric values
  4. Check messaging server logs to see if the message was pushed to influx without any exceptions thrown

Related Work

No response

@adev4a adev4a added bug Something isn't working anomaly anomaly is an irregularity or disproportion. labels Apr 17, 2023
adev4a added a commit that referenced this issue Apr 25, 2023
…alues prevents writing to influx (#140)

<!-- Thanks for the contribution, this is awesome. -->

# PR Details
## Description
Data type conflict on message fields with intermittent alphanumeric
values prevents writing to influx
<!--- Describe your changes in detail -->

## Related Issue
#138
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?

<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] Defect fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that cause existing functionality
to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have added any new packages to the sonar-scanner.properties file
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
[CDA Telematics Contributing
Guide](https://github.com/usdot-fhwa-stol/cda-telematics/blob/main/Contributing.md)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
adev4a added a commit that referenced this issue May 2, 2023
<!-- Thanks for the contribution, this is awesome. -->

# PR Details
## Description
There are a few more fields that were stored as string, but the incoming
message is of type float.

<!--- Describe your changes in detail -->

![image](https://user-images.githubusercontent.com/62157949/235765847-eb3fe9f9-1bda-44b7-b632-f5b3012bd9c2.png)

## Related Issue
#138
#145

<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->

## Motivation and Context

<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
NA
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Types of changes

<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->

- [x] Defect fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that cause existing functionality
to change)

## Checklist:

<!--- Go over all the following points, and put an `x` in all the boxes
that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->

- [ ] I have added any new packages to the sonar-scanner.properties file
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the **CONTRIBUTING** document.
[CDA Telematics Contributing
Guide](https://github.com/usdot-fhwa-stol/cda-telematics/blob/main/Contributing.md)
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
@dan-du-car dan-du-car removed the bug Something isn't working label May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anomaly anomaly is an irregularity or disproportion.
Projects
None yet
Development

No branches or pull requests

2 participants