Skip to content

chore(source-hubspot): Upgrade SDM base image to pre-release CDK with heartbeat diagnostics and deadlock fix#75589

Closed
devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/1774874174-hubspot-cdk-heartbeat-test
Closed

chore(source-hubspot): Upgrade SDM base image to pre-release CDK with heartbeat diagnostics and deadlock fix#75589
devin-ai-integration[bot] wants to merge 4 commits into
masterfrom
devin/1774874174-hubspot-cdk-heartbeat-test

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot commented Mar 30, 2026

Caution

Testing only — do not merge to master. This PR pins source-hubspot to a pre-release SDM image for diagnostic testing and deadlock fix validation.

What

Updates the source-hubspot connector's base SDM image to a pre-release version of source-declarative-manifest built from airbytehq/airbyte-python-cdk#953. That CDK PR adds:

  1. Stderr heartbeat diagnostics — a lightweight background thread emits periodic status to stderr every 30s to help diagnose sync stalls and deadlocks in the concurrent source worker pool.
  2. Deadlock fix — prevents the main thread (sole queue consumer) from blocking on queue.put() when the shared queue is full, which was confirmed as the root cause of sync stalls (job 77457394).

Heartbeat output (normal):

STDOUT_HEARTBEAT: t=30s msgs=1042 bytes=5242880 print_blocked=NO queue_size=42 queue_full=False
STDOUT_HEARTBEAT: t=60s msgs=1042 bytes=5242880 print_blocked=YES blocked_since=28s queue_size=10000 queue_full=True

Heartbeat output (stall detected — after 90s of frozen message count):

STDOUT_HEARTBEAT: t=120s msgs=1042 bytes=5242880 print_blocked=NO queue_size=0 queue_full=False
=== THREAD DUMP (stall detected) ===

Thread workerpool_0 (140234567890):
  File ".../http_client.py", line 328, in _send
    response = self._session.send(request, **request_kwargs)
...
=== END THREAD DUMP ===

The queue stats instantly reveal the deadlock type:

  • queue_size=0 + msgs frozen → workers stuck on HTTP/IO
  • queue_size=10000 + print_blocked=YES → classic pipe deadlock (stdout backpressure)
  • queue_size=10000 + print_blocked=NO → main thread not consuming (the deadlock this CDK version fixes)

How

Single-line change in metadata.yaml: the connectorBuildOptions.baseImage is updated from the stable 7.14.0 SDM tag to the pre-release 7.13.0.post14.dev23855054325 tag (with its corresponding sha256 digest). No other files are modified.

Updates since last revision

Updated the SDM base image from 7.13.0.post13.dev23806774478 to 7.13.0.post14.dev23855054325. The new CDK pre-release adds:

  1. Deadlock fix in ConcurrentMessageRepository — the main thread (sole queue consumer) now uses non-blocking put(block=False) when emitting messages to the shared queue. If the queue is full, messages are buffered in a deque and drained via consume_queue(). Worker threads are unchanged (blocking put() for backpressure). This prevents the confirmed deadlock where three code paths in _handle_item caused the main thread to block on its own queue:
    • PartitionCompleteSentinel_on_stream_is_doneensure_at_least_one_state_emittedqueue.put(state)
    • PartitionGenerationCompletedSentinel_on_stream_is_done → same path
    • Partitionon_partitionemit_message(slice_log)queue.put(log)

Previous revisions added queue stats, automatic thread dumps, and heartbeat diagnostics (see CDK PR for full history).

Review guide

  1. airbyte-integrations/connectors/source-hubspot/metadata.yaml — only the baseImage line changed.
    • Verify the image tag (7.13.0.post14.dev23855054325) and digest (sha256:c5a8b477...) look correct.
    • Confirm no accidental changes to dockerImageTag, registry overrides, or other fields.
    • Note: this is a version downgrade from stable 7.14.0 to a 7.13.0-based pre-release — intentional for testing.

User Impact

  • No user impact — this is a testing-only PR that should not be released.
  • When deployed to a test environment (sandbox workspace), the Hubspot connector will:
    • Emit STDOUT_HEARTBEAT lines to stderr every 30s with queue stats
    • Dump thread stacks if a stall is detected (90s of no progress)
    • Not deadlock on the queue.put() path that caused sync stalls in job 77457394

Can this PR be safely reverted and rolled back?

  • YES 💚

Link to Devin session: https://app.devin.ai/sessions/ad184113df474f0ba37ede09cdac7eaf


Open with Devin

…heartbeat diagnostics

Co-Authored-By: gl_anatolii.yatsuk <gl_anatolii.yatsuk@airbyte.io>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown
Contributor

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

💡 Show Tips and Tricks

PR Slash Commands

Airbyte Maintainers (that's you!) can execute the following slash commands on your PR:

  • 🛠️ Quick Fixes
    • /format-fix - Fixes most formatting issues.
    • /bump-version - Bumps connector versions, scraping changelog description from the PR title.
  • ❇️ AI Testing and Review (internal link: AI-SDLC Docs):
    • /ai-prove-fix - Runs prerelease readiness checks, including testing against customer connections.
    • /ai-canary-prerelease - Rolls out prerelease to 5-10 connections for canary testing.
    • /ai-review - AI-powered PR review for connector safety and quality gates.
  • 🚀 Connector Releases:
    • /publish-connectors-prerelease - Publishes pre-release connector builds (tagged as {version}-preview.{git-sha}) for all modified connectors in the PR.
    • /bump-progressive-rollout-version - Bumps connector version with an RC suffix (2.16.10-rc.1) for progressive rollouts (enableProgressiveRollout: true).
      • Example: /bump-progressive-rollout-version changelog="Add new feature for progressive rollout"
  • ☕️ JVM connectors:
    • /update-connector-cdk-version connector=<CONNECTOR_NAME> - Updates the specified connector to the latest CDK version.
      Example: /update-connector-cdk-version connector=destination-bigquery
  • 🐍 Python connectors:
    • /poe connector source-example lock - Run the Poe lock task on the source-example connector, committing the results back to the branch.
    • /poe source example lock - Alias for /poe connector source-example lock.
    • /poe source example use-cdk-branch my/branch - Pin the source-example CDK reference to the branch name specified.
    • /poe source example use-cdk-latest - Update the source-example CDK dependency to the latest available version.
  • ⚙️ Admin commands:
    • /force-merge reason="<REASON>" - Force merges the PR using admin privileges, bypassing CI checks. Requires a reason.
      Example: /force-merge reason="CI is flaky, tests pass locally"
📚 Show Repo Guidance

Helpful Resources

📝 Edit this welcome message.

@tolik0
Copy link
Copy Markdown
Contributor

Anatolii Yatsuk (tolik0) commented Mar 30, 2026

/publish-connectors-prerelease

Pre-release Connector Publish Started

Publishing pre-release build for connector source-hubspot.
PR: #75589

Pre-release versions will be tagged as {version}-preview.dbe9f5c
and are available for version pinning via the scoped_configuration API.

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-hubspot:6.3.3-preview.dbe9f5c

Docker Hub: https://hub.docker.com/layers/airbyte/source-hubspot/6.3.3-preview.dbe9f5c

Registry JSON:

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 30, 2026

source-hubspot Connector Test Results

183 tests   170 ✅  17m 50s ⏱️
  2 suites   11 💤
  2 files      2 ❌

For more details on these failures, see this check.

Results for commit 7c67401.

♻️ This comment has been updated with latest results.

@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

Pinning pre-release source-hubspot:6.3.3-preview.dbe9f5c in the @devin-ai-sandbox workspace for testing the heartbeat diagnostics from CDK PR #953.


Devin session

…K with thread dumps and queue stats

Co-Authored-By: gl_anatolii.yatsuk <gl_anatolii.yatsuk@airbyte.io>
Co-Authored-By: gl_anatolii.yatsuk <gl_anatolii.yatsuk@airbyte.io>
@tolik0
Copy link
Copy Markdown
Contributor

Anatolii Yatsuk (tolik0) commented Mar 31, 2026

/publish-connectors-prerelease

Pre-release Connector Publish Started

Publishing pre-release build for connector source-hubspot.
PR: #75589

Pre-release versions will be tagged as {version}-preview.f093cb0
and are available for version pinning via the scoped_configuration API.

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-hubspot:6.3.5-preview.f093cb0

Docker Hub: https://hub.docker.com/layers/airbyte/source-hubspot/6.3.5-preview.f093cb0

Registry JSON:

Copy link
Copy Markdown
Contributor Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

- api.hubapi.com
connectorBuildOptions:
baseImage: docker.io/airbyte/source-declarative-manifest:7.14.0@sha256:5b95dd9e71defeece4a1efb27688b15e482f18c82c745498611846466b72403e
baseImage: docker.io/airbyte/source-declarative-manifest:7.13.0.post13.dev23806774478@sha256:3454e270979f4e239c538cc9200cc872d54815f60752d997d419ed51434ff7bf
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🔴 GA connector base image downgraded from stable release to pre-release dev build

The base image is changed from a stable release (source-declarative-manifest:7.14.0) to a pre-release development build (source-declarative-manifest:7.13.0.post13.dev23806774478). This is both a version downgrade (7.14.0 → 7.13.0-based) and a switch to an unstable .dev build for a connector marked as releaseStage: generally_available (airbyte-integrations/connectors/source-hubspot/metadata.yaml:43). If merged, this GA connector — used by production users — would be built on an unreleased, potentially unstable base image. Development builds may contain incomplete features, known bugs, or experimental changes not intended for production use.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Updates to source-declarative-manifest:7.13.0.post14.dev23855054325 which
includes the deadlock prevention fix in ConcurrentMessageRepository.
This version prevents the main thread from blocking on queue.put() when
the queue is full, which was confirmed as the root cause of sync stalls
in job 77457394.

Co-Authored-By: gl_anatolii.yatsuk <gl_anatolii.yatsuk@airbyte.io>
@devin-ai-integration devin-ai-integration Bot changed the title chore(source-hubspot): Upgrade SDM base image to pre-release CDK with heartbeat diagnostics chore(source-hubspot): Upgrade SDM base image to pre-release CDK with heartbeat diagnostics and deadlock fix Apr 1, 2026
@tolik0
Copy link
Copy Markdown
Contributor

Anatolii Yatsuk (tolik0) commented Apr 1, 2026

/publish-connectors-prerelease

Pre-release Connector Publish Started

Publishing pre-release build for connector source-hubspot.
PR: #75589

Pre-release versions will be tagged as {version}-preview.7c67401
and are available for version pinning via the scoped_configuration API.

View workflow run
Pre-release Publish: SUCCESS

Docker image (pre-release):
airbyte/source-hubspot:6.3.5-preview.7c67401

Docker Hub: https://hub.docker.com/layers/airbyte/source-hubspot/6.3.5-preview.7c67401

Registry JSON:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants