Skip to content

user-specified changes to transient, host, and aperture properties#430

Open
djones1040 wants to merge 4 commits into
mainfrom
djones-host-user-updates
Open

user-specified changes to transient, host, and aperture properties#430
djones1040 wants to merge 4 commits into
mainfrom
djones-host-user-updates

Conversation

@djones1040

Copy link
Copy Markdown
Collaborator

Fixes feature request #428. Adds a new option to the /add/ url where people can specify transient coords or redshifts, host coords or redshifts, and global aperture params. New database migration to support user comments and record which fields have been (most recently) updated by a user. Should probably also record which user did the changes but that's not implemented yet. Once updates have been added, task statuses are reset appropriately and the processing queue is re-triggered.

view of the /add/ page
image

view of the new form
image

Did all the testing I could think of and everything seems to work, though likely one or two bugs still lurking somewhere. Comments/suggestions welcome.

@manning-ncsa

Copy link
Copy Markdown
Collaborator

@djones1040 Please update the changelog like I did in this PR so that it is easy to merge the changelog entries when we publish a new release.

@manning-ncsa

Copy link
Copy Markdown
Collaborator

@djones1040 We should also have a corresponding unit test for this new feature. Take a look at this one I already made for the form that adds transients by definition. You could create a similar class method like test_update_transient_form() for the purpose.

@djones1040

Copy link
Copy Markdown
Collaborator Author

@djones1040 Please update the changelog like I did in this PR so that it is easy to merge the changelog entries when we publish a new release.

fixed

…ransients in the database were not handled properly
@djones1040

Copy link
Copy Markdown
Collaborator Author

@djones1040 We should also have a corresponding unit test for this new feature. Take a look at this one I already made for the form that adds transients by definition. You could create a similar class method like test_update_transient_form() for the purpose.

done, as ModifyTransientTest in test_views.py

@djones1040 djones1040 marked this pull request as ready for review June 28, 2026 07:47
@manning-ncsa

Copy link
Copy Markdown
Collaborator

I'm seeing database transaction errors when I run the test, but they do not cause the new test to fail. In my experience after switching to PostgreSQL this indicates an actual logic error on our part, but since these are unit tests and it is not causing a failure I think we can ignore it until it causes a real problem.

database-1      | 2026-06-28 08:20:44.124 UTC [77] ERROR:  insert or update on table "host_cutout" violates foreign key constraint "host_cutout_transient_id_7c561645_fk_host_transient_id"
database-1      | 2026-06-28 08:20:44.124 UTC [77] DETAIL:  Key (transient_id)=(1) is not present in table "host_transient".
database-1      | 2026-06-28 08:20:44.124 UTC [77] STATEMENT:  COMMIT
app-1           | <Filter: PanSTARRS_g> generated an exception: insert or update on table "host_cutout" violates foreign key constraint "host_cutout_transient_id_7c561645_fk_host_transient_id"
app-1           | DETAIL:  Key (transient_id)=(1) is not present in table "host_transient".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants