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

Fix small bug in init of repositories. #852

Merged
merged 4 commits into from Feb 27, 2014
Merged

Conversation

wpoely86
Copy link
Member

Found by @pescobar

@stdweird
Copy link
Contributor

ofcourse. @boegel ok to go

@boegel
Copy link
Member

boegel commented Feb 18, 2014

This is begging for a unit test to be added.

@boegel boegel added this to the v1.12 milestone Feb 18, 2014
@wpoely86
Copy link
Member Author

I think this justifies a v1.11.1 release. Everybody with a repositorypath set (in config.cfg or through cmdline) will get hit by this bug.

@fgeorgatos
Copy link
Collaborator

@wpoely86 :

proposition: since a sprint on performance tools is about to occur over the next 3 days or so,
I suggest to pull manhours together and strive for one more release before end of Feb., if doable.
Of course, I am very pragmatic about what is really possible with volunteered time...

@boegel
Copy link
Member

boegel commented Feb 26, 2014

@fgeorgatos: there's no need to rush to EB v1.12, a little bit over one month between releases is short enough imho

@boegel
Copy link
Member

boegel commented Feb 26, 2014

added a unit test to capture this bug, see wpoely86#10:

$ python test/framework/repository.py
.E
======================================================================
ERROR: test_init_repository (__main__.RepositoryTest)
Test use of init_repository function.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/framework/repository.py", line 63, in test_init_repository
    repo = init_repository('FileRepository', [self.path])
  File "/Users/kehoste/work/easybuild-framework/easybuild/tools/repository.py", line 466, in init_repository
    (repository, repo.__name__, repository_path, err))
  File "/Users/kehoste/work/easybuild-framework/easybuild/tools/build_log.py", line 104, in error
    raise EasyBuildError(newMsg)
EasyBuildError: 'EasyBuild crashed with an error (at easybuild/tools/repository.py:466 in init_repository): Failed to create a repository instance for FileRepository (class FileRepository) with args [\'/var/folders/6y/x4gmwgjn5qz63b7ftg4j_40m0000gn/T/easybuild-repo-ulW9qA\'] (msg: "EasyBuild crashed with an error (at easybuild/tools/repository.py:463 in init_repository): repository_path should be a string or list/tuple of maximum 2 elements (current: [\'/var/folders/6y/x4gmwgjn5qz63b7ftg4j_40m0000gn/T/easybuild-repo-ulW9qA\'], type <type \'list\'>)")'

with the fix included, tests pass of course:

$ python test/framework/repository.py
..
----------------------------------------------------------------------
Ran 2 tests in 0.688s

OK

add unit test for bug in init_repositories, fix output of eb --avail-repositories
@boegel
Copy link
Member

boegel commented Feb 27, 2014

OK, unit tests added and Jenkins is happy, so merging this in.

I'll look into a EB v1.11.1 release, together with the fix done in #861 (but I need to add a unit test for that one too, I forgot about that in #861).

boegel added a commit that referenced this pull request Feb 27, 2014
Fix small bug in init of repositories.
@boegel boegel merged commit 4d421a9 into easybuilders:develop Feb 27, 2014
@wpoely86 wpoely86 deleted the repobig branch February 28, 2014 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants