Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IN_PROGRESS] REST Support for Identity Mapping #132

Closed
wants to merge 134 commits into from

Conversation

rjmurillo
Copy link
Member

@rjmurillo rjmurillo commented Apr 20, 2017

Key scenarios:

  • LINQ statements can use (alias/display name/account name/other) to query an IQueryable<IWorkItem>
  • Returned IWorkItem objects may use an associated identity mapper to "pretty print" identity fields. Examples:
    • Identity displayed as account name (e.g. rimuri)
    • Identity displayed as display name (e.g. Richard Murillo)
    • Identity displayed as disambiguated name (e.g. Richard Murillo <rimuri@microsoft.com>)

Linked to #131

rjmurillo and others added 30 commits January 31, 2017 19:35
Basic scenarios for querying by ID, IDs, or WIQL are implemented. Additional tests are still required to document / verify feature parity between the SOAP and REST implementations
Basic scenarios for querying by ID, IDs, or WIQL are implemented. Additional tests are still required to document / verify feature parity between the SOAP and REST implementations
Set minimum version required for dependent packages.
# Conflicts:
#	src/Qwiq.Core/Qwiq.Core.csproj
# Conflicts:
#	src/Qwiq.Core/Proxies/Rest/WorkItemStoreProxy.cs
#	src/Qwiq.Core/Qwiq.Core.csproj
#	test/Qwiq.Core.Tests/IntegrationTests.cs
…ntials

Add OAuth token support to CredentialsFactory
…endency-versions

Minimum dependency versions
…emapplyrules

Expose ApplyRules on IWorkItem
Extend the `FieldDefinitionAttribute` to allow for a value to be substituted when the source field is empty.

For example, if a non-compulsory field "Priority" is Int32, and the target property type is also Int32, a default value of 0 is placed on the target.

This permits users to create properties with one of two types: Nullable<Int32> or Int32 with the substitute.

Resolves LeCantaloop#112

+semver: minor
…on-during-map

Add support for null substitution
…tfs-credentials

Expose credentials, performance / reliability fixes
 - Microsoft.TeamFoundation.ExtendedClient 15.112.1
Refactor test projects to clean up nuget and general references

Related to LeCantaloop#106
# Conflicts:
#	src/Qwiq.Core/Credentials/CredentialsFactory.cs
#	src/Qwiq.Core/Proxies/Soap/WorkItemStoreProxy.cs
#	src/Qwiq.Core/Proxies/TfsTeamProjectCollectionProxy.cs
#	src/Qwiq.Core/Qwiq.Core.csproj
#	src/Qwiq.Core/WorkItemStoreFactory.cs
#	test/Qwiq.Core.Tests/WorkItemStoreTests.cs
 - Remove additional package sources (to reduce restore time / noise)
 - Prevent user from disabling nuget.org and prevent restoration
- File now includes VS2017 image
- msbuild and vstest use Dev15 tools
- Nuget restore explicitly uses version installed to `.tools` folder after executing `init.ps1`
- Artifact publish settings configured in file using secure values from appveyor.com
- `Performance` test category added to list of test exclusions
- Parallel build execution disabled to avoid build double-writes issues
Update non-shipping ruleset

Suppress CA1014, CA1707, and CA1709 because it's too noisy for our test style.
Projects: Linq, Mapper, Core.Tests, Mocks, Core, Soap, Rest
Integration tests and test common
Rather than hard coding a value in the predicate, the constant reference name is used.
Work item types are now kept in a HashSet<string> to reduce duplication when emitting multiple types in WIQL.
Model specifies a WIT that does not exist in the system. Updating to use an existing WIT.
Tests for Core fields are broken up into three types:
 - Core fields with no known differences
 - Core fields with identities
 - Core fields with date/time

The core fields with no known differences make regular equality assertions between work items produced by each client. It is expected that there are no known differences.

The core fields with identities may have differences between each client: SOAP will produce an identity in either the "Display Name" or "Display Name <account>" depending on ambiguity. REST always produces the latter.  Identities are pushed through a helper class (`IdentityFieldValue`) to parse out the different pieces and compare the resulting `DisplayName` for equality. It is expected that there are no known differences.

The core fields with date/time have differences: SOAP converts the value to the offset provided in the user's preferences, while REST always sends the value as UTC.  Each date value is returned and SOAP values are converted to UTC via the built-in method on the `DateTime` type for equality. It is expected that there are no known differences.
Remove filters for `Benchmark` and `Performance` and add filters for `SOAP` and `REST`.

This will lengthen a CI build as it will execute benchmarks. Estimated delay: 5-10 minutes.  Statistics are printed in the output for the test, and artifacts are produced in the test output folder.
Remove references to Qwiq.Core and Qwiq.Mocks.  Project only contains classes required for BenchmarkDotNet
Remove LegacyJit since we are running 4.7 with Ryu in production
Benchmark created LOTS of work items, which effectively began to test the CPU cache on the machine rather than the actual mapping code.  This is now restricted to creating a single item and performing mapping against it.
The test that wraps the benchmark test now verifies two mapped properties on each model: one with spaces, one without.
@rjmurillo rjmurillo self-assigned this Apr 20, 2017
@rjmurillo rjmurillo mentioned this pull request Apr 20, 2017
@AppVeyorBot
Copy link

1 similar comment
@AppVeyorBot
Copy link

@rjmurillo rjmurillo closed this Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants