Skip to content

Commit

Permalink
Microsoft CDM Release Version Update: 1.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
cdm-publisher committed Nov 1, 2021
1 parent 450257e commit 2d608a2
Show file tree
Hide file tree
Showing 378 changed files with 8,759 additions and 2,173 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<metadata>

<id>Microsoft.CommonDataModel.ObjectModel.Adapter.Adls.All</id>
<version>1.4.0</version>
<version>1.4.1</version>
<description>The ADLS adapter implementation for the Microsoft Common Data Model Object Model.</description>

<authors>Microsoft</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MS-PL AND MS-RL AND Apache-2.0</license>
<license type="expression">MIT</license>
<projectUrl>https://commondatamodel.visualstudio.com/CDM</projectUrl>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<repository url="https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net462</TargetFrameworks>
<version>1.4.0</version>
<version>1.4.1</version>
<Description>The ADLS adapter implementation for the Microsoft Common Data Model Object Model.</Description>

<Authors>Microsoft</Authors>
Expand All @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.29.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.36.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<metadata>

<id>Microsoft.CommonDataModel.ObjectModel.Adapter.Adls</id>
<version>1.4.0</version>
<version>1.4.1</version>
<description>The ADLS adapter implementation for the Microsoft Common Data Model Object Model.</description>

<authors>Microsoft</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MS-PL AND MS-RL AND Apache-2.0</license>
<license type="expression">MIT</license>
<projectUrl>https://commondatamodel.visualstudio.com/CDM</projectUrl>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<repository url="https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net462</TargetFrameworks>
<version>1.4.0-preview1</version>
<version>1.4.1-preview1</version>
<Description>The Syms adapter implementation for the Microsoft Common Data Model Object Model.</Description>

<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<RepositoryUrl>https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel</RepositoryUrl>
<PackageProjectUrl>https://commondatamodel.visualstudio.com/CDM</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>INTERNAL_VSTS</DefineConstants>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<KeyFile>$(MSBuildThisFileDirectory)..\StrongNameKey\35MSSharedLib1024.snk</KeyFile>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\StrongNameKey\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<metadata>

<id>Microsoft.CommonDataModel.ObjectModel.Adapter.Syms</id>
<version>1.4.0-preview1</version>
<version>1.4.1-preview1</version>
<description>The Syms adapter implementation for the Microsoft Common Data Model Object Model.</description>

<authors>Microsoft</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MS-PL AND MS-RL AND Apache-2.0</license>
<license type="expression">MIT</license>
<projectUrl>https://commondatamodel.visualstudio.com/CDM</projectUrl>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<repository url="https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public override string CreateAdapterPath(string corpusPath)
}
}
else if (paths.Length == 4) // 4 level is supported for relationship
{
{
//paths[0] : database name
//paths[1] : filename
if (paths[1].EndsWith(".manifest.cdm.json") && paths[2].Equals("relationships"))
Expand All @@ -249,6 +249,11 @@ public override string CreateCorpusPath(string adapterPath)
{
if (!string.IsNullOrEmpty(adapterPath))
{
if (!adapterPath.EndsWith("/"))
{
adapterPath = adapterPath + "/";
}

var startIndex = "https://".Length;
var endIndex = adapterPath.IndexOf("/", startIndex + 1);

Expand All @@ -257,7 +262,7 @@ public override string CreateCorpusPath(string adapterPath)
throw new Exception($"Unexpected adapter path: {adapterPath}");
}

var hostname = adapterPath.Substring(startIndex, endIndex - startIndex);
var hostname = this.FormatEndpoint(adapterPath.Substring(startIndex, endIndex - startIndex));

if (hostname.Equals(Endpoint))
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net45;net462</TargetFrameworks>
<version>1.4.0-preview1</version>
<version>1.4.1-preview1</version>
<Description>The telemetry implementation for the Microsoft Common Data Model Object Model.</Description>

<Authors>Microsoft</Authors>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<RepositoryUrl>https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel</RepositoryUrl>
<PackageProjectUrl>https://commondatamodel.visualstudio.com/CDM</PackageProjectUrl>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>INTERNAL_VSTS</DefineConstants>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<KeyFile>$(MSBuildThisFileDirectory)..\StrongNameKey\35MSSharedLib1024.snk</KeyFile>
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\StrongNameKey\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<metadata>

<id>Microsoft.CommonDataModel.ObjectModel.Telemetry</id>
<version>1.4.0-preview1</version>
<version>1.4.1-preview1</version>
<description>The telemetry implementation for the Microsoft Common Data Model Object Model.</description>

<authors>Microsoft</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<license type="expression">MS-PL AND MS-RL AND Apache-2.0</license>
<license type="expression">MIT</license>
<projectUrl>https://commondatamodel.visualstudio.com/CDM</projectUrl>
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
<repository url="https://commondatamodel.visualstudio.com/CDM/_git/CDM.ObjectModel" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static class AdlsTestHelper
{
public static void CheckADLSEnvironment()
{
if (String.IsNullOrEmpty(Environment.GetEnvironmentVariable("ADLS_RUNTESTS")))
if (Environment.GetEnvironmentVariable("ADLS_RUNTESTS") != "1")
{
// this will cause tests to appear as "Skipped" in the final result
Assert.Inconclusive("ADLS environment not set up");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ public async Task TestPatternWithNonExistingFolder()
}
}
}, CdmStatusLevel.Warning);

await cdmManifest.FileStatusCheckAsync();
Assert.AreEqual(1, errorLogged);
Assert.AreEqual(cdmManifest.Entities[0].DataPartitions.Count, 0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ namespace Microsoft.CommonDataModel.ObjectModel.Tests.Cdm
using Microsoft.CommonDataModel.ObjectModel.Enums;
using Microsoft.CommonDataModel.ObjectModel.Storage;
using Microsoft.CommonDataModel.ObjectModel.Utilities;
using Microsoft.CommonDataModel.Tools.Processor;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;

Expand All @@ -23,10 +23,15 @@ public class ImportsTests
[TestMethod]
public async Task TestEntityWithMissingImport()
{
var localAdapter = this.CreateStorageAdapterForTest("TestEntityWithMissingImport");
var cdmCorpus = this.CreateTestCorpus(localAdapter);
var expectedLogCodes = new HashSet<CdmLogCode> { CdmLogCode.ErrPersistFileReadFailure, CdmLogCode.WarnResolveImportFailed, CdmLogCode.WarnDocImportNotLoaded };
var cdmCorpus = TestHelper.GetLocalCorpus(testsSubpath, nameof(TestEntityWithMissingImport), expectedCodes: expectedLogCodes);

var doc = await cdmCorpus.FetchObjectAsync<CdmDocumentDefinition>("local:/missingImport.cdm.json");
var resOpt = new ResolveOptions()
{
ImportsLoadStrategy = ImportsLoadStrategy.Load
};

var doc = await cdmCorpus.FetchObjectAsync<CdmDocumentDefinition>("local:/missingImport.cdm.json", null, resOpt);
Assert.IsNotNull(doc);
Assert.AreEqual(1, doc.Imports.Count);
Assert.AreEqual("missing.cdm.json", doc.Imports[0].CorpusPath);
Expand All @@ -36,8 +41,8 @@ public async Task TestEntityWithMissingImport()
[TestMethod]
public async Task TestEntityWithMissingNestedImportsAsync()
{
var localAdapter = this.CreateStorageAdapterForTest("TestEntityWithMissingNestedImportsAsync");
var cdmCorpus = this.CreateTestCorpus(localAdapter);
var expectedLogCodes = new HashSet<CdmLogCode> { CdmLogCode.ErrPersistFileReadFailure, CdmLogCode.WarnResolveImportFailed, CdmLogCode.WarnDocImportNotLoaded };
var cdmCorpus = TestHelper.GetLocalCorpus(testsSubpath, nameof(TestEntityWithMissingNestedImportsAsync), expectedCodes: expectedLogCodes);

var resOpt = new ResolveOptions()
{
Expand All @@ -56,8 +61,8 @@ public async Task TestEntityWithMissingNestedImportsAsync()
[TestMethod]
public async Task TestEntityWithSameImportsAsync()
{
var localAdapter = this.CreateStorageAdapterForTest("TestEntityWithSameImportsAsync");
var cdmCorpus = this.CreateTestCorpus(localAdapter);
var expectedLogCodes = new HashSet<CdmLogCode> { CdmLogCode.ErrPersistFileReadFailure, CdmLogCode.WarnResolveImportFailed, CdmLogCode.WarnDocImportNotLoaded };
var cdmCorpus = TestHelper.GetLocalCorpus(testsSubpath, nameof(TestEntityWithSameImportsAsync), expectedCodes: expectedLogCodes);

var resOpt = new ResolveOptions()
{
Expand All @@ -79,11 +84,11 @@ public async Task TestEntityWithSameImportsAsync()
[TestMethod]
public void TestNonExistingAdapterNamespace()
{
var localAdapter = this.CreateStorageAdapterForTest("TestNonExistingAdapterNamespace");
var cdmCorpus = this.CreateTestCorpus(localAdapter);
var expectedLogCodes = new HashSet<CdmLogCode> { CdmLogCode.ErrPersistFileReadFailure };
var cdmCorpus = TestHelper.GetLocalCorpus(testsSubpath, nameof(TestNonExistingAdapterNamespace), expectedCodes: expectedLogCodes);

// Register it as a 'local' adapter.
cdmCorpus.Storage.Mount("erp", localAdapter);
cdmCorpus.Storage.Mount("erp", new LocalAdapter(TestHelper.GetInputFolderPath(testsSubpath, nameof(TestNonExistingAdapterNamespace))));

// Set local as our default.
cdmCorpus.Storage.DefaultNamespace = "erp";
Expand All @@ -100,8 +105,7 @@ public void TestNonExistingAdapterNamespace()
[TestMethod]
public async Task TestLoadingSameImportsAsync()
{
var localAdapter = this.CreateStorageAdapterForTest("TestLoadingSameImportsAsync");
var cdmCorpus = this.CreateTestCorpus(localAdapter);
var cdmCorpus = TestHelper.GetLocalCorpus(testsSubpath, nameof(TestLoadingSameImportsAsync));

var resOpt = new ResolveOptions()
{
Expand Down Expand Up @@ -130,8 +134,8 @@ public async Task TestLoadingSameImportsAsync()
[TestMethod]
public async Task TestLoadingSameMissingImportsAsync()
{
var localAdapter = this.CreateStorageAdapterForTest("TestLoadingSameMissingImportsAsync");
var cdmCorpus = this.CreateTestCorpus(localAdapter);
var expectedLogCodes = new HashSet<CdmLogCode> { CdmLogCode.ErrPersistFileReadFailure, CdmLogCode.WarnResolveImportFailed, CdmLogCode.WarnDocImportNotLoaded };
var cdmCorpus = TestHelper.GetLocalCorpus(testsSubpath, nameof(TestLoadingSameMissingImportsAsync), expectedCodes: expectedLogCodes);

var resOpt = new ResolveOptions()
{
Expand Down Expand Up @@ -159,8 +163,7 @@ public async Task TestLoadingSameMissingImportsAsync()
[TestMethod]
public async Task TestLoadingAlreadyPresentImportsAsync()
{
var localAdapter = this.CreateStorageAdapterForTest("TestLoadingAlreadyPresentImportsAsync");
var cdmCorpus = this.CreateTestCorpus(localAdapter);
var cdmCorpus = TestHelper.GetLocalCorpus(testsSubpath, nameof(TestLoadingAlreadyPresentImportsAsync));

var resOpt = new ResolveOptions()
{
Expand Down Expand Up @@ -208,25 +211,5 @@ public async Task TestPrioritizingImportsAfterEdit()
Assert.AreEqual(1, document.Imports.Count);
Assert.AreEqual(2, document.ImportPriorities.ImportPriority.Count);
}

private CdmCorpusDefinition CreateTestCorpus(StorageAdapter adapter)
{
var cdmCorpus = new CdmCorpusDefinition();
cdmCorpus.SetEventCallback(new EventCallback { Invoke = CommonDataModelLoader.ConsoleStatusReport }, CdmStatusLevel.Warning);
cdmCorpus.Storage.Mount("local", adapter);
cdmCorpus.Storage.DefaultNamespace = "local";

return cdmCorpus;
}

/// <summary>
/// Creates a storage adapter used to retrieve input files associated with test.
/// </summary>
/// <param name="testName">The name of the test we should retrieve input files for.</param>
/// <returns>The storage adapter to be used by the named test method.</returns>
private StorageAdapter CreateStorageAdapterForTest(string testName)
{
return new LocalAdapter(TestHelper.GetInputFolderPath(testsSubpath, testName));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void TestMinimum()
{
string testName = "TestMinimum";

CdmCorpusDefinition corpus = ProjectionTestUtils.GetLocalCorpus(testsSubpath, testName);
CdmCorpusDefinition corpus = TestHelper.GetLocalCorpus(testsSubpath, testName);
corpus.SetEventCallback(new EventCallback
{
Invoke = (CdmStatusLevel statusLevel, string message) =>
Expand All @@ -57,7 +57,7 @@ public void TestMaximum()
{
string testName = "TestMaximum";

CdmCorpusDefinition corpus = ProjectionTestUtils.GetLocalCorpus(testsSubpath, testName);
CdmCorpusDefinition corpus = TestHelper.GetLocalCorpus(testsSubpath, testName);
corpus.SetEventCallback(new EventCallback
{
Invoke = (CdmStatusLevel statusLevel, string message) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public async Task TestAllOperations()
{
string testName = "TestAllOperations";
string entityName = testName;
CdmCorpusDefinition corpus = ProjectionTestUtils.GetLocalCorpus(testsSubpath, testName);
CdmCorpusDefinition corpus = TestHelper.GetLocalCorpus(testsSubpath, testName);
corpus.SetEventCallback(new EventCallback
{
Invoke = (CdmStatusLevel statusLevel, string message) =>
Expand Down
Loading

0 comments on commit 2d608a2

Please sign in to comment.