Skip to content

Fixing issue where incorrect workspace was being set as None#71

Merged
dacoburn merged 1 commit intomainfrom
doug/fix-no-workspace
Feb 27, 2026
Merged

Fixing issue where incorrect workspace was being set as None#71
dacoburn merged 1 commit intomainfrom
doug/fix-no-workspace

Conversation

@dacoburn
Copy link
Contributor

Description

When the workspace parameter in FullScanParams was None, it was being sent to the Socket API as part of the request URL parameters, causing namespace resolution to fail during full scans and breaking package identification.

Root Cause

The workspace field in FullScanParams is optional and defaults to None. When creating a full scan request, the params were converted to a dictionary and URL-encoded without filtering out None values. This resulted in workspace=None being sent in the query string, which the API interpreted as a literal string "None" rather than the absence of a workspace, breaking namespace construction for packages (e.g., treating "@org/package" as "None/@org/package").

Fix

Added validation logic in the create() method (lines 812-814 in fullscans/init.py) to detect when workspace is None and remove it from the params dictionary before URL encoding. This follows the same pattern already implemented for the pull_request parameter, ensuring only valid workspace values are included in API requests.

Public Changelog

  • Fix for None being included as the Workspace name incorrectly for Full Scans

@dacoburn dacoburn added the product changelog Any public-facing change in the product's features label Feb 27, 2026
@dacoburn dacoburn requested a review from a team as a code owner February 27, 2026 17:53
@dc-larsen dc-larsen self-requested a review February 27, 2026 17:54
@github-actions
Copy link

🚀 Preview package published!

Install with:

pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==3.0.32.dev1

@obarrera obarrera self-requested a review February 27, 2026 17:54
Copy link
Contributor

@dc-larsen dc-larsen left a comment

Choose a reason for hiding this comment

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

LGTM

@dacoburn dacoburn merged commit ed38c65 into main Feb 27, 2026
6 checks passed
@dacoburn dacoburn deleted the doug/fix-no-workspace branch February 27, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product changelog Any public-facing change in the product's features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants