Skip to content

Conversation

@otaviomacedo
Copy link
Contributor

When computing the graph for the stack, if there is a DependsOn, the algorithm will ignore other dependencies. Also, DependsOn may be a string or an array, and this was not being properly handled.


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

When computing the graph for the stack, if there is a `DependsOn`, the algorithm will ignore other dependencies. Also, `DependsOn` may be a string or an array, and this was not being properly handled.
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.92%. Comparing base (d78e32b) to head (7b6400e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #524   +/-   ##
=======================================
  Coverage   78.92%   78.92%           
=======================================
  Files          46       46           
  Lines        6980     6980           
  Branches      777      777           
=======================================
  Hits         5509     5509           
  Misses       1452     1452           
  Partials       19       19           
Flag Coverage Δ
suite.unit 78.92% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

}
if ('DependsOn' in value) {
return [value.DependsOn];
const result = Object.values(value).flatMap(findDependencies);
Copy link
Contributor

Choose a reason for hiding this comment

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

Bit strange we have to call this again, since we are already doing it in line 61. Can you not:

const result = [];
if ('DependsOn' in value) {
  if (Array.isArray(value.DependsOn)) {
    result.push(...value.DependsOn);
  } else {
    result.push(value.DependsOn);
  }
}
result.push(...Object.values(value).flatMap(findDependencies))
return result;

?

Copy link
Contributor

@iliapolo iliapolo May 22, 2025

Choose a reason for hiding this comment

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

Approved and deqeueud anyway - take it or leave it.

@iliapolo iliapolo disabled auto-merge May 22, 2025 13:03
@otaviomacedo otaviomacedo added this pull request to the merge queue May 22, 2025
Merged via the queue into main with commit 0145866 May 22, 2025
21 checks passed
@otaviomacedo otaviomacedo deleted the otaviom/fix-dependson branch May 22, 2025 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants