GraceDB Server issueshttps://git.ligo.org/computing/gracedb/server/-/issues2022-12-03T01:47:45Zhttps://git.ligo.org/computing/gracedb/server/-/issues/246Append "Z" to ISO 8601 datetimes strings in VOEvents2022-12-03T01:47:45ZLeo P. SingerAppend "Z" to ISO 8601 datetimes strings in VOEventsSee emfollow/gwcelery!1007, emfollow/userguide!156.See emfollow/gwcelery!1007, emfollow/userguide!156.https://git.ligo.org/computing/gracedb/server/-/issues/243HasMassGap properties in VO and LVK collaboration author.2023-02-08T15:52:25ZRoberto DePietriHasMassGap properties in VO and LVK collaboration author.VO events no longer have the MasGapp classification, but they now have a HasMassGapp property. Also, the VO should be marked as LVK collaboration, .The main file involved with the change is 'gracedb/annotations/voevent_utils.py'. Changes...VO events no longer have the MasGapp classification, but they now have a HasMassGapp property. Also, the VO should be marked as LVK collaboration, .The main file involved with the change is 'gracedb/annotations/voevent_utils.py'. Changes are drafted in the merge request in the fork [1].
Related issues/merge requests:
1. Draft implementation https://git.ligo.org/roberto.depietri/gracedb/-/merge_requests/1
1. https://git.ligo.org/emfollow/userguide/-/issues/285
1. https://git.ligo.org/emfollow/userguide/-/merge_requests/141https://git.ligo.org/computing/gracedb/server/-/issues/241Upgrade pyparsing to 3.0.0 or above2023-02-08T15:59:30ZDaniel WysockiUpgrade pyparsing to 3.0.0 or aboveGraceDB is stuck on `pyparsing==2.3.0` due to an API change. There are some new features in `3.0.0` which would be useful, especially for visualization purposes, so we should upgrade.GraceDB is stuck on `pyparsing==2.3.0` due to an API change. There are some new features in `3.0.0` which would be useful, especially for visualization purposes, so we should upgrade.Daniel WysockiDaniel Wysockihttps://git.ligo.org/computing/gracedb/server/-/issues/238race condition when creating new symlinks2022-10-06T13:51:14ZAlexander Pacerace condition when creating new symlinksThere have been a couple of scenarios when RAVEN (@brandon.piotrzkowski) has tried to simultaneously upload multiple files of the same filename (i.e., `coincidence_far.json`) at the same time, and while the code made it past the part in ...There have been a couple of scenarios when RAVEN (@brandon.piotrzkowski) has tried to simultaneously upload multiple files of the same filename (i.e., `coincidence_far.json`) at the same time, and while the code made it past the part in the [code](https://git.ligo.org/computing/gracedb/server/-/blob/master/gracedb/core/vfile.py#L185) where it removes the old symlink, it would `OSError` (traceback at the end of this issue) when trying to [create](https://git.ligo.org/computing/gracedb/server/-/blob/master/gracedb/core/vfile.py#L191) a new one because another process beat it to it.
This commit: https://git.ligo.org/computing/gracedb/server/-/commit/3daa20fd8e5736d7176cffee39235a507fd88423 fixes it by just catching the exception and moving on. The versioned file still gets created in the logs and is still available, but there's no real scenario in which we should implement the logic to prioritize one symlink over the other in this case.
```
...
...
File "/app/gracedb_project/gracedb/superevents/utils.py", line 248, in create_log
raise e
File "/app/gracedb_project/gracedb/superevents/utils.py", line 244, in create_log
event_or_superevent.datadir, data_file)
File "/app/gracedb_project/gracedb/core/vfile.py", line 271, in create_versioned_file
fdest.close()
File "/app/gracedb_project/gracedb/core/vfile.py", line 224, in close
self._repoint_symlink()
File "/app/gracedb_project/gracedb/core/vfile.py", line 191, in _repoint_symlink
os.symlink(name, self.fullname)
Exception Type: FileExistsError at /api/superevents/MS221004az/logs/
Exception Value: [Errno 17] File exists: 'coincidence_far.json,7' -> '/app/gracedb_project/../db_data/5f/8/0bea0146287984087bb980b9a0d5840958463/coincidence_far.json'
Request information:
USER: emfollow
GET: No GET data
POST:
tagname = 'ext_coinc'
comment = "RAVEN: Computed coincident FAR(s) in Hz with external trigger <a href='https://gracedb-test.ligo.org/events/M315290'>M315290</a>"
```https://git.ligo.org/computing/gracedb/server/-/issues/236External events appearing in superevent neighbors `gw_events`2022-09-22T15:23:29ZBrandon PiotrzkowskiExternal events appearing in superevent neighbors `gw_events`First noted by Deep Chatterjee, within the `superevent_neighbors` field external events can appear as gw events. This can potentially disrupt the logic used in the superevent manager.
Summary of https://gracedb-test.ligo.org/api/superev...First noted by Deep Chatterjee, within the `superevent_neighbors` field external events can appear as gw events. This can potentially disrupt the logic used in the superevent manager.
Summary of https://gracedb-test.ligo.org/api/superevents/MS220920p/ , where `M304272` appears as an external event in the superevent (and not included in `gw_events`) but under `superevent_neighbors` appears as a `gw_event`:
```
{
"superevent_id": "MS220920p",
"gw_events": [
"M304283",
"M304282",
"M304281",
"M304280",
"M304279",
"M304278",
"M304277",
"M304276",
"M304275",
"M304274",
"M304273",
"M304271",
"M304270",
"M304269",
"M304268",
"M304267"
],
"em_events": [
"M304272"
],
"preferred_event_data": {
"superevent": "MS220920p",
"superevent_neighbours": {
"MS220920p": {
"superevent_id": "MS220920p",
"gw_events": [
"M304283",
"M304282",
"M304281",
"M304280",
"M304279",
"M304278",
"M304277",
"M304276",
"M304275",
"M304274",
"M304273",
"M304272",
"M304271",
"M304270",
"M304269",
"M304268",
"M304267"
]
}
}
}https://git.ligo.org/computing/gracedb/server/-/issues/234Add additional RAVEN-related labels2022-10-06T14:08:55ZBrandon PiotrzkowskiAdd additional RAVEN-related labelsThere is a need for additional labels to indicate states in GraceDB and resolve race conditions:
- `COMBINED_SKYMAP_READY`: Combined skymap is available.
- `SOG_READY`: A coincidence should trigger a speed of gravity measurement.
The c...There is a need for additional labels to indicate states in GraceDB and resolve race conditions:
- `COMBINED_SKYMAP_READY`: Combined skymap is available.
- `SOG_READY`: A coincidence should trigger a speed of gravity measurement.
The code changes that require these labels are https://git.ligo.org/emfollow/gwcelery/-/merge_requests/864 and https://git.ligo.org/emfollow/gwcelery/-/merge_requests/890 respectively.https://git.ligo.org/computing/gracedb/server/-/issues/230Add missing lines to coverage report2022-08-12T00:31:07ZDaniel WysockiAdd missing lines to coverage report## Description of feature request
`pytest-coverage` can output a column listing the specific lines which were not covered. We're currently (implicitly) using the default report, `--cov-report term`, but we simply have to swap this for ...## Description of feature request
`pytest-coverage` can output a column listing the specific lines which were not covered. We're currently (implicitly) using the default report, `--cov-report term`, but we simply have to swap this for `--cov-report term-missing` to add the extra info.
https://pytest-cov.readthedocs.io/en/latest/reporting.html
## Use cases
This helps target testing efforts on lines that have not been covered.
## Benefits
Better targeting of tests.
## Drawbacks
The CI/CD job logs will be a bit wider. If this is a problem we could instead keep the current simplified terminal output, and add `--cov-report xml` or `--cov-report html` to add the more detailed info in a job artifact.
## Suggested solutions
Add `--cov-report term-missing` to `pytest`'s arguments in `.gitlab-ci.yml`. I'll have a merge request momentarily.Daniel WysockiDaniel Wysockihttps://git.ligo.org/computing/gracedb/server/-/issues/228Set up a instance of gracedb for development and testing for Daniel Wysocki2022-10-12T21:56:16ZPatrick BradySet up a instance of gracedb for development and testing for Daniel WysockiSet up a instance of gracedb for development and testing for Daniel Wysocki. Work with Duncan Meacher to do this. Instructions are available at https://git.ligo.org/computing/gracedb/server/-/wikis/New-instanceSet up a instance of gracedb for development and testing for Daniel Wysocki. Work with Duncan Meacher to do this. Instructions are available at https://git.ligo.org/computing/gracedb/server/-/wikis/New-instanceDuncan MeacherDuncan Meacherhttps://git.ligo.org/computing/gracedb/server/-/issues/220"terminating connection due to administrator command"2022-04-04T14:37:45ZAlexander Pace"terminating connection due to administrator command"Over the weekend (April 3-4), I woke up to about ~30 emails from `gracedb-test/playground` and then the following day, from `gracedb` (production) with the following error message:
```
Internal Server Error: /some/api/path
OperationalE...Over the weekend (April 3-4), I woke up to about ~30 emails from `gracedb-test/playground` and then the following day, from `gracedb` (production) with the following error message:
```
Internal Server Error: /some/api/path
OperationalError at /some/api/path
terminating connection due to administrator command
SSL connection has been closed unexpectedly
```
Okay? I had never seen that before. So it appears to be a thing with postgres/RDS. ex: https://old.reddit.com/r/aws/comments/b5l3ha/rds_giving_terminating_connection_due_to/
I went into the management console and saw messages like this for "recent events":
![Screen_Shot_2022-04-04_at_10.28.21_AM](/uploads/6eafa63e416711b680f8db37bf87f369/Screen_Shot_2022-04-04_at_10.28.21_AM.png)
So the best I can gather from that and from the maintenance settings is that RDS triggered a minor version update and shutdown and restarted the databases automatically. Client connections were closed, and that's what caused the errors. So as a first cut, I disabled automatic updates, so that's something to keep an eye on for maintenance windows.
I also ducked into sentry and saw that gwcelery recorded the 500 httperror messages, so the clients saw it as well. Hopefully this doesn't pop up again. But i'm recording it here just in case.
Also, the line `SSL connection has been closed unexpectedly`.
For some reason by default postgres asks for an SSL connection? All the communication between the database and the EC2 nodes is behind the cloud and constrained to security groups, so I think we could get away with disabling it and reducing the connection overhead: https://www.postgresql.org/docs/current/libpq-ssl.htmlhttps://git.ligo.org/computing/gracedb/server/-/issues/218Validate the CBC meta data2022-03-15T10:31:20ZGregory Ashtongregory.ashton@ligo.orgValidate the CBC meta dataThe uploaded meta data #217 can be validated by the [JSON schema](https://git.ligo.org/cbc/meta-data/-/blob/main/cbc-meta-data.schema). Note this is not yet complete. A v1 draft is in preparation.The uploaded meta data #217 can be validated by the [JSON schema](https://git.ligo.org/cbc/meta-data/-/blob/main/cbc-meta-data.schema). Note this is not yet complete. A v1 draft is in preparation.https://git.ligo.org/computing/gracedb/server/-/issues/215Enable MLy pipeline2022-04-01T15:09:52ZAlexander PaceEnable MLy pipelineThere a request from @kyle.willetts, @patrick-sutton to enable `MLy` uploads to gracedb, so this ticket is designed to track that work. The sample upload is here:
[mock_event.json](/uploads/2d22376569f73878d47fd56bd449c89d/mock_event.js...There a request from @kyle.willetts, @patrick-sutton to enable `MLy` uploads to gracedb, so this ticket is designed to track that work. The sample upload is here:
[mock_event.json](/uploads/2d22376569f73878d47fd56bd449c89d/mock_event.json)
Steps on my part are (roughly) to:
1) Make the new pipeline object and store in a migration. Any `MLy` developer should be able to upload `Test` events, so uploaders/robots can be defined later.
2) Modify [view_logic.py](https://git.ligo.org/computing/gracedb/server/-/blob/master/gracedb/events/view_logic.py#L42) and assign the pipeline an event type.
3) Modify [translator.py](https://git.ligo.org/computing/gracedb/server/-/blob/master/gracedb/events/translator.py) to parse the json file and then store it in the db.
4) Modify [view_utils.py](https://git.ligo.org/computing/gracedb/server/-/blob/master/gracedb/events/view_utils.py) to serialize `MLy` events into igwn-alerts and API responses.
5) Create a new view template with tables to show web results.
The last step is to add uploaders and robots to push events in production.Alexander PaceAlexander Pacehttps://git.ligo.org/computing/gracedb/server/-/issues/209Re-enable X-Pipeline2023-02-22T15:36:48ZAlexander PaceRe-enable X-Pipeline**Background:** `X-Pipeline` or just `X` has been floating around in GraceDB since way before I've been on this project, but has [never uploaded an event](https://gracedb.ligo.org/search/?query=X&query_type=E&results_format=S). I was att...**Background:** `X-Pipeline` or just `X` has been floating around in GraceDB since way before I've been on this project, but has [never uploaded an event](https://gracedb.ligo.org/search/?query=X&query_type=E&results_format=S). I was attempting to clean up event logic back in mid 2020, and so I added `X`, `Q`, and `Omega` pipelines to a list of pipelines that were being phased out, and [returned a warning message](https://git.ligo.org/lscsoft/gracedb/-/blob/ca14eb8e8eb0c4111ecac38d6e879472fea1b111/gracedb/api/v1/events/views.py#L524-L525) if a user attempted to upload an event to that pipeline. Not that it would have worked anyway, because the [logic](https://git.ligo.org/lscsoft/gracedb/-/blob/master/gracedb/events/view_logic.py#L66-L67) to ingest X-pipeline event files had never actually been implemented and likely would have returned an error.
I received a request over [mattermost](https://chat.ligo.org/ligo/pl/t1zgpxrm8fdz8qk4xrk4jiueby) to revive the pipeline.
Before proceeding with this, I need from @amber-stuver:
1) An example event upload. I don't know the output file format (xml? json?) or what fields that are in the file should be stored in the database. I can look it over as a first step to compare to other event types that are in GraceDB, but I need the file first and foremost. It can be attached to this ticket.
2) What kind of search type is it? Right now, GraceDB ingests events from `CoincInspiral` searches, `GRB` searches, `Multiburst` searches, etc. If `X` fits into one of those categories, storing event data and constructing the view and `REST` response is simpler. But this will make more sense when I get the example upload.
3) Who is going to be uploading and populating the pipeline? If it's individual users, I need just your `@LIGO.org` email address. Or, if there is a robot account that is uploading, please apply for a cert from https://robots.ligo.org/ and then I'll add it as an uploader.
Once I get the example upload and the other information that I need, the steps I need to do are:
1) Remove `X` from the depreciated pipelines list.
2) Add logic to `view_logic.py` to read in `X` events.
3) Determine views for `X` events, add it to settings.
4) Add uploader permissions for the pipeline
5) Test event uploads, ingestion into the database, and webpage views.
6) Make appropriate LVAlert topics for `X-pipeline`
Then I'll have to push a server code change and deploy it.
Drop any questions or sample files you have here and I'll get back to you.Alexander PaceAlexander Pacehttps://git.ligo.org/computing/gracedb/server/-/issues/208Request to change sname format2021-11-01T15:17:31ZGregory Ashtongregory.ashton@ligo.orgRequest to change sname format## Description of feature request
Change the sname format from `SYYMMDDabc` to `SYYMMDD_HHMMSSabc`
## Use cases
## Benefits
<!-- Describe the benefits of adding this feature -->
For anyone relating events from papers to GraceDB, th...## Description of feature request
Change the sname format from `SYYMMDDabc` to `SYYMMDD_HHMMSSabc`
## Use cases
## Benefits
<!-- Describe the benefits of adding this feature -->
For anyone relating events from papers to GraceDB, this removes ambiguity and the need to remember which sname maps to which GW name. Or, at least it reduces the number of cases (I think to zero with good confidence, though there could be edge cases).
## Drawbacks
<!--
Are there any drawbacks to adding this feature?
Can you think of any ways in which this will negatively affect the service for any set of users?
-->
snames become longer and "uglier". However, the choice for GW names to be long and ugly has already been made. So this just provides better consistency.
## Suggested solutions
<!-- Do you have any ideas for how to implement this feature? -->
For O4 onwards only. Though, it could also be applied retroactively to GW events not in GraceDB already.Alexander PaceAlexander Pacehttps://git.ligo.org/computing/gracedb/server/-/issues/207GraceDB considerations before Oct. 2021 MDC2021-10-05T01:37:24ZAlexander PaceGraceDB considerations before Oct. 2021 MDCI would like to be on the same page and tie up some loose ends before October 2021's MDC event. Specifically, please confirm that pipelines and GWCelery will be using the `gracedb-playground` and `lvalert-playground` infrastructure.
Ad...I would like to be on the same page and tie up some loose ends before October 2021's MDC event. Specifically, please confirm that pipelines and GWCelery will be using the `gracedb-playground` and `lvalert-playground` infrastructure.
Additionally, could pipeline head please confirm which `search`es they will be using for event uploads? I will then confirm that the appropriate LVAert nodes are in place to send messages?
Thanks. I'll add more to this ticket as they come up.
`CWB`, `gstlal`, `MBTAOnline`, `oLIB`, `pycbc`, `spiir`https://git.ligo.org/computing/gracedb/server/-/issues/205Reading a specified number of bytes from the beginning of a streamed file ret...2021-08-11T17:05:20ZLeo P. SingerReading a specified number of bytes from the beginning of a streamed file returns fewer bytes than expectedWhen streaming a file from GraceDB, calls to `fileobj.read(n)` return fewer than `n` bytes. For example, this script:
```python
#!/usr/bin/env python
from ligo.gracedb.rest import GraceDb
client = GraceDb(fail_if_noauth=True)
for i in r...When streaming a file from GraceDB, calls to `fileobj.read(n)` return fewer than `n` bytes. For example, this script:
```python
#!/usr/bin/env python
from ligo.gracedb.rest import GraceDb
client = GraceDb(fail_if_noauth=True)
for i in range(1, 32):
fileobj = client.files('G330564', 'psd.xml.gz')
magic = fileobj.read(i)
print('requested', i, 'got', len(magic))
```
produces the following output:
```
requested 1 got 0
requested 2 got 0
requested 3 got 0
requested 4 got 0
requested 5 got 0
requested 6 got 0
requested 7 got 0
requested 8 got 0
requested 9 got 0
requested 10 got 0
requested 11 got 0
requested 12 got 0
requested 13 got 0
requested 14 got 0
requested 15 got 0
requested 16 got 1
requested 17 got 2
requested 18 got 3
requested 19 got 4
requested 20 got 5
requested 21 got 6
requested 22 got 7
requested 23 got 8
requested 24 got 9
requested 25 got 10
requested 26 got 11
requested 27 got 12
requested 28 got 13
requested 29 got 14
requested 30 got 15
requested 31 got 16
```
I have reproduced this with a variety of versions of gracedb-client and Python and on both macOS and the LIGO-Caltech cluster, which leads me to think that it is due to a server-side change.
The minimum value of `n` for which output starts seems to depend on the file extension: .xml, .fits, and .png files have problems, whereas .log and .json files start producing output right away. @alexander.pace suggests that this may mean that it has to do with MIME type handling.https://git.ligo.org/computing/gracedb/server/-/issues/204Uploading results of targeted GRB/FRB followup searches2023-07-31T15:01:40ZTito Dal CantonUploading results of targeted GRB/FRB followup searchesIn at least two occasions, people have recently requested PyGRB candidates to be uploaded to GraceDB for detchar and PE followup. One difficulty with this is that PyGRB, being a targeted followup search of an existing transient, reports ...In at least two occasions, people have recently requested PyGRB candidates to be uploaded to GraceDB for detchar and PE followup. One difficulty with this is that PyGRB, being a targeted followup search of an existing transient, reports a p-value (false-alarm probability) associated with data around that particular transient, instead of a false-alarm rate as commonly understood in GraceDB land. PyGRB is also a coherent search, which may create some more impedance mismatch in terms of LIGOLW tables. A similar issue would also arise for any X-pipeline candidate (also from targeted GRB/FRB followup searches), although we have not had any particularly interesting X-pipeline candidates yet.
@alexander.pace suggested opening this issue, but I am not entirely sure if this is a PyGRB/X-pipeline problem, or a GraceDB problem, or maybe more of a schema problem. If we had an interesting continuous-wave or stochastic candidate, for example, would people want to see that in GraceDB as well, and what would the solution be?
Tagging @derek.davis, @francesco-pannarale and @ian-harry.https://git.ligo.org/computing/gracedb/server/-/issues/203Update signoff button is very difficult to click, mouse focus blocked by text2022-02-06T00:22:25ZLeo P. SingerUpdate signoff button is very difficult to click, mouse focus blocked by textIt is very difficult to click the "Update signoff" button because the text seems to steal the mouse focus away from the button itself. Only parts of the button that do not contain text are clickable. See attached screen recording.
![Scr...It is very difficult to click the "Update signoff" button because the text seems to steal the mouse focus away from the button itself. Only parts of the button that do not contain text are clickable. See attached screen recording.
![Screen_Recording_2021-03-01_at_15.24.10](/uploads/88c526533f6c9db39390f5f93de7f648/Screen_Recording_2021-03-01_at_15.24.10.mov)https://git.ligo.org/computing/gracedb/server/-/issues/202Add an obvious way to download images shown in light boxes2022-03-22T18:09:19ZLeo P. SingerAdd an obvious way to download images shown in light boxesThere is no obvious way to download images shown in light boxes. However the images are being displayed, the right-click menu does not give an option to save the image.
Here is a screenshot from Chrome:
![Screen_Shot_2021-01-13_at_08.5...There is no obvious way to download images shown in light boxes. However the images are being displayed, the right-click menu does not give an option to save the image.
Here is a screenshot from Chrome:
![Screen_Shot_2021-01-13_at_08.57.58](/uploads/75a2dc510d8670a8d6d64ef48b49927e/Screen_Shot_2021-01-13_at_08.57.58.png)https://git.ligo.org/computing/gracedb/server/-/issues/201Update O3 public alerts page to point to published catalog2020-11-23T16:55:28ZJonah KannerUpdate O3 public alerts page to point to published catalog@alexander.pace
Here's a suggestion from Beverly Berger to add a pointer to GWTC-2 on the O3 public alerts page.
-jonah
Hi, Jonah.
I had a thought about how to add information on the final resolution of alert triggers to https://grac...@alexander.pace
Here's a suggestion from Beverly Berger to add a pointer to GWTC-2 on the O3 public alerts page.
-jonah
Hi, Jonah.
I had a thought about how to add information on the final resolution of alert triggers to https://gracedb.ligo.org/superevents/public/O3/. I think it would be sufficient to say something like see (relevant table of events in GWOSC) and (section in the catalog paper where the reasons for the final set of events are given).
Beverlyhttps://git.ligo.org/computing/gracedb/server/-/issues/200Proposals and comments for curated event pages2021-09-15T16:11:46ZAlexander PaceProposals and comments for curated event pagesAs the public-facing GWTC-* (curated) event pages are developed, I'll be taking feedback on this ticket before going live. Further background on the curation process can be found here: https://dcc.ligo.org/LIGO-T2000569.
In particular,...As the public-facing GWTC-* (curated) event pages are developed, I'll be taking feedback on this ticket before going live. Further background on the curation process can be found here: https://dcc.ligo.org/LIGO-T2000569.
In particular, I'll be looking for feedback as to how to properly distill all the information that's already in GraceDB in such a way to be digestible and clear for readers outside of the analyst community.
The related OpenProject charge can be found here: https://cbcprojects.ligo.org/projects/gracedb-event-curation/Alexander PaceAlexander Pace2020-11-24