Skip to content

Conversation

@mnorbury
Copy link
Contributor

Summary

Adding further EMR resources to support notebook executions, cluster steps, release labels and supported instance types.

Fixes: #7708

@github-actions
Copy link

This PR has the following changes to source plugin(s) tables:

  • Table aws_emr_notebook_executions was added
  • Table aws_emr_release_labels was added
  • Table aws_emr_steps was added
  • Table aws_emr_supported_instance_types was added

@mnorbury mnorbury self-assigned this Jul 28, 2023
Copy link
Collaborator

@bbernays bbernays left a comment

Choose a reason for hiding this comment

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

PR looks good. one comment about the code

Comment on lines 52 to 57
response, err := svc.DescribeReleaseLabel(ctx, &emr.DescribeReleaseLabelInput{ReleaseLabel: &releaseLabel}, func(options *emr.Options) {
options.Region = cl.Region
})
if err != nil {
return err
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this is a paginated API, so in this implementation you will just get the first page

@mnorbury mnorbury marked this pull request as ready for review July 31, 2023 07:24
@mnorbury mnorbury requested a review from hermanschaaf as a code owner July 31, 2023 07:24

https://docs.aws.amazon.com/emr/latest/APIReference/API_NotebookExecution.html

The composite primary key for this table is (**cluster_arn**, **arn**).
Copy link
Member

Choose a reason for hiding this comment

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

Isn't the arn alone enough in this case? Why include cluster_arn in the PK as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the arn should be sufficient for PK purposes. Do you think it is worth keeping the cluster_arn but with the PK set to false? The ExecutionEngineId field links back to the ClusterID so it wouldn't be needed to join the notebook executions with the cluster tables - https://docs.aws.amazon.com/emr/latest/APIReference/API_NotebookExecutionSummary.html

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I think keeping cluster_arn but with PK set to false should do the trick 👍

mnorbury added 3 commits July 31, 2023 10:36
Responding to review comments.
The `cluster_arn` is not needed as a primary key since the notebook execution resource
has an `arn` which will be sufficient as a PK.
@mnorbury mnorbury force-pushed the mnorbury-adding-additional-emr-cluster-resources branch from 901ceb7 to bf8bbc7 Compare July 31, 2023 09:47
@mnorbury mnorbury closed this Jul 31, 2023
@mnorbury mnorbury reopened this Jul 31, 2023
@mnorbury mnorbury added the automerge Automatically merge once required checks pass label Aug 1, 2023
@kodiakhq kodiakhq bot merged commit 4a25c5c into main Aug 1, 2023
@kodiakhq kodiakhq bot deleted the mnorbury-adding-additional-emr-cluster-resources branch August 1, 2023 07:27
kodiakhq bot pushed a commit that referenced this pull request Aug 1, 2023
🤖 I have created a release *beep* *boop*
---


## [22.3.0](plugins-source-aws-v22.2.0...plugins-source-aws-v22.3.0) (2023-08-01)


### This Release has the Following Changes to Tables
- Table `aws_appflow_flows` was added
- Table `aws_auditmanager_assessments` was added
- Table `aws_backup_report_plans` was added
- Table `aws_cloudformation_stacks`: column added with name `retain_except_on_create` and type `bool`
- Table `aws_ec2_ebs_snapshots`: column added with name `sse_type` and type `utf8`
- Table `aws_ec2_ebs_volumes`: column added with name `sse_type` and type `utf8`
- Table `aws_emr_notebook_executions` was added
- Table `aws_emr_release_labels` was added
- Table `aws_emr_steps` was added
- Table `aws_emr_supported_instance_types` was added
- Table `aws_rds_instances`: column added with name `percent_progress` and type `utf8`

### Features

* **resources:** Add support for Amazon Appflow Flows ([#12575](#12575)) ([43ed08e](43ed08e))
* **resources:** Add Support for AWS Audit Manager Assessments ([#12573](#12573)) ([ab5a939](ab5a939))
* **resources:** Add support for AWS Backup Report Plan ([#12578](#12578)) ([5fa1af1](5fa1af1))
* **resources:** Adding additional EMR cluster resources ([#12562](#12562)) ([4a25c5c](4a25c5c))
* **services:** Support newly added regions ([#12671](#12671)) ([5af2d31](5af2d31))


### Bug Fixes

* **deps:** Update AWS modules ([#12591](#12591)) ([20eb1bf](20eb1bf))
* **deps:** Update AWS modules ([#12592](#12592)) ([80ad5c5](80ad5c5))
* **deps:** Update github.com/apache/arrow/go/v13 digest to 112f949 ([#12659](#12659)) ([48d73a9](48d73a9))
* **deps:** Update github.com/cloudquery/arrow/go/v13 digest to 3452eb0 ([#12595](#12595)) ([c1c0949](c1c0949))
* **deps:** Update github.com/cockroachdb/cockroachdb-parser digest to 302c9ad ([#12664](#12664)) ([924509c](924509c))
* **deps:** Update github.com/gocarina/gocsv digest to 99d496c ([#12667](#12667)) ([428f719](428f719))
* **deps:** Update github.com/petermattis/goid digest to 80aa455 ([#12669](#12669)) ([a140396](a140396))
* Detecting conditions for CIS AWS v1.5.0 Section 1 ([#12670](#12670)) ([f7bd160](f7bd160))
* **resources:** Handle Pagination for AWS Code Commit Repositories ([#12653](#12653)) ([6f37e56](6f37e56))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge Automatically merge once required checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS EMR Additional Resources: Notebook Executions, Release Labels, Steps, Studio Session mappings, Studios

7 participants