Map Gemma 2.0 audit event types for shared-trail read compatibility#1667
Open
ppavlidis wants to merge 1 commit into
Open
Map Gemma 2.0 audit event types for shared-trail read compatibility#1667ppavlidis wants to merge 1 commit into
ppavlidis wants to merge 1 commit into
Conversation
…patibility Gemma 2.0 (frink) and the 1.x line share one audit trail in the production database. 2.0 emits 21 AuditEventType subclasses whose discriminators the 1.x Hibernate mapping doesn't know, so 1.x throws org.hibernate.WrongClassException when it loads a dataset whose trail contains one — e.g. DesignChangeEvent from the composite curation commit broke the experiment page for GSE16035 (id 25717). Add read-compatibility marker classes + AuditEventType.hbm.xml <subclass> entries for those 21 discriminators so the 1.x line resolves them on read. The 1.x code never writes them and they carry no data; each is flattened onto an existing mapped parent (2.0's real hierarchy has extra abstract intermediates that aren't needed just to read). AggregatedSingleDataAddedEvent already existed unmapped — it only needed the hbm entry. Discriminators: DesignChangeEvent, TagAddedEvent, TagRemovedEvent, AnnotationSetEvent, AggregatedSingleDataAddedEvent, DatasetPublishedEvent, DatasetShortNameChangedEvent, PipelineRunEvent, FailedPipelineRunEvent, PipelineBatchCancelledEvent, PipelineBatchClosedEvent, PipelineBatchSubmittedEvent, PreboardedCreatedEvent, PreboardedPromotedEvent, TicketOpenedEvent, TicketAssignedEvent, TicketStateChangedEvent, TicketMetadataChangedEvent, TicketTargetStatusChangedEvent, VectorsReorderedEvent, WorkflowStateChangedEvent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Gemma 2.0 (frink) and the 1.x line share one audit trail in the production database. 2.0 emits 21
AuditEventTypesubclasses whose discriminators the 1.x Hibernate mapping doesn't know, so 1.x throwsorg.hibernate.WrongClassExceptionwhen it loads a dataset whose trail contains one.Live example:
DesignChangeEvent(from the composite curation commit) broke the experiment page for GSE16035 (id 25717):Fix
Add read-compatibility marker classes plus
AuditEventType.hbm.xml<subclass>entries for the 21 discriminators, so the 1.x line resolves them on read.AggregatedSingleDataAddedEventalready existed unmapped — it only needed the hbm entry (the class file is untouched).Scope is exactly
{discriminator values 2.0 writes} − {values the 1.x hbm already maps}(thePreferred*Changedtypes were already covered because 1.x maps their olderChange-spelled discriminator values).Discriminators mapped (21)
DesignChangeEvent,TagAddedEvent,TagRemovedEvent,AnnotationSetEvent,AggregatedSingleDataAddedEvent,DatasetPublishedEvent,DatasetShortNameChangedEvent,PipelineRunEvent,FailedPipelineRunEvent,PipelineBatchCancelledEvent,PipelineBatchClosedEvent,PipelineBatchSubmittedEvent,PreboardedCreatedEvent,PreboardedPromotedEvent,TicketOpenedEvent,TicketAssignedEvent,TicketStateChangedEvent,TicketMetadataChangedEvent,TicketTargetStatusChangedEvent,VectorsReorderedEvent,WorkflowStateChangedEvent.Validation
xmllint); every new discriminator has a matching class file; all parents resolve.AgentProposalEventrows in prod (from the retired skeleton/agent branch — mapped by neither 1.x nor 2.0) were cleaned up directly; those are deliberately not ported.Base branch
Targets
hotfix-1.32.8(unreleased next patch), not the releasedhotfix-1.32.7.