Issue Number | 2972 |
---|---|
Summary | Adapt CDR filter editing interface to new version control system |
Created | 2009-09-23 09:43:45 |
Issue Type | Improvement |
Submitted By | Kline, Bob (NIH/NCI) [C] |
Assigned To | Englisch, Volker (NIH/NCI) [C] |
Status | Closed |
Resolved | 2010-02-24 15:36:24 |
Resolution | Fixed |
Path | /home/bkline/backups/jira/ocecdr/issue.107300 |
BZISSUE::4647
BZDATETIME::2009-09-23 09:43:45
BZCREATOR::Bob Kline
BZASSIGNEE::Volker Englisch
BZQACONTACT::Bob Kline
We need to modify CdrFilter.py to use Subversion. I've installed pysvn on Mahler. Here's some proof of concept source code:
import os, pysvn, time, sys, cdr
def getLogin(realm, username, maySave):
return True, uid, pwd, False
uid = sys.argv[1]
pwd = sys.argv[2]
now = time.strftime("%Y%m%d%H%M%S")
wd = "%s-%s" % (now, os.getpid())
base = 'https://imbncipf01.nci.nih.gov/svn/cdrtest/trunk'
os.chdir('d:/tmp')
client = pysvn.Client()
client.callback_get_login = getLogin
client.checkout('%s/cdr/Filters/' % base, './%s' % wd)
filepath = "./%s/CDR0000000047.xml" % wd
fp = open(filepath, 'a')
fp.write("<!– Added another dummy comment -->\n")
fp.close()
client.checkin(filepath, 'Added comment at the bottom')
cdr.runCommand("rm -rf %s" % wd)
BZDATETIME::2009-09-30 16:09:25
BZCOMMENTOR::Volker Englisch
BZCOMMENT::1
I've made a copy of the program
EditFilter.py
to
EditFilter_svn.py
and got it to work a few times but since then I am having problems
running it again due to authentication issues.
I've searched on the Internet trying to find solutions to the problem
but that wasn't successful.
Bob, Alan and I will need to discuss on how to go forward with this.
BZDATETIME::2009-09-30 16:41:51
BZCOMMENTOR::Volker Englisch
BZCOMMENT::2
I'd like to recall my previous comment. Everything is working fine now.
I believe my problem from yesterday was a result of a shot to my foot. I think I've submitted the 'Create Version' command of the EditFilter with a wrong password which then caused my NIH account to get locked out causing all following tests to fail. I've tried the program again with the correct password and all is well.
BZDATETIME::2009-09-30 16:45:17
BZCOMMENTOR::Volker Englisch
BZCOMMENT::3
Note to myself:
Before using this program in production two things will need to get
changed
a) The variable cdr.SVNBASE needs to be set properly
b) In order to test creating filters without messing up too much on
BACH
I've modified the module getProdId() to point to FRANCK instead.
Obviously, this will need to be reversed.
BZDATETIME::2009-09-30 16:47:40
BZCOMMENTOR::Volker Englisch
BZCOMMENT::4
Due to the fact that the entire Filters directory will have to be checked out when creating a SVN version the save/clone process takes about 20 sec.
We are not creating filter versions that often to the delay may be acceptable.
This is ready for testing on MAHLER.
BZDATETIME::2009-11-05 17:42:13
BZCOMMENTOR::Volker Englisch
BZCOMMENT::5
This task is on hold until Alan has completed the tools to create and update filters from the command line.
BZDATETIME::2009-11-16 11:02:28
BZCOMMENTOR::Volker Englisch
BZCOMMENT::6
Bob and Alan have written alternate programs for creating, updating
and versioning filters. Given the existence of those programs this task
isn't a high priority anymore for what's left to be done.
I'm setting it to a P6 at the moment.
BZDATETIME::2010-01-08 14:45:33
BZCOMMENTOR::Volker Englisch
BZCOMMENT::7
I've modified the two following scripts to prevent editing filters on
MAHLER.
EditFilters.py - R9466
EditFilter.py - R9466
This is ready for review on MAHLER.
BZDATETIME::2010-02-24 15:36:24
BZCOMMENTOR::Volker Englisch
BZCOMMENT::8
We have everything we need. Closing issue.
Elapsed: 0:00:00.000849