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

Adding args to submit spark step #1826

Merged
merged 6 commits into from
Dec 1, 2022

Conversation

vikramsg
Copy link
Contributor

@vikramsg vikramsg commented Nov 30, 2022

Feature or Bugfix

  • Feature

Detail

  • Add args to emr.submit_spark_step. This allows submitting scripts to EMR with CLI args.

Relates

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: 8680a5a
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

@malachi-constant malachi-constant left a comment

Choose a reason for hiding this comment

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

Looks good, is it possible to add a test for this param?

@vikramsg
Copy link
Contributor Author

test

The intention of the tests are not very clear to me. For eg. is f"s3://{bucket}/emr/test_docker.py" an actual script? It would help if this was more clear.

@malachi-constant
Copy link
Contributor

@vikramsg Don't worry about the pytest for now, we are getting an error on an EMR unit test though.

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: 552432b
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@vikramsg
Copy link
Contributor Author

vikramsg commented Dec 1, 2022

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: 552432b
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Below is what I see. Is this what you are referring to.

But this is surprising. args is Optional. Why does it say that it is required?

        wr.emr.submit_steps(
            cluster_id=cluster_id,
            steps=[
>               wr.emr.build_spark_step(
                    path=f"s3://{bucket}/emr/test_docker.py",
                    docker_image="123456789123.dkr.ecr.us-east-1.amazonaws.com/docker-emr:docker-emr",
                )
            ],
        )
E       TypeError: build_spark_step() missing 1 required positional argument: 'args'

tests/test_emr.py:159: TypeError

@malachi-constant
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
  • Commit ID: 1e1a34e
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@kukushking
Copy link
Contributor

Thanks @vikramsg for the contribution! Please ignore the CB report, there are a couple of flaky tests unrelated to this change failing

@kukushking kukushking merged commit d7fb501 into aws:main Dec 1, 2022
@kukushking kukushking added this to the 2.18.0 milestone Dec 2, 2022
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.

None yet

4 participants