Skip to content

Conversation

@bouweandela
Copy link
Member

@bouweandela bouweandela commented Nov 21, 2022

Description

If the output directory already exists the tool would stop. Now it will try several alternatives by adding a suffix -1, -2,, etc before giving up. This problem occurs when you try to run multiple recipes with the same name in parallel.

Closes #1817


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@bouweandela bouweandela changed the title Create a session directory with suffix "-1", "-2", etc if it exists Create a session directory with suffix "-1", "-2", etc if it already exists Nov 21, 2022
@bouweandela bouweandela added the enhancement New feature or request label Nov 21, 2022
@codecov
Copy link

codecov bot commented Nov 21, 2022

Codecov Report

Merging #1818 (d91ab50) into main (9a2a318) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1818   +/-   ##
=======================================
  Coverage   91.49%   91.50%           
=======================================
  Files         202      202           
  Lines       10908    10918   +10     
=======================================
+ Hits         9980     9990   +10     
  Misses        928      928           
Impacted Files Coverage Δ
esmvalcore/_main.py 91.06% <100.00%> (+0.39%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bouweandela bouweandela marked this pull request as ready for review November 21, 2022 16:39
@bouweandela
Copy link
Member Author

Question to reviewer: is additional documentation needed here?

@bouweandela
Copy link
Member Author

@schlunma and @valeriupredoi Maybe this is interesting for you since we recently discussed this in #1769.

Copy link
Contributor

@schlunma schlunma left a comment

Choose a reason for hiding this comment

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

Looks good! I have one small comment.

About the doc: I don't think it is necessary to add documentation on this.

Copy link
Contributor

@schlunma schlunma left a comment

Choose a reason for hiding this comment

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

Nice!

@bouweandela
Copy link
Member Author

bouweandela commented Nov 22, 2022

@ESMValGroup/technical-lead-development-team Could someone please do a final check and merge?

@valeriupredoi
Copy link
Contributor

@ESMValGroup/technical-lead-development-team Could someone please do a final check and merge?

on it now, bud!

Copy link
Contributor

@valeriupredoi valeriupredoi left a comment

Choose a reason for hiding this comment

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

thanks @bouweandela and @schlunma - looking swanky! I'd put a debug message when new output dirs are created but that's just me being a bit verbose 😁

@valeriupredoi valeriupredoi merged commit 94302a4 into main Nov 22, 2022
@valeriupredoi valeriupredoi deleted the avoid-crash-if-session-dir-exists branch November 22, 2022 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not stop the run when output directory exists

4 participants