Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@

announcements/module.properties -text
announcements/resources/schemas/comm.xml -text
announcements/resources/schemas/dbscripts/postgresql/comm-18.10-18.20.sql -text
announcements/resources/schemas/dbscripts/postgresql/comm-create.sql -text
announcements/resources/schemas/dbscripts/postgresql/comm-drop.sql -text
announcements/resources/schemas/dbscripts/sqlserver/comm-18.10-18.20.sql -text
announcements/resources/schemas/dbscripts/sqlserver/comm-drop.sql -text
announcements/src/org/labkey/announcements/announcementListLinkBar.jsp -text
announcements/src/org/labkey/announcements/AnnouncementModule.java -text
Expand Down Expand Up @@ -1493,7 +1491,6 @@ api/src/org/labkey/api/util/StringUtilsLabKey.java -text
api/src/org/labkey/api/util/SubstitutionFormat.java -text
api/src/org/labkey/api/util/SystemMaintenance.java -text
api/src/org/labkey/api/util/SystemMaintenanceJob.java -text
api/src/org/labkey/api/util/Taintable.java -text
api/src/org/labkey/api/util/ThumbnailUtil.java -text
api/src/org/labkey/api/util/TimeOnlyDate.java -text
api/src/org/labkey/api/util/UnexpectedException.java -text
Expand Down Expand Up @@ -2154,13 +2151,9 @@ devtools/src/org/labkey/devtools/view/tags.jsp -text
experiment/module.properties -text
experiment/resources/queries/exp/RunGroups/NameOnly.qview.xml -text
experiment/resources/queries/exp/SampleSets/NameOnly.qview.xml -text
experiment/resources/schemas/dbscripts/postgresql/exp-18.10-18.20.sql -text
experiment/resources/schemas/dbscripts/postgresql/exp-18.11-18.20.sql -text
experiment/resources/schemas/dbscripts/postgresql/exp-18.20-18.30.sql -text
experiment/resources/schemas/dbscripts/postgresql/exp-create.sql -text
experiment/resources/schemas/dbscripts/postgresql/exp-drop.sql -text
experiment/resources/schemas/dbscripts/sqlserver/exp-18.10-18.20.sql -text
experiment/resources/schemas/dbscripts/sqlserver/exp-18.11-18.20.sql -text
experiment/resources/schemas/dbscripts/sqlserver/exp-18.20-18.30.sql -text
experiment/resources/schemas/dbscripts/sqlserver/exp-drop.sql -text
experiment/resources/schemas/exp.xml -text
Expand Down Expand Up @@ -2894,12 +2887,10 @@ pipeline/src/org/labkey/pipeline/setup.jsp -text
pipeline/src/org/labkey/pipeline/startPipelineImport.jsp -text
pipeline/src/org/labkey/pipeline/status/DescriptionDisplayColumn.java -text
pipeline/src/org/labkey/pipeline/status/enterprisePipelineAdmin.jsp -text
pipeline/src/org/labkey/pipeline/status/escalateJobFailure.jsp -text
pipeline/src/org/labkey/pipeline/status/FileDisplayColumn.java -text
pipeline/src/org/labkey/pipeline/status/JobDisplayColumn.java -text
pipeline/src/org/labkey/pipeline/status/JobStatusLogView.java -text
pipeline/src/org/labkey/pipeline/status/PipelineQueryView.java -text
pipeline/src/org/labkey/pipeline/status/ProviderButtonBar.java -text
pipeline/src/org/labkey/pipeline/status/StatusController.java -text
pipeline/src/org/labkey/pipeline/status/StatusDataRegion.java -text
pipeline/src/org/labkey/pipeline/trigger/PipelineTriggerManager.java -text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,9 @@ CREATE TABLE comm.Tours

CONSTRAINT PK_ToursId PRIMARY KEY (RowId)
);

/* comm-18.10-18.20.sql */

ALTER TABLE comm.Announcements ADD COLUMN Approved TIMESTAMP NULL;

UPDATE comm.Announcements SET Approved = Created;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,10 @@ CREATE TABLE comm.Tours

CONSTRAINT PK_ToursId PRIMARY KEY (RowId)
);

/* comm-18.10-18.20.sql */

ALTER TABLE comm.Announcements ADD Approved DATETIME NULL;
GO

UPDATE comm.Announcements SET Approved = Created;

This file was deleted.

10 changes: 9 additions & 1 deletion api/src/org/labkey/api/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class Constants
*/
public static double getEarliestUpgradeVersion()
{
return 18.1;
return 18.2;
}

/**
Expand Down Expand Up @@ -77,6 +77,14 @@ public static int getMaxContainers()
return 100_000;
}

/**
* Returns the maximum number of projects supported by the system
*/
public static int getMaxProjects()
{
return 1000;
}

public static Collection<Double> getMajorSchemaVersions()
{
return SCHEMA_VERSIONS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package org.labkey.api.security;

import org.jetbrains.annotations.NotNull;
import org.labkey.api.Constants;
import org.labkey.api.cache.BlockingCache;
import org.labkey.api.cache.CacheLoader;
import org.labkey.api.cache.CacheManager;
Expand All @@ -40,7 +41,7 @@
public class ProjectAndSiteGroupsCache
{
private static final CoreSchema CORE = CoreSchema.getInstance();
private static final BlockingCache<Container, Collection<Integer>> CACHE = CacheManager.getBlockingCache(1000, CacheManager.DAY, "Project Groups", null);
private static final BlockingCache<Container, Collection<Integer>> CACHE = CacheManager.getBlockingCache(Constants.getMaxProjects(), CacheManager.DAY, "Project Groups", null);

private static final CacheLoader<Container, Collection<Integer>> GROUP_LIST_LOADER = (c, argument) -> {
String containerClause = c.isRoot() ? "IS NULL" : "= ?";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -613,4 +613,4 @@ ALTER TABLE core.APIKeys
ADD COLUMN RowId SERIAL,
DROP CONSTRAINT PK_APIKeys,
ADD CONSTRAINT PK_APIKeys PRIMARY KEY (RowId),
ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt);
ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt);
19 changes: 0 additions & 19 deletions core/resources/schemas/dbscripts/postgresql/core-18.10-18.20.sql

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -818,4 +818,4 @@ CREATE TABLE core.APIKeys
ALTER TABLE core.APIKeys ADD RowId INT IDENTITY(1, 1);
ALTER TABLE core.APIKeys DROP CONSTRAINT PK_APIKeys;
ALTER TABLE core.APIKeys ADD CONSTRAINT PK_APIKeys PRIMARY KEY (RowId);
ALTER TABLE core.APIKeys ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt);
ALTER TABLE core.APIKeys ADD CONSTRAINT UQ_CRYPT UNIQUE (Crypt);
19 changes: 0 additions & 19 deletions core/resources/schemas/dbscripts/sqlserver/core-18.10-18.20.sql

This file was deleted.

70 changes: 0 additions & 70 deletions core/src/org/labkey/core/CoreUpgradeCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
*/
package org.labkey.core;

import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.SystemUtils;
import org.apache.log4j.Logger;
import org.labkey.api.data.Container;
import org.labkey.api.data.ContainerManager;
Expand Down Expand Up @@ -45,8 +43,6 @@
import org.labkey.api.security.UserManager;
import org.labkey.api.security.roles.PlatformDeveloperRole;
import org.labkey.api.services.ServiceRegistry;
import org.labkey.api.settings.NetworkDriveProps;
import org.labkey.api.settings.WriteableAppProps;
import org.labkey.api.util.ExceptionUtil;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.core.reports.ExternalScriptEngineDefinitionImpl;
Expand Down Expand Up @@ -89,72 +85,6 @@ public void handleUnknownModules(ModuleContext context)
ModuleLoader.getInstance().handleUnkownModules();
}

/**
* Invoked from 18.10-18.11 to migrate mapped drive settings to an encrypted property store.
*/
@SuppressWarnings({"UnusedDeclaration"})
public void encryptMappedDrivePassword(final ModuleContext context)
{
if (!context.isNewInstall() && SystemUtils.IS_OS_WINDOWS)
{
WritableNetworkProps props = new WritableNetworkProps();

String driveLetter = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_LETTER);
String drivePath = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_PATH);
String user = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_USER);
String password = props.getStringValue(WritableNetworkProps.NETWORK_DRIVE_PASSWORD);

if (StringUtils.isNotBlank(driveLetter) || StringUtils.isNotBlank(drivePath) || StringUtils.isNotBlank(user) || StringUtils.isNotBlank(password))
{
// we won't blow up on upgrade if the encryption key isn't specified but we will drop any
// existing mapped drive settings and force them to re-add them
if (Encryption.isMasterEncryptionPassPhraseSpecified())
{
NetworkDriveProps.setNetworkDriveLetter(driveLetter);
NetworkDriveProps.setNetworkDrivePath(drivePath);
NetworkDriveProps.setNetworkDriveUser(user);
NetworkDriveProps.setNetworkDrivePassword(password);
}
else
{
LOG.warn("Master encryption key not specified, unable to migrate saved network drive settings");
}
// clear out the legacy settings
props.clearNetworkSettings();
props.save(context.getUpgradeUser());
}
}
}

/**
* Helper class to access legacy network settings so we can remove the old API methods immediately
*/
private static class WritableNetworkProps extends WriteableAppProps
{
static final String NETWORK_DRIVE_LETTER = "networkDriveLetter";
static final String NETWORK_DRIVE_PATH = "networkDrivePath";
static final String NETWORK_DRIVE_USER = "networkDriveUser";
static final String NETWORK_DRIVE_PASSWORD = "networkDrivePassword";

public WritableNetworkProps()
{
super(ContainerManager.getRoot());
}

public void clearNetworkSettings()
{
remove(NETWORK_DRIVE_LETTER);
remove(NETWORK_DRIVE_PATH);
remove(NETWORK_DRIVE_USER);
remove(NETWORK_DRIVE_PASSWORD);
}

public String getStringValue(String key)
{
return lookupStringValue(key, "");
}
}

/**
* Invoked from 18.21-18.22
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1210,4 +1210,40 @@ CREATE TABLE exp.Edge
CONSTRAINT FK_Edge_ToLsid_Object FOREIGN KEY (ToLsid) REFERENCES exp.object (objecturi),
CONSTRAINT FK_Edge_RunId_Run FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId),
CONSTRAINT UQ_Edge_FromLsid_ToLsid_RunId UNIQUE (FromLsid, ToLsid, RunId)
);
);

/* exp-18.10-18.20.sql */

ALTER TABLE exp.propertydescriptor
ADD TextExpression varchar(200) NULL;

CREATE TABLE exp.Exclusions
(
RowId SERIAL NOT NULL,
RunId INT NOT NULL,
Comment TEXT NULL,
Created TIMESTAMP NULL,
CreatedBy INT NULL,
Modified TIMESTAMP NULL,
ModifiedBy INT NULL,
CONSTRAINT PK_Exclusion_RowId PRIMARY KEY (RowId),
CONSTRAINT FK_Exclusion_RunId FOREIGN KEY (RunId) REFERENCES exp.ExperimentRun (RowId)
);
CREATE INDEX IX_Exclusion_RunId ON exp.Exclusions(RunId);

CREATE TABLE exp.ExclusionMaps
(
RowId SERIAL NOT NULL,
ExclusionId INT NOT NULL,
DataRowId INT NOT NULL,
Created TIMESTAMP NULL,
CreatedBy INT NULL,
Modified TIMESTAMP NULL,
ModifiedBy INT NULL,
CONSTRAINT PK_ExclusionMap_RowId PRIMARY KEY (RowId),
CONSTRAINT FK_ExclusionMap_ExclusionId FOREIGN KEY (ExclusionId) REFERENCES exp.Exclusions (RowId),
CONSTRAINT UQ_ExclusionMap_ExclusionId_DataId UNIQUE (ExclusionId, DataRowId)
);

ALTER TABLE exp.DomainDescriptor ALTER COLUMN DomainURI TYPE VARCHAR(300);
ALTER TABLE exp.PropertyDescriptor ALTER COLUMN PropertyURI TYPE VARCHAR(300);
Loading