Skip to content

[BI-2806] Route Experiments using trialDbId, use trialDbId to get metadata#466

Open
jloux-brapi wants to merge 1 commit into
epic/BI-2862from
feature/BI-2806
Open

[BI-2806] Route Experiments using trialDbId, use trialDbId to get metadata#466
jloux-brapi wants to merge 1 commit into
epic/BI-2862from
feature/BI-2806

Conversation

@jloux-brapi

@jloux-brapi jloux-brapi commented May 6, 2026

Copy link
Copy Markdown
Contributor

Description

Story: BI-2806

These changes support the removal of BrAPITrials from the ProgramCache.

The Experiment table will now route experiments using their BrAPITrialDbId, and the metadata grab associated will also use the BrAPITrialDbId.

Dependencies

bi-api PR

Testing

Regression on just about anything Experiment related, including:

  • Experiment creation
  • Experiment deletion
  • Experiment updates
  • Experiment Collaborator checks
  • Experiment viewing
  • Dataset viewing
  • Dataset creation
  • Dataset appending

Verify there are no log messages related to caching trials for a program by looking at logs once above tests have been completed.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth
  • I have run SiteImprove on pages impacted by changes

@humsika humsika left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to me.

v-if="downloadModalActive"
v-bind:experiment="downloadExperiment"
v-bind:modal-title="downloadModalTitle"
v-bind:trial-id="downloadTrialId"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The endpoint GET /experiments/{experimentId}/export was updated to expect trialDbId for experimentId but the table modal still passes in the DeltaBreed UUID so exporting an experiment from the Experiments list download links will result in a not found error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I think I forgot to test that feature. I will fix this.


export class ExperimentService {

static async getSingleExperiment(programId: string, experimentId: string, stats: boolean): Promise<Result<Error, Trial>> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonder if we should rename experimentId to trialId in these service and DAO methods to make it more clear which id is expected?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, altho functionally I kind of think they largely mean the same thing as of these changes.

>
<b-table-column label="Title" field="name" cell-class="fixed-width-wrapped" sortable v-slot="props" :th-attrs="(column) => ({scope:'col'})" searchable>
<router-link v-bind:to="{name: 'experiment_dataset', params: {datasetId: getDefaultDataset(props.row.data).id, programId: activeProgram.id, experimentId: BrAPIUtils.getBreedingInsightId(props.row.data.externalReferences,'/trials')}}">
<router-link v-bind:to="{name: 'experiment_dataset', params: {datasetId: getDefaultDataset(props.row.data).id, programId: activeProgram.id, experimentId: props.row.data.trialDbId}}">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also change the id that is passed to GET /experiments/{experimentId}/collaborators to trialId but existing records in the experiment_program_user_role table will have the deltabreed experiment UUID rather than the trialId stored in experiment_id. It looks like the only records in prod are in a test program so it may not be an issue as any new collaborators would be stored with the trialId. If we did have to do anything, I think it should go in a new card.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants