sillsdev / languageforge-lexbox

Lexbox, SIL linguistic data hub
MIT License
7 stars 2 forks source link

Update crdt project list API to show all user projects to allow them to upload #1248

Closed hahn-kev closed 3 days ago

hahn-kev commented 4 days ago

closes #1247

UI to login to a server you aren't logged in to yet image UI for a server you are logged in to with a project selected image

one issue is that admins will only see projects they are members of, but maybe that's ok for uploading? I'm not sure, that will require some thought about how to let them work on an arbitrary project.

github-actions[bot] commented 4 days ago

UI unit Tests

12 tests  ±0   12 :white_check_mark: ±0   0s :stopwatch: ±0s  4 suites ±0    0 :zzz: ±0   1 files   ±0    0 :x: ±0 

Results for commit e1cde72a. ± Comparison against base commit c23a0bc9.

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 4 days ago

C# Unit Tests

90 tests  ±0   90 :white_check_mark: ±0   5s :stopwatch: ±0s 14 suites ±0    0 :zzz: ±0   1 files   ±0    0 :x: ±0 

Results for commit e1cde72a. ± Comparison against base commit c23a0bc9.

:recycle: This comment has been updated with latest results.

myieye commented 3 days ago

I just ran into this, is that interesting? 🤔

It started when I tried to upload my CRDT Sena-3 project to my local Sena-3 project. Now, I can't open the CRDT Sena-3 project.

[fw-lite:local-web-app] fail: Microsoft.EntityFrameworkCore.Query[10100]
[fw-lite:local-web-app]       An exception occurred while iterating over the results of a query for context type 'LcmCrdt.LcmCrdtDbContext'.
[fw-lite:local-web-app]       System.InvalidOperationException: Each parameter in the deserialization constructor on type 'LcmCrdt.Changes.AddSemanticDomainChange' must bind to an object property or field on deserialization. Each parameter name must match with a property or field on the object. Fields are only considered when 'JsonSerializerOptions.IncludeFields' is enabled. The match can be case-insensitive.
[fw-lite:local-web-app]          at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type parentType)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.OnTryReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, Object& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)  
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
[fw-lite:local-web-app]          at SIL.Harmony.Db.EntityConfig.ChangeEntityConfig.DeserializeChange(String json) in D:\code\languageforge-lexbox\backend\harmony\src\SIL.Harmony\Db\EntityConfig\ChangeEntityConfig.cs:line 26
[fw-lite:local-web-app]          at lambda_method240(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.PopulateIncludeCollection[TIncludingEntity,TIncludedEntity](Int32 collectionId, QueryContext queryContext, DbDataReader dbDataReader, SingleQueryResultCoordinator resultCoordinator, Func`3 parentIdentifier, Func`3 outerIdentifier, Func`3 selfIdentifier, IReadOnlyList`1 parentIdentifierValueComparers, IReadOnlyList`1 outerIdentifierValueComparers, IReadOnlyList`1 selfIdentifierValueComparers, Func`5 innerShaper, INavigationBase inverseNavigation, Action`2 fixup, Boolean trackingQuery)
[fw-lite:local-web-app]          at lambda_method244(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
[fw-lite:local-web-app]       System.InvalidOperationException: Each parameter in the deserialization constructor on type 'LcmCrdt.Changes.AddSemanticDomainChange' must bind to an object property or field on deserialization. Each parameter name must match with a property or field on the object. Fields are only considered when 'JsonSerializerOptions.IncludeFields' is enabled. The match can be case-insensitive.
[fw-lite:local-web-app]          at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_ConstructorParameterIncompleteBinding(Type parentType)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectWithParameterizedConstructorConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.OnTryReadAsObject(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, Object& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
[fw-lite:local-web-app]          at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)  
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo)
[fw-lite:local-web-app]          at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options)
[fw-lite:local-web-app]          at SIL.Harmony.Db.EntityConfig.ChangeEntityConfig.DeserializeChange(String json) in D:\code\languageforge-lexbox\backend\harmony\src\SIL.Harmony\Db\EntityConfig\ChangeEntityConfig.cs:line 26
[fw-lite:local-web-app]          at lambda_method240(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.ShaperProcessingExpressionVisitor.PopulateIncludeCollection[TIncludingEntity,TIncludedEntity](Int32 collectionId, QueryContext queryContext, DbDataReader dbDataReader, SingleQueryResultCoordinator resultCoordinator, Func`3 parentIdentifier, Func`3 outerIdentifier, Func`3 selfIdentifier, IReadOnlyList`1 parentIdentifierValueComparers, IReadOnlyList`1 outerIdentifierValueComparers, IReadOnlyList`1 selfIdentifierValueComparers, Func`5 innerShaper, INavigationBase inverseNavigation, Action`2 fixup, Boolean trackingQuery)
[fw-lite:local-web-app]          at lambda_method244(Closure, QueryContext, DbDataReader, ResultContext, SingleQueryResultCoordinator)
[fw-lite:local-web-app]          at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
myieye commented 3 days ago

Created a bug for the stacktrace a posted above https://github.com/sillsdev/languageforge-lexbox/issues/1257