Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move source-declarative-manifest to a standard source, published in step with python cdk #36501

Merged
merged 27 commits into from
Apr 5, 2024

Conversation

erohmensing
Copy link
Contributor

@erohmensing erohmensing commented Mar 26, 2024

What

Improve the publishing flow

  1. Remove manage.sh
  • out of all of its logic that still existed, all it did was build and push the source-declarative-manifest image.
  • related - remove legacy-publish from the slash commands list - the workflow it would call does not exist anymore (the one which called manage.sh).
  1. Stop spinning up AWS runners for the publish workflow - we previously couldn't move off because some manage.sh stuff would fail.
  2. During the publishing process, just bump the version of source-declarative-manifest via airbyte-ci. The source will be published via the "publish on merge (i.e. publish on push to master)" flow when the version bump is committed. This is because we've moved source-declarative-manifest to be built and published as any other source.

source-declarative-manifest as an airbyte-ci source

  1. Pull the declarative manifest code and its docker image out of the cdk and into the connectors folder
  2. Migrate the image off of the dockerfile and onto our base image (is this necessary? I think it's helpful if we want to stop building connectors separately, but it makes the image bigger)
  3. Migrate it to poetry
  4. Give it a metadata file:
  • Gets a new definition ID
  • Is not in any registry
  • Has a docs file, for changelog entry updating (this helps us keep track of whether we are still updating in step), but this docs page is hidden from the documentation.
  1. Give it a spec - we use the spec operation to check the health of the image. Currently in the platform we hackily bypass spec a bit. It makes sense for this image to have a spec - the spec declares that the user needs to pass an injected manifest via the config.

This source can be built and published via airbyte CI. As of this PR, it will not pass tests in Airbyte CI, because it's not quite the same as an actual source yet. This is okay for now as we will publish it directly (since we are committing the changes instead of merging them via a PR.

Copy link

vercel bot commented Mar 26, 2024

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 Apr 5, 2024 4:38pm

@octavia-squidington-iii octavia-squidington-iii added area/connectors Connector related issues area/documentation Improvements or additions to documentation CDK Connector Development Kit labels Mar 26, 2024
Copy link
Contributor Author

erohmensing commented Mar 26, 2024

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't currently run these anywhere which feels odd (since we don't run the tests). Should we manually do a poetry run pytest unit_tests before we bump the version of declarative manifest?

Copy link
Contributor

Choose a reason for hiding this comment

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

I doubt we'll think about manually running tests before a version bump. We can either

  1. Find a way to run these tests as part of the version bump flow
  2. Add the tests to the CDK tests suite
    Either way, this isn't testing too much complicated logic. It's fine to leave as a follow up item, but let's make sure to create an issue and document the limitation in the readme

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think I'll leave it and document it as part of the "figure out the release strategy" part. Main reasoning:

  • Adding the tests to the test suite (2) is strange, because the source has its own cdk dependency which won't account for the new changes we're making, which makes testing the old code there more confusing.
  • Running them as part of the version flow (1) makes more sense for catching errors, because we can test on the new version published to pypi before releasing the new version of source-declarative manifest. It leaves us in a weird state where if the cdk breaks the source somehow, the cdk version gets released and the source version doesn't. Seems like valuable info, but a good way to get versions out of sync and/or have mysterious missing versions of the source when we revert or patch a CDK version to fix it.

I think what this means is that running the tests (ideally better tests, even CAT tests) on source-declarative manifest could be seen as an integration test for the python CDK. Similar to how we in our PR description for CDK changes have "manually test this change on a CDK source" - we should build a process for doing that automatically for the declarative manifest source.

if: ${{ failure() }}
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
context: "master" # TODO change to ref?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure if this even matters here because I don't think bump_version cares about context - checking into this. Not sure if we want to pass everything in to this like we do most places I think, or remove the unneeded inputs to avoid confusion (e.g. python registry token is irrelevant as we're not pushing to pypi). I'll probably test out which ones are unnecessary and remove them.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be useful to use ref for troubleshooting purposes, but I also think we should just remove the parameter if we're unsure it'll be safe / respected

@@ -0,0 +1,27 @@
data:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Metadata in here could be sanity checked. it probably doesn't matter (release stage, ab_internal stuff for example). I generated a new definitionId.

@erohmensing erohmensing marked this pull request as ready for review April 4, 2024 15:21
@erohmensing erohmensing requested a review from a team as a code owner April 4, 2024 15:21
@erohmensing erohmensing requested a review from girarda April 4, 2024 15:21
Copy link
Contributor

@girarda girarda left a comment

Choose a reason for hiding this comment

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

looks great! just a few requests for additional docs + some of the unit tests are failing. We should figure out why and fix them

enabled: false
releaseDate: 2023-03-01
releaseStage: alpha
supportLevel: community
Copy link
Contributor

Choose a reason for hiding this comment

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

not a real problem, but this feels weird. The connector is definitely not maintained by the community

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think that's an issue with the "supportLevel"'s meaning in any case - "we support it" does not mean it's certified by our own internal standards. I agree it doesn't matter at the moment since we don't actually show this source in the docs/UI, but we should probably revisit this.

if: ${{ failure() }}
uses: slackapi/slack-github-action@v1.23.0
continue-on-error: true
context: "master" # TODO change to ref?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it might be useful to use ref for troubleshooting purposes, but I also think we should just remove the parameter if we're unsure it'll be safe / respected

docs/integrations/sources/low-code.md Show resolved Hide resolved
@aaronsteers
Copy link
Collaborator

aaronsteers commented Apr 4, 2024

@erohmensing - I'd be excited to use this with PyAirbyte. Re:

Can we add pypi: true in metadata.yml to enable PyPi publishing?

@erohmensing
Copy link
Contributor Author

@aaronsteers I did a pre-release publish and the publish itself seemed to work ok. Don't recommend testing out on that one because it has a pre-poetry CDK version so it might be a bit different, but we can see what happens. Mainly wanted to check that trying to publish it to pypi wouldn't make the whole publish flow start failing.

@aaronsteers
Copy link
Collaborator

aaronsteers commented Apr 5, 2024

Thanks, @erohmensing! I will wait for this to merge/release before testing, but I'm excited to give it a spin and see if we can leverage it for airbytehq/PyAirbyte#107 in the long run.

cc @bindipankhudi , @natikgadzhi

@erohmensing
Copy link
Contributor Author

/approve-and-merge reason=source-declarative manifest is not expected to pass CATs at the moment. All other CI passing

@octavia-approvington
Copy link
Contributor

Our work here is done
done

@octavia-approvington octavia-approvington merged commit 51d1353 into master Apr 5, 2024
28 of 30 checks passed
@octavia-approvington octavia-approvington deleted the ella/manage-sh branch April 5, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues area/documentation Improvements or additions to documentation CDK Connector Development Kit connectors/source/declarative-manifest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants