-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
QA checks: implement icon and documentation checks #21845
QA checks: implement icon and documentation checks #21845
Conversation
c2cbf6a
to
08e3def
Compare
Airbyte Code Coverage
|
|
fc66c0b
to
c49df14
Compare
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Q: At what point do you think we need to add tests for these checks? I think if we're relying on some of this to determine cloud availability we should have some level of testing around these tools.
return connector.documentation_file_path.exists() | ||
|
||
def check_documentation_follows_guidelines(connector: Connector) -> bool: | ||
"""Documentation guidelines are defined here https://hackmd.io/Bz75cgATSbm7DjrAqgl4rw""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
neat! I hadn't seen these guidelines.
Are these linked to from any official airbyte site (e.g. docs?) If so, may be worth pointing to the airbyte link rather than hackmd in case it ever changes...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@airbytehq/docs is https://hackmd.io/Bz75cgATSbm7DjrAqgl4rw making its way to our official doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, not yet at least. The hackmd format lets contributors use the markdown format more easily than the Docs site.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant: is there a link to this template? Are these connectors doc guidelines shared in our official doc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We link to it from our Contribution guide: https://docs.airbyte.com/contributing-to-airbyte/updating-documentation#additional-guidelines
Is that what you're looking for?
if not check_documentation_file_exists(connector): | ||
return False | ||
with open(connector.documentation_file_path) as f: | ||
after_changelog = False | ||
for line in f: | ||
if "# changelog" in line.lower(): | ||
after_changelog = True | ||
if after_changelog and connector.version in line: | ||
return True | ||
return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This check is great to have, though having it run as the first part of the /check command feels like it might be a bit of a DX hit. I think in general people tend to work on changes and deal with bumping versions and changelog later on in the process, but from looking at the example runs, this is running as part of the integration-tests step and blocks other SATs from running.
This isn't really a comment on this specific set of changes, but I think it would be nice if we could separate the integration-tests step from these QA checks (and potentially have them run in parallel), so people can still /test and see the SAT results. In my mind integration tests and these QA checks are somewhat separate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pedroslopez I've moved the run-qa-check
command in a different step of the test-command.yml workflow. I had to change the report.sh
script to define the build as failing if test or QA checks are failing. (cc. @bechurch I think this script will help you understand how the build results are persisted to S3).
The changes are in 80fd32d .
I think you're 💯 right. I'll run QA checks in a different step, after SAT, but in the same
👮♂️ . I will, in this PR. |
a606d4d
to
c9c8570
Compare
c9c8570
to
9cc775e
Compare
a71b326
to
a7bc513
Compare
a7bc513
to
3eccb4c
Compare
2cb730a
to
3eccb4c
Compare
from typing import Dict, Optional, Set, Tuple | ||
|
||
import git | ||
import requests | ||
import yaml | ||
|
||
AIRBYTE_REPO = git.Repo(".") | ||
DIFFED_BRANCH = "origin/master" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I declared this as a constant for easier mocking. When running unit tests we want to switch it to the active branch.
@pedroslopez I implemented your suggested changes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What
Closes #21715
Closes #21714
Closes #21712
Implement actual QA checks that will run on
/test
:How
Connector
utility class to gather all the connector metadata we need for these checks (doc path, icon path etc.)Implement :
check_documentation_file_exists
check_changelog_entry_is_updated
check_connector_icon_is_available
check_documentation_follows_guidelines
-> I disabled this check as its too strict and will lead to multiple failures of GA connectors with docs slightly drifting from the expected template.Recommended reading order
airbyte/tools/ci_connector_ops/ci_connector_ops/utils.py
Line 139 in 08e3def
airbyte/tools/ci_connector_ops/ci_connector_ops/qa_checks.py
Line 11 in 08e3def
airbyte/tools/ci_connector_ops/ci_connector_ops/qa_checks.py
Line 24 in 08e3def
airbyte/tools/ci_connector_ops/ci_connector_ops/qa_checks.py
Line 54 in 08e3def
airbyte/tools/ci_connector_ops/ci_connector_ops/qa_checks.py
Line 73 in 08e3def
🚨 User Impact 🚨
The connectors failing at the following checks will get a failed build: