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

improvement(fluid-build): Fix group task dependencies and reduce message clutter #23523

Merged
merged 4 commits into from
Jan 13, 2025

Conversation

curtisman
Copy link
Member

@curtisman curtisman commented Jan 10, 2025

Fix group task dependencies: For script task that has "&&" in the command, a sequential group task is created. When building the dependency graph, the latter tasks need to depend on the previous task. However, an "iterator" of previous leaf task is passed to add as dependency for the latter tasks, and if the latter tasks have multiple subtasks, the iterator will only iterate once for the first subtask and miss the other subtask since it doesn't reset. The fix is to just pass the Set into addDependentLeafTasks

Reduce message clutter:

  • For set up without config file, avoid having a big warning message. Merge the indication with the "Build Root" message.
  • Don't show symlink status unless it not in the default mode.

Additionally, make getFluidBuildConfig correctly track which searchDir is using a default config in case it is used with multiple searchDir in the future.

@Copilot Copilot bot review requested due to automatic review settings January 10, 2025 14:32
@github-actions github-actions bot added area: build Build related issues base: main PRs targeted against main branch labels Jan 10, 2025

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

@curtisman
Copy link
Member Author

@tylerbutler FYI.

@tylerbutler tylerbutler requested review from zhenmichael and a team January 10, 2025 15:42
Copy link
Contributor

@Abe27342 Abe27342 left a comment

Choose a reason for hiding this comment

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

LGTM minus docs requests, maybe Michael/TylerB have other thoughts.

I was going to cut a flub release to adopt some of Tyler's changes--I'll wait for this to go in before doing so.

@tylerbutler tylerbutler changed the title [fluid-build]: Fix group task dependencies and reduce message clutter improvement(fluid-build): Fix group task dependencies and reduce message clutter Jan 10, 2025
@tylerbutler
Copy link
Member

I was going to cut a flub release to adopt some of Tyler's changes--I'll wait for this to go in before doing so.

@Abe27342 There's a build-tools prerelease that has the changes to unblock r11s upgrade, if you're blocked.

Copy link
Member

@tylerbutler tylerbutler left a comment

Choose a reason for hiding this comment

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

Additionally, make getFluidBuildConfig correctly track which searchDir is using a default config in case it is used with multiple searchDir in the future.

No objection to this change, but I am curious if you have a specific scenario in mind that needs this?

@@ -33,7 +33,7 @@ export class GroupTask extends Task {
if (prevTask !== undefined) {
const leafTasks = new Set<LeafTask>();
prevTask.collectLeafTasks(leafTasks);
task.addDependentLeafTasks(leafTasks.values());
task.addDependentLeafTasks(leafTasks);
Copy link
Member

Choose a reason for hiding this comment

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

Is there something we could do to the function typing to prevent this sort of mistake? Maybe it's one of those things where both could be correct, and this was just a case where the wrong value was used?

Copy link
Member Author

@curtisman curtisman Jan 10, 2025

Choose a reason for hiding this comment

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

I was surprised that worked before. but from the typescript iterable definition, the SetIterator has @@iterator field, which makes it an iterable :( Not sure what else to do here.

Copy link
Contributor

@alexvy86 alexvy86 Jan 13, 2025

Choose a reason for hiding this comment

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

Having a hard time figuring out what the error is though. Passing a Set, or <Set>.values() seems like it should be the same thing in this case (where an Iterable is expected)? Never mind, missed the reason in the PR description.

@tylerbutler
Copy link
Member

/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check

@tylerbutler
Copy link
Member

/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

1 similar comment
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Co-authored-by: Abram Sanderson <Abram.sanderson@gmail.com>
@curtisman
Copy link
Member Author

Additionally, make getFluidBuildConfig correctly track which searchDir is using a default config in case it is used with multiple searchDir in the future.

No objection to this change, but I am curious if you have a specific scenario in mind that needs this?

Nope. It was just wrong behavior, and I fixed it.

@curtisman
Copy link
Member Author

@Abe27342 @tylerbutler all the comment should be addressed.

@tylerbutler
Copy link
Member

/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tylerbutler
Copy link
Member

/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Co-authored-by: Alex Villarreal <716334+alexvy86@users.noreply.github.com>
@Abe27342
Copy link
Contributor

/azp run Build - api-markdown-documenter,Build - benchmark-tool,Build - build-common,Build - build-tools,Build - common-utils,Build - eslint-config-fluid,Build - eslint-plugin-fluid

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Abe27342
Copy link
Contributor

/azp run Build - protocol-definitions,Build - test-tools,server-gitrest,server-gitssh,server-historian,server-routerlicious,Build - client packages,repo-policy-check

@Abe27342 Abe27342 enabled auto-merge (squash) January 13, 2025 18:31
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Abe27342 Abe27342 merged commit 7a16748 into microsoft:main Jan 13, 2025
26 checks passed
@curtisman curtisman deleted the fix branch January 13, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Build related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants