Skip to content

Also put easyblocks used by extensions in reprod directory#3375

Merged
akesandgren merged 4 commits intoeasybuilders:developfrom
ocaisa:track_all_easyblocks_used
Jul 2, 2020
Merged

Also put easyblocks used by extensions in reprod directory#3375
akesandgren merged 4 commits intoeasybuilders:developfrom
ocaisa:track_all_easyblocks_used

Conversation

@ocaisa
Copy link
Copy Markdown
Member

@ocaisa ocaisa commented Jul 1, 2020

Fix #3373

@ocaisa
Copy link
Copy Markdown
Member Author

ocaisa commented Jul 1, 2020

@boegel Any idea how I could test this?

@ocaisa
Copy link
Copy Markdown
Member Author

ocaisa commented Jul 1, 2020

Ok, I have a test, trying to make it pass now...

Alan O'Cais added 2 commits July 1, 2020 14:16
The reproduction directory is created before we run the steps, when the list of extension easyblock instances is not actually populated yet
@ocaisa ocaisa requested a review from akesandgren July 1, 2020 19:09
@ocaisa ocaisa added the bug fix label Jul 1, 2020
@ocaisa ocaisa added this to the next release (4.2.2?) milestone Jul 1, 2020
Copy link
Copy Markdown
Contributor

@akesandgren akesandgren left a comment

Choose a reason for hiding this comment

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

LGTM

@akesandgren
Copy link
Copy Markdown
Contributor

Going in, thanks @ocaisa!

@akesandgren akesandgren merged commit d66c0e5 into easybuilders:develop Jul 2, 2020
easyblock_path = inspect.getsourcefile(easyblock_class)
# if we reach EasyBlock or ExtensionEasyBlock class, we are done
# (ExtensionEasyblock is hardcoded to avoid a cyclical import)
if easyblock_class.__name__ in [EasyBlock.__name__, 'ExtensionEasyBlock']:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@ocaisa To be on the safe side, we also should consider 'Extension' here... In theory there could be extensions that are installed with a class that directly derives from Extension rather than ExtensionEasyBlock (we don't have any like these currently in the central easyblocks repository though....)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@boegel This comes at no cost right, I should do this

else:
copy_file(easyblock_path, os.path.join(reprod_easyblock_dir, easyblock_filename))
_log.info("Dumped easyblock %s required for reproduction to %s", easyblock_filename, reprod_easyblock_dir)
# also archive all the relevant easyblocks (including any used by extensions)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Comment is incorrect, archiving of easyblocks used by extensions is not done here?

boegel added a commit to ocaisa/easybuild-framework that referenced this pull request Jul 4, 2020
@ocaisa ocaisa deleted the track_all_easyblocks_used branch July 30, 2020 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reprod dir doesn't get copy of easyblock used for extensions

3 participants