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

Scylla Calypso #173

Merged
merged 10 commits into from
Aug 11, 2024
Merged

Scylla Calypso #173

merged 10 commits into from
Aug 11, 2024

Conversation

jr1221
Copy link
Contributor

@jr1221 jr1221 commented Aug 1, 2024

Changes

  • Adds an endpoint to send a car configuration. This is a POST request to config/<key>?data=123&data=456. For context, this sends a MQTT message in accordance with the specifications of this PR.
  • Adds new error types and reorganizes some code to get the MQTT publisher into the controller's scope
  • Adds the new protobuf specification for the data sent to Calypso
  • Reorganizes some of the processing code to make it ignore command messages for decoding, and also cleanup up a little issue with batch upload looping

Notes

Do yall have any recommendations on how error codes and whatnot should be handled in the web server side? Should an error message be returned in the body of the response, or should we just have error codes and a log of what happened internal to the server?

Test Cases

  • Working with local Calypso on the bidirectionality branch. Tested by seeing the calypso feedback and via candump ing a virtual can interface

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • [oops] All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No package-lock.json changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • [lol] PR is linked to the ticket (fill in the closes line below)

@jr1221 jr1221 self-assigned this Aug 1, 2024
@jr1221 jr1221 marked this pull request as ready for review August 1, 2024 23:17
scylla-server-rust/src/controllers/mod.rs Outdated Show resolved Hide resolved
info!(
"A cleanup batch uploaded: {:?}",
data_service::add_many(&database, final_msgs).await
);
Copy link
Contributor

Choose a reason for hiding this comment

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

what's this code doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That code batch uploads all remaining batches before exiting, such that scylla will not exit until all batch uploads are complete.

basically I noticed I used a loop and the proper rust syntax is a while and it annoyed me so much I switched it in this PR even though this PR is unrelated. my b.

scylla-server-rust/src/main.rs Outdated Show resolved Hide resolved
if calypso receives a short or emtpy protobuf command_data, it will fill the extra values with the default value specified in the YAML. so we should allow the client to specify blank which could end up meaning a "Reset to Default" button.
@jr1221 jr1221 merged commit f0c12af into feature/scylla-rust-server Aug 11, 2024
4 of 5 checks passed
@jr1221 jr1221 deleted the scylla-car-config branch August 11, 2024 01:13
jr1221 added a commit that referenced this pull request Sep 16, 2024
* basic proof of concept

* misc improvements and cleanup of cursory processing

* implement reids review suggestions

* try and fix clippy

* and again fix clippy

* make data query optional to reset calypso to default

if calypso receives a short or emtpy protobuf command_data, it will fill the extra values with the default value specified in the YAML. so we should allow the client to specify blank which could end up meaning a "Reset to Default" button.

* clippy is trolling me

* fixup error handling for plaintext error message

* implement reid fixes

* remove not prod error
jr1221 added a commit that referenced this pull request Sep 16, 2024
* basic proof of concept

* misc improvements and cleanup of cursory processing

* implement reids review suggestions

* try and fix clippy

* and again fix clippy

* make data query optional to reset calypso to default

if calypso receives a short or emtpy protobuf command_data, it will fill the extra values with the default value specified in the YAML. so we should allow the client to specify blank which could end up meaning a "Reset to Default" button.

* clippy is trolling me

* fixup error handling for plaintext error message

* implement reid fixes

* remove not prod error
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.

2 participants