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

chore(aws-cdk-lib): catch another proptest failure #32751

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Jan 6, 2025

Another proptest that says that between two aspects A and B, A has to come first... but that cannot be true if A is added after B.

Add in a condition that checks that A lives at least as long as B if it needs to be executed before B.

Here is a broken case:

aws-cdk-lib:   â—� inherited aspects get invoked before locally defined aspects, if both have the same priority
aws-cdk-lib:     Property failed after 60 tests
aws-cdk-lib:     { seed: 1151562818, path: "59:26:25:23:23:23:23:23:13:0", endOnFailure: true }
aws-cdk-lib:     Counterexample: [
aws-cdk-lib:     TREE
aws-cdk-lib:       +- (root)  <-- AddAspect_2734([,First], Inspect_2645@0)@0, Inspect_2645@0 (added)
aws-cdk-lib:            +- First  <-- AddConstruct_2721(/Da, [])@0, Inspect_2645@0 (added)
aws-cdk-lib:            +- (added) Tree
aws-cdk-lib:            +- (added) Da
aws-cdk-lib:     VISITS
aws-cdk-lib:       0. <root> <-- AddAspect_2734([,First], Inspect_2645@0)
aws-cdk-lib:       1. First <-- AddAspect_2734([,First], Inspect_2645@0)
aws-cdk-lib:       2. First <-- AddConstruct_2721(/Da, [])
aws-cdk-lib:       3. First <-- Inspect_2645
aws-cdk-lib:       4. Tree <-- AddAspect_2734([,First], Inspect_2645@0)
aws-cdk-lib:     ,false]

aws-cdk-lib:     Got error: Aspect Inspect_2645@0 at 3 should have been before AddConstruct_2721(/Da, [])@0 at 2, but was after


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

Another proptest that says that between two aspects A and B, A has to
come first... but that cannot be true if A is added after B.

Add in a condition that checks that A lives at least as long as B
if it needs to be executed before B.
@rix0rrr rix0rrr requested a review from a team as a code owner January 6, 2025 10:22
@github-actions github-actions bot added the p2 label Jan 6, 2025
@aws-cdk-automation aws-cdk-automation requested a review from a team January 6, 2025 10:23
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jan 6, 2025
Copy link
Contributor

@iliapolo iliapolo left a comment

Choose a reason for hiding this comment

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

A has to come first... but that cannot be true if A is added after B.

Not super versed in this, but doesn't this depend on the priority of A and B? like, A is added after B but with a higher priority than B?

Copy link

codecov bot commented Jan 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.38%. Comparing base (bd38861) to head (f9fdedd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #32751   +/-   ##
=======================================
  Coverage   81.38%   81.38%           
=======================================
  Files         222      222           
  Lines       13750    13750           
  Branches     2423     2423           
=======================================
  Hits        11191    11191           
  Misses       2279     2279           
  Partials      280      280           
Flag Coverage Δ
suite.unit 81.38% <ø> (ø)

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

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

@aws-cdk-automation aws-cdk-automation added the pr/needs-maintainer-review This PR needs a review from a Core Team Member label Jan 6, 2025
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS. p2 pr/needs-maintainer-review This PR needs a review from a Core Team Member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants