Error trying to administer workflows or add an item to collection with certain workflows (same error)

Describe the bug
In DSpace 7.5, when visiting the /admin/workflow path or trying to add an item via the web interface to items with a certain workflow we receive an error.
To Reproduce
I suspect that this is surfaced by our particular submission workflow set up. I do have a specific error from the logs which I'll paste in later. The same error occurs in both cases. We get an error when we either:

Use the Administer Workflow link in the sidebar. In the main body under "Workflow and Workspace tasks" we get an error message "Error fetching search results".
 Click "New->Item" on the sidebar and select the collection. Under "Your submissions" we get the same error "Error fetching search results".

As far as we can tell the user does have appropriate permissions for these actions.
Expected behavior
The admin should be able to either administer the workflows or add an item depending on the case.
Comments
In both cases we see this error in the logs:
2024-02-13 15:18:49,927 ERROR c08671ec-5516-4e4e-af8a-06f07cf1d375 8a592ba6-1126-4746-bd90-5ca305a7ffbd org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ An exception has occurred (status:500)
java.lang.ClassCastException: class org.dspace.content.Community cannot be cast to class org.dspace.content.Collection (org.dspace.content.Community and org.dspace.content.Collection are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @d3957fe)
	at org.dspace.app.util.SubmissionConfigReader.getCollectionsBySubmissionConfig(SubmissionConfigReader.java:631) ~[dspace-api-7.5.jar:7.5]
	at org.dspace.app.rest.converter.SubmissionDefinitionConverter.convert(SubmissionDefinitionConverter.java:84) ~[classes/:7.5]
	at org.dspace.app.rest.converter.SubmissionDefinitionConverter.convert(SubmissionDefinitionConverter.java:39) ~[classes/:7.5]
	at org.dspace.app.rest.converter.ConverterService.toRest(ConverterService.java:112) ~[classes/:7.5]

In case 2 if we switch the workflow for the collection to our default workflow then the user is able to proceed, so it appears that perhaps this is tied to the particular submission workflow somehow. In this case I'm changing the submission-name in our submission-map from our custom workflow to the default workflow. Concretely here I'm changing from:
    <name-map collection-handle="10066/344" submission-name="hctheses"/>

to
    <name-map collection-handle="10066/344" submission-name="traditional"/>

However, if I leave that the same as it originally was and in the submission-definitions I interchange the values of the name attributes for the traditional and custom submission processes, so now the custom one still has the custom name but the process described by that is now the traditional process, then it still fails, as if it cares explicitly what the name of the process is.
Here I'm leaving
    <name-map collection-handle="10066/344" submission-name="hctheses"/>

But changing
    <submission-process name="hctheses">

to
    <submission-process name="traditional">

and vice-versa, without altering their contents.

@hading : The error you shared implies that you may have an incorrect configuration:
java.lang.ClassCastException: class org.dspace.content.Community cannot be cast to class org.dspace.content.Collection
    at org.dspace.app.util.SubmissionConfigReader.getCollectionsBySubmissionConfig(SubmissionConfigReader.java:631)
``

Looking at that [631 line of code](https://github.com/DSpace/DSpace/blob/dspace-7.5/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java#L631), it appears to be saying that one of your **Collection** configurations is pointing at a **Community**.

In other words, you have a config like this:

```
But the `[handle]` you are pointing at is a `Community` object and not a `Collection`.
I think this isn't a bug but a misconfiguration.

Thanks Tim.
Here's the item in the wild: https://scholarship.tricolib.brynmawr.edu/handle/10066/344. It certainly appears to be a collection.
Also if it were not, why would I be able to change the submission name attribute to a different submission process without changing the handle and have it start working?
The submission workflows are migrated from earlier DSpace versions, so I had thought perhaps there was something there, especially as we did have to fix up some step definitions.
Also I'd kind of argue that code that is trying to do a cast that through some circumstances, intended or not, it's not going to be able to do is a bug, so that's why I reported it even though it could ultimately turn out to be a configuration issue. Additionally while searching for info about it there was another issue that was at least superficially similar https://github.com/DSpace/DSpace/issues/8985 that involves a class cast failing that had its roots in how handles were working (incidentally I tried some of the variations on versioning/handles in that ticket as well with no success).
Thanks,
Howard

@hading : Based on my reading of the code in this area, I don't see how it's possible for that error to occur without the Handle somehow resolving to a Community.  Take a look at the code where this occurs and you'll see it's reading every <name-map> entry of the form:
<name-map collection-handle="[handle]" submission-name="[submission-form]"/>

Then it's taking the [handle] and resolving it.  It's obviously supposed to be a Collection, but the error is saying that one of your <name-map> entries appears to resolve to a Community??  Are you sure that the error is specific to the object with Handle 10066/344?
I do agree with you that logically the error handling in the code could be improved.  I was just trying to point out that this error message appears to be saying it has encountered a Handle to a Community when it expected to find a Collection.
I'm a bit confused then by this entire description. It seems like some information must be missing, cause I don't understand myself how a Collection with Handle 10066/344 would somehow resolve to a Community object in that area of the code.
You may want to investigate further to see if there are prior errors in your logs that provide more clues... or see if you can narrow down the problem to a single Collection or a single configuration.

@hading : For what it's worth, I cannot reproduce this issue locally on my development instance starting with a fresh configuration & simply adding a new form for one Collection.  I've also not yet heard of this behavior at any other institution.
It almost seems like behavior caused by a customization on your end or an unexpected configuration.   But, if I were in your shoes, I'd recommend looking for other errors in logs.  Or check to see if it impacts every Collection.  Or even try temporarily reverting all your custom submission configs and start with a "fresh" item-submission.xml and submission-forms.xml and slowly adding your customizations back in to see when it fails.
Basically, I think we're missing something here. None of this makes sense logically from what I know about the DSpace codebase.  It might still be a bug, but I don't have enough information to reproduce this in order to figure out why this would be occurring.

This is probably a tangent, but I recalled running into a problem when there was a mapping configured with a Community handle.  FWIW my patch is:
diff --git a/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java b/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java
index<PHONE_NUMBER>..35399fba4e 100644
--- a/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java
+++ b/dspace-api/src/main/java/org/dspace/app/util/SubmissionConfigReader.java
@@ -22,6 +22,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.Logger;
import org.dspace.content.Collection;
import org.dspace.content.DSpaceObject;
+import org.dspace.core.Constants;
import org.dspace.core.Context;
import org.dspace.handle.factory.HandleServiceFactory;
import org.dspace.services.factory.DSpaceServicesFactory;
@@ -628,7 +629,12 @@ public class SubmissionConfigReader {
DSpaceObject result = HandleServiceFactory.getInstance().getHandleService()
.resolveToObject(context, handle);
if (result != null) {

                   results.add((Collection) result);

                   if (!(result instanceof Collection)) {

                       log.error("{} is a {}, not a Collection",

                               handle, Constants.typeText[result.getType()]);

                   } else {

                       results.add((Collection) result);

                   }
               }
           }
       }

It doesn't fix the problem, but it does at least tell one where the problem is.


Tranfering of tokens between the addresses generated by Eth-lightwallet?

Hi,
I have a question and hoping that you could help. I am using eth lightwallet, I have a token contract deployed on my private ethereum. I have created 3 addresses in the HD wallet. Now when i transfer tokens from my coinbase address (totalSupply = 10000), i can see the transaction is mined and token are transfered from coinbase => 1 address in HD wallet. Now as i said, there are 3 addresses in HD wallet, can i transfer tokens from 1 HD wallet address => 2 HD wallet address? in this case, 1 address will be signer? Could you give me any pointer so i can look into? Thanks in advance
/Rakesh

Hi @betheone5, yes you should be able to send tokens from one lightwallet address to another. You'll have to have some Ether in that address. Since lightwallet is a low-level library there is no support for tokens in the library itself, you need to interface with the token contract using web3 and something like the Hooked Web3 provider in the example.


required package missing block-stream

while installing I get an error about missing module: block-stream
error does not resolve by installing the missing module locally.
but it does resolve by installing the missing module globally.
Either it should be packed in or specified as a peer dependency.
error:
><EMAIL_ADDRESS>install /Users/project/node_modules/sleep
> node-gyp rebuild

gyp ERR!  System Darwin 16.0.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/project/node_modules/sleep
gyp ERR! node -v v6.5.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
npm ERR! node v6.5.0
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE

using the latest Node v6 and npm v3

If you would actually read the message you would see it has nothing to do with this module:
gyp ERR! This is a bug in `node-gyp`.
gyp ERR! Try to update node-gyp and file an Issue if it does not help:
gyp ERR!     <https://github.com/nodejs/node-gyp/issues>

oh oh... my bad 👍


tests: automatic platform tests on Azure

How to categorize this PR?

/kind test
/area os
/os garden-linux
What this PR does / why we need it:
Enables automatic platform tests on Azure for the nightly builds.
Special notes for your reviewer:
Once merged, the trust relationship of the OIDC configuration in Azure needs to be reviewed.
Release note:

- tests: automatic platform tests on Azure

/invite @nkraetzschmar @Vincinator


[stable/grafana] enable UNIQUE_FILENAMES variable options for kiwigrid/k8s-sidecar

Is this a new chart

NOTE: We're experiencing a high volume of PRs to this repo and reviews will be delayed. Please host your own chart repository and submit your repository to the Helm Hub instead of this repo to make them discoverable to the community. Here is how to submit new chart repositories to the Helm Hub.

What this PR does / why we need it:
@zanhsieh, @rtluckie, @maorfr
As detailed in #23397, if many teams are creating Grafana dashboards it is quite easy to have filename collisions in the import directory of grafana. This allows setting the UNIQUE_FILENAMES environment variable in kiwigrid/k8s-sidecar to address the problem.
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #23397

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[x] DCO signed
[x] Chart Version bumped
[x] Variables are documented in the README.md
[x] Title of the PR starts with chart name (e.g. [stable/mychartname])

/assign @zanhsieh
I believe this is ready to go. Please let me know if I need to do anything more.

/ok-to-test

@spykermj
Could you also review why below stable/grafana/Chart.yaml still conflict?

@spykermj
Could you also review why below stable/grafana/Chart.yaml still conflict?

@zanhsieh, I've resolved the conflict.

/lgtm

/retest
I'm struggling to understand the failure reason, maybe it was transient?

@zanhsieh, I'm struggling to understand why the pull-charts-e2e job is failing.
This section from the log seems to be most informative, but I cannot see an actual reason for the failure.
I0801 17:26:58.546] E0801 17:26:58.291470     437 portforward.go:372] error copying from remote stream to local connection: readfrom tcp4 <IP_ADDRESS>:37585-><IP_ADDRESS>:40996: write tcp4 <IP_ADDRESS>:37585-><IP_ADDRESS>:40996: write: broken pipe
I0801 17:26:59.162] deployment "grafana-7mzmkvlm28" successfully rolled out
I0801 17:26:59.915] RUNNING: grafana-7mzmkvlm28-test
I0801 17:27:02.909] FAILED: grafana-7mzmkvlm28-test, run `kubectl logs grafana-7mzmkvlm28-test --namespace grafana-presubmit-23399-1289613144506765312-7mzmkvlm28` for more info
I0801 17:27:02.948] Error: 1 test(s) failed
I0801 17:27:02.949] ========================================================================================================================
I0801 17:27:02.949] ........................................................................................................................
I0801 17:27:02.949] ==> Events of namespace grafana-presubmit-23399-1289613144506765312-7mzmkvlm28

Any ideas what I need to do to get it to pass?

/test pull-charts-e2e

/lgtm

@zanhsieh, I have confirmed that the "Test Health" test failure I'm getting is not actually introduced by my change. I reset my branch to upstream/master, then only bumped the chart version and "Test Health" failed in the pull-charts-e2e job.
How can I get the pull-charts-e2e to pass?

/test pull-charts-e2e

/lgtm


Windshield effects - dirt/scratches/ice/fingerprinst not shown

Windshield effects not working - Right is legacy - left is color fix branch.  There should be 4 textures used for the effects, emissive, detailed albedo, detailed comp, detailed normal.

.

this is fixed. in current build
7906b2d


Please consider making a release

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Environment

OS:
Version:

Additional context
Add any other context about the problem here.

Psst is not in a state we're happy with to create an official release. Please use the issue tracker properly. This is not a bug, and do not create empty issues.


(regression?) Possible inconsistent behavior with formatError

Just noticed a possible regression.
If I provide a "no-op" for formatError as such:
formatError: error => error

The response includes the entire error object.
However, if I completely omit formatError, the response includes a simple object containing message.  This seems weird, like a mistake.  Is this a regression?  I can provide more data if needed, but it's pretty easy to reproduce haha at least for me

Did it do something different before? We've always just used the default formatError function from the graphql package. In any case I would suggest always explicitly providing one if you care about exactly what fields are on there.
Also, which version are you upgrading from?

Before it looked like it called graphql.formatError BEFORE calling the formatError hook on apollo.  It appeared to pass the result from graphql.formatError as the param to apollo.formatError.


Download dependencies on runtime

Library: https://github.com/Vankka/DependencyDownload
Example usage: https://github.com/plan-player-analytics/Plan/blob/95a20b54a3fc85992436b817b9087c7ef88b2c1c/Plan/common/src/main/java/com/djrapitops/plan/delivery/webserver/configuration/IpAllowListMatcher.java#L72-L83

Used https://github.com/Byteflux/libby instead btw


blog: using mongodb with node-red

Description
### This PR  is not yet ready for review

Related Issue(s)

Checklist

[ ] I have read the contribution guidelines
[ ] I have considered the performance impact of these changes
[ ] Suitable unit/system level tests have been added and they pass
[ ] Documentation has been updated

PR  is not yet ready for review


API review: Rename LifecycleKind to ServiceLifetime

I can do this as part of the ServiceDescriptor change, its going to touch most of the same code in all the repo's


how to finetune with different alphabets

Hi, you just need to change the alphabets.py to the alphabets you want to use.


Merge pull request #17665 from allevato/debug-prefix-map-wip

[Note: This is my first release branch cherry-pick PR, so I hope I've done this correctly. As with the response file PRs that were previously merged into 4.2, this would unblock and greatly improve the user experience for many of our Swift developers if it's not too late to get into this release. Thanks!]

Explanation: Add the -debug-prefix-map flag to remap paths in debug info.

Scope: This is the Swift implementation of the corresponding Clang -fdebug-prefix-map, which allows users to remap absolute paths in debug info to different (perhaps relative) paths that can be used verbatim or reverse-mapped by LLDB. This makes such builds reproducible and, more importantly, makes it possible for users to debug Swift binaries that have been built remotely on machines whose directory layout does not match that on their local machine.

SR Issue: SR-5694

Risk: I believe it to be low. There is a minor behavioral change w.r.t. debug info generation even when the flag is not in use (details) but I do not anticipate any regressions (see Testing below).

Testing: The existing LLDB tests run during the PR cycle verify that the change did not cause regressions for existing debugging scenarios (i.e., where the -debug-prefix-map flag is not used). I have manually tested some scenarios debugging an executable built using the flag and am working on a follow-up PR to swift-lldb to add a test to cover this.

Reviewers: @jrose-apple and @dcci (#17665).

Hi @tkremenek—referring to your forum post about post-convergence changes, could this change be a candidate for a potential 4.2.1 release? It would be a major boon to Google's ability to debug Swift binaries from distributed builds.

I sincerely apologize for now seeing this sooner, and I appreciate you filing the PR.
Swift 4.2.1 is a very focused release, and there are always a chance of regressions being introduced by changes like this.  We should hold this fix to Swift 5.
I apologize for dropping the ball here; I need to find a better way to make sure these PRs as seen by the release manager in a timely manner.  This change was probably proposed early enough for us to take, but it is too late now for 4.2.1.  Totally my fault.


Format exception when returning the result from RecognizeOnceAsync

Describe the bug
I followed this quickstart to enroll my voice and check my voice afterward in another audio stream : https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speaker-recognition?tabs=script&pivots=programming-language-csharp.
I used the text-independant examples. I just changed the locale for the CreateProfileAsync method, I used fr-FR.
await client.CreateProfileAsync(VoiceProfileType.TextIndependentVerification, "fr-FR")

The enrollment seems to be ok, but when I try to recognize my voice with the RecognizeOnceAsync method, I get an InvalidFormatException when the result is fetched from the web service (see thr stack trace below for more info). The error occurs when the Convert.ToDouble() is called.
To Reproduce
Use the text-independant example from the link with fr-FR locale for the profil.
Expected behavior
No exception thrown
Version of the Cognitive Services Speech SDK
Microsoft.CognitiveServices.Speech: 1.14.0
Platform, Operating System, and Programming Language

OS: Windows
Hardware - x64
Programming language: C#
Azure : Azure Speech service in West US region

Additional context
Here is the stack trace
Input string was not in a correct format.
at System.Number.ThrowOverflowOrFormatException(ParsingStatus status, TypeCode type)
   at System.Convert.ToDouble(String value, IFormatProvider provider)
   at Microsoft.CognitiveServices.Speech.SpeakerRecognitionResult..ctor(IntPtr resultHandlePtr)
   at Microsoft.CognitiveServices.Speech.SpeakerRecognizer.<>c__DisplayClass5_0.<RecognizeOnceAsync>b__0(InteropSafeHandle h)
   at Microsoft.CognitiveServices.Speech.SpeakerRecognizer.<>c__DisplayClass8_0.<RunAsync>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at ConsoleApp1.Program.<SpeakerVerify>d__3.MoveNext() in D:\_Docs\Projets\ITCE\MultiLocuteur\ITCE.Multilocuteur.Console\ConsoleApp1\Program.cs:line 98
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at ConsoleApp1.Program.<VerificationEnroll>d__2.MoveNext() in D:\_Docs\Projets\ITCE\MultiLocuteur\ITCE.Multilocuteur.Console\ConsoleApp1\Program.cs:line 81
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at ConsoleApp1.Program.<Main>d__0.MoveNext() in D:\_Docs\Projets\ITCE\MultiLocuteur\ITCE.Multilocuteur.Console\ConsoleApp1\Program.cs:line 16

I see you are using french, but are you still using the WestUS data region.
The speaker recognition service is not available in all data centers.
Where you able to use the SDK sample as is, before switching to French?
https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/quickstart/csharp/dotnet/speaker-recognition
@trrwilson do you have have more to add, I know you've worked in this area before?
Thanks,

Hi @BrianMouncer, thanks for your reply.
I used the WestUS data region because it seems that this is the only avalaible region for Speaker recognition as the docs says here : https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-speaker-recognition#prerequisites
BUT, when I search for the documentation about Language support, I found that Speaker recognition support fr-FR : https://docs.microsoft.com/en-us/azure/cognitive-services/speech-service/language-support#speaker-recognition

Good afternoon @ChrisProlls
I am reviewing our open GitHub issues today, and was attempting to reproduce this locally, however I was unable to get this to happen using https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/master/quickstart/csharp/dotnet/speaker-recognition/README.md
I am using this sample project with a speech key from "westus" region.  First I verified the sample was working unchanged with en-us locale voice profile creation. Then I updated the CreateProfileAsync() calls to create a profile for "fr-fr" instead of "en-us".
The sample worked many many time, for both en-us and fr-fr locales.
Can you tell me know if you are still seeing this issue in the latest 1.15.0 release of the SDK?
If so, do you know a better way to reliably reproduce the problem?
Thanks.

Hello,
As @ChrisProlls, I encounter the same issue on my side. Did you manage to resolve the issue now (if yes how) ?
Bug:
I downloaded the solution files found here: https://github.com/Azure-Samples/cognitive-services-speech-sdk/tree/master/quickstart/csharp/dotnet/speaker-recognition
The only changes I made to the code was to change "YourSubscriptionKey" and "YourServiceRegion" with my cognitive services speech key and "westus" as it is the only region available for speaker recognition at the time being.
As @ChrisProlls, the enrolment of the profiles seems okay, but the bug occurs when the script tries to verify or identify the input voice when the System.Number.ParseDouble() function is called (I assume the different function is due to the fact that I use SDK version 1.15.0 instead of 1.14.0).
SDK version:
1.15.0
Platform, Operating System, and Programming Language:
OS: Windows 10
Hardware - x64
Programming language: C# .NET
Azure : Azure Speech service in West US region
Stack trace:
System.FormatException
  HResult=0x80131537
  Message=Input string was not in a correct format.
  Source=mscorlib
  StackTrace:
   at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Microsoft.CognitiveServices.Speech.SpeakerRecognitionResult..ctor(IntPtr resultHandlePtr)
   at Microsoft.CognitiveServices.Speech.SpeakerRecognizer.<>c__DisplayClass6_0.<RecognizeOnceAsync>b__0(InteropSafeHandle h)
   at Microsoft.CognitiveServices.Speech.SpeakerRecognizer.<>c__DisplayClass8_0.<RunAsync>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at helloworld.Program.<IdentifySpeakersAsync>d__1.MoveNext() in C:\Users\ltr\Documents\AI ML Tests\Azure\cognitive-services-speech-sdk\quickstart\csharp\dotnet\speaker-recognition\helloworld\Program.cs:line 40
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at helloworld.Program.<SpeakerIdentificationAsync>d__3.MoveNext() in C:\Users\ltr\Documents\AI ML Tests\Azure\cognitive-services-speech-sdk\quickstart\csharp\dotnet\speaker-recognition\helloworld\Program.cs:line 98
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at helloworld.Program.<SpeakerIdentificationAsync>d__3.MoveNext() in C:\Users\ltr\Documents\AI ML Tests\Azure\cognitive-services-speech-sdk\quickstart\csharp\dotnet\speaker-recognition\helloworld\Program.cs:line 104
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at helloworld.Program.<Main>d__5.MoveNext() in C:\Users\ltr\Documents\AI ML Tests\Azure\cognitive-services-speech-sdk\quickstart\csharp\dotnet\speaker-recognition\helloworld\Program.cs:line 174
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
   at helloworld.Program.<Main>(String[] args)

  This exception was originally thrown at this call stack:
    System.Number.ParseDouble(string, System.Globalization.NumberStyles, System.Globalization.NumberFormatInfo)
    Microsoft.CognitiveServices.Speech.SpeakerRecognitionResult.SpeakerRecognitionResult(System.IntPtr)

Thanks in advance for any help!

Hi @lnstreit,
Can you please capture some logs (instructions) and share them?

Hi all,
I resolved the issue in the end. The problem was due to the difference in culture formats between the speech configuration (or cognitive services) and the local machine (mine). As I use a machine which formats strings in the "fr-fr" format, doubles in strings are probably used with "," and not "." as in "en-us". The below line of code resolved the issue (changing the system format to the right one):
System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.GetCultureInfo("en-us");
Thanks for your will to help @glecaros!

Great, please reopen if you need further help.


Fixed text code

[x] Fixed font-size text in code blocks

@raulraja could you review this PR please?

@israelperezglez you need to merge master into your branch and push again since this pull request cannot be automatically merged.

Looks good to me. @israelperezglez You should merge latest changes in master into your branch, in order to solve conflicts.

We just updated the PR so we're able to merge it, take a look @raulraja.


MSSQL: Can't get intellisense results before running query cell

When typing out a query in a new MSSQL kernel cell, intellisense for things like column names doesn't show up until after the cell is run.

Looks like this might actually be related to the number of lines in the cell. In the following query, I can't get column names after the "d" table alias below unless there's a blank line immediately after the query. Even without running the query first, I can get intellisense back by just adding that blank line after the query text.
#!sqlkerneltest
select d.___
from sys.databases d


fix(launch): allow empty program_relpath in job builder

Description

Fixes WB-NNNNN
Fixes #NNNN

What does the PR do? Include a concise description of the PR contents.

[ ] I updated CHANGELOG.md, or it's not applicable

Testing
How was this PR tested?

#7587  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @bcsherma and the rest of your teammates on  Graphite


ISPN-11013 Query returns wrong "total_count"

https://issues.redhat.com/browse/ISPN-11013
https://issues.redhat.com/browse/ISPN-11014
https://issues.redhat.com/browse/ISPN-12959

Fix result size for all types of queries
Avoid executing additional query to obtain the result size
Avoid storing results in memory in the iterator()
Remove internal usages of deprecate list() and resultSize()

@tristantarrant


Possible bug?

If a script object is passed to coinjs.script() it causes this line to be executed:
else if (data instanceof coinjs.script) {
r.buffer = r.buffer;
}
Shouldn't it be "r.buffer = data.buffer;"? Or what's the intent here?

Another bug:
coinjs.numToBytes = function(num,bytes) {
if (typeof bytes === undefined) bytes = 8;
'undefined' must be a string, otherwise it doesn't work.
Luckily you never omit the 'bytes' argument anywhere.

Another bug:
coinjs.numToVarInt = function(num) {
	if (num < 253) {
		return [num];
	} else if (num < 65536) {
		return [253].concat(coinjs.numToBytes(num,2));
	} else if (num <<PHONE_NUMBER>) {
		return [254].concat(coinjs.numToBytes(num,4));
	} else {
		return [253].concat(coinjs.numToBytes(num,8));
	}
}

Last line must be:
return [255].concat(coinjs.numToBytes(num,8));

Major bug in clone():
    var temp = obj.constructor();

must be
    var temp = new obj.constructor();

Not only it's wrong to just call obj.constructor(), but this also fails cloning completely if transaction has any outputs, because the BigInteger 'value' copying crashes: a simple call returns 'undefined' in that case.

In deterministicK() these lines make no sense:
var v = new Uint8Array(32);
v = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];

var k = new Uint8Array(32);
k = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];

There is no need to use Uint8Array(32) if you immediately overwrite it with a regular array.

Hey, thanks for all your support in reviewing the code, if you aren't able to submit a pull request I'll make the amendments shorty.

It would be easier for you to just make all the changes. I rewrote a lot of coin.js and removed 2/3 of the code, so my version differs too much.

your suggestions have been made and are now live. thanks.


Feature/verify for entry versions

Alters verification so that it is based on a version and not an entry overall.

[x] Check that you pass the basic style checks and unit tests by running mvn clean install

Coverage decreased (-0.4%) to 72.693% when pulling cfee45b9c46b268e7eb7a83c49b422b042190848 on feature/verify_for_entry_versions into 2567ff213926a75163daef607a967376c7a273b9 on develop.


feat: add engine API metrics graphs

Added a graph for the existing metrics, fixes https://github.com/paradigmxyz/reth/issues/5336
These could be split into separate graphs, one per endpoint version, wdyt @shekhirin
Graphs currently look like this

These could be split into separate graphs, one per endpoint version, wdyt

I think it's too much charts, our dashboard is already overloaded imo.


[GLUTEN-4327][CH] Avoid generating a lot of small blocks in StreamingAggregatingTransform

What changes were proposed in this pull request?
(Please fill in changes proposed in this fix)
Fixes: #4327
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
unit tests
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

===== Performance report for TPCH SF2000 with Velox backend, for reference only ====

query
log/native_master_01_10_2024_time.csv
log/native_master_01_09_2024_d3df97aa0_time.csv
difference
percentage

q1
32.16
33.38
1.221
103.80%

q2
24.87
25.66
0.791
103.18%

q3
38.29
37.88
-0.407
98.94%

q4
39.92
39.11
-0.810
97.97%

q5
72.77
71.57
-1.200
98.35%

q6
6.95
6.96
0.017
100.25%

q7
87.97
86.82
-1.143
98.70%

q8
86.61
86.62
0.009
100.01%

q9
126.27
125.62
-0.650
99.49%

q10
48.57
42.71
-5.865
87.93%

q11
20.34
20.21
-0.132
99.35%

q12
25.39
29.40
4.019
115.83%

q13
47.58
47.13
-0.448
99.06%

q14
19.83
16.36
-3.468
82.51%

q15
29.34
27.94
-1.400
95.23%

q16
14.33
14.99
0.657
104.58%

q17
104.91
156.46
51.556
149.15%

q18
150.89
194.42
43.527
128.85%

q19
15.51
16.64
1.127
107.27%

q20
27.96
28.42
0.454
101.62%

q21
227.42
225.07
-2.347
98.97%

q22
14.15
14.11
-0.041
99.71%

total
1262.02
1347.49
85.465
106.77%


Package httplib not found!

I tried to install & run the first lines of code. Got the ImportError: No module named 'httplib' for lines in __init__.py of disqusapi. When searched online, found that there is no httplib anymore. There is a newer package called httplib2 and httplib has been renamed to http.client in Python 3 Source@StackOverFlow. Should the code be updated to reflect the changes?

@rampyg are you trying to install this with Python 3?

@Fluxx Yup!

Ah - disqus/python doesn't support Python 3, so that would explain your issue.  If you want to take a stab at making it Python 3 compatible go for it.

The next release will be python 3 compatible, fwiw. We have a couple outstanding issues left and we'll be good.

Thanks @mattrobenolt for the info. Hoping the release would be soon...
Would have tried, @Fluxx. But now that work is already on, wouldn't want to duplicate! :+1:


Missing 'supports_cpp_node' impl function

Added missing abstract implementation function to log_parsing example preproc and postproc stages.

@gpucibot merge


Cleanup and fixes around example generation for Model, Struct and  Hash.

Avoid creating method accessors for true Hash types (only [] accessors)
Fix common hash methods created for example instances (to play well with lazy attributes)
Avoid storing the Hash#insensitive_map unless insensitivity enabled

Signed-off-by: Josep M. Blanquer<EMAIL_ADDRESS>

LGTM


[BUG] global can overflow stack?

I am trying to debug a strange crash in scipy's sobel.pyx on pypy. I think (am not 100% sure) that the use of this paradigm is causing problems
DEF MAXDIM = 21201  # max number of dimensions
DEF MAXDEG = 18  # max polynomial degree
cdef int poly[MAXDIM]
cdef int vinit[MAXDIM][MAXDEG]
...
def initialize_direction_numbers():
    global is_initialized, poly, vinit
    if not is_initialized:
        dns = np.load(os.path.join(os.path.dirname(__file__), "_sobol_direction_numbers.npz"))
        poly = dns["poly"]
        vinit = dns["vinit"]
        is_initialized = True

This turns into C code like
static int __pyx_v_5scipy_5stats_6_sobol_poly[0x52D1];
static int __pyx_v_5scipy_5stats_6_sobol_vinit[0x52D1][18];
...

static PyObject *__pyx_pf_5scipy_5stats_6_sobol_initialize_direction_numbers(CYTHON_UNUSED PyObject *__pyx_self) {
  ....
  int __pyx_t_11[0x52D1];
  int __pyx_t_12[0x52D1][18];
 ....
    if (unlikely(__Pyx_carray_from_py_int___5b_18_5d_(__pyx_t_2, __pyx_t_12, 0x52D1) < 0)) __PYX_ERR(0, 98, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely((0x52D1) != (0x52D1))) {
      PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %" CYTHON_FORMAT_SSIZE_T "d, got %" CYTHON_FORMAT_SSIZE_T "d", (Py_ssize_t)(0x52D1), (Py_ssize_t)(0x52D1));
      __PYX_ERR(0, 98, __pyx_L1_error)
    }
    memcpy(&(__pyx_v_5scipy_5stats_6_sobol_vinit[0]), __pyx_t_12, sizeof(__pyx_v_5scipy_5stats_6_sobol_vinit[0]) * (0x52D1));

So at the beginning of the function there is a very large array. Is it reasonable that this is causing a stack overflow? I see very strange phenomenon that point to that direction. Perhaps PyPy's C headers are preventing inlining the static function?
Maybe this is more applicable to the mailing list, but I am opening it as an issue since one alternative would be to avoid doubly statically allocating  the global 2d-array and memcpying it.

Perhaps PyPy's C headers are preventing inlining the static function?

I don't think a def function implementation would ever be meaningfully inlined (with/without PyPy).

I am opening it as an issue since one alternative would be to avoid doubly statically allocating the global 2d-array and memcpying it.

The reason it's being statically allocated then memcpyed is that __Pyx_carray_from_py_int___5b_18_5d_ might throw (presumably because it's been passed data types that don't match). If it wrote directly into the global then this could leave it in a half-written state.
I'd think the solution (if we did want to fix it) would be to limit the size of C arrays we were prepared to create on the stack and make the temp an allocated variable instead.

I suspect there isn't anything special about PyPy here - it's probably on the borderline of overflowing the stack in CPython too, but is just on the right side of the line.

make the temp an allocated variable

Is there a simply change scipy could make to the code to avoid this problem?

Is there a simply change scipy could make to the code to avoid this problem?

probably to do the copy element-by-element itself:
dnspoly = dns["poly"]
for i in range(len(dnspoly)):
    poly[i] = dnspoly[i]

(and the same for vint)

Thanks. Feel free to close this or modify the topic to better suit any changes Cython might need to warn/prevent this.

Feel free to close this or modify the topic to better suit any changes Cython might need to warn/prevent this.

Yeah - I'm not really sure what the right thing to do is. The fact that it's a huge hidden temp that the user has no reason to expect makes me think that it deserves a warning possibly? I think changing the code generation to avoid this error would be too complicated though

People tend to ignore warnings. I "fixed" the scipy code to avoid it, so I will close this. Thanks for the help.

Why close this? This bug is silent and results in crashes for reasons that are completely invisible to the Cython code.
If managing two versions of codegen would be too difficult then how about having a helper macro that either does stack allocation or malloc depending on the size.
#define SMALL_SIZE 8192
#define _Pyx_alloc_temp(size) (size <= SMALL_SIZE ? alloca(size) : malloc(size))
#define _Pyx_free_temp(ptr, size) if (size > SMALL_SIZE) { free(ptr); }

int* tmp = (int*)_Pyx_alloc_temp(0x52D1 * 18 * sizeof(int))
if (!tmp) {
    // Handle error
}
// Use tmp ...
_Pyx_free_temp(tmp, 0x52D1 * 18 * sizeof(int));

I agree this is a subtle error that would be good to avoid. I think we're allocating the temp to make the reassignment of the global look atomic (it either happens completely, or not at all in case there was a bug). We could keep it open, but I don't know in what timeframe it would be addressed. (It's not just a matter of creating a macro that switches allocation type based on a size parameter, but refactoring the temp generation code to make sure it is always freed correctly and the usages to handle a pointer rather than value. Feasible, possibly easier if isolated to the buffer unpacking code, but nontrivial.)


Internal dumps handling: auto-update without dumps

Since we want to stabilize Meilsearch and release a v1.0.0 (by the end of Q1 2023), there is some user expectations we need to ensure. Indeed, as a user, I would not expect to do my migration from v1.1.0 to v1.2.0 using a dump. After downloading the latest version of Meilisearch, I would expect Meilisearch restarts automatically, reading the "old" data.ms without any issue.
For this, the core team needs to do a huge work of DB stabilization.
Also, this issue is tightly related to https://github.com/meilisearch/meilisearch/issues/2570
Success criteria
Since this issue will be fixed in v0.29.0, we will expect people to migrate from v0.29.0 to v0.30.0 without using a dump 🤯
Steps
I let @Kerollmops update this issue with the different steps to do before closing this issue.
WIP

Pinging @meilisearch/docs-team, @meilisearch/integration-team and @meilisearch/cloud-team

Discussion of an alternative solution here, regarding the complications this implementation could bring: https://github.com/meilisearch/meilisearch/discussions/2608

As discussed with the @meilisearch/core-team, this is something we cannot implement for v0.29.0 and we need to think more before doing anything, the stabilization is not an easy choice!

I close this issue since it's not planned to be implemented in the next 6 months.


Add uv sync --dev-only or equivalent

This was a feature request, it seems reasonable to me.

Including the root project, I presume? --only-dev for consistency with --with and --no-install?

Yeah I prefer --only-dev. I was thinking exclusive of the root project but... I'm not sure?

We also need the ability to uv pip install pyproject.toml --dev (including dev requirements).
Necessary to install dev requirements into a docker containers --system.

I wonder if this should instead be --prod and --no-prod, like --dev and --no-dev.

I feel like --prod might imply something more, like ignoring development sources?


By namespace + RoutePrefix + AssumeDefaultVersionWhenUnspecified not working

TL;DR: It seems the the AssumeDefaultVersionWhenUnspecified is not working with RoutePrefix and ByNamespace versioning. It might be too complex for the routing system to handle this combinations but would be definitly great if it is supported.
Long Version:
Consider the ByNamespaceWebApiSample project as a starting point and let us combine it with attribute routing:
namespace Microsoft.Examples.V1.Controllers
{
    [ApiVersion( "1.0" )]
    [RoutePrefix( "v{version:apiVersion}/agreements" )]
    public class AgreementsController : ApiController { [Route("{accountId}")] public IHttpActionResult Get( string accountId ) ... }
}
namespace Microsoft.Examples.V2.Controllers
{
    [ApiVersion( "2.0" )]
    [RoutePrefix( "v{version:apiVersion}/agreements" )]
    public class AgreementsController : ApiController { [Route("{accountId}")] public IHttpActionResult Get( string accountId ) ... }
}
namespace Microsoft.Examples.V3.Controllers
{
    [ApiVersion( "3.0" )]
    [RoutePrefix( "v{version:apiVersion}/agreements" )]
    public class AgreementsController : ApiController { [Route("{accountId}")] public IHttpActionResult Get( string accountId ) ... }
}

And we change the Startup do use the attributes instead of fixed routes:
var constraintResolver = new DefaultInlineConstraintResolver() { ConstraintMap = { ["apiVersion"] = typeof(ApiVersionRouteConstraint) } };
var configuration = new HttpConfiguration();
var httpServer = new HttpServer( configuration );
configuration.AddApiVersioning(o =>
{
    o.ReportApiVersions = true;
    o.DefaultApiVersion = new ApiVersion(3, 0);
    o.AssumeDefaultVersionWhenUnspecified = true;
} );
configuration.MapHttpAttributeRoutes(constraintResolver);
builder.UseWebApi( httpServer );

Then it is possible to call the different versions via the explicit version:

v1/agreements/4711    -> {"Controller":"Microsoft.Examples.V1.Controllers.AgreementsController","AccountId":"test","ApiVersion":"1"}
v1.0/agreements/4711  -> {"Controller":"Microsoft.Examples.V1.Controllers.AgreementsController","AccountId":"test","ApiVersion":"1.0"}
v2/agreements/4711    -> {"Controller":"Microsoft.Examples.V2.Controllers.AgreementsController","AccountId":"test","ApiVersion":"2"}
v2.0/agreements/4711  -> {"Controller":"Microsoft.Examples.V2.Controllers.AgreementsController","AccountId":"test","ApiVersion":"2.0"}
v3/agreements/4711    -> {"Controller":"Microsoft.Examples.V3.Controllers.AgreementsController","AccountId":"test","ApiVersion":"3"}
v3.0/agreements/4711  -> {"Controller":"Microsoft.Examples.V3.Controllers.AgreementsController","AccountId":"test","ApiVersion":"3.0"}

But if you try to call the latest version by removing the version, you only get an error 404:

agreements/4711 -> HTTP Error 404.0 - Not Found instead of  {"Controller":"Microsoft.Examples.V3.Controllers.AgreementsController","AccountId":"test","ApiVersion":"3.0"}

Is there a way to have this combination? From code perspective the by namespace is simply the cleanest way to versionize your API. We also prefer the url segment based versioning due to
various reasons (documentation with swagger and swagger UI, browser/html-form compatibility,...). But still we want to provide also a default endpoint for the current version.

Implicitly matching an API version in the URL path is not supported. There is really no way that this ever could be supported. The path segment of the URL identifies the resource. I know it's a heated debate with some folks, but that is one of the consequences of implementing versioning that way. This also one of the main reasons the default behavior is to use the query string. The query portion of a URL does not identify a resource.
Also keep in mind that these libraries do not change routing in any way (many people think it does). These libraries let routing do what it always did and then disambiguates matching routes using the API version. The default behavior would have treated multiple route candidates as an ambiguous error made by the service author. In the case of URL path segment versioning, the route constraint is only used to verify that the API version specified is well-formed and lets the platform extract the requested API version without relying on messy, brittle URL string manipulation like regular expressions. It also gives service authors a lot more flexibility in how they define their route templates (ex: whether to use the "v" prefix).
There are a couple possible solutions to this problem:

Don't allow implicit versioning. This is probably the simplest and safest approaches. Clients will always know what version they are bound to, which is great for the principle of least astonishment. Remember that unless the implicit version always points to the same version (usually V1), there is a potential to break clients when things change.
Use URL rewriting. Using patterns, things always map to some static version; either the initial, implicit version or whatever version you to advance things to. You could always write custom code to determine which API version to forward to, but I suspect that is pretty involved.
Use multiple, overlapping routes. Just because you want to route using URL path segments, doesn't mean you can't also route using the query string. This would allow routing by both methods and would allow the implicitly assumed version to get picked up. You can't prevent a client from using one method over another because it's really up to them. You can, however, choose to not to document other use cases of the query string method aside from the default version case.

A couple of people have asked about this in the past. I should update the wiki to indicate this won't work out-of-the-box.

Thanks for the response.
In general I agree: There are really mixed opinions on the version in the URL and whether it's proper RESTful. But I rather see the versionized URL as an API endpoint/entry point than part of the resource identifier. My thinking is: I versionize the API, not the resources.
Don't allow implicit versioning.
The idea of the implicit versioning is very useful for clients. If you develop an API client, you only need to retest if your client is still working with the new version or if there have been breaking changes that break your app. If you point your API client to a fixed version you will not benefit from enhancements that were done to the API. If there are multiple installations of your API host in the market, your client might even not work anymore since you pointed it to V1 and the new API host has removed a deprecated API. You need to release a new version of your API client but customers might not be able to upgrade since they don't have a license for the new software. So basically your whole API infrastructure becomes unusable. Beside that it's considered as a good practice to provide
multiple, overlapping routes
I think I easily was able to solve the issue by creating a new IDirectRouteProvider. On startup while all routes are created based on the attributes, I simply check for all actions whether they are part of the "default version". If that's the case, I register an additional route without the URL segment containing the version.
Maybe this solution would be feasable for you to integrate it directly as option which does this setup automatically.
// startup:
var defaultApiVersion = new ApiVersion(3, 0);
configuration.MapHttpAttributeRoutes(constraintResolver, new VersionAwareDirectRouteProvider(defaultApiVersion));
configuration.AddApiVersioning(o =>
{
    o.ReportApiVersions = true;
    o.DefaultApiVersion = defaultApiVersion;
    o.AssumeDefaultVersionWhenUnspecified = true;
});

// routeprovider
public class VersionAwareDirectRouteProvider : DefaultDirectRouteProvider
{
    private readonly ApiVersion _defaultVersion;

    public VersionAwareDirectRouteProvider(ApiVersion defaultVersion)
    {
        _defaultVersion = defaultVersion;
    }

    protected override IReadOnlyList<RouteEntry> GetActionDirectRoutes(HttpActionDescriptor actionDescriptor, IReadOnlyList<IDirectRouteFactory> factories,
        IInlineConstraintResolver constraintResolver)
    {
        // let the DefaultDirectRouteProvider create the normal routes based on all factories
        var routes = new List<RouteEntry>(base.GetActionDirectRoutes(actionDescriptor, factories, constraintResolver));

        // check if the current action is part of the default API version by looking at the ApiVersionAttributes defined
        var isDefaultVersionRoute = actionDescriptor.ControllerDescriptor.GetCustomAttributes<ApiVersionAttribute>()
            .Any(versions => versions.Versions.Any(v => v == _defaultVersion));

        if (isDefaultVersionRoute)
        {
            // find all routes for the action that have a version constraint
            var versionizedRoutes = routes.Where(r => r.Route.Constraints.Any(c => c.Value is ApiVersionRouteConstraint));
            foreach (var versionizedRoute in versionizedRoutes)
            {
                // separate the URL template into the path segments
                var chunks = versionizedRoute.Route.RouteTemplate.Split('/');

                // build the {version} string based on the route constraint name
                var versionConstraint = "{" + versionizedRoute.Route.Constraints.Where(c => c.Value is ApiVersionRouteConstraint).Select(c => c.Key).First() + "}";

                // join the segments again together but remove the chunks containing the URL constraint
                var newRouteTemplate = string.Join("/", chunks.Where(c => !c.Contains(versionConstraint)));

                // build a new route for the new URL template
                var context = new DirectRouteFactoryContext(string.Empty, new[] { actionDescriptor }, constraintResolver, false);
                var builder = context.CreateBuilder(newRouteTemplate);
                if (!string.IsNullOrEmpty(versionizedRoute.Name))
                {
                    builder.Name = versionizedRoute.Name + "DefaultVersion";
                }
                routes.Add(builder.Build());
            }

        }

        return routes;
    }
}

In the purest sense, versioning is really referring to the versioning of a resource. Many REST authorities would likely assert that the only method for any type of versioning should be achieved using media type negotiation. This is something I'm not opposed to and is supported by the libraries, but unfortunately there is standard format for specifying a version parameter in a media type; therefore, this support doesn't exist directly out-of-the-box. I certainly won't advocate that versioning using any part of the URL is better, but it's certainly easier to consume.
We all generally accept the term API Versioning, but really we are talking about resource versioning - if we're doing REST.  HTTP is the API (aka the Uniform Interface). The URL identifies a resource in the HTTP API. At least for me, years and years of RPC and Messaging-style platforms and frameworks forced me to do a lot of re-thinking and re-learning to move toward resource-oriented architectures like REST. You can do REST without HTTP and you can use HTTP without being RESTful. These libraries don't care, which approach you use. That's also why it's not called the REST API Versioning library. ;)  I tried really hard to strike the right balance to embrace REST principles as closely as possible for those that want to go that path, but still make things are super easy if you just want to throw any 'ol HTTP endpoint up that uses more of an RPC or Message-style API (which I see a lot of).
I won't question your desire for implicit versioning, but I've seen it go sideways on teams many, many times. The call is always down to the service author and how they want to interact with their clients.  Obviously, you know best. The biggest issue I've seen is that service authors assume that their clients implement tolerant readers and can therefore handle scenarios where the service adds new data members to a resource. Sadly, this is not always so. If you have a small client base or provide a client library that provides this tolerant readers, then it's a non-issue. Versioning changes aren't always additive either. You can't safely take things away in new a version without potentially breaking a client. As a service author, you could use logging or some other facility that tracks the API version of incoming requests. When you see the volume for a deprecated version drop to zero, then and only then, you can completely drop support. If you track or audit these requests, you can potentially contact the client before you shut off support and cause them to break.  Again, these are all policies that only you can determine.
Your solution for implicit versioning using URL path segments is clever. From my cursory examination, it seems possible that this could be made into something more general purpose.  I'll look at queuing up some work for this in the next milestone. One thing that you might not be aware of is that, there are built-in extension methods for retrieving the defined API version information. The infrastructure doesn't rely on attributes, that just happens to be one of the mechanisms by which you can get the information.
For more complete access to the information, you can revise your current code like this:
var apiModel = actionDescriptor.ControllerDescriptor.GetApiVersionModel();
var isDefaultVersionRoute = apiModel.ImplementedApiVersions.Contains( defaultVersion );
// ... omitted for brevity

There's nothing wrong with passing in the default API version, but you can get this from the configuration later like so:
var defaultApiVersion = actionDescriptor.Configuration.GetApiVersioningOptions().DefaultApiVersion;

It's also worth mentioning that any controller that has no versioning attribution and has not explicitly opted-out of API versioning using [ApiVersionNeutral] will also be assumed to be this default API version. I mention that because your current logic would miss this case. Of course for you, if you explicitly add versioning attributes to all your controllers (which I recommend), you never have this case or problem.

I understand your opinion on RESTful versioning and that you rather version the resources than the API. It's a tricky (and strongly opinion based) topic. That's where you find that many discussions about that in the internet (https://www.troyhunt.com/your-api-versioning-is-wrong-which-is/ is a nice blog post with references).  I believe that in long term this library can provide all concepts in parallel.
The tricky part will be to combine my proposed solution with a header based versioning #70 . If this ambiguity can also be solved, the client can really decide how he'd prefers to select the version: query string, url segment, header or default version.
We annotate all our controllers with an API version that's likely why I missed that controllers not having a version attribute automatically count to the CurrentVersion.  It would be great if you can really adapt this solution into the library, otherwise we somehow need to maintain a mix of our custom versioning and aspnet-api-versioning within our applications.

I've been re-evaluating this issue. While your solution is elegant, I can't seem to replicate feature parity in ASP.NET Core. Having the same OOB capabilities in both implementations is important. I suspect this is likely due to the changes in routing.
I was, however, able to create an alternate solution that seems to get you what you want. Let's assume you are using the same configuration as above.  You can then have a controller defined like this:
namespace Microsoft.Examples.V3.Controllers
{
    [ApiVersion( "3.0" )]
    public class AgreementsController : ApiController
    {
      [Route( "agreements" )]
      [Route( "v{version:apiVersion}/agreements" )]
      public IHttpActionResult Get() => Ok();

      [Route( "agreements/{accountId}" )]
      [Route( "v{version:apiVersion}/agreements/{accountId}" )]
      public IHttpActionResult Get( string accountId ) => Ok( accountId );
    }
}

Unfortunately, in Web API the RoutePrefixAttribute can only be applied once, which means in order to achieve the route setup, you would have to apply the route template multiple times.  You only need to do this on the current version controller. Since the default, configured API version is 3.0, the following routes will all match the version 3.0 routes:

/v3/agreements
/v3/agreements/42
/agreements
/agreements/42

In this particular case, it might be easier to manage the route definitions using conventions instead because every time you create a new version, you need to move the current version routes to the new controller class. Mixing and matching conventions and direct routes (aka attribute routing) may work, but due to limitations in the Web API infrastructure that I can't control or fix, there are some scenarios were it won't work. I can't thing of the exact setup that will cause this, but I've encountered it numerous times; particularly in supporting OData (which only uses conventions). Regardless of which one of these variants you choose, both will give you stronger alignment to ASP.NET Core whenever you make the switch.
If you're happy with your current approach, there's nothing wrong with it. I just don't see a way to carry it forward to ASP.NET Core. I want to do everything possible to keep the two platforms aligned so that devs do not have to relearn everything.

I stumbled over a similar problem when I was preparing a pull request with my requested feature. The APIs in this area are a bit inconsistent (or follow different concepts). This is why I implemented a custom nuget package on top of this framework to get those missing features in while focusing only on traditional Web API.
https://github.com/Danielku15/aspnet-url-versioning
We are using it since a while and it works perfectly for our case (including ApiExplorer/Swagger/Swashbuckle support).

Sounds like you're set on this issue, so I'm going to close it out. Thanks for all the feedback and in-depth discussion. I'm close to having the 1.1.0 release ready. Once that's out, I'll have some bandwidth freed up to look back at various documentation support. I'll definitely be giving your work a look to see what bits may be able to be incorporated.
Let me know if you need anything else. Thanks.


issues with cuda 11.6

With CUDA 11.6, the following seem to fail:

DslashMulti
HBOR_multiple
hisqForce
hisqForceImagMu
rhmcTest
rhmcTest_4pf

The first three are fixed in https://github.com/LatticeQCD/SIMULATeQCD/commit/a0e0a5ff7f38d3907e7db2abb96aa7dd93568fe0, https://github.com/LatticeQCD/SIMULATeQCD/commit/d5758b447bcb7b5c21f173d7b55f45bbb3ec365c, and https://github.com/LatticeQCD/SIMULATeQCD/commit/d278c36edfc9ec5c429ef4fd162577aeb0c0597a, respectively. The last three presumably suffer from the same issue that hisqForce did with the introduction of CUDA 11.6?

It is definitely the cuda version. Switching from 11.0 to 11.6 is enough to change the rhmcTest from passing to failing.

With b44250c4b9bbaaac3c5a68698a795e8fc7697649, the imaginary mu force is now working with 11.6.


issue737 实现rocketmq的header的value的无感知序列化和反序列化

Describe what this PR does / why we need it
Implementing senseless serialization and deserialization of value of rocketmq header
实现rocketmq的header的value的无感知序列化和反序列化
Does this pull request fix one issue?
Fixes #737
Describe how you did it
Designing an interface named RocketMQ Header Mapper is responsible for serialization and deserialization of header value, and adding an implementation class using jackson.
Then, in RocketMQListener BindingContainer and RocketMQMessageHandler, the pre-processing of sending and receiving messages is carried out to realize senseless serialization and deserialization.
At the same time, a consumer parameter spring. cloud. stream. rocketmq. bindings. < input-name >. consumer. trusted-packages is added to set the whitelist for deserialization.
设计一个名为RocketMQHeaderMapper的接口负责header的value的序列化和反序列化,并增加了一个使用jackson的实现类.
然后在RocketMQListenerBindingContainer和RocketMQMessageHandler中进行消息的发送和接受前置处理,以实现无感知序列化和反序列化.
同时增加了一个消费者参数spring.cloud.stream.rocketmq.bindings..consumer.trusted-packages用来设定反序列化时的白名单
Describe how to verify it
A non-String type custom header is set when sending a message, and the message consumer verifies that the custom header of the message is deserialized to the type at the time of sending.
在发送消息时设置一个非String类型的自定义消息头,在消息消费者处验证该消息的自定义消息头是否反序列化为发送时的类型.
Special notes for reviews

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

could you format code with eclipse code format? refer https://github.com/alibaba/spring-cloud-alibaba/wiki/如何贡献代码#配置-spring-cloud-标准的代码格式.

nice feature for RocketMQ Binder


Show a tooltip on an annotation

Summary
Possibility to display a tooltip when hovering an annotation.
API Changes
Add 'tooltip' property to the annotations
Intended Use Case
Display extra information related to the annotation when hovering it.

Hey, this would be great to have? Would it be okay to re-open this feature request!

Can anyone update on this?


[Feature Request] Sub-folder Animation Support

First off, awesome project. Tried it out, and it works great!
I know that animations can be loaded within sub-folders and I was wondering if you could bring that into the app.
For example, having the below text in the manifest will work as long as the folders are correct.
Name: Sasquach/Sasquach_D1g1talRa1n_128x64
Min butthurt: 1
Max butthurt: 14
Min level: 1
Max level: 30
Weight: 1

The FlipperZero looks for the Sasquach folder, and then looks for the Sasquach_D1g1talRa1n_128x64 folder to load the animation.
Thanks!

Hi, I didn't knew it was possible to do that on the Flipper!
Thank you for the detailed explanation of the inner working of subfolders loading, I will definitely add it to the tool.


List: Migrate to CSS variables for themeing

Apparently, all theme colors are available as CSS variables, so there's no good reason to maintain the list styler et al.

[ ] List
[ ] Tree

Dupe of https://github.com/microsoft/vscode/pull/166279


run hbase-indexer server as daemon in Ubuntu

Hi,
May I know how to run hbase-indexer server as daemon in Ubuntu?

Aha! I looked into the hbase-indexer under bin folder and I found the solution. Just run as bin/hbase-indexer daemon.

@Bangsheng in the future, for questions like this can you post on the user mailing list (linked to from the hbase-indexer page) instead of opening issues here?

@gabrielreid Sorry, I didn't know there was a mailing list. I found this only place where I can post questions about hbase-indexer. And people could find answers here easily if they have same problems as me because this should be first place we would look into when we have a problem using the project. Maybe I was wrong. I will use mailing list if I have similar questions later.
Thanks again for your awesome work. The hbase-indexer works perfectly now in my cluster.


GPU usage 0 even with n_gpu_layers.

GPU usage doesn't change and my Local Llama model only runs under CPU
``I'm running a local llama 2 7b model(hugging face bloke model), on my local machine, everything works fine, except that only cpu works and GPU usage remains 0 throughout. I've included n_gpu_layers and other such options, but gpu just doesn't work for some reason.
device ram= 16gb
Vram = 6gb.
I can see 100% usage of my CPU, but nothing changes with respect to GPU usage.
This is my code in python.
`
from langchain.llms import LlamaCpp
from langchain import PromptTemplate, LLMChain
from langchain.callbacks.manager import CallbackManager
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_PATH = "D:\yarn-llama-2-7b-128k.Q2_K.gguf"
MODEL_PATH = "D:\llama-2-7b-chat.Q3_K_M.gguf"
def load_model():
"""Loads Llama model"""
callback_manager = CallbackManager([StreamingStdOutCallbackHandler()])
Llama_model = LlamaCpp(
model_path=MODEL_PATH,
temperature=0.5,
max_tokens=2000,
top_p=1,
callback_manager=callback_manager,
verbose=True,
n_gpu_layers=100,
n_batch=512
)
return Llama_model

llm = load_model()
model_prompt = """
a discussion between hitler and buddha
"""
response = llm(model_prompt)
print(response)
`
Does anybody have any idea how to include gpu ?
Suggestion:
No response

I tried following commands on windows but gpu is not utilised.

set CMAKE_ARGS="-DLLAMA_CUBLAS=on"
set FORCE_CMAKE=1
pip install --upgrade --force-reinstall llama-cpp-python --no-cache-dir

can you please let me know if anything is missing in steps.

I have the same issue on Linux. The GPU is utilized on my mac. Has anybody run with the GPU on Linux? Thanks.


Error doing update on Dcard

Found an error in cronjob logs:
Traceback (most recent call last):
  File "./ns.py", line 124, in <module>
    main(args)
  File "./ns.py", line 96, in main
    update(args)
  File "./ns.py", line 80, in update
    newsSpiders.runner.update.run(runner, site["site_id"])
  File "/srv/web/newsSpiders/runner/update.py", line 67, in run
    site_id=site_id, current_time=current_time
  File "/srv/web/newsSpiders/runner/update.py", line 31, in get_posts_to_update
    for post in posts
  File "/srv/web/newsSpiders/runner/update.py", line 31, in <listcomp>
    for post in posts
  File "/srv/web/newsSpiders/runner/update.py", line 18, in get_last_comment_floor
    )["raw_data"]
TypeError: 'NoneType' object is not subscriptable

Looks like a problem getting the lastest floor of Dcard comments.  This happens during the creation of spiders so an uncaught exception here will abort updates for all sites.

Note: we have backup up to 2/17.  Working on data recovery 2/17-2/28


Should we use github wiki or a doc folder rendered on readthedocs ?

both.
but it is not clear what we should use the wiki for.


💭 Overlay using SVG does not match the camera preview on Android

Question
Before vision camera v4, I can use react-native-svg to draw the overlays.
I set the viewBox to the size of the frame and set its preserveAspectRatio to xMidYMid slice
But using vision camera v4, the overlay cannot match the preview perfectly on Android.

I know I can now use Skia to draw to the frames. But as my old examples are all using react-native-svg, I am still using it to draw the overlay. I would like to know how to match the two correctly.
What I tried
No response
VisionCamera Version
4.0.1
Additional information

[ ] I am using Expo
[X] I have read the Troubleshooting Guide
[X] I agree to follow this project's Code of Conduct
[X] I searched for similar questions in the issues page as well as in the discussions page and found none.

Hi, are you able to generate builds with Expo? I'm using:
"expo": "~48.0.21",
"react-native-vision-camera": "^4.0.1"
but when I run npx expo run:android, it shows the error tagged below

Hi, are you able to generate builds with Expo? I'm using: "expo": "~48.0.21", "react-native-vision-camera": "^4.0.1"
but when I run npx expo run:android, it shows the error tagged below

Check out this: https://github.com/expo/expo/issues/19534#issuecomment-1277597917

I think there is some difference between v2-3 and v4 on how the camera preview is sized. I am just lazy since if you know then I don't have to figure this out myself.

Yea no I'd have to play around with this myself as well.
Skia Frame Processors use exactly the Frame as a coordinate system, but if you want to draw something onto the screen you need to calculate the coordinates manually - which can be a bit tricky.
Maybe I can add a helper method for that, but I think that's going to be asynchronous because it has to be used from the UI Thread (not sure why those limitations exist on native).
Otherwise you can calculate it yourself by getting video width/height -> aspect ratio, getting view width/height -> aspect ratio, calculate center crop (either height or width overflow), then put it on screen.

Having a method to draw the overlay would be very helpful.

Setting the resizeMode to contain can make the SVG match with the camera preview in my case.


PHP 8.1 int enums not working as default value in migrations

The default grammar casts a default non-boolean value to a string.
enum QuoteStatus: int
{
    case DRAFT = 1;
    case SENT = 2;
    case ACCEPTED = 4;
    case REJECTED = 8;
    case CANCELLED = 16;
}

public function up()
{
    Schema::create('quotes', function (Blueprint $table) {
        $table->id();
        $table->unsignedTinyInteger('status')->default(QuoteStatus::DRAFT);
    });
}

Object of class App\Enums\QuoteStatus could not be converted to string at vendor/laravel/framework/src/Illuminate/Database/Schema/Grammars/Grammar.php:276

https://github.com/laravel/framework/blob/1638472a7a5ee02dc9e808bc203b733785ac1468/src/Illuminate/Database/Schema/Grammars/Grammar.php#L294-L303

I just learned that native enums act like an object.
The following snippet works:
if (is_object($value) && enum_exists(get_class($value))) {
   return "'" . $value->value . "'";
}

Resubmit this with a filled out issue template


No description for smooth fade

I’m wondering what it does

Patience. If it's not in the main branch it's not "released" :)

Oh OK! I didn’t know that :)

smooth fade merged into main and description added


Add application/x-www-form-urlencoded Content-Type Parser

This is useful to make mattermost integration works. because mattermost used urlencoded form as body data and cannot be changed.

Description
Add application/x-www-form-urlencoded Content-Type Parser in node index.js file
Motivation and Context

Some outcoming webhook from application uses form urlencoded by default and can not be changed. One of them is mattermost. Before this changes, node function node returning anyting from event.body object because no parser setup for form urlencoded.

[ ] I have raised an issue to propose this change (required)

Which issue(s) this PR fixes

Fixes #
How Has This Been Tested?

I tested by creating function which return event.body object and see Content-Type: application/x-www-form-urlencoded was successfully parsed.

Openfaas function in dev, and using Talend API Tester for API testing.

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Version change (see: Impact to existing users)

Impact to existing users

No, Because no existing code changed
Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I've read the CONTRIBUTION guide
[ ] I have signed-off my commits with git commit -s
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

Hi there, thanks for your interest in OpenFaaS.
I just wanted to let you know that I looked into the docs for this and it seems like application/json is supported for webhooks. I ran into a similar issue with GitHub several years ago until I learned that this can be configured.
https://docs.mattermost.com/developer/webhooks-outgoing.html

Hope this is helpful?
Alex

Please take a look here https://developers.mattermost.com/integrate/slash-commands/
There is no application/json ct on there.
Ofc, I was wrong when describe it before. But I hope it can be happened because it’ll give dev flexibility when making an integration.
On 17 Oct 2020 19.47 +0700, Alex Ellis<EMAIL_ADDRESS>wrote:

Hi there, thanks for your interest in OpenFaaS.
I just wanted to let you know that I looked into the docs for this and it seems like application/json is supported for webhooks. I ran into a similar issue with GitHub several years ago until I learned that this can be configured.
https://docs.mattermost.com/developer/webhooks-outgoing.html
Hope this is helpful?
Alex
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

Of course if you only give a little information away, it makes it hard to guess what you're trying to do.
You should be able to use the raw body functionality here instead of changing the template.
https://docs.openfaas.com/cli/templates/#nodejs-12-node12-access-to-the-raw-body
I did the same with the Golang template.
https://github.com/alexellis/tinkerbot
Alex

Okay thanks alex, sorry to bother
We can close this pr


Terminal logger fixes

Description
Small fixes for terminal logger, so we can send and capture passed tests and skipped tests.

/azp run


Rotate Backup Witnesses Into The Production Queue

Similar to Steem, it would be beneficial for witnesses outside of the active group to be cycled through regularly. While we may not yet need the excess capacity, in the future these witnesses/nodes may be called upon to produce. Voters and node operators should be able to identify which backups are configured properly and reliably.
As applications are built out and witness feeds become a critical point of failure, it will become even more important to know which backups are ready to assume active production with reliable feeds as well.

Althought this seems a very noble gesture and it is, the way the graphene blockchain software is designed is that it is able to handle 1001 active witnesses. That is more than currently on offer. Backup witnesses can already become active witnesses if major PPy stakeholders are convinced about their knowledge and experience and therefore vote more witnesses in. Instead of changing the software its best to convince stakeholders to vote for more witnesses. Additionally simply by seeing whomever is missing blocks will show who is reliable and can backup witnesses be voted out as soon as this is noticed. Imho :)

"Backup witnesses can already become active witnesses if major PPy stakeholders are convinced"
How will the stakeholders know who to vote on if these servers never get tested? It seems that the current method is going to compound and enforce a massive barrier to entry resulting in small elite group witnesses.
The website hosts a video encouraging people to become a witness. New people are being encouraged to spend money to become a witnesses and the majority will not be able to earn anything under the current system. With no trickle down blocks and only active witnesses being listed the system feels stacked against new people investing into the platform that were encouraged to do so as an opportunity to make money. This could result in resentment and negative sentiment towards the project being spread.

I'm not familiar with the internals of Graphene and Peerplays and don't know if this is possible,
but it would be nice to have a capability enabling backups/inactive witnesses to run in "shadow" mode. Essentially, they wouldn't be earning any PPY, nor would the blocks they produce be included in the production blockchain, however stakeholders would be able to see their statistics and make an informed decision regarding each inactive witness' performance and reliability, and subsequently vote those in.
Am I day-dreaming?

You can setup a testnet for testing block signing! But rest assured if you have console output in the witness_node about receiving blocks with latency info that your witness is running. You can verify block nums with the GUI blocks. You can try and use cli_wallet on the live chain and if that works you know you are connected and synced.
Only things you could have made mistakes with then and that you cannot know for sure unless you are active witness (or triple check), are the following config.ini settings:

Did not use the correct witness-id in the config.ini but the account-id. Witness object ids start with 1.6.X so cross check that with get_witness UrWitnessAccountName

Did not use the correct pub,priv-keypair in the config.ini settings. Use get_witness UrWitnessAccountName and check the public signing key. Then use get_private_key UrPubSigningKey to get the priv-key. Now crosscheck in config.ini if you have that correctly set at private-key= and also the correct order in the array: ["pub","priv"]

On 11 Jun 2017, at 04:50, Alex Lobakov<EMAIL_ADDRESS>wrote:
I'm not familiar with the internals of Graphene and Peerplays and don't know if this is possible,
but it would be nice to have a capability enabling backups/inactive witnesses to run in "shadow" mode. Essentially, they wouldn't be earning any PPY, nor would the blocks they produce be included in the production blockchain, however stakeholders would be able to see their statistics and make an informed decision regarding each inactive witness' performance and reliability, and subsequently vote those in.
Am I day-dreaming?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Bacchist's proposal is an acknowledgement of and solution to a real problem. It is superior to minimizing and justifying the problem.

So what is the problem then? Inactive witnesses not verifying blocks to check whether their software is actually working?
So then what would happen if it would be like steem and in-active witnesses would  once every couple of hours / day you are going to sit and wait until the block is signed and verified or failed and then start to debug potential problems and then restart your witness_node and wait another 24hrs to see if your fix was actually fixing the bug?
I think best would be to have more witnesses voted in as active and its supersimple.  This is simply reached by reaching out to high stakers and asking them to vote for more witnesses. That way all active witnesses are signing blocks every one or 2 minutes. Once high stakers vote more witnesses in within an hour more are active and can "test" their setup.
It is a matter of getting yourself heard, promote yourself and reach out to high stakers to vote for more witnesses to become active.
i think the core software devs are currently more busy with writing the actual chain software for lauching betting / game dApps and so they should imho now the basic consensus graphene chain is in place.
Nonetheless you could write some code and test your hypothesis and submit a pull request by merging steem code and graphene code. Imho.

On 11 Jun 2017, at 09:42, coloneldbugger<EMAIL_ADDRESS>wrote:
Bacchist's proposal is an acknowledgement of and solution to a real problem. It is superior to minimizing and justifying the problem.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Another to solution is: setup a proxy and gather many small & big ppy stakeholders to have their vote count through that proxy and then vote with that proxy on as many witnesses as possibke. Even extending it by writing some software for that specific proxy which removes votes on witnesses automatically by analysing witness performance.
Another solution: buy many ppy and become a high stakeholder :p

On 11 Jun 2017, at 11:12, Roeland P<EMAIL_ADDRESS>wrote:
So what is the problem then? Inactive witnesses not verifying blocks to check whether their software is actually working?
So then what would happen if it would be like steem and in-active witnesses would  once every couple of hours / day you are going to sit and wait until the block is signed and verified or failed and then start to debug potential problems and then restart your witness_node and wait another 24hrs to see if your fix was actually fixing the bug?
I think best would be to have more witnesses voted in as active and its supersimple.  This is simply reached by reaching out to high stakers and asking them to vote for more witnesses. That way all active witnesses are signing blocks every one or 2 minutes. Once high stakers vote more witnesses in within an hour more are active and can "test" their setup.
It is a matter of getting yourself heard, promote yourself and reach out to high stakers to vote for more witnesses to become active.
i think the core software devs are currently more busy with writing the actual chain software for lauching betting / game dApps and so they should imho now the basic consensus graphene chain is in place.
Nonetheless you could write some code and test your hypothesis and submit a pull request by merging steem code and graphene code. Imho.

On 11 Jun 2017, at 09:42, coloneldbugger<EMAIL_ADDRESS>wrote:
Bacchist's proposal is an acknowledgement of and solution to a real problem. It is superior to minimizing and justifying the problem.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

You didn't read this part of the problem? I will repaste:
" It seems that the current method is going to compound and enforce a massive barrier to entry resulting in small elite group of witnesses.
The website hosts a video encouraging people to become a witness. New people are being encouraged to spend money in order to become a witness and the majority will not be able to earn anything back under the current system. With no trickle down blocks and only active witnesses being listed the system feels stacked against new people investing into the platform that were encouraged to do so as an opportunity to make money. This could result in resentment and negative sentiment towards the project being spread."
I get that you are a Graphene tycoon that can float from project to project with great support from your previous work but to expect others to be able to accomplish that feat is somewhat callous and disconnected from reality.
Maybe the promotional materials should be updated to include the fact that if you've haven't already arranged votes from major stakeholders or aren't willing or capable to spend a fortune on stake yourself you will probably never make a penny back and shouldn't bother.
With so much competition in this space (Augur, Gnosis, Wagerr) good witnesses and developers will flee and go elsewhere. Why would someone stick around to invest more and develop for a system stacked against them?

Thx Colonel,
I feel that it is very early to say that this is a problem. If it would stay that way it definitely is. So yes a fix will be to list all witnesses in the GUI, I totally agree. Maybe currently the amount of active witnesses is just the result of one big stakeholder voting for (who knows) 2 or 3 witnesses because s/he saw this in the GUI this "funny option of voting" and hit 'add' once or twice or just for the list of displayed (active) witnesses.
So yes I feel your potential problem but to say it is a problem now already is very fast imho. PPY has only launched the GUI what, 2-3 days ago and now it is already expected that everything works just fine and what doesn't should already be adjusted by rigorously changing software and it's design... But then again I feel what you say if it is about this 'encouraging video' and then nothing happens with many witnesses, so maybe that should have been clearer in the video (should review it again myself).
Nonetheless I still feel that a simple solution (unfortunately I can't be of more help as I personally only had a 60 PPY buy-in) is to identify some large stakeholders and discuss how they see this and get them convinced to vote as many witnesses as they like. Because it is baked inside the chain software that within 1 maintenance interval it will just add more active witnesses if more big-stakers add more witnesses to their voting list. This is all when I say that there is no real problem: consensus should be reached through the voting. So yes a problem could be that high stakers are unaware they can vote more people. That definitely should be fixed, so I think we can agree on this.
On a side note(s) but actually this should not be on github, nonetheless I feel a bit offended & humbled at the same time by the wording 'graphene tycoon', so i want to say this:
Can you only imagine how I felt when seeing that witness list on steem about 10 months ago, thinking woaaah, woaahhh what does this GV sign mean? Additionally I hope I still continue to add new works and not just sit and "float from project to project due to previous work". I think I add my fair share of new stuff for every chain I am part of, so it feels a bit of a personal 'bark' to me. You can see all my announcements what I do, check my github or my steem blogs. I was also suprised to see the current voting distribution for PeerPlays although I have been active for a long time running up to PeerPlays new launch and then was already fairly acquainted with the project long before the testnets had launched.
Lastly just a fiy: I had run for steem a full expenses paid witness node (dedicated) for 3 months just for software experiments and to help my fair share because i have server side experience, before I became an active witness and with for example bitshares I ran a paid witness node (dedicated) for half a year before becoming an active witness.
We can discuss this further via telegram:roelandp :)

On 11 Jun 2017, at 21:07, coloneldbugger<EMAIL_ADDRESS>wrote:
You didn't read this part of the problem? I will repaste:
" It seems that the current method is going to compound and enforce a massive barrier to entry resulting in small elite group of witnesses.
The website hosts a video encouraging people to become a witness. New people are being encouraged to spend money in order to become a witness and the majority will not be able to earn anything back under the current system. With no trickle down blocks and only active witnesses being listed the system feels stacked against new people investing into the platform that were encouraged to do so as an opportunity to make money. This could result in resentment and negative sentiment towards the project being spread."
I get that you are a Graphene tycoon that can float from project to project with great support from your previous work but to expect others to be able to accomplish that feat is somewhat callous and disconnected from reality.
Maybe the promotional materials should be updated to include the fact that if you've haven't already arranged votes from major stakeholders or aren't willing or capable to spend a fortune on stake yourself you will probably never make a penny back and shouldn't bother.
With so much competition in this space (Augur, Gnosis, Wagerr) good witnesses and developers will flee and go elsewhere. Why would someone stick around to invest more and develop for a system stacked against them?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/PBSA/peerplays/issues/14#issuecomment-307649715, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPJALlzjlHNTGmTDZbsHBlhU3EBDI-9ks5sDDrlgaJpZM4N2Lbp.

" I feel a bit offended & humbled at the same time by the wording 'graphene tycoon', so i want to say this:
Can you only imagine how I felt when seeing that witness list on steem about 10 months ago, thinking woaaah, woaahhh what does this GV sign mean? "
It is not my intention to offend, sorry if some of my emotion leaks through. I know you also put in a ton of work for Steemfest and earned your prominence in the community. I'm not saying you don't deserve a top spot. I do think though that the current setup isn't very fair or decentralized and could be construed as a bait and switch given the current marketing materials.
I see this as a problem that needs to be fixed right away. I see this as incredibly important time which will cast how the system works out for years to come. Steem was a horrible launch and it is still dealing with the issues created by how a few people amassed staggering stakes for arguably not providing much. We should't want to recreate that imbalance yet seem to using a system design to make it even worse.
Right now is like moments after the big bang where forces are being forged that will forever shape what comes after.  We can see with every hour that passes a massive disparity growing between active and inactive witnesses. Even as the total VESTS voting for all witnesses was increasing across the board the active witness list shrank. The people receiving nothing have been campaigning and are earning votes yet the current system ignores the stake voting for them and sends all the rewards to very few.
Let's be real, much of the list isn't based on merit at the moment. It is largely a Steem and Bitshares popularity contest. I'm not trying to be offensive and pick on anyone but I have to bring up the fact that one of the top active witnesses, who leads the pack in missed blocks, is a teenager that lost his previous Steem witness server because he was grounded by his parents for getting bad grades.  I bring him up also because he is an example of how this purposed tweak would have shown his server was not configured properly prior to being thrust into the active list. Testnet is great for learning but it is not a true test that your production server is working and many would like to see at least one block signed in production before they can feel less anxiety.
I think the exposure within the GUI wallet is one of the largest culprits right now but combined with this issue of no blocks leaving the elite witness list it is being exponentially made worse.
I totally get wanting to focus on Dapps and making something useful out the chain but I'm of the opinion that this witnessing issue should come first since it get's worse every 3 seconds.
I don't see any benefit to the way it is working now other than to consolidate power. Is there any benefit for the greater system to not have some blocks trickle down to prospective witnesses? I'm really struggling to think of the benefits.
PS: I will fully admit to sounding like a butthurt whiner but that's kind of my point.

It would be nice to get an official stance on this issue from the PeerPlays developers. Are improvements to the witnessing system going to be worked on?

One added benefit of this approach is the "wildcard" witness actually adds additional manipulation resistance. If the top witnesses are all colluding, it's the wildcard that is used in order to submit the unapproval votes necessary to remove colluding witnesses (assuming a terrible event in which the "so called" elite are all colluding).
Having said that, I'm sure the PBSA team has a list of priorities right now and will choose the right time to potentially include this feature.


Guess ExchangeType if it is not set in RequestOptions

Motivation:
ExchangeType is a hint for performance optimization. If no RequestOptions is set, it is inferred from the type of HttpRequest. However, a custom RequestOptions is set, ExchangeType is not inferred even if the RequestOptions.exchangeType() is null.
Modifications:

Use ExchangeType.RESPONSE_STREAMING if RequestOptions.exchangeType() is null and HttpRequest is an instance of FixedStreamMessage.
If none of the above conditions are met, the method defaults to returning ExchangeType.BIDI_STREAMING.

Result:
ExchangeType is guessed correctly even if RequestOptions is set.

+ Please check the lint failures 🙇

Good question.
Armeria requests and responses are a stream that does not hold all messages. One variant is FixedStreamMessage which contains all objects at the creation time. Reactive stream processing for backpressure is not required for the unary message type.
Otherwise, we use a streaming ExchangeType to subscribe to the message one by one when a message is written to the wire.
My answer may not be sufficient to explain Armeria's stream processors. If you want to know more about that, please let us know.

Good question. Armeria requests and responses are a stream that does not hold all messages. One variant is FixedStreamMessage which contains all objects at the creation time. Reactive stream processing for backpressure is not required for the unary message type.
Otherwise, we use a streaming ExchangeType to subscribe to the message one by one when a message is written to the wire.
My answer may not be sufficient to explain Armeria's stream processors. If you want to know more about that, please let us know.

Thanks for explaining to me 🙇
I just started learning Armeria :)


Fixes 2246: fix conflict on guard creation

Summary
After reviewing the domain creation logic to handle race conditions on create, i determined the current method was best, but could use some simplification by use of errorWithResponseBody
while testing, however, i discovered that the content_Guard creation did not properly handle race conditions.
Testing steps

turn on content guard creation by setting clients -> pulp -> 'custom_repo_content_guards' to true in config.yaml
run the server
run:

curl -H "`./scripts/header.sh $RANDOM $RANDOM`"  http://localhost:8000/api/content-sources/v1/repositories/bulk_create/  -H "content-type: application/json"  -X POST -d '[{"name":"abc1", "url":"https://jlsherrill.fedorapeople.org/fake-repos/needed-errata/", "snapshot": true},{"name":"abc2", "url":"https://jlsherrill.fedorapeople.org/fake-repos/signed/", "snapshot": true}, {"name":"abc3", "url":"https://jlsherrill.fedorapeople.org/fake-repos/really-empty/", "snapshot": true}, {"name":"abc4", "url":"https://jlsherrill.fedorapeople.org/fake-repos/empty/", "snapshot": true}]'

This will try to create 3 repos with snapshotting in a random org.  Monitor the backend logs and verify no error occurs from the tasks
Checklist

[ ] Tested with snapshotting feature disabled and pulp server URL not configured if appropriate

https://issues.redhat.com/browse/HMS-2246

/retest