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

Fix incorrect specification of directory contents in read dir resp [AP-945] #1379

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

woodfell
Copy link
Contributor

@woodfell woodfell commented Nov 20, 2023

Description

@swift-nav/devinfra

MSG_FILEIO_READ_DIR_RESP has a string field which indicates the contents of the directory. In the SBP spec the encoding of the string is set properly (multipart) but the type of the field is incorrectly set to array. This means that the field is not actually treated as a string in the generated bindings but rather as a byte array.

This generally isn’t causing problems because this message is only used by piksi and related tools which are all using older versions of libsbp. They generally haven’t been updated to use the V4 API so this change will not actually cause any problems. But it should be fixed to enable improvements to unit tests

API compatibility

Technically this does introduce an API change, but the message is unused except in legacy contexts so there should be no issue at all

API compatibility plan

If the above is "Yes", please detail the compatibility (or migration) plan:

Should any issues come up they are easy to resolve, simply use the newly generated functions in the V4 API (sbp_msg_fileio_read_dir_resp_contents_*) instead of directly interacting with the byte array

JIRA Reference

https://swift-nav.atlassian.net/browse/AP-945

@woodfell woodfell changed the title Woodfell/fix incorrect string encoding Fix incorrect specification of directory contents in read dir resp [AP-945] Nov 20, 2023
@woodfell woodfell marked this pull request as ready for review November 20, 2023 23:13
@woodfell woodfell changed the base branch from master to woodfell/broken_python_sbp2json November 20, 2023 23:16
Copy link
Contributor

@pcrumley pcrumley left a comment

Choose a reason for hiding this comment

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

we should take this into master then bump the version to
5.1.0 using the relase process

@woodfell woodfell force-pushed the woodfell/broken_python_sbp2json branch from 34d5cc4 to 327e1e0 Compare November 21, 2023 00:45
Base automatically changed from woodfell/broken_python_sbp2json to master November 21, 2023 01:05
@woodfell woodfell force-pushed the woodfell/fix_incorrect_string_encoding branch from 6bd2179 to d6134b3 Compare November 21, 2023 01:06
@woodfell
Copy link
Contributor Author

we should take this into master then bump the version to 5.1.0 using the relase process

I'm about to queue up some improvements to tests which should bump up the code coverage stats and stop the sonar cloud stage from failing on each new PR. After that I'll learn how to do new releases and get everything in

Copy link
Contributor

@RReichert RReichert left a comment

Choose a reason for hiding this comment

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

API change is reasonable and desirable 👍

Copy link

sonarcloud bot commented Nov 21, 2023

[libsbp-c] Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@woodfell woodfell merged commit a39d7b8 into master Nov 21, 2023
36 of 37 checks passed
@woodfell woodfell deleted the woodfell/fix_incorrect_string_encoding branch November 21, 2023 02:48
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

Successfully merging this pull request may close these issues.

4 participants