Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies = [
"google-api-python-client==2.192.0",
"google-auth==1.35.0",
"granian>=2.7.2",
"hubspot-api-client>=6.1.0,<7",
"hubspot-api-client>=12,<13",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The update to hubspot-api-python v12 may introduce breaking changes. The class BatchInputSimplePublicObjectInput might have been renamed or removed, which is not reflected in the code.
Severity: HIGH

Suggested Fix

Before merging, verify the correct class name for BatchInputSimplePublicObjectInput in hubspot-api-python v12. Update the import and usage in hubspot_xpro/tasks.py to the new class name if it has changed. The code change should accompany the dependency version bump.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: pyproject.toml#L38

Potential issue: The `hubspot-api-python` library is being upgraded from v6 to v12, a
major version jump known to include breaking changes. Specifically, classes like
`BatchInputSimplePublicObjectInputForCreate` were renamed. While it's not confirmed if
the `BatchInputSimplePublicObjectInput` class used in `hubspot_xpro/tasks.py` was also
renamed or removed, this is a high-risk change. If the class no longer exists as
imported, it will cause an `ImportError` on application startup or an `AttributeError`
at runtime when batch operations are executed. The existing tests mock the HubSpot API
and would not detect this issue.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The hubspot-api-client update to v12 creates a dependency conflict with mitol-django-hubspot-api and the uv.lock file is not updated, which will cause the deployment to fail.
Severity: CRITICAL

Suggested Fix

The mitol-django-hubspot-api dependency must be updated to a version that supports hubspot-api-client v12. After updating the conflicting dependency, regenerate the uv.lock file by running the appropriate uv lock command to reflect the new version constraints.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: pyproject.toml#L38

Potential issue: The `pyproject.toml` file updates the version constraint for
`hubspot-api-client` to `>=12,<13`. However, the `uv.lock` file has not been regenerated
and still specifies an older version. The CI/CD pipeline uses `uv sync --locked`, which
enforces the versions in the lock file. Furthermore, another dependency,
`mitol-django-hubspot-api`, requires `hubspot-api-client>=6.1.0,<7`. This creates an
unresolvable dependency conflict between the new requirement and the existing
dependency. As a result, the deployment pipeline will fail when it attempts to resolve
these conflicting constraints.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The upgrade to hubspot-api-client v12 will cause runtime errors because the code directly imports BatchInputSimplePublicObjectInput, which has been renamed in the new version.
Severity: CRITICAL

Suggested Fix

Replace the import and usage of the old class name BatchInputSimplePublicObjectInput with the new name from v12, BatchInputSimplePublicObjectBatchInputForCreate. Additionally, verify that the mitol-django-hubspot-api wrapper is compatible with hubspot-api-client v12 and upgrade it if an update is available to prevent other potential incompatibilities.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: pyproject.toml#L38

Potential issue: The upgrade of the `hubspot-api-client` library from version 6 to 12
introduces a breaking change. The codebase directly imports
`BatchInputSimplePublicObjectInput` from `hubspot.crm.objects`, which was renamed to
`BatchInputSimplePublicObjectBatchInputForCreate` in v12. This will cause an
`ImportError` or `AttributeError` at runtime when critical batch synchronization
functions like `batch_create_hubspot_objects_chunked()` and
`batch_update_hubspot_objects_chunked()` are executed, leading to a failure in HubSpot
data syncing.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The PublicAssociation object is created with simple string IDs for _from and to, but the v12 HubSpot API expects nested objects with an id key.
Severity: CRITICAL

Suggested Fix

Update the instantiation of PublicAssociation objects to match the v12 API's expected structure. Instead of passing string IDs directly to _from and to, wrap them in the appropriate nested object structure as required by the new version of the hubspot-api-client library, likely involving a class like PublicObject.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: pyproject.toml#L38

Potential issue: The upgrade to `hubspot-api-client` v12, specified in `pyproject.toml`,
introduces a breaking change to the associations API. The
`batch_upsert_associations_chunked` function in `hubspot_xpro/tasks.py` instantiates
`PublicAssociation` objects by passing simple string IDs to the `_from` and `to`
parameters. The v12 API, however, expects these to be nested objects with an `id`
property (e.g., `{"from": {"id": "..."}}`). This structural mismatch will cause the
association creation calls to fail at runtime, likely raising an `AttributeError` or
`TypeError` and preventing associations from being created.

"ipython>=9.0.0,<10",
"mitol-django-authentication==2025.3.17",
"mitol-django-common==2025.12.23.2",
Expand Down
Loading