Off by one bug in format_point?
I have a code that is calling Consumer.query()
for "rows" datatypes. Eventually this calls _retrieve_rows_by_tag
and I am seeing an error that is
...
File "./process_log", line 28, in get_keys_from_influx
out = consumer.query(MEASUREMENT, 'rows', start, end)
File "/ligo/shared-scratch/observing/4/dev/runs/log_test/influx.py", line 661, in query
return self.retrieve_rows_by_tag(s['measurement'], start, end, s['tag_key'], aggregate=s['aggregate'], **kwargs)
File "/ligo/shared-scratch/observing/4/dev/runs/log_test/influx.py", line 709, in retrieve_rows_by_tag
return _retrieve_rows_by_tag(self.client, self.database, measurement, self.schema[measurement], start, end, tag, aggregate=aggregate, dt=dt, datetime=datetime)
File "/ligo/shared-scratch/observing/4/dev/runs/log_test/influx.py", line 1205, in _retrieve_rows_by_tag
tag_val = row['tags'][tag]
KeyError: 'job_type'
where "job_type" is my only tag in the schema. Looking at the raw output of points
defined here. I see (for one item):
[1992658615000000000, -7997921891068774238, '02/17/23', 'gstlal_inspiral.002E0', '55761486', '11', ' warnings.warn("disabling service discovery, this web server won\'t be able to advertise the location of the services it provides.")\\n\\n%4|1676693829.661|CONFWARN|rdkafka#producer-1| [thrd:app]: Configuration property group.id is a consumer property and will be ignored by this producer instance\\n\\n%4|1676693830.192|CONFWARN|rdkafka#producer-3| [thrd:app]: Configuration property group.id is a consumer property and will be ignored by this producer instance\\n', 'gstlal_inspiral']
Which by visual inspection shows that the tag is the last column. However, this code which formats the point actually ignores this last column and returns an empty tag dictionary. In this case, deleting the 1
would fix it, but I have no idea why that should be the case in the context of the broader functionality supported here.