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

Add airbyte-ci command: migrate-to-manifest-only #42576

Merged
merged 43 commits into from
Aug 7, 2024

Conversation

ChristoGrab
Copy link
Contributor

@ChristoGrab ChristoGrab commented Jul 26, 2024

What

This PR adds a new airbyte-ci command: migrate-to-manifest-only. This command converts a valid low-code connector to manifest-only. It does not accept any additional arguments.

Resolves #8849

How

The command is broken up into three distinct steps:

  1. First, we validate the following on a given connector:
  • The connector is low-code
  • The connector is not already tagged as manifest-only
  • Only the following files exist in the connector's source folder: manifest.yaml, run.py, __init__.py and source.py
  • The connector is a subclass of YamlDeclarativeSource
  • The connector does not override the streams method (ie, it is not a hybrid low-code/Python connector)

If any of these checks fail, the migration is safely skipped

  1. If the connector is a valid candidate, the second step strips it down to only essential files:
  • Moves manifest.yaml to the root level of the directory
  • Moves any non-inline specs to manifest.yaml
  • Deletes all non-essential files and folders (everything but manifest.yaml, metadata.yaml, icon.svg, and any valid acceptance/integration test files)
  1. The third step updates the remaining files to complete the migration:
  • Points the connector's acceptance test config to the root-level manifest
  • Adds the language:manifest-only tag to the connector's metadata and points to the latest source-declarative-manifest base image
  • Generates an updated README.md file

If a failure occurs during the actual migration, the command will revert any changes to the connector's directory.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

Copy link

vercel bot commented Jul 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 Aug 7, 2024 4:51pm

Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Good start!

@natikgadzhi
Copy link
Contributor

natikgadzhi commented Jul 27, 2024

/format-fix

Format-fix job started... Check job output.

✅ Changes applied successfully. (6d26096)

@ChristoGrab ChristoGrab changed the title [WIP] Manifest-only airbyte-ci command Add airbyte-ci command: migrate-to-manifest-only Jul 31, 2024
Copy link
Contributor

@natikgadzhi natikgadzhi left a comment

Choose a reason for hiding this comment

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

Please update the versions, and merge this, I don't want the code to sit for too long.

Make a follow-up PR (or a commit in this one) that parses the manifest and detects if $parameters are there and stops.

Other than that, we can run the wave.

@natikgadzhi
Copy link
Contributor

@ChristoGrab new problems: source-activecampaign publishing fails in a funny way:

Basically, it says that if it's a pypi connector, it must have python language tag. The answer to this is to remove disable the pypi entry in metadata if it exists when converting.

Long-term, this creates a little problem: there are packages for connectors on pypi that we are going to pull from pypi and start publishing as manifest-only. We should have a way to tell pypi users about it.

@ChristoGrab
Copy link
Contributor Author

@natikgadzhi Hey, just coming back from the long weekend! Heard on the pypi tagging, I'll add logic to disable the tag and get this merged 👍

@natikgadzhi
Copy link
Contributor

natikgadzhi commented Aug 7, 2024

/format-fix

Format-fix job started... Check job output.

❌ Job failed.

@natikgadzhi natikgadzhi enabled auto-merge (squash) August 7, 2024 04:42
@natikgadzhi
Copy link
Contributor

natikgadzhi commented Aug 7, 2024

/format-fix

Format-fix job started... Check job output.

✅ Changes applied successfully. (ccc30a7)

@natikgadzhi
Copy link
Contributor

Using this to migrate source-hibob and source-northpass-lms that got merged yesterday ;)

@natikgadzhi natikgadzhi merged commit 6514412 into master Aug 7, 2024
31 checks passed
@natikgadzhi natikgadzhi deleted the christo/airbyte-ci-strip branch August 7, 2024 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants