64-bit BLAS/LAPACK

This is a draft for discussion (do not merge).
I'd suggest implementing support for 64-bit BLAS (=ILP64) in the following way:
The public BLAS/LAPACK wrappers in scipy.linalg will continue providing 32-bit BLAS/LAPACK, and new extensions _fblas_64, _flapack_64, cython_lapack_64, cython_blas_64 are added to provide ILP64 BLAS routine API. For those cases where BLAS/LAPACK usage is a non-public detail (e.g. ARPACK), we can build only the 64-bit version.
The above is necessary, as a single Python extension DLL cannot link to both types of BLAS because the symbol names generally clash. While dynamically linking to different BLAS in different extension works in the usual case, it is not enough to avoid symbol clashes when e.g. the Python interpreter is embedded inside an application also linked to BLAS/LAPACK (on Linux, see here section 1.5.4 --- TODO: less problematic on osx & windows iiuc, but needs checking). To avoid this issue, we also add support for BLAS/LAPACK symbol name mangling which resolves it.
TODO: also static linking to the 32-bit BLAS probably also resolves the issue (easier for Intel MKL users)
In scipy.linalg, we'd add ilp64= flag to the blas/lapack function getters, as in nrm2 = get_blas_func('nrm2', ilp64='maybe'/True/False), and a nrm2.int_dtype attribute so that it's easier to deal with the work array types.
We might want to eventually drop the 32-bit BLAS altogether. One backward-compatible option could be to autogenerate int32 interface wrappers --- but I'm not sure how easy it is to get the specs automatically.
I added some BLAS64 support in numpy master some days ago. The changes in this "PR" assume the numpy.distutils setup in the follow-up PR https://github.com/numpy/numpy/pull/15069. Currently, you can do
import numpy as np
from scipy.linalg import norm
x = np.zeros([2**31], dtype=np.float64)
x[-1] = 1
res = norm(x)
print(res)
assert res == 1.0

so I think the plan is feasible.

[x] Finish ILP64 BLAS numpy.distutils support (https://github.com/numpy/numpy/pull/15069)
[x] Implement Fortran BLAS/LAPACK symbol name mangling
[x] Implement scipy.linalg f2py .pyf file int32->int64 search-and-replace
[x] Support ilp64 variants in get_blas/lapack_funcs
[ ] Decide what to do in cases where routines return integer arrays --- do we just bump to np.int64?
[ ] Use ilp64 variants when available everywhere in scipy.linalg
[ ] Add tests...

Presumably the tests can be marked up in a similar way to your NumPy PR to avoid crushing machines with insufficient memory.
So far looks good upstream from the PRs I've reviewed related to this & my local tests with NumPy have been encouraging when using OpenBLAS + ILP64.
I don't have strong views on the linalg design decisions but maybe i.e., @ilayn might chime in?

This is really nice and, unfortunately, rather the low level part that I am not too familiar with but one thing I imagine will stay is the 32-bit version. Because many problems would start not fitting into memory with ILP64 while they were barely fitting in with the 32-bit due to the extra allocation that would take place for the same info. Hence, I guess if we enable this we are going to maintain both for some time.
I can do the legwork on the linalg side if needed but one question:
Are we going to need to modify the INTEGER keywords in the wrappers to INTEGER*4 or INTEGER*8 (or whatever the syntax would be) depending on the linked library?
It would have been amazing if we could choose the array type integer depending on the problem size but I think that is too ambitious.

The integer size is here changed by compiler flags (and f2py flags), so only C code requires manual changes.
It's indeed already possible to switch between ilp64 and non-ilp64 as you like, for scipy.linalg. For fortran code, you'd need to compile two versions (possible, but not necessarily sensible).
I wouldn't be so sure the memory usage matters in practice, as it's probably usually only 25% or so increase, and more often likely much less. For lapack, it's about routines with large iwork arrays, but are there any where the iwork really is usually significant compared to the fp arrays?
I think practical advantages of using single blas library are much more important than cases working close to machine memory (ie, if its a problem, just buy an extra 8GB)
On December 16, 2019 8:37:51 AM UTC, Ilhan Polat<EMAIL_ADDRESS>wrote:

This is really nice and, unfortunately, rather the low level part that
I am not too familiar with but one thing I imagine will stay is the
32-bit version. Because many problems would start not fitting into
memory with ILP64 while they were barely fitting in with the 32-bit due
to the extra allocation that would take place for the same info. Hence,
I guess if we enable this we are going to maintain both for some time.
I can do the legwork on the linalg side if needed but one question:
Are we going to need to modify the INTEGER keywords in the wrappers
to INTEGER*4 or INTEGER*8 (or whatever the syntax would be)
depending on the linked library?
It would have been amazing if we could choose the array type integer
depending on the problem size but I think that is too ambitious.

Ok, this is all the low-hanging fruit. What's left is:
scipy/sparse/linalg/dsolve/_superlu.cpython-37m-x86_64-linux-gnu.so
scipy/linalg/_fblas.cpython-37m-x86_64-linux-gnu.so
scipy/linalg/_flapack.cpython-37m-x86_64-linux-gnu.so
scipy/linalg/_flinalg.cpython-37m-x86_64-linux-gnu.so
scipy/linalg/_interpolative.cpython-37m-x86_64-linux-gnu.so
scipy/linalg/cython_blas.cpython-37m-x86_64-linux-gnu.so
scipy/linalg/cython_lapack.cpython-37m-x86_64-linux-gnu.so

SuperLU supports only 32-bit int, and interpolative has assumptions about 4-byte integers in hard-coded work array sizes in many places. These two might be dealt with relatively lightweight 64-to-32 lapack wrappers.
I looked a bit into it, and 64-to-32-bit LAPACK adapters are not really possible to write, because sizes of work arrays in several cases are not known (due to liwork queries). Such wrappers however are possible to do for all of BLAS, and for several LAPACK routines, but the rest of LAPACK would need to be compiled from sources. However, this would avoid shipping the multi-arch kernels from openblas, so it might be useful to do in view of the binary distribution sizes.

This sounds like a good plan to me.


Sccpy crashing on random.

Im facing a problem where scrcpy just works fine for audio and video transmission. But after 5-10 minute of session scrcpy window automatically crashes , but the usb debugging doesn't disconnect . And if after crash i want to open the scrcpy again then i have to reconnect the usb to the mobile otherwise it will not let me connect to scrcpy . I have no problem with anything functionality related just this crashing on random for no reason . Please if someone can understand or help me to solve this problem .  if you need any more information regarding the problem or exact terminal error then i will provide it . Currently posting half of the terminal error . Pls tell me if it is enough or should i post whole debug error.

Run adb shell or adb logcat in a separate window and keep it open. Does it close at the same time scrcpy terminates?

Ok so here what i did - i opened cmd in admin mode then i have changed the directory to scrcpy file path then i have runed "adb logcat" command. After that it starts giving some prompts continuously. Now when scrcpy crashed the adb logcat promts stopped and now that cmd is in scrcpy path .

Now when scrcpy crashed the adb logcat promts stopped

OK so the cause is that adb gets disconnected for some reason (the connection gets closed), so every command using adb is terminated (including scrcpy, shell, logcat...).
There might be several reasons. You should try with another USB cable/port: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#device-disconnected


###Task 3 ---> #### Task 3

Module: 06
Lab/Demo: Enabling Continuous Integration with Azure Pipelines
Fixes # .
Changes proposed in this pull request:


[TITLE]

Version: 0.0.1 build 229
Error: get 'https://images.paramount.tech/uri/mgid:arc:imageassetref:shared.southpark.us.en:212399ca-1b1f-40c7-8546-995165535b1d&width=192&height=108&crop=true': HTTP error: 400 Bad Request
OS: windows amd64
Region: [YOUR REGION]
Description: [DESCRIBE THE ISSUE]

[ ] I understand that this issue will be deleted if I forget to fill out any of the fields surrounded by brackets ("[ ]"), including the title. Place an "x" into the brackets at the beginning of this line to confirm.

(Created via app)

unsupported website region: www.southpark.lat

Sounds like a feature request. Can you please edit the issue title and description to accurately reflect that. If this is about two separate things, please make two separate issues. If you do that, I'll see to it when I have time.

I understand. I will mark this as a feature request. I don't have much time right now so I can't promise to implement it very soon, but I'll see to it when I find the time. No problem with your English :)

Has there been any progress on this?
I would also like to download in latin, thank you very much for your work in any way.


Failing tests on ubuntu-latest github actions

Describe the bug
When writing units tests using bUnit on my local hardware (running Windows 10) it all works fine. When running the tests as part of CI via GitHub actions on ubuntu-latest some tests, which use async/await and Task.Delay fail "randomly".
Example:
You can see this behavior in the CI actions of my framework Ignis:
https://github.com/DavidVollmers/Ignis/actions/workflows/ci.yml
The tests which sometimes fail look similar to this:
[Fact]
public async Task ListboxInDialog()
{
    Services.AddIgnis();
    Services.AddSingleton<IHostContext, TestHostContext>();

    JSInterop.Mode = JSRuntimeMode.Loose;

    const string openButtonId = "open-button";
    const string listboxButtonId = "listbox-button";
    const string intOptionId = nameof(Int32);

    var cut = Render(@<ListboxInDialogTest></ListboxInDialogTest>);

    var openButton = cut.Find($"#{openButtonId}");
    openButton.Click();

    await Task.Delay(400);

    var listboxButton = cut.Find($"#{listboxButtonId}");
    listboxButton.Click();

    var intOption = cut.Find($"#{intOptionId}");
    intOption.Click();

    await Task.Delay(200);

    var listbox = cut.FindComponent<Listbox<Type>>();
    Assert.Equal(typeof(int), listbox.Instance.Value);
}

The delays are necessary since the components under test have transitions. The delay is always the transition duration + 100ms as a grace duration. This works fine locally on windows or when running the CI GitHub actions on windows-latest.
Expected behavior:
Test execution should be the same on ubuntu-latest as on windows-latest.
Version info:

bUnit version: 1.22.19
.NET Runtime and Blazor version: net7.0 & net6.0
OS type and version: ubuntu-latest (GitHub actions)

Thank you for the quick response! I will try this out and come back with the results immediately.

Interesting - as we solved some of those issues with v1.22. It would be really interesting to know where you get the stack overflow and if you can reproduce it reliablely.
Regarding absence of elements - we had this here: https://github.com/bUnit-dev/bUnit/issues/949
You can create an extension method for that (see WaitForElementToDisappear). That might do the trick in the majority of your cases.

@linkdotnet The following test will always produce a stack overflow exception:
[Fact]
public async Task CustomModal_OpenCloseByButton()
{
    Services.AddIgnis();
    Services.AddSingleton<IHostContext, TestHostContext>();

    JSInterop.Mode = JSRuntimeMode.Loose;

    const string closeButtonId = "close-button";
    const string openButtonId = "open-button";
    const string outletId = "dialog-outlet";

    var cut = Render(@<CustomDialogTest/>);

    var outlet = cut.Find($"#{outletId}");
    Assert.Empty(outlet.Children);

    var openButton = cut.Find($"#{openButtonId}");
    openButton.Click();

    var closeButton = cut.WaitForElement($"#{closeButtonId}");
    Assert.True(outlet.Contains(closeButton));

    cut.WaitForAssertion(() =>
    {
        closeButton.Click();

        outlet = cut.Find($"#{outletId}");
        Assert.Empty(outlet.Children);
    });
}

As soon as I move the closeButton.Click() outside of the WaitForAssertion the stack overflow exception does not occur.
But in this case I struggle to understand how the waiting works anyways. The assertion action is only ever executed once in my test even if I set the timeout to something like 30 seconds. Do I need to call Render() on the component under test manually to trigger the assertion action to be executed again? Because like it is no it does not seem to "wait" at all...

The closeButton onclick just tries to close dialog-outlet?
@egil My guess would be that a click inside WaitFor leads just to new re-renders, hence triggering a new OnAfterRender hence triggering a new closeButton.Click.
@DavidVollmers As you said, the idea would be to have no "side-effects" inside WaitForXXX.

Yes the close button will trigger the dialog to close (with a transition), which in this case causes multiple renders.
Just to clarify about the WaitForXXX: If only a section of the cut is re-rendered it will not trigger the assertion action? So I should do something like cut.FindComponent<Transition>().WaitForAssertion(...) to actually wait for the assertion on the rerendering transition.

It is more complex (in terms of the renderer). But as a general rule of thumb, mutating state (as well as rendering) inside WaitForXXXis not recommended.
You don't have to call FindCompoent to have "fine-grained" assertions. I would only do that if that makes your lambda way easier to write.

Hmm ok I think I need to start digging into the complexity here. Because I cannot get the assertion action to be triggered after the time based transition has happened.

For your concrete example, what is the problem to call closeButton.Click() outside the WaitForHelper?

That is what I am already doing. The problem is that the click trigger the closing transition (which internally uses Task.Delay) and I want to assert that the closing button (inside the dialog) has successfully disappeared after the transition is finished. But from my debugging I can tell that the assertion action is only triggered before the actual closing transition is finished and the last render would happen (which in this case does not happen since the test fails before).

Is all of this under your control? If so, you could refactor the Task.Delay into a humble object, that is easy to mock inside your test. And or with net8.0 you could use the new TimeProvider class.

Good suggestion. I think this is the cleanest solution!

Actually, TimeProvider had been back ported to .netstandard2.0 too, so it's the solution to timer based testing all the way back there.
You can control time using my test based version available in https://github.com/egil/TimeProviderExtensions.


React 0.13.1 CreateElement - Error TS2345

There are a few examples where extending React.Component<P,S>{...} whereby if the props specified by the parent do not exactly match the corresponding propTypes interface of the component, the resulting call to React.createElement(, {}) throws this error: error TS2345: Argument of type 'typeof [some component name]' is not assignable to parameter of type 'string'. (DOMElement example, but similar errors occur with ReactElement, etc.)
I'm going to reference https://github.com/bparadie/fluxts-todomvc as it is basically a port of the Todo tutorial by Facebook.
In TodoTextInput.react.jsx you see that the main component extends ReactComponent (a wrapper extension over React.Component). If I understand correctly:
class TodoTextInput extends ReactComponent<any,TodoTextInputState> {

  static propTypes: React.ValidationMap<TodoState> =  {
    className: ReactPropTypes.string,
    id: ReactPropTypes.string,
    placeholder: ReactPropTypes.string,
    onSave: ReactPropTypes.func.isRequired,
    value: ReactPropTypes.string
  };

should be:
class TodoTextInput extends ReactComponent<TodoTextInputProps,TodoTextInputState> {

  static propTypes: React.ValidationMap<TodoTextInputProps> =  {
    className: ReactPropTypes.string,
    id: ReactPropTypes.string,
    placeholder: ReactPropTypes.string,
    onSave: ReactPropTypes.func.isRequired,
    value: ReactPropTypes.string
  };

But if you try to compile this, you will get the error stated above. This is (from my testing) due to the fact that the implementations of this in Header.react.tsx and TodoItem.react.tsx do not pass in ALL the props when rendering the component.
I believe this rests in the implementation of React.createElement. While simply replacing the actual interface with "any" allows the build without throwing the exception, it doesn't seem like the "TS way".
Is there a reason why TS throws this error when ALL the props are not specified? Even if they are optional, the compiler complains. It makes it useless to create a defaultProps property...
Edit: adding references to commiters: @vsiao , @ggarek , @jbrantly so (I think) they get a little notification...this repo is pretty broad, so hoping this helps narrow the focus to the key contributors to this section

I think this might be due to something I noticed with createElement as it's currently modeled but haven't had a chance to verify/fix yet. Basically I don't think TypeScript does a great job of matching up ComponentClass<P> with something like class MyClass extends Component<P, S>, I'm guessing due to the extra stuff like propTypes, etc. Try changing the definition where it currently is:
function createElement<P>(
        type: ComponentClass<P>,
        props?: P,
        ...children: ReactNode[]): ReactElement<P>;

to
function createElement<P>(
        type: (props?: P, context?: any) => Component<P, any>,
        props?: P,
        ...children: ReactNode[]): ReactElement<P>;

and see if that helps.

I forgot to mention that you will also need to make the properties optional (looks like you tried that, but wanted to make sure you kept those optional when trying the above).

@jbrantly so I tried the above--which I'm guessing is trying to reimplement the createClass TopLevelAPI functions to fit the class MyClass extends... construct--and still no dice.
Since rendering something like <TodoTextInput, {...}> is rendering a ReactElement vs a DOMElement, whereas before, the compiler was passing the component as a DOMElement (?). The error that results is something like:
error TS2345: Argument of type 'typeof TodoTextInput' is not assignable to parameter of type '(props?: { className: string; onSave: (text: string) => void; value: string; }, context?: any) =>...'.
I've uploaded my version of the todomvc app (with my changes) to: https://github.com/dho825/fluxts-todomvc-test
Is this really an issue with the matching up ComponentClass<P> with something like class MyClass extends Component<P, S> as you mentioned above?
I am new to TS so I'm still fairly green with how definition files work, but what you suggested seems like it should work...but somehow the component is not being recognized as any of the current interfaces: Component, ClassicComponent, or DOMElement. I'm going to continue testing around to a) get a better understanding of how the definitions work and b) try to figure out a way to fix this...
Thanks in advance for anyone who can help or add additional context :)

Ah, I was doing it from memory and I think I told you wrong. Try this:
function createElement<P>(
        type: { new(props?: P, context?: any): Component<P, any> },
        props?: P,
        ...children: ReactNode[]): ReactElement<P>;

@jbrantly Ugh. I apologize if I'm getting bothersome, but it still is giving me issues. I've actually stopped using the extended ReactComponent class and tried to keep it implementation as vanilla as possible.
What it seems like TS is doing is calling createElement as if the passed <P> was a DOMElement, hence the error regarding typeof Component is not assignable to param 'string'.
Even if I create this overload, it somehow passes over it...
This is my modified react.d.ts:
    function createElement<P>(
        type: {new (props?: P, context?: any): Component<P, any>},
        props?: P,
        ...children: ReactNode[]): ReactElement<P>;
    function createElement<P>(
        type: string,
        props?: P,
        ...children: ReactNode[]): DOMElement<P>;
    function createElement<P>(
        type: ClassicComponentClass<P> | string,
        props?: P,
        ...children: ReactNode[]): ClassicElement<P>;
    function createElement<P>(
        type: ComponentClass<P>,
        props?: P,
        ...children: ReactNode[]): ReactElement<P>;

I'll pull your version of the app later and try it out myself and see if I can't get it working. It currently displays the issue, right?
Regarding error messages, it's useful to know that TS always reports the first overload as the error, even though it tried and failed with all of them. That can sometimes be confusing because you're like "of course it's not a string!".

Oh man, thanks for being patient with me and giving me some more insight
into TS error checking.
It was your TS+React presentation that convinced me to dive in to using TS.
The repo was hastily put together, but essentially if you run gulp build you'll see the compiler complain.
On May 28, 2015 5:30 PM, "James Brantly"<EMAIL_ADDRESS>wrote:

I'll pull your version of the app later and try it out myself and see if I
can't get it working. It currently displays the issue, right?
Regarding error messages, it's useful to know that TS always reports the
first overload as the error, even though it tried and failed with all
of them. That can sometimes be confusing because you're like "of course
it's not a string!".
—
Reply to this email directly or view it on GitHub
https://github.com/borisyankov/DefinitelyTyped/issues/4472#issuecomment-106605541
.

Totally agree that the error message could be a lot better. The thing with ComponentClass<P> is that it requires P to be consistent throughout, which means that static properties such as defaultProps always need to be explicitly type-annotated, or else the compiler will infer a P from defaultProps which is incompatible with the P provided by React.Component. Here's an example:
interface TimerProps extends React.Props<Timer> {
    initialTime?: number;
    endTime: number;
}
class Timer extends React.Component<TimerProps, {}> {
    static defaultProps = {
        initialTime: 0
    };
    ...
}

Notice that defaultProps has type { initialTime: number }, which is incompatible with TimerProps. So Timer is no longer a valid ComponentClass<P>, and the overload resolution for createElement fails.
The downside of this, as you've already observed, is that you'll need to pass all of the required props as well (null should work just fine in most cases). This is a limitation of TypeScript's type system.

@vsiao Thank you for explaining how <P> is being passed around and how defaultProps messes around with the createElement overloads. But it seems that all props, required or not, need to be passed. It's odd that even optional parameters will throw errors when not specified, with or without defaultProps.
It seems like you will need to pass in all props (required or not) in JSX or React.createElement(...} regardless of defaultProps' P type. My current hypothesis is that the limitation to TS as aforementioned, is either (a) that TS does not have a way to check P type as it is being passed around to various functions or (b) that the definitions file is not properly passing it around...
Thoughts?
P.S. thanks to jbrantly and vsaio for being patient with me and the help they provided. I'm just going to work around the current situation and not be so OCD about clearing the compiler of all errors =_="
See reference example below:
>>> file: mainApp.ts

///<reference path="../../libs/react.d.ts" />

import Example = require('./example');
import React = require('react');

React.render(
	(React.createElement(Example, {id: "uuid-1", className: "greenClass", hasValue: true})),
	document.getElementById('app')
);

>>> file: example.ts

///<reference path="../../libs/react.d.ts" />

import React = require('react');
import ReactPropTypes = React.PropTypes;
import ReactComponent = require('../../utils/react/reactComponent');

interface ExampleProps {
	id: string;
	className: string;
	hasValue?: boolean;
	style?: any;
}

interface ExampleElement {
}

class Example extends ReactComponent<ExampleProps, any> {
	static PropTypes: React.ValidationMap<ExampleProps> = {
		id: ReactPropTypes.string,
		className: ReactPropTypes.string,
		hasValue: ReactPropTypes.bool,
		style: ReactPropTypes.object
	}

	static defaultProps: ExampleProps = {
		id: 'uuid-0',
		className: 'blueClass',
		hasValue: false,
		style: {}
	}

	public render(): React.DOMElement<ExampleElement> {
		return (
			(React.createElement("div", {id: this.props.id, className: this.props.className}, "Hello World!"))
		)
	}
};

export = Example;

Even though defaultProps is explicitly of type ExampleProps, style and hasValue are not really optional in this case because if you don't pass it in when rendering, the compiler still complains. This gets even more weird when you comment out defaultProps and it's still no go.

OK! After much head banging, I believe I figured out the issue. "Simply" upgrade to TypeScript 1.5 :) I think the type argument matching was failing due to this: Microsoft/TypeScript#1446. I upgraded the project to use TS 1.5 and the issue went away.
Just some notes on upgrading to TS 1.5: See ivogabe/gulp-typescript#91 for changing gulp-typescript and you will need to delete some stuff out of node.d.ts like WeakMap, Set, etc that I'm guessing TS 1.5 removed from the ES5 target.

@jbrantly Holy cow! That's so weird! I was using TS 1.5 globally, but locally it was 1.4...I can't believe that such a "simple" upgrade fixed the issue. I guess I'm reassured that it wasn't my stupidity or newness to both TS and React, and other people had issues with the same general issue.
Man, finding issue #1446 probably took a bit of time. My OCD side thanks you profusely! At the end thanks so much to both of you and @vsiao...I have a better understanding of both TS and React from this!


29 tsuiso

close #29

Current coverage is 56.93%

Merging #83 into master will increase coverage by +0.81% as of 77855f5

@@            master     #83   diff @@
======================================
  Files           45      45
  Stmts         1142    1147     +5
  Branches       298     300     +2
  Methods          0       0
======================================
+ Hit            641     653    +12
- Partial         51      54     +3
+ Missed         450     440    -10

Review entire Coverage Diff as of 77855f5

Powered by Codecov. Updated on successful CI builds.


Roll Flutter Engine from 54b0ac3059bf to 3fab63b9a1ec (1 revision)

https://github.com/flutter/engine/compare/54b0ac3059bf...3fab63b9a1ec
2022-07-25<EMAIL_ADDRESS>Roll Fuchsia Linux SDK from fOcOc-7a8... to 5CUWJc6g8... (flutter/engine#34887)
Also rolling transitive DEPS:
fuchsia/sdk/core/linux-amd64 from fOcOc-7a8k3z to 5CUWJc6g80S6
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Producer does not refresh cluster metadata upon leadership change

Hi team,
Here is what I think is a bug in 1.15, but I could not identify the reason why metadata are not refreshed upon fast leader change.
Describe the bug
Producer does not refresh cluster metadata upon leadership change
To Reproduce
Full reproduction scenarios with attached logs are here : https://github.com/vdesabou/kafka-docker-playground/blob/master/other/client-kafkajs/notes-minikube-bitnami.md
Expected behavior
We expect the producer to refresh its metadata and detect the newly elected leader to resume message production faster
Observed behavior
Log samples with explanation are in the reproduction model https://github.com/vdesabou/kafka-docker-playground/blob/master/other/client-kafkajs/notes-minikube-bitnami.md
Full logs are attached there :  https://github.com/vdesabou/kafka-docker-playground/blob/master/other/client-kafkajs/notes-minikube-bitnami.zip
Environment:
<EMAIL_ADDRESS>Thank you

We have been able to do more testing, and the problem seems to be caused by Bitnami Kafka not doing correct cluster rolls (waiting for URP for example), as I can see during roll offline partition:
$ kubectl exec -it kafka-0 -- kafka-topics.sh --bootstrap-server kafka-0:9092 --topic kafkajs --describe
Topic: kafkajs  TopicId: a9lB9-g7TX2r4nNTPpWhXg PartitionCount: 8       ReplicationFactor: 3    Configs: flush.ms=1000,segment.bytes=1073741824,flush.messages=10000,max.message.bytes=1000012,retention.bytes=1073741824
        Topic: kafkajs  Partition: 0    Leader: none    Replicas: 2,0,1 Isr: 0
        Topic: kafkajs  Partition: 1    Leader: none    Replicas: 1,2,0 Isr: 0
        Topic: kafkajs  Partition: 2    Leader: none    Replicas: 0,1,2 Isr: 0
        Topic: kafkajs  Partition: 3    Leader: none    Replicas: 2,1,0 Isr: 0
        Topic: kafkajs  Partition: 4    Leader: none    Replicas: 1,0,2 Isr: 0
        Topic: kafkajs  Partition: 5    Leader: none    Replicas: 0,2,1 Isr: 0
        Topic: kafkajs  Partition: 6    Leader: none    Replicas: 2,0,1 Isr: 0
        Topic: kafkajs  Partition: 7    Leader: none    Replicas: 1,2,0 Isr: 0

When doing the same test with a well done cluster roll (using Confluent Operator), we can see that KafkaJS is properly refreshing metadata as expected:
kafka-2 is stopped first, we get a couple of This server is not the leader for that topic-partition errors:
[[09:04:01.637]] [ERROR] {"level":"ERROR","timestamp":"2021-08-31T09:04:01.633Z","logger":"kafkajs","message":"[Connection] Response Produce(key: 0, version: 7)","broker":"kafka-2.kafka.confluent.svc.cluster.local:9071","clientId":"my-kafkajs-producer","error":"This server is not the leader for that topic-partition","correlationId":118,"size":55}
[[09:04:01.638]] [LOG]   {"level":"DEBUG","timestamp":"2021-08-31T09:04:01.638Z","logger":"kafkajs","message":"[Connection] Response Produce(key: 0, version: 7)","broker":"kafka-2.kafka.confluent.svc.cluster.local:9071","clientId":"my-kafkajs-producer","error":"This server is not the leader for that topic-partition","correlationId":118,"payload":{"type":"Buffer","data":"[filtered]"}}
[[09:04:01.639]] [ERROR] {"level":"ERROR","timestamp":"2021-08-31T09:04:01.639Z","logger":"kafkajs","message":"[Producer] Failed to send messages: This server is not the leader for that topic-partition","retryCount":0,"retryTime":262}

Immediately followed by a request metadata where response has offlineReplicas set with kafka-2:
[[09:04:01.639]] [LOG]   {"level":"DEBUG","timestamp":"2021-08-31T09:04:01.639Z","logger":"kafkajs","message":"[Connection] Request Metadata(key: 3, version: 6)","broker":"kafka-0.kafka.confluent.svc.cluster.local:9071","clientId":"my-kafkajs-producer","correlationId":81,"expectResponse":true,"size":47}
[[09:04:01.641]] [LOG]   {"level":"DEBUG","timestamp":"2021-08-31T09:04:01.641Z","logger":"kafkajs","message":"[Connection] Response Metadata(key: 3, version: 6)","broker":"kafka-0.kafka.confluent.svc.cluster.local:9071","clientId":"my-kafkajs-producer","correlationId":81,"size":590,"data":{"throttleTime":0,"brokers":[{"nodeId":0,"host":"kafka-0.kafka.confluent.svc.cluster.local","port":9071,"rack":"0"},{"nodeId":2,"host":"kafka-2.kafka.confluent.svc.cluster.local","port":9071,"rack":"0"},{"nodeId":1,"host":"kafka-1.kafka.confluent.svc.cluster.local","port":9071,"rack":"0"}],"clusterId":"tPVmA6k0TCmamXlHFJOhHA","controllerId":2,"topicMetadata":[{"topicErrorCode":0,"topic":"kafkajs","isInternal":false,"partitionMetadata":[{"partitionErrorCode":0,"partitionId":0,"leader":1,"replicas":[1,2,0],"isr":[1,2,0],"offlineReplicas":[]},{"partitionErrorCode":0,"partitionId":5,"leader":0,"replicas":[0,2,1],"isr":[0,2,1],"offlineReplicas":[]},{"partitionErrorCode":0,"partitionId":4,"leader":1,"replicas":[2,1,0],"isr":[1,0],"offlineReplicas":[2]},{"partitionErrorCode":0,"partitionId":1,"leader":0,"replicas":[2,0,1],"isr":[0,1],"offlineReplicas":[2]},{"partitionErrorCode":0,"partitionId":6,"leader":1,"replicas":[1,2,0],"isr":[1,2,0],"offlineReplicas":[]},{"partitionErrorCode":0,"partitionId":7,"leader":0,"replicas":[2,0,1],"isr":[0,1],"offlineReplicas":[2]},{"partitionErrorCode":0,"partitionId":2,"leader":0,"replicas":[0,1,2],"isr":[0,1,2],"offlineReplicas":[]},{"partitionErrorCode":0,"partitionId":3,"leader":1,"replicas":[1,0,2],"isr":[1,0,2],"offlineReplicas":[]}]}],"clientSideThrottleTime":0}}

@nicolasguyomar I think we can close this issue

Hello Vincent, thank you for looking into this, KafkaJS is indeed behaving as expected here in case of a broker clean shutdown, closing this ticket


orgunit name untitled is preferred than dc.title

Describe the bug
OrgUnits with some dc.title are displayed as untitled (or it's corresponding translation)
To Reproduce
See https://github.com/4Science/dspace-angular/blob/327a5bd6819ac1023e5a4b9ef7b2923c919ad8bf/src/app/core/breadcrumbs/dso-name.service.ts#L53
Expected behavior
We would expect the order
return dso.firstMetadataValue('organization.legalName') || dso.firstMetadataValue('dc.title') || this.translateService.instant('dso.name.untitled');
Related work
Link to any related tickets or PRs here.

Line 109 on the file has the same error

Also line 109 is affected
See https://github.com/4Science/dspace-angular/blob/327a5bd6819ac1023e5a4b9ef7b2923c919ad8bf/src/app/core/breadcrumbs/dso-name.service.ts#L109
(Credits to the previous comment not appearing in the issue anymore)


Fixed AccelStamped, TwistStamped and Wrench icons

Fixed AccelStamped, TwistStamped and Wrench icons

Accel and Twist icon has Public Domain license

Linux
Linux-aarch64
Windows

https://github.com/Mergifyio backport humble iron


verbs-smp crashes with ++ppn 2

Original issue: https://charm.cs.illinois.edu/redmine/issues/232

Auotbuild reports crashes with ++ppn 2. Bilge reported that it works with +ppn 1 - possible race condition.

Original date: 2013-10-13 02:04:14

Fixed as part of other changes - added barrier to verbs and fixed the exit.


feat/pancakeswap v3 price calculation.

Before submitting this PR, please make sure:

[x] Your code builds clean without any errors or warnings
[x] You are using approved title ("feat/", "fix/", "docs/", "refactor/")

A description of the changes proposed in the pull request:

[x] Add the useRouter option for pancakeswap connector
[x] Add an interface for v3 smart router
[x] Add the calculation method for the v3 smart router

Tests performed by the developer:
Tips for QA testing:

@vic-en can you take a look at this PR since you worked on PancakeSwap upgrade?

@fengtality
These changes are not related to pancake v3 LP.
They're changes to the existing swap.
Nevertheless, I'll look before today ends.

@0xcodercrane Just one comment for you, you can remove the router abi file as I see it's no longer used.
@fengtality As mentioned earlier, this changes pertain to the swap funtionalities. As it is, it integrates the latest smart router which allow swaps to automatically use v3 pools when available. That being said, there's no funtionality to strictly use v3 pool only as available in uniswap code. So I guess further decision is up to you.

@vic-en  routerAbi is required field of Uniswapish.
and for the functionality which allow swaps to use only v3 pools, i pushed the changes about allowed pool types. i believe we can use that function.
https://github.com/hummingbot/gateway/pull/251/commits/45052d988e03acba7b1cd21c5ad91787b51a28ec

@vic-en @0xcodercrane @fengtality what about this pr, what else is missing to merge it?

We have been testing the implementation and noticed a 10x increase in RPC calls for price fetching. The free ANKR endpoint does not support price fetching for PCS V3 as there is a limit of 300/s and it is exceeded.
Please take a careful look into this before merging.

Could you please approve ci/cd run @fengtality ?

adding last fixes of unit test.

approved workflow run @0xcodercrane

approved workflow run @0xcodercrane

ty. how can I see which tests are failing from ci/cd. Would you help me on that? @cardosofede

hey admins! anyone please approve the workflow run?

@0xcodercrane Thanks - looks like tests are passing now. I'll review and address @vic-en's comment above shortly.

Actually, I will approve merge this PR in now, so that other outstanding PRs can update their dependencies. @0xcodercrane please clean up the Pancakeswap default configs template at your convenience.


fixing datetime to handle locale and UTC times

@EricGentry045 This looks useful. Would you mind providing some example commands in the PR description that I can use to verify the functionality?

fixed merge conflict

Thanks @bmingles.  Here would be a good use case...
{     "emeraldwalk.runonsave": {         "commands": [             {                 "match": "\\.java$",                 "cmd": "git add ${file} && git commit -m 'Auto save ${file} at ${datetime}'"             },             {                 "match": "\\.cpp$",                 "cmd": "git add ${file} && git commit -m 'Auto save ${file} at ${datetimeUTC}'"             },         ]     } }


add a keyboard shortcut for entering/exiting VR mode

I'd recommend a keypress of the v key (without any alt/shift/control/meta keys held).

Let's make it configurable in Unity but I'll provide v as the default.

Currently, you need to use JavaScript key names, not Unity labels. I.e. if you want the spacebar to be the key for quick toggle, use a blank space  .


Iterative and exponential search using Python

Can I do it @div-bargali ?

hey @suprimnakarmi don't forget to add it in searching_algorithms folder

Done and added files in the searching_algorithms folder :) #109


Updated demo application to use initial keycloak authentication for eFiling the package

Description
This PR includes the following proposed change(s):

Updating the demo application to remove the client token

FLA-654
Type of change

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Refactoring / Documentation
[ ] Version change

if your change is a breaking change, please add breaking change label to this PR
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Does the change impact or break the Docker build?

[x] Yes
[ ] No

If Yes: Has Docker been updated accordingly?

[x] Yes
[ ] No

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[x] New and existing unit tests pass locally with my changes

Docker-compose and documentation have now both been updated.


still missing prop type object innerRef in latest version

Issue description
I saw this commit https://github.com/reactstrap/reactstrap/commit/a5795b8bd1815a12660f39928e8c7d2b0ac8c45a but still not updated in reactstrap installed

reactstrap version #5.0.0

InnerRef has been fixed in master and will be available in the next release. /close

Thank you for info, will wait till next release

We are currently waiting for an upstream issue to be addressed before we can cut a new release.


Add --version print out

Realized I need to fix one thing. Currently, build will be unknown in release containers since there is no git history in a release.
Need to figure out how to resolve that correctly.


Pair Account from Mobile to Web

Hello.
I want to pair our accounts created with Baileys from Whatsapp mobile to Whatsapp Web with pair code.
I also accept paid solutions. People who can produce paid solutions can write whatsapp or telegram information.
(Paid solutions continue through upwork.com)
Thank you.

It's simple see docs

It's simple see docs

I need pairing from mobile api (baileys) to whatsapp web (web.whatsapp.com), not pairing from mobile device to baileys.

It's simple see docs

I need pairing from mobile api (baileys) to whatsapp web (web.whatsapp.com), not pairing from mobile device to baileys.

Show me the error


Add return type to Real .round

I have no doubt that .round must return a definite value, but my belief is uninformed.

So this isn't part of the source, and I don't think it's part of the spec. Given the implementation in Rakudo it seems reasonable:
``
multi method round(Real:D:) {
(self + 1/2).floor; # Rat NYI here, so no .5
}
multi method round(Real:D: Real() $scale) {
(self / $scale + 1/2).floor * $scale;
}

But I'd prefer to have the docs match the spec (and failing that, match Rakudo). Comments welcome

KEY POINT: patch is incorrect about Num.
I agree that the compiler does not guarantee any return type, and that that is an argument against documenting a return type.
(Do we have an official docs policy on that meta-point? I know we started with a scraping of the API from the compiler, and I see that we don't have anything to check for mis-matches over time, like .round being defined in the compiler's core.c/Int.rakumod, but missing completely from our doc/Type/Int.rakudoc . Maybe worth raising as a separate issue)
https://github.com/Raku/roast/blob/master/S32-num/rounders.t has lots of tests that could be interpreted as collectively implying "result must be defined", but I do not see an explicit test for such.
More importantly, the patch is incorrect about type. Where the patch asserts --> Num:D, other types besides Num are currently delivered:
raku -e 'my Real @rs = 15, 1.5, 1.5e0, pi; for @rs X @rs -> (Real $a, Real $b) { say $a.round($b).WHAT; }'|sort|uniq -c
   4 (Int)
   8 (Num)
   4 (Rat)

A reminder/primer for readers who are as confused as I was when I started in Raku: Num is not Numeric, and the similarity is confusing, and often when you think Numeric you mean Real:
role Numeric : Number or object that can act as a number
role Real : Non-complex number : `role Real does Numeric`
class Num : Floating-point number : `class Num is Cool does Real`

Complex numbers, quaternions, octonions, etc are all mathematical objects that are Numeric because you want to do regular math with them, but are composed of many Reals. Num is IEEE floating-point, which in Raku we usually must force with exponent notation; 1.5e0 is a Num, while 1.5 is the Rat of 15 over 10. Both are forms of Real and Numeric.
If this PR moves forward, I think a change to --> Real:D is required.

@Util,
I agree with the substance of your comment. I think the following may be obvious to all and/or trivial and/or nonsense but I'd like to try nail the following down:

I agree that the compiler does not guarantee any return type, and that that is an argument against documenting a return type.

Is that accurate, or at least not problematic, for any definition of the words "guarantee any return type" in a computer science sense? I'm thinking one of us should post an SO question about this to try elicit a response by jnthn, after we first nail down the verbiage here.
My thinking is to make the question have two parts, one about the language, and the other about Rakudo. As an example of the kind of thing I'm unsure about, I think it's fair to say that both Raku and Rakudo guarantee that any value can be viewed as being of type Mu, or a subclass thereof, including any returned value, and that, presuming this is true, while it may be viewed as trivial and/or obvious, it may not be, or it may even be nonsense, and the truth be that either or both of Raku or Rakudo literally do not guarantee anything, for a computer science definition of those words. (I am of course ignoring bugs in Rakudo; while that feels like a related topic, it also feels fundamentally different.)

@Util,

...rounders.t has lots of tests that could be interpreted as collectively implying "result must be defined"

I'd say no operation in Raku should be considered guaranteed to return a "defined" result (nor even a "definite" one which is what 0rir mentioned, and is not the same thing).
My reasoning is that any operation is allowed to return either a Failure instance (which is not .defined), or Nil which is a type object, so isn't even .DEFINITE:
sub foo (--> Int:D) { fail 'foo' }
sub bar (--> Int:D) { Nil }
say (.defined, .DEFINITE) given foo; # (False True)
say (.defined, .DEFINITE) given bar; # (False False)

I submit that the return of a Failure is a red herring in the context of documentation of signatures (using the term loosely); because any Callable could fail.
Closing this and opening an issue.


fix: classifier invalid

Classifier must be a valid classifier to upload.
Noticed when adding validate-pyproject support to scikit-build.

Thanks!


impl_supertrait on a type with a const generic causes proc-macro panic

This is an amazing crate, however, I'm running into the following issue with the following code. I've attached the expansion of the TraitWithDefault macro invocation but the other invocation is unable to print the tokens.
use supertrait::*;

#[supertrait::supertrait]
trait TraitWithDefault {
    type T = u32;
}

struct StructWithConstGeneric<const GENERIC: u8>();

#[supertrait::impl_supertrait]
impl TraitWithDefault for StructWithConstGeneric<5> {
    type T = u8;
}

error: custom attribute panicked
  --> src/main.rs:3:1
   |
3  | #[supertrait::supertrait]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^
...
10 | #[supertrait::impl_supertrait]
   | ------------------------------ in this macro invocation
   |
   = help: message: unexpected token
   = note: this error originates in the macro `supertrait::__private::macro_magic::__private::forward_tokens_inner` which comes from the expansion of the macro `::supertrait::__private::macro_magic::forward_tokens` (in Nightly builds, run with -Z macro-backtrace for more info)

expansion.txt

hey I don't have time at the moment to look into this specifically but happy to provide any guidance I can. Is this just with const generics?


Fix WhoIsActive -Verbose Issue

Type of Change

[ ] Bug fix (non-breaking change, fixes #)
[ ] New feature (non-breaking change, adds functionality)
[ ] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Adding code coverage to existing functionality
[ ] Pester test is included
[ ] Nunit test is included
[ ] Documentation
[ ] Build system

Purpose

Approach

Commands to test

Screenshots

Learning

looks good to me! Will merge once the tests pass. Thanks so much 🎉

test failure due to unrelated test


Preserve IP client feature for VCD CPI

The customer requires to be able to enable the Preserve Client IP feature on the virtual services backing their ingresses.
This feature can only be enabled when an IP Set is used (Load balancer pool members set to Group) so that would require some changes in the CPI logic and flags as it was added only in VCD 10.4.
If IP Set isn't used in the referenced LB pool, enabling the feature fails with
Error: [ 42e8ac57-8659-4ca9-93eb-802e97bbd658 ] Unable to enable Preserve Client IP for Virtual Service test-NO_RDE_e781ea9d-349d-42b2-8354-26e32f35b89c-tcp as referenced pool test-NO_RDE_e781ea9d-349d-42b2-8354-26e32f35b89c-tcp is not configured with group-based membership.

The workflow would look something like this:

Maintain the same global logic for VS and LB creation - but then
Create new empty IP set
Configure load balancer pool members to group with the IP set
Enable Preserve client IP on the virtual service
provision nodes .......
Add IPs of the nodes to the IP set.

Link to upstream issue

This need to be discussed with maintainers on 28/06 to understand how much they prioritize it.
If it is low priority for them, we should probably look into implementing it ourselves.

We discussed this yesterday. We will wait for Arun's opinion for a few days.

@vxav Do you know if there is any update regarding this? I

Waiting for a reply from Arun

Meeting 02/08:
They haven't looked at your proposal yet as they are busy with other things. They have pretty much no bandwidth to work on anything else than their own agenda.
They will welcome our contribution for this. According to Arun the 2 ways to do this is either:

Through configMap which applies to all LBs
Through annotation, which is per load balancer

I think the second option is the best as it doesn't break VCD constructs.
Arun mentioned they added integration tests to cpi/csi that we should be using.

Good news, the customer got the transparent IP to work via Proxy protocol so the Preserve IP client feature is no longer a priority.
This can be deprioritised for the foreseeable future.
Ping @gawertm

closing then for now. if upstream maintainers inform us about this feature being implemented, then we can go back to the customer and use it and they can remove their workaround


KeyError: 'caller_port'

When using:
sapp --tool=mariana-trench analyze .
I got error:
/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship Run.issue_instances to refer to viewonly relationship IssueInstance.run should include sync_backref=False set on the Run.issue_instances relationship.  (this warning may be suppressed after 10 occurrences)
util.warn_limited(
/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship IssueInstance.run to refer to viewonly relationship Run.issue_instances should include sync_backref=False set on the IssueInstance.run relationship.  (this warning may be suppressed after 10 occurrences)
util.warn_limited(
2022-06-01 20:47:21,491 [INFO] Parsing analysis output...
Traceback (most recent call last):
File "/Users/shijian03/.venvs/mariana-trench/bin/sapp", line 8, in
sys.exit(cli())
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/cli_lib.py", line 208, in analyze
pipeline.run(analysis_output, summary_blob)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/init.py", line 363, in run
next_input, summary = step.run(next_input, summary)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 236, in run
self.analysis_output_to_dict_entries(
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 188, in analysis_output_to_dict_entries
for typ, key, e in self._analysis_output_to_parsed_tuples(inputfile):
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 135, in _analysis_output_to_parsed_tuples
for e in entries:
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 351, in parse
yield from self.parse_handle(handle)
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 367, in parse_handle
for postcondition in self._parse_postconditions(model):
File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 528, in _parse_postconditions
port=Port.from_json(generation["caller_port"], "source"),
KeyError: 'caller_port'
Looking forward to hearing from you.
Thanks!

When using:
sapp --tool=mariana-trench analyze . I got error: /Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship Run.issue_instances to refer to viewonly relationship IssueInstance.run should include sync_backref=False set on the Run.issue_instances relationship. (this warning may be suppressed after 10 occurrences) util.warn_limited( /Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sqlalchemy/orm/relationships.py:1994: SAWarning: Setting backref / back_populates on relationship IssueInstance.run to refer to viewonly relationship Run.issue_instances should include sync_backref=False set on the IssueInstance.run relationship. (this warning may be suppressed after 10 occurrences) util.warn_limited( 2022-06-01 20:47:21,491 [INFO] Parsing analysis output... Traceback (most recent call last): File "/Users/shijian03/.venvs/mariana-trench/bin/sapp", line 8, in sys.exit(cli()) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1130, in call return self.main(*args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func return ctx.invoke(f, obj, *args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/cli_lib.py", line 208, in analyze pipeline.run(analysis_output, summary_blob) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/init.py", line 363, in run next_input, summary = step.run(next_input, summary) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 236, in run self.analysis_output_to_dict_entries( File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 188, in analysis_output_to_dict_entries for typ, key, e in self._analysis_output_to_parsed_tuples(inputfile): File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/base_parser.py", line 135, in _analysis_output_to_parsed_tuples for e in entries: File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 351, in parse yield from self.parse_handle(handle) File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 367, in parse_handle for postcondition in self._parse_postconditions(model): File "/Users/shijian03/.venvs/mariana-trench/lib/python3.9/site-packages/sapp/pipeline/mariana_trench_parser.py", line 528, in _parse_postconditions port=Port.from_json(generation["caller_port"], "source"), KeyError: 'caller_port'
Looking forward to hearing from you. Thanks!

I have met the same issue. Any suggestion ？

I resolved this issube by:

uninstall fb-sapp : pip uninstall fb-sapp
git clone https://github.com/facebook/sapp.git
cd sapp
python3 setup.py install

I think sapp in pypi is not up to date,mybe.

Hey @Securee and @koftnt, if you rerun MT on your code with the latest version of MT and run sapp analyze on the output from MT. Does this issue still reproduce on the latest version of fb-sapp (0.5.3)?


[QA] Example Parachain Integration tests

Implement some example integration tests using the parachains-integration-tests tool (see example in Trappist), amend the repository structure as needed, and add a documentation page explaining how to configure and run the tests locally.

I used this tool for the last Learning Session about XCM testing. Happy to take this one


chore: add linters for syntax, license and format

https://gravitee.atlassian.net/browse/CJ-566

Several things:

Can we have the configuration and the actual linting in 2 separated commits ?
That way we can back port ourselves the configuration on maintenance branches without having to diff on code

I see that the js/ts linter is applied on gravitee-am-ui only. Could we do it also on gravitee-am-test which contains jest tests ?

Also I believe that the Java formatter will appear on the upgrade bom with Spring 6 (which is not expected in this PR I
believe) ?


annotations to GO:0047141

Hello,
Hoping you can help with this. Nothing at all is annotated to this term which seemed a bit strange. Am I correct in thinking that monothiol glutaredoxin catalyze this reaction:
ID 	GO:0047141
Name 	glutathione-cystine transhydrogenase activity
Ontology 	Molecular Function
Definition 	Catalysis of the reaction: cystine + 2 reduced glutathione = oxidized glutathione + 2 L-cysteine.
(which couples to glutathione reductase activity
ID 	GO:0004362
Name 	glutathione-disulfide reductase activity
Ontology 	Molecular Function
Definition 	Catalysis of the reaction: 2 glutathione + NADP+ = glutathione disulfide + NADPH + H+.)
Cheers...
Antonia.
Reported by: antonialock
Original Ticket: geneontology/ontology-requests/10423

Assuming this was resolved.


How use AES256CTR in newer version?

Version:  openssl 1.1.1q
1- I'm trying to encrypt and decrypt my  const char*  data , but i got wrong result! it's not valid! I dont know why , I used a lot of ways that openssl prepared , but I thought best and correct way is like this:
std::string  encryptCSR(const std::string& in   // in is a plaintext
                                      , const std::string& iv // iv is 16 byte random unsigned
                                      , int outSize = 4096) {
                auto out = new unsigned char[outSize];
                int outlen1, outlen2;
                EVP_EncryptInit(ctx,
                                EVP_aes_256_ctr(),
                                reinterpret_cast<const unsigned char *>(ENC_CSR_HARD_KEY),
                                reinterpret_cast<const unsigned char *>(iv.c_str()));
                EVP_EncryptUpdate(ctx,
                                  reinterpret_cast<unsigned char*>(out) ,
                                  &outlen1,
                                  reinterpret_cast<const unsigned char*>(in.c_str()),
                                  in.size());
                EVP_EncryptFinal(ctx,
                                 reinterpret_cast<unsigned char*>(out)+outlen1,
                                 &outlen2);
                out[outlen1+outlen2] = '\0';
                LOGE("Item(%i): %s",outlen1+outlen2,out);
                auto const result = std::basic_string<unsigned char>(out); // I know it's waste casting because of last line , just was test.
                // cleanup
                delete[] out;
                EVP_CIPHER_CTX_free(ctx);
                return std::string ((const char*)result.data());
            }

2- another question is that is removed AES_ctr256_encrypt function from openssl? or moved other headers?! how

The first highly suspicious things in your code seem to be using C strings as binary data.

I'm wrapping to transparent c code and using C++ style outer scopes. it has not problem , and I found that it was correct , caller was using wrong way.
but how about second question? @t8m

That function has been deprecated in 3.0.  The EVP APIs are the proper way to access cryptographic functions (and as a bonus they use accelerated code paths).  Have a look at the demo code for ARIA-CBC to see how to drive the APIs for a basic cipher.

That function has been deprecated in 3.0. The EVP APIs are the proper way to access cryptographic functions (and as a bonus they use accelerated code paths). Have a look at the demo code for ARIA-CBC to see how to drive the APIs for a basic cipher.

Your right , I just needed to be sure , and cause of that I solved my problem with EVP , not deprecated , thanks for answers.


Improve client exceptions

Overview
Avoid message duplication when a client exception is raised.

Codecov Report

Merging #33 into master will decrease coverage by 0.53%.
The diff coverage is 92.85%.

@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
- Coverage     100%   99.46%   -0.54%
==========================================
  Files           9        9
  Lines         181      187       +6
==========================================
+ Hits          181      186       +5
- Misses          0        1       +1

Impacted Files
Coverage Δ

elmo/api/client.py
100% <100%> (ø)
:arrow_up:

elmo/api/exceptions.py
91.66% <88.88%> (-8.34%)
:arrow_down:

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 aabd2b3...be04926. Read the comment docs.


ModuleNotFoundError: No module named 'omegaconf' (Please provide full installation instructions)

I tried to install it like this:

New conda environment with python 3.9
conda install pytorch==1.12.1 torchvision==0.13.1 -c pytorch
pip install transformers==4.19.2 diffusers invisible-watermark
pip install -e .
Trying to run the script, I get ModuleNotFoundError: No module named 'omegaconf'

Forgot to run pip install -r requirements.txt.
This should probably be added to the readme.

Official READ.ME is suggesting to create conda env from Latent Diffision Github (https://github.com/CompVis/latent-diffusion) and to update it with:
conda install pytorch==1.12.1 torchvision==0.13.1 -c pytorch
pip install transformers==4.19.2 diffusers invisible-watermark
pip install -e .

But it implies lib errors.
READM.ME should suggest to do:
conda env create -f environment.yaml
conda activate ldm
pip install -r requirements.txt

I wrote an article with instructions I followed to make it work:
https://medium.com/@jcrsch/stablediffusion-2-make-it-work-on-your-linux-1e30716eeee4


Gpra vars

Tested w/ and w/o owt_use_grpa in args. Also checked that gclient sync pulls the correct owt-deps-webrtc code. All seems to check out.
Note, this is based on the previous commit in your branch because of that compile error.

Ugh wrong branch again


add event for animation complete

Could you include an event, that is callled, each time the whole mixitup animation is completed? The Event onMixEnd calls on each element, so every function i'd like to use on it, is called multiple times.

Hi - this is not correct. The 'onMixEnd' callback or 'mixEnd' event is called/fire only when the entire animation is complete. Perhaps you are binding it multiple times?
See this example:
http://codepen.io/patrickkunka/pen/oXOPPX


npm-sass / gyp errors when running ./psh.phar install on ubuntu 16.04

   gyp ERR! System Linux 4.15.0-1044-gcp         gyp ERR! command "/usr/bin/node" "/app/platform/src/Storefront/Resources/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose " "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="         gyp ERR! cwd /app/platform/src/Storefront/Resources/node_modules/node-sass         gyp ERR! node -v v11.15.0         gyp ERR! node-gyp -v v3.8.0         gyp ERR! not ok          Build failed with error code: 1         npm ERR! code ELIFECYCLE         npm ERR! errno 1         npm ERR<EMAIL_ADDRESS>postinstall:node scripts/build.js         npm ERR! Exit status 1         npm ERR!          npm ERR! Failed at the<EMAIL_ADDRESS>postinstall script.         npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
 Unable to save binary /app/platform/src/Administration/Resources/administration/node_modules/node-sass/vendor/linux-x64-67 : { Error : EACCES: permission denied, mkdir '/app/platform/src/Administration/Resources/administration/node_modules/node-sass/vendor'             at Object.mkdirSync (fs.js:773:3)             at sync (/app/platform/src/Administration/Resources/administration/node_modules/mkdirp/index.js:71:13)             at Function.sync (/app/platform/src/Administration/Resources/administration/node_modules/mkdirp/index.js:77:24)             at checkAndDownloadBinary (/app/platform/src/Administration/Resources/administration/node_modules/node-sass/scripts/install.js:1 14:11)             at Object.<anonymous> (/app/platform/src/Administration/Resources/administration/node_modules/node-sass/scripts/install.js:157:1 )             at Module._compile (internal/modules/cjs/loader.js:816:30)             at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)             at Module.load (internal/modules/cjs/loader.js:685:32)             at Function.Module._load (internal/modules/cjs/loader.js:620:12)             at Function.Module.runMain (internal/modules/cjs/loader.js:877:12)           errno: -13,           syscall: 'mkdir',           code: 'EACCES',           path:

npm install -g npm@latest
helped with it, those issues happen with npm version 6.10 that comes with the docker setup

sudo npm install --unsafe-perm for some reason also helps, why do i need unsafe permissions to simply install packages without errors?

Ok so I could reproduce this issue, when you run bin/setup the first time, and then have to rerun it, you might encounter permission errors on linux, after i did sudo chown -R $USER:$USER /project/location it went through to "All commands successfully executed!" :)

Since you resolved the Error yourself I close this due to inactivity.


BOSH DNS fails to deploy on Windows 2016 (1709)

On the most recent version of windows 2016, the DNS Cache service is unstoppable:
C:\Windows\system32>sc query dnscache

SERVICE_NAME: dnscache
        TYPE               : 30  WIN32
        STATE              : 4  RUNNING
                                (NOT_STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

This means that the line in the prestart script that stops the service:
https://github.com/cloudfoundry/bosh-dns-release/blob/master/jobs/bosh-dns-windows/templates/pre-start.ps1.erb#L53
will always fail.
One potential workaround / hack would be to:

Edit a registry key to disable the service (https://technet.microsoft.com/en-us/library/cc959920.aspx)
Kill the process that is running the service (PID can be found using (Get-WmiObject -Class win32_service -filter "name LIKE 'dnscache'").ProcessId)

We can't find a way to change the ttl on the cache without restarting the service or restarting the computer, neither of which are possible. Changing the ttl on the stemcell directly is not really an option as that would break consul

Updated context from @sesmith177  in Slack:
it looks like setting HKLM\SYSTEM\CurrentControlSet\Services\Dnscache\Paramaters\MaxCacheTtl will work without restarting the service
i tried it and it appears to work
here's a msdn link to that effect https://technet.microsoft.com/en-us/library/cc959926.aspx
actaully, i think that link is wrong (or out of date) -- it says that editing the registry doesn't take affect immediately, even though it works when i tried it

hey, @sunjayBhatia , i was reviewing and merging your PR with @pivotal-dale-wick and we found that it causes the test assertions in https://github.com/cloudfoundry/bosh-dns-release/blob/master/src/bosh-dns/acceptance_tests/windows/windows_test.go#L49-L66 to fail -- that test explicitly asserts that caching is disabled at system level. Would you be able to work with us to patch the test as well?
On a related note, we are testing this patch on both 2012 and 2016 stemcells, and the 2016 pre-starts are still failing. We're not confident we've set everything up right, but it may indicate that this change is not complete.

@jraqula @pivotal-dale-wick we are taking a look at deploying BOSH DNS with OS caching turned on with windows2016 since the changes we made did not cover that case and that is the deployment that is failing in your CI
As far as the tests go, there are now going to be changes to the two cases:

OS caching turned on: ensure service is enabled/running and that the MaxCacheTtl parameter to the service is not set to 0
OS caching turned off: we no longer care if the service is running since we can't turn it off, just that the MaxCacheTtl parameter to the service is set to 0

@aminjam and I would suggest checking the above parameter with the following powershell:
$RegistryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters"
(Get-ItemProperty -Path $RegistryPath).MaxCacheTtl

@jraqula @pivotal-dale-wick we have an updated PR here: https://github.com/cloudfoundry/bosh-dns-release/pull/12/files that deploys successfully with both windows2012R2 and windows2016 with os caching on and off (and migrations back and forth between the property settings).

@sunjayBhatia, https://github.com/cloudfoundry/bosh-dns-release/pull/12 was merged earlier and ran through our CI but to no avail, we are still encountering the same error with the pre-start script:

L Error: Action Failed get_task: Task ddaca29d-6743-4e38-5275-d9118dfbef1f result: 1 of 1 pre-start scripts failed. Failed Jobs: bosh-dns-windows.

Maybe we could pair on this tomorrow?

@pivotal-dale-wick what do the error logs of the job say?

@pivotal-dale-wick also, yes we are available to pair today

@sunjayBhatia The full transcript is here: https://main.bosh-ci.cf-app.com/teams/main/pipelines/bosh-dns-release/jobs/test-acceptance-windows2016/builds/7

@pivotal-dale-wick that output does not include the job logs from the failed pre-start
Can you paste the output of the bosh-dns-windows pre-start logs from bosh logs -d bosh-dns-windows-acceptance dns-with-system-caching

root@36626a08-5188-4a49-5963-d790fbfbec1f:/tmp/build/ab378b80/tmp/bosh-dns-windows# cat pre-start.stderr.log
Get-NetIPAddress : No MSFT_NetIPAddress objects found with property
'IPAddress' equal to '<IP_ADDRESS>'.  Verify the value of the property and
retry.
At C:\var\vcap\jobs\bosh-dns-windows\bin\pre-start.ps1:3 char:1

Get-NetIPAddress -IPAddress <IP_ADDRESS>

  + CategoryInfo          : ObjectNotFound: (<IP_ADDRESS>:String) [Get-NetIPA
 ddress], CimJobException
  + FullyQualifiedErrorId : CmdletizationQuery_NotFound_IPAddress,Get-NetIPA
 ddress

Remove-ItemProperty : Property MaxCacheTtl does not exist at path
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters.
At C:\var\vcap\jobs\bosh-dns-windows\bin\pre-start.ps1:34 char:3

Remove-ItemProperty -Path $RegistryPath -Name MaxCacheTtl

+ CategoryInfo          : InvalidArgument: (MaxCacheTtl:String) [Remove-It

emProperty], PSArgumentException
+ FullyQualifiedErrorId : System.Management.Automation.PSArgumentException
,Microsoft.PowerShell.Commands.RemoveItemPropertyCommand
root@36626a08-5188-4a49-5963-d790fbfbec1f:/tmp/build/ab378b80/tmp/bosh-dns-windows# cat pre-start.stdout.log
Found loopback interface at InterfaceIndex 1
IPAddress         : <IP_ADDRESS>
InterfaceIndex    : 1
InterfaceAlias    : Loopback Pseudo-Interface 1
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 32
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Preferred
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : ActiveStore
IPAddress         : <IP_ADDRESS>
InterfaceIndex    : 1
InterfaceAlias    : Loopback Pseudo-Interface 1
AddressFamily     : IPv4
Type              : Unicast
PrefixLength      : 32
PrefixOrigin      : Manual
SuffixOrigin      : Manual
AddressState      : Invalid
ValidLifetime     : Infinite ([TimeSpan]::MaxValue)
PreferredLifetime : Infinite ([TimeSpan]::MaxValue)
SkipAsSource      : False
PolicyStore       : PersistentStore


Missing quality level for Stackdriver Trace(Google Cloud Trace)

It seems like README.md misses quality level indication for Stackdriver Trace. Is it intentionally missing?

@premist Stackdriver Trace, Stackdriver Error Reporting, Stackdriver Debugger, and Stackdriver Monitoring are all currently in Alpha quality level.
They are intentionally left out from the top level README.md, because they are somewhat different from the rest of the libraries in this repo. We will add in these documentation soon when we figure out the best documentation strategy.

Thanks for explanation!


APIError: The collection with slug media can't be found

Was looking at the demo app in this repo, and when trying to save a post  with an image / upload in the post in the LexicalMinimal collection I receive the following error:
[02:55:34] ERROR (payload): APIError: The collection with slug media can't be found.
at new ExtendableError (/home/tony/Projects/payload/payload-plugin-lexical-fork/node_modules/payload/src/errors/APIError.ts:26:11)
at new APIError (/home/tony/Projects/payload/payload-plugin-lexical-fork/node_modules/payload/src/errors/APIError.ts:43:5)
at findByIDLocal (/home/tony/Projects/payload/payload-plugin-lexical-fork/node_modules/payload/src/collections/operations/local/findByID.ts:48:11)
at Payload.findByID (/home/tony/Projects/payload/payload-plugin-lexical-fork/node_modules/payload/src/payload.ts:255:12)
at loadUploadData (/home/tony/Projects/payload/payload-plugin-lexical-fork/src/fields/LexicalAfterReadHook.ts:48:24)
at traverseLexicalField (/home/tony/Projects/payload/payload-plugin-lexical-fork/src/fields/LexicalAfterReadHook.ts:80:30)
at traverseLexicalField (/home/tony/Projects/payload/payload-plugin-lexical-fork/src/fields/LexicalAfterReadHook.ts:108:30)
at populateLexicalRelationships (/home/tony/Projects/payload/payload-plugin-lexical-fork/src/fields/LexicalAfterReadHook.ts:35:32)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async /home/tony/Projects/payload/payload-plugin-lexical-fork/demo/node_modules/payload/src/fields/hooks/afterRead/promise.ts:173:31

Hmmmm - you're totally right, I could reproduce that. I'm pretty sure this issue only happens in the demo, not when you actually install the plugin.
Prob some issue with the way I set up the dependencies / project structure. Will have a look!

Should be fixed now!


head: negative numbers broken

head -n -1 with no file argument results in head: error: Argument to option 'n' missing, and with a file argument (e.g. head -n -1 file) results in head: error: invalid line count 'file': invalid digit found in string. head should detect that the -1 isn't an option despite the dash before it, but a negative argument to -n and correctly print all the lines in the file it is used on except the last.

Fixed by #1510


Attributes not working with generic classes

If the attributes are used in generic classes, Godot throws the following error:
<project folder>\GodotOnReady.Generator\GodotOnReady.Generator.GodotOnReadySourceGenerator\Partial__StateMachine.cs(9,23): 'StateMachine._Ready()': no suitable method found to override

StateMachine.cs
using Godot;
using GodotOnReady.Attributes;
using System.Collections.Generic;

public class StateMachine<T> : Node where T : Node
{
    [OnReadyGet] private State<T> currentState = null!;

    public void SetState(State<T> newState)
    {
        currentState.Exit();
        newState.Enter();
        currentState = newState;
    }

    public bool SetStateIf(Dictionary<State<T>, bool> transitionConditions)
    {
        foreach (var kv in transitionConditions)
        {
            if (kv.Value)
            {
                SetState(kv.Key);
                return true;
            }
        }

        return false;
    }

    public override void _Process(float delta)
    {
        base._Process(delta);

        currentState.StateProcess(delta);
    }

    public override void _PhysicsProcess(float delta)
    {
        base._PhysicsProcess(delta);

        currentState.StatePhysicsProcess(delta);
    }
}

Generated output (Partial__StateMachine.cs)
using Godot;
using System;

public partial class StateMachine
{

	[Export] public NodePath CurrentStatePath { get; set; }

	public override void _Ready()
	{
		base._Ready();

		if (CurrentStatePath != null)
		{
			currentState = GetNode<global::State<T>>(CurrentStatePath);
		}
		if (currentState == null)
		{
			throw new NullReferenceException($"'{((Resource)GetScript()).ResourcePath}' member 'currentState' is unexpectedly null in '{GetPath()}', '{this}'. Ensure 'CurrentStatePath' is set correctly, or set [OnReadyGet(OrNull = true)] to allow null.");
		}
	}
}

/*
---- END OF GENERATED SOURCE TEXT ----
Roslyn doesn't clear the file when writing debug output for
EmitCompilerGeneratedFiles, so I'm writing this message to
make it more obvious what's going on when that happens.
*/

I am aware that I haven't declared the class as partial in the example, however doing so results in the same behaviour. Interestingly, the compiler doesn't warn about partial missing, I assume it's because it finds the other error first

Thanks for the report! Fixing it.
I hadn't run into this because Godot doesn't let you attach a generic node script to an object in the editor, and I assumed this doesn't work. But, I've learned more recently that making a script based on it like Foo : StateMachine<Sprite> lets you attach it to a node just fine.

Interestingly, the compiler doesn't warn about partial missing, I assume it's because it finds the other error first

Well, when StateMachine doesn't match up with StateMachine<T>, you actually don't need partial, because these are two entirely different classes as far as C# is concerned. 😄

Fixed in 1.1.2, let me know if it doesn't work out!

Well, when StateMachine doesn't match up with StateMachine, you actually don't need partial, because these are two entirely different classes as far as C# is concerned. 😄

Oh I see, that makes sense.
I am still getting the following error in another class with version 1.1.2:
<project folder>\Scripts\State.cs(6,30): The type 'T' of 'State<T>.stateHolder' is not supported. Expected a Resource or Node subclass.
My guess is that it is caused by the generic type bounds not being copied to the generated class.
Partial__StateMachine.cs
using Godot;
using System;

public partial class StateMachine
	<T>
{

	[Export] public NodePath CurrentStatePath { get; set; }

	public override void _Ready()
	{
		base._Ready();

		if (CurrentStatePath != null)
		{
			currentState = GetNode<global::State<T>>(CurrentStatePath);
		}
		if (currentState == null)
		{
			throw new NullReferenceException($"'{((Resource)GetScript()).ResourcePath}' member 'currentState' is unexpectedly null in '{GetPath()}', '{this}'. Ensure 'CurrentStatePath' is set correctly, or set [OnReadyGet(OrNull = true)] to allow null.");
		}
	}
}

/*
---- END OF GENERATED SOURCE TEXT ----
Roslyn doesn't clear the file when writing debug output for
EmitCompilerGeneratedFiles, so I'm writing this message to
make it more obvious what's going on when that happens.
*/

State.cs (original source where the error is thrown)
using Godot;
using GodotOnReady.Attributes;

public abstract partial class State<T> : Node where T : Node
{
    [OnReadyGet] protected T stateHolder = null!;
    [OnReadyGet] protected StateMachine<T> stateMachine = null!;

    public virtual void StatePhysicsProcess(float delta) { }
    public virtual void StateProcess(float delta) { }
    public virtual void Enter() { }
    public virtual void Exit() { }
}

Actually, that swings the other way: as long as the generic type list matches, only one partial class has to have the generic constraints. They just can't conflict: https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/partial-classes-and-methods#restrictions

The following keywords on a partial-type definition are optional, but if present on one partial-type definition, cannot conflict with the keywords specified on another partial definition for the same type:

[...]
generic constraints

The problem is that when the source generator sees T, it isn't smart enough to look at T's constraints.
This is why State<T> works and T doesn't: the source generator knows that State<whatever> is a node because any State<T> is a node, but it can't tell that T itself is a node because it doesn't look at the constraints.
I think that fixing this means checking to see if the member type is a type parameter, then checking to see if the type parameter has constraints, and if any of the constraints is a Node. (Or a Resource. Or an interface.)
There might be a better API to use to ask Roslyn to tell me if a symbol is convertible to another, so I don't have to do all these intermediate steps myself... but I don't think I know it.
Reopening to address this.

The problem is that when the source generator sees T, it isn't smart enough to look at T's constraints.

Ooh okay, well that's odd.
I'd love to contribute to solve the issue, although I'm not familiar with source generators or the quirks of c# being used in the project. Let me know if I can be of any help :D
By the way, I have other questions not related to this subject, where could I ask them?

I'd love to contribute to solve the issue, although I'm not familiar with source generators or the quirks of c# being used in the project. Let me know if I can be of any help :D

No worries--for me, it's just a matter of poking around at the API and in the debugger to figure out how to get the data I need, then writing ifs around it. 😄 The only critical bit of info that's easy to miss is how to activate this:
https://github.com/31/GodotOnReady/blob/b2c504f312daa8619e2985d6bc890db38bc04b03/src/GodotOnReady.Generator/GodotOnReadySourceGenerator.cs#L31-L36
I have a powershell window in the godot/ directory, and I run $env:DebugGodotOnReadySourceGenerator = 'true' to set the env var (for the lifetime of that particular console), then run dotnet build-server shutdown ; dotnet msbuild each time I want to start a build/debug session. (Doing this with an env var in an individual powershell window means I don't get annoying Debugger.Launch(); popups all the time while trying to build in my IDE.)
I already got this fixed, I believe (will build a new package shortly), but maybe if you hit something you want to dig into in the future or want to try your hand at a fix, you could try that.

By the way, I have other questions not related to this subject, where could I ask them?

Still related to GodotOnReady though, I assume? 😄 Feel free to file an issue.

Ok, 1.1.4 is available and should have this working.

Still related to GodotOnReady though, I assume? 😄 Feel free to file an issue.

Okay! I will

Ok, 1.1.4 is available and should have this working.

It is fixed for where T: Node, or node subclasses (tested with KinematicBody2D), however if I change it to where T: class (with no interface) the error is back. It's not something too useful, but if you write the code manually, it works, so I wanted to point that out.

where T: class (with no interface)

Can you give an example where this is useful? Having a hard time imagining it.

It's not something too useful, but if you write the code manually, it works, so I wanted to point that out.

I can't think of any use case either, but I noticed it while testing so I wanted to let you know. I think it is good to leave it like this.

Hmm, for some reason I thought GetNode<T> was constrained to T : Node, but of course it's not, and I should have realized, because I've been passing it interfaces since #30!
With that in mind, I thought of a reasonable scenario that requires GodotOnReady to accept T : class:
public partial class FetchByGeneric<T> : Node where T : class
{
	[OnReadyGet] public T F { get; set; }
}

public partial class FetchByGenericLabel : FetchByGeneric<Label>
{
	[OnReady] private void TalkAboutIt() => GD.Print("Label text is:", F.Text);
}

public partial class FetchByGenericShout : FetchByGeneric<IShout>
{
	[OnReady] private void ShoutIt() => F.Shout();
}

I'll change it. Thanks for prompting me to think about it harder. 😄
(This brings the library further down the road of assuming that things are nodes when they could be resources, but after #30, I'm ok going in that direction.)

1.1.5 is now available with that change.

I'll change it. Thanks for prompting me to think about it harder. 😄

No problem! I'm glad I could help with that.
Everything seems to work flawlessly under 1.1.5 :D


how to modify response body in post filter?

package com.stc.siot.servicegateway.filter.global;

import com.google.gson.Gson;
import com.stc.siot.servicegateway.model.Response;
import com.stc.siot.servicegateway.model.ResponseStatueEnum;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.cloud.gateway.filter.NettyWriteResponseFilter;
import org.springframework.core.Ordered;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.http.HttpStatus;
import org.springframework.http.server.reactive.ServerHttpResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.server.ServerWebExchange;
import reactor.core.publisher.Mono;

import java.util.Objects;

@Slf4j
@Component
public class GlobalExceptionFilter implements GlobalFilter, Ordered {
    @Override
    public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
        log.trace("exception filter");
        return chain.filter(exchange).then(Mono.fromRunnable(() -> {
            HttpStatus statusCode = exchange.getResponse().getStatusCode();
            log.error("response status code [{}]", statusCode);
            if (Objects.nonNull(statusCode) && statusCode.isError()
                    && statusCode.value() != 401 && statusCode.value() != 404) {
                // todo: log error
                log.error("change response");
                ServerHttpResponse response = exchange.getResponse();
                DataBuffer bodyDataBuffer = response.bufferFactory().wrap("some thing wrong".getBytes());
                response.setStatusCode(HttpStatus.OK);
                response.writeWith(Mono.just(bodyDataBuffer));
            }
        }));
    }

    @Override
    public int getOrder() {
        return 50000;
    }
}

response http code is change to 200, but body didn't change.
If change the order to - 2, the response http code will not change,what should I do.
I use 2.1.4.RELEASE spring-cloud-starter-gateway.
I want to change the body to a unified error message when there is an error in the back-end service.

If change the order to - 2, the response http code will not change,what should I do.

I use 2.1.4.RELEASE spring-cloud-starter-gateway

Have you tried the ModifyResponseBody filter?

Have you tried the ModifyResponseBody filter?

thx，
I want to make different modifications based on different return values, instead of the same modification. The ModifyResponseBody filter seems to be a unified modification.

Same question here! 😃
I would need to modify the request body and/or the response body. I tried to write my own filter based on how ModifyRequestBody / ModifyResponseBody filters work. My main modification is to set input and output types to String.class to get some raw parsing and make my own modifications. I managed it to work but the whole thing seems a bit ugly to me (too much complicated code for what should be a simple thing). It would be very nice to get an exemple of filter to modify the raw request/response body in a recommended way, e.g. an UppercaseRequestBodyFilter.
Thanks!

I don't understand why the existing filters don't work. Modifying the body with webflux is a complex beast and those filters are the only way we support.

On my side, these filters are working great. I was just wondering if there was a simpler/better way to manipulate the request body. For example, I sometimes need to only read the body, not change it. In this case, I still need to reinject it as the ModifyRequestBody filter do. If these filters are already showing the best way to handle body modification, that's ok! Thanks for your answer!
@fyzzy1943 : you could try to write your own filter based on built-in filters source code. As @spencergibb said, modifying the request/response body seems to be a complex task but it remains doable. You could also use the built-in filters with String.class as input and output types to get the "raw" body content and then do what you want in the middle.

In my case i see the value of writing a custom (post) filter to modify the response.  while the existing ModifyResponseBody certainly does the job, the unfortunate limitation is you are limited to Java DSL to configure your routes with it (which is to be expected since the lambda needs to be in Java to be performant).  in my case I ended up aping it and change few sections of it for my purpose so i can enable/configure it using application.yml
but perhaps one approach to consider is to have a variant of ModifyResponseBodyGatewayFilterFactory to be something likeGenericModifyResponseBodyGatewayFilterFactory<T, R> with (where T and R correspond to the "in" and "out" class) and make getRewriteFunction() and abstract method that can be overridden in subclass (instead of part of Config).  True you still need to write Java code for the actual modification in the subclass, but it serves some advantages:

you can configure and/or enable/disable the filter via application.yml
one can do a transformation with just POJOs without having to know the complexities behind the bytes/streams magic in the filter.

In my case i see the value of writing a custom (post) filter to modify the response.  while the existing ModifyResponseBody certainly does the job, the unfortunate limitation is you are limited to Java DSL to configure your routes with it (which is to be expected since the lambda needs to be in Java to be performant).  in my case I ended up aping it and change few sections of it for my purpose so i can enable/configure it using application.yml
but perhaps one approach to consider is to have a variant of ModifyResponseBodyGatewayFilterFactory to be something likeGenericModifyResponseBodyGatewayFilterFactory<T, R> with (where T and R correspond to the "in" and "out" class) and make getRewriteFunction() and abstract method that can be overridden in subclass (instead of part of Config).  True you still need to write Java code for the actual modification in the subclass, but it serves some advantages:

you can configure and/or enable/disable the filter via application.yml
one can do a transformation with just POJOs without having to know the complexities behind the bytes/streams magic in the filter.

Closing due to age of the question. If you would like us to look at this issue, please comment and we will look at re-opening the issue.


Sleeping stops working after a couple nights

Describe the bug
I'm not sure what's triggering it to break, but after a couple days go by, we're no longer able to sleep the night away. We'll still jump into bed and sleep, but the night doesn't skip to daytime.
How to reproduce
I'm not sure how to reproduce it, to be honest, but it does work right after a restart. There's no log lines in the console to help understand what's happening. Time is moving along per usual. I'm using v1.0.10 on purpur 1.20.1.
Screenshots / Videos
https://github.com/AdvancedPlugins/Seasons/assets/70633949/d602b28e-5675-44ae-ad0e-4add928197ed
Server Log
No response

Just upgraded to 1.0.12, I'll report if it comes back.

Still happening on 1.0.12.

it's also happening to me on 1.0.16

This is actually something with essentials / cmi plugin. They have a permission for players to not be required to be sleeping for time to skip, so its broken because of this. Im looking into working together with that feature.


[SP3] Research which kinds of SSEVP Waves we'd be looking at

Research SSEVP Waves
Overview
For our project, we'd be looking into SSEVP at one point so we need to analyze exactly what SSEVP waves would look like and when they would occur.
Timeline
We want this task to be done by roughly next week as we want to know as soon as possible what kinds of SSEVP waves we should anticipate and what they should look like.
Technical Overview
This is a mainly about conducting some research on past literature and seeing how SSEVP brain waves are generated. We need to ensure that we know what SSEVP brain waves look like, how they're generated, when they occur and why the occur.
Submission Guidelines
You'll be submitting this as a google doc on the MINT google drive under signal processing. Then link the doc here in the comments.
Comments and Questions
For any questions, feel free to message @priyanshumahey.

https://docs.google.com/document/d/131R8vIjLegR7t5Z8p66n4yJ3nOdLSh42c-1oymKLLTo/edit


Rails: class methods or scope

Just a question: when should we prefer to use rails scope and where class methods?
These are almost similar things ( one different. That if the lambda (or logic) returns nil, scope returns the current value in this, class method returns nil) See https://www.justinweiss.com/articles/should-you-use-scopes-or-class-methods/
Usually, I use the rule. I prefer to use scope for subqueries, but move it to class methods if it needs to use do end block
# ok
def self.active
  where(finished: false)
end

# better
scope :active, -> { where(finished: false) }

# bad
scope :active, -> do
  where(finished: false)
    .joins(:statuses)
end

# good
def self.active
  where(finished: false)
    .joins(:statuses)
end

Your thoughts?

My thoughts about this, that we should use scope for returning some data. Just use a
Post.where(user_id: user_id)
end)

But as all situation this has a corner case, i think, which i can't specify

I like one-line scopes and class methods for 1+ lines
For esthetic and  readability purposes

@TheBlackArroVV in fact, there are no big differences between scopes and class methods which returns an ActiveRecord relation.  So here I just agree with Aleks that we should avoid using multiline lamda calls for esthetic and readability purposes


[T3A2][T09-A2]Clarence Chee

Ready for review.

Accepting this PR without a review because another of your PRs for this tutorial was reviewed in detail.


2KLOG Logs Different Formatted Message

Expected behavior
In the log file, I should have log message like this:
[2KLOG: 'data returned with code: 404'
Actual behavior
But the log I got is like this:
[2KLOG 404 '
Enviroment Details

Karma version (output of karma --version): 0.13.15

Steps to reproduce the behaviour

I am using AngularJS's $http service. I have the following code

$http({method:'GET', url:'...'}).then(function(data){
console.log('data returned with code: 200'); // 2KLOG for this is normal
}, function(error){
console.log('data returned with code: 404'); // But 2KLOg for this is not correct. The log is normal if I removed the colon.
});

You will need to disable colors, that 2K is part of color codes in bash.

Closing per above.


can't use 'I' character on expression binding

OpenUI5 version: 1.60.7 & 1.44.26
Browser/version (+device/version): Chrome 75.0.3770.80 (latest)
Any other tested browsers/devices(OK/FAIL): Firefox is OK
Hello Experts,
After google chrome update I got errors about expression binding like that.
Uncaught SyntaxError: Expected '}' and instead saw 'I' in expression binding "ui.ssuite.s2p.mm.pur.po.manage.st.s1::sap.suite.ui.generic.template.ListReport.view.ListReport::C_PurchaseOrderTP--{:= ${parameter>/stableId}.getStableId({type: 'ListReportPage', subType: 'DynamicPageTitle'})}" is not a valid ID. at position 152
I can't use 'I' char. like parseInt, getStableId

I've just got an update for Chrome to 75.0.3770.90. Do you still face the issue with that version?

Hello @sahinhakan !
From the error message I can see that the input to the binding parser was "ui.ssuite.s2p.mm.pur.po.manage.st.s1::sap.suite.ui.generic.template.ListReport.view.ListReport::C_PurchaseOrderTP--{:= ${parameter>/stableId}.getStableId({type: 'ListReportPage', subType: 'DynamicPageTitle'})}" is not a valid ID. which is indeed not a valid expression binding, but an error message thrown by ManagedObject for an invalid ID. How did this message end up in your binding?
Can you please tell us more about what you are doing and how we can reproduce the issue?
Best regards,
Thomas

Problem is resolved by chrome 75.0.3770.90 update. Thank you for your interesting.


Have consistent hover style in top-level menu

When hovering over the Debezium logo, that tile gets a bit darker. That's not the case when hovering over any of the menu items ("Blog", "Community", etc.). This should be done consistently. The hover state should be a bit lighter than the active state when being e.g. on the blog URL.

Raised pr https://github.com/debezium/debezium.github.io/pull/603

Done.


How to Debug and run with output to console in XCode IDE?

Hi,
I'm not familiar with XCode. Could you give me advice on how to debug and run in XCode? Seems like with so many different main function I should do something to make this possible? Thanks!

To be more specific, I set breakpoint and it just does not stop. What should I configure? Thanks for any suggestions!!