[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Condor-users] condor -format options



minor yet annoying change

previously 

condor_q -format "%d" ClusterId -format "XXX\n" ClusterId

would produce

1XXX
2XXX
3XXX
...
etc etc

now it does not, instead producing

123... etc etc

if however you use 

condor_q -format "%d" ClusterId -format "XXX%d\n" ClusterId

then you get

1XXX1
2XXX2
3XXX3
...
etc

I know this seems a minor thing that, if I wish it to produce
guaranteed output I must ensure that both the variable name exists
(hence the use of ClusterId) *and* that the text output includes a
reference to it in some way, but it strikes me as bad behaviour.

Irrespective of right or wrong it breaks my wrappers scripts rather
nastily (and could have broken my code it it wasn't heavily regex
based).

I would view any change in the percieved output from -format as
something that merits an announcement or at least a warning.

The code change which prevents erroneous uses of %<type> causing a
failure is fine since it converts guaranteed unrecoverable errors into
possible inputs and is documented (Am I to assume this change brought
about the new behaviour).

Can I ask that changes in this area get rather more coverage
(preferably on this list) since the manual states that for relied upon
ouput for parsing use -format...

For instance if the logic was changed such that

condor_q -format "A%d|" ClusterId -format "FOO=%s|" Foo -format
"Z%d\n" ClusterId

changed from producing (as 6.7.2)

A1|Z1
A2|Z2
A3|FOO=Whatever|Z3
A4|Z4

where only the job 3 had a user defined atttribute of Foo to:

A1|FOO=|Z1
A2|FOO=|Z2
A3|FOO=Whatever|Z3
A4|FOO=|Z4

...for example, then I would be entirely unable to distinguish between
those jobs with the attribute defined but empty valued versues those
without the attribute.

Such a change would break my code such that a total rewrite was required.

I am fine changing my scripts but I hope no one else was relying on
this behaviour within something harder to change that a hacky piece of
awk.

If there are any other hidden gotchas that you know about in 6.7.x a
list of them would be very much appreciated

Matt