-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
feat(scheduler-targets-alpha): SageMakerStartPipelineExecution
Target
#28927
Conversation
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.
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.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
add an unit test
cc5b6cd
to
5a30af5
Compare
private readonly pipelineArn: string; | ||
|
||
constructor( | ||
private readonly pipeline: CfnPipeline, |
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.
Everything is fine except for this... it should be an IPipeline
but that doesn't exist yet. The problem is that this locks in people to the L1 pipeline, and ideally we'd want this to be interoperable with a community L2 if that existed.
So how about adding a very barebones IPipeline
construct to aws-sagemaker
. Nothing controversial, just kind of a placeholder. In the future, if we develop a Pipeline L2, it can build off of the IPipeline
as can any community L2. As long as we don't make any crazy decisions, this can be stable from day 1. We did something similar in IEndpoint
.
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.
Good idea.
The IEndpoint
is also creating an interface in the aws-sagemaker-alpha
module, but that is to ensure that the existing implementation is not affected, so is it correct to create it only in the aws-sagemaker
module for this PR?
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.
I changed.
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.
@go-to-k one comment about how we are using sagemaker And one other comment -- can you make sure that the references to sagemaker are SageMaker
with the capital M?
Thanks for your review.
Oh, It seems that the CFn documents https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-pipeline.html |
However, it seems that many places have already written etc... PS) I changed. |
…o-k/aws-cdk into scheduler-targets-sagemaker
Pull request has been modified.
42b6946
to
d6d3c59
Compare
0e29910
to
0b1df62
Compare
import { CfnPipeline } from 'aws-cdk-lib/aws-sagemaker'; | ||
import { IPipeline } from 'aws-cdk-lib/aws-sagemaker'; |
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.
I got the following eslint error when I did the following here, so here it is
import { CfnPipeline, IPipeline } from 'aws-cdk-lib/aws-sagemaker';
❯ yarn lint
yarn run v1.22.17
$ cdk-lint
Oops! Something went wrong! :(
ESLint: 7.32.0
Error: ENOENT: no such file or directory, open '/Users/goto/github/aws-cdk/packages/aws-cdk-lib/aws-sagemaker/package.json'
Occurred while linting /Users/goto/github/aws-cdk/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.sage-maker-start-pipeline-execution.ts:6
at Object.openSync (node:fs:600:3)
at Object.readFileSync (node:fs:468:35)
at isAlphaPackage (/Users/goto/github/aws-cdk/tools/@aws-cdk/eslint-plugin/lib/rules/invalid-cfn-imports.js:139:31)
at checkIfImportedLocationIsAnAlphaPackage (/Users/goto/github/aws-cdk/tools/@aws-cdk/eslint-plugin/lib/rules/invalid-cfn-imports.js:118:16)
at ImportDeclaration (/Users/goto/github/aws-cdk/tools/@aws-cdk/eslint-plugin/lib/rules/invalid-cfn-imports.js:55:74)
at /Users/goto/github/aws-cdk/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/Users/goto/github/aws-cdk/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/Users/goto/github/aws-cdk/node_modules/eslint/lib/linter/node-event-generator.js:293:26)
at NodeEventGenerator.applySelectors (/Users/goto/github/aws-cdk/node_modules/eslint/lib/linter/node-event-generator.js:322:22)
Error: /Users/goto/github/aws-cdk/node_modules/eslint/bin/eslint.js . --ext=.ts --resolve-plugins-relative-to=/Users/goto/github/aws-cdk/tools/@aws-cdk/cdk-build-tools/lib exited with error code 2
Linting failed.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
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.
But duplicated no-duplicate-imports error... I will investigate later.
@aws-cdk/aws-scheduler-targets-alpha: /codebuild/output/src294405110/src/github.com/aws/aws-cdk/packages/@aws-cdk/aws-scheduler-targets-alpha/test/integ.sage-maker-start-pipeline-execution.ts
@aws-cdk/aws-scheduler-targets-alpha: 7:1 error 'aws-cdk-lib/aws-sagemaker' import is duplicated no-duplicate-imports
@aws-cdk/aws-scheduler-targets-alpha: 笨� 1 problem (1 error, 0 warnings)
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.
The error (Error: ENOENT: no such file or directory
...) is about the lint rules.
The error was reduced by changing the settings to match other alpha modules like baseConfig.rules['@aws-cdk/invalid-cfn-imports'] = 'off';
.
using IPipeline grantStartPipelineExecution tweak tweak tweak fix eslint error tweak tweak tweak
0b1df62
to
7671cca
Compare
The build was successful, reflecting your comments. Could you please check? |
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.
Thanks @go-to-k
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). |
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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). |
This PR adds SageMakerStartPipelineExecution Target for EventBridge Scheduler.
Closes #27457
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license