Skip to content

chore(pipelines): reference discoverReferencedOutputs in error message#19176

Merged
mergify[bot] merged 3 commits intomasterfrom
huijbers/outputs-error
Mar 18, 2022
Merged

chore(pipelines): reference discoverReferencedOutputs in error message#19176
mergify[bot] merged 3 commits intomasterfrom
huijbers/outputs-error

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented Feb 26, 2022

The need to call this function is referenced in the README, but if you
already have written custom steps you're not going to read the README
again.

Include the same hints in the error message.

Fixes #19173.


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

@rix0rrr rix0rrr requested a review from a team February 26, 2022 16:12
@rix0rrr rix0rrr self-assigned this Feb 26, 2022
@github-actions github-actions bot added the @aws-cdk/pipelines CDK Pipelines library label Feb 26, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Feb 26, 2022
@markusl
Copy link
Copy Markdown
Contributor

markusl commented Feb 28, 2022

The following code still fails

  public produceAction (stage: codepipeline.IStage, _options: pipelines.ProduceActionOptions): pipelines.CodePipelineActionFactoryResult {
    const lambdaPrefix = `arn:aws:lambda:${Stack.of(this.scope).region}:${Stack.of(this.scope).account}`;
    const lambdaf = lambda.Function.fromFunctionArn(this.scope, 'Lambda', `${lambdaPrefix}:function:CallReleaseDocumentService`);
    const userParameters = {
      PARAM_1: 'foo',
      ...this.userParameters,
      PARAM_2: 'bar',
    };

    this.discoverReferencedOutputs(userParameters);

    stage.addAction(new actions.LambdaInvokeAction({
      actionName: 'TestAction',
      lambda: lambdaf,
      userParameters,
    }));
    return { runOrdersConsumed: 1 };
  }

The documentation of discoverReferencedOutputs is a bit confusing for those not familiar with the internals of the implementation.

@rix0rrr rix0rrr added bug This issue is a bug. p2 and removed bug This issue is a bug. p2 contribution/core This is a PR that came from AWS. @aws-cdk/pipelines CDK Pipelines library labels Mar 4, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 4, 2022
@rix0rrr rix0rrr added bug This issue is a bug. p2 and removed contribution/core This is a PR that came from AWS. labels Mar 4, 2022
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 4, 2022
@rix0rrr
Copy link
Copy Markdown
Contributor Author

rix0rrr commented Mar 7, 2022

The following code still fails

Should be called in the constructor of subclasses based on what the user

@rix0rrr
Copy link
Copy Markdown
Contributor Author

rix0rrr commented Mar 7, 2022

Also see the example in the README

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 17, 2022

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

1 similar comment
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 17, 2022

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

The need to call this function is referenced in the README, but if you
already have written custom steps you're not going to read the README
again.

Include the same hints in the error message.

Fixes #19173.
@rix0rrr rix0rrr force-pushed the huijbers/outputs-error branch from bb1bb67 to a165d01 Compare March 18, 2022 08:55
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Mar 18, 2022

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 18, 2022

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

@mergify mergify bot merged commit 7fcc0c0 into master Mar 18, 2022
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: 8baf8e2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@mergify mergify bot deleted the huijbers/outputs-error branch March 18, 2022 16:23
@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 18, 2022

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

iliapolo pushed a commit that referenced this pull request Mar 20, 2022
…age (#19176)

The need to call this function is referenced in the README, but if you
already have written custom steps you're not going to read the README
again.

Include the same hints in the error message.

Fixes #19173.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug This issue is a bug. contribution/core This is a PR that came from AWS. p2

Projects

None yet

5 participants