Skip to content

Fix python error messages#2633

Merged
jmthomas merged 2 commits intomainfrom
py_cmd_range
Dec 15, 2025
Merged

Fix python error messages#2633
jmthomas merged 2 commits intomainfrom
py_cmd_range

Conversation

@jmthomas
Copy link
Copy Markdown
Member

We updated the Python logging to do full stack traces. This caused the frontend to display this ugly stack trace. We're still logging the full stack error but the frontend should only get the message.

Before:

Screenshot 2025-12-13 at 11 45 04 AM

After:

Screenshot 2025-12-13 at 12 10 04 PM

@jmthomas jmthomas requested a review from mcosgriff December 13, 2025 19:12
@socket-security
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm ace-builds is 95.0% likely obfuscated

Confidence: 0.95

Location: Package overview

From: ?npm/@openc3/[email protected]npm/[email protected]

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm ace-builds is 95.0% likely obfuscated

Confidence: 0.95

Location: Package overview

From: openc3-cosmos-init/plugins/packages/openc3-cosmos-tool-admin/package.jsonnpm/[email protected]

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm registry-auth-token is 94.0% likely obfuscated

Confidence: 0.94

Location: Package overview

From: openc3-cosmos-init/plugins/pnpm-lock.yamlnpm/[email protected]npm/[email protected]

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at [email protected].

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/[email protected]. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.08%. Comparing base (27e1f1a) to head (c0be9f9).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2633   +/-   ##
=======================================
  Coverage   79.08%   79.08%           
=======================================
  Files         661      661           
  Lines       51990    51989    -1     
  Branches      732      732           
=======================================
  Hits        41114    41114           
+ Misses      10796    10795    -1     
  Partials       80       80           
Flag Coverage Δ
python 81.05% <ø> (+<0.01%) ⬆️
ruby-api 84.43% <ø> (ø)
ruby-backend 82.05% <ø> (ø)

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.

@jmthomas jmthomas requested a review from ryanmelt December 13, 2025 19:20
Copy link
Copy Markdown
Contributor

@mcosgriff mcosgriff left a comment

Choose a reason for hiding this comment

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

Would it be beneficial to instead return an object that can be serialized to the front-end, that way the message is what's displayed by default but the user can get the whole stack trace without looking into the log files?

@jmthomas
Copy link
Copy Markdown
Member Author

Perhaps but we have to match the behavior in both the Ruby and the Python. For now let's merge and fix this bug.

@jmthomas jmthomas merged commit b9bd7ce into main Dec 15, 2025
28 of 32 checks passed
@jmthomas jmthomas deleted the py_cmd_range branch December 15, 2025 15:52
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