Provide an API to flush the Promise resolution queue

Do you want to request a feature or report a bug?
Feature, I guess, but a pretty important one when testing code that uses Promises.
What is the current behavior?
I have a component that uses Promise wrapping and chaining internally in the follow-up to an external asynchronous action. I'm providing the mock of the async action and resolving the promise it returns in my test.
The component something like this:
class Component extends React.Component {
  // ...
  load() {
    Promise.resolve(this.props.load())
      .then(
        result => result
          ? result
          : Promise.reject(/* ... */)
        () => Promise.reject(/* ... */)
      )
      .then(result => this.props.afterLoad(result));
  }
}

And the test code looks something like this:
const load = jest.fn(() => new Promise(succeed => load.succeed = succeed));
const afterLoad = jest.fn();
const result = 'mock result';
mount(<Component load={load} afterLoad={afterLoad} />);
// ... some interaction that requires the `load`
load.succeed(result);
expect(afterLoad).toHaveBeenCalledWith(result);

The test fails because the expect() is evaluated before the chained promise handlers. I have to replicate the length of the inner promise chain in the test to get what I need, like this:
return Promise.resolve(load.succeed(result))
  // length of the `.then()` chain needs to be at least as long as in the tested code
  .then(() => {})
  .then(() => expect(result).toHaveBeenCalledWith(result));

What is the expected behavior?
I'd expect Jest to provide some sort of an API to flush all pending promise handlers, e.g.:
load.succeed(result);
jest.flushAllPromises();
expect(result).toHaveBeenCalledWith(result);

I've tried runAllTicks and runAllTimers to no effect.

Alternatively, if I'm just missing some already existing feature or pattern, I'm hoping for someone here to point me in the right direction :)

While async testing promises it's good to remember that you can return a test function as a Promise, so something like this will work:
test('my promise test', () => { //a test function returning a Promise
  return Promise.resolve(load.succeed(result))
    .then(() => {})
    .then(() => expect(result).toHaveBeenCalledWith(result));
})

Returning a Promise from test function makes Jest aware that this is a async test and to wait until it's resolved or times out.

@thymikee Of course I'm returning the value to make Jest wait - that's completely off the point. Note how you even left the line .then(() => {}) in your code. I don't see how I can describe the problem more concisely than I already did in the opening post. Please read it thorougly and either reopen the issue or describe how to work around it.

Ran into a similar problem, and described it here: https://github.com/pekala/test-problem-example
In short: I'm trying to assert on sequence of actions dispatched to the Redux store as a result of user interaction (simulated using enzyme). The actions as dispatched sync and async using Promises (mocked to resolve immidiately). There seems to be no way to assert after the Promise chain is exhaused, if you don't have direct access to the promise chain. setTimeout(..., 0) works, but it feels hacky and if the assertion in the callback of setTimeout fails, Jest fails with timeout error (instead of assertion error).
The idea of flushAllPromises seems like a solution, although I would think that that's what runAllTicks should do?

As a follow-up: I tried replacing setTimeout(..., 0) with setImmediate and this seems to both run the assertions after Promise callback microtask queue is exhausted and prevents Jest from timing out on assertion errors. So, this works ok, and is an acceptable solution for my usecase:
test('changing the reddit downloads posts', done => {
    setImmediate(() => {
        // assertions...
        done()
    })
})

A helper function can turn that into a promise itself so you don't need to deal with the done callback. It's small enough it's pretty harmless to keep in userland, but I wouldn't complain if it was put on the jest object. Something like this gets used a lot in my projects.
function flushPromises() {
  return new Promise(resolve => setImmediate(resolve));
}

test('', () => {
  somethingThatKicksOffPromiseChain();
  return flushPromises().then(() => {
    expect(...
  });
})

With async await it's almost pretty:
test('', async () => {
  somethingThatKicksOffPromiseChain();
  await flushPromises();
  expect(...
})

@jwbay that's some nice sugar right there 🍠!
It's true this this flushPromises turns out to be a one-liner, but it's not at all obvious how to get to that one line. So I think it would be a benefit for Jest users to have it available as a util function.

@pekala the one liner IMO doesn't provide the required behavior because it will not wait until the following pending promise is resolved:
function foo() {
  return new Promise((res) => {
    setTimeout(() => {
      state = false;
      res()
    }, 2000);
  });
}

What about swizzling Promise and when a new Promise is created add it to some array then flush all promises will await on Promise.all over this array?

@talkol I think it will, as long as you us the fake timers as well. I haven't tested that though.

If you don't fake timers, your tests will take real 2s+ to complete. I think the best practice would be to remove these types of delays, in which case the flushPromises as proposed by @jwbay does the job.

All depends on what you're trying to test :) All I'm saying the timers are an unrelated concern to waiting for the promises

We're hitting issues related to Promises not resolving, which are intermixed with setTimeout calls. In jest v19.0.2 we have no problems, but in jest v20.0.0 Promises never enter the resolve/reject functions and so tests fail. Our issue seems to be related this issue of not having an API to flush the Promise resolution queue, but this issue seems to pre-date jest v20.0.0 where we started to see the issue, so I'm not completely sure.

This is only solution we've been able to come-up with for some of our tests, since we have a series of alternating setTimeouts and Promises used in the code that eventually calls the onUpdateFailed callback.
  ReactTestUtils.Simulate.submit(form);
  return Promise.resolve()
    .then(() => { jest.runOnlyPendingTimers(); })
    .then(() => { jest.runOnlyPendingTimers(); })
    .then(() => { jest.runOnlyPendingTimers(); })
    .then(() => {
      expect(onUpdateFailed).toHaveBeenCalledTimes(1);
      expect(getErrorMessage(page)).toEqual('Input is invalid.');
    });

Not so pretty, so any advice here greatly appreciated.

Another example where you cannot return promise from test:
describe('stream from promise', () => {
  it('should wait till promise resolves', () => {
    const stream = Observable.fromPromise(Promise.resolve('foo'));
    const results = [];
    stream.subscribe(data => { results.push(data); });
    jest.runAllTimers();
    expect(results).toEqual(['foo']);
  });
});

This test fails with jest 20.0.4.

@philwhln 's solution also can be written with async/await
ReactTestUtils.Simulate.submit(form);

await jest.runOnlyPendingTimers();
await jest.runOnlyPendingTimers();
await jest.runOnlyPendingTimers();

expect(onUpdateFailed).toHaveBeenCalledTimes(1);
expect(getErrorMessage(page)).toEqual('Input is invalid.');

I would love a utility function that flushed the promise queue

I would love a function that flushes the promise queues between tests also.
I'm testing code that uses Promise.all to wrap multiple promises. When one of those wrapped promises fails (because that is what I want to test) the promise immediately returns meaning the other promises sometimes (race condition, non deterministic) return while the next test is running.
This causes all sorts of havoc with my tests having non predictable/repeatable outcomes.

To properly implement this, we'd need to mock Promise so we can eventually see all enqueued micro tasks to resolve them synchronously. Something in the way of what promise-mock is doing.
There's already an API to flush the micro tasks enqueued with process.nextTick and that API should probably also work with Promises (jest.runAllTicks).

I had a solution with jasmine that hooked into the nextTick of Yaku, a promise library and caught nextTick calls and allowed playing them early.
However jest uses promises itself, which made this problematic.
In the end I took Yaku and hacked it to have a flush method which flushes out its queue. By default it runs normally using nextTick, but if you call flush all pending promise handlers execute.
The source is here:
https://github.com/lukeapage/yaku-mock
It could do with tidying up, contacting ysmood to see what they think of it and adding documentation, but it pretty much does what you want and worked for me as a simple solution to make promises sync in tests.

As a simple workaround to that I like the @jwbay's solution.
How about we add something similar to jest object?
await jest.nextTick();

Implemented as
const nextTick = () => new Promise(res => process.nextTick(res));

cc @cpojer @SimenB @rogeliog

I am using enzyme to mount React components.
I, too, have functions that expect Promises to execute, but none of the aforementioned fixes worked.  I would be able to handle them synchronously in my test - if - the functions returned the Promise objects, using await, but unfortunately the functions do not return the Promise objects.
This is the workaround that I ended up doing using a spy on the global Promise function.
    const spy = sinon.spy(global, 'Promise');

    wrapper.props().dispatch(functionWithPromiseCalls());

    for (let i = 0; i < spy.callCount; i += 1) {
      const promise = spy.getCall(i);
      await promise.returnValue;
    }

    expect(...)

I encountered a use case for this (thanks @jwbay for the awesome technique)
For example, you want to check that your function has a timeout, and that the timeout is precisely enforced:
      jest.useFakeTimers();
      const EXPECTED_DEFAULT_TIMEOUT_MS = 10000;
      const catchHandler = jest.fn().mockImplementationOnce(err => {
        expect(err).not.toBeNull();
        expect(err.message).toContain('timeout');
      });

      fetchStuffWithTimeout().catch(catchHandler);

      expect(catchHandler).not.toHaveBeenCalled(); // not yet

      jest.advanceTimersByTime(EXPECTED_DEFAULT_TIMEOUT_MS - 1);
      await flushPromises();

      expect(catchHandler).not.toHaveBeenCalled(); // not yet

      jest.advanceTimersByTime(1);
      await flushPromises();

      expect(catchHandler).toHaveBeenCalledTimes(1); // ok

returning a promise doesn't allow checking the precise timing of the resolution/rejection.
A promise flushing is needed there. Without it, the expectation is called too early.

For people following along, there's an open PR for this here: #6876

Cross posting from https://github.com/airbnb/enzyme/issues/1587
I wonder if the following pattern should be enough to solve this problem, and if I'm doing something that is considered bad practice and I shouldn't be doing.
What do people think about this approach?
export class MyComponent extends React.Component {
  constructor (props) {
    super(props)

    this.hasFinishedAsync = new Promise((resolve, reject) => {
      this.finishedAsyncResolve = resolve
    })
  }

  componentDidMount () {
    this.doSomethingAsync()
  }

  async doSomethingAsync () {
    try {
      actuallyDoAsync()
      this.props.callback()
      this.finishedAsyncResolve('success')
    } catch (error) {
      this.props.callback()
      this.finishedAsyncResolve('error')
    }
  }

  // the rest of the component
}

And in the tests:
it(`should properly await for async code to finish`, () => {
  const mockCallback = jest.fn()
  const wrapper = shallow(<MyComponent callback={mockCallback}/>)

  expect(mockCallback.mock.calls.length).toBe(0)

  await wrapper.instance().hasFinishedAsync

  expect(mockCallback.mock.calls.length).toBe(1)
})

I had an issue when the async call was not done straight in componentDidMount, but it was calling an async function, that was calling another async function and so on. If I added an extra async step in all the async chain, I'd need to add an extra .then() or an extra await, but this is working just fine.
Is there a reason why I shouldn't be using this approach or does this looks good to people?

I went on an adventure in doing this in userland and found it's actually doable and not so bad (though there are quite a few pitfalls to be run into if you don't have a map). Here's an experience report that's (hopefully) detailed enough to use directly; a TLDR is to transpile async/await down to promises, and swap native promises for bluebird and native timers for lolex; transpile everything, including node_modules/; queueMicrotask is the primitive you need for promises, but by default lolex won't provide it due to JSDOM not providing it.

I ran into the same issue with jest.mockAllTimers() and React components that call a Promise in componentDidMount().
The solution from #issuecomment-279171856 solved the problem in an elegant way.
We need something similar in the official Jest API!

I just recently ran into an issue while upgrading a bunch of stuff, it revealed an issue in a bunch of tests where we were not always waiting for promises to finish. And while methods like await new Promise(resolve => setImmediate(resolve)); did work in simple cases, I found in my tests, i'd have to run that a few times to clear the pipe. Which is what @quasicomputational mentioned in their exploration here. Unfortunately, I don't think there is a way to know when that pipe is clear without intercepting the promises as they get created. So I created a little library to do that...promise-spy. Though, I did have one test that was using fake timers and it didn't work with that...so its not yet a fully working solution.

I found myself having this same issue and I realized:
we should not flush pending promises but instead we should have the entire test fail if there are pending promises.
This way we will be forced to abort pending promises inside of tested code using the Abort Controller:
https://developers.google.com/web/updates/2017/09/abortable-fetch
Having jest flushing promises is equal to say "Concurrency is hard so let's not test it". In reality it should be quite the opposite.
Since concurrency is hard we should test it even more and not allow at all a test to pass with pending promises.

@giorgio-zamparelli: "Concurrency is hard so let's not test it" is completely beside the point of the original report. The issue is not concerned with pending promises but rather with the fact that awaiting propagation of promise resolution through async code in tests is needlessly hard.

Promises should resolve normally in tests without the need to be flushed.
If there is a pending promise in your test you should either wait for it to resolve using for example wait from @testing-library/react OR if the pending promise is not part of your scope you should either mock the code starting it or you should abort the pending promise somewhere like on the React willUnmount lifecycle event using the AbortController
The AbortController is a new API that almost no-one is using and I have the feeling is the fix for most of the hanging promises in tests.
PROVE ME WRONG:
I could be easily proven wrong if someone that reported having problems with pending problems in this Issue already tried using AbortController and jest.mock and it wasn't enough.

@giorgio-zamparelli: Maybe the misunderstanding stems from my use of the phrase "flush all pending promise handlers" (and if it does, I'm sorry). As you'll hopefully see if you read the issue description thoroughly, I meant "pending handlers of promises". So, to reiterate, we're not talking about h4cking into pending promises here, but rather about flushing promise resolution with minimum hassle. Or, in other words, about transparently and deterministically getting from the point where a promise is resolved to the point where the test picks up on this.

I recently released flush-microtasks for this purpose. It borrows its implementation from React, which is surprisingly more complex than @jwbay's solution here or @thymikee's solution here. I'm unsure whether the complexity makes any meaningful difference, but I assume it accounts for edge cases not considered by the other solutions in this thread.

@aleclarson Is there any difference between flush-microtasks and flush-promises

@ramusus Looks like flush-promises uses the same approach as @jwbay's solution.
https://github.com/kentor/flush-promises/blob/46f58770b14fb74ce1ff27da00837c7e722b9d06/index.js

RTL has also copied React's code: https://github.com/testing-library/react-testing-library/blob/8db62fee6303d16e0d5c933ec1fab5841dd2109b/src/flush-microtasks.js

The flushPromises solution only works on Promises which are resolved immediately but not on those which are still pending.

Hmm, good point. I don't know if it's possible to track pending promises somehow. Might be able to do something clever with async_hooks, not sure

I've tried to wrap/mock the Promise object to include a counter but that doesn't work:
const _promise = window.Promise;
window.Promise = function(promiseFunction){
    // counter
    return new _promise(promiseFunction);
}

Main issue is async functions which do not use the global Promise at all

There's an interesting update to this in Jest 26, where fake timers are now based on @sinon/fake-timers (if enabled with jest.useFakeTimers('modern')).
I tried the modern fake timers with my tests, and unfortunately it causes the await new Promise(resolve => setImmediate(resolve)); hack to hang indefinitely. Fortunately, @sinon/fake-timers includes a several *Async() methods which "will also break the event loop, allowing any scheduled promise callbacks to execute before running the timers.". Unfortunately, I don't see any way to get the clock object via the Jest APIs.
Anyone know how to get Jest to give us that clock object?

This professional hacker is absolutely reliable and I strongly recommend him for any type of hack you require. I know this because I have hired him severally for various hacks and he has never disappointed me nor any of my friends who have hired him too, he can help you with any of the following hacks:
-Phone hacks (remotely)
-Credit repair
-Bitcoin recovery (any cryptocurrency)
-Make money from home (USA only)
-Social media hacks
-Website hacks
-Erase criminal records (USA & Canada only)
-Grade change
Email: cybergoldenhacker at gmail dot com

Like others, my motivation to use await new Promise(setImmediate); is to flush resolvable promises, so that I can unit test their impact on the system.
It would seem the "modern" fake timers indeed underperform others by timing out seemingly nonsensically.
Here's some unit tests to describe this:
describe('flushing of js-queues using different timers', () => {
  beforeAll(() => {
    // It would take the failing test 5 long seconds to time out.
    jest.setTimeout(100);
  });

  it.each([
    [
      'given real timers',
      () => {
        jest.useRealTimers();
      },
    ],
    ['given no timers', () => {}],
    [
      'given "legacy" fake timers',
      () => {
        jest.useFakeTimers('legacy');
      },
    ],
    [
      // This is the the failing scenario, not working like the other timers.
      'given "modern" fake timers',
      () => {
        jest.useFakeTimers('modern');
      },
    ],
  ])(
    '%s, when using setImmediate to flush, flushes a promise without timing out',
    async (_, initializeScenarioSpecificTimers) => {
      initializeScenarioSpecificTimers();

      let promiseIsFlushed = false;

      Promise.resolve().then(() => {
        promiseIsFlushed = true;
      });

      // Flush promises
      await new Promise(setImmediate);

      expect(promiseIsFlushed).toBe(true);
    },
  );
});

I feel like the previous test should not fail as it does.
For me the workaround was to flush promises by using the node-native "setImmediate" from package "timers", instead of the global "setImmediate". Having this, the following passes:
import { setImmediate as flushMicroTasks } from 'timers';

it('given "modern" fake timers, when using native timers to flush, flushes a promise without timing out', async () => {
  jest.useFakeTimers('modern');

  let promiseIsFlushed = false;

  Promise.resolve().then(() => {
    promiseIsFlushed = true;
  });

  // Flush micro and macro -tasks
  await new Promise(flushMicroTasks);

  expect(promiseIsFlushed).toBe(true);
});

Thanks @aleclarson.

Here's our solution for this issue:
https://github.com/team-igniter-from-houston-inc/async-fn
https://medium.com/houston-io/how-to-unit-test-asynchronous-code-for-javascript-in-2020-41c124be2552
Test code can be written like:
// Note: asyncFn(), extends jest.fn() with a way to control resolving/rejecting of a promise
const load = asyncFn();

const afterLoad = jest.fn();
const result = 'mock result';

mount(<Component load={load} afterLoad={afterLoad} />);

// ... some interaction that requires the `load`

// Note: New way to controlling when promise resolves
await load.resolve(result);

expect(afterLoad).toHaveBeenCalledWith(result);

@jansav nice/+1. Fwiw I've seen that approach called the deferred pattern. I think it does make for nicer tests.

It seems to me that the issue with fake timers is that it breaks the natural run-loop for how timers are supposed to function. I wonder why we can't simply have the jest timer run functions be async?  Changing timers to be immediate does make the test code look neat, but its causing this massive side-effect.

my usecase:
    public static resolvingPromise<T>(result: T, delay: number = 5): Promise<T> {
        return new Promise((resolve) => {
            setTimeout(
                () => {
                    resolve(result);
                },
                delay
            );
        });
    }

test file:
        it("accepts delay as second parameter", async () => {
            const spy = jest.fn();
            MockMiddleware.resolvingPromise({ mock: true }, 50).then(spy);
            jest.advanceTimersByTime(49);
            expect(spy).not.toHaveBeenCalled();
            jest.advanceTimersByTime(1);
            await Promise.resolve(); // without this line, this test won't pass
            expect(spy).toHaveBeenCalled();
        });

anybody come up with something with async_hooks ?

Is there any workaround that works with the modern fake timers, promises (async/await) that could be added to this page: https://jestjs.io/docs/next/timer-mocks, so we all know what do do? This thread is starting to get hard to follow.
I think many of us has a lot of code where promises should resolve after advancing timers (using modern), and that spies/mock functions are expected to have been called when those promises have resolved. If it requires calling some magic function to "flush" these promises it would be nice to have this solution documented (at least until a version where this "just works" without having to do any custom magic).

IMO, a clean solution to this issue is making timer mocks async and advising users to include lint rules about unhandled async. So for example:

test file:
it("accepts delay as second parameter", async () => {
    const spy = jest.fn();
    MockMiddleware.resolvingPromise({ mock: true }, 50).then(spy);
    jest.advanceTimersByTime(49);
    expect(spy).not.toHaveBeenCalled();
    jest.advanceTimersByTime(1);
    await Promise.resolve(); // without this line, this test won't pass
    expect(spy).toHaveBeenCalled();
});

changes to:
it("accepts delay as second parameter", async () => {
    const spy = jest.fn();
    MockMiddleware.resolvingPromise({ mock: true }, 50).then(spy);
    await jest.advanceTimersByTime(49);
    expect(spy).not.toHaveBeenCalled();
    await jest.advanceTimersByTime(1);
    expect(spy).toHaveBeenCalled();
});

@thesmart and that solution works when using modern, no matter of the amount of promises that need to resolve in a chain?

@thesmart and that solution (await Promise.resolve();) works when using modern, no matter of the amount of promises that need to resolve in a chain?

The default is now modern (see: sinonjs)  but I'm not sure what version of Jest aligned w/ the test case above.  A recommendation should probably also be made for legacy.

Maybe this is off topic but I really need some help with mocking async / await functions.
I want to test this async / await function using jest/enzyme
 deleteAndReset = async () => {     console.log('click on delete and reset!');     await this.submitDeleteMeeting();     // console.log(this.props);     this.props.resetMeetingState();   }
which occurs on
  <BackButton             data-test="backButton"              onClick: this.deleteAndReset            />
What I tried
`describe('Delete and reset on click', () => {
const props = {
intl,
deleteAndReset: jest.fn(),
submitDeleteMeeting: jest.fn()
};
it('on click call deleteAndReset', async () => {
component = shallow(<StartMeeting {...props} />);
const backButton = findByDataTestAttr(component, 'backButton');

expect(backButton.exists()).toEqual(true);

const instance = component.instance();

backButton.props().onClick();

await Promise.resolve();

expect(instance.props.submitDeleteMeeting).toHaveBeenCalled();

});
});
`
This is what I got - "expect(jest.fn()).toHaveBeenCalled()
Expected number of calls: >= 1
Received number of calls:    0"

What I am doing wrong with async / await testing?
Sorry for a little bit longer post but this "simple" thing drives me crazy for long time.
Any advice and suggest would be helpful, thanks for your time! :)

@dobradovic It is off-topic indeed. I'd recommend StackOverflow, unless you'd like to report a bug, in which case a new, separate issue would do the trick.

This solution was broken for the JSDOM environment in Jest 27, via the removal of setImmediate: https://github.com/facebook/jest/issues/2157#issuecomment-279171856
Removal: https://github.com/facebook/jest/pull/11222
An equal implementation of waitForPromises now gets a lot trickier, complicated further by the fact that setImmediate in JSDOM apparently bypassed fake timers. So moving to another timer means we need to handle faking.
One solution is switching to setTimeout, and temporarily forcing real timers. For illustration:
return new Promise(resolve => {
  jest.useRealTimers();
  setTimeout(() => resolve(), 0);
  jest.useFakeTimers();
});

Now we obviously don't want to force fake timers if they weren't fake already. I seem to be able to tell whether timers are faked via jest.isMockFunction(setTimeout) ✔. However, I can't tell which timer style is currently being used; real vs. modern ❌. For a widely used function to suddenly need this context to work is quite painful.
@SimenB short of a fully supported jest.waitForPromises, would you instead consider a new Jest API like:
jest.withRealTimers(() => {
  // code here is always run with real timers
});
// original timer state restored -- whether real, legacy, or modern

This could be nice even once legacy is removed, since the test code doesn't need to try and detect the current timer state.
Alternately, has anyone else worked around this differently?

@jwbay we've been using requireActual:
export function flushPromises(): Promise<void> {
  return new Promise(jest.requireActual("timers").setImmediate);
}

The following implementation was working just fine (and still does when used with legacy timers):
global.flushPromises = () => new Promise(process.nextTick)

However, it is not working with modern timers because process.nextTick is also mocked. I am curious to know why, since @sinonjs/fake-timers does not do this by default (see the default value of config.toFake)

With idea from @acontreras89 , I don't need to flushPromises, just let Jest doNotFake nextTick to make Promise works.

I've hit a similar problem where I'm trying to test code which automatically retries a series of asynchronous operations. It uses a combination of promises and timers internally, and can't always expose a promise or callback to signal completion.
Based on the suggestion by @stephenh, here's a utility function I wrote to help my tests wait for all pending timers and promises:
const waitForPromisesAndFakeTimers = async () => {
  do {
    jest.runAllTimers();
    await new Promise(jest.requireActual('timers').setImmediate);
  } while (jest.getTimerCount() > 0);
};

The loop is there to catch timers which were scheduled following resolution of other promises. It definitely isn't suitable for all situations (e.g. recursive timers), but it's useful in some cases.

@peter-bloomfield  Thanks a lot! Your snippet worked like a charm. I have the exact same situation, I have a fetch implementation that retries the requests using setTimeout and wrapping them in a promise each time. I wanted to extract the value out of the promise so I had to await it again:
const requestPromise = request(requestUrl)
await waitForPromisesAndFakeTimers();

const { status } = await requestPromise

expect(status).toEqual('success');

Still think this makes sense as a util helper. I've used flushPromises() in all projects since I started following this.


When does different device state mean in mtd's?

SED sends one data point every 30 seconds if it is connected and increments the counter, but if it is detached or disabled, it does nothing.
Polling period is of 15 seconds, and child timeout is 30 seconds.
I am facing the issue that SED don't send data for sometime but when it again starts sending data , its counter is continuous.
So what does it mean to be in connected state for a SED?

Closing stale issue.

@bhumikaajain I am also seeing something similar in my system. Have you managed to solve this?
Thanks,
Kaushalya


New window size doesn't match size of existing, open windows

VSCode Version: 1.9.0 (1.9.0)
OS Version: Mac OS 10.12.3

Steps to Reproduce:

Create a new window, size it as desired - mine are large, btw.
File > New Window

"window.newWindowDimensions": "inherit"


Add lzop support

Please have a look at this article: http://blog.cloudera.com/blog/2009/11/hadoop-at-twitter-part-1-splittable-lzo-compression/
To compress data with lzo, use lzop. For example to compress and replace all csv files in the current directory:
lzop -U *.csv
eel could have the capability to load and store lzop compressed files

Support for LZO already exists :)
Just set eel.parquet.compressionCodec=lzo


ci: add back cargo cache

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
To mitigate https://github.com/risingwavelabs/risingwave/issues/15872
Previously deleted in #9619

Checklist

[ ] I have written necessary rustdoc comments
[ ] I have added necessary unit tests and integration tests
[ ] I have added test labels as necessary. See details.
[ ] I have added fuzzing tests or opened an issue to track them. (Optional, recommended for new SQL features #7934).
[ ] My PR contains breaking changes. (If it deprecates some features, please create a tracking issue to remove them in the future).
[ ] All checks passed in ./risedev check (or alias, ./risedev c)
[ ] My PR changes performance-critical code. (Please run macro/micro-benchmarks and show the results.)

[ ] My PR contains critical fixes that are necessary to be merged into the latest release. (Please check out the details)

Documentation

[ ] My PR needs documentation updates. (Please use the Release note section below to summarize the impact on users)

Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.

Why?

I should delete existing cache

git submodule doesn't work yet 🤔

Hmmm, the git dir is a little large


[AzureMonitorExporter] fix more nullables

Towards #34013.

API change check
API changes are not detected in this pull request.


More resilient startup

Currently when promscale cannot connect to database it almost immediately crashes. In environments where database is started at the same time as promscale (like tobs) this can lead to multiple Crash Loops. Since kubernetes does an exponential crashloop backoff, it leads to long delay in startup.
My proposal is to add a timeout at the startup to check for connection for about 120s (ideally this should be customizable via cli flag). This way long database startup won't affect the whole stack startup that much.
pinging @VineethReddy02 @cevian for task prioritization after release.

closing this issue, as the same issue is created by the user in #592


Create label capabilities to styles

There should be options to display labels on items. The labeling should be controlled in the styles panel.


async API?

It appears libusb-rs does not support the libusb async API.  Any plans or thoughts on this?
I've used the async API from C++ before and am considering doing it from Rust.

I started implementing safe Rust bindings to the libusb async transfer functions a while ago, but haven't gotten around to finishing it yet. I'll try to clean it up later this week.

Thanks, I'll give that a look when you push it.

@goertzenator Yeah, definitely. Sounds like @kevinmehall might be ahead of me on that. I'd love to see what he comes up with.

Work in progress here: https://github.com/kevinmehall/libusb-rs/blob/async/src/async.rs
Example streaming from a device
The new concept (vs libusb) is the AsyncGroup (could use a better name), which takes ownership of transfers when they are submitted, manages completions, and returns the completed transfers back to you to be handled and/or resubmitted. Libusb does that with callbacks, but this wraps that error-prone API in a safe Rust interface. It's not quite zero-cost, because it keeps track of pending transfers in a HashSet and completed transfers in a VecDeque, but should have minimal overhead.
I still need to rework the buffer management. Right now a transfer takes &'d mut [u8]. That lifetime must outlive the AsyncGroup to guarantee that it stays valid while the transfer is pending, In reality, it only needs to live until the transfer completes, but references can't express that. It requires a mutable buffer because the same type is shared for both IN and OUT directions. I'm thinking the Transfer should own the buffer -- that solves the mutability question, and if it let you give ownership to the AsyncGroup on submit, and take it back on completion, you can stream owned buffers into or out of a USB endpoint.
Other TODOs (some could happen later);

A nonblocking version of wait_any (returns None immediately if there are no completions ready)
A variant of cancel_all that just requests cancellation, and lets you wait for it yourself, so
you can collect data from already- or partially-completed transfers.
The ability to cancel individual transfers. submit could return something that contains the
*mut libusb_transfer but only offers a cancel method.
The ability to associate user data with transfers. Right now it works if all the transfers are
indistinguishable, but to use the same AsyncGroup / thread for multiple endpoints or devices,
you want a way to distinguish them. AsyncGroup could be parametrized over an arbitrary token type
that would be passed to submit, kept in a HashMap (instead of the HashSet), and returned
from wait_any.

Thanks Kevin.  I'm actually interested in using my own event loop (mio), and this wrapper doesn't seem to support that... and I'm not certain it should since libusb doesn't provide it in a portable manner (no Windows support).
My inclination for my project at hand is to just code straight to Linux usbfs.  Using the libusb usbfs layer as a guide, this seems very doable.

I think it would be possible to make the AsyncGroup a mio Evented under the proposed new mio API such that you could add the AsyncGroup to your event loop and get notified when a completion is ready. Windows could use an event listener thread, or maybe someday libusb will expose the underlying IOCP handles on Windows.

@kevinmehall What's the status here? I would really love to see this, especially because currently I need to read_interrupt on 2 interfaces while i read_control from a 3rd one. With threads this is pretty messy. But with your given "Example streaming from a device" it seems easily possible :)
Looking forward to seeing this!

I have an async implementation for linux (and possibly mac, haven't tested it) that can be used with mio, but it made the api somewhat more complicated - most structs are generic to enable choosing whether you want to use the libusb sync or async api's (and to enable different async solutions for linux and windows) and if you want to store references, Rc's or Arc's to the Context. Sync and Async api's are also defined in traits. There is practically no documentation, errors are not thought through and it may be very broken (but it seems to work in one app). There is some design motivation written in the readme. Some code was copied from @kevinmehall code, I hope thats fine.
https://github.com/marjakm/libusb-rs/tree/no-lifetimes

@kevinmehall Thanks for your code! I've found one serious issue with it though, fixed in commit whitequark/libusb-rs@9cc650c04fdc65125725b43ca513a16f220a522e.

where did this end up? is there a way to do async USB I/O in rust in 2020 or not?

I am interested in this as well.  My application does TCP communication via mio, and also uses rusb (currently only synchronously).  Ideally, I would like to be able to wait for both sockets and asynchronous rusb requests using the same Poll.


Replace boost::chrono with std::chrono in interfaces

This is a breaking change as it disables dual support for boost::chrono. For the short term, the old behavior can be brought back via HPX_WITH_BOOST_CHRONO_COMPATIBILITY.

Could this be (conditionally) removed now as well: https://github.com/STEllAR-GROUP/hpx/blob/master/cmake/HPX_SetupBoost.cmake#L26?

Could this be (conditionally) removed now as well: https://github.com/STEllAR-GROUP/hpx/blob/master/cmake/HPX_SetupBoost.cmake#L26?

I believe not because Boost.Thread still links against it, but I'm not sure. Will give it a try...

@K-ballo could you rebase this branch, please?


docs: use new nuxi module add command in installation

This updates the documentation to use the nuxi module add command which should simplify docs a bit and also improve user experience as there's no need to add to nuxt.config manually.
It's documented here.
I may have missed a few spots in the documentation as I'm doing this across the modules ecosystem assisted by the power of regular expressions ✨, so I'd appreciate a review 🙏

This pull request can be reviewed on

🫡🤖


MODBULKOPS-258: Staff only Holdings notes propagation

Purpose
Describe the purpose of the pull request.
MODBULKOPS-257: Staff only Items notes propagation;
MODBULKOPS-258: Staff only Holdings notes propagation
Approach
How does this change fulfill the purpose?
TODOS and Open Questions

[ ] Use GitHub checklists. When solved, check the box and explain the answer.

Learning
Describe the research stage. Add links to blog posts, patterns, libraries or addons used to solve this problem.


Add getBigtableProject to BigtableTestOptions and update BigtableReadIt

Add getBigtableProject to BigtableTestOptions and change BigtableReadIt to use the new option. This allows the pipeline to be run in project X with the bigtable in project Y.
Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

It will help us expedite review of your Pull Request if you tag someone (e.g. @username) to look at it.
 Will merge once precommits come back.

These BigTableTestOptions are not registered by any PipelineOptionsRegistrar so they can't be used programmatically reliably. You should add this so that they are available.


feat: full type inference to useSafeAreaInsetsStyle

The type of the value returned by useSafeAreaInsetsStyle is always:
{
  paddingTop?: string | number;
  paddingBottom?: string | number;
  paddingStart?: string | number;
  paddingEnd?: string | number;
  marginTop?: string | number;
  marginBottom?: string | number;
  marginStart?: string | number;
  marginEnd?: string | number;
}

Not only is inaccurate, but also wrong. string is never returned by useSafeAreaInsets, nor undefined.
This broad type makes it harder to perform operations with the safe-area values, and it's uncertain whether developers can force-cast to number without looking into the source code of react-native-safe-area-context.
By adding a little complexity to the hook, full type inference can be added.
Result
const $insets = useSafeAreaInsetsStyle(["bottom"]);
// { paddingBottom: number }

const $insets = useSafeAreaInsetsStyle(["top"], "margin");
// { marginTop: number }

const $insets = useSafeAreaInsetsStyle(["left", "right"], "padding");
// { paddingLeft: number; paddingRight: number }

Caveats
The type displayed while hovering the property is not simplified, e.g.:
SafeAreaInsetsStyle<"padding", ("right" | "left")[]>

Workaround
We could introduce an extra type utility Pretty:
type Pretty<T> = {
  [K in keyof T]: T[K]
}

export type SafeAreaInsetsStyle<
  Property extends "padding" | "margin" = "padding",
  Edges extends Array<ExtendedEdge> = Array<ExtendedEdge>
> = Pretty<{
  [K in Edges[number] as `${Property}${Capitalize<K>}`]: number;
}>;

Result
Pretty<{
  paddingBottom: number;
}>

Hey @sergiocarneiro I just tried this out and i was getting a typescript warning with your changes on the latest version of ignite.
I had to change safeAreaEdges: Edges = [] as Edges, to safeAreaEdges: Edges = [] as unknown as Edges, to get typescript 5.3.2 to pass.
Could you rebase on master and have another look at this change?

:tada: This PR is included in version 9.4.4 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


"foodAndFeeding": "The Chilean Rock Rat is herbivorous and eats mainly grasses, seeds, bulbs, and roots. It also feeds on pine nuts and roots of A. aracucana and subterranean bulbs of Amarylidaceae and Alstromeriaceae. It can accumulate and store food in chambers in their burrows.",
  "breeding": "Newborn young and pregnant female Chilean Rock Rats have been recorded in spring (October-November).",
  "descriptiveNotes": "Head-body 150-170 mm,tail 55-78 mm, ear 8-12 mm; weight 80-230 g. The Chilean Rock Ratis small-sized to medium-sized. Tail is relatively short (31% of its total length), without a terminal tuff, unlike other species of octodontids. Ears are small. Forelegs are strong, with long claws. Pelage is dark brown dorsally, and venteris lighter brownish yellow. Hands and feet are grayish. Karyotype is 2n = 56, FN = 108.",
  "habitat": "Rocky outcrops in highland forests of Araucaria araucana ( Araucariaceae ) to above Andean tree and shrub lines and flat, sandy areas covered with xerophytic shrubs and grasses such as Poa lanuginosus ( Poaceae ), Acacia caven ( Fabaceae ), Ephedra ( Ephedraceae ), Rosa , and Rubus (both Rosaceae ), at elevations of 1000-4000 m."
}

@jhpoelen sort of
The first two should have bibliographic entries, I'll check them again.
"docId": "0383245F2226977A8B0EFE1EF738FDF3",
"name": "Cloeotis percivali"
"docId": "03A087C4FFD7FFD6FF5EFF4AE228F461",
"name": "Cervus albirostris"
These last 3 are correct. Nothing we can do about them.
"docId": "03F487CCFF9A021BFF70F92AF5D8F244",
"name": "Cuniculus paca"
"docId": "C13F1641FF89FFE6FA66FD04F5C96781",
"name": "Lyroderma lyra"
"docId": "E53F663EFFE0FFDCFA50F7C6F675F244",
"name": "Aconaemys fuscus"

@jhpoelen These had small OCR errors which I didn't notice at first
"docId": "0383245F2226977A8B0EFE1EF738FDF3",
"name": "Cloeotis percivali"
"docId": "03A087C4FFD7FFD6FF5EFF4AE228F461",
"name": "Cervus albirostris"

The v0.4 version of https://github.com/jhpoelen/hmw produced the following records with suspicious content:
$  cat hmw.json | bash check.sh | jq '{ docId: .docId, name: .name}'
{
  "docId": "03F487CCFF9A021BFF70F92AF5D8F244",
  "name": "Cuniculus paca"
}
{
  "docId": "C13F1641FF89FFE6FA66FD04F5C96781",
  "name": "Lyroderma lyra"
}
{
  "docId": "E53F663EFFE0FFDCFA50F7C6F675F244",
  "name": "Aconaemys fuscus"
}

@ajacsherman @flsimoes Can you confirm that these records are still pending to be fixed?

The v0.4 version of https://github.com/jhpoelen/hmw produced the following records with suspicious content:
$  cat hmw.json | bash check.sh | jq '{ docId: .docId, name: .name}'
{
  "docId": "03F487CCFF9A021BFF70F92AF5D8F244",
  "name": "Cuniculus paca"
}
{
  "docId": "C13F1641FF89FFE6FA66FD04F5C96781",
  "name": "Lyroderma lyra"
}
{
  "docId": "E53F663EFFE0FFDCFA50F7C6F675F244",
  "name": "Aconaemys fuscus"
}

@ajacsherman @flsimoes Can you confirm that these records are still pending to be fixed?

As I commented above, parts of the text are missing from the scans, nothing we can do about it for now for these three records


Sentry Parity

Unskilled users can still deploy sentries instead of being unable to, albeit with a longer place time.
Unskilled users will also take extra time to toggle a sentry on or off, instead of being instant.

Does this include the pump sentries, or are those always instant?

Does this include the pump sentries, or are those always instant?

I think the pump sentries have a little animation when you activate them

also forgot: engineers can lock the sentry to prevent it from being turned on/off by non engineers


Statement connection issue

Hi,
I've provided sample code showing the issue i'm seeing.
	ocilib::Environment::Initialize();

	ocilib::Pool pool(connect, user, pwd, ocilib::Pool::SessionPool, 1, 3, 1);

	ocilib::Connection connection = pool.GetConnection();

	if (connection.IsNull())
		std::cout << "a" << std::endl;

	ocilib::Statement statement(connection);

	if (statement.GetConnection().IsNull())
		std::cout << "b" << std::endl;

	statement.Prepare(_T("begin select count(*) into :1 from SomeTable; end;"));

	if (statement.GetConnection().IsNull())
		std::cout << "c" << std::endl;

	int count = 0;
	statement.Bind(_T(":1"), count, ocilib::BindInfo::Out);

	statement.ExecutePrepared();

	ocilib::Environment::Cleanup();

When I run the code above I see "b" outputted to the screen but yet the statement executes properly and I don't see the output of "c". Since "b" is outputted it looks like the connection within the statement is NULL but the execution is ran fine. Is this natural behavior?

Hi,
In fact OCI_StatementGetConnection() was returning ... the SQL string ... instead of the OCI_Connection  object pointer.
I've committed a fix for it.
Sorry for the inconvenience.
Regards,
Vincent

That’s good to hear. When are you projected to put out a release?
Glassy Peou | placesign | Software Engineer
16885 West Bernardo Drive #385, San Diego, CA, 92127
glassy.peou<EMAIL_ADDRESS>| office:<PHONE_NUMBER> x7008 | mobile:<PHONE_NUMBER>
From: Vincent Rogier<EMAIL_ADDRESS>Sent: Tuesday, January 31, 2017 4:12 AM
To: vrogier/ocilib
Cc: Glassy Peou; Author
Subject: Re: [vrogier/ocilib] Statement connection issue (#69)
Closed #69https://github.com/vrogier/ocilib/issues/69.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/69#event-942934875, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHRMPzsW9J6Ru2-37mR9QqVQ9LzDbhiAks5rXyT4gaJpZM4LyBIp.

Pretty soon. By the end of the week I guess.
Currently v4.3.2 only addresses issues #69 & #70.
Regards,
Vincent

Ok
Thanks
Glassy Peou | placesign | Software Engineer
16885 West Bernardo Drive #385, San Diego, CA, 92127
glassy.peou<EMAIL_ADDRESS>| office:<PHONE_NUMBER> x7008 | mobile:<PHONE_NUMBER>
From: Vincent Rogier<EMAIL_ADDRESS>Sent: Tuesday, January 31, 2017 9:36 AM
To: vrogier/ocilib
Cc: Glassy Peou; Author
Subject: Re: [vrogier/ocilib] Statement connection issue (#69)
Pretty soon. By the end of the week I guess.
Currently v4.3.2 only addresses issues #69https://github.com/vrogier/ocilib/issues/69 & #70https://github.com/vrogier/ocilib/issues/70.
Regards,
Vincent
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/vrogier/ocilib/issues/69#issuecomment-276434302, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AHRMP3g5TxG3rUEVG8v7dEhdtupyksj7ks5rX3EIgaJpZM4LyBIp.


Defer user error handing for swagger spec validator

Fixes #220
If a developer write an invalid Swagger spec the compatibility_layer function was failing to navigate through the invalid spec structure misleading to an error in Connexion instead of exposing the invalid Swagger spec structure. Now we defer the handing of the error to the swagger spec validator.
Changes proposed in this pull request:

Verify if the method definition is a dict before calling .get in compatibility_layer function.

Coverage remained the same at 100.0% when pulling 02c9cccb4686aa303efd1857cf34b1da56034936 on rafaelcaricio:accept-crazy-schemas into bb0d34a6b80441946e88c3574c49d12e05aee543 on zalando:master.

Coverage remained the same at 100.0% when pulling 6391f3db0905e4e639d1b7223cdb0b99c7a3550e on rafaelcaricio:accept-crazy-schemas into bb0d34a6b80441946e88c3574c49d12e05aee543 on zalando:master.

Coverage remained the same at 100.0% when pulling 637d6efb273d59c32d8a475d86ee99eebe6fef9c on rafaelcaricio:accept-crazy-schemas into bb0d34a6b80441946e88c3574c49d12e05aee543 on zalando:master.

:+1:
Flake8 and isort are broken in travis for python 3.5 but the unit tests passed.

Coverage remained the same at 100.0% when pulling def2a1ecaa2310f6e9de5fd1240111e74b2138bc on rafaelcaricio:accept-crazy-schemas into bb0d34a6b80441946e88c3574c49d12e05aee543 on zalando:master.

Coverage remained the same at 100.0% when pulling 415a1e8a609c684f72c058f96885edca1496f5dc on rafaelcaricio:accept-crazy-schemas into bb0d34a6b80441946e88c3574c49d12e05aee543 on zalando:master.

:+1:


how to fill in path areas by 2 colors

Hi,
I have 2 LineSeries A and B that crosses each other, and I want to fill the path by 2 colors in such a way that when line A is above line B then fill in red and when line B is above A then fill in blue.  Is this possible by modifying some part of series/AreaOnlySeries.jsx? I'm using svg, so I would like to apply renderSVG function.
Thanks

svg path can have only one fill color, so you cannot do that with an AreaOnlySeries it has to be a new series. However I am not sure how you can achieve that even if you have 2 paths

Hi, thank you for checking. I was able to achieve this by using clip-path. Basically, I have followed the method described at below link and applied it into your series classes.
http://www.d3noob.org/2015/07/difference-charts-with-d3js-science-vs.html
Thanks

interesting solution, I am thinking the same can be used for canvas also. Mind sending a pr for a new series?

I'm happy to, but it requires some calculator to be fed into the base  function with scale. I needed this alternating color thing for the implementation of IchimokuClouds series, which is nowhere near completion, but that is where I'm calling this modified AreaOnlySeries from. It would be better if I could just feed plain OHLC in scale to base  so that it would work as a simple demonstration of this feature, but it doesn't seem to work.  (If you know how to feed OHLC as a scale  function to base, I would like to know)
So, I would like to contribute, but I don't have a complete working set of example that I can send you as a pr at this point..

no rush, when ever you are ready. If you are having trouble with something, open a PR with some work that is in progress, and we can discuss further on that.
Remember that there are changes I have made on the next branch, so make sure to send PR to that branch.

Thanks! I will.


Analyse programming langauge preferences between begineer vs experienced people

1.Obtain the Stack Overflow developer survey dataset for the relevant years
2.Decide on a threshold to distinguish between beginners and experienced developers based on years of coding experience.
3.Filter the dataset to include only respondents who fall into the beginner and experienced developer categories based on the defined threshold
4.Calculate the frequency or proportion of respondents within each experience group who prefer each programming language.
5.Create visualizations, such as bar charts, pie charts, or heatmaps, to illustrate the differences in language preferences between beginners and experienced developers.

Under GSSoC'24, I would like to work on this issue, please assign it to me.

I don't know why I am getting the gmail message of stale pr even though this pr is closed.

forgot to close the Issue along with PR, because you have tagged the relative issue on the PR. that's the reason. ignore it


[UND-774][DEVELOP]: UAT feedback - (P2) - Block | Organisms | Stats -…

… Slider.

Closing the PR since code is merged as a part of another PR.


New endpoint for AMP epic json

We're adding the epic to google AMP articles.
The AMP page will request the json for the epic from the contributions-service.
To begin with we're doing the same hard-coded epic across all articles. Later on we will implement targeted epics.
The currency symbol in the epic copy is determined using the fastly geo header, so that all the client has to do is render the copy.

@nicl sure. I still need to setup caching by country header in the fastly UI, but will add the Surrogate-Control and Cache-Control headers

@tomrf1 looks great. Give us a shout when you turn it on as would be good to see how effective the caching is. At the moment, we run this code as a lambda. Medium-term we expect to migrate to something more cost effective, but until now it hasn't been urgent, so good to see ifi this changes things.

All checks are passing and everyone seems happy with the changes, so I'm going to go ahead and merge this into master now.


Warning: Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.%s,

Hello to the whole community.
I am doing a project in which the restaurants in my city can place their dishes and generate orders through the Application.
But I am having an error with my project when executing it.
This is the mistake I am having.
Warning: Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.%s,
Check the render method of `VirtualizedList`., ,
    in CellRenderer (at VirtualizedList.js:767)
    in VirtualizedList (at FlatList.js:676)
    in FlatList (at Meals.tsx:14)
    in RCTView (at Meals.tsx:12)
    in Meals (at SceneView.js:9)
    in SceneView (at StackViewLayout.tsx:900)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewCard.tsx:106)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at screens.native.js:100)
    in Screen (at StackViewCard.tsx:93)
    in Card (at createPointerEventsContainer.tsx:95)
    in Container (at StackViewLayout.tsx:975)
    in RCTView (at screens.native.js:131)
    in ScreenContainer (at StackViewLayout.tsx:384)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewLayout.tsx:374)
    in PanGestureHandler (at StackViewLayout.tsx:367)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.tsx:104)
    in RCTView (at Transitioner.tsx:267)
    in Transitioner (at StackView.tsx:41)
    in StackView (at createNavigator.js:80)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (at SceneView.js:9)
    in SceneView (at StackViewLayout.tsx:900)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewCard.tsx:106)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at screens.native.js:100)
    in Screen (at StackViewCard.tsx:93)
    in Card (at createPointerEventsContainer.tsx:95)
    in Container (at StackViewLayout.tsx:975)
    in RCTView (at screens.native.js:131)
    in ScreenContainer (at StackViewLayout.tsx:384)
    in RCTView (at createAnimatedComponent.js:151)
    in AnimatedComponent (at StackViewLayout.tsx:374)
    in PanGestureHandler (at StackViewLayout.tsx:367)
    in StackViewLayout (at withOrientation.js:30)
    in withOrientation (at StackView.tsx:104)
    in RCTView (at Transitioner.tsx:267)
    in Transitioner (at StackView.tsx:41)
    in StackView (at createNavigator.js:80)
    in Navigator (at createKeyboardAwareNavigator.js:12)
    in KeyboardAwareNavigator (at createAppContainer.js:430)
    in NavigationContainer (at withExpoRoot.js:26)
    in RootErrorBoundary (at withExpoRoot.js:25)
    in ExpoRoot (at renderApplication.js:40)
    in RCTView (at AppContainer.js:101)
    in DevAppContainer (at AppContainer.js:115)
    in RCTView (at AppContainer.js:119)
    in AppContainer (at renderApplication.js:39)

I am doing the project on my frontend with React-native.
**My code is this - my front-end **
App.js
import { createAppContainer } from 'react-navigation';
import { createStackNavigator } from 'react-navigation-stack';
import MealsScreen from './src/screens/Meals';
import Modal from './src/screens/Modal';

const AppNavigation = createStackNavigator({
  Meals: {
    screen: MealsScreen
  }
}, {
  initialRouteName: 'Meals'
});

const RootStack = createStackNavigator( {
  Main: AppNavigation,
  Modal: Modal,
}, {
  mode: 'modal',
  headerMode: 'none',
});

export default createAppContainer( RootStack );

Meals
import React from 'react';
import { Text, View, StyleSheet, FlatList } from 'react-native';
import ListItem from '../components/ListItem';
import UseFetch from '../hooks/useFetch';

const Meals = ({navigation}) => {
    const { loading, data: meals } = UseFetch('https://serverless.mgyavega.now.sh/api/meals');

    return(
        <View style =  { styles.container }>
            { loading ? <Text style =  { styles.text }>Cargando por favor espere...</Text> :
                <FlatList
                    style = { styles.list }
                    data = { meals }
                    keyExtractor= { x => x.id }
                    renderItem = {({ item }) =>
                        <ListItem
                            onPress={ () => navigation.navigate('Modal', { id: item.id })}
                            name = { item.name }
                        />
                    }
                />
            }
        </View>
    )
}

Meals.navigationOptions = ({
    title: 'Comidas Disponibles',
});

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#fff',
        alignItems: 'flex-start',
        justifyContent: 'flex-start'
    },
    list: {
        alignSelf: 'stretch'
    },
    text: {
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center'
    }
});

export default Meals;

Create a list that calls the Flatlist action and manage the information on my list.
List.js
import React from 'react';
import {  TouchableOpacity, Text, StyleSheet } from 'react-native';

export default ({ name, onPress }) => {
    return (
        <TouchableOpacity onPress = { onPress } style={ styles.container }>
            <Text style = { styles.text }> {name} </Text>
        </TouchableOpacity>
    )
}

const styles = StyleSheet.create({
    container: {
        paddingHorizontal: 15,
        height: 60,
        justifyContent: 'center',
        borderBottomWidth: 1,
        borderBottomColor: '#eee'
    },
    text: {
        fontSize: 16
    }
});

Get the url of my project.
UseFecth.sj
import { useEffect, useState } from 'react';

const UseFetch = ( url ) => {
    const [loading, setLoading] = useState(true);

    const [ data, setData] = useState([]);

    const fetchData = async () => {

        const response = await fetch(url);

        const data  = await response.json();

        setData(data);

        setLoading(false);
    };

    useEffect(() => {
        fetchData();
    }, [] );

    return { loading, data }
}

export default UseFetch;

My modal.js
import React from 'react';
import {  View, Text, } from 'react-native';
import UseFetch from '../hooks/useFetch';

export default ({navigation}) => {

    const id = navigation.getParam('_id');
    const { loading, data } = UseFetch(`https://serverless.mgyavega.now.sh/api/meals/${id}`);

    console.log( 'Información del id del menú: ', id );

    return (

        loading ? <Text>Cargando </Text> :
            <View>
                <Text>  </Text>
                <Text>  </Text>
            </View>

    )
}

I am doing my backend with MongoDB, Ziet and Node.js.
This is my route.
index.js
var express = require('express');
var mongoose = require('mongoose');
var bodyParser = require('body-parser');

var app = express();
app.use(bodyParser.json());
var meals = require('./routes/meals');
var orders = require('./routes/orders');

mongoose.connect(process.env.MONGODB_URI, { useNewUrlParser: true, useUnifiedTopology: true } );

app.use('/api/meals', meals);
app.use('/api/orders', orders);

module.exports = app;

Meals.js
var express = require('express');
var Meals = require('../models/meals');
var router = express.Router();

router.get('/', ( req, res ) => {
    Meals.find()
         .exec()
         .then( x => {
             res.status(200).send(x)
    });
});

router.get('/:id', ( req, res ) => {
    Meals.findById(req.params.id)
         .exec()
         .then( x => {
             res.status(200).send(x);
    });
});

Models.js
var mongoose = require('mongoose');
var Schema = mongoose.Schema;

const Meal = mongoose.model('Meal', new Schema({
    name: String,
    desc: String,
}));

module.exports = Meal;

I don't know why the information is duplicating me.
I appreciate the collaboration you can give me.
Thank you.
Mario

@Luzmario1708 hello, when you use flatlist with renderItem or an array, you should give a key prop  each child(renderItem) component, and all of them should be unique.

hello @Luzmario1708 ,
i didn't understand what is x and x.id. i think your keyExtractor should be:
keyExtractor={item => item.id}


do not suggest DB reindex on upgrade as vacuum full does it

Addresses https://trello.com/c/iqUhRNEz/142-db-upgrade-instructions-vacuum-reindex. See https://www.postgresql.org/docs/9.3/static/routine-vacuuming.html --

... you will need to use VACUUM FULL ...rewrite an entire new copy of the table and build new indexes for it.

Staged at http://www.openmicroscopy.org/site/support/omero5.3-staging/sysadmins/server-upgrade.html#optimize-an-upgraded-database-optional.

Looks good. Ready to merge.


Warning when using incorrect token.

When you attempt to set the stats of your bot with an invalid token, there is no indication that your token is invalid. It would be helpful to know whether or not the token is working or not.

I would assume there would be a 401 unauthorized response if you used an invalid token no?

There would be a 401 unauthorized response if an invalid token is used. No?

Well yeah, but what would it call to receive that response?

Oh, I'm so sorry - I totally misread your initial issue. I believed you meant that you wanted it to validate the token upon building the API client.
Anyways, since the entire API client is async, you need to handle the exception async or transform the CompletionStage into a CompletableFuture and use the blocking get() method. Here's an example of both:
int serverCount = 1234;

api.setStats(serverCount).whenComplete((v, e) -> {
    // if e is not null, then there was an exception
});

try {
    api.setStats(serverCount).toCompletableFuture().get();
} catch(Exception e) {
    // exception
}


fix: uninlined args, it's not well recognized and actually doesn't improve readability

:tada: This PR is included in version 1.2.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


[d9d9] Wakaba-iro no Quartet crash at startup

Software information
Game crashes at startup, seems to work fine with wined3d.
wine: Unhandled page fault on execute access to 00000000 at address 00000000 (thread 07c4), starting debugger...
...
Unhandled exception: page fault on execute access to 0x00000000 in 32-bit code (
0x00000000).
0260:fixme:dbghelp_dwarf:dwarf2_read_range no entry found
Register dump:
 CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b
 EIP:00000000 ESP:0032e99c EBP:0032ea08 EFLAGS:00010246(  R- --  I  Z- -P- )
 EAX:0032e9cc EBX:021d3998 ECX:00000000 EDX:712d4050
 ESI:00000000 EDI:00000000
Stack dump:
0x0032e99c:  6253444f 712d4050 0032e9cc 0032ea08
0x0032e9ac:  624d2b91 00000001 021d2b50 00000000
0x0032e9bc:  00000000 0000006c 0032ea5c 0032ea28
0x0032e9cc:  3b9f9493 00000000 00000000 00000000
0x0032e9dc:  00000000 00000000 00000000 00000002
0x0032e9ec:  021cd6a8 0000006c 0032ea10 0032ea58
Backtrace:
=>0 0x00000000 (0x0032ea08)
  1 0x624d2d7d in d3d9 (+0x92d7d) (0x0032ea68)
  2 0x624733dd in d3d9 (+0x333dd) (0x0032eb08)
  3 0x62474103 in d3d9 (+0x34103) (0x0032eb88)
  4 0x6245ff16 in d3d9 (+0x1ff16) (0x0032ece8)
  5 0x624612eb in d3d9 (+0x212eb) (0x0032f44c)
  6 0x624421d7 in d3d9 (+0x21d7) (0x0032f52c)
  7 0x00469143 in wakabaironoquartet_trial (+0x69143) (0x0032f684)
  8 0x004772cc in wakabaironoquartet_trial (+0x772cc) (0x0032fee4)
  9 0x004c810e ??4SThreadParam@@QAEAAU0@$$QAU0@@Z+0x9aee() in wakabaironoquartet
_trial (0x0032ff30)
  10 0x7b62df20 WriteTapemark+0x100(device=7FFD1000, type=<is not available>, co
unt=<is not available>, immediate=<is not available>) [Z:\usr\src\packages\BUILD
\dlls\kernel32\tape.c:317] in kernel32 (0x0032ff48)
  11 0x7bc57ba7 RtlWakeConditionVariable+0x57(variable=7B62DF10) [Z:\usr\src\pac
kages\BUILD\dlls\ntdll\sync.c:766] in ntdll (0x0032ff5c)
  12 0x7bc58260 RtlCreateUserThread(entry=004C8192, arg=7FFD1000) [Z:\usr\src\pa
ckages\BUILD\dlls\ntdll\thread.c:261] in ntdll (0x0032ffec)
0x00000000: -- no code accessible --

Demo version can be found at https://trial.getchu.com/D100/1047311/WakabaironoQuartet_trial.zip
System information

GPU: AMD Radeon RX 5500 XT
Driver: MESA 22.3.3
Wine version: 7.0.1
DXVK version: 2.0

Apitrace file(s)
I'll provide it later if necessary.
Log files

d3d9.log:
WakabaironoQuartet_trial_d3d9.log

You don't have permission to access /D100/1047311/WakabaironoQuartet_trial.zip on this server.

Maybe it'll work from here: https://www.getchu.com/soft.phtml?id=1047311&gc=gc

That apitrace crashes in apitrace code with both DXVK and WineD3D unfortunately.

You should make the apitrace without DXVK and let it render at least a bit.

Made an apitrace:
https://mega.nz/file/IuwTxYAA#iXpO9kPXEpovIHs7Vvujq--X-etXFdSy0s54RWSUCZs

Do note that the minimum supported wine version for dxvk 2.0 is 7.1
Tho i don't know if it would crash when below is used.

Okay, maybe it's wine issue then.

The trail version works fine for me with DXVK as well, you need to kill the process when it asks you to insert something at the end of the installation procedure so that it doesn't delete itself again. After that it launches and runs fine.

1.10.3 works fine.
I tried update wine to 8.0-rc4 and it also works with dxvk 2.0.
I guess this can be closed then.


Finding error while doing pip install PiML

Hello, I am getting the following error while running installation of PiML. Please help me resolve. Thanks.

Hi @Chandrima31 , it seems that these conflicts were due to your existing packages. PiML does not have such strict constraints.


[Android][Critical] When using Modal component in release build some leftovers overlap all other elements in application

Hello, my name is Aleksey, i’m frontend developer (so i'm not familiar with Android Studio and other Java developer suite including debug tools) and I really need your help.
Description
In my company I prepare our application to update the version of React Native from 0.29 to 0.41. Some time ago I was faced with an unusual bug in branch 0.41 with third-party component react-native-loading-spinner-overlay, which is based on Modal & ActivityIndicator components.
After I've created a pure demo without any dependencies, it became clear that the bug seems associated with a component Modal. It's possible cause is that some leftovers of Modal component overlap all other elements of the application, making impossible further work with it. Removing only Modal component levels this bug. The most interesting thing is that the bug is reproduced only in release version. In the debug version, as well as using the RN version 0.29 it is not faced.
Reproduction
To reproduce this bug, you can download this repository: react-native-modal-bug and run it in release build.
Bug appears on real devices (from different manufacturers) and on the emulator. In release version there is special alert to demonstrate that application is really overlaped, not freezed.
(!) Attention! This bug has a floating character, so at various launches of the application may appear or disappear. Try to relaunch application a few times, or rebuild it.
Screenrecord (release&debug versions): https://youtu.be/1fnMCYIpaOM
Solution
Imho, maybe related to: make Modal pass rootTag to AppContainer.
In my demo i also have abolutely positioned View inside Modal, like in #12060
Additional Information

React Native version: 0.41.0
Platform: Android
Operating System: MacOS

We're cutting down on the number of outstanding issues, in order to allow us to focus. I'm closing this issue because it has been open for over 60 days with no activity. If you think it should still be opened let us know why. PRs are always welcome.


Voice: Support holding key binding to talk to inline chat and submit

Given the work in https://github.com/microsoft/vscode/pull/201314, adding Jo as well.

Closing there is now

press and hold cmd+i for speech
when inline chat is up, hold cmd+i for speech
use cmd+k, i for quick/lightweight speech (also hold enabled)


Feature Request

Add pull to refresh to the “Featured” page.

Added! Thanks for your suggestion. Will be in next update


UI Batching Support

Current material can't batch.
It increases draw calls compared to regular images.

Hi AAAYako, Currently the material is instanced per sdf-ui component, so the material used by the image component in the sdf-ui is not shared between the sdf-ui. Perhaps this is why the sdf-ui is not batch rendered (batch rendering requires the game object to use the same material). So if you want to batch render, you need to create a ui with an image component, but without the sdf-ui component, and copy the sdf-ui material you want to batch render into that image component. But this solution is a bit tricky, so I will add a feature to clone the sdf-ui for batch rendering.

https://github.com/AAAYaKo/Unity-SDF-UI-Toolkit/tree/material_registry_feature
Pease, check this branch
I implemented 2 experimental optimization features:

LateUpdate central registry for SDFUI: Reduces amount of Unity messages per frame
Central Material Registry: Prevents material modification more than once per frame, manages materials of all SDFUIs, creates shared materials to support batching, manages material assignment in dynamic, caches shaders and materials.

It should be useful for UIs that frequently use SDFUI. The first optimization saves CPU time and the second saves time on draw calls. I was a few commits behind the master, so I didn't do a PR. It might also be a good idea to test it additionally to search for bugs, just like with any other optimization.

Maybe we should add dependencies to the package json?

I saw your optimization and it seems nice implementation that pool material in registry for sharing material between sdf-ui components that have same properties. Could you make a pull request for this optimization? I made new branch named material-registry. I make some commit, but fix conflict manually is not difficult, so if you can, please make pull request for material-registry branch in you timing. I merge material-registry to master branch manually after that.

https://github.com/user-attachments/assets/2c307551-2318-40d5-8498-bba114839257

SDF Circle has a problem with mask.

Also, I think SDF Circle doesn't need radius property, instead use half of the shortest side of the rect.

Thanks for the info, this problem still remain in the latest commit ? recently, I changed for some maskable graphic’s part (so there is a possibility that this change caused a problem and because of my dirty commit log, I didn’t make notice for this update at any issue)

My latest commit for maskable graphics is here (commit yesterday)

d7a5a416856c940507247e3c44aa00cd21f6e046
8cfcce4f5cf0cc6752cfdbc0823f54b9d24f2245
7b0dd7a12bede00142b080445224e98aba9535a5
f7aa7f82f94e7bc93770166df49124bf84479f1e

Currently, I don`t see any problems.

SDF Ring, SDF Pie

When antialiasing is enabled, they have a 1 pixel line.


Restart of the JournalNodes is dangerous for HDFS stability

The operation hdfs_journalnode_restart restart all the JournalNodes all at once.
This is quite brutal for the quorum: at OECD, we have experienced several times a de-synchronization of the JournalNodes after a restart, 1 JN being ahead and the 2 other JN refusing to sync as the quorum is not reached. This also keeps the NameNodes from starting as they cannot get a stable state from the JNs.
The following logs reflect the issue:

On the NameNodes (note that the error is quite misleading as it seems to be related to SSL certs):2022-09-21 09:38:19,044 INFO org.apache.hadoop.hdfs.qjournal.client.QuorumJournalManager: Waited 37002 ms (timeout=120000 ms) for a response for acceptRecovery(startTxId: 971444 endTxId: 971451 isInProgress: true). Succeeded so far: [${JN_IP_1}:8485]. Exceptions so far: [${JN_IP_2}:8485: Error while authenticating with endpoint: https://${JN_IP_2}:8481/getJournal?jid=${clustername}&segmentTxId=971444&storageInfo=-64%3A589208949%3A1658405790856%3ACID-1122f02b-79df-4eeb-8cf6-b7f203aac609&inProgressOk=true
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        ...
        at org.apache.hadoop.ipc.Server$Handler.run(Server.java:2678)
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
          at sun.security.ssl.Alert.createSSLException(Alert.java:131)
          ...
          at org.apache.hadoop.security.authentication.client.KerberosAuthenticator.authenticate(KerberosAuthenticator.java:189)
          ... 24 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

On the 2 de-synced JNs:2022-10-05 11:06:05,396 WARN org.apache.hadoop.hdfs.qjournal.server.Journal: Failed to delete temporary file /mnt/quorum/hdfs/jn/${clustername}/current/edits_inprogress_0000000000000971444.epoch=36

2022-10-05 11:06:05,397 INFO org.apache.hadoop.ipc.Server: IPC Server handler 1 on 8485, call Call#16 Retry#0 org.apache.hadoop.hdfs.qjournal.protocol.QJournalProtocol.acceptRecovery from ${JN_IP_1}:41237

javax.net.ssl.SSLHandshakeException: Error while authenticating with endpoint: https://${JN_FQDN_1}:8481/getJournal?jid=${clustername}&segmentTxId=971444&storageInfo=-64%3A589208949%3A1658405790856%3ACID-1122f02b-79df-4eeb-8cf6-b7f203aac609&inProgressOk=true

The only solution to this issue is to manually replace the edit logs of the 2 de-synced JNs with a copy of the edit logs from the healthy JN. This is pretty dirty.
Did anyone experience the same issue?
I think that we should implement a rolling restart strategy for "quorum" services like JournalNodes and ZooKeeper to avoid corrupting their state.

Could you please update of the status of the rolling update? Tänan!


Add ToolTask and ActionSubtaskOriginMixin

@vasinov should we change Agents to automatically use a ToolTask instead of a ToolkitTask if only a single tool is passed in?


Support for 9-patch images

I came across this page:
https://docwiki.embarcadero.com/RADStudio/Sydney/en/Using_9-patch_Images_in_Android
which mentions .9.png files from Android
These are useful since they are bitmaps that adapt as they're scaled without distorting their border area
They're made with a draw9patch tool:
https://developer.android.com/studio/write/draw9patch
included in Android Studio:
https://www.youtube.com/watch?v=5P9OQ53ha0U
More info on 9-patch images:
https://wiresareobsolete.com/2010/06/9-patches/
https://developer.android.com/guide/topics/graphics/drawables#nine-patch
Seems Skia supports such images judging from the info at:
https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/graphics/skiasharp/bitmaps/segmented

The SkiaSharp SKCanvas object defines a method named DrawBitmapNinePatch and two methods named DrawBitmapLattice that are very similar. Both these methods render a bitmap to the size of a destination rectangle, but instead of stretching the bitmap uniformly, they display portions of the bitmap in its pixel dimensions and stretch other parts of the bitmap so that it fits the rectangle

There's also this other Delphi library for 9-patch images: https://github.com/yypbd/yypbd-Delphi-NinePatch
So could Skia4Delphi add support for loading and displaying .9.png files? (or maybe even any lossless bitmap format as .9.xxx [for lossy probably can't do as compression could corrupt the extra info] or who knows, even for svg somehow)

Skia doesn't officially support 9 patch images and we want to avoid customizations at all costs, to make the api as close to the original as possible. However it has something similar:
https://github.com/skia4delphi/skia4delphi/blob/50f5adbabda8281b211c1df0feee9e7d2257542f/Source/Skia.pas#L487
which you inform the central rectangle that will be resized horizontally and vertically, preserving the corners. In fact, in our demo there is an example of this:

https://github.com/skia4delphi/skia4delphi/blob/50f5adbabda8281b211c1df0feee9e7d2257542f/Samples/Demo/FMX/Source/Sample.Form.Image.pas#L86-L95


Examine strange scope in DataLogging

DataLogging has a strange scope in its Configuration reaction. I don't think it does anything. I have made a todo in it in #600
to look at it after robocup lol. it's here

It does nothing, looks like somone just it { too many times


mypy complains about spark_type kwarg for Field

Love sparkdantic, and continue to rely on it.  Thank you for your work!
One minor annoyance is that mypy always yells at me for using the spark_type kwarg to be explicit about the native spark type that should be used. For example:
class Product(SparkModel):
    name: Field(description="the name of the product", spark_type=StringType)
    quantity: Field(description="number available", spark_type=LongType)

This raises two warnings, one for each property:
Unexpected keyword argument "spark_type" for "Field"
Unexpected keyword argument "spark_type" for "Field"

This is because, of course, pydantic.Field isn't expecting this kwarg.  Currently it seems like sparkdantic relies on pydantic's behavior, which throws any unexpected kwarg into FieldInfo.json_extra_schema.  https://github.com/mitchelllisle/sparkdantic/blob/083c4f32212da4de76725b5f6d321a6dcfa4d113/src/sparkdantic/model.py#L150
I'm not necessarily arguing against this choice, but I wonder if we could find a way that makes the type checker happy as well.  Perhaps a subclass of pydantic.Field like pydantic.SparkField that handles sparkdantic-specific kwargs like this?
I'm happy to lend a hand in implementation, too.

for my specific problems with spark_type, I find that I can satisfy mypy with a really thin shim:
class SparkField(Field):
    def __init__(self, *args, spark_type: Optional[DataType] = None, **kwargs):
        if spark_type is not None:
            kwargs["spark_type"] = spark_type
        super().__init__(*args, **kwargs)

Hi @boblannon
Thanks for the suggestion. This makes sense to me and does feel a bit clearer than using Field directly.
I'm happy to implement this suggestion but if you'd like to contribute it directly send me the PR and I'll happily cut a new release.
Thanks again for the suggestion!

@boblannon I've put up a PR #546 for this. Happy to wait for you to review / check if fixes your mypy issue before merging

sorry for the delay.  can confirm that this fixed my mypy issue!

Have merged it in. Will do a release shortly!

Fixed in #546

Thanks so much!


Support for network_plugin_mode

Is there an existing issue for this?

[X] I have searched the existing issues

Description
network_plugin_mode was added to v3.35.0 of the azurerm provider. This option allows one to specify Overlay, which is currently in preview for the Azure CNI.
New or Affected Resource(s)/Data Source(s)
azurerm_kubernetes_cluster
Potential Terraform Configuration
From main.tf, the network_profile block, add a variable for network_plugin_mode (with a default of Overlay when the network_plugin is azure):

network_profile {
    network_plugin      = var.network_plugin
    network_plugin_mode = var.network_plugin_mode
    dns_service_ip      = var.net_profile_dns_service_ip
    docker_bridge_cidr  = var.net_profile_docker_bridge_cidr
    load_balancer_sku   = var.load_balancer_sku
    network_policy      = var.network_policy
    outbound_type       = var.net_profile_outbound_type
    pod_cidr            = var.net_profile_pod_cidr
    service_cidr        = var.net_profile_service_cidr

  }

References
No response

hello @jodr5786
the issue is that until the feature is in Preview it is also needed to register the preview flag for the feature to work:
https://learn.microsoft.com/en-us/azure/aks/azure-cni-overlay#register-the-azureoverlaypreview-feature-flag
and with the module we would have to check we are deploying with Terraform in a region where the feature in preview is supported.
Also you have this limit that "You can't use Application Gateway as an Ingress Controller (AGIC) for an overlay cluster", then we would also have to implement logic to prevent ingress_application_gateway_enabled to be enabled at the same time.
I suggest to hold until the feature is GA before implementing it in the module, because some limitations might go away.

Hi @zioproto
This feature looks like it went GA on April 17th
https://azure.microsoft.com/en-us/blog/announcing-the-general-availability-of-azure-cni-overlay-in-azure-kubernetes-service


Adding dimension with individual vehicle performance

Hi,
I have a VRPTW problem with a constraint of individual vehicle performance,
for example an old driver would probably have a slower driving speed and higher service time
a younger driver would probably have higher driving speed and lower service time
I am using this example:
https://developers.google.com/optimization/routing/routing_tasks
i've changed the units in the above program to meters and seconds
in my code i removed the capacity constraint since it is not relevant to my solution,
what i've tried:
in the main function ive changed costevaluator from SetArcCostEvaluatorOfAllVehicles to SetArcCostEvaluatorOfVehicle and implemented a differenct cost evaluator function with an efficiency variable that reduces the ditances in the distance matrix:
distance_evaluators = []
for veh_id in range(len(couriers_list)):
    distance_evaluators.append(
        deepcopy(
            CreateDistanceEvaluator(data, veh_id).distance_evaluator))
    routing.SetArcCostEvaluatorOfVehicle(distance_evaluators[-1], veh_id)

def distance_evaluator(self, from_node, to_node):
    self._distances[from_node][to_node] = int(
    data.distance_matrix[from_node][to_node]/data.vehicles[veh_id].efficiency)

that seemed to help a bit but still a bad division of labor, and times are not precise at all
the problem is that adding a dimension has only a callback of from node and to node, without a vehicle variable so i cant distinguish between vehicles...
i've read the documentation thoughtfully for the past 2 days and viewed tons of examples but just couldn't find anything for my problem
any help?

I've managed to figure out a solution using addDimensionWithVehicleCapacity
And defining an individual "timeline capacity" for each vehicle with the capacity array argument and streching the timeline capacity for each vehicle with an efficiency factor
Works like a charm

after using my solution for a while, i've stumbled upon an issue with that still reverts me to my original question.
because although the time capacity of each vehicle is bigger, the time window for each task is still the same, and not a real representation of the time window for each vehicle's personal ability. because each time window still has the same real time constrain and they are unable to utilize the bigger time capacity that the more efficient vehicles have...
lets say i have a vehicle that his shift is from 16:00 to 21:00 and he is very efficient, so i stretch him to 23:00, and when the routing module done with building the route for this vehicle i shrink back the time (and each task's start time too) to 21:00. but during the route building, he is unable to use the stretched time because lets say i have a task that is from 18:00 to 21:00, the solver can't put it after 21:00 on that vehicle because he doesn't know that he actually finishes at 21:00 but he is a faster vehicle so it has a bigger capacity...
so my solution was not perfect, any other suggestions?


Add Site URL validation to avoid unexpected errors

Solves #854
With this new validation, we'll prevent the application to start when an admin has introduced an invalid URL on the Settings config file.

Thanks for your contribution @dsantosmerino! Instead of simply raising an error, how about using HTML 5 validations on the client side code to enforce the correct/desired formatting?


feat: add undergraduate pageheader and title on abstract page

Signed-off-by: Alex Chi<EMAIL_ADDRESS>

暂时不改，等撰写规范修订之后再说。


Build docker image for arm64 architecture

We need to build an arm64 image, @joepio opened an issue on this on the helm chart repo.
Using docker buildx build --platform=linux/arm64  does not work as the GitHub job never ends. It is most probably because compiling with QEMU is too slow for our project.
Instead of using docker to build quickwit, we should build the binaries the same way we do for publish_nightly_packages  and use these binaries for building the docker image.

Closed with the 0.5.1 release.


fix: versioned constants validate

validate invocation had a syntax error, which was hidden by the cfg
remove testing from the cfg, since we all compile with testing during development, and it's just not what we want.

This change is

Codecov Report
Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (a947982) 69.16% compared to head (3d81658) 69.64%.

Files
Patch %
Lines

crates/blockifier/src/versioned_constants.rs
50.00%
0 Missing and 1 partial :warning:

Additional details and impacted files
@@               Coverage Diff                @@
##           main-v0.13.1    #1537      +/-   ##
================================================
+ Coverage         69.16%   69.64%   +0.48%
================================================
  Files                59       59
  Lines              8173     8174       +1
  Branches           8173     8174       +1
================================================
+ Hits               5653     5693      +40
+ Misses             2056     2015      -41
- Partials            464      466       +2

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Fix docs saying that serviceCluster/ExternalIPs are IPv4 only

Description

Related issues/PRs

Todos

[ ] Tests
[ ] Documentation
[ ] Release note

Release Note

None required

Related validation PR: https://github.com/projectcalico/libcalico-go/pull/1321

Does this require changes to confd templates? IIRC the limitation was in the templates rather than libcalico data model (but I could be misremembering, or maybe we've fixed it since then!)

@caseydavenport I had the same uncertainty in my mind, but then I remembered we did a whole bunch of work to extend service advertisement to IPv6; e.g. https://github.com/projectcalico/node/blob/master/tests/k8st/tests/test_bgp_advert_v6.py
Unless I'm still forgetting some other nuance .... ?

Great!


Net Worth balance double counts DeFi and Rewards amounts

Overview
The Net Worth of the wallet has the balance of the wallet plue the defi position which includes the rewards and then is adding the value of the rewards again on top overstating the net worth of the wallet
References and additional details

Log into app.shapeshift and connect to wallet of choice
On the Dashboard note that the Net Worth is made up of the Wallet, DeFi and Rewards amount. note that the rewards is double counted.

Acceptance Criteria
Net Worth should be wallet plus defi plus rewards but rewards should not be double counted.
Need By Date
No response
Screenshots/Mockups
No response
Ownership

[X] If my bounty needs engineering or needs product I have added the respective labels on the right
[X] As the sponsor of this bounty I will review the changes in a preview environment (ops/product) or review the PR (engineering)

Estimated effort
No response
Sponsor / Stakeholder
No response
Bounty Hunters

Join our discord
Include an expected timeline for you to complete work in the work plan when you apply for this bounty!
Please refer to this link for some basic info
Please do not start work on this issue until you are approved in Gitcoin.

Confirmed fixed:

692.42+360.94+5.83 = 1059.19


Be able Schedule things (climate on/off, charging, destination) by days and time

This one could be split into multiple ones I guess

Climate Schedule (week days, week end, time, set temp, etc...)
Charging schedule (limit, charge rate)
program recurrent destination for week days at appropriate Time

After thinking about this, it's not possible to implement this without creating a server-side solution. These scheduled tasks must be persisted on a server, therefore the user token would need to be sent to a server. This would disrupt the goal of only communicating with Tesla servers directly.
Also, maintaining a task service for the releases will cost money and more maintenance, this would require a different model.
I may consider a solution like this if the app grows, let's see. Thanks for your input.


Dependency updates (UPLOAD-1330)

Addresses UPLOAD-1330.

@krystophv Need another review after we ran into a notarization issue on MacOS (details on Jira ticket) - although I tried a wide variety of things, I think the resulting change is one line.


How to do localization of Synthea data to specific country

In the original Synthea repository there is an option to configure the Synthea data to other locations. Even the data for each specific country can be be found in Synthea-International repository. But, how can we add this localized data into Synthea output in uscore-data-script? Is there any option of doing this?

You would have to manually apply the changes described in the Synthea-international README to the Synthea JAR file in the this repo. You'd have to unzip the JAR, apply the changes, and then repackage the JAR. You might have to modify the script command that executes Synthea to specify the location it should create data for since the default location (Massachusetts) will no longer exist after you apply international configurations.
https://github.com/inferno-framework/uscore-data-script/blob/master/lib/synthea/synthea.jar
https://github.com/synthetichealth/synthea-international#readme


Which variants of architectures for extracting relation representations did you use for Bert-EM model?

Hi,
In the paper, the author tested 6 architectures:
Figure 3: Variants of architectures for extracting relation representations from deep Transformers network. Figure (a) depicts a model with STANDARD input and [CLS] output, Figure (b) depicts a model with STANDARD input and MENTION POOLING output and Figure (c) depicts a model with POSITIONAL EMBEDDINGS input and MENTION POOLING output. Figures (d), (e), and (f) use ENTITY MARKERS input while using [CLS], MENTION POOLING, and ENTITY START output, respectively.
For BERT-EM model in your code, can I check if you are using (f) the model using the ENTITY MARKERS input representation and ENTITY START output representation?
Are you able to share which section of the code did you adapt this architecture?
Thanks!

Yes, its somewhere in modelling_bert.py for BERT


module sklearn.externals.six was removed in the version 0.23

Hello,
Running the code with recent sklearn versions leads to the issues like the following:
  File "/home/matwey/lab/venv/lib/python3.6/site-packages/ad_examples/aad/aad_support.py", line 9, in <module>
    from .forest_aad_detector import *
  File "/home/matwey/lab/venv/lib/python3.6/site-packages/ad_examples/aad/forest_aad_detector.py", line 14, in <module>
    from .random_split_trees import *
  File "/home/matwey/lab/venv/lib/python3.6/site-packages/ad_examples/aad/random_split_trees.py", line 21, in <module>
    from sklearn.externals import six
ImportError: cannot import name 'six'

Hi Matwey,
Thanks for letting me know. I have made the following changes which should now support sklearn 0.23:

Numpy, Scipy, scikit-learn versions have been upgraded to current (see requirements.txt).
Removed support for Python 2.7 since it has already passed end-of-life in Jan-2020.
imports in all files have been made specific instead of generic import * -- almost all files were modified.

Thanks,
Shubhomoy