NullReferenceException in v1.0.9

Recently we tried to upgrade our usage of the Artifacts Credprovider to v1.0.9, but had to roll it back to an earlier version because we repeatedly, but not always, ran up against stack traces similar to this one with a NullReferenceException. It appears as though it might be related to MSAL's requirement for parent window handles when using the broker.
It looks like this ought to be taken care of as of v1.0.9 or later, but still fails for reasons we don't understand.
https://github.com/microsoft/artifacts-credprovider/blob/dc5f4a2da94af69f444b5fd709e889dce23ac026/src/Authentication/AzureArtifacts.cs#L76C89-L107
If there's another explanation for the fatal error here we'd like to know. We're eager to update to the latest version of this tool.
Stack Trace
Note that even though the logs here show that the application falls back to device code this is still fatal because stdout is being captured by another process here and that isn't actually visible to the user as a result.
[Verbose] [CredentialProvider]Running in stand-alone mode
[Verbose] [CredentialProvider]Command-line v1.0.9+1c7de8e6b84724a3f145ae469036d5e57cbcbc61: "$PATH_TO_CREDPROVIDER\credentialprovider.microsoft.exe" -Uri $FEED_URI -Verbosity Verbose
[Verbose] [CredentialProvider]Handling auth request, Uri: $FEED_URI, IsRetry: False, IsNonInteractive: False, CanShowDialog: True
[Verbose] [CredentialProvider]URI: $FEED_URI
[Verbose] [CredentialProvider]VstsBuildTaskServiceEndpointCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet with external endpoint credentials. Appropriate environment variable needs to be set.
[Verbose] [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTaskServiceEndpoint.VstsBuildTaskServiceEndpointCredentialProvider, cannot provide credentials for $FEED_URI
[Verbose] [CredentialProvider]VstsBuildTaskCredentialProvider - This credential provider must be run under the Team Build tasks for NuGet. Appropriate environment variables must be set.
[Verbose] [CredentialProvider]Skipping NuGetCredentialProvider.CredentialProviders.VstsBuildTask.VstsBuildTaskCredentialProvider, cannot provide credentials for $FEED_URI
[Verbose] [CredentialProvider]VstsCredentialProvider - Matched well-known Azure DevOps Service hostname: $SERVICE_HOSTNAME
[Verbose] [CredentialProvider]Using NuGetCredentialProvider.CredentialProviders.Vsts.VstsCredentialProvider to try to get credentials for $FEED_URI
[Verbose] [CredentialProvider]IsRetry: False
[Verbose] [CredentialProvider]Could not find cached SessionToken for $FEED_URI
[Verbose] [CredentialProvider]GET $FEED_URI
[Verbose] [CredentialProvider]Found AAD Authority from 401 headers: https://login.windows.net/$TENANT
[Verbose] [CredentialProvider]VstsCredentialProvider - Using AAD authority: https://login.windows.net/$TENANT
[Verbose] [CredentialProvider]VstsCredentialProvider - Attempting to acquire bearer token using provider 'MSAL Silent'
[Verbose] [CredentialProvider]VstsCredentialProvider - Bearer token provider 'MSAL Silent' failed with exception:\nSystem.NullReferenceException: Object reference not set to an instance of an object.
   at NuGetCredentialProvider.CredentialProviders.Vsts.VstsCredentialProvider.<HandleRequestAsync>d__8.MoveNext() in D:\a\_work\1\s\CredentialProvider.Microsoft\CredentialProviders\Vsts\VstsCredentialProvider.cs:line 138
[Verbose] [CredentialProvider]VstsCredentialProvider - Attempting to acquire bearer token using provider 'MSAL Windows Integrated Authentication'
[Verbose] [CredentialProvider]VstsCredentialProvider - Bearer token provider 'MSAL Windows Integrated Authentication' failed with exception:\nSystem.NullReferenceException: Object reference not set to an instance of an object.
   at NuGetCredentialProvider.CredentialProviders.Vsts.VstsCredentialProvider.<HandleRequestAsync>d__8.MoveNext() in D:\a\_work\1\s\CredentialProvider.Microsoft\CredentialProviders\Vsts\VstsCredentialProvider.cs:line 138
[Verbose] [CredentialProvider]VstsCredentialProvider - Attempting to acquire bearer token using provider 'MSAL Interactive'
[Verbose] [CredentialProvider]VstsCredentialProvider - Bearer token provider 'MSAL Interactive' failed with exception:\nMSAL.Desktop.<IP_ADDRESS>.MsalClientException:
        ErrorCode: window_handle_required
Microsoft.Identity.Client.MsalClientException: A window handle must be configured. See https://aka.ms/msal-net-wam#parent-window-handles
   at Microsoft.Identity.Client.Platforms.Features.RuntimeBroker.RuntimeBroker.<AcquireTokenInteractiveAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Broker.BrokerInteractiveRequestComponent.<FetchTokensAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.<FetchTokensFromBrokerAsync>d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.<GetTokenResponseAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.<ExecuteAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Identity.Client.ApiConfig.Executors.PublicClientExecutor.<ExecuteAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.Artifacts.Authentication.MsalInteractiveTokenProvider.<GetTokenAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at NuGetCredentialProvider.CredentialProviders.Vsts.VstsCredentialProvider.<HandleRequestAsync>d__8.MoveNext() in D:\a\_work\1\s\CredentialProvider.Microsoft\CredentialProviders\Vsts\VstsCredentialProvider.cs:line 138
[Verbose] [CredentialProvider]VstsCredentialProvider - Attempting to acquire bearer token using provider 'MSAL Device Code'
[Minimal] [CredentialProvider]DeviceFlow: $FEED_URI
[Minimal] [CredentialProvider]ATTENTION: User interaction required.

    **********************************************************************

    To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code $CODE to authenticate.

    **********************************************************************

[Warning] [CredentialProvider]A task was canceled.
[Verbose] [CredentialProvider]VstsCredentialProvider - Bearer token provider 'MSAL Device Code' failed with exception:\nSystem.NullReferenceException: Object reference not set to an instance of an object.
   at NuGetCredentialProvider.CredentialProviders.Vsts.VstsCredentialProvider.<HandleRequestAsync>d__8.MoveNext() in D:\a\_work\1\s\CredentialProvider.Microsoft\CredentialProviders\Vsts\VstsCredentialProvider.cs:line 138
[Verbose] [CredentialProvider]VstsCredentialProvider - Could not obtain credentials for $FEED_URI
[Verbose] [CredentialProvider]Unable to acquire credentials.]

Could you please provide some additional information about the context in which you're launching the credential provider?
From the logs, it looks like it's being launched from a console/process that doesn't have a parent window. Is this consistent with your scenario?

The null ref issue should be fixed with #468 and will be deployed with our next 1.1.0 release.
While this fixes the null reference exception, it will not fix the fall through to device code flow. To figure out why it falls to device code flow, we need more information about the environment or context this was run and verbose logging. The token providers only return null on a caught exceptions typically thrown by the MSAL client.
Since this issue was specifically calling out the null ref and is stale, I am going to close it. Please open a new one to address any remaining problems.


Combine Input Capture + Input Simulation

Hi @gmamaladze ,
There are two libraries that we see used together a lot:
https://github.com/gmamaladze/globalmousekeyhook (this library)
and
https://github.com/michaelnoonan/inputsimulator
Per this discussion:
https://github.com/michaelnoonan/inputsimulator/issues/15
the project author is open to InputSimulator being combined with this project into one library.  I wanted to find out if you are open to the same.  I am volunteering to do the work.

Is there any specific reason due to which you want to combine the two library together? Can’t we just reference two libraries together in a project?

@zaafar -
There is actually a lot of room for unification between the two libraries and some really great things that can be done when they are combined.  For example, I envision being able to record mouse and keyboard input and then being able to play it back.  With the libraries as they are today, that is technically possible but you end up having to do a lot of conversion between each apps formats.  By unifying them, there will be one data format for both listening to events and playing them back.

Hi all,
I wanted to let you know that the unification of these two libraries is well underway!  I will have things online and available most likely later this week.

Hi All!  Here's the initial release of WindowsInput:
https://www.nuget.org/packages/WindowsInput/6.0.0
http://github.com/tonyvalenti/windowsInput/


Bug: onStop returns wrong positions when using grid

When using grid, the x and y returned by onStop are incorrect. lastX and lastY however seem to be correct. I can't find a explanation for the values onStop returns for x and y.
I've created an example showing the behavior:
https://codesandbox.io/s/texthighlights-wtrzt
Please have a look at the console output when dragging the object around. I would have expected x and y to change based on the grid of [50,50] but this is not the case.
React-draggable is also used by react-rnd - they also have an issue open for this bug (https://github.com/bokuweb/react-rnd/issues/453)

Any update on whether anyone is looking into this? I'm experiencing this as well. Dragging to a grid is effectively broken as you can't guarantee that it will stay on that grid.

For anybody who is also experiencing this, I've found an okay workaround.

Make the component controlled (by passing in a position={{x:#, y=#}}
Use onDragStop, and within that set the state to the lastX and lastY.

While users can still end a drag in the incorrect position, the view immediately updates it after to the proper position.

Had the same issue and @jeffkillian's solution worked for me (though I'm not sure why this isn't the default behavior)!

Thanks for the report. I see two ways we can fix this:

Add the grid logic to onDragStop, or
Don't actually determine control position at all on drag stop, only allowing drag events to actually move the element.

2 is cleaner but I am not 100% sure it will not have side effects. Looking into it.

any updates on this?


Why use NetworkDirte when the client fails to communicate with the linux server corresponding to rdma_verbs

Windows platform and linux platform use rdma communication, linux use rdma_verbs as server, windows use ndspi communication, server receives remoteaddress and remoteToken sent by peer post_send operation, and performs IBV_WR_RDMA_READ operation, and the error code received when poll cq is IBV_WC_REM_ACCESS_ERR, observed The client-side memory permission is set to ND_MR_FLAG_ALLOW_REMOTE_READ | ND_MR_FLAG_ALLOW_REMOTE_WRITE, and the MW is set to ND_OP_FLAG_ALLOW_READ | ND_OP_FLAG_ALLOW_WRITE.

The remote access token to send to connected peers. This value is opaque to the client. This value should be in network order to enable interoperability with other system architectures.

the problem has been solved


Natural set of hotkeys

Will be nice to have a natural shortcuts.
CTRL + Backspace - remove only one word
CTRL + Z - undo
CTRL + Y - redo

FYI, all of these shortcuts work fine for me in master branch. Probably got fixed together with #143.

Fixed! Great work!


merge Preview/8.0.0

:x: Build TheIdServer 8.0.0-preview.1+113.build.3648 failed (commit https://github.com/Aguafrommars/TheIdServer/commit/b8ae90df2f by @aguacongas)

:x: Build TheIdServer 8.0.0-preview.1+113.build.3649 failed (commit https://github.com/Aguafrommars/TheIdServer/commit/b8ae90df2f by @aguacongas)

:white_check_mark: Build TheIdServer 8.0.0-preview.1+113.build.3650 completed (commit https://github.com/Aguafrommars/TheIdServer/commit/b8ae90df2f by @aguacongas)


new keywords

Since we're breaking (binary, at least) compatibility in the next release, I think it's a good time to consider the list of keywords we have in the language, and whether we should do a minor break to source compatibility to add new keywords.
So the question is: what syntax do we have (or propose) that would be improved by the addition of a keyword?
The only one that comes to mind immediately for me is the syntax for destructuring statements (discussed here #6446). By adding a new keyword (values, perhaps), we could "fix" the syntax for a destructuring statement, resulting in:
values (key -> item = 1->2,
       [first, *rest] = 1..10;

And:
values (Integer key -> Integer item = 1->2,
       [Integer first, Integer* rest] = 1..10);

Is there any other language feature like that?
The second thing that comes to mind is async/await. Are we going to need new keywords for that? Should we reserve them now?
(Please let's not turn this thread into a long re-discussion of #6446. The topic is keywords.)

I tend to dislike writing functions with (a lot of) side effects, but it seems other people like them.  It might be worth reserving yield.

We could also consider releasing keywords. We currently reserve assembly and abstracts, do we still need to reserve them? (I’m not sure about the current plan, but I think assembly might no longer need to be reserved if I understand correctly.)

I think assembly might no longer need to be reserved if I understand correctly

Yeah, I've been thinking that.

How about we make it a keyword, and open an issue to support this syntax:
persons
    .filter(it.age >= 18)
    .sortedBy(it.name)
    .map(it.email)
    .forEach(print(it))

@gavinking
There is already such an issue: #7190.
And I mean, is it so hard to simply prepend "(it)=>" on expressions? The syntax for lambdas was already designed to be as terse as possible; I just don't ever feel the need to have anything terser.

How about we make it a keyword, and open an issue to support this syntax:

:-1: from me.
A few examples of what I’m thinking of here:

Should.js, a random JS testing framework I just found with Google, lets you write (5).should.match(function(it) { return it.should.be.a.Number; });. it.should.be.a.Number, are you serious? What’s the meaning of it.should.be as a value in its own right? None.

Haskell has an on function, of type (b -> b -> c) -> (a -> b) -> a -> a -> c (that’s <A> => <B> => <C> => C(A)(A)(B(A))(C(B)(B)) in Ceylon). Its documentation starts with the “typical usage” of sortBy (compare `on` fst) list, which I’ll admit reads very nicely, but you try figuring that out from the name or the type if the function isn’t used in exactly this context. (The backticks turn the function into an infix operator.)

In Ruby Specs, you can apparently write stuff like some_expression.should == 0.0. That’s just black magic. How does this should member, which is somehow available on any value, consume the == operator, which should just be a normal infix operator comparing left-hand side and right-hand side, no matter what they are?

I think I got a bit triggered by the word “it” specifically, because that seems to be how loads of test frameworks also start this style of tests, but I really don’t like the look of this proposed syntax, even if it doesn’t go nearly as far as these other examples.

@lucaswerkmeister
What do you think about my suggestion? It's much simpler and more disciplined than what Gavin is proposing.
(By the way, I feel like you should answer it in that thread and leave this one to talk only about keywords.)

@lucaswerkmeister I'm not trying to make our code read like English, which I agree is foolish. I'm trying to make it easier to read and write code which processes streams.
persons
    .filter(it.age >= 18)
    .sortedBy(it.name)
    .map(it.email)
    .forEach(print(it))

Is far more readable than:
persons
    .filter((p) => p.age >= 18)
    .sortedBy((p) => p.name)
    .map((p) => p.email)
    .forEach(print)

Anyway, it turns out the feature doesn't really require making it a keyword, so the discussion doesn't really belong here after all.

How about self and static, like it is used in PHP (https://secure.php.net/manual/en/language.oop5.late-static-bindings.php). Currently, if one references a method of a class via MyClass.myMethod or \MyClass.myMethod``, it will always reference the same class, disregarding inheritance.
self would have the same meaning, but wouldn't require you to type out the class name each time (seems like a good move, considering the DRY principle).
static would always reference the class it is called from, i.e. it wouldn't require methods to be rewritten, if the extended class' methods reference the class they're in with that keyword.

How about self and static, like it is used in PHP (https://secure.php.net/manual/en/language.oop5.late-static-bindings.php). Currently, if one references a method of a class via MyClass.myMethod or `MyClass.myMethod`, it will always reference the same class, disregarding inheritance.
self.myMethod would have the same meaning, but wouldn't require you to type out the class name each time (seems like a good move, considering the DRY principle).
static.myMethod would always reference the class it is called from, i.e. it wouldn't require methods to be rewritten, if the extended class' methods reference the class they're in with that keyword.

I totally forgot about the static annotation. Would have to be named differently, then, obviously.

@phlopsi It looks interesting, but I'm not very clear on precisely what it's used for. Is it for something like what is proposed in #4005 (i.e. being able to define stuff like Summable.zero?

@gavinking Example:
class SuperLongClassNameThatNooneWantsToTypeOutMultipleTimes {
    shared void methodA() {
        print("Hello A");
    }
    shared void methodB() {
        value callableA = SuperLongClassNameThatNooneWantsToTypeOutMultipleTimes.methodA;
        value memberA = `SuperLongClassNameThatNooneWantsToTypeOutMultipleTimes.methodA`;

        ....

        callableA();
    }
}

class ClassB extends SuperLongClassNameThatNooneWantsToTypeOutMultipleTimes {
    shared void methodA() {
        print("Hello B");
    }
}

value a = SuperLongClassNameThatNooneWantsToTypeOutMultipleTimes();
a.methodB(); // prints "A"
value b = ClassB();
b.methodB(); // prints "A"

If self was a thing, one could write:
    ....

    shared void methodB() {
        value callableA = self.methodA;
        value memberA = `self.methodA`;

        ....

        callableA();
    }

    ....

I'd like to have this for the same reasons, we do not have to type out the class name again for the default constructor, unlike in other programming languages (e.g. C++, Java), because DRY.
As for static (actual keyword naming pending), if we write:
    ....

    shared void methodB() {
        value callableA = static.methodA;
        value memberA = `static.methodA`;

        ....

        callableA();
    }

    ....

and then execute small test again:
value a = SuperLongClassNameThatNooneWantsToTypeOutMultipleTimes();
a.methodB(); // prints "A"
value b = ClassB();
b.methodB(); // prints "B"

The call b.methodB() would actually print "B", instead of "A" as static refers to the class from the context it is called from; in this case, it's an object of ClassB, hence static.methodA refers to ClassB.methodA and not SuperLongClassNameThatNooneWantsToTypeOutMultipleTimes.methodA.

May be the keyword refine like it was projected a few years ago in feature oriented programming.
A way to implement #5211 issue (proxies).

callee for referencing the same function, which would be nice to have for recursive anonymous functions.
From JavaScript: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/arguments/callee


Some textures look worse in 6.4.7

A user reported that textures in his models used to look a lot better in 6.4.4 vs the current SDK version (6.4.7)
They used to look just like in his editing tools, but now they look "blotchy".

https://app.zenhub.com/files/220994476/72ce19d1-c6b9-4b15-b8f8-84215d8119a7/download
Did we maybe just change the default texture resolution in preview?

could this be related to this comment by @dzsunyec?
it seems setting the texture filtering mode to 0:NEAREST still doesn't show up after deployment

I am also experiencing the blotchiness/banding issue in 6.4.7 (see SDK preview comparison image below), but I'm assuming it has to do with texture bit depth and probably separate issue from the filtering.
Setting the filtering mode to NEAREST works with both the SDK Materials and Blender exported materials in preview, but not working in the deployed scene with neither 6.4.4 or 6.4.7.

We think this issue is related to texture compression. We are going to check if there are better compression alternatives but removing compression is not an option for now.

Just saw that we are using Compress(false) (low quality) on GLTFSceneImporter. Maybe this is related to that code.

HQ Compression:
Normal Compression:
No Compression:
I just tested with different settings for compresion and it's not helping that much. So we are closing the ticket as a not-an-issue. Sadly removing compression is not an option currently.

I just tested with different settings for compresion and it's not helping that much. So we are closing the ticket as a not-an-issue. Sadly removing compression is not an option currently.

@AjimenezDCL  It's not an issue in this specific case (an albedo texture), but it makes other types of maps close to unusable, especially emission maps and normals, both of which needs proper bit-depth to work properly. It's not like there's a choice made between bit-depth and file size since compression is applied on all inputs right? we can't use a single texture lookup of 32px with smooth gradients, it would show banding anyway, even if it's only a few Kb and the size is not an issue.


Seperate Device and DeviceSetting Controller

Is your feature request related to a problem? Please describe.
GET, POST, PUT etc. paths are in conflict to each other because Device and DeviceSetting are query both via DeviceController
Describe the solution you'd like
Create a DeviceSettingController and move the DeviceSetting properties to that Controller. Create a GetDevice interface in DeviceController after.

Not required anymore in v2


How to organize metadata exchange between entities

Hello, coming from MVP i have a question how to organize the following situation:
say i have a tile with position x,y; in this tile there is a car with manual shift, painted red and price $100. There is also driver, so 2 entities like this:
class carClass
{
shift, color
}
var newCar = new carClass(manual, red);
var carEntity = createentity;
carEntity.addPosition(x,y); //common data applied to other entities as well
carEntity.addPrice(100); //common data applied to other entities as well
carEntity.addCar(newCar );
var driverEntity = createenity;
driverEntity .isDriver = true;
and here is the question, it can be like this
driverEntity .addCarEntity(carEntity); // we have all metadata like position and other stuff. when do
//driverEntity.carEntity.value.price.value
OR
driver.addCar(newCar ); //we dont know position and price, so we have to make a lookup call something like
//context.getentitieswithcar(newcar);
TLDR
Is it a good idea to keep referencing other entities in entity components or i should avoid this and extract metadata with lookup functions or there is another approach?

Thank you


Warning in workflow about set-output command

GitHub has deprecated set-output command and will disabled it soon.
Warning seen in the workflow:
   The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

@amitak This warning is for which action? Is it under functions-action or any other action?

@patelchandni it is under functions-action, we should be updating @actions/core in package.json to above v1.10.0

and in actions.yml update to use node16

I can create a PR if that helps

Updated in latest released v1
https://github.com/Azure/functions-action/releases/tag/v1.4.8


Update dependencies

Obelisk wasn't compiling because it was referencing the latest yamerl master branch on GitHub. I pinned yamerl to the version used by yaml_elixir and then updated all the other dependencies while I was at it.

Hi there,
I just checked this PR locally, and this should not be merged as it is: it's breaking the CLI commands because of the anubis upgrade.
Parameters to the run function coming from anubis are now of the form {arguments, options, runtime_configuration} instead of only arguments.
Tests are passing because they are not testing the anubis part, only the run part of the obelisk task.
I've provided a quick fix here: https://github.com/vjousse/obelisk/commit/ec75ce1a8e64955871d278e6f587937e986be7d9
I would be interested in a way of testing the anubis part as it would avoid future problems with commands. Unfortunately, there is no example test in anubis and I don't really know where/how to start.

Sorry for being so slack with Obelisk @uranther - Thanks for your contribution. I'll have to look a bit longer at upgrades, as per @vjousse comment. I also think I'll jump all the way to Elixir v1.4.0 to bring Obelisk back up to date, so that may squash some of these changes.
I'll keep you updated either way.
Thanks again for contributing.

Thanks @vjousse and @BennyHallett! Yes, some automated tests for Anubis commands will be needed. I'll try to pull this up and work on it this week.


Unable to remove event listener during detached()

I have a CustomElement.
During attached() I create an <object>  (of type text/html) as a child of this CustomElement. I also add an event listener to the <object> like this:
obj.contentDocument.defaultView.addEventListener('resize', resizeListener);

Now I expected to be able to remove the resizeListener in detached() however by the time detached is called  obj.contentDocument is null.
Not sure if this will cause a memory leak or not. Anything earlier than detached I can use to remove this event listener?

You could try unbind instead of detached.  It would be nice to have a detaching hook though- @EisenbergEffect thoughts?
Another thing you could do is during attached, grab a reference to contentDocument.defaultView to enable calling removeEventListener in the detached method.

Thank you for the suggestions. Unfortunately unbind has the same problem.
I'm not sure I can grab a reference to defaultView very easily because it is not available at the time the object is created. I think it may 1st be available when its onload event runs. The code that I'm using to generate the object is outside my CustomElement, so while probably possible, it would be pretty awkward to get the reference back to my CustomElement when it finally becomes available.

I have a CustomElement.
During attached() I create an <object>  (of type text/html) as a child of this CustomElement. I also add an event listener to the <object> like this:

obj.contentDocument.defaultView.addEventListener('resize', resizeListener);

Could you add another couple of lines that do this:
var defaultView = obj.contentDocument.defaultView;
this.unsubscribeResize = () => defaultView.removeEventListener('resize', resizeListener);

Then in detached you could do this:
detached() {
  if (this.unsubscribeResize) {
    this.unsubscribeResize();
    this.unsubscribeResize = null;
  }
}


Year is Out of Range Bug

I'm trying to import all my photos from icloud. When it gets to a certain point it fails with the error:
/home/luke/Pictures/2016/09/24/IMG_3101-original.JPG already exists.:  55%|▌| 18392/33335 [09:22<08:43, 28.56it/s]Traceback (most recent call last):
  File "./download_photos.py", line 304, in <module>
    download()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "./download_photos.py", line 152, in download
    created_date = photo.created.astimezone(get_localzone())
  File "/usr/local/lib/python2.7/dist-packages/pyicloud/services/photos.py", line 451, in created
    return self.asset_date
  File "/usr/local/lib/python2.7/dist-packages/pyicloud/services/photos.py", line 457, in asset_date
    tz=pytz.utc)
ValueError: year is out of range

I opened an issue in pyicloud because it looked like it could be rooted there?

I had this issue. I created a smart album in Photos on Mac to display all
photos older than 1990 and deleted the ones that came up as they had
corrupted dates. The years were set to 0000. It was some filter app that I
had used years back.
Hope this helps :)
On Tue, 29 May 2018 at 08:48, lapint<EMAIL_ADDRESS>wrote:

I opened an issue in pyicloud
https://github.com/picklepete/pyicloud/issues/180 because it looked
like it could be rooted there?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ndbroadbent/icloud_photos_downloader/issues/74#issuecomment-392684224,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAy-nCkjf2pA_DFyj4_OZBJlZrLCiT6lks5t3P0ygaJpZM4UQr2q
.

@evenwebb Fantastic idea! Thanks for the advice, I'll try this afternoon! I'm almost certain that will fix the issue.

That worked, thanks so much.

Thanks for reporting this issue! I've fixed this with a workaround - https://github.com/picklepete/pyicloud/pull/184
I've also decided to store a copy of the pyicloud library in this repo (under ./vendor/pyicloud-0.9.1.zip), because some people were having problems installing my fork from github. The requirements.txt has also been updated to point to this vendored copy.
So I've just updated that with this bugfix, and you can start using the fix by running git pull, then pip install -r requirements.txt


can I get song data and play in my app with ShazamKit?

can I get song data and play in my app with ShazamKit?

You can play a snippet of the song but not the entire thing.

@alanjhughes I mean can i get details about the song by its name like searching etc??

No, they don't expose apis to do text search for songs. We'd need to build a lib using MusicKit to do that

@alanjhughes Yep, But then how do people on RapidAPI get APIS for searching songs on Shazam and getting details about it? Any idea about this? or tool in mind?

I'm not sure to be honest. Maybe Shazam had apis to do this but this library uses the apple provided ShazamKit so I can only use what it exposes. I need to do some work on this lib anyway so I'll see if anything has changed.


Cannot go to definition of type used in fragment

In queries/queries.graphql.
fragment ExperienceFragment on Experience {
  id
  title
  category {
    mainColor
    name
  }
  slug
  numRatings
  avgRating
  pricePerPerson
}

CMD+Click on Experience should go to Experience definition in src/schema.graphql.
https://github.com/prismagraphql/graphql-server-example

This works as soon as I change schema.graphql and it is re-read by language service. Most likely, this is a bug with reading relevant graphql files.

confirmed this is working for me. make sure that you include these files using the documents field in graphql-config@3, formerly known as include


lagg / performance problem in emulator.

I implemented google mobile ads in android part and every millisecond, every moment it prints things like following.
E/eglCodecCommon( 3464): glUtilsParamSize: unknow param 0x000085b5
D/EGL_emulation( 3464): eglMakeCurrent: 0xe95e5fa0: ver 2 0 (tinfo 0xce9af820)
I/chatty  ( 3464): uid=10079(com.example.matchify) identical 1 line
D/EGL_emulation( 3464): eglMakeCurrent: 0xe95e5fa0: ver 2 0 (tinfo 0xce9af820)
E/eglCodecCommon( 3464): glUtilsParamSize: unknow param 0x000085b5
D/EGL_emulation( 3464): eglMakeCurrent: 0xe95e5fa0: ver 2 0 (tinfo 0xce9af
it prints those things every moment without stopping and app is frozen. I get the apk and tried in real device, it wasn't that bad in real device( observations with naked eyes), but  I was not able to test see if it is problematic in the real device as well.

HI @canergulay
Thanks for filing the issue, Please share the output of flutter doctor -v,
what version of the google_mobile_ads plugin are you using and in what type of ad is the issue in?

`[✓] Flutter (Channel stable, 2.0.1, on Mac OS X 10.15.6 19G73 darwin-x64, locale en-IN)
• Flutter version 2.0.1 at /Users/mehulgohil/flutter_sdks/flutter_2_0_1
• Framework revision c5a4b4029c (7 months ago), 2021-03-04 09:47:48 -0800
• Engine revision 40441def69
• Dart version 2.12.0
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at /Users/mehulgohil/Library/Android/sdk
• Platform android-31, build-tools 31.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Users/mehulgohil/MEHUL_GOHIL/Softwares/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.11.2
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
• Chrome (web)                       • chrome        • web-javascript • Google Chrome 94.0.4606.81
• No issues found!
`
Here is the flutter doctor output.


Instrument build logic with artifact transform in GeneratePrecompiledScriptPluginAccessors

Fixes https://github.com/gradle/gradle/issues/28045

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test QF

I've triggered the following builds for you. Click here to see all build failures.

QuickFeedback build

@bot-gradle test QF

I've triggered the following builds for you. Click here to see all build failures.

QuickFeedback build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test QF

I've triggered the following builds for you. Click here to see all build failures.

QuickFeedback build

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle test this APT

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build
AllPerformanceTestsReadyForRelease build

@bot-gradle test this

@bot-gradle clean

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

@bot-gradle clean

@bot-gradle test this

I've triggered the following builds for you. Click here to see all build failures.

PullRequestFeedback build

The merge queue build has started. Click here to see all failures if any.

The merge queue build has failed. Click here to see all failures.

The merge queue build has started. Click here to see all failures if any.


fix should not colocate agg when do 2 phase agg

Proposed changes
Issue Number: close #xxx
Problem summary
Describe your changes.
Checklist(Required)

[ ] Does it affect the original behavior
[ ] Has unit tests been added
[ ] Has document been added or modified
[ ] Does it need to update dependencies
[ ] Is this PR support rollback (If NO, please explain WHY)

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall


[Question] How to use Indications vs Notifications

Is there a way to choose whether you're wanting to use indications or notifications in the characteristic.ValueUpdated() event handler? Or is this something that's handled automatically?
Thanks

Hi @StephanRaab,
I'm the friendly issue checker.
It seems like (100.00 %) you haven't used our issue template :cry: I think it is very frustrating for the repository owners, if you ignore them.
If you think it's fine to make an exception, just ignore this message.
But if you think it was a mistake to delete the template, please close the issue and create a new one.
Thanks!

Use Client characteristic configuration descriptor (00002902-0000-1000-8000-00805f9b34fb)


Pytest discovery fails

Type: Bug

Behaviour
Expected vs. Actual
I expect discovery to work, for the explorer to populate with tests. Instead I get pytest discovery error (see Output > Python)
Steps to reproduce:

Click the 'refresh tests' button on the testing pane

Diagnostic data

Python version (& distribution if applicable, e.g. Anaconda): 3.10.9
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
Value of the python.languageServer setting: Pylance

Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)

2023-07-06 19:06:05.076 [info] Discover tests for workspace name: cleo - uri: /home/kyle/dbgt/projects/cleo
2023-07-06 19:06:05.076 [info] Running discovery for pytest using the new test adapter.
2023-07-06 19:06:05.093 [info] > conda run -n cleo10 --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2023.11.11801006/pythonFiles/get_output_via_markers.py -m pytest -p vscode_pytest --collect-only tests
2023-07-06 19:06:05.093 [info] cwd: .
2023-07-06 19:06:07.783 [info] Test server connected to a client.
2023-07-06 19:06:07.785 [info] Using result resolver for discovery
2023-07-06 19:06:07.785 [error] pytest test discovery error
 Error Occurred, traceback: Traceback (most recent call last):
  File "/home/kyle/.vscode-server-insiders/extensions/ms-python.python-2023.11.11801006/pythonFiles/vscode_pytest/__init__.py", line 218, in pytest_sessionfinish
    session_node: Union[TestNode, None] = build_test_tree(session)
  File "/home/kyle/.vscode-server-insiders/extensions/ms-python.python-2023.11.11801006/pythonFiles/vscode_pytest/__init__.py", line 259, in build_test_tree
    session_node = create_session_node(session)
  File "/home/kyle/.vscode-server-insiders/extensions/ms-python.python-2023.11.11801006/pythonFiles/vscode_pytest/__init__.py", line 404, in create_session_node
    "path": session.path,
AttributeError: 'Session' object has no attribute 'path'

User Settings

languageServer: "Pylance"

formatting
• provider: "none"

testing
• pytestArgs: "<placeholder>"
• pytestEnabled: true
• autoTestDiscoverOnSaveEnabled: false

Extension version: 2023.13.11871009
VS Code version: Code - Insiders 1.80.0-insider (5b7440441bbd2548a862f7321cafdfa1597132e5, 2023-06-30T21:12:14.732Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Remote OS version: Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2

System Info

Item
Value

CPUs
Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
31.73GB (9.47GB free)

Process Argv
--crash-reporter-id 13862219-8062-4bb8-969d-b654fdb7b5e1

Screen Reader
no

VM
0%

Item
Value

Remote
WSL: Ubuntu

OS
Linux x64 <IP_ADDRESS>-microsoft-standard-WSL2

CPUs
Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz (16 x 2400)

Memory (System)
15.50GB (12.88GB free)

VM
0%

A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
vscod805cf:30301675
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
py29gd2263:30776702
vsclangdf:30492506
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30618038
pylantcb52:30590116
pyind779:30611226
pythonsymbol12:30651887
showlangstatbar:30737417
pythonms35:30671666
57b77579:30687741
pythonfmttext:30716741
pythoncmvfstr:30726892
fixshowwlkth:30771523
showindicator:30766888
pythongtdpath:30726887
i26e3531:30780429
gsofb:30778559
pythonnosmt12:30779711
pythonidxpt:30768918
pythondjangots:30768917
pythonnoceb:30776497
copilotsettingt:30767686
e537b577:30772214
h0f32768:30779712
synctok:30783813
dsvsc013:30777762
dsvsc014:30777825

Hi! Could you send your pytest version?

likely it is https://github.com/microsoft/vscode-python/issues/21540. If the version matches maybe the change didn't get out in the release.

I’m using 6.2.5
Eleanor Boyd @.***>于2023年7月10日 周一下午12:50写道：

Hi! Could you send your pytest version?
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode-python/issues/21576#issuecomment-1629348289,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEYOX7PW23HI4LY7MZ45HNTXPQXFZANCNFSM6AAAAAA2BCCWTM
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hi! Looking into this now but if you upgrade your pytest version you should no longer experience this issue. Thanks

I upgraded to 7.4 and it's still broken. This is what I get on Ouput->Python:
2023-07-13 17:53:48.535 [info] Discover tests for workspace name: cleo - uri: /home/kyle/dbgt/projects/cleo
2023-07-13 17:53:48.535 [info] Running discovery for pytest using the new test adapter.
2023-07-13 17:53:48.591 [info] > conda run -n cleo --no-capture-output python ~/.vscode-server-insiders/extensions/ms-python.python-2023.13.11941005/pythonFiles/get_output_via_markers.py -m pytest -p vscode_pytest --collect-only tests
2023-07-13 17:53:48.592 [info] cwd: .
2023-07-13 17:53:57.031 [info] Test server connected to a client.
2023-07-13 17:53:57.059 [info] Using result resolver for discovery

At least the test explorer populates, but when I click "refresh tests" I get an error notification Cannot read properties of undefined (reading 'test').
When I try to run them using the test explorer, the test results pane pops up and says "Finished running tests!" but none have actually been run.
On a side note, the Insiders test explorer seems to be broken a lot for Python...I usually use the command line for tests since it's broken so often. Even so, I'd like to be able to use the debugger more often.

Hi! The error notification is https://github.com/microsoft/vscode/issues/187770 and should be fixed now. The result panel saying "Finished running tests" and not having them run is likely a different problem. Could you check your logs and see if an error is seen there.
In the meantime, we are releasing a new infrastructure which could be your problem at this point in time as we are working out issues coming from users. This rewrite is helping with old buggy behavior but is still experimental. You can opt out of the rewrite as I get this fix in by setting this in your **user **settings: "python.experiments.optOutFrom": ["pythonTestAdapter"],. If this doesn't work let me know as this will mean it is a different issue. Thank you and I will send updates in this thread as I get a fix in.

Right. That error notification is now gone. But I still have "finished running tests" without tests being run. In Output->Python it says the new adapter is being used, and I don't see an error message in "Python", "Python Test Log", or "Python Language Server" when I try to run tests. Tests appear to be discovered correctly.
When I opt out from the new test adapter, test discovery is broken. All that shows up is the tests folder with no tests in it.

understood- thanks for the info! Will investigate

Hi,
I am having the same issue described above:

"Finished Running Tests" without being run
No error messages in "Python", "Python Test Log", "Python Language Server"
Tests run successfully (and see output) when running pytest from terminal.

I have:

opted in to ["pythonTestAdapter"]
freshly installed VS Code (removed local .config/.vscode configuration files), installation details below

The project I was experiencing this with was stored on a second disk, which I opened in VSCode using a symbolic link to my home directory.
Opened path (symlink): /home/jono/storage/[project_name]
Actual path: /mnt/storage/[project_name]

I replicated a simple project (see below) on my local drive with only a tests directory and a virtual environment to test whether the issue was to do my with my project structure.  The tests pass and the "Testing" panel UI is correctly updated.
When I load the original project through its 'actual path' (i.e. not using the symlink, /mnt/storage/...) then the tests are also run and the UI is correctly updated.
Perhaps this points to an issue with how the extension is resolving path names?
Happy to provide any additional info.
System Info
Version: 1.80.1
Commit: 74f6148eb9ea00507ec113ec51c489d6ffb4b771
Date: 2023-07-12T17:22:25.257Z
Electron: 22.3.14
ElectronBuildId: 21893604
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: <IP_ADDRESS>-electron.0
OS: Linux x64 5.19.0-46-generic

Test Project Structure
./
    test/
        base/
            test_simple.py
    .venv/
        [installed via python3 -m venv .venv]
    .vscode/
        settings.json

test_simple.py
import pytest
def test_hello():
    assert "Hello".lower() == "hello"

settings.json
{
    "python.testing.pytestArgs": [
        "tests"
    ],
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true
}

Hi @jonodhawkins thank you for the info! Looks like an issue with symlinks, which is something we know is broken. I am currently trying to fix it but having trouble repro-ing the behavior. To clarify your steps @jonodhawkins,

create "Test Project Structure" as described at a local path /mnt/storage/[project_name]
create "test_simple.py" as described
create symlink ln -s  /mnt/storage/[project_name] /home/jono/storage/[project_name]
cd to /home/jono/storage/[project_name]
run code . to open vscode
try to find tests and they are not being discovered

Thanks for your help!

there are a few different issues about testing and symlinks so I want to consolidate the discussion to this one: https://github.com/microsoft/vscode-python/issues/21373 if possible. Thanks

Hi @jonodhawkins thank you for the info! Looks like an issue with symlinks, which is something we know is broken. I am currently trying to fix it but having trouble repro-ing the behavior. To clarify your steps @jonodhawkins,

create "Test Project Structure" as described at a local path /mnt/storage/[project_name]
create "test_simple.py" as described
create symlink ln -s  /mnt/storage/[project_name] /home/jono/storage/[project_name]
cd to /home/jono/storage/[project_name]
run code . to open vscode
try to find tests and they are not being discovered

Thanks for your help!

if anyone has repro steps please comment and I can reopen- thanks


Chaining concurrently exit code not correct?

    "e2e:common:start": "concurrently --kill-others --success first 'yarn start:mockapi:self_serve --products aura-ds aura-db' 'npx wait-on https://localhost:9090 && yarn --cwd test/cypress e2e:self_serve:common'",
    "e2e:common": "concurrently --kill-others --success first 'yarn start:webpack:test' 'yarn e2e:common:start'",

[1] [1] npx wait-on https://localhost:9090 && yarn --cwd test/cypress e2e:self_serve:common exited with code 0
[1] --> Sending SIGTERM to other processes..
[1] [0] yarn start:mockapi:self_serve --products aura-db aura-db exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[1] yarn e2e:common:start exited with code 1
--> Sending SIGTERM to other processes..
[0] yarn start:webpack:test exited with code 1
error Command failed with exit code 1.

Seems to exit with code 1 even though I've set the --success correct?
Was expecting [1] yarn e2e:common:start exited with code 1 to exit with code 0.

Hey @basickarl can you provide more information, for example OS and concurrently's version?
I got the following on my macOS + concurrently v7.2.2:
$ concurrently -k -s first "sleep 1 && exit 1" "sleep 0.5 && exit 0"
[1] sleep 0.5 && exit 0 exited with code 0
--> Sending SIGTERM to other processes..
[0] sleep 1 && exit 1 exited with code SIGTERM

$ echo $?
0

Duplicate of #187?

Closing for now, but please let us know if you can still replicate or if it's a duplicate of #187 🙂


Zvu Browser

Zvu Browser - https://github.com/WhichBrowser/Parser-PHP/issues/204

Coverage remained the same at 100.0% when pulling c7956c352d25bc1f01755b453ee430e3e19371e9 on ayumi-cloud:Zvu into 4899110cd2f87b01e04ced62dbb9dec541031dee on WhichBrowser:master.


[KFNBC]: UI - Create frontend unit testing cases for notebook controller pages

Feature description
Since the KFNBC UI is already implemented, We will need to create frontend unit testing cases for it.
Describe alternatives you've considered
No response
Anything else?
No response

Closing this issue as Jupyter Tile is deprecated and doesn't need testing effort -- we have a lot of other code / flows that can be tested.


Add compiler error diagnostics to Python setup

Adds a build-failure-check that tries to trace back through what failed in the compilation. I haven't added zlib to the check because it seems like we intend on getting that statically included in the distribution by tomorrow.
cc @hsaliak @jayantkolhe

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Change content looks good; feel free to merge after resolving conflicts and optionally rerunning tests.


#210: Resolves issues with update of Roles

PR details
What is the purpose of this pull request? (put an "X" next to an item)
Please delete options that are not relevant.

[ ] Documentation update
[X] Bug fix
[ ] New metadata support
[ ] Enhanced metadata
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:

What changes did you make? (Give an overview)
Minor fix to ensure ObjectID is retrieved
Is there anything you'd like reviewers to focus on?
General apporach
Checklist

[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] ESLint & Prettier are not outputting errors or warnings
[X] README.md updated (if applicable)
[NA] CHANGELOG.md updated
[NA] ran npm run docs to update developer docs

Reopened as https://github.com/Accenture/sfmc-devtools/pull/212 due to wrong branch name


Audio content to fix

Here are the audio transcriptions that need content fixing.
@Ambg05 can you start with these?

 Creating a sharing culture

Yes, I'll just finish a file I started on Friday, review #141 as requested and then do this file.


[SourceKit] Expand editor placeholder to trailing closures inside a TryExpr

rdar://108391690

@swift-ci Please smoke test


feature: Added uuid validation to string type

Hey @tiagogoncalves89, I fixed what we suggested in the other PR and kept your commit, I hope you don't mind 😄

@talyssonoc Do you think we should support both guid and uuid since uuid is an alias for guid function on Joi?
https://github.com/hapijs/joi/blob/v14.3.1/API.md#stringguid---aliases-uuid

@wenderjean I would avoid aliases like that so we don't have a 1-1 map to Joi, the idea is to keep it consistent. But maybe we should use just guid instead of uuid since uuid is the alias and guid is the original, what do you think?

I do agree we could use only guid because it automatically leades me to think in a generic version and sure, allow developers to set an specific version in a future feature will be great.
When we merge this one I'm going to open an issue to add version options.


C3s mapping

Pull Request Checklist:

[x] This PR addresses an already opened issue (for bug fixes / features)

https://github.com/roocs/34e-mngmt/issues/75
https://github.com/roocs/clisops/issues/107
#111

[x] Tests for the changes have been added (for bug fixes / features)
[x] Documentation has been added / updated (for bug fixes / features)
[x] HISTORY.rst has been updated (with summary of main changes)
[ ] bumpversion minor has been called on this branch
[ ] I have added my relevant user information to AUTHORS.md

What kind of change does this PR introduce?:
Small changes to allow datasets without a time dimension to pass through
Gets rid of submodule for mini-esgf-data
use open_xr_dataset from roocs_utils.xarray_utils.xarray_utils in clisops.ops.subset but as expand_wildcards always returns a list, this will not affect ops.subset

Does this PR introduce a breaking change?:
Using master branch of roocs-utils temporarily - changes in this PR will only work with this branch
pyyaml>=5.3.*,<5.4 in requirements so documents build

Other information:

@Zeitsperre Would like to merge this today, just checking its ok by you

@Zeitsperre Would like to merge this today, just checking its ok by you

@ellesmith88 My changes are in and tests are passing locally. You can merge this as soon as the build clears or tomorrow morning! Thanks!

@ellesmith88 My changes are in and tests are passing locally. You can merge this as soon as the build clears or tomorrow morning! Thanks!


Obsoletion request: GO:0110046 signal transduction involved in cell cycle switching, mitotic to meiotic cell cycle

Obsoletion notice: GO:0110046 signal transduction involved in cell cycle switching, mitotic to meiotic cell cycle
The reason for obsoletion is that this term represents a mix of different pathways.
Thanks, Pascale

I am now struggling with this one. For the time -being I can move up to "regulation of meiotic cel cycle"
but this has quite a loss of information, because this term was used to annotate the "mater regulators which control entry into the meiotic cell cycle downstream of stress, cAMP and mating pheromone signalling.
See the big oval in the right-hand panel here:

So although I think the term label isn't great, I'm not keen on the loss of information either. Any suggestions?

Historically, we wanted this term to be "sexual differentiation" so "sexual differentiation signalling", but this caused problems with how "differentiation" meaning in GO IIRC so we came up with this clunky term and made sexual differentiation an exact synonym.
@edwong57  do you know what budding yeast would use here?
If its a problem, I can just go with "regulation of meiotic cell cycle" and try to figure out the pathways later (It isn't my area of expertise at all!)

@ValWood I'm not positive and can chat with SGD curators this week at TAGC, but if you are trying to capture signaling for mating, then it seems like a lot of the gene products in S. cerevisiae involved in mating are annotated to GO:0000750.

Actually you can go ahead and obsolete. I will manage with the existing g terms. This area is not particularly well-curated at PomBase so when we get to it we can request any terms we think are missing.
v


gh-159 updated copyright

Codecov Report

:exclamation: No coverage uploaded for pull request base (develop@3c853d0). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             develop     #164   +/-   ##
==========================================
  Coverage           ?   72.33%
  Complexity         ?     1154
==========================================
  Files              ?      167
  Lines              ?     3419
  Branches           ?      361
==========================================
  Hits               ?     2473
  Misses             ?      768
  Partials           ?      178

Impacted Files
Coverage Δ
Complexity Δ

...ava/uk/gov/gchq/koryphe/impl/function/ToBytes.java
63.15% <ø> (ø)
7 <0> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c853d0...d6423dd. Read the comment docs.


Failing to get_or_create host due to parameters as array instead of hash?

Having trouble with Zabbix API in 3.0 and 3.2 when get_or_create hosts. Here's the error:
/Library/Ruby/Gems/2.0.0/gems/zabbixapi-2.4.7/lib/zabbixapi/client.rb:90:in `_request': Server answer API error (ZabbixApi::ApiError)
 {
  "code": -32602,
  "message": "Invalid params.",
  "data": "Incorrect arguments passed to function."
}
 on request:
 {
  "method": "host.create",
  "params": [
    {
      "host": "jrbeilke.com",
      "interfaces": [
        {
          "type": 1,
          "main": 1,
          "useip": 0,
          "dns": "zabbix.jrbeilke.com",
          "port": "10050"
        }
      ],
      "status": 0,
      "available": 1,
      "groups": [
        {
          "groupid": "94"
        }
      ],
      "proxy_hostid": null
    }
  ],
  "id": 186,
  "jsonrpc": "2.0",
  "auth": "9a41234f712f35fa98e672b301238bcab"
}

Looks like it's complaining that zabbixapi is sending the params as an array instead of a hash when using hosts.get_or_create():
zabbixhostid = zabbixapi.hosts.get_or_create(
        :host => "jrbeilke.com",
        :interfaces => [
          {
            :type => 1,
            :main => 1,
            :useip => 0,
            :dns => "zabbix.jrbeilke.com",
            :port => "10050"
          }
        ],
        :groups => [
          {
            :groupid => "94"
          }
        ]
      )

Please disregard.
Seems I was missing the ip param for the interface, which is required even when using DNS resolution for the Agent.


Container hangs on startup if -v /etc/nginx/conf.d  is mapped to a host directory

With the following command:
docker run -d --name nginx --restart=always -p 80:80 -p 443:443 \
       --name nginx-proxy \
       -v /volumes/certs:/etc/nginx/certs:ro \
       -v /etc/nginx/vhost.d \
       -v /usr/share/nginx/html \
       -v /var/run/docker.sock:/tmp/docker.sock:ro \
       jwilder/nginx-proxy

Adding any one of the following volumes causes the container to hang on startup:
   -v /etc/nginx/conf.d:/etc/nginx/conf.d:ro \
   -v /etc/nginx/conf.d/my_config.conf:/etc/nginx/conf.d/my_config.conf:ro \
   -v /some/path/my_config.conf:/etc/nginx/conf.d/my_config.conf:ro \

Any ideas?  Jut want to add a proxy wide config from a host directory.  Am i missing someting here?

Got it, conf.d directory can not be read only ro, and my_config.conf had an error.  Just one of those days...


Allow whitelisting to server

Describe the feature
It would be nice to have a whitelisting script to when they are whitelisted in cad they automatically get whitelisted in game aswell.
Additional Context
No response

This is already possible with the use of the Public API


Create Device form - display form error messages.

Expected Behavior

Current Behavior

Steps to Reproduce

Context (Environment)
Browser

Container Operating System

Docker

Logs

Additional Information

Linked with issue #135


Debug messages not thread-safe

Due to the use of an intermediate buffer (the debug_fmt routine), macros like SSL_DEBUG_MSG are not thread-safe and can return (partial) messages from different threads. Those messages are then combined with e.g. file and line number, which therefore may result in debug messages that are plain wrong.
A simple test with 100 threads producing 1000 unique messages each (they basically logged their thread id and a counter), resulted in over 25% duplicate messages on my machine.
This could probably be avoided by not using the intermediate, globally static buffer. It is only used for debug_print_msg anyway.

Which version are you using?
Which global static buffer do you mean exactly?

I think he is talking about line 69 in this file: https://github.com/ARMmbed/mbedtls/blob/61977614d84c7b4d6aeaecaa003977472d4114db/library/debug.c
Removing the static attribute for the buffer should do the trick.

Indeed i was wrong.
However, using a thread local storage buffer (__thread attribute for gcc) should works.

Thanks for your report! We agree with you analysis. We can't just removed the static because the function returns a pointer to this buffer, so we'll move to dynamic allocation instead.


Setup mongodb lib service and route csv import users

it doesn't is in current milestone. Add a description.


DBZ-1962 Introduce column.whitelist for the Postgres connector

https://issues.redhat.com/browse/DBZ-1962
Right now the Debezium Postgres connector just supports column.blacklist. Added column.whitelist as well which might be convenient in some cases.

@gunnarmorling Fixed your comments and added the extra test you requested. Please check again.

Thanks a lot, great work! Added one small commit for adding the option descriptions and applied. Will be part in 1.2.0.Beta1 in three weeks.

@jhuiting btw. is your organization using Debezium in production already? If so, would you be interested in being listed as a user here: https://debezium.io/community/users/?
In that case, all it'd take is a PR for https://github.com/debezium/debezium.github.io/blob/develop/community/users.asciidoc. Thanks a lot for your consideration!

@gunnarmorling We're not in production yet, but when we are I'll open a PR. Thanks for the suggestion.


docker: use base images with qemu--static

skip skydive-compile-tests
skip skydive-functional-hw-tests
skip skydive-functional-tests-backend-elasticsearch
skip skydive-functional-tests-backend-orientdb
skip skydive-go-fmt
skip skydive-k8s-tests
skip skydive-scale-tests
skip skydive-selenium-tests
skip skydive-unit-tests
skip skydive-cdd-overview-tests

run skydive-ppc64-tests

run tests

run skydive-ppc64-tests

run  skydive-create-docker-image

run skydive-create-docker-image

This one should fix the issue: #2019
optionally we can run the following command to setup this environment:
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

The current issue is that on Ubuntu we get:
daily_build@iris-nvt:~/community/go/src/github.com/skydive-project/skydive$  docker run -v /usr/bin/qemu-ppc64le-static:/usr/bin/qemu-ppc64le-static -it ppc64le/debian
Unable to find image 'ppc64le/debian:latest' locally
latest: Pulling from ppc64le/debian
ed6056cee913: Pull complete
Digest: sha256:97d2acd90d1ed701ea6ea44088d0123f6cab08d729b37778b29d44fc428193cd
Status: Downloaded newer image for ppc64le/debian:latest
root@848c37eeea6a:/#
root@848c37eeea6a:/# exit
exit
daily_build@iris-nvt:~/community/go/src/github.com/skydive-project/skydive$ docker run  -it ppc64le/debian                                                      standard_init_linux.go:190: exec user process caused "no such file or directory"
daily_build@iris-nvt:~/community/go/src/github.com/skydive-project/skydive$

run skydive-create-docker-image

run skydive-create-docker-image

The solution we used in IBM internal build was to 'fake' Ubuntu (19.04) to include the needed qemu tools set. This works for ppc.
As for x390x ... there is not solution as there are multiple bugs in the toolchain ... no solution for now.

@eranra @hunchback did you try with this
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

I did try on ubuntu with success with all the ARCHes


Device Request: Add pinetab 2 support

Looks like right now pinetab 1 is supported but not pinetab 2. There is another nixos repo that has pinetab 2 support https://github.com/nabam/nixos-rockchip but it would be nice to also have it supported here with the rest of the pine devices.

Biggest show stopper/annoyance before was lack/buggy built in wifi support but that has improved recently to the point where arch is now enabling the new bes2600 driver automatically on boot and should not have as many issues as before.

Should this request go to this repository?
https://github.com/NixOS/nixos-hardware
@samueldr

It depends.
Those systems may or may not require enough hand-holding and care to make inconvenient to handle in there. But TBF I've not been tracking whatever happens there since I left the NixOS project.


Vote txs per block are less than 1 vote per validator

Problem
Given a cluster of fully performant validators, we would expect there to be 1 vote per validator in each block. This is not what we observe in practice. There is also a reduction of votes from epochs prior to 578 and current epochs. Similarly, there is a large discrepancy in landed vote transactions for each leader slot.
Analysis
A sample of 10k slots from epochs 577 and 628 show that there are less vote txs per block:
                      | Epoch<PHONE_NUMBER>55 to 249313455 | Epoch<PHONE_NUMBER>83 to 271299183
Total vote txs        | 9325696                           | 8703855
Avg vote txs per slot | 932.5696                          | 870.3855

Interestingly, we see in 628 there are more vote transactions landing in the first leader slot, while there are less for the second and third leader slot. There is a sharp decline in the 4th leader slot that is consistent for both 577 and 628

Breaking this down by latency, we see that there are less latency 1 votes (votes for the immediately previous slot) in general. The 4th leader slot has very few latency 1 votes in comparison:

One possible explanation for the 4th leader slot having so few latency 1 votes could be the vote tpu sending logic, which selects the leader at a 2 slot offset in order to forward to:
https://github.com/anza-xyz/agave/blob/5263c9d61f3af060ac995956120bef11c1bbf182/sdk/program/src/clock.rs#L141
This implies that a vote for the 3rd leader slot can only land in the 4th leader slot through gossip.
Another explanation for overall poor tx inclusion is related to forks. If the next leader chooses to build off a different parent, votes for the previous leaders slots will fail the slot hashes check. As we've modified banking stage to only hold the latest vote per validator, even if there was a previous vote for a parent that has not been included in this fork, it has no chance to land. Also since we only send vote tx to the tpu of the slot + 2 leader, these votes can only land through gossip for the next leader that decides to build off of the main fork.
We can see this in action here, as slots 271409560 - 63 was a minor fork, meaning any votes for 58-59  could have only landed through gossip on 64.

Solutions

Allow votes for the 3rd leader slot to be sent to both the current leader and next leader through tpu.
Rework the banking stage vote ingestion, to be smarter about the slot hashes check and continue to hold onto votes that do not pass the check for the current working bank, as a leader could switch forks during there 4 leader slots.

Another possibility is that replay is not keeping up and vote transactions are not being sent in time for inclusion. I will follow up with some more individual vote timing metrics.

Restricting the sample to only rooted blocks, slightly improves vote numbers but not by much:

Not too much vote deduplication during this range

One possible explanation for the 4th leader slot having so few latency 1 votes could be the vote tpu sending logic, which selects the leader at a 2 slot offset in order to forward to:
https://github.com/anza-xyz/agave/blob/5263c9d61f3af060ac995956120bef11c1bbf182/sdk/program/src/clock.rs#L141
This implies that a vote for the 3rd leader slot can only land in the 4th leader slot through gossip.

When testing this out in practice, it seems that the vote can be sent to the leader at a 3 slot offset or more. next_leader uses the poh_recorder which is based on the last reset bank, not necessarily in sync with the vote_bank. Adding tpu logging to local_cluster::test_spend_and_verify_all_nodes_3 (3 node cluster, no intentional forking) we see this is the case:

Leader Slot
Total votes
# of votes sent to leader + 2
# of votes sent to leader + 3
# of votes sent to a leader that could not land it in latency 1

1
58
38
20

2
56
40
16
16

3
58
41
17
58

4
58
36
22

In the presence of forks, the reset bank could be on a completely different fork than the vote bank, causing even poorer inclusion.

Ran a small patch to log which slot's leader we send a vote tx to against mainnet (non voting validator), we see a larger range of the desync between the slot selected through the poh_recorder and the vote_slot. The columns are slot who's leader we sent the vote to - vote_slot

Leader Slot
-6
-5
-2
-1
0
1
2
3
4
5
6
7
8
9
Total

1
1

12
17
1

518
434
76
18
14
6
3
1
1101

2

2
8
13
2
28
666
430
2
2
2

1155

3

1

2
767
378
3

1151

4

793
357
2

1152

Total
1
2
20
31
3
30
2744
1599
83
20
16
6
3
1
4559

This is also gives us a smaller # of vote txs that could land with latency 1, without the aid of gossip of tx forwarding:

Leader Slot
# vote txs not sent to the leader of the next slot
# vote txs sent to the leader of the next slot

1
148
953

2
446
709

3
1148
3

4
0
1152

Although this could explain some of the discrepancies of landed votes, there are probably additional things going on.

Linking https://github.com/anza-xyz/agave/pull/2607 (send to poh_slot + 1 and poh_slot + 2)
Also https://github.com/anza-xyz/agave/pull/2605 fixes a bug in retryable vote packets which will improve inclusion

Hi @AshwinSekar. Is there any plan to backfill vote txs after we failover to the heaviest fork? I understand that would increase vote inclussiong as well, even though I'm not sure if that would help for the consensus.

It doesn't increase vote inclusion in this context, as you can't retroactively add votes to blocks that have already been produced.
It is risky to backfill, as you are artificially increasing your lockout on whatever fork you choose to backfill. If for whatever reason you need to switch off this fork, you will have to wait longer.

#2607 and #2605 are present in v2.0.7 which has 63% adoption on testnet in epoch 683. Here's a comparison with some prior epochs 671 & 672 (2.0.4).
Note: These numbers are for testnet, and should not be compared to the mainnet graphs above. Also these numbers include vote transactions from firedancer which has approximately 27% stake:

Epoch 671
671 Avg Votes
Avg Latency 1
Avg Latency 2
Avg Latency 3
Avg > Latency 3

1
1,248.66
601.20
543.42
4.51
99.52

2
632.89
550.98
42.31
16.32
23.29

3
682.71
519.40
147.90
2.91
12.50

4
209.01
31.33
145.77
8.77
23.14

Epoch 672
672 Avg Votes
Avg Latency 1
Avg Latency 2
Avg Latency 3
Avg > Latency 3

1
1,245.18
603.35
541.97
3.95
95.91

2
615.44
552.21
38.76
5.72
18.75

3
680.63
520.67
147.24
2.47
10.24

4
207.94
30.78
145.57
8.71
22.89

Epoch 683
683 Avg Votes
Avg Latency 1
Avg Latency 2
Avg Latency 3
Avg > Latency 3

1
959.76
596.19
260.96
3.68
98.92

2
556.30
525.29
18.80
3.13
9.08

3
679.25
503.99
165.15
2.90
7.21

4
596.80
382.95
191.43
6.75
15.67

We have a huge increase in votes (and latency 1 votes specifically) for the 4th leader slot. I believe this can be attributed to #2607 sending to poh_slot + 1 🎉 .

CC @ilya-bobyr - You may find this interesting given your investigation into leader targeting

Let's assume an ideal state with 0 network delays, forking, or skipped slots.
And we have the fix to send to slots +1 and +2.
I think the targeting ends up looking like so:

Vote for Block
PoH slot
Leader Slot
Leader

0
1
2,3
A

1
2
3,4
A,B

2
3
4,5
B

3
4
5,6
B

4
5
6,7
B

5
6
7,8
B,C

6
7
8,9
C

7
8
9,10
C

This seems overly pessimistic. Seems like it could be even better if we also included slot offset of 0:

Vote for Block
PoH slot
Leader Slot
Leader

0
1
1,2,3
A

1
2
2,3,4
A,B

2
3
3,4,5
A,B

3
4
4,5,6
B

4
5
5,6,7
B

5
6
6,7,8
B,C

6
7
7,8,9
B,C

7
8
8,9,10
C

The only net differences is that we'll try to include votes for:

block 2 into leader A (slot 3)
block 6 into leader B (slot 7)

This is a slight increase from 5 vote txs to 6 vote txs sent across the network for every 4 blocks.


test: give each test suite an indepedent workspace

Gives each test-suite its own workspace in the test/testWorkspaces/ directory.
The contents of each workspace is then copied to the test/activeWorkspace/ directory at the appropriate time.

Even better could we track the files we are supposed to delete?

I tried it, but it becomes annoying when a test run is canceled mid-way (if it's hanging for example). Then that information is lost, and you'll need to delete the files manually, or the test starts acting weird.

Even better could we track the files we are supposed to delete?

I tried it, but it becomes annoying when a test run is canceled mid-way (if it's hanging for example). Then that information is lost, and you'll need to delete the files manually, or the test starts acting weird.

OK, but then let us at least limit ourselves to deleting files with the expected extension e.g. .flix and whatelse.

The test failure is because of the Circle(Int32) vs case Circle(Int32) bug. It should otherwise be safe to merge.

The test failure is because of the Circle(Int32) vs case Circle(Int32) bug. It should otherwise be safe to merge.

Can we mark that specific test as ignore?

Thanks!


Can't work on GraalVM complied Java APP

My java application is compiled using GraalVM
But I found that in the code I use
tempRegistry = Encodings.newDefaultEncodingRegistry();
encodingRegistry.getEncoding(EncodingType.CL100K_BASE);

Will cause an error
java.lang.IllegalStateException: Could not find /com/knuddels/jtokkit/r50k_base.tiktoken in resources
Is there any solution？

According to https://www.graalvm.org/latest/reference-manual/native-image/guides/include-resources/ you can try adding -H:IncludeResources=".*tiktoken$", although I never tried if it picks up resources in JARs
If all else fails, you can manually extract the files from the jtokkit JAR and add them as mentioned in the linked resource above

I added it in the resources-config.json configuration file
such as
{"pattern":".*tiktoken$"}

then it fixed
Thank you so much!


Support for next.js v13

What version of this package are you using?
2.0.0-experimental.3
What problem do you want to solve?
Now next.js officially implemented the "app" folder, which has many new features for the nextjs router and pages (https://nextjs.org/blog/next-13).
Currently next-translate doesn't look for pages in the "app" folder and (in my case) when I try to compile, the nextjs compiler gets stuck using next-translate.
What do you think is the correct solution to this problem?
Allow compatibility with nextjs v13.
Are you willing to submit a pull request to implement this change?
I don't know.

There are some things to consider:

You currently can change the pages folder to app using pagesInDir in the configuration: https://github.com/aralroca/next-translate/tree/canary#3-configuration However, in the new layouts they replace the getStaticProps and getServerSideProps to fetch... This is not supported yet in the Next-translate Webpack plugin, but you can use the getT method to load the namespaces you need in each page.
It's also in alpha replacing Webpack to Turbopack... In this point our Webpack plugin is going to be irrelevant.
Next.js 13 should work well with pages, to use this app for the layouts you need to activate an experimental flag, and everything is in beta and may can change.

As the beta progresses, if so, I would look for an alternative to the Webpack plugin, to make it more efficient. I think spending energy to make the Webpack plugin work 100% well for layouts would be something that may soon change completely with Turbopack.
The ideal would be to focus version 2.0.0 of Next-translate to support layouts in a different way (without Webpack plugin), but easy, simple and fast.

I close the issue because looks that is working fine with Next.js 13

@aralroca
// ../components/i18n.tsx
'use client';

import I18nProvider from 'next-translate/I18nProvider';
export default I18nProvider;

// app/layout.tsx
import I18nProvider from '@/components/shared/chakra/i18n';

import Footer from '@/components/shared/footer';
import NavBar from '@/components/shared/navbar';

import commonEn from '../locales/common.json';

export default function RootLayout({ children }: { children: React.ReactNode }) {
	return (
		<html lang="en-US">
			<head />
			<body>
				<I18nProvider lang={'en-US'} namespaces={{ commonEn }}>
						<NavBar />
						{children}
						<Footer />
				</I18nProvider>
			</body>
		</html>
	);
}

export default async function Page() {
	const lang = await getT('en-US');
	return <h1>{lang('app_name')}</h1>
}

@aralroca is there any specific configuration that allows to run next-translate against Next.js 13? I cannot get it to work with following config:
// next.config.js
const nextTranslate = require('next-translate');

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    appDir: true,
    allowMiddlewareResponseBody: true,
  }
};

module.exports = nextTranslate(nextConfig);

// i18n.js
module.exports = {
  locales: ['en', 'pl'],
  defaultLocale: 'en',
  defaultNS: 'dashboard',
  pages: {
    '*': ['dashboard'],
  },
};

// locales/en/dashboard.json
{
  "save": "Save",
  "clientId": "Client ID",
  "clientIdTooltip": "Should contain lowercase a-z characters optionally separated by dash (\"-\") character"
}

Using following code in app/**/page.tsx does not seem to be working
 const { t } = useTranslation();
 ...
 t('clientId'); // returns "clientId"
 t('save');  // returns "save"
 t('clientIdTooltip');  // returns "clientIdTooltip"

I close the issue because looks that is working fine with Next.js 13

Did you mind about adding example ( Next.js 13 using app directory feature ) in docs?

app-dir is now already supported in 2.0.0-canary.3 😊😊


Fix building on Android

We let all_users() pretend that no users exists since getpwent() and friends does not exist in the Android libc (and iterating over all users is not a very useful operation on Android, where every installed app gets a Linux user assigned with a cryptical username).
Fixes #15.
Not tested heavily - what I have done is built exa with this and used it on Android (run pkg install exa in Termux).

Thanks for this. I’m not sure how to test on Android but I’ve read over the code and it looks good.

Released as 0.8.1


Mutators not working

I recently started using adonisjs for my project.
I tried to use mutators to modify the values stored in db but they do not work with models
Package version
develop
Node.js and npm version
Node v10.12.0
Npm v6.4.1
Sample Code (to reproduce the issue)
'use strict'

const Model = use('Model')

class Post extends Model {
  getTitle (title) {
    return title.replace(/^(.)|\s(.)/g, ($1) => {
      return $1.toUpperCase()
    })
  }

  static get computed () {
    return ['fullname']
  }

  getFullname ({ firstname, lastname }) {
    return `${firstname} ${lastname}`
  }
}

p = new Post()
p.merge({
  title : "helloworld",
  firstname : "Test",
  lastname : "User"
})

console.log(p.title)
/*
prints 'helloworld'
expected 'Helloworld'
*/
console.log(p.fullname)
/*
prints undefined
expected 'Test User'
*/

The computed properties are invoked when you call toJSON on the model instance. I believe it's covered by the docs https://adonisjs.com/docs/4.1/database-getters-setters#_computed_properties

Shouldn't they work without converting to json object?

Nope, not the intend design for the current version and changing it means a breaking change. However, the newer major release does handle it as per the design you have proposed


ParseJson & ParseHex

When we have to create an object instance from its string representation, the .NET Framework is very consistent, it provides a Parse static method. NBitcoin provides Parse methods in many cases and also contructors with string parameters in other clases.
UInt32.Parse("12") is the .NET Fx convention. new UInt32("12") is not.
Now, in some cases we shouldn't call Parse to those methods that receive a string as parameter because that could be confusing. In code:
UInt32.Parse("12345")   // this is ok
UInt256.Parse("12345") // fails even when 12345 is a valid uint256 value (base10)
That's why in some cases the Parse method should be called differently. In this case (uint256) it should be called ParseHex.
UInt256.ParseHex("12345") // now it is clear that 12345 is not a valid hexadecimal value
Something similar happens with other Parse methods that receive strings but is not clear what the expected string representation is. For example Block.Parse which expects a json representation and not a hex representation. Look:
BlockHeader.Parse() // this method expects a hex representation
Block.Parse() // but this method expects a json. it´s not consistent.
In this cases it should be called ParseJson.
This PR doesn't break the existing NBitcoin contracts but uses ObsoleteAttribute in order to let the developer know that the used method could be remove in the future.

I do not agree with ParseHex I think a simple comment in the  of Parse to say it is expecting hex is enough.
However, Block.Parsemethod should not parse JSON. I propose we change the implementation to parse hex instead. I bet no person is usingBlock.Parse` for json anyway as it is now.
I'd like to keep the string constructor, because it makes the library more discoverable.

Well, I understand you don't like ParseHex. In fact, I don't like it neither.  Agree.
Block.Parser should Parse Hex instead of json. Agree.
About string constructors. Are you really sure? .NET programmers don't expect those constructors because they have never seeing them before in the .NET world. I mean, everybody knows that DateTime doesn't have a string constructor.

new DateTime("10/10/2016") but a DateTime.Parse("10/10/2016") and the same is valid for every class in the BCL. Why should NBitcoin be different? I cannot agree wit you here. Please think about it.

Ok, so let's keep the ctor, but with Obsolete.

Done.

if I merge that, do we have warning about using obsolete methods ? If so I think there is an attribute to disable them in for Parse methods.

And microchannelargument can just be called Parse and not ParseJson, because there is no choice a all.

Well, NBitcoin has no compilation warnings now. Those who use it will be alerted with a warning that let them know they should use the Parse method instead of the constructor. In fact, that's the ObsoleteAttibute attribute goal.


Matlab to dicomrt

Do you also have a function for saving as dicom rtstruct from Matlab?

No, unfortunately not.

What is the difference between dicomrt2matlab's contours.points and contours.VoxPoints?
I need to have isodose curve points in centimeter, which one I can use?


Specs failing on master branch with rails 4.2

I think this is a sprockets 3.0.0 related failure
$ appraisal rails-4.2 rspec ./spec/integration/rails_admin_spec.rb
Run options: exclude {:mongoid=>true, :skip_active_record=>true}

Randomized with seed 56366
............FF.

Failures:

  1) RailsAdmin html head loads javascript files in body
     Failure/Error: is_expected.to have_selector('head script[src^="/assets/rails_admin/rails_admin.js"]', visible: false)
       expected #has_selector?("head script[src^=\"/assets/rails_admin/rails_admin.js\"]", {:visible=>false}) to return true, got false
     # ./spec/integration/rails_admin_spec.rb:38:in `block (3 levels) in <top (required)>'

  2) RailsAdmin html head loads stylesheets in header
     Failure/Error: is_expected.to have_selector('head link[href^="/assets/rails_admin/rails_admin.css"]', visible: false)
       expected #has_selector?("head link[href^=\"/assets/rails_admin/rails_admin.css\"]", {:visible=>false}) to return true, got false
     # ./spec/integration/rails_admin_spec.rb:34:in `block (3 levels) in <top (required)>'

Issue is due to the hashed value:
<link rel="stylesheet" media="all" href="/assets/rails_admin/rails_admin-726a0e3d0e6d969e238202ac66a1b95d762d442ded813bdbec5798921424c1ac.css" />
<script src="/assets/rails_admin/rails_admin-884cfbe74f506962ae47fb15b865c9996a5ebe2e051942605a29bd9d830a9437.js"></script>

Let me know if you need more info or help

:+1:

@mshibuya one test gives this error:
 rspec ./spec/integration/rails_admin_spec.rb:127 # RailsAdmin secondary navigation does not show Gravatar when user doesn't have email method

Is it connected to this problem?


An option for choosing custom npm client

For now, ntl use npm to execute script by default. I need to use private npm client to execute script for some reasons(like preset npm remote registry, etc...), so is it possible to add an option for setting private npm client?

that's something I had in the back of my mind for a while but never really had the time to work on it - I think it's definitely very nice to have 👍

I suppose this would also be useful to run scripts using Yarn instead of npm, which can be slightly faster in my experience.

Landed in #49


compile ok, but --watch mode not work.

NPM version (npm -v): 5.7.1
Node version (node -v): v9.4.0
Node Process (node -p process.versions):

{ http_parser: '2.7.0',
  node: '9.4.0',
  v8: '6.2.414.46-node.17',
  uv: '1.18.0',
  zlib: '1.2.11',
  ares: '1.13.0',
  modules: '59',
  nghttp2: '1.29.0',
  openssl: '1.0.2n',
  icu: '60.1',
  unicode: '10.0',
  cldr: '32.0',
  tz: '2017c' }

Node Platform (node -p process.platform): linux
Node architecture (node -p process.arch): x64
node-sass version (node -p "require('node-sass').info"):

node-sass       4.7.2   (Wrapper)       [JavaScript]
libsass         3.5.0.beta.2    (Sass Compiler) [C/C++]

npm node-sass versions (npm ls node-sass):

<EMAIL_ADDRESS>/data/DevelopmentRoot/projects/universal-meme
└──<EMAIL_ADDRESS>

which node-sass: ./node_modules/.bin/node-sass

successed log:
node-sass --output dist/css styles/index.scss
Rendering Complete, saving .css file...
Wrote CSS to /data/DevelopmentRoot/projects/universal-meme/dist/css/index.css

failed log:
node-sass --output dist/css styles/index.scss -w
<-- hang there, no file generated.

 // styles/index.scss
body, html {
	padding: 0;
	margin: 0;
	width: 100%;
	height: 100%;
}

@GongT I believe watch requires a change in your source files to be triggered...
Once the node-sass ... -w has been launched, try to save your index.scss file and it should compile it.
If you use npm scripts inside your package.json file, and if you do not want to have to save/change your file to compile them at launch you can simply use a pre script or &&...
Let's see an example using a pre script:
  "scripts": {
     "css-compile": "node-sass --output dist/css styles/index.scss",
     "precss-watch": "npm run css-compile",
     "css-watch": "npm run css-compile -- -w",
  }

In this first example running npm run css-watch will:

first execute the script precss-watch which run the "basic" compilation with your default params.
then run the same "basic" command invoked from css-watch with an additional param: -w

I prefer using pre scripts when possible but can also use && which run another script once the preceding is done:
Let's see an example using &&:
  "scripts": {
     "css-compile": "node-sass --output dist/css styles/index.scss",
     "css-watch": "npm run css-compile && npm run css-compile -- -w",
  }

Let me know if it helps and close the issue if you are satisfied.

I not even try to modify any file, LOL...

I ran into the same issue, just go to View-Extensions- and download the “Live Sass Compiler”. This will automatically watch your sass code and create a main.css file without you having to manually run it in the terminal.


[Feature] Add a new builtin system table information_schema.be_bvars

Example usage:
> select * from information_schema.be_bvars where NAME like '%process%';
+-------+---------------------------------------------+----------------------------------------------------+
| BE_ID | NAME                                        | DESC                                               |
+-------+---------------------------------------------+----------------------------------------------------+
| 12021 | process_cmdline                             | "/home/disk3/zhuming/cluster/be/lib/starrocks_be"  |
| 12021 | process_context_switches_involuntary_second | 0                                                  |
| 12021 | process_context_switches_voluntary_second   | 297                                                |
| 12021 | process_cpu_usage                           | 0.006                                              |
| 12021 | process_cpu_usage_system                    | 0.004                                              |
| 12021 | process_cpu_usage_user                      | 0.002                                              |
| 12021 | process_disk_read_bytes_second              | 0                                                  |
| 12021 | process_disk_write_bytes_second             | 1638                                               |
| 12021 | process_faults_major                        | 0                                                  |
| 12021 | process_faults_minor_second                 | 7                                                  |
| 12021 | process_fd_count                            | 316                                                |
| 12021 | process_inblocks_second                     | 0                                                  |
| 12021 | process_io_read_bytes_second                | 3229                                               |
| 12021 | process_io_read_second                      | 8                                                  |
| 12021 | process_io_write_bytes_second               | 1033                                               |
| 12021 | process_io_write_second                     | 2                                                  |
| 12021 | process_memory_data_and_stack               |<PHONE_NUMBER>8                                        |
| 12021 | process_memory_resident                     | 281468928                                          |
| 12021 | process_memory_shared                       | 28913664                                           |
| 12021 | process_memory_text                         | 152064000                                          |
| 12021 | process_memory_virtual                      |<PHONE_NUMBER>4                                        |
| 12021 | process_nice                                | 0                                                  |
| 12021 | process_outblocks_second                    | 3                                                  |
| 12021 | process_priority                            | 20                                                 |
| 12021 | process_thread_count                        | 2941                                               |
| 12021 | process_uptime                              | 228.826296                                         |
| 12021 | process_username                            | "zhuming"                                          |
| 12021 | process_work_dir                            | "/home/disk3/zhuming/cluster"                      |
+-------+---------------------------------------------+----------------------------------------------------+
28 rows in set (0.02 sec)

What type of PR is this：

[ ] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Which issues of this PR fixes ：

Fixes #
Problem Summary(Required) ：

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto backported to target branch

[x] 3.0
[ ] 2.5
[ ] 2.4
[ ] 2.3

@Mergifyio backport branch-3.0


Plugins should not monkey patch classes from other gems

Rationale: Monkey patching classes or modules from other gems changes the interface of those gems. This can lead to errors for consumers of the monkey patched gems, which may be the host application, or other gems.
Guideline: Plugins should not monkey patch classes or modules from other gems, or classes or modules that are generated into the host application.
Done when: this guideline is accepted, or rejected.

@projecthydra-labs/hydra_plugins_wg

I don't think that the scope of "monkey patching" is well understood. Would you care to define exactly what you mean?

Opening up an existing class or module and changing the behavior of a method. That includes method signature, return value, or side effects.

@afred how about OtherClass.include NewBehavior?  I could use that to do most of those things without "opening it up"

My opinion on this is that the need or desire to mix in behavior from the outside should instead open the conversation of how to make an extension point for the need.
Granted, there may be times where the "core" code is far from a new release that a plugin wants to target. It may be necessary for a time.
My general point is that this is rightly in the "should" space. Mixins (whatever the syntax/convenience is) "should not" be the preferred way to extend behavior, especially across gems. It changes stuff that "isn't yours" in an implicit (to everyone else) way.

I suppose I should also say... there are times when a component should allow additional capabilities to be added to it. A classic example is a serializer. Support for additional formats might be added via plugin.
This could be done by a mixin (and maybe conventional method names for the specific formats). It could also be done by exposing a method to register a format/formatter.
I strongly prefer the latter as a purpose-specific extension point. The design expressly denotes that there are collaborators for specific formats, rather than the much looser design contract of encouraging mixins.

Yes. I agree. I just think we should use clearly understood language. I don't think "monkey patch" is well defined

Okay, nice. Do you think something generic like "modify classes or modules" is clear enough? We could give a couple of examples like: (as by reopening a class to override a method or mixing in modules).
Does that cover it without leaving a definition to the reader?


add back the alias for all vms and templates

the change in the ui to use vms_and_templates instead of all_vms_and_templates broke the list of vms loaded under folders. for now i'd like to revert the change that took this alias out.
(broken in https://github.com/ManageIQ/manageiq-ui-classic/pull/7136 and https://github.com/ManageIQ/manageiq/pull/20149 originally)
related to https://github.com/ManageIQ/manageiq-ui-classic/pull/7542
see https://gitter.im/ManageIQ/manageiq?at=5fda3ad21082b94fe1d53659
@miq-bot add_label bug

@himdel could I get a review please?

I expect we want this to be in the same rel as https://github.com/ManageIQ/manageiq/pull/20149:
@miq-bot add_label kasparov/yes

Kasparov backport details:
$ git log -1
commit 87340ae8c160fcd5112136737b4c7ad68013f1c1
Author: Keenan Brock<EMAIL_ADDRESS>Date:   Wed Dec 16 23:53:37 2020 -0500

    Merge pull request #20903 from d-m-u/re-add_all_vms_and_temps_alias

    add back the alias for all vms and templates

    (cherry picked from commit 535c199885c26e8dd8ea5d6b437b1251424e8ee1)

Kasparov backport details:
$ git log -1
commit 87340ae8c160fcd5112136737b4c7ad68013f1c1
Author: Keenan Brock<EMAIL_ADDRESS>Date:   Wed Dec 16 23:53:37 2020 -0500

    Merge pull request #20903 from d-m-u/re-add_all_vms_and_temps_alias

    add back the alias for all vms and templates

    (cherry picked from commit 535c199885c26e8dd8ea5d6b437b1251424e8ee1)