-
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
Add provinance to the registry entry #37804
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. |
64a89fa
to
9d7c6c2
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.
Haven't tested, but the code looks great. Thank you for extensive comments, and for poetry lock
ing so we get a few vulns fixed while we're at it!
|
||
commit_sha: Optional[str] = Field( | ||
None, | ||
description="The git commit sha of the last commit that modified this file. DO NOT DEFINE THIS FIELD IN YOUR SPEC. It will be overwritten by the CI.", |
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: should we lift the autogeneration notice up one/two levels and just say that the whole source_file_info probably should not be defined in a spec?
|
||
|
||
def default_none_to_dict(value, key, obj): | ||
"""Set the value of a key in a dictionary to an empty dictionary if the value is None. |
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.
TY for a nice doc! <3
@@ -29,7 +29,7 @@ def send_slack_message(context: OpExecutionContext, channel: str, message: str, | |||
channel (str): The channel to send the message to. | |||
message (str): The message to send. | |||
""" | |||
if os.getenv("SLACK_TOKEN"): | |||
if os.getenv("SLACK_TOKEN") == "" and os.getenv("SLACK_NOTIFICATIONS_DISABLED") != "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.
Is the new env var documented somewhere?
metadata_etag: Optional[str] = None | ||
metadata_file_path: Optional[str] = None | ||
metadata_bucket_name: Optional[str] = None | ||
metadata_last_modified: Optional[str] = None |
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 addition for debugging
|
||
class SourceFileInfo(BaseModel): | ||
metadata_etag: Optional[str] = None | ||
metadata_file_path: Optional[str] = None |
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.
It's a blob/key path isn't?
@@ -87,6 +117,11 @@ class BreakingChangeScope(BaseModel): | |||
__root__: StreamBreakingChangeScope = Field(..., description="A scope that can be used to limit the impact of a breaking change.") | |||
|
|||
|
|||
class GeneratedFields(BaseModel): |
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.
As I said in #37802 I think all generated fields should stay in the registry, not be metadata fields (which is what you're doing here 👍 )
commit_sha: Optional[str] = Field( | ||
None, | ||
description="The git commit sha of the last commit that modified this file. DO NOT DEFINE THIS FIELD IN YOUR SPEC. It will be overwritten by the CI.", | ||
) | ||
commit_timestamp: Optional[datetime] = Field( | ||
None, | ||
description="The git commit timestamp of the last commit that modified this file. DO NOT DEFINE THIS FIELD IN YOUR SPEC. It will be overwritten by the CI.", | ||
) | ||
commit_author: Optional[str] = Field( | ||
None, | ||
description="The git commit author of the last commit that modified this file. DO NOT DEFINE THIS FIELD IN YOUR SPEC. It will be overwritten by the CI.", | ||
) | ||
commit_author_email: Optional[str] = Field( | ||
None, | ||
description="The git commit author email of the last commit that modified this file. DO NOT DEFINE THIS FIELD IN YOUR SPEC. It will be overwritten by the CI.", | ||
) |
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.
This is already declared in #37802
You might need to gt restack
2b03faf
to
d5ce17d
Compare
9d7c6c2
to
2c8909d
Compare
d5ce17d
to
78f8640
Compare
2c8909d
to
654f28d
Compare
78f8640
to
9c54656
Compare
654f28d
to
926ee78
Compare
What
Adds the generation time and root metadata file info to the registry entry
Spun out of #32715 as a stack
closes https://github.com/airbytehq/airbyte-internal-issues/issues/7466