Skip to content

Conversation

@aaronsteers
Copy link
Contributor

@aaronsteers aaronsteers commented Aug 29, 2025

chore: exclude auto-generated OpenAPI file and GitHub workflows from YAML formatting

Summary

This PR configures Prettier to exclude auto-generated files from YAML formatting to prevent unnecessary formatting changes in future PRs. Specifically excludes:

  • airbyte_cdk/manifest_server/openapi.yaml (auto-generated OpenAPI spec file)
  • All YAML files in .github/ directory (workflow configurations)

The exclusions were tested and confirmed working - Prettier now reports "All matched files use Prettier code style!" indicating the excluded files are properly ignored.

Review & Testing Checklist for Human

  • Verify exclusion patterns work correctly: Run npx prettier --write "**/*.{yaml,yml}" --check to confirm excluded files are not processed
  • Test auto-generated file protection: Verify that airbyte_cdk/manifest_server/openapi.yaml remains unchanged when running formatters
  • Confirm legitimate formatting still works: Test that non-excluded YAML files can still be formatted properly by Prettier

Notes

  • The build/assemble poe tasks failed due to Dagger environment connectivity issues, so the complete end-to-end workflow testing was incomplete
  • The poetry run poe format-check command still reported formatting issues, suggesting there may be other formatting tools involved beyond Prettier
  • Requested by @aaronsteers in Devin session: https://app.devin.ai/sessions/a0d8c0f93bcd486699c37c6c651c13af

Summary by CodeRabbit

  • Chores
    • Expanded formatting ignore rules to cover auto-generated API specification outputs.
    • Added patterns to ignore GitHub workflow files in formatting checks.
    • Changes are additive and do not modify existing behavior or content.
    • No impact on application features or user experience.

…YAML formatting

Co-Authored-By: AJ Steers <aj@airbyte.io>
Copilot AI review requested due to automatic review settings August 29, 2025 18:46
@devin-ai-integration
Copy link
Contributor

Original prompt from AJ Steers
Received message in Slack channel #ask-devin-ai:

@Devin - Create a clean PR with formatting fixes only on the CDK repo. After that, you'll notice that an auto-generated OpenAPI yaml file is modified in the process. Set that file to be ignored by the autoformatter. Also set all yaml files in .github/ to be ignored by the yaml formatter. Retest the auto-formatter afterwards to confirm. This will be a one-time auto-format of all content, plus improvements to make sure the wrong types of auto-format suggestions do not creep in, and do not unnecessary block or slow PRs.

@devin-ai-integration
Copy link
Contributor

devin-ai-integration bot commented Aug 29, 2025

🤖 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 github-actions bot added the chore label Aug 29, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR configures Prettier to exclude auto-generated OpenAPI specifications and GitHub workflow files from YAML formatting to prevent unnecessary formatting changes in future PRs.

  • Adds exclusion patterns to .prettierignore for auto-generated OpenAPI spec file
  • Excludes all YAML files in the .github/ directory from formatting
  • Maintains formatting capabilities for legitimate YAML files while protecting auto-generated content

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@github-actions
Copy link

👋 Greetings, Airbyte Team Member!

Here are some helpful tips and reminders for your convenience.

Testing This CDK Version

You can test this version of the CDK using the following:

# Run the CLI from this branch:
uvx 'git+https://github.com/airbytehq/airbyte-python-cdk.git@devin/1756487044-formatting-fixes-and-exclusions#egg=airbyte-python-cdk[dev]' --help

# Update a connector to use the CDK from this branch ref:
cd airbyte-integrations/connectors/source-example
poe use-cdk-branch devin/1756487044-formatting-fixes-and-exclusions

Helpful Resources

PR Slash Commands

Airbyte Maintainers can execute the following slash commands on your PR:

  • /autofix - Fixes most formatting and linting issues
  • /poetry-lock - Updates poetry.lock file
  • /test - Runs connector tests with the updated CDK
  • /poe build - Regenerate git-committed build artifacts, such as the pydantic models which are generated from the manifest JSON schema in YAML.
  • /poe <command> - Runs any poe command in the CDK environment

📝 Edit this welcome message.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 29, 2025

📝 Walkthrough

Walkthrough

Adds new ignore patterns to .prettierignore: one for an auto-generated OpenAPI file and another for GitHub workflow YAML files. All changes are additive.

Changes

Cohort / File(s) Summary of Changes
Prettier ignore updates
./.prettierignore
Added “Ignore auto-generated files” section for airbyte_cdk/manifest_server/openapi.yaml and “Ignore GitHub workflow files” section for .github/**/*.yml, .github/**/*.yaml.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

chore

Suggested reviewers

  • aldogonzalez8
✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch devin/1756487044-formatting-fixes-and-exclusions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.prettierignore (3)

5-6: LGTM on excluding the generated OpenAPI spec.

This is a sensible guardrail to prevent churn from formatters. As a follow-up, would you like to also mark this file as generated for GitHub’s UI with a .gitattributes entry (e.g., “airbyte_cdk/manifest_server/openapi.yaml linguist-generated”) so diffs are collapsed by default, and/or add a generator header comment in the file itself to signal “do not edit”? wdyt?


8-10: Scope GitHub YAML ignore to workflows only?

Ignoring all YAML in .github may also skip formatting for issue templates, dependabot, release-please, etc. Would narrowing to workflows help (and reduce surprises), e.g. below? wdyt?

-.github/**/*.yml
-.github/**/*.yaml
+.github/workflows/**/*.yml
+.github/workflows/**/*.yaml

5-10: Minor: prefer separate commands for write vs. check.

To avoid accidental writes during CI checks and for clarity, would you split the suggested command into two invocations (one for write locally, one for check in CI)? For example:

  • Local fix: npx prettier --write "**/*.{yaml,yml}"
  • CI gate: npx prettier --check "**/*.{yaml,yml}"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9ef1a3d and bab9cb7.

📒 Files selected for processing (1)
  • .prettierignore (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-11-15T00:59:08.154Z
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/cli/source_declarative_manifest/spec.json:9-15
Timestamp: 2024-11-15T00:59:08.154Z
Learning: When code in `airbyte_cdk/cli/source_declarative_manifest/` is being imported from another repository, avoid suggesting modifications to it during the import process.

Applied to files:

  • .prettierignore
📚 Learning: 2024-12-11T16:34:46.319Z
Learnt from: pnilan
PR: airbytehq/airbyte-python-cdk#0
File: :0-0
Timestamp: 2024-12-11T16:34:46.319Z
Learning: In the airbytehq/airbyte-python-cdk repository, the `declarative_component_schema.py` file is auto-generated from `declarative_component_schema.yaml` and should be ignored in the recommended reviewing order.

Applied to files:

  • .prettierignore
📚 Learning: 2024-12-11T16:34:46.319Z
Learnt from: pnilan
PR: airbytehq/airbyte-python-cdk#0
File: :0-0
Timestamp: 2024-12-11T16:34:46.319Z
Learning: In the airbytehq/airbyte-python-cdk repository, ignore all `__init__.py` files when providing a recommended reviewing order.

Applied to files:

  • .prettierignore
📚 Learning: 2024-11-15T01:04:21.272Z
Learnt from: aaronsteers
PR: airbytehq/airbyte-python-cdk#58
File: airbyte_cdk/cli/source_declarative_manifest/_run.py:62-65
Timestamp: 2024-11-15T01:04:21.272Z
Learning: The files in `airbyte_cdk/cli/source_declarative_manifest/`, including `_run.py`, are imported from another repository, and changes to these files should be minimized or avoided when possible to maintain consistency.

Applied to files:

  • .prettierignore
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: SDM Docker Image Build
  • GitHub Check: Manifest Server Docker Image Build
  • GitHub Check: Pytest (Fast)
  • GitHub Check: Analyze (python)
🔇 Additional comments (1)
.prettierignore (1)

5-10: Verify if other YAML format/check tools exist before updating ignore patterns

I didn’t find pre-commit, yamllint, or actionlint configs in the repo—Prettier appears to be the only YAML formatter here. Could you confirm whether any CI or local YAML linters/formatters need these ignore patterns mirrored, or should we just expand .prettierignore to cover all YAML files? wdyt?

@github-actions
Copy link

PyTest Results (Fast)

3 764 tests  ±0   3 752 ✅ ±0   6m 30s ⏱️ -13s
    1 suites ±0      12 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit bab9cb7. ± Comparison against base commit 9ef1a3d.

@aaronsteers aaronsteers merged commit 691b59a into main Sep 17, 2025
23 checks passed
@aaronsteers aaronsteers deleted the devin/1756487044-formatting-fixes-and-exclusions branch September 17, 2025 07:21
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.

2 participants