-
Notifications
You must be signed in to change notification settings - Fork 9.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 support for glue_version to resource aws_glue_job #10237
Conversation
Add glue_version argument reference
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.
Hi @NSjogren 👋 Thanks for submitting this -- its pretty good minus one issue with the schema and nit in the documentation. Please reach out if you have any questions or do not have time to implement the feedback items.
@@ -61,7 +61,8 @@ be removed in future releases, please use `max_capacity` instead. | |||
* `role_arn` – (Required) The ARN of the IAM role associated with this job. | |||
* `timeout` – (Optional) The job timeout in minutes. The default is 2880 minutes (48 hours). | |||
* `security_configuration` - (Optional) The name of the Security Configuration to be associated with the job. | |||
|
|||
* `glue_version` - (Optional) The version of glue to use, for example "1.0". For information about available versionse see [AWS Glue Release Notes](https://docs.aws.amazon.com/glue/latest/dg/release-notes.html). |
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: Can you please alphabetize this new argument with the others? Thanks.
@@ -66,6 +66,10 @@ func resourceAwsGlueJob() *schema.Resource { | |||
Type: schema.TypeString, | |||
Optional: true, | |||
}, | |||
"glue_version": { | |||
Type: schema.TypeString, | |||
Optional: 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.
This new argument is currently causing a difference for existing configurations since its set to perform drift detection and Glue assigns a default value, e.g.
--- PASS: TestAccAWSGlueJob_GlueVersion (31.34s)
--- FAIL: TestAccAWSGlueJob_Command (31.54s)
--- FAIL: TestAccAWSGlueJob_DefaultArguments (45.49s)
--- FAIL: TestAccAWSGlueJob_MaxRetries (47.57s)
--- FAIL: TestAccAWSGlueJob_Description (54.14s)
--- FAIL: TestAccAWSGlueJob_SecurityConfiguration (56.34s)
--- FAIL: TestAccAWSGlueJob_ExecutionProperty (59.86s)
--- PASS: TestAccAWSGlueJob_Basic (65.38s)
--- FAIL: TestAccAWSGlueJob_PythonShell (67.25s)
--- FAIL: TestAccAWSGlueJob_MaxCapacity (74.10s)
--- FAIL: TestAccAWSGlueJob_Timeout (74.40s)
--- FAIL: TestAccAWSGlueJob_AllocatedCapacity (81.45s)
These failures look like:
--- FAIL: TestAccAWSGlueJob_Description (54.14s)
testing.go:569: Step 1 error: After applying this step, the plan was not empty:
DIFF:
UPDATE: aws_glue_job.test
... omitted for clarity ...
glue_version: "0.9" => ""
... omitted for clarity ...
While we could set Default: "0.9"
on this attribute, I'm actually going to suggest Computed: true
since I would imagine that over time, Glue will update the default version number assigned to Jobs that omit the parameter.
Optional: true, | |
Optional: true, | |
Computed: true, |
This should get the existing testing passing.
Hi @NSjogren 👋 Since we haven't heard back about the feedback above, we have addressed it in a followup commit. After those changes: Output from acceptance testing in AWS Commercial:
Output from acceptance testing in AWS GovCloud (US) (new test failure acceptable in this partition):
|
Reference: #10237 (review) Output from acceptance testing in AWS Commercial: ``` --- PASS: TestAccAWSGlueJob_AllocatedCapacity (52.40s) --- PASS: TestAccAWSGlueJob_Timeout (52.61s) --- PASS: TestAccAWSGlueJob_ExecutionProperty (57.79s) --- PASS: TestAccAWSGlueJob_Description (61.93s) --- PASS: TestAccAWSGlueJob_Command (62.62s) --- PASS: TestAccAWSGlueJob_Basic (72.67s) --- PASS: TestAccAWSGlueJob_DefaultArguments (74.90s) --- PASS: TestAccAWSGlueJob_MaxRetries (81.59s) --- PASS: TestAccAWSGlueJob_GlueVersion (88.02s) --- PASS: TestAccAWSGlueJob_SecurityConfiguration (99.31s) --- PASS: TestAccAWSGlueJob_PythonShell (105.36s) --- PASS: TestAccAWSGlueJob_MaxCapacity (124.59s) ``` Output from acceptance testing in AWS GovCloud (US) (new test failure acceptable in this partition): ``` --- FAIL: TestAccAWSGlueJob_GlueVersion (34.67s) testing.go:615: Step 0 error: Check failed: Check 2/2 error: aws_glue_job.test: Attribute 'glue_version' expected "0.9", got "" --- PASS: TestAccAWSGlueJob_Command (51.17s) --- PASS: TestAccAWSGlueJob_DefaultArguments (67.58s) --- PASS: TestAccAWSGlueJob_MaxRetries (68.45s) --- PASS: TestAccAWSGlueJob_SecurityConfiguration (75.77s) --- PASS: TestAccAWSGlueJob_PythonShell (81.86s) --- PASS: TestAccAWSGlueJob_Description (86.03s) --- PASS: TestAccAWSGlueJob_MaxCapacity (95.51s) --- PASS: TestAccAWSGlueJob_Timeout (103.41s) --- PASS: TestAccAWSGlueJob_Basic (120.65s) --- PASS: TestAccAWSGlueJob_ExecutionProperty (134.29s) --- PASS: TestAccAWSGlueJob_AllocatedCapacity (143.32s) ```
This has been released in version 2.34.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks! |
Closes #9524 , python_version support is already resolved.
This will enable you to use a newer versions of AWS Glue, also python 3 and Spark 2.4.
Community Note
Relates OR Closes #0000
Release note for CHANGELOG:
Output from acceptance testing: