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

refactor(glue-alpha): Refactored glue-alpha L2 CDK construct RFC 0497 #32521

Merged
merged 15 commits into from
Jan 21, 2025

Conversation

natalie-white-aws
Copy link
Contributor

@natalie-white-aws natalie-white-aws commented Dec 14, 2024

Issue # (if applicable)

Implementation of RFC 0497

Reason for this change

Refactored glue-alpha construct to enforce validations by contract and interfaces, improve developer experience, and adhere to best practices. Related PR with merge conflicts and history

Description of changes

Refactored from a single Job class to a pattern of inheritance that removes the need for synth-time validations and sets best practice defaults. Allows for overriding language and Glue versions where applicable, and other job-type specific parameters.

The existing Job and Job Executable monoliths have been decomposed into Job Type and Language specific classes that implement and extend an abstract Job parent class. Developers will be able to see mandatory and optional parameters that apply just to their selected job type and language, rather than having to reference documentation and examples or find out during synth or deploy time that they've selected the wrong configuration.

BREAKING CHANGE: Developers must refactor their existing Job instantiation method calls to choose the right job type and language, and use the new constants static values to define the associated Job configuration settings. See the RFC and/or new README for examples.

Description of how you validated changes

Increased unit test coverage to > 90%, consulted with Glue service team on best practices and sane defaults, updated integration tests.

Checklist


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

@github-actions github-actions bot added the beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK label Dec 14, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team December 14, 2024 00:43
@github-actions github-actions bot added the p2 label Dec 14, 2024
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

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

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@natalie-white-aws natalie-white-aws changed the title refactor(glue-alpha) Refactored glue-alpha L2 CDK construct RFC 0497 refactor:glue-alpha - Refactored glue-alpha L2 CDK construct RFC 0497 Dec 14, 2024
@natalie-white-aws natalie-white-aws changed the title refactor:glue-alpha - Refactored glue-alpha L2 CDK construct RFC 0497 refactor(glue-alpha): Refactored glue-alpha L2 CDK construct RFC 0497 Dec 14, 2024
@natalie-white-aws natalie-white-aws changed the title refactor(glue-alpha): Refactored glue-alpha L2 CDK construct RFC 0497 refactor!(glue-alpha): Refactored glue-alpha L2 CDK construct RFC 0497 Dec 14, 2024
Copy link

codecov bot commented Dec 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.49%. Comparing base (a928748) to head (e05e57c).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32521   +/-   ##
=======================================
  Coverage   81.49%   81.49%           
=======================================
  Files         224      224           
  Lines       13755    13755           
  Branches     2413     2413           
=======================================
  Hits        11209    11209           
  Misses       2273     2273           
  Partials      273      273           
Flag Coverage Δ
suite.unit 81.49% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
packages/aws-cdk 80.85% <ø> (ø)
packages/aws-cdk-lib/core 82.15% <ø> (ø)

@gracelu0 gracelu0 changed the title refactor!(glue-alpha): Refactored glue-alpha L2 CDK construct RFC 0497 refactor(glue-alpha): Refactored glue-alpha L2 CDK construct RFC 0497 Dec 18, 2024
@aws-cdk-automation aws-cdk-automation dismissed their stale review December 18, 2024 22:35

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Dec 18, 2024
@GavinZZ GavinZZ self-requested a review January 7, 2025 19:50
@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 7, 2025

Thank you @natalie-white-aws for creating this new PR. Will give it a final pass today and have it merged if I don't have any other major feedback.

@natalie-white-aws
Copy link
Contributor Author

Thank you @natalie-white-aws for creating this new PR. Will give it a final pass today and have it merged if I don't have any other major feedback.

Thanks a lot, let me know if there are any last-minute actions from me.

@natalie-white-aws
Copy link
Contributor Author

Went ahead an updated the branch from main to avoid last minute merge conflicts

@natalie-white-aws
Copy link
Contributor Author

Woops looks like aws-cli-lib.test broke the build

@natalie-white-aws
Copy link
Contributor Author

Yay, the build is back. :)

@natalie-white-aws
Copy link
Contributor Author

natalie-white-aws commented Jan 14, 2025

@GavinZZ It looks like since the last time I brought the branch up to main, someone else has made more changes causing merge conflicts. This is now the second time this has happened so I want to make sure we can merge this quickly once it's in a good state after I resolve it (again). Hopefully I don't have to create a new PR this time, i'll work on it today. I can't resolve the conflicts via the GitHub UI because I don't have write permissions to the core repo.

@natalie-white-aws
Copy link
Contributor Author

Looks like it was a typo fix for the comments that caused the merge conflict? Is there any way I can get someone from the CDK team to revert that change and merge this PR since we revamped all of the classes including comments anyway?

@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 14, 2025

@natalie-white-aws I'll revert that PR. There's some issues with our codebuild job so merging a PR is blocked at the moment.

@aws-cdk-automation
Copy link
Collaborator

This PR cannot be merged because it has conflicts. Please resolve them. The PR will be considered stale and closed if it remains in an unmergeable state.

GavinZZ
GavinZZ previously approved these changes Jan 17, 2025
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Approving this PR as the majority of my feedbacks have been addressed in the old PR #30833. There's some minor comments that are left unaddressed in the old PR and I think it's fine to merge in this PR given the scope of this change is so big and we can update the minor changes in future PRs.

All in all, I want to appreciate @natalie-white-aws for this huge and awesome PR and also appreciate your patience. I know this PR has been sitting here for months.

@GavinZZ GavinZZ added the pr/do-not-merge This PR should not be merged at this time. label Jan 17, 2025
@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Jan 17, 2025
@GavinZZ GavinZZ removed the pr/do-not-merge This PR should not be merged at this time. label Jan 17, 2025
Copy link
Contributor

mergify bot commented Jan 17, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

mergify bot commented Jan 17, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@Rizxcviii
Copy link
Contributor

@Mergifyio requeue

Copy link
Contributor

mergify bot commented Jan 18, 2025

requeue

❌ Command disallowed due to command restrictions in the Mergify configuration.

  • sender-permission >= write

@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 18, 2025

https://github.com/Mergifyio requeue

Copy link
Contributor

mergify bot commented Jan 18, 2025

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

Copy link
Contributor

mergify bot commented Jan 18, 2025

This pull request has been removed from the queue for the following reason: pull request branch update failed.

The pull request can't be updated

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

@mergify mergify bot dismissed GavinZZ’s stale review January 21, 2025 18:30

Pull request has been modified.

Copy link
Contributor

mergify bot commented Jan 21, 2025

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: e05e57c
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@GavinZZ GavinZZ merged commit 1a18dc9 into aws:main Jan 21, 2025
16 of 19 checks passed
Copy link
Contributor

mergify bot commented Jan 21, 2025

This pull request has been removed from the queue for the following reason: pull request dequeued.

Pull request #32521 has been dequeued, merge conditions unmatch:

  • -closed
  • -merged
  • status-success~=AWS CodeBuild us-east-1
  • any of [🛡 GitHub branch protection]:
    • check-neutral = AWS CodeBuild us-east-1 (AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv)
    • check-skipped = AWS CodeBuild us-east-1 (AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv)
    • check-success = AWS CodeBuild us-east-1 (AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv)
  • #approved-reviews-by >= 1 [🛡 GitHub branch protection]
  • #approved-reviews-by>=1
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by=0
  • -approved-reviews-by~=author
  • -label~=(blocked|do-not-merge|no-squash)
  • -title~=(WIP|wip)
  • base!=release
  • status-success=validate-pr
  • any of [🛡 GitHub branch protection]:
    • check-success = codecov/patch/packages/aws-cdk
    • check-neutral = codecov/patch/packages/aws-cdk
    • check-skipped = codecov/patch/packages/aws-cdk
  • any of [🛡 GitHub branch protection]:
    • check-success = codecov/patch/packages/aws-cdk-lib/core
    • check-neutral = codecov/patch/packages/aws-cdk-lib/core
    • check-skipped = codecov/patch/packages/aws-cdk-lib/core
  • any of [🛡 GitHub branch protection]:
    • check-success = codecov/project/packages/aws-cdk
    • check-neutral = codecov/project/packages/aws-cdk
    • check-skipped = codecov/project/packages/aws-cdk
  • any of [🛡 GitHub branch protection]:
    • check-success = validate-pr
    • check-neutral = validate-pr
    • check-skipped = validate-pr
  • any of [🛡 GitHub branch protection]:
    • check-success = codecov/project/packages/aws-cdk-lib/core
    • check-neutral = codecov/project/packages/aws-cdk-lib/core
    • check-skipped = codecov/project/packages/aws-cdk-lib/core

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.

If you want to requeue this pull request, you need to post a comment with the text: @mergifyio requeue

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2025
@GavinZZ
Copy link
Contributor

GavinZZ commented Jan 21, 2025

The codebuild CI is successful but somehow keeps showing up as running state here. Bypass the rule and merge the PR.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beginning-contributor [Pilot] contributed between 0-2 PRs to the CDK p2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants