Skip to content

Conversation

@kkucharc
Copy link

Hi @markflyhigh
This is my idea how to fix this issue. I also found a small bug that println "sdist archive name: ${collection.singleFile}" because there was srcs dir inside and it couldn't fetch singleFile.

I am not sure if excluding all build directories is a good practices so there is also a possibility to exclude "${project.buildDir}/**"

Tell me what do you think?

Copy link
Owner

@markflyhigh markflyhigh left a comment

Choose a reason for hiding this comment

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

Thanks for this fix!

Actually I didn't realize the load test project is located in sdks/python/apache_beam. As Micheal suggested, I agree with moving load test to beam-sdks-python. And also please consider to reuse scripts/run_integration_test.sh if possible to make your code clean and easy maintain.

args '-c', ". ${project.ext.envdir}/bin/activate && cd ${copiedSrcRoot}/sdks/python && python setup.py sdist --formats zip,gztar --dist-dir ${project.buildDir}"
}
def collection = project.fileTree("${project.buildDir}"){ include '**/*.tar.gz' exclude '**/apache-beam.tar.gz'}
def collection = project.fileTree("${project.buildDir}"){ include '**/*.tar.gz' exclude '**/apache-beam.tar.gz', 'srcs/**'}
Copy link
Owner

Choose a reason for hiding this comment

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

I didn't see the problem here. Log shows it's working well. Can you add your failure or explain more?

Copy link
Author

Choose a reason for hiding this comment

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

I get it when I try run "naked" sdist task (./gradlew --stacktrace beam:sdks:python:sdist)

Caused by: java.lang.IllegalStateException: Expected directory '/Users/kasia/Repos/beam/sdks/python/build' to contain exactly one file, however, it contains more than one file.
        at org.gradle.api.internal.file.AbstractFileCollection.getSingleFile(AbstractFileCollection.java:65)
        at org.apache.beam.gradle.BeamModulePlugin$_apply_closure20$_closure136$_closure145.doCall(BeamModulePlugin.groovy:1644)

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks! For some reason I can't reproduce it on my machine, but I saw same complain in dev list. I'll include your fix.

'sdks/python/dist/**',
'sdks/python/target/**',
'sdks/python/test-suites/**',
'**/build/**',
Copy link
Owner

Choose a reason for hiding this comment

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

lgtm

@markflyhigh
Copy link
Owner

apache#8067 is the roll-forward PR with your fix

@kkucharc kkucharc closed this Jul 24, 2019
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.

2 participants