Skip to content
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

enforce order of installing python dependencies #1149

Merged
merged 20 commits into from
Dec 2, 2020

Conversation

jrhizor
Copy link
Contributor

@jrhizor jrhizor commented Dec 1, 2020

fixes #1031

fixes #1110 (mostly due to #1111). The acceptance criteria are tangential to the main issue and need to be addressed separately, I'll make a separate ticket.

The main issue was that we weren't waiting for parent dependency pip installs (or protocol generation) before running child dependency installs. This is a bit hacky here, will be cleaned up in a later PR.

Also, to fix other build problems, this PR:

  1. turns off buildkit and the rest of docker caching
  2. fixes redshift credential writing
  3. fixes source definitions that were not defined in the seed yaml

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 1, 2020

Ran standard test for shopify (failed) and adwords (passed). I'm bumping adwords after this gets approved but I'll bump shopify as part of #1120

@jrhizor
Copy link
Contributor Author

jrhizor commented Dec 1, 2020

pushed adwords 0.1.4 (and re-running the previous action)

Copy link
Contributor

@cgardens cgardens left a comment

Choose a reason for hiding this comment

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

save us from ourselves!!!!

@@ -1,7 +0,0 @@
{
Copy link
Contributor

Choose a reason for hiding this comment

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

why these getting deleted?

Copy link
Contributor Author

@jrhizor jrhizor Dec 1, 2020

Choose a reason for hiding this comment

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

These aren't present in source_definitions.yaml. I guess I should add them if they were just missing when that was set up?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -10,3 +10,5 @@ airbytePython {
dependencies {
implementation files(project(':airbyte-integrations:bases:airbyte-protocol').airbyteDocker.outputs)
}

installReqs.dependsOn(":airbyte-integrations:bases:airbyte-protocol:installReqs")
Copy link
Contributor

Choose a reason for hiding this comment

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

how did you think about picking :installReqs versus just depending on the build of that module? i'm wondering if we are going to make a bad assumption in the future. i'm also fine with keeping this though if you think it's the right way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should go away in the future, and it may go away in favor of the build step. However, the build step in the future might not match what we have now, so I think this is the lightest weight shim to tide us over.

@@ -12,3 +12,10 @@ airbytePython {
dependencies {
implementation files(project(':airbyte-integrations:bases:base-singer').airbyteDocker.outputs)
}

// used to allow local iteration to work
Copy link
Contributor

Choose a reason for hiding this comment

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

so should we be doing this in all singer sources or just this one if just this one can you explain why in the comment?

Copy link
Contributor

Choose a reason for hiding this comment

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

if all of them do we need to document it? put it in the template, etc. okay if this happens in a separae commit if that's the case.

Copy link
Contributor Author

@jrhizor jrhizor Dec 2, 2020

Choose a reason for hiding this comment

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

Ideally we do all of them, but it's lower priority than getting something working. Since we only had two cases where it didn't align, and both are easily fixable with this, it seems easiest to do this here. If we split it for every singer source, we shouldn't do it here; it should be part of a singer integration plugin.

@@ -48,23 +49,25 @@ class AirbytePythonPlugin implements Plugin<Project> {
command = "install -r requirements.txt"
inputs.file('requirements.txt')
outputs.file('build/installedlocalreqs.txt')
outputs.cacheIf { true }

// HACK: makes all integrations depend on installing requirements for bases. long term we should resolve deps and install in order.
Copy link
Contributor

Choose a reason for hiding this comment

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

long term we should resolve deps and install in order.

what will that look like? should we just have an airbyte-integration.gradle that handles this stuff? again. doesn't have to happen now, just want to understand how you're thinking about it and if possible create an issue with those thoughts.

if you add issue also add its number to the comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm still figuring out precisely how to do this. I'll post on here later with the improvement ticket, but this HACK should be gone by EOW.

@jrhizor jrhizor marked this pull request as ready for review December 2, 2020 01:40
@jrhizor jrhizor merged commit 674ee2c into master Dec 2, 2020
@jrhizor jrhizor deleted the jrhizor/fix-install-order branch December 2, 2020 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python main dependencies are not installed with gradle build ./gradlew clean build fails
2 participants