Skip to content

✨ Source Intercom: adding a mock server test#54715

Merged
Maxime Carbonneau-Leclerc (maxi297) merged 9 commits into
masterfrom
maxi297/mock-server-test-for-source-intercom
Mar 10, 2025
Merged

✨ Source Intercom: adding a mock server test#54715
Maxime Carbonneau-Leclerc (maxi297) merged 9 commits into
masterfrom
maxi297/mock-server-test-for-source-intercom

Conversation

@maxi297
Copy link
Copy Markdown
Contributor

What

As part of a PoC to increase test coverage and debug locally: airbytehq/airbyte-python-cdk#371

How

Update CDK version and add custom component path to sys.path

User Impact

None, we just want to have more tests in the future

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
airbyte-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2025 10:18pm

[tool.poetry.dependencies]
python = "^3.10,<3.13"
airbyte-cdk = "6.28.0"
airbyte-cdk = {path = "../../../../../airbyte-python-cdk/", develop = true}
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.

To be updated once the CDK version is released

- cdk:low-code
- language:manifest-only
connectorTestSuitesOptions:
- suite: unitTests
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.

Interesting... unit tests were not executed for this connector

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maxime Carbonneau-Leclerc (@maxi297) - Is this still an issue or did you find a solution?

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.

I mean, adding this line allows for the tests to run so we're good. I was just concerned that we weren't running unit tests for source-intercom

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Got it. Thanks for clarifying. This issue has gotten me before as well - specifically the omitted declaration.

cd airbyte-ci/connectors/pipelines/
poetry install
poetry shell
poetry env activate
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.

It seems like this command is not available in poetry 2.X but I haven't test if the alternative mentioned here actually works

Copy link
Copy Markdown
Member

@aaronsteers Aaron ("AJ") Steers (aaronsteers) left a comment

Choose a reason for hiding this comment

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

This looks good to me! Nice work unblocked the weird failure scenarios!

Long-run, I would like to have a test or tests extra so declaring the dependency on something like airbyte-cdk[tests] would also include the transitive dependencies expected for tests. But your solution here is a good one and there's no reason I can see not to merge these improvements.

Also, for future cases, we can lean into the unit_tests/pyproject.toml file declaring extra dependencies needed for tests. It's weird for it to need to declare things that are already in the CDK, but there could be other cases where it wants another library - like a mock data generator or a caching tool or S3/minio library - and those are fine to include as dependent libraries in the connnector's-own unit_tests/pyproject.toml.

Those are just thoughts for the future - I think this PR is 💎 and makes things better so let's 🚢 it when ready. 👍

@maxi297 Maxime Carbonneau-Leclerc (maxi297) deleted the maxi297/mock-server-test-for-source-intercom branch March 10, 2025 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants