Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
airbyte-ci: Add pypi publishing logic #34111
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
airbyte-ci: Add pypi publishing logic #34111
Changes from 25 commits
1f2e7d5
aee5ada
dcaef6d
3cd4f03
475b1c5
0360603
5f6be6c
cf698f2
44f8454
6874dc8
7c3bb25
43cf70a
bd0d636
7cc0274
e252b4f
439f392
ab4bd79
6de583a
08103fc
415dc23
9e71444
96a0715
d6b70d0
dd7443a
6063ec7
96e83e5
eee6eca
2069bbd
3c408df
e06d37d
df9502c
0b6b9de
a0313ac
638b30c
ee02e87
2dd2124
13fa2a1
e8877d7
da754f2
f80878f
707f769
a0fbf5f
e082d65
26f680a
0b78a12
391b68c
bd7c918
1a6e0c3
671c317
bbeeea2
d5c037f
a44fdc4
faaf6db
6923181
c30cb89
84da11f
004af84
e8b86ef
4691763
f99aaef
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Will you reuse this step on the
airbyte-lib
release? If yes I suggest moving it outside theconnectors
package.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 didn't plan to - when running it via the command IMHO the caller is responsible (in case of airbyte-lib the Github action will bump the version) for this and giving them the exact error from pypi is the best behavior.
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.
Shall we mark the related steps as skipped and log a message when conversion can't happen?
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.
Currently the behavior is like this:
My reasoning was that it might be weird / unexpected to even show pypi-related stuff on connector reports that have nothing to do with it. Basically assuming the following semantic meaning of skip: "Normally this step would be performed, but an edge case prevent us from doing so - you might look into that".
No strong opinion on this though, we can also always show them as "skipped" if you think it makes sense.
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.
Agreed, it makes no sense to show skipped pypi steps for a java connector.
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.
Can you add the unit tests in this module to check the behavior following your addition?
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 are the use cases for these options? Do we ever want to override a package name / version?
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 a kind of a "plumbing" option which allows to publish a connector from a local machine without going through the regular pipeline.
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 think you can use
connector_context.connector.metadata
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 doesn't work because
connector_context.connector.metadata
is what got published the last time, not the current state in the repo, so it wouldn't publish on the first merge that setsremoteRegistries.pypi.enabled
to 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.
I conceptually prefer your approach because it loads the file from a dagger
Directory
.But I think you're wrong about
connector_context.connector.metadata is what got published the last time
The
metadata
property reads the metadata file current state from the filesystem..My point is that I'd prefer this method to use the common interface we've declared to access metadata.
But eventually the metadata access should be refactored to use the
get_repo_file
method internally.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.
Good point, I could have sworn I ran into problems with this, that's why I changed it, but maybe I confused myself. I will look into this.
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'd appreciate a kind of integration test that would publish to test pypi.
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.
💡Given that we are following a simple convention of
You may want to look at
SimpleDockerStep
. Heres an example of it in useairbyte/airbyte-ci/connectors/pipelines/pipelines/airbyte_ci/metadata/pipeline.py
Line 24 in 99488dd
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 tried to convert it this way but due to the branching and some extras like writing certain files it got messy and IMHO it's clearer when cleaned up like @alafanechere described above - I'm still working through some comments, let me finish that and have a look at the final results, happy to do another pass.
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 can be pulled from the setup file 🙏
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.
You mean author and author_email? If yes I did that on purpose to enforce consistency. Added a comment for this.
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.
Do we always want to configure the test repo?
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 doesn't seem to hurt to do so