airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
16.18k stars 4.14k forks source link

Connector development on Windows #13674

Closed LarsHanegraaf closed 2 months ago

LarsHanegraaf commented 2 years ago

Update the documentation to make development of connectors on Windows easier

Hi team,

First of all, credits to where the Airbyte product is so far! 🎉

This week I went through the process of creating an Airbyte Source connector on a Windows PC (It's what our company works with 😉). I would like to report the things I have found and how the process could be improved for other people who go through a similar workflow. I'm willing to submit PRs for the documentation and Airbyte itself, but as it is the first time I contribute to an open-source project, I need some guidance on whether it will be helpful for Airbyte or not. Thanks!

Things I've found:

1. Documentation about developing a Python Source is complete, but scattered

The documentation to develop a Python Source is complete, but as there are multiple pages with different approaches, it can be confusing for a newcomer (at least within my team). I know that the process around building a connector is evolving, but I think more consistency would help to improve the Developer Experience.

Examples that could use more consistency:

2. Code generation scripts are tailored towards Unix

All scripts for generating Python boilerplate code are heavily geared towards Unix. I can reverse engineer the proposed working of a Bash script myself, so I can run it in Powershell or CMD, but maybe the process could be changed so it works for all platforms (or add steps to the documentation, I'm not sure what has priority in your opnion)

The steps I have taken to make it work:

  1. Have Python 3.9 (important, but not documented in the README of the CDK), and Node installed.
  2. Clone the Airbyte repo
  3. Go to the generator folder.
  4. Run npm install and npm run generate (Docker will also be possible, using the command in generate.sh, but this one is easier for me)
  5. Follow the instructions of the generator
  6. Go to the folder that is generated for you
  7. In that folder run python -m venv .venv
  8. When you're on Powershell, run .venv/Scripts/activate to activate the virtual environment.
  9. Install dependencies using python -m pip install -r requirements.txt
  10. Install the source-acceptance-test plugin by navigating to this folder with the virtual environment still activated and run python setup.py install
  11. Navigate back to the connector folder
  12. Run pip install '.[tests]'

3. Bugs in source-acceptance-test Pytest plugin when running on Windows

When you want to run the source acceptance tests on Windows, I was only able to get it working within the virtual environment (not in Docker, but unsure why).

In order to make the tests work in the virtual environment, I had to change to following things:

It has become a bit longer than expected 😛 . So if I need to split it into multiple issues, just let me know!

Thanks!

djongeb commented 2 years ago

@LarsHanegraaf Thanks for this little writeup. I've been struggling to find information on how to develop your own connector whilst using windows. This has been very helpful and I would agree with you, that there could be more information on how to use windows! :D

marcosmarxm commented 2 years ago

@Amruta-Ranade + @arimbr maybe something we can bring to content team to work on?

marcosmarxm commented 2 years ago

@LarsHanegraaf thanks for the suggestion probably this will help a large number of users of Airbyte.

francesco-av commented 1 year ago

@LarsHanegraaf Thanks for this little writeup. I've been struggling to find information on how to develop your own connector whilst using windows. This has been very helpful and I would agree with you, that there could be more information on how to use windows! :D

@djongeb I was wondering if you ever found clearer documentation / guides for Windows? I am struggling to execute several of the Linux commands and had to add the source manually for example.

natikgadzhi commented 8 months ago

@LarsHanegraaf belated thank you for the writeup, it's excellent. I agree the docs are very scattered — working on them more now.

I'll keep the issue open to track any Windows-related questions. Windows workflow is not necessarily a priority right away.

If anyone recently made basic workflows work on Windows, and you had to tweak any tests to do that (they changed since 2022 very significantly) — contributions are very welcome.

octavia-squidington-iii commented 2 months ago

At Airbyte, we seek to be clear about the project priorities and roadmap. This issue has not had any activity for 180 days, suggesting that it's not as critical as others. It's possible it has already been fixed. It is being marked as stale and will be closed in 20 days if there is no activity. To keep it open, please comment to let us know why it is important to you and if it is still reproducible on recent versions of Airbyte.

octavia-squidington-iii commented 2 months ago

This issue was closed because it has been inactive for 20 days since being marked as stale.