Skip to content

Commit

Permalink
Merge pull request #1006 from apetkau/hotfix/deprecated-analysis-states
Browse files Browse the repository at this point in the history
Hotfix/deprecated analysis states
  • Loading branch information
tom114 authored May 20, 2021
2 parents f50d8d1 + b55f5be commit 7dfb548
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Changes
* [UI/REST]: Improved querying performance of metadata for line list and REST API.
* [UI]: Complete upgrade of project settings to use Ant Design.
* [Developer]: Removing many unnecessary files from the `.war` file build to reduce build size.
* [UI]: Fixed issue where analyses page was not displaying for some IRIDA instances due to deprecated analysis states in their audit tables.

20.09 to 21.01
--------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ public enum AnalysisState {
*/
NEW("NEW"),

/**
* Occurs when an analysis is downloading remote files
* @deprecated This is no longer a valid state. This must still exist in IRIDA
* in cases where this state has been recored in the audit tables.
*/
@Deprecated(since = "0.17.0")
DOWNLOADING("DOWNLOADING"),

/**
* Occurs when an analysis has completed downloading remote files
* @deprecated This is no longer a valid state. This must still exist in IRIDA
* in cases where this state has been recored in the audit tables.
*/
@Deprecated(since = "0.17.0")
FINISHED_DOWNLOADING("FINISHED_DOWNLOADING"),

/**
* Occurs when an analysis is starting to be submitted.
*/
Expand Down
8 changes: 7 additions & 1 deletion src/main/resources/i18n/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1414,6 +1414,12 @@ analysis.page.admin.title=All Analyses
analysis.btn.filter=Filter Analysis
analysis.select.all=All
analysis.state.NEW=Queued

# These two states are deprecated but are required in order to handle situations where
# audit tables from old analyses still have these states.
analysis.state.DOWNLOADING=Downloading
analysis.state.FINISHED_DOWNLOADING=Finished downloading

analysis.state.PREPARING=Preparing
analysis.state.PREPARED=Prepared
analysis.state.SUBMITTED=Submitted
Expand Down Expand Up @@ -2534,4 +2540,4 @@ ChartTypeButtons.columnChart=Column Chart
# SimpleRadioButtonGroup Component #
# ========================================================================================== #
SimpleRadioButtonGroup.yes=Yes
SimpleRadioButtonGroup.no=No
SimpleRadioButtonGroup.no=No
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,17 @@ public void testGetAnalysisStates() throws Exception {
mockMvc.perform(get("/ajax/analyses/states").principal(mock(Principal.class)))
.andExpect(status().isOk())
.andExpect(jsonPath("$[0].value", is("NEW")))
.andExpect(jsonPath("$[1].value", is("PREPARING")))
.andExpect(jsonPath("$[2].value", is("PREPARED")))
.andExpect(jsonPath("$[3].value", is("SUBMITTING")))
.andExpect(jsonPath("$[4].value", is("RUNNING")))
.andExpect(jsonPath("$[5].value", is("FINISHED_RUNNING")))
.andExpect(jsonPath("$[6].value", is("COMPLETING")))
.andExpect(jsonPath("$[7].value", is("COMPLETED")))
.andExpect(jsonPath("$[8].value", is("TRANSFERRED")))
.andExpect(jsonPath("$[9].value", is("POST_PROCESSING")));
.andExpect(jsonPath("$[1].value", is("DOWNLOADING")))
.andExpect(jsonPath("$[2].value", is("FINISHED_DOWNLOADING")))
.andExpect(jsonPath("$[3].value", is("PREPARING")))
.andExpect(jsonPath("$[4].value", is("PREPARED")))
.andExpect(jsonPath("$[5].value", is("SUBMITTING")))
.andExpect(jsonPath("$[6].value", is("RUNNING")))
.andExpect(jsonPath("$[7].value", is("FINISHED_RUNNING")))
.andExpect(jsonPath("$[8].value", is("COMPLETING")))
.andExpect(jsonPath("$[9].value", is("COMPLETED")))
.andExpect(jsonPath("$[10].value", is("TRANSFERRED")))
.andExpect(jsonPath("$[11].value", is("POST_PROCESSING")));
}

@Test
Expand Down

0 comments on commit 7dfb548

Please sign in to comment.