-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
connectors-qa: introduce run_on_released_connectors flag #36818
connectors-qa: introduce run_on_released_connectors flag #36818
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @alafanechere and the rest of your teammates on |
1eb23c5
to
8deb9a3
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.
LGTM with a question on OSS vs Cloud registry as release guard.
@@ -555,6 +556,20 @@ def normalization_tag(self) -> Optional[str]: | |||
def is_using_poetry(self) -> bool: | |||
return Path(self.code_directory / "pyproject.toml").exists() | |||
|
|||
@property | |||
def is_released(self) -> bool: |
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: can you add a comment line here? Pretty obvious, sure, but why use OSS catalog for example?
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.
Should we for example insist on running https checks when we're pushing a connector from being available on OSS only to being available in cloud? Should those be two separate release levels?
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.
but why use OSS catalog for example?
The cloud registry is a subset of the oss registry. Some connector are not on cloud but I still want to know if they are released.
registry = download_catalog(OSS_CATALOG_URL) | ||
for connector in registry[f"{self.connector_type}s"]: | ||
if ( | ||
connector[f"{self.connector_type}DefinitionId"] == metadata["definitionId"] |
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.
Wait a second, does each version of a connector have a different definition ID? Because we want to run all checks on each new version in case new version screws things up.
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.
Definitions IDs are static and are connector's primary key. The logic here is:
If the definition ID and the dockerImage version are found in the registry it means the connector was published.
@property | ||
def is_released(self) -> bool: | ||
metadata = self.metadata | ||
in_registry = 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.
in_registry = False |
connector[f"{self.connector_type}DefinitionId"] == metadata["definitionId"] | ||
and connector["dockerImageTag"] == metadata["dockerImageTag"] | ||
): | ||
in_registry = True |
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.
in_registry = True | |
return True |
and connector["dockerImageTag"] == metadata["dockerImageTag"] | ||
): | ||
in_registry = True | ||
break |
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.
break | |
return False |
): | ||
in_registry = True | ||
break | ||
return in_registry |
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.
return in_registry |
8deb9a3
to
4da8624
Compare
We have some check that are not meant to run on nightly builds, for released connectors.
This PR introduce a flag that can be set at the
Check
level to determine if the check should run on a released connector or be skipped.The released state of the connector is determined by the presence of the current version in metadata in the OSS registry.