Skip to content

Fix several zero check bugs#3176

Merged
jmthomas merged 4 commits intomainfrom
zero
Apr 7, 2026
Merged

Fix several zero check bugs#3176
jmthomas merged 4 commits intomainfrom
zero

Conversation

@jmthomas
Copy link
Copy Markdown
Member

@jmthomas jmthomas commented Apr 7, 2026

closes #3172

Fixes 3 bugs:

tcpip_server_interface.py: index 0 was being skipped
decom_microservice.p: value of 0 reported as "disabled" in limits_change_callback
form_accessor.py: empty string form values were dropped

@jmthomas jmthomas requested review from EmilyRagan and mcosgriff April 7, 2026 16:30
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.34%. Comparing base (88c0d63) to head (e1bafc1).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3176   +/-   ##
=======================================
  Coverage   78.33%   78.34%           
=======================================
  Files         673      673           
  Lines       55358    55351    -7     
  Branches      728      728           
=======================================
  Hits        43366    43366           
+ Misses      11914    11907    -7     
  Partials       78       78           
Flag Coverage Δ
python 79.59% <ø> (+<0.01%) ⬆️
ruby-api 83.60% <ø> (+0.09%) ⬆️
ruby-backend 81.44% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 7, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@jmthomas jmthomas merged commit ddc90e1 into main Apr 7, 2026
35 of 38 checks passed
@jmthomas jmthomas deleted the zero branch April 7, 2026 19:45
if keyword is not None and value is not None:
add_cmd_parameter(keyword, value, cmd_params)
else:
raise RuntimeError(f"Missing value for last command parameter: {text:s}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will raise an error in the following cases:

  1. keyword is defined, but value is not
  2. keyword is not defined, but value is (practically impossible)
  3. keyword is not defined and neither is value

Is this the correct set of cases to raise the error? I expect case 1 is intended to raise an error, and I think case 2 is practically impossible, but I'm less sure about case 3. I believe case 3 can be satisfied by ending the string with a comma or a command and a space ("TEST TEST with KEY VALUE," or "TEST TEST with KEY VALUE, "). Are these examples in which you would expect the "Missing value for last command parameter" error to be raised?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes because commas are for separating parameters and if they add one and do not complete the next it is a syntax 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.

Zero Values do not display a useful log message

3 participants