-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
uploadConditions.py is broken in recent IBs #34349
Comments
A new Issue was created by @mmusich Marco Musich. @Dr15Jones, @dpiparo, @silviodonato, @smuzaffar, @makortel, @qliphy can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
looks like it. I gather there is no unit test coverage for this script.. |
looks like not. |
Could you change /usr/bin/env python to /usr/bin/env python3 and confirm that it works?
… On Jul 6, 2021, at 2:24 PM, David Lange ***@***.***> wrote:
looks like it. I gather there is no unit test coverage for this script..
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
correct |
@ggovi also reported the same issue for |
I’ll make a PR changing all the scripts in CondCore
… On Jul 6, 2021, at 2:35 PM, Malik Shahzad Muzaffar ***@***.***> wrote:
@ggovi also reported the same issue for conddb --db oradev -a /build/gg list runinfo_31X_mc but this was only in CMSSW_12_0_X_2021-07-01-2300 IB where condb was using #!/usr/bin/env python
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
it doesn't. diff --git a/CondCore/Utilities/scripts/uploadConditions.py b/CondCore/Utilities/scripts/uploadConditions.py
index 25f57d30c27..73b0bc2ff06 100755
--- a/CondCore/Utilities/scripts/uploadConditions.py
+++ b/CondCore/Utilities/scripts/uploadConditions.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''Script that uploads to the new CMS conditions uploader.
Adapted to the new infrastructure from v6 of the upload.py script for the DropBox from Miguel Ojeda.
''' I get
|
One doesn’t have to upload to a db that persists for more than the length of the test or do you? But indeed if there is no support for uploading to some file based or otherwise fake db , it would mean having a bit of infrastructure behind..
… On Jul 6, 2021, at 2:30 PM, Marco Musich ***@***.***> wrote:
I gather there is no unit test coverage for this script..
looks like not.
OTOH, I presume one doesn't want to actually upload to DB every time the test is exercised.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yea, cStringIO is gone in python3. You probably need
```from io import StringIO```
… On Jul 6, 2021, at 2:38 PM, Marco Musich ***@***.***> wrote:
Could you change /usr/bin/env python to /usr/bin/env python3 and confirm that it works?
it doesn't.
With:
diff --git a/CondCore/Utilities/scripts/uploadConditions.py b/CondCore/Utilities/scripts/uploadConditions.py
index 25f57d30c27..73b0bc2ff06 100755
--- a/CondCore/Utilities/scripts/uploadConditions.py
+++ b/CondCore/Utilities/scripts/uploadConditions.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
'''Script that uploads to the new CMS conditions uploader.
Adapted to the new infrastructure from v6 of the upload.py script for the DropBox from Miguel Ojeda.
'''
I get
$ uploadConditions.py SiPixelGainCalibration_2021_v0_full.db Traceback (most recent call last):
File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 46, in <module>
import cStringIO
ModuleNotFoundError: No module named 'cStringIO'
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
at the moment I think one can just either upload to the production or to the preparation db, I am not totally sure uploading to a local sqlite file would test all the functionalities. For sure one can make a simple test just running the wizard in order to spot wrong includes or something like that. |
@davidlange6 thanks ,a PR is almost ready, i'm about to submit it... |
Sorry,
```from io import StringIO as cStringIO```
If you don’t want to change code below
… On Jul 6, 2021, at 2:42 PM, David Lange ***@***.***> wrote:
Yea, cStringIO is gone in python3. You probably need
```from io import StringIO```
> On Jul 6, 2021, at 2:38 PM, Marco Musich ***@***.***> wrote:
>
>
> Could you change /usr/bin/env python to /usr/bin/env python3 and confirm that it works?
>
> it doesn't.
> With:
>
> diff --git a/CondCore/Utilities/scripts/uploadConditions.py b/CondCore/Utilities/scripts/uploadConditions.py
>
> index 25f57d30c27..73b0bc2ff06 100755
>
> --- a/CondCore/Utilities/scripts/uploadConditions.py
> +++ b/CondCore/Utilities/scripts/uploadConditions.py
> @@ -1,4 +1,4 @@
> -#!/usr/bin/env python
> +#!/usr/bin/env python3
>
> '''Script that uploads to the new CMS conditions uploader.
> Adapted to the new infrastructure from v6 of the upload.py script for the DropBox from Miguel Ojeda.
> '''
>
> I get
>
> $ uploadConditions.py SiPixelGainCalibration_2021_v0_full.db Traceback (most recent call last):
> File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 46, in <module>
> import cStringIO
> ModuleNotFoundError: No module named 'cStringIO'
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub, or unsubscribe.
>
|
I guess there's more work to it... @ggovi |
Funny, I thought I fixed these things years ago.. Seems I missed these
raw_input is also gone in python3.
answer = input(prompt)
Is likely sufficient.
… On Jul 6, 2021, at 2:57 PM, Marco Musich ***@***.***> wrote:
traceback (most recent call last):
File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 711, in uploadAllFiles
with open(metadataFilename, 'rb') as metadataFile:
FileNotFoundError: [Errno 2] No such file or directory: 'SiPixelGainCalibration_2021_v0_full.txt'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 992, in <module>
sys.exit(main())
File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 977, in main
return upload(options, arguments)
File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 890, in upload
results = uploadAllFiles(options, arguments)
File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 721, in uploadAllFiles
if getInput('y', '\nIt looks like the metadata file %s does not exist. Do you want me to create it and help you fill it?\nAnswer [y]: ' % metadataFilename).lower() != 'y':
File "/tmp/musich/vanilla/CMSSW_12_0_X_2021-07-06-1100/bin/slc7_amd64_gcc900/uploadConditions.py", line 56, in getInput
answer = raw_input(prompt)
NameError: name 'raw_input' is not defined
I guess there's more work to it... @ggovi
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
On Jul 6, 2021, at 3:04 PM, David Lange ***@***.***> wrote:
Funny, I thought I fixed these things years ago.. Seems I missed these
Correction, I obviously didn’t actually fix cStringIO or raw_input in CMSSW. I’m rather surprised that none of the users of cStringIO are found in the PY3 unit tests
|
@davidlange6 , I think unit tests are py3 compatible. This |
It does work (sort of), for some reason the wizard doesn't recognize yet the internal list of tags present in the input sqlite file, but if it's prompted by the user it does work.... |
Yes, bad luck it seems.
… On Jul 6, 2021, at 3:13 PM, Malik Shahzad Muzaffar ***@***.***> wrote:
@davidlange6 , I think unit tests are py3 compatible. This uploadConditions.py is part of scripts directory and is never run during IB tests
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Is that something done via the cx-oracle package or something in cmssw?
… On Jul 6, 2021, at 3:21 PM, Marco Musich ***@***.***> wrote:
Is likely sufficient.
It does work (sort of), for some reason the wizard doesn't recognize yet the internal list of tags present in the input sqlite file, but if it's prompted by the user it does work....
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I am chairing a meeting now, I'll investigate later. |
@mmusich @davidlange6 as I said i have a fix for that issue, i'm currently working to migrate the pycurl related code... |
@mmusich hasib left CMS more than one year ago... |
@ggovi he just wrote me he has a py3 version of the script in skype chat :) |
addressed by #34373 |
assign alca |
+alca |
This issue is fully signed and ready to be closed. |
I think it should be actually assigned db... |
#34349 (comment) |
assign db |
New categories assigned: db @ggovi you have been requested to review this Pull request/Issue and eventually sign? Thanks |
+1 |
This issue is fully signed and ready to be closed. |
related to py3 migration?
The text was updated successfully, but these errors were encountered: