From 468fc6f8af59b7419dfc8499787bd8edb2921b4f Mon Sep 17 00:00:00 2001 From: Quyen Ly Date: Wed, 5 Oct 2022 17:42:40 +0700 Subject: [PATCH 1/2] Start version 4.11.0-SNAPSHOT --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 10d7ad804..c88e79083 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ org.ihtsdo.snomed.release snomed-release-service - 4.10.0 + 4.11.0-SNAPSHOT 11 ${java.version} From 8757a73a135b9aad024bd12e351c466ae3a8a1ad Mon Sep 17 00:00:00 2001 From: --replace-all Date: Thu, 1 Sep 2022 15:59:38 +0700 Subject: [PATCH 2/2] initial commit --- .../core/entity/BuildConfiguration.java | 14 +- .../core/service/InputFileServiceImpl.java | 6 +- .../core/service/ProductService.java | 1 + .../core/service/ProductServiceImpl.java | 17 ++ .../core/service/PublishService.java | 2 + .../core/service/PublishServiceImpl.java | 9 +- .../service/build/Rf2FileExportRunner.java | 191 ++++++++++++++++-- .../InputFilesExistenceCheck.java | 17 +- .../ManifestFileListingHelper.java | 33 ++- .../srs/db/changelog/db.changelog-28.xml | 8 + .../srs/db/changelog/db.changelog-master.xml | 1 + .../ManagedServiceReleaseTestIntegration.java | 91 ++++++++- .../ProductControllerTestIntegration.java | 6 +- .../helper/IntegrationTestHelper.java | 22 +- ...onFrench_PRODUCTION_CH1000195_20170330.zip | Bin 0 -> 3046 bytes .../managedservice/ch_manifest_20161130.xml | 24 +++ .../managedservice/ch_manifest_20171130.xml | 44 ++++ .../expectedoutput/Readme_ch_20171130.txt | 17 ++ ...r2_cRefset_LanguageFull_fr-CH_20171130.txt | 3 + ...Refset_LanguageSnapshot_fr-CH_20171130.txt | 3 + ...Description_Full-en_CH1000195_20171130.txt | 1 + ...ription_Snapshot-en_CH1000195_20171130.txt | 1 + ...escription_Delta-en_CH1000195_20171130.txt | 1 + ..._Relationship_Delta_CH1000195_20171130.txt | 1 + ...dRelationship_Delta_CH1000195_20171130.txt | 1 + .../helper/expected-product-listing.json | 1 + 26 files changed, 481 insertions(+), 34 deletions(-) create mode 100644 src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-28.xml create mode 100644 src/test/resources/SnomedCT_CommonFrench_PRODUCTION_CH1000195_20170330.zip create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/ch_manifest_20161130.xml create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/ch_manifest_20171130.xml create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/Readme_ch_20171130.txt create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageFull_fr-CH_20171130.txt create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageSnapshot_fr-CH_20171130.txt create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Full-en_CH1000195_20171130.txt create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Snapshot-en_CH1000195_20171130.txt create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Description_Delta-en_CH1000195_20171130.txt create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Relationship_Delta_CH1000195_20171130.txt create mode 100644 src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_StatedRelationship_Delta_CH1000195_20171130.txt diff --git a/src/main/java/org/ihtsdo/buildcloud/core/entity/BuildConfiguration.java b/src/main/java/org/ihtsdo/buildcloud/core/entity/BuildConfiguration.java index e4b8e09c2..2a9c83afb 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/entity/BuildConfiguration.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/entity/BuildConfiguration.java @@ -46,9 +46,13 @@ public class BuildConfiguration { @Column(name="previous_published_release") private String previousPublishedPackage; + + @Column(name="additional_previous_published_releases") + private String additionalPreviousPublishedPackages; + @Column(name="rf2_input_files") private String newRF2InputFiles; - + @Type(type="yes_no") @Column(name="just_package") private boolean justPackage = false; @@ -284,6 +288,14 @@ public void setPreviousPublishedPackage(final String previousPublishedPackage) { this.previousPublishedPackage = previousPublishedPackage; } + public String getAdditionalPreviousPublishedPackages() { + return additionalPreviousPublishedPackages; + } + + public void setAdditionalPreviousPublishedPackages(String additionalPreviousPublishedPackages) { + this.additionalPreviousPublishedPackages = additionalPreviousPublishedPackages; + } + public boolean isCreateLegacyIds() { return createLegacyIds; } diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/InputFileServiceImpl.java b/src/main/java/org/ihtsdo/buildcloud/core/service/InputFileServiceImpl.java index d6ec7df7f..d8eebbfc9 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/InputFileServiceImpl.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/InputFileServiceImpl.java @@ -50,9 +50,11 @@ public class InputFileServiceImpl implements InputFileService { private final FileHelper fileHelper; - private static final String SRC_TERM_SERVER = "terminology-server"; + public static final String SRC_TERM_SERVER = "terminology-server"; - private static final String SRC_EXT_MAINTAINED = "externally-maintained"; + public static final String SRC_EXT_MAINTAINED = "externally-maintained"; + + public static final String SRC_EXTERNAL_DEPENDENCY = "external-dependency-package"; @Autowired private InputFileDAO inputFileDAO; diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/ProductService.java b/src/main/java/org/ihtsdo/buildcloud/core/service/ProductService.java index 2b0e90975..154b139d1 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/ProductService.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/ProductService.java @@ -19,6 +19,7 @@ public interface ProductService extends EntityService { String BETA_RELEASE = "betaRelease"; String DAILY_BUILD = "dailyBuild"; String PREVIOUS_PUBLISHED_PACKAGE = "previousPublishedPackage"; + String ADDITIONAL_PREVIOUS_PUBLISHED_PACKAGES = "additionalPreviousPublishedPackages"; String README_END_DATE = "readmeEndDate"; String WORKBENCH_DATA_FIXES_REQUIRED = "workbenchDataFixesRequired"; String INPUT_FILES_FIXES_REQUIRED = "inputFilesFixesRequired"; diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/ProductServiceImpl.java b/src/main/java/org/ihtsdo/buildcloud/core/service/ProductServiceImpl.java index 91451ec9f..2bbefaa5e 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/ProductServiceImpl.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/ProductServiceImpl.java @@ -41,6 +41,8 @@ public class ProductServiceImpl extends EntityServiceImpl implements Pr private static final Logger LOGGER = LoggerFactory.getLogger(ProductServiceImpl.class); + public static final String EXTERNAL_DEPENDENCY_PACKAGE_RELEASE_CENTER = "external_dependency_packages"; + @Autowired private ProductDAO productDAO; @@ -361,6 +363,21 @@ private void updateProductBuildConfiguration(final Map newProper } } + if (newPropertyValues.containsKey(ADDITIONAL_PREVIOUS_PUBLISHED_PACKAGES)) { + final String additionalPackagesStr = newPropertyValues.get(ADDITIONAL_PREVIOUS_PUBLISHED_PACKAGES); + if (StringUtils.isEmpty(additionalPackagesStr)) { + configuration.setAdditionalPreviousPublishedPackages(null); + } else { + String[] additionalPackageArr = Arrays.stream(additionalPackagesStr.split(",")).map(String::trim).toArray(String[]::new); + for (String previousPublishedPackage : additionalPackageArr) { + if (!publishService.exists(EXTERNAL_DEPENDENCY_PACKAGE_RELEASE_CENTER, previousPublishedPackage)) { + throw new ResourceNotFoundException("Could not find the additional previously published package: " + previousPublishedPackage); + } + } + configuration.setAdditionalPreviousPublishedPackages(additionalPackagesStr); + } + } + if (newPropertyValues.containsKey(CUSTOM_REFSET_COMPOSITE_KEYS)) { final Map> refsetCompositeKeyMap = new HashMap<>(); try { diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/PublishService.java b/src/main/java/org/ihtsdo/buildcloud/core/service/PublishService.java index 078ec5fcc..c1e5fc81b 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/PublishService.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/PublishService.java @@ -31,4 +31,6 @@ public interface PublishService { void publishAdHocFile(ReleaseCenter releaseCenter, InputStream inputStream, String originalFilename, long size, boolean publishComponentIds) throws BusinessServiceException; boolean exists(ReleaseCenter releaseCenter, String previouslyPublishedPackageName); + + boolean exists(String releaseCenterKey, String previouslyPublishedPackageName); } diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/PublishServiceImpl.java b/src/main/java/org/ihtsdo/buildcloud/core/service/PublishServiceImpl.java index 4204f0e24..8955bab02 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/PublishServiceImpl.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/PublishServiceImpl.java @@ -333,12 +333,17 @@ public void publishAdHocFile(ReleaseCenter releaseCenter, InputStream inputStrea // For scenarios in UAT and DEV where we use locally published release packages for a new build, // if the file is not found in ${srs.published.releases.storage.path}, then look in ${srs.publish.job.storage.path} public boolean exists(final ReleaseCenter releaseCenter, final String targetFileName) { - String path = s3PathHelper.getPublishedReleasesFilePath(releaseCenter.getBusinessKey(), targetFileName); + return exists(releaseCenter.getBusinessKey(), targetFileName); + } + + @Override + public boolean exists(String releaseCenterKey, String targetFileName) { + String path = s3PathHelper.getPublishedReleasesFilePath(releaseCenterKey, targetFileName); LOGGER.info("Check if published file exists for path {} in storage bucket", path); boolean exists = srsFileHelper.exists(path); if (!exists && !publishedReleasesStoragePath.equals(publishJobStoragePath)) { - path = s3PathHelper.getPublishJobFilePath(releaseCenter.getBusinessKey(), targetFileName); + path = s3PathHelper.getPublishJobFilePath(releaseCenterKey, targetFileName); LOGGER.info("Check if published file exists for path {} in storage bucket", path); exists = srsFileHelper.exists(path); } diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/build/Rf2FileExportRunner.java b/src/main/java/org/ihtsdo/buildcloud/core/service/build/Rf2FileExportRunner.java index 0c24934dd..cad4307d9 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/build/Rf2FileExportRunner.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/build/Rf2FileExportRunner.java @@ -1,34 +1,40 @@ package org.ihtsdo.buildcloud.core.service.build; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.time.Duration; -import java.time.Instant; -import java.util.*; - +import com.amazonaws.AmazonClientException; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.apache.commons.lang3.time.FastDateFormat; import org.ihtsdo.buildcloud.core.dao.BuildDAO; import org.ihtsdo.buildcloud.core.dao.io.AsyncPipedStreamBean; import org.ihtsdo.buildcloud.core.entity.Build; import org.ihtsdo.buildcloud.core.entity.BuildConfiguration; import org.ihtsdo.buildcloud.core.entity.ExtensionConfig; -import org.ihtsdo.buildcloud.core.entity.ReleaseCenter; +import org.ihtsdo.buildcloud.core.manifest.FolderType; +import org.ihtsdo.buildcloud.core.manifest.ListingType; import org.ihtsdo.buildcloud.core.service.build.database.RF2TableExportDAO; import org.ihtsdo.buildcloud.core.service.build.database.RF2TableResults; import org.ihtsdo.buildcloud.core.service.build.database.Rf2FileWriter; import org.ihtsdo.buildcloud.core.service.build.database.map.RF2TableExportDAOImpl; +import org.ihtsdo.buildcloud.core.service.helper.ManifestXmlFileParser; import org.ihtsdo.buildcloud.core.service.helper.StatTimer; +import org.ihtsdo.buildcloud.core.service.validation.precondition.ManifestFileListingHelper; +import org.ihtsdo.otf.rest.exception.BusinessServiceException; +import org.ihtsdo.otf.rest.exception.ResourceNotFoundException; import org.ihtsdo.snomed.util.rf2.schema.ComponentType; import org.ihtsdo.snomed.util.rf2.schema.TableSchema; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import com.amazonaws.AmazonClientException; +import javax.xml.bind.JAXBException; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.time.Duration; +import java.time.Instant; +import java.util.*; import static org.ihtsdo.buildcloud.core.entity.BuildConfiguration.BETA_PREFIX; +import static org.ihtsdo.buildcloud.core.service.InputFileServiceImpl.SRC_EXTERNAL_DEPENDENCY; +import static org.ihtsdo.buildcloud.core.service.ProductServiceImpl.EXTERNAL_DEPENDENCY_PACKAGE_RELEASE_CENTER; import static org.ihtsdo.buildcloud.core.service.build.RF2Constants.*; public class Rf2FileExportRunner { @@ -59,14 +65,15 @@ public final void generateReleaseFiles() throws ReleaseFileGenerationException { boolean success = false; while (!success) { try { - boolean fileFirstTimeRelease = false; + boolean fileFirstTimeRelease; String cleanFileName = thisFile; if (configuration.isBetaRelease()) { cleanFileName = thisFile.substring(1); } - final boolean newFile = newRF2InputFiles.contains(cleanFileName.replace(RF2Constants.SCT2, RF2Constants.INPUT_FILE_PREFIX).replace(RF2Constants.DER2, RF2Constants.INPUT_FILE_PREFIX)); + cleanFileName = cleanFileName.replace(RF2Constants.SCT2, RF2Constants.INPUT_FILE_PREFIX).replace(RF2Constants.DER2, RF2Constants.INPUT_FILE_PREFIX); + final boolean newFile = newRF2InputFiles.contains(cleanFileName); fileFirstTimeRelease = newFile || configuration.isFirstTimeRelease(); - Set includedFilesInNewFile = includedFilesMap.get(cleanFileName.replace(RF2Constants.SCT2, RF2Constants.INPUT_FILE_PREFIX).replace(RF2Constants.DER2, RF2Constants.INPUT_FILE_PREFIX)); + Set includedFilesInNewFile = includedFilesMap.get(cleanFileName); generateReleaseFile(thisFile, configuration.getCustomRefsetCompositeKeys(), fileFirstTimeRelease, includedFilesInNewFile); success = true; } catch (final Exception e) { @@ -74,6 +81,62 @@ public final void generateReleaseFiles() throws ReleaseFileGenerationException { } } } + + // Copy files from the additional previous published releases + final List filesFromAdditionalPackages = getAdditionalFilesFromManifest(); + for ( String thisFile : filesFromAdditionalPackages) { + if (!thisFile.endsWith(RF2Constants.TXT_FILE_EXTENSION)) { + continue; + } + int failureCount = 0; + boolean success = false; + while (!success) { + try { + generateAdditionalReleaseFile(thisFile, configuration.getCustomRefsetCompositeKeys()); + success = true; + } catch (final Exception e) { + failureCount = handleException(e, thisFile, failureCount); + } + } + } + } + + private List getAdditionalFilesFromManifest() { + try (InputStream manifestInputSteam = buildDao.getManifestStream(build)) { + final ManifestXmlFileParser parser = new ManifestXmlFileParser(); + final ListingType listingType = parser.parse(manifestInputSteam); + FolderType folderType = listingType.getFolder(); + List folderTypes = folderType.getFolder(); + boolean isDeltaFolderExistInManifest = false; + for (FolderType subFolderType : folderTypes) { + if (subFolderType.getName().equalsIgnoreCase(RF2Constants.DELTA)) { + isDeltaFolderExistInManifest = true; + break; + } + } + for (FolderType subFolderTypeLevel1 : folderTypes) { + if ((isDeltaFolderExistInManifest && subFolderTypeLevel1.getName().equalsIgnoreCase(RF2Constants.DELTA)) + || (!isDeltaFolderExistInManifest && subFolderTypeLevel1.getName().equalsIgnoreCase(RF2Constants.SNAPSHOT)) ) { + List files = new ArrayList <>(); + for (FolderType subFolderTypeLevel2 : subFolderTypeLevel1.getFolder()) { + files = ManifestFileListingHelper.listAllFiles(subFolderTypeLevel2, SRC_EXTERNAL_DEPENDENCY); + } + // Rename Snapshot to Delta + if (files.size() > 0 && !isDeltaFolderExistInManifest) { + List newFiles = new ArrayList<>(); + for (String file : files) { + newFiles.add(file.replace("Snapshot_", "Delta_").replace("Snapshot-", "Delta-")); + } + return newFiles; + } + return files; + } + } + } catch (ResourceNotFoundException | JAXBException | IOException e) { + LOGGER.error("Failed to parse manifest xml file." + e.getMessage()); + } + + return Collections.emptyList(); } public boolean isInferredRelationshipFileExist(final List rf2DeltaFilesSpecifiedByManifest) throws ReleaseFileGenerationException{ @@ -259,6 +322,97 @@ private void generateReleaseFile(final String transformedDeltaDataFile, final Ma } } + + private void generateAdditionalReleaseFile(final String additionalDeltaDataFile, final Map> customRefsetCompositeKeys) throws BusinessServiceException { + + if (StringUtils.isEmpty(configuration.getAdditionalPreviousPublishedPackages())) { + throw new BusinessServiceException("The additional previous published packages must not be empty"); + } + + String[] additionalPreviousPublishedPackages = Arrays.stream(configuration.getAdditionalPreviousPublishedPackages().split(",")).map(String::trim).toArray(String[]::new); + + LOGGER.info("Generating additional release file using {}", additionalDeltaDataFile); + final StatTimer timer = new StatTimer(getClass()); + final Rf2FileWriter rf2FileWriter = new Rf2FileWriter(configuration.getExcludeRefsetDescriptorMembers(), configuration.getExcludeLanguageRefsetIds()); + RF2TableExportDAO rf2TableDAO = null; + TableSchema tableSchema = null; + try { + + LOGGER.debug("Start: creating table for {}", additionalDeltaDataFile); + rf2TableDAO = new RF2TableExportDAOImpl(customRefsetCompositeKeys); + timer.split(); + + for (String additionalPreviousPublishedPackage : additionalPreviousPublishedPackages) { + InputStream additionalDeltaInputStream = getEquivalentAdditionalPackageInputStream(additionalPreviousPublishedPackage, additionalDeltaDataFile); + if (additionalDeltaInputStream != null) { + tableSchema = rf2TableDAO.createTable(additionalDeltaDataFile, additionalDeltaInputStream, false); + LOGGER.debug("Start: Exporting delta file for {}", tableSchema.getTableName()); + timer.setTargetEntity(tableSchema.getTableName()); + timer.logTimeTaken("Create table"); + + // Export ordered Delta file + final AsyncPipedStreamBean deltaFileAsyncPipe = buildDao.getOutputFileOutputStream(build, additionalDeltaDataFile); + + timer.split(); + RF2TableResults deltaResultSet = rf2TableDAO.selectAllOrdered(tableSchema); + timer.logTimeTaken("Select all ordered"); + timer.split(); + rf2FileWriter.exportDelta(deltaResultSet, tableSchema, deltaFileAsyncPipe.getOutputStream()); + LOGGER.debug("Completed processing delta file for {}, waiting for network", tableSchema.getTableName()); + timer.logTimeTaken("Export delta processing"); + deltaFileAsyncPipe.waitForFinish(); + LOGGER.debug("Finish: Exporting delta file for {}", tableSchema.getTableName()); + break; + } + } + + final String currentFullFileName = constructFullOrSnapshotFilename(additionalDeltaDataFile, RF2Constants.FULL); + final String snapshotOutputFilePath = constructFullOrSnapshotFilename(additionalDeltaDataFile, SNAPSHOT); + for (String additionalPreviousPublishedPackage : additionalPreviousPublishedPackages) { + InputStream additionalFullInputStream = getEquivalentAdditionalPackageInputStream(additionalPreviousPublishedPackage, currentFullFileName); + if (additionalFullInputStream != null) { + tableSchema = rf2TableDAO.createTable(additionalDeltaDataFile, additionalFullInputStream, false); + LOGGER.debug("Start: Exporting Full file for {}", tableSchema.getTableName()); + timer.setTargetEntity(tableSchema.getTableName()); + timer.logTimeTaken("Create table"); + + // Export Full and Snapshot files + final AsyncPipedStreamBean fullFileAsyncPipe = buildDao.getOutputFileOutputStream(build, currentFullFileName); + final AsyncPipedStreamBean snapshotAsyncPipe = buildDao.getOutputFileOutputStream(build, snapshotOutputFilePath); + + timer.split(); + final RF2TableResults fullResultSet = rf2TableDAO.selectAllOrdered(tableSchema); + timer.logTimeTaken("selectAllOrdered"); + + rf2FileWriter.exportFullAndSnapshot(fullResultSet, tableSchema, + build.getConfiguration().getEffectiveTime(), fullFileAsyncPipe.getOutputStream(), + snapshotAsyncPipe.getOutputStream()); + LOGGER.debug("Completed processing full and snapshot files for {}, waiting for network.", tableSchema.getTableName()); + fullFileAsyncPipe.waitForFinish(); + snapshotAsyncPipe.waitForFinish(); + break; + } + } + } catch (final Exception e) { + final String errorMsg = "Failed to generate subsequent full and snapshot release files due to: " + ExceptionUtils.getRootCauseMessage(e); + throw new ReleaseFileGenerationException(errorMsg, e); + } finally { + // Clean up time + if (rf2TableDAO != null) { + try { + rf2TableDAO.closeConnection(); + } catch (final Exception e) { + LOGGER.error("Failure while trying to clean up after {}", tableSchema != null ? tableSchema.getTableName() : "No table yet.", e); + } + } + } + } + + + private InputStream getEquivalentAdditionalPackageInputStream(String additionalPreviousPublishedPackage, String currentAdditionalFileName) throws IOException { + return buildDao.getPublishedFileArchiveEntry(EXTERNAL_DEPENDENCY_PACKAGE_RELEASE_CENTER, getEquivalentAdditionalFile(additionalPreviousPublishedPackage, currentAdditionalFileName), additionalPreviousPublishedPackage); + } + private InputStream getEquivalentInternationalFull(ExtensionConfig extensionConfig, String transformedDeltaDataFile) throws IOException { String equivalentFullFile = getEquivalentInternationalFile(extensionConfig, transformedDeltaDataFile).replace(DELTA, FULL); LOGGER.info("Equivalent full file {}", equivalentFullFile); @@ -287,6 +441,17 @@ private String getEquivalentInternationalFile(ExtensionConfig extensionConfig, S return equivalentBuilder.toString(); } + private String getEquivalentAdditionalFile(String additionalRelease, String additionalFilename) { + additionalFilename = additionalFilename.replace(RF2Constants.TXT_FILE_EXTENSION, ""); + if (configuration.isBetaRelease() && additionalFilename.startsWith(BETA_PREFIX)) { + additionalFilename = additionalFilename.substring(1); + } + String[] splits = additionalFilename.split(RF2Constants.FILE_NAME_SEPARATOR); + splits[splits.length - 1] = RF2BuildUtils.getReleaseDateFromReleasePackage(additionalRelease); + LOGGER.info("The equivalent file for {} in additional package is {}", additionalFilename, String.join(RF2Constants.FILE_NAME_SEPARATOR, splits) + RF2Constants.TXT_FILE_EXTENSION); + return String.join(RF2Constants.FILE_NAME_SEPARATOR, splits) + RF2Constants.TXT_FILE_EXTENSION; + } + private InputStream getPreviousFileStream(final String previousPublishedPackage, final String currentFileName) throws IOException { final InputStream previousFileStream = buildDao.getPublishedFileArchiveEntry(build.getReleaseCenterKey(), currentFileName, previousPublishedPackage); if (previousFileStream == null) { diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/InputFilesExistenceCheck.java b/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/InputFilesExistenceCheck.java index 4f8c6eef4..5ddeb4af9 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/InputFilesExistenceCheck.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/InputFilesExistenceCheck.java @@ -12,12 +12,15 @@ import org.ihtsdo.buildcloud.core.entity.Build; import org.ihtsdo.buildcloud.core.entity.BuildConfiguration; import org.ihtsdo.buildcloud.core.manifest.ListingType; +import org.ihtsdo.buildcloud.core.service.InputFileServiceImpl; import org.ihtsdo.buildcloud.core.service.build.RF2Constants; import org.ihtsdo.buildcloud.core.service.helper.ManifestXmlFileParser; import org.ihtsdo.otf.rest.exception.ResourceNotFoundException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import static org.ihtsdo.buildcloud.core.service.InputFileServiceImpl.SRC_EXTERNAL_DEPENDENCY; + /** * To check all files specified in the manifest file can be derived from the input files. * If not the product process will be halted and the release manager should be alerted. @@ -113,9 +116,10 @@ public void runCheck(final Build build) { private Set resolveExpectedFilesByManifest(final boolean isBeta, final boolean isJustPackaging, final ListingType listingType) { final Set filesExpected = new HashSet<>(); boolean isFirstReadmeFound = false; - //all files specified in the manifest file must be present in the input folder + List filesFromAdditionalPackage = ManifestFileListingHelper.listAllFiles(listingType, SRC_EXTERNAL_DEPENDENCY); + //all files specified in the manifest file must be present in the input folder //apart from the Readme txt file which is generated by SRS. - for ( String fileName : ManifestFileListingHelper.listAllFiles(listingType)) { + for (String fileName : ManifestFileListingHelper.listAllFiles(listingType)) { if (fileName == null || fileName.trim().length() == 0) { continue; } @@ -134,6 +138,9 @@ private Set resolveExpectedFilesByManifest(final boolean isBeta, final b if (fileName.contains(STATED_RELATIONSHIP) || fileName.contains(RELATIONSHIP) ) { continue; } + if (isFromAdditionalRelease(filesFromAdditionalPackage, fileName)) { + continue; + } if (!isJustPackaging) { if (isBeta && fileNamePrefix.startsWith(BuildConfiguration.BETA_PREFIX)) { fileNamePrefix = fileNamePrefix.substring(1); @@ -152,4 +159,10 @@ private Set resolveExpectedFilesByManifest(final boolean isBeta, final b } return filesExpected; } + + private boolean isFromAdditionalRelease(List filesFromAdditionalPackage, String fileName) { + return filesFromAdditionalPackage.size() > 0 && (filesFromAdditionalPackage.contains(fileName) + || (filesFromAdditionalPackage.get(0).contains(RF2Constants.DELTA) && (filesFromAdditionalPackage.contains(fileName.replace(RF2Constants.SNAPSHOT, RF2Constants.DELTA)) || filesFromAdditionalPackage.contains(fileName.replace(RF2Constants.FULL, RF2Constants.DELTA)))) + || (filesFromAdditionalPackage.get(0).contains(RF2Constants.SNAPSHOT) && filesFromAdditionalPackage.contains(fileName.replace(RF2Constants.FULL, RF2Constants.SNAPSHOT)))); + } } diff --git a/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/ManifestFileListingHelper.java b/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/ManifestFileListingHelper.java index 4c83be29a..e1bfe827d 100644 --- a/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/ManifestFileListingHelper.java +++ b/src/main/java/org/ihtsdo/buildcloud/core/service/validation/precondition/ManifestFileListingHelper.java @@ -12,7 +12,20 @@ public class ManifestFileListingHelper { public static List listAllFiles(ListingType listingType) { FolderType rootFolder = listingType.getFolder(); List result = new ArrayList<>(); - getFilesFromCurrentAndSubFolders(rootFolder, result); + getFilesFromCurrentAndSubFolders(rootFolder, result, null); + return result; + } + + public static List listAllFiles(ListingType listingType, String source) { + FolderType rootFolder = listingType.getFolder(); + List result = new ArrayList<>(); + getFilesFromCurrentAndSubFolders(rootFolder, result, source); + return result; + } + + public static List listAllFiles(FolderType folderType, String source) { + List result = new ArrayList<>(); + getFilesFromCurrentAndSubFolders(folderType, result, source); return result; } @@ -21,7 +34,7 @@ public static List getFilesByFolderName(ListingType listingType, String List folderTypes = listingType.getFolder().getFolder(); for (FolderType folderType : folderTypes) { if (folderType.getName().equals(folderName)) { - getFilesFromCurrentAndSubFolders(folderType, result); + getFilesFromCurrentAndSubFolders(folderType, result, null); break; } } @@ -29,16 +42,26 @@ public static List getFilesByFolderName(ListingType listingType, String return result; } - private static void getFilesFromCurrentAndSubFolders(FolderType folder, List filesList) { + private static void getFilesFromCurrentAndSubFolders(FolderType folder, List filesList, String source) { if (folder != null) { if (folder.getFile() != null) { for (FileType fileType : folder.getFile()) { - filesList.add(fileType.getName()); + if (source == null) { + filesList.add(fileType.getName()); + } else if (fileType.getSources() != null){ + for (String s : fileType.getSources().getSource()) { + if (source.equals(s)) { + filesList.add(fileType.getName()); + break; + } + } + } + } } if (folder.getFolder() != null) { for (FolderType subFolder : folder.getFolder()) { - getFilesFromCurrentAndSubFolders(subFolder, filesList); + getFilesFromCurrentAndSubFolders(subFolder, filesList, source); } } } diff --git a/src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-28.xml b/src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-28.xml new file mode 100644 index 000000000..836e6491a --- /dev/null +++ b/src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-28.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-master.xml b/src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-master.xml index c0d9c21d8..63e911872 100644 --- a/src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-master.xml +++ b/src/main/resources/org/ihtsdo/srs/db/changelog/db.changelog-master.xml @@ -39,6 +39,7 @@ + \ No newline at end of file diff --git a/src/test/java/org/ihtsdo/buildcloud/integration/managedservice/ManagedServiceReleaseTestIntegration.java b/src/test/java/org/ihtsdo/buildcloud/integration/managedservice/ManagedServiceReleaseTestIntegration.java index 6cf8b79e1..b08514c9d 100644 --- a/src/test/java/org/ihtsdo/buildcloud/integration/managedservice/ManagedServiceReleaseTestIntegration.java +++ b/src/test/java/org/ihtsdo/buildcloud/integration/managedservice/ManagedServiceReleaseTestIntegration.java @@ -1,13 +1,22 @@ package org.ihtsdo.buildcloud.integration.managedservice; -import java.util.zip.ZipFile; - +import org.ihtsdo.buildcloud.core.entity.ReleaseCenter; +import org.ihtsdo.buildcloud.core.service.ProductService; +import org.ihtsdo.buildcloud.core.service.PublishService; import org.ihtsdo.buildcloud.rest.controller.AbstractControllerTest; import org.ihtsdo.buildcloud.rest.controller.helper.IntegrationTestHelper; -import org.ihtsdo.buildcloud.core.service.ProductService; +import org.ihtsdo.otf.rest.exception.BusinessServiceException; +import org.junit.Assert; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; + +import java.io.InputStream; +import java.util.zip.ZipFile; + +import static org.ihtsdo.buildcloud.core.service.ProductServiceImpl.EXTERNAL_DEPENDENCY_PACKAGE_RELEASE_CENTER; public class ManagedServiceReleaseTestIntegration extends AbstractControllerTest { @@ -15,6 +24,9 @@ public class ManagedServiceReleaseTestIntegration extends AbstractControllerTest private IntegrationTestHelper integrationTestHelper; + @Autowired + private PublishService publishService; + @Override @Before public void setup() throws Exception { @@ -93,6 +105,8 @@ public void testFirstReleaseWithDescriptionsSeparatedByModuleId() throws Excepti integrationTestHelper.setEffectiveTime(effectiveTime); integrationTestHelper.setReadmeHeader("This is the readme for the first release © 2002-{readmeEndDate}.\\nTable of contents:\\n"); integrationTestHelper.setReadmeEndDate("2016"); + integrationTestHelper.setPreviousPublishedPackage(""); + integrationTestHelper.setAdditionalPreviousPublishedPackages(""); Thread.sleep(1000); integrationTestHelper.uploadManifest("ch_manifest.xml", getClass()); @@ -125,6 +139,77 @@ public void testFirstReleaseWithDescriptionsSeparatedByModuleId() throws Excepti final ZipFile zipFile = integrationTestHelper.testZipNameAndEntryNames(buildURL, expectedZipFilename, expectedZipEntries, getClass()); integrationTestHelper.assertZipContents("expectedoutput", zipFile, getClass(), false); } + + @Test + public void testReleaseWithMultiplePreviousReleases() throws Exception { + integrationTestHelper.createTestProductStructure(); + + // Perform first time release + integrationTestHelper.setFirstTimeRelease(true); + integrationTestHelper.setCreateLegacyIds(true); + final String effectiveTime = "20161130"; + integrationTestHelper.setEffectiveTime(effectiveTime); + integrationTestHelper.setReadmeHeader("This is the readme for the first release © 2002-{readmeEndDate}.\\nTable of contents:\\n"); + integrationTestHelper.setReadmeEndDate("2016"); + Thread.sleep(1000); + + integrationTestHelper.uploadManifest("ch_manifest_20161130.xml", getClass()); + + String buildURL = integrationTestHelper.createBuild(effectiveTime); + integrationTestHelper.uploadDeltaInputFile("rel2_Relationship_Delta_CH1000195_" + effectiveTime + ".txt", getClass()); + integrationTestHelper.uploadDeltaInputFile("rel2_StatedRelationship_Delta_CH1000195_" + effectiveTime + ".txt", getClass()); + integrationTestHelper.uploadDeltaInputFile("rel2_Description_Delta-en_CH1000195_" + effectiveTime +".txt", getClass()); + integrationTestHelper.scheduleBuild(buildURL); + integrationTestHelper.waitUntilCompleted(buildURL); + integrationTestHelper.publishOutput(buildURL); + Thread.sleep(1000); + + integrationTestHelper.createReleaseCenter("External Dependency Packages"); + integrationTestHelper.publishFile("/SnomedCT_CommonFrench_PRODUCTION_CH1000195_20170330.zip", getClass(), HttpStatus.CREATED, "/centers/" + "external_dependency_packages"); + + // perform second time release for Swiss extension + integrationTestHelper.createTestProductStructure(); + integrationTestHelper.setFirstTimeRelease(false); + + final String effectiveTime2 = "20171130"; + integrationTestHelper.setEffectiveTime(effectiveTime2); + integrationTestHelper.setBetaRelease(false); + integrationTestHelper.setReadmeEndDate("2017"); + integrationTestHelper.setReadmeHeader("This is the readme for the second release © 2002-{readmeEndDate}.\\nTable of contents:\\n"); + integrationTestHelper.setPreviousPublishedPackage("SnomedCT_ManagedServiceCH_PRODUCTION_CH1000195_20161130.zip"); + integrationTestHelper.setAdditionalPreviousPublishedPackages("SnomedCT_CommonFrench_PRODUCTION_CH1000195_20170330.zip"); + Thread.sleep(1000); + + integrationTestHelper.uploadManifest("ch_manifest_20171130.xml", getClass()); + + buildURL = integrationTestHelper.createBuild(effectiveTime2); + integrationTestHelper.uploadDeltaInputFile("rel2_Relationship_Delta_CH1000195_" + effectiveTime2 + ".txt", getClass()); + integrationTestHelper.uploadDeltaInputFile("rel2_StatedRelationship_Delta_CH1000195_" + effectiveTime2 + ".txt", getClass()); + integrationTestHelper.uploadDeltaInputFile("rel2_Description_Delta-en_CH1000195_" + effectiveTime2 +".txt", getClass()); + integrationTestHelper.scheduleBuild(buildURL); + integrationTestHelper.waitUntilCompleted(buildURL); + + String CH_RELEASE = "SnomedCT_ManagedServiceCH_PRODUCTION_CH1000195_"; + final String expectedZipEntries = CH_RELEASE + effectiveTime2 + "/\n" + + CH_RELEASE + effectiveTime2 + "/Readme_ch_" + effectiveTime2 + ".txt\n" + + CH_RELEASE + effectiveTime2 + "/Snapshot/\n" + + CH_RELEASE + effectiveTime2 + "/Snapshot/Terminology/\n" + + CH_RELEASE + effectiveTime2 + "/Snapshot/Terminology/sct2_Description_Snapshot-en_CH1000195_20171130.txt\n" + + CH_RELEASE + effectiveTime2 + "/Snapshot/Refset/\n" + + CH_RELEASE + effectiveTime2 + "/Snapshot/Refset/Language/\n" + + CH_RELEASE + effectiveTime2 + "/Snapshot/Refset/Language/der2_cRefset_LanguageSnapshot_fr-CH_20171130.txt\n" + + CH_RELEASE + effectiveTime2 + "/Full/\n" + + CH_RELEASE + effectiveTime2 + "/Full/Terminology/\n" + + CH_RELEASE + effectiveTime2 + "/Full/Terminology/sct2_Description_Full-en_CH1000195_20171130.txt\n" + + CH_RELEASE + effectiveTime2 + "/Full/Refset/\n" + + CH_RELEASE + effectiveTime2 + "/Full/Refset/Language/\n" + + CH_RELEASE + effectiveTime2 + "/Full/Refset/Language/der2_cRefset_LanguageFull_fr-CH_20171130.txt"; + + // Assert second release output expectations including additional releases + final String expectedZipFilename = "SnomedCT_ManagedServiceCH_PRODUCTION_CH1000195_" + effectiveTime2 + ".zip"; + final ZipFile zipFile = integrationTestHelper.testZipNameAndEntryNames(buildURL, expectedZipFilename, expectedZipEntries, getClass()); + integrationTestHelper.assertZipContents("expectedoutput", zipFile, getClass(), false); + } private void loadDeltaFilesToInputDirectory(final String releaseDate) throws Exception { diff --git a/src/test/java/org/ihtsdo/buildcloud/rest/controller/ProductControllerTestIntegration.java b/src/test/java/org/ihtsdo/buildcloud/rest/controller/ProductControllerTestIntegration.java index 7a21d6884..67e97cbfd 100644 --- a/src/test/java/org/ihtsdo/buildcloud/rest/controller/ProductControllerTestIntegration.java +++ b/src/test/java/org/ihtsdo/buildcloud/rest/controller/ProductControllerTestIntegration.java @@ -22,13 +22,13 @@ public void setup() throws Exception { @Test public void testPublishUpload() throws Exception { //publish test file - integrationTestHelper.publishFile("/three_readmes.zip", getClass(), HttpStatus.CREATED); + integrationTestHelper.publishFile("/three_readmes.zip", getClass(), HttpStatus.CREATED, null); //publish test file a second time - expect rejection - integrationTestHelper.publishFile("/three_readmes.zip", getClass(),HttpStatus.CONFLICT); + integrationTestHelper.publishFile("/three_readmes.zip", getClass(),HttpStatus.CONFLICT, null); //publish non zip file which we expect to fail - integrationTestHelper.publishFile("/invalid-file-test-defn.xsd", getClass(), HttpStatus.BAD_REQUEST); + integrationTestHelper.publishFile("/invalid-file-test-defn.xsd", getClass(), HttpStatus.BAD_REQUEST, null); } diff --git a/src/test/java/org/ihtsdo/buildcloud/rest/controller/helper/IntegrationTestHelper.java b/src/test/java/org/ihtsdo/buildcloud/rest/controller/helper/IntegrationTestHelper.java index cfd234b43..ec1b48a2b 100644 --- a/src/test/java/org/ihtsdo/buildcloud/rest/controller/helper/IntegrationTestHelper.java +++ b/src/test/java/org/ihtsdo/buildcloud/rest/controller/helper/IntegrationTestHelper.java @@ -143,17 +143,17 @@ public String getInputPrepareReport() throws Exception { return mvcResult.getResponse().getContentAsString(); } - public void publishFile(final String publishFileName, final Class classpathResourceOwner, final HttpStatus expectedStatus) throws Exception { + public void publishFile(final String publishFileName, final Class classpathResourceOwner, final HttpStatus expectedStatus, String centerUrl) throws Exception { final MockMultipartFile publishFile = new MockMultipartFile("file", publishFileName, "text/plain", classpathResourceOwner.getResourceAsStream(publishFileName)); mockMvc.perform( - fileUpload(CENTER_URL + "/published") + fileUpload((centerUrl != null ? centerUrl : CENTER_URL) + "/published") .file(publishFile) .header("Authorization", getBasicDigestHeaderValue()) ) .andDo(print()) .andExpect(status().is(expectedStatus.value())); } - + public String getInputFile(String inputFileName) throws Exception { String getInputFileUrl = getBuildUrl() + "/inputfiles/" + inputFileName; @@ -222,6 +222,10 @@ public void setPreviousPublishedPackage(final String previousPublishedFile) thro setProductProperty("{ " + jsonPair(ProductService.PREVIOUS_PUBLISHED_PACKAGE, previousPublishedFile) + " }"); } + public void setAdditionalPreviousPublishedPackages(final String additionalPreviousPublishedPackages) throws Exception { + setProductProperty("{ " + jsonPair(ProductService.ADDITIONAL_PREVIOUS_PUBLISHED_PACKAGES, additionalPreviousPublishedPackages) + " }"); + } + public void setReadmeHeader(final String readmeHeader) throws Exception { setProductProperty("{ \"readmeHeader\" : \"" + readmeHeader + "\" }"); } @@ -579,4 +583,16 @@ void waitUntilPublishingCompleted(String buildUrl) throws Exception { } } } + + public void createReleaseCenter(String centerShortname) throws Exception { + mockMvc.perform( + post("/centers") + .header("Authorization", getBasicDigestHeaderValue()) + .contentType(MediaType.APPLICATION_JSON) + .content("{ \"shortName\" : \"" + centerShortname + "\" }") + ).andDo(print()) + .andExpect(status().isCreated()) + .andExpect(content().contentType(AbstractControllerTest.APPLICATION_JSON)) + .andReturn(); + } } diff --git a/src/test/resources/SnomedCT_CommonFrench_PRODUCTION_CH1000195_20170330.zip b/src/test/resources/SnomedCT_CommonFrench_PRODUCTION_CH1000195_20170330.zip new file mode 100644 index 0000000000000000000000000000000000000000..6a4469fcb9dc631d249d2d57bbf04b2619a2a3a9 GIT binary patch literal 3046 zcmWIWW@Zs#;Nak3h$>YKWk3QZKz49mer{@tb4a{%er|4lo?B6BUUEi!K#;#nsB?&? zzhAtwhoOOifuW^oype&Sxq-2eDEij)TI-oF1+nx>R~oN@b6HuQCSv)XJ3&f569y0 zb7vfF`JA=|Oz081xh=?r%O&n&?W{HZDz{avy^`dU-{?QTV)fAA$l?N#&70RPsWcMP zEZ~)&b97qgrexKca2>7y#D;p(iD{x$+n=Y*sQd07Da34B3(ydck>#1;rWpB_u_a3#FC?rKT09l4hqbmF)CM z%u6p#Oiv}r!?o15JSDZrC_Why4Dm20!Qvu5tw`6|10^}P_F88#I|{Hq7JH$={C8%c z|M9*lubDo-Y-N1AZbCTQ{kUw&oPtNZ zNW@VgAng{XWQfXZ&cKEVn_UjwbyG?*_!HYD85pm)F-Nyxij>Y$p(rhpJ9ArAmIcrH z$G>pKpO!EF8TB74Dwse?cdyKc-c7)uQ^uQgEy)aAx6+&(l48+;5{t-4vYu4150*Aa z@@OeFEykKuL18~klPM#U2m@*@2&=n5wIC`Wr%nv;MzsOCdiSAU8(_l#eR0< + + + + + + + terminology-server + + + en + + + + + + + + + + + + + diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/ch_manifest_20171130.xml b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/ch_manifest_20171130.xml new file mode 100644 index 000000000..dbd4dfda1 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/ch_manifest_20171130.xml @@ -0,0 +1,44 @@ ++ + + + + + + terminology-server + + + en + + + + + + + + external-dependency-package + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/Readme_ch_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/Readme_ch_20171130.txt new file mode 100644 index 000000000..e84b88ebd --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/Readme_ch_20171130.txt @@ -0,0 +1,17 @@ +This is the readme for the second release © 2002-2017. +Table of contents: + + SnomedCT_ManagedServiceCH_PRODUCTION_CH1000195_20171130 + Snapshot + Terminology + sct2_Description_Snapshot-en_CH1000195_20171130.txt + Refset + Language + der2_cRefset_LanguageSnapshot_fr-CH_20171130.txt + Full + Terminology + sct2_Description_Full-en_CH1000195_20171130.txt + Refset + Language + der2_cRefset_LanguageFull_fr-CH_20171130.txt + Readme_ch_20171130.txt \ No newline at end of file diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageFull_fr-CH_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageFull_fr-CH_20171130.txt new file mode 100644 index 000000000..0d03f8ee8 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageFull_fr-CH_20171130.txt @@ -0,0 +1,3 @@ +id effectiveTime active moduleId refsetId referencedComponentId acceptabilityId +0011d999-87b4-5e18-c4b3-13b727e8911b 20170330 1 722133002 733876003 1028341000241112 900000000000548007 +0013989c-243b-955a-c5a1-eee23134565f 20170330 1 722133002 733876003 1003931000241117 900000000000549004 diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageSnapshot_fr-CH_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageSnapshot_fr-CH_20171130.txt new file mode 100644 index 000000000..0d03f8ee8 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/der2_cRefset_LanguageSnapshot_fr-CH_20171130.txt @@ -0,0 +1,3 @@ +id effectiveTime active moduleId refsetId referencedComponentId acceptabilityId +0011d999-87b4-5e18-c4b3-13b727e8911b 20170330 1 722133002 733876003 1028341000241112 900000000000548007 +0013989c-243b-955a-c5a1-eee23134565f 20170330 1 722133002 733876003 1003931000241117 900000000000549004 diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Full-en_CH1000195_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Full-en_CH1000195_20171130.txt new file mode 100644 index 000000000..b4305ccb6 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Full-en_CH1000195_20171130.txt @@ -0,0 +1 @@ +id effectiveTime active moduleId conceptId languageCode typeId term caseSignificanceId diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Snapshot-en_CH1000195_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Snapshot-en_CH1000195_20171130.txt new file mode 100644 index 000000000..b4305ccb6 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/expectedoutput/sct2_Description_Snapshot-en_CH1000195_20171130.txt @@ -0,0 +1 @@ +id effectiveTime active moduleId conceptId languageCode typeId term caseSignificanceId diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Description_Delta-en_CH1000195_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Description_Delta-en_CH1000195_20171130.txt new file mode 100644 index 000000000..b4305ccb6 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Description_Delta-en_CH1000195_20171130.txt @@ -0,0 +1 @@ +id effectiveTime active moduleId conceptId languageCode typeId term caseSignificanceId diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Relationship_Delta_CH1000195_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Relationship_Delta_CH1000195_20171130.txt new file mode 100644 index 000000000..92e36c609 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_Relationship_Delta_CH1000195_20171130.txt @@ -0,0 +1 @@ +id effectiveTime active moduleId sourceId destinationId relationshipGroup typeId characteristicTypeId modifierId diff --git a/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_StatedRelationship_Delta_CH1000195_20171130.txt b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_StatedRelationship_Delta_CH1000195_20171130.txt new file mode 100644 index 000000000..92e36c609 --- /dev/null +++ b/src/test/resources/org/ihtsdo/buildcloud/integration/managedservice/rel2_StatedRelationship_Delta_CH1000195_20171130.txt @@ -0,0 +1 @@ +id effectiveTime active moduleId sourceId destinationId relationshipGroup typeId characteristicTypeId modifierId diff --git a/src/test/resources/org/ihtsdo/buildcloud/rest/controller/helper/expected-product-listing.json b/src/test/resources/org/ihtsdo/buildcloud/rest/controller/helper/expected-product-listing.json index 6e1cd3532..5d2b45cdf 100644 --- a/src/test/resources/org/ihtsdo/buildcloud/rest/controller/helper/expected-product-listing.json +++ b/src/test/resources/org/ihtsdo/buildcloud/rest/controller/helper/expected-product-listing.json @@ -17,6 +17,7 @@ "firstTimeRelease" : false, "betaRelease" : false, "previousPublishedPackage" : null, + "additionalPreviousPublishedPackages" : null, "newRF2InputFiles" : null, "justPackage" : false, "workbenchDataFixesRequired" : false,