Skip to content

Commit a59e4ef

Browse files
authored
Merge pull request #289 from LabKey/fb_merge_26.3_to_develop
Merge discvr-26.3 to develop
2 parents 79a5deb + 6b70103 commit a59e4ef

8 files changed

Lines changed: 2045 additions & 1161 deletions

File tree

mGAP/src/org/labkey/mgap/mGAPModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void doStartupAfterSpringConfig(ModuleContext moduleContext)
110110

111111
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Connection, "https://code.jquery.com", "https://*.fontawesome.com");
112112
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Style, "https://code.jquery.com", "https://www.gstatic.com");
113-
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Font, "https://*.fontawesome.com", "https://fonts.googleapis.com");
113+
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Font, "https://*.fontawesome.com", "https://fonts.googleapis.com", "https://fonts.gstatic.com");
114114
ContentSecurityPolicyFilter.registerAllowedSources(this.getClass().getName(), Directive.Connection, "https://oss.maxcdn.com");
115115

116116
new PipelineStartup();

mcc/package-lock.json

Lines changed: 2025 additions & 1130 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mcc/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"google-palette": "^1.1.1"
2727
},
2828
"devDependencies": {
29-
"@labkey/build": "^8.4.0",
29+
"@labkey/build": "^9.1.0",
3030
"@types/chart.js": "^2.9.41",
3131
"@types/jexl": "^2.3.4",
3232
"@types/jquery": "^3.5.32",

mcc/resources/etls/snprc-parentage.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
</sourceColumns>
1515
<sourceFilters>
1616
<sourceFilter column="sire" operator="isnonblank" value=""/>
17+
<sourceFilter column="date" operator="isnonblank" value=""/>
1718
</sourceFilters>
1819
</source>
1920
<destination schemaName="study" queryName="parentage" targetOption="truncate" bulkLoad="true">
@@ -41,6 +42,7 @@
4142
</sourceColumns>
4243
<sourceFilters>
4344
<sourceFilter column="dam" operator="isnonblank" value=""/>
45+
<sourceFilter column="date" operator="isnonblank" value=""/>
4446
</sourceFilters>
4547
</source>
4648
<destination schemaName="study" queryName="parentage" targetOption="append" bulkLoad="true">

mcc/resources/queries/study/demographics.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ function onInit(event, helper){
2020
}
2121

2222
function onUpsert(helper, scriptErrors, row, oldRow){
23+
row.objectId = row.objectId || (oldRow ? oldRow.objectId : null) || LABKEY.Utils.generateUUID().toUpperCase()
24+
2325
if (row.status && row.status.match(/Undetermined/)) {
2426
row.status = 'Unknown';
2527
}

mcc/src/org/labkey/mcc/query/TriggerHelper.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.labkey.api.data.ContainerManager;
1111
import org.labkey.api.data.DbSchema;
1212
import org.labkey.api.data.DbSchemaType;
13+
import org.labkey.api.data.DbScope;
1314
import org.labkey.api.data.DbSequence;
1415
import org.labkey.api.data.DbSequenceManager;
1516
import org.labkey.api.data.SimpleFilter;
@@ -29,6 +30,7 @@
2930
import org.labkey.api.security.ValidEmail;
3031
import org.labkey.api.security.permissions.DeletePermission;
3132
import org.labkey.api.settings.AppProps;
33+
import org.labkey.api.study.StudyService;
3234
import org.labkey.api.util.MailHelper;
3335
import org.labkey.api.util.PageFlowUtil;
3436
import org.labkey.api.view.UnauthorizedException;
@@ -45,6 +47,7 @@
4547
import java.util.HashSet;
4648
import java.util.List;
4749
import java.util.Map;
50+
import java.util.Objects;
4851
import java.util.Set;
4952
import java.util.concurrent.atomic.AtomicInteger;
5053
import java.util.stream.Collectors;
@@ -281,16 +284,14 @@ public void possiblySendRabNotification(int reviewerId)
281284
}
282285
}
283286

284-
private TableInfo _mappingTable = null;
285-
286287
private TableInfo getMappingTable()
287288
{
288-
if (_mappingTable == null)
289+
if (_animalMapping == null)
289290
{
290-
_mappingTable = QueryService.get().getUserSchema(_user, _container, MccSchema.NAME).getTable(MccSchema.TABLE_ANIMAL_MAPPING);
291+
_animalMapping = QueryService.get().getUserSchema(_user, _container, MccSchema.NAME).getTable(MccSchema.TABLE_ANIMAL_MAPPING);
291292
}
292293

293-
return _mappingTable;
294+
return _animalMapping;
294295
}
295296

296297
public @Nullable String getMccAlias(String id) {
@@ -299,6 +300,12 @@ private TableInfo getMappingTable()
299300

300301
public int ensureMccAliasExists(Collection<String> rawIds, Map<Object, Object> existingAliases)
301302
{
303+
if (DbScope.getLabKeyScope().getCurrentTransaction() != null && Objects.requireNonNull(DbScope.getLabKeyScope().getCurrentTransaction()).isAborted())
304+
{
305+
_log.info("No active transaction, skipping MCC ensureMccAliasExists()");
306+
return 0;
307+
}
308+
302309
// NOTE: The incoming object can convert numeric IDs from strings to int, so manually convert:
303310
// Also, CaseInsensitiveSet will convert the keys to lowercase, which is problematic for case-sensitive databases
304311
final CaseInsensitiveHashMap<String> idMap = new CaseInsensitiveHashMap<>();
@@ -313,7 +320,8 @@ public int ensureMccAliasExists(Collection<String> rawIds, Map<Object, Object> e
313320
TableInfo ti = getMappingTable();
314321
new TableSelector(ti, PageFlowUtil.set("subjectname", "externalAlias"), filter, null).forEachResults(rs -> {
315322
aliasesFound.add(rs.getString(FieldKey.fromString("subjectname")));
316-
if (ciExistingAliases.containsKey(rs.getString(FieldKey.fromString("subjectname")))) {
323+
if (ciExistingAliases.containsKey(rs.getString(FieldKey.fromString("subjectname"))))
324+
{
317325
if (!ciExistingAliases.get(rs.getString(FieldKey.fromString("subjectname"))).equalsIgnoreCase(rs.getString(FieldKey.fromString("externalAlias"))))
318326
{
319327
_log.error("Incoming MCC alias for: " + rs.getString(FieldKey.fromString("subjectname")) + "(" + ciExistingAliases.get(rs.getString(FieldKey.fromString("subjectname"))) + ") does not match existing: " + rs.getString(FieldKey.fromString("externalAlias")));

primeseq/src/org/labkey/primeseq/pipeline/ExacloudResourceSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public List<ToolParameterDescriptor> getParams()
3838
ToolParameterDescriptor.create("localDisk", "Local Disk (GB)", "Do not change this unless you are certain. Each job requests and uses local space (/mnt/scratch) for temp files. If your job will require more space, consider increasing this.", "ldk-integerfield", new JSONObject(){{
3939
put("minValue", 512);
4040
}}, 1028),
41-
ToolParameterDescriptor.create("localSSD", "Request Nodes With SSD Scratch", "If selected, -C ssdscratch will be added to the submit script, which limits to node with faster SSD scratch space. This might be important for I/O intense jobs.", "checkbox", null, null),
4241
ToolParameterDescriptor.create("gpus", "GPUs", "The number of GPUs requested for this job. If non-zero, the gpu partition will be used.", "ldk-integerfield", null, null),
4342
ToolParameterDescriptor.create("useExperimentalPartition", "Use RHEL 9.6 Partition", "If selected, jobs will be submitted to the experimental rhel96TESTING partition.", "checkbox", null, null)
4443
);

primeseq/src/org/labkey/primeseq/pipeline/SequenceJobResourceAllocator.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,6 @@ public void addExtraSubmitScriptLines(PipelineJob job, RemoteExecutionEngine<?>
330330
possiblyAddQOS(job, engine, lines);
331331
possiblyAddHighIO(job, engine, lines);
332332
possiblyAddDisk(job, engine, lines);
333-
possiblyAddSSD(job, engine, lines);
334333
possiblyAddGpus(job, engine, lines);
335334
possiblyAddExclusive(job, engine, lines);
336335
}
@@ -490,27 +489,6 @@ private void possiblyAddExclusive(PipelineJob job, RemoteExecutionEngine<?> engi
490489
}
491490
}
492491

493-
private void possiblyAddSSD(PipelineJob job, RemoteExecutionEngine<?> engine, List<String> lines)
494-
{
495-
Map<String, String> params = ((HasJobParams)job).getJobParams();
496-
String val = StringUtils.trimToNull(params.get("resourceSettings.resourceSettings.localSSD"));
497-
if (val == null)
498-
{
499-
return;
500-
}
501-
502-
boolean parsed = Boolean.parseBoolean(val);
503-
if (parsed)
504-
{
505-
job.getLogger().info("Requiring local SSD scratch space");
506-
String line = "#SBATCH -C ssdscratch";
507-
if (!lines.contains(line))
508-
{
509-
lines.add(line);
510-
}
511-
}
512-
}
513-
514492
private void possiblyAddQOS(PipelineJob job, RemoteExecutionEngine<?> engine, List<String> lines)
515493
{
516494
//first remove existing

0 commit comments

Comments
 (0)