Skip to content

Conversation

@taburaad
Copy link
Contributor

No description provided.

@djw8605
Copy link
Member

djw8605 commented Sep 23, 2016

Why is the .travis.yml file not in the root of the repo? Can travis-ci see a file that is not in the root?

@taburaad
Copy link
Contributor Author

You're right, it shouldn't be here... lemme try to re do this one

@djw8605 djw8605 mentioned this pull request Sep 24, 2016
Copy link
Member

@djw8605 djw8605 left a comment

Choose a reason for hiding this comment

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

Some changes required. Proper testing with docker images, and using python functions instead of creating new processes and calling other python scripts.

@@ -0,0 +1,4 @@
python stashcp.py --debug user/taburaad/public/2gb_file.tar .
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this will work since xrdcp is not installed by default at travis-ci. I think you will need something like what we do with the HTCondor-CE, where we start a CentOS docker image.

  1. Setup a docker image in the travis-ci.
  2. Create the docker image.
  3. Finally, run the tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do I need to change anything in this travis.yml to set up my docker image? I understand the general idea but am figuring out the specifics of how to configure the docker image through your CentOS example.

Copy link
Member

Choose a reason for hiding this comment

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

You should be able to copy most of the HTCondor-CE's travis.yml. And probably copy all of the setup_tests.sh file.

else: #Pull from origin
print "2nd try failed on %s, pulling from origin" % cache
cache="root://stash.osgconnect.net"
command = "python ./timeout.py -t "+str(TIMEOUT)+ " -f "+sourceFile + " -d "+str(DIFF)+" -s "+str(fileSize)+" -x "+str(xrdargs)+" -c "+cache+" -z "+destination
Copy link
Member

Choose a reason for hiding this comment

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

Why are you calling another python script as a process. Can't you just create a module, class, or function that does the time and takes all the necessary arguments?

args,opts=parser.parse_args()

def find_closest():
closest=subprocess.Popen(['./get_best_stashcache.py', '0'], stdout=subprocess.PIPE)
Copy link
Member

Choose a reason for hiding this comment

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

Same, why are you calling another python script? Create a module, class, or function to do this!

xrdfs = subprocess.Popen(["xrdfs", "root://stash.osgconnect.net", "stat", sourceFile], stdout=subprocess.PIPE).communicate()[0]
fileSize=int(re.findall(r"Size: \d+",xrdfs)[0].split(": ")[1])
cache=find_closest()
command = "python ./timeout.py -t "+str(TIMEOUT)+ " -f "+sourceFile + " -d "+str(DIFF)+" -s "+str(fileSize)+" -x "+str(xrdargs)+" -c "+cache+" -z "+destination
Copy link
Member

Choose a reason for hiding this comment

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

Same, call the module, class, or function.

@taburaad
Copy link
Contributor Author

Ok - should have this in a day or two.

@djw8605
Copy link
Member

djw8605 commented Oct 6, 2016

Hi @Tony044, do you consider this pull request done?

@taburaad
Copy link
Contributor Author

It still needs a working test_inside_docker.sh script, which I'm not sure how to configure. After that I would consider it done.

@djw8605
Copy link
Member

djw8605 commented Dec 5, 2016

Superceded by #18

@djw8605 djw8605 closed this Dec 5, 2016
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