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

WIP: Continuous Tasks #29750

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
Draft

WIP: Continuous Tasks #29750

wants to merge 10 commits into from

Conversation

FrozenPandaz
Copy link
Collaborator

This is still WIP

An RFC about this feature is happening here: #29025

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Jan 31, 2025 10:03pm

@FrozenPandaz FrozenPandaz changed the title Continuous tasks WIP: Continuous Tasks Jan 24, 2025
Copy link

nx-cloud bot commented Jan 24, 2025

View your CI Pipeline Execution ↗ for commit 1d9c69a.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 33m 46s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 17s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check --base= --he... ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗
nx documentation ✅ Succeeded 3m 28s View ↗

☁️ Nx Cloud last updated this comment at 2025-01-31 22:35:10 UTC

Copy link

🐳 We have a release for that!

This PR has a release associated with it. You can try it out using this command:

npx create-nx-workspace@0.0.0-pr-29750-cc9549c my-workspace

Or just copy this version and use it in your own command:

0.0.0-pr-29750-cc9549c
Release details 📑
Published version 0.0.0-pr-29750-cc9549c
Triggered by @FrozenPandaz
Branch continuous-tasks
Commit cc9549c
Workflow run 13014531551

To request a new release for this pull request, mention someone from the Nx team or the @nrwl/nx-pipelines-reviewers.

!shouldPrefix
) {
// todo implement this
// return await this.runTaskInForkedProcess(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removing this

// Disable the pseudo terminal if this is a run-many
const disablePseudoTerminal = !this.initiatingProject;
// Disable the pseudo terminal if this is a run-many or when running a continuous task
const disablePseudoTerminal = !this.initiatingProject || task.continuous;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This seems wrong 🤔 a task can be continuous be the only thing running.

@@ -725,4 +767,87 @@ export class TaskOrchestrator {
}

// endregion utils
private async startInfiniteTask(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Change this to continuous

Comment on lines +517 to +521
Object.keys(taskGraph.continuousDependencies).forEach((taskId) => {
taskGraph.continuousDependencies[taskId].forEach((d) => {
reverseTaskDeps[d].push(taskId);
});
});
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Check this

@@ -135,18 +135,37 @@ export class PseudoTerminal {
}
}

let i = 0;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Remove this

@@ -30,19 +31,37 @@ describe('PseudoTerminal', () => {
}, 1000);

it('should subscribe to output', (done) => {
const childProcess = terminal.runCommand('echo "hello world"');
const childProcess = terminal.runCommand('sleep 1 && echo "hello world"');
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Remove this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant