Skip to content

models: replace workflow.run_number with generation and restart number#205

Merged
mdonadoni merged 1 commit intoreanahub:masterfrom
giuseppe-steduto:allow-more-9-restart
Nov 15, 2023
Merged

models: replace workflow.run_number with generation and restart number#205
mdonadoni merged 1 commit intoreanahub:masterfrom
giuseppe-steduto:allow-more-9-restart

Conversation

@giuseppe-steduto
Copy link
Copy Markdown
Member

@giuseppe-steduto giuseppe-steduto commented Oct 2, 2023

Change the workflow table to split the run_number into two integers: one referring to the generation of the workflows, and the other one referring to the restart number, thus removing the limit of 9 restarts.

Closes #186.


To test the PR, these quick scripts might be come in handy:

  1. Run the specified number of workflows on REANA (default 15), to be run from a workflow directory (such as roofit).
#!/bin/bash

# Set the default number of runs to 15 if no argument is passed
NUM_RUNS=${1:-15}

# Run the setup environment command
eval $(reana-dev client-setup-environment)

# Run the workflow the specified number of times
for (( i=1; i<=NUM_RUNS; i++ ))
do
  echo "Starting run $i of $NUM_RUNS..."
  reana-client run -w root6-roofit
  echo "Run $i submitted."
done
  1. Restart a specific generation of the roofit demo workflow (default 1) a certain number of times (default 15). ./restart.sh 50 3 will restart root6-roofit.3 50 times.
#!/bin/bash

# Set the default number of runs to 15 if no argument is passed
NUM_RUNS=${1:-15}
TO_RESTART=${2:-1}

# Run the setup environment command
eval $(reana-dev client-setup-environment)

# Run the workflow the specified number of times
for (( i=1; i<=NUM_RUNS; i++ ))
do
  echo "Starting restart $i of $NUM_RUNS..."
  reana-client restart -w root6-roofit.$TO_RESTART
  echo "Restart $i submitted."
done

@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 2, 2023

Codecov Report

Merging #205 (589978b) into master (1fde517) will increase coverage by 0.20%.
The diff coverage is 93.33%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
+ Coverage   74.24%   74.44%   +0.20%     
==========================================
  Files           7        7              
  Lines         893      900       +7     
==========================================
+ Hits          663      670       +7     
  Misses        230      230              
Files Coverage Δ
reana_db/config.py 0.00% <ø> (ø)
reana_db/models.py 90.30% <95.83%> (+0.05%) ⬆️
reana_db/utils.py 76.29% <83.33%> (+0.08%) ⬆️

Copy link
Copy Markdown
Member

@mdonadoni mdonadoni left a comment

Choose a reason for hiding this comment

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

Works well!

Comment thread reana_db/models.py Outdated
Comment thread reana_db/models.py Outdated
Comment thread reana_db/models.py Outdated
Comment thread reana_db/models.py Outdated
Comment thread reana_db/models.py
Comment thread reana_db/models.py
Comment thread reana_db/models.py
@giuseppe-steduto giuseppe-steduto force-pushed the allow-more-9-restart branch 4 times, most recently from ef5f9d4 to 5a14407 Compare October 11, 2023 16:47
@giuseppe-steduto giuseppe-steduto force-pushed the allow-more-9-restart branch 2 times, most recently from d6eeafe to 79f8221 Compare October 16, 2023 14:29
@giuseppe-steduto giuseppe-steduto marked this pull request as ready for review October 25, 2023 15:14
Comment thread CHANGES.rst Outdated
Comment thread reana_db/utils.py Outdated
@giuseppe-steduto giuseppe-steduto force-pushed the allow-more-9-restart branch 2 times, most recently from 58fa915 to 850065f Compare October 30, 2023 09:42
Copy link
Copy Markdown
Member

@mdonadoni mdonadoni left a comment

Choose a reason for hiding this comment

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

Amazing job! Everything works well 🚀

Change the workflow table to split the run_number into two integers: one
is the major run number (the number before the dot), and the other one
is the minor run number (after the dot), which increases when
restarting a workflow, thus removing the limit of 9 restarts.

Closes reanahub#186.
@mdonadoni mdonadoni merged commit 589978b into reanahub:master Nov 15, 2023
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.

models: allow more than nine restarts

3 participants