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

New "resubmit" mechanism #649

Merged
merged 6 commits into from
Dec 12, 2023
Merged

New "resubmit" mechanism #649

merged 6 commits into from
Dec 12, 2023

Conversation

spirali
Copy link
Collaborator

@spirali spirali commented Dec 8, 2023

The preparation for removing resubmit.

It allows "resubmit" via:

hq submit --array=`hq job task-ids --filter=filter` ... 

(This PR does not removes resubmit yet)

@spirali spirali requested a review from Kobzol December 8, 2023 15:57
Copy link
Collaborator

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

This is a pretty cool idea, I like it!

@@ -130,6 +131,8 @@ impl Output for Quiet {
) {
}

fn print_task_ids(&self, _job_task_ids: Vec<(JobId, IntArray)>) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that here we could write one ID per line? This mode should really be renamed from quiet to something like bash-processable :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I have changed it. if there are 2 or more jobs, it prints also job ids.

.filter(|info| !is_terminated(info))
.map(|info| info.n_tasks)
.sum();
let mut remaining_job_ids: BTreeSet<JobId> = jobs
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any particular reason why Set was switched to BTreeSet and why the Vec was changed to a slice?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because we need to random removes & sorted iterator for creating IntArray.

crates/hyperqueue/src/common/arraydef.rs Outdated Show resolved Hide resolved
crates/hyperqueue/src/common/arraydef.rs Outdated Show resolved Hide resolved
crates/hyperqueue/src/common/arraydef.rs Outdated Show resolved Hide resolved
crates/hyperqueue/src/server/client/submit.rs Outdated Show resolved Hide resolved
tests/test_job.py Show resolved Hide resolved
docs/jobs/arrays.md Outdated Show resolved Hide resolved
docs/jobs/failure.md Outdated Show resolved Hide resolved
crates/hyperqueue/src/client/commands/submit/command.rs Outdated Show resolved Hide resolved
@spirali spirali merged commit bfa67e1 into main Dec 12, 2023
7 checks passed
@spirali spirali deleted the task-ids branch December 12, 2023 14:35
@Kobzol Kobzol added this to the v0.18 milestone Feb 9, 2024
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.

2 participants