--detectOpenHandles prints nothing, just hangs

🐛 Bug Report
When I run my test suite I get one of these 2 messages:

A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --runInBand --detectOpenHandles to find leaks.

or

Jest did not exit one second after the test run has completed.
This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with --detectOpenHandles to troubleshoot this issue.

For one, I think the mention of --runInBand in the first message is probably not necessary. But in any case, when I start running jest with --detectOpenHandles, I get no output, jest just hangs after finishing the tests.
Expected behavior
I would expect detectOpenHandles to give me actionable output.
envinfo

$ npx envinfo --preset jest
npx: installed 1 in 1.775s

  System:
    OS: macOS 10.15.2
    CPU: (4) x64 Intel(R) Core(TM) i7-7660U CPU @ 2.50GHz
  Binaries:
    Node: 10.18.0 - ~/.nvm/versions/node/v10.18.0/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.6 - ~/.nvm/versions/node/v10.18.0/bin/npm
  npmPackages:
    jest: ^25.1.0 => 25.1.0

@jeysal hello. Please check my repo - umbress. You can find all my tests and configs in there. Also you can go to pull requests tab and see there an ongoing/failed tests for my latest PR - full GitHub Actions logs is there for you to explore :)
In my PC when I start npm test it says

A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --runInBand --detectOpenHandles to find leaks.

But in Github Actions message is changing to

Jest did not exit one second after the test run has completed.

Same problem here. Please reopen.

We won't reopen this without a minimal repro. The only repo posted is not useful, since we don't have time to spend on hunting down leaks in big repos for someone, we can only take action when pointed to a concrete problem in Jest. That's why I asked for a minimal repro specifically.

Okay, gonna try to isolate it.

I'm seeing the same issue. I'm not asking for help debugging my code, I'm pointing out a "concrete problem in jest". In some code bases, when running jest with --runInBand --detectOpenHandles, as recommended by the CLI, the tests complete with no reported issues and jest hangs.
I have not been able to isolate a minimal reproduction, but this does not mean the issue isn't real. Unless this is expected behavior, please reopen in acknowledgement that this is clearly affecting users.

@Prestaul don't bother. They rather ask you to provide minimal repro than actually try to investigate after a bunch of complaints.

Adding leaked-handles package to my Jest setup code and then --runInBand allowed to find which test suit is leaking.

this solves it
"test": "jest --watch --runInBand --detectOpenHandles"

this solves it
"test": "jest --watch --runInBand --detectOpenHandles"

This fixed my issue as well, but I think it was really the runInBand option that fixed my particular issue, so it might not that helpful for this bug report.

--detectOpenHandles without --runInBand does not really make sense (unless your tests are already being run in band anyway), since you will be detecting open handles in the main process, while your tests are running in child processes.

Curious if --runInBand is necessary. The documentation (https://jestjs.io/docs/en/cli#--detectopenhandles) suggests --runInBand is implied by --detectOpenHandles.

I've also hit this a number of times and again today, so I made a minimal repro from my most recent encounter:
https://github.com/levilansing/jest-9473
I'm reasonably certain I've encountered this with timers and promises in the past, but couldn't repro just now. In this repo, I've left a connection open to redis during tests, which should obviously be mocked during tests, but demonstrates that jest does not provide any hint to what might be causing the tests to hang when using --detectOpenHandles in this case.

Shouldn't this issue be re-opened, now that someone has provided a minimal repro?

I'm having the same problem. Tried all suggestions here but to no avail.
@jeysal are you willing to re-open now since a minimal repro is provided?

Same problem here, but I am just starting a new project. Should I check other test libraries? any suggestion? thanks

@lmajowka @papaiatis refer to comment and install the proposed module. For me it was Redis module that was not properly closing the connection. In your environment it will show you some other leaking pipes.

@lmajowka @papaiatis refer to comment and install the proposed module. For me it was Redis module that was not properly closing the connection. In your environment it will show you some other leaking pipes.

Yes, I tried that, and it didn't give me any valuable information.
But after all I figured out the root cause of my issue: I was using TypeORM to manage a DB and I had to explicitly close the connection to the DB.

Why does the library have --detectOpenHandles if you have to install another library to detect the open handles?
Of course you also can find the leaked handles manually by isolating the leaking component, but this does not change the fact that --detectOpenHandles is broken and this ticket should be re-opened.

I am seeing these errors too (even after .skip) all of my tests. However, When adding both --forceExit --detectOpenHandles, the test exists "cleanly" (no warnings). I suspect there is a red herring somewhere that is causing this since I could not find any leaks in my tests (although they may exist). I'm not of the opinion that the combination of those flags listed is a real fix, but the tests did exit properly and without warnings or errors.

What is expected behaviour of  --detectOpenHandles? The documentation says that it shall print something. But when I run JEST with this parameter, the test never finishes and there is nothing written at all when I kill the process with Ctrl-C. Am I missing something?

I have the same issue.
npm test
leads to

This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.```

Then
```npm test -- --detectOpenHandles```
leads to no errors but a slow test run and probably due to a force quit of jest after some timeout

Then
```npm test -- --forceExit```
leads to the message
```Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?```

So executing
```npm test -- --forceExit --detectOpenHandles```
leads to no warning and messages and a quick end of the test process.

This makes sense but I would rather like to know which handle of mine is still open to close it in a clean way.
So I say this is a bug and should be reopened.

@jeysal Hi, I can see above that two minimal repros were provided. Is it possible to reopen this?
Thanks!

I haven't had a chance to take a closer look at any of the comments/repros posted yet, but yeah can reopen even though not sure whether I can look at it myself

Just got bitten by this issue today. Turns out I wasn't closing a MongoDB client connection properly. The Jest behavior was pretty confusing, but this thread helped.

In my case there was a setInterval, and clear interval in a react component
For example -
export default function App() {
  const [label, setLabel] = useState(Math.random());
  useEffect(() => {
    const interval = setInterval(() => {
      setLabel(Math.random());
    }, 1000);
    return () => {
      clearInterval(interval);
    };
  }, []);

  return (
    <div className="App">
      <h1>{label}</h1>
    </div>
  );
}

I used
jest.useFakeTimers();
https://jestjs.io/docs/en/timer-mocks.html and it was fixed
But the original problem --detectOpenHandles should be fixed

I had same issue but I noticed that it works fine when I specify a path to run test
Jest outputs correctly open handles: jest --runInBand --detectOpenHandles src/
Where here I get nothing: jest --runInBand --detectOpenHandles

Same exact issue here.

If the comments here are right that --runInBand is required, there is at least a documentation bug, because it is supposed to be implied.
> jest --help

(...)

--detectOpenHandles           Print out remaining open handles preventing Jest
                                from exiting at the end of a test run. Implies
                                `runInBand`.          [boolean] [default: false]

(...)

None of the previous instructions helped me, I still get it hanging.
Here is a work-around that worked for me:
Install why-is-node-running: npm i why-is-node-running
Edit jest entry point to use it, in my case the file is located in./node_modules/.bin/jest
I made it to look exactly like this:
#!/usr/bin/env node
/**
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

const log = require('why-is-node-running') // should be your first require

setInterval(function () {
  console.log('WILL PRINT ACTIVE HANDLES');
  log() // logs out active handles that are keeping node running
}, 1000)

const importLocal = require('import-local');

if (!importLocal(__filename)) {
  require('jest-cli/bin/jest');
}

Then running jest: ./node_modules/.bin/jest (my params) --runInBand
Got it printing some helpful information every 1 second.

Jest code says it is based on why-is-node-running:
https://github.com/facebook/jest/blob/1cc205c274defb24f8b827b8a0c53c161c79d106/packages/jest-core/src/collectHandles.ts#L38

Hi All, I'm having a similar issue, but only when collecting coverage.
All tests runs fine without the --collectCoverage at the moment I turn this flag on, I start getting some weird issues, including the 2 messages stated on the bug report.

For anyone still struggling with this, I managed to narrow down my issue by using a combination of suggestions above. Here's what I did:

Ran npx jest --runInBand --detectOpenHandles src to validate that something was indeed hanging
Ran npx jest --runInBand --detectOpenHandles src/someDir on several dirs to figure out which one was the culprit (if it doesn't hang and exits cleanly, move on to another dir)
Ran npx jest --runInBand --detectOpenHandles src/someDir/someFile to figure out exactly which file was causing the problem

For anyone using NEXT.js, this line was the problem for me: const nextApp = next({ dev: process.env.NODE_ENV !== 'production' });. I'm ripping it out tomorrow and migrating to serving an app directly from Express 😬
Hope this helps someone else out there!

Hello all. My issue is that running jest produces the "a worker process failed to exit gracefully" but when i try to isolate with the provided CLI args --runInBand and --detectOpenHandles, I am no longer able to produce the error. so... just wanted to throw that out there. i also found this open issue in testing-library:
https://github.com/testing-library/dom-testing-library/issues/524
not sure it's related, but it's something.

We see this problem after updating to jest 26.6.0 and did not see it before that version.

Same here.

Same here.
envInfo:
 System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 12.18.3 - ~/.nvm/versions/node/v12.18.3/bin/node
    npm: 6.14.8 - ~/.nvm/versions/node/v12.18.3/bin/npm
  npmPackages:
    jest: 26.6.3 => 26.6.3

Jest cmd: jest --testTimeout=20000 --runInBand --detectOpenHandles
Code example:
describe('Plugin', () => {
    test('should launch browser', async () => {
        await new Promise((resolve) => setTimeout(() => resolve(), 5000));
    });
});

Process hangs. No open handles are logged.

In my case the upgrade from 24.9.0 to 25.0.0 breaks it.

Hi, I am facing the similar issue.
I just write this simple test.
  it('demo test', async () => {
    expect(true).toEqual(true);
  });
});```

But jest is not returning to the terminal after running the test. --detectOpenHandles is also not showing any output.

EDIT: I think it might be connected to #10777

This was the issue for me... I applied the workaround suggested in that issue to get jest to exit again.

Yes, I think I am also facing a similar issue @jamesandersen.

EDIT: I think it might be connected to #10777

This was the issue for me... I applied the workaround suggested in that issue to get jest to exit again.

Yes, I think I am also facing a similar issue.

@jeysal I tried to produce a small example but this doesn't happen on small projects. Nonetheless, here is a project, it just has 5-6 routes and a react-client. Just remove the --detectOpenHandles --forceExit flags from the test script in package.json to reproduce the error. Hope this helps to detect the issue.

Fixed this by doing the following (not sure if all steps are necessary but it worked):
npm i -D fsevents@latest
npm dedupe
npm uninstall -D fsevents

Confirm fsevents is bumped to at-least 2.2.1 for jest's dependencies by running npm ls fsevents.

@track0x1 what system were you on? windows / mac / linux / something else?

@hasezoey This was on a mac

FWIW, I have this same issue on Linux which isn't installing fsevents at all.

For anyone struggling with this issue and using ioredis package:
A simple fix would be to quit the redis connection in your afterEach or afterAll hooks:
// src/lib/redisClient.js # whatever path you instantiate the package
export const redis = new Redis(config.REDIS_URL);

import { redis } from "src/lib/redisClient";

// tests/setupTest.js
afterAll(async () => {
    await redis.quit();
});

https://github.com/luin/ioredis/issues/1088#issuecomment-732490888

For anyone struggling with this issue and using ioredis package:
A simple fix would be to quit the redis connection in your afterEach or afterAll hooks:
// src/lib/redisClient.js # whatever path you instantiate the package
export const redis = new Redis(config.REDIS_URL);

import { redis } from "src/lib/redisClient";

// tests/setupTest.js
afterAll(async () => {
    await redis.quit();
});

https://github.com/luin/ioredis/issues/1088#issuecomment-732490888

For anyone having troubles with tests using vue-test-utils that get stuck, don't forget to await calls to Wrapper methods that return a Promise from $nextTick().
For example, I had a test that called wrapper.setProps({}) inside a for loop and it made jest hang and the solution was to await the setProps calls.
I hope this helps someone.

I come here to share my experience.
TL;DR: in my case it was my unclosed databases connections that triggers this log...
Long version:
I use Jest to run backend tests, so in my tests I use supertest which starts my express app which starts MongoDB connections with mongoose... And obviously after my tests are finished, I did not close my connections, pretty far from my thoughts when I firstly saw this issue... Then for me this is what fixed my issue:
afterAll(async () => {
  for (const connection of mongoose.connections) {
    await connection.close();
  }
});

In order to reproduce:
import request from "supertest";
import app from "./app";
/**
 * app:
 * - an express() app instance
 * - with an endpoint `/api/test` for example
 * - which requires a mongoose Model with an active connection
 */

describe('description', () => {
  it('description', async () => {
    const req = await request(app).post("/api/test");
  })
});

HTH

in my case it was my unclosed database connections that was triggering this log...

The problem is not really what triggers this log, as that varies from user to user. The problem is that --detectOpenHandles makes Jest freezes instead of printing information.

@laurent22 Indeed, I agree, just wanted to share in order to help people working around until Jest can give more info on what is locking the process.

I had a similar issue to @Jule-, but it was how I was making a connection to Mongo via mongoose. It seems like mongoose's mongoose.connection.close() in a top-level afterAll within a setupTests file isn't consistently closing the connection.
My approach was to set up a single connection before all tests within a setupTests.ts file to register mongoose models, then close the single connection after all test suites have finished.  This appears to cause issues with Jest.
For example:
database/index.ts
const options = {
  useNewUrlParser: true, // avoids DeprecationWarning: current URL string parser is deprecated
  useCreateIndex: true, // avoids DeprecationWarning: collection.ensureIndex is deprecated.
  useFindAndModify: false, // avoids DeprecationWarning: collection.findAndModify is deprecated.
  useUnifiedTopology: true // avoids DeprecationWarning: current Server Discovery and Monitoring engine is deprecated
};

export const connectToDatabase = (): Promise<typeof mongoose> =>
  mongoose.connect(`mongodb://localhost/${DATABASE}`, options);

setupTests.ts (this works about 50% of the time)
import mongoose from "mongoose";
import { connectToDatabase } from "~database";

beforeAll(async () => {
  await connectToDatabase();
});

afterAll(() => {
  mongoose.connection.close();
});

Instead, removing the setupTests.ts file and moving the connection within each test suite seems to have fixed the warning:
 import mongoose from "mongoose";
 import { connectToDatabase } from "~database";

 describe("Example", () => {
   beforeAll(async () => {
     await connectToDatabase();
   });

   afterAll(async () => {
     await mongoose.connection.close();
   });

   it("...", () => {});
 });

@laurent22 is exactly right. This thread is not about posting workarounds, which is what this has become. Nothing against everyone sharing info. Without any official response that is actually useful, that's what happens.
Given that there's clearly no intention to fix this, I guess it's time for me to unsubscribe from my own bug report. Sigh.

jest --forceExit --detectOpenHandles  this solves the problem for me

For anyone struggling with this issue and using ioredis package:
A simple fix would be to quit the redis connection in your afterEach or afterAll hooks:
// src/lib/redisClient.js # whatever path you instantiate the package
export const redis = new Redis(config.REDIS_URL);

import { redis } from "src/lib/redisClient";

// tests/setupTest.js
afterAll(async () => {
    await redis.quit();
});

Referring from: luin/ioredis#1088 (comment)

I have experienced the same problem with a ioredis using test, solved as proposed. It looks like the test process hangs with the redis open connection

I've also hit this a number of times and again today, so I made a minimal repro from my most recent encounter:
levilansing/jest-9473
I'm reasonably certain I've encountered this with timers and promises in the past, but couldn't repro just now. In this repo, I've left a connection open to redis during tests, which should obviously be mocked during tests, but demonstrates that jest does not provide any hint to what might be causing the tests to hang when using --detectOpenHandles in this case.

Using jest@next detects 2 handles:

stack trace of the first one isn't suuuuper useful, but it's something pointing to redis at least 🙂

Edit 2020-04-24:
Registered timeouts are not detected by the jest "detectOpenHandles" option
Here a repo to reproduce the issue and a fix on client side
TarSzator/jest-open-handle-test
I hope it helps to find the error in Jest or Jest is intended like that then it might help users to find and fix issues on their side.

Same here

As far as I can see, these are the only 2 reproductions posted, which have both been fixed (in #11429 🚀), so I'll close this one as it's suuuuper long and full of workarounds and "+1"s.
One improvement I want to make is print "sorry, we found no open handles" or some such so it doesn't seems like Jest didn't react to the flag.

If somebody using Jest 27 or newer (try out jest@next, stable will come next week) still have this issue, please open up a new one with a minimal reproduction (like the two I checked here).


Doc Feedback:Not able to create a role in devportal who only see application and not allow to subscribe the api in application

Location : https://apim.docs.wso2.com/en/latest/administer/managing-users-and-roles/managing-user-roles/

Move this to product-apim as this is not a doc issue.
@rajrsm could you please explain the issue in detail?

No further comments added for long period time hence closing, please re-open if you face this issue again.


Instructions incomplete on Ubuntu 16.04

pymarket version: pip installed version (version 0.7.5 ?)
Python version: python3-pip=8.1.1-2ubuntu0.4
Operating System: Ubuntu 16.04

Description
Trying to install pymarket following the instructions.
The instructions result in an error.
Example of an instance of issues #5 and #8.
What I Did
On Ubuntu 16.04, with latest packaged pip installed....
apt install --yes python3-pip=8.1.1-2ubuntu0.4

the instructions abend:
$ pip3 install pymarket
Collecting pymarket
    default:   Downloading https://files.pythonhosted.org/packages/84/53/d74deabe429cbd7cf809b6a272302db251d74c06509f74b86d0f4d1899f2/pymarket-0.7.5-py2.py3-none-any.whl
    default: Collecting pandas>=0.24 (from pymarket)
    default:   Downloading https://files.pythonhosted.org/packages/d9/05/38875a81040e679c196a854865dbafe4dfe5f92e8365ddfff21f2817d89d/pandas-0.25.1-cp35-cp35m-manylinux1_x86_64.whl (10.3MB)
    default: Collecting pulp (from pymarket)
    default:   Downloading https://files.pythonhosted.org/packages/2d/33/3ae6d9d2ac8c7068937af6372fd8828ac605e62a8b17106fe57110930d38/PuLP-1.6.10.zip (13.6MB)
    default: Collecting numpy>=1.16 (from pymarket)
    default:   Downloading https://files.pythonhosted.org/packages/9b/21/2b18339d24a2f73dcefb2f10f48aff6182e16da83e3a612684443c6cfb29/numpy-1.17.2-cp35-cp35m-manylinux1_x86_64.whl (20.1MB)
    default: Collecting networkx (from pymarket)
    default:   Downloading https://files.pythonhosted.org/packages/85/08/f20aef11d4c343b557e5de6b9548761811eb16e438cee3d32b1c66c8566b/networkx-2.3.zip (1.7MB)
    default: Collecting Click>=6.0 (from pymarket)
    default:   Downloading https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl (81kB)
    default: Collecting matplotlib (from pymarket)
    default:   Downloading https://files.pythonhosted.org/packages/12/d1/7b12cd79c791348cb0c78ce6e7d16bd72992f13c9f1e8e43d2725a6d8adf/matplotlib-3.1.1.tar.gz (37.8MB)
    default:     Complete output from command python setup.py egg_info:
    default:
    default:     Beginning with Matplotlib 3.1, Python 3.6 or above is required.
    default:
    default:     This may be due to an out of date pip.
    default:
    default:     Make sure you have pip >= 9.0.1.
    default:
    default:
    default:     ----------------------------------------

Steps to reproduce (using a Digital Ocean VM):
push dev
vagrant up
vagrant provision

I think the problem you are having is due to the fact that in Ubuntu 16.04, python3 is actualy 3.5 and 3.6.
I created a docker to reproduce this problem. I'm have no experience with Vagrant, but i believe this should be similar enough.
The new dockerfile is Dockerfile_xenial created in https://github.com/gus0k/pymarket/commit/5241d054b33705ec519393b89d4416285b931c1d
To test it , run:
docker build -f Dockerfile_xenial -t pymarket:xenial .
 docker run -it pymarket:xenial

Once in the console, you can open open python using:
python3

I used one of the examples in the the documentation and it works fine:

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import networkx as nx
import pymarket as pm
r = np.random.RandomState(1234)
mar = pm.Market()

mar.accept_bid(1, 6.7, 0, True, 0)
mar.accept_bid(1, 6.6, 1, True, 0)
mar.accept_bid(1, 6.5, 2, True, 0)
mar.accept_bid(1, 6.4, 3, True, 0)
mar.accept_bid(1, 6.3, 4, True, 0)
mar.accept_bid(1, 6, 5, True, 0)

mar.accept_bid(1, 1, 6, False, 0)
mar.accept_bid(1, 2, 7, False, 0)
mar.accept_bid(2, 3, 8, False, 0)
mar.accept_bid(2, 4, 9, False, 0)
mar.accept_bid(1, 6.1, 10, False, 0)

bids = mar.bm.get_df()
transactions, extras = mar.run('p2p', r=r)
stats = mar.statistics()

This should not be closed:

The output indicates it is a pip issue.
The Travis config suggests Xenial is supported.

The docker i uploaded is running with an old version of pip (8) and it works flawlessly:
Python 3.6.8 (default, Oct  9 2019, 14:04:01)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
KeyboardInterrupt
>>>

root@bdf6686310c3:/# python3 -m pip --version
pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.6)

If you want me too add a line that says that a recent pip is recommended, I'll do it. But it is a python's version problem.

I just want instructions that anyone can follow and get up and running.
You need to add update pip instructions (see your .travis.yml file) if you want to say Ubuntu Xenial works out if the box.
It shouldn't be necessary to have docker or vagrant to get this running.


enhancement: add missing wrappid packages key

Description
Add missing wrappid packages key in package.json

[x] @wrappid/native-web: "latest"
[x] @wrappid/native-mobile: "latest"

Closing as done


Work with CDC to re-add Custom Domain, SSL Bindings, and Akamai CDN to Dev1 and Test envs

“A” records point to the App Gateway (…I think…may want to double-check those IP addresses), while the CNAME values are the custom domains that point to the azurewebsites.net addresses.
In our case, we will have to ask them to do the following:
Dev1 will need an update to its “A” record to match the recreated App Gateway’s new IP Address. It will then need the CNAME pointed to the azurewebsites.net value. Once that is complete, we can create the custom domain, ensure that the SSL binding is in place, and then send a new mailing to re-point to Akamai.
Test will just need the CNAME -> Custom Domain/SSL -> Akamai process.

@rin-skylight Will you forward me the contact information when you have time?

This is wip


[ldd-img] missing classes

I compared Imaging and Commanded_Parameters and these inconsistencies need fixing:
Please add Illumination to Commanded_Parameters
Please add Optical_Properties to Commanded_Parameters
Looks good otherwise, and the order matches.

thanks for checking. updated


Artisan::output() always empty with Illuminate\Foundation\Testing\RefreshDatabase

Laravel Version: 6.3.0
PHP Version: 7.3.10
Database Driver & Version: sqlite v3.24.0

Description:
Artisan::output() is always empty when using the Illuminate\Foundation\Testing\RefreshDatabase trait on a test.
Steps To Reproduce:
In a clean install of Laravel, I created the following command:
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class Test extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'test';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->comment('test');
    }
}

Then I changed the ExampleTest.php to the following:
<?php

namespace Tests\Unit;

use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;

class ExampleTest extends TestCase
{
	use \Illuminate\Foundation\Testing\RefreshDatabase;
    /**
     * A basic test example.
     *
     * @return void
     */
    public function testBasicTest()
    {
        $this->assertTrue(true);

        \Artisan::call('test');
        dd(\Artisan::output());
    }
}

Which outputs:
$ phpunit
PHPUnit 8.3.5 by Sebastian Bergmann and contributors.

""

If I remove the Illuminate\Foundation\Testing\RefreshDatabase trait it will output the following:
$  phpunit
PHPUnit 8.3.5 by Sebastian Bergmann and contributors.

"test\n"

I can confirm this happens for MySQL v8.0.17 as well.

You need to use the artisan test tooling to test commands:
    public function testBasicTest()
    {
        $this->artisan('test')
            ->expectsOutput('test')
            ->assertExitCode(0);
    }

https://laravel.com/docs/6.x/console-tests

Thanks, came across this also. No workaround here


Brute force stop

Provides a basic mechanism for locking a user account after a number of failed locking attempts. This will help to prevent against brute force password cracking attempts of the admin account.
Lockout configuration has been added to the service/config/config_example.* files. The default values are 5 attempts in 5 minutes.
To disable, change the lockout_count to a sufficiently high number, such as 1000.

Just a note: since this requires a database schema change, we'd have to consider it for the next major version of Suma. It may be a while until we can get to this.


MINOR FIX: AIModelsClient Test Warning

@BrianLParker make sure you add all the details of the issue you are trying to solve. No more empty issues moving forward.
Also make sure you tag the issue for it's type as done in other issues.


Feature: Navigate tabs with mouse + context menu

Is your feature request related to a problem? Please describe.
In a reverse engineering session, one has often many tabs open in the Structure Editor.
Navigating these requires clicking on the small < and > buttons on the right.
Closing a tab requires a "precise" click on the cross.
Describe the solution you'd like
Allow navigating tabs in a similar way as web browsers do.
Scrolling the mouse wheel scrolls the tabs, middle mouse button closes a tab.
Expand the current tab context menu (when clicking the right mouse button) adding more ways to close multiple tabs.
Describe alternatives you've considered
n/a
Additional context
As a reference, screenshot of Firefox tab menu

Don't forget good, quick and simple keyboard alternatives too PLEASE...


1170300922-log

I added txt to your log to facilitate finding the address where the log was completed

Thank you!


Format issue in README

A recent PR introduce a paragraph with some formatting issue:
Multi-agent conversations: AutoGen agents can communicate with each other to solve tasks. This allows for more complex and sophisticated applications than would be possible with a single LLM. Customization: AutoGen agents can be customized to meet the specific needs of an application. This includes the ability to choose the LLMs to use, the types of human input to allow, and the tools to employ. Human participation: AutoGen seamlessly allows human participation. This means that humans can provide input and feedback to the agents as needed.
They are supposed to be sub bullet points. A fix is appreciated.

Hi, I want to contribute in this issue..

Please. It's assigned to you.

should I append those informations in one section or in separate 3 section ?

@qingyun-wu could you suggest? Also, could you preview the doc before you approve a doc change?

Hello @sonichi
I came across issue #65 regarding the formatting problem in the README. I've reviewed the conversation and understand that there's a need to format a paragraph as sub-bullet points. I'm super interested in contributing to this project and would like to offer my assistance if @Itsbabin requires any help or if there are other related tasks.

@alhridoy please help me. I can't understand in which section I should write?

Please help me in my first open-source contribution ☺

I have created a PR, which resolves this issue. Kindly do check this @sonichi.


Fetch api and display rockets data

In this branch I did:

Establishing the core structure for the Rockets section and implementing data fetching functionality.
Setting up the initial layout and structure for the Rockets page
Fetching data from the SpaceX API to populate the Redux store.

Hi @GhausAliKhan
STATUS: APPROVED! 🟢🟢

No errors detected in the project 👍
API Fetched
All project requirements met 🥇
Linters executed successfully ✔

Congratulations, your project has met all the requirements and is ready for merging! :shipit:
Best of luck moving forward! 🎉


Ability to use pure-Go SQLITE driver

This PR is solely for triggering CI checks against non-standard, pure-Go SQLite driver for GORM.
The corresponding issue is: https://github.com/go-gorm/gorm/issues/4922

Nice job, @glebarez have you ever compared its performance?
If the pure-go one's performance is better or similar, then I would like to replace the old one, or create another driver if it is much worse.

Nice job, @glebarez have you ever compared its performance?
If the pure-go one's performance is better or similar, then I would like to replace the old one, or create another driver if it is much worse.

look....

Currently there are:

simple insert / select benchmarks vs Mattn's implementation (https://gitlab.com/cznic/sqlite/-/tree/master/benchmark). This shows that pure-Go may be faster that Cgo in some cases
https://gitlab.com/cznic/sqlite also has TPCH benchmark implemented for both pure-Go and CGo drivers. You may just run tpch.sh to see the results.

I've prepared a set of comprehensive benchmarks for this driver against mattn's:
https://github.com/glebarez/go-sqlite/tree/master/benchmark

@glebarez @jinzhu Are there plans to integrate @glebarez's work back into upstream or is this unlikely to happen because of the performance penalty?

@glebarez @jinzhu Are there plans to integrate @glebarez's work back into upstream or is this unlikely to happen because of the performance penalty?

Hello. I don't think that's reasonable because:

underlying database/sql drivers are different in implementation, and even connection string syntax varies
GORM simply too mature to pull out such tricks, since it may break a lot of dependent code
I'm happy with just pure-Go driver listed in docs, so people are free to choose which one suites best

I hope this claryfies things 🙂

Yes, it does. Thank you for your work on this.


What is the "default" World?

As the topic suggests, currently, we have no notion of a "default" world. Should we have one? Should we not?

What do you consider as default world?
The first loaded world?
The world the player spawns in when he connects for the first time?

server.properties defines default world.
I've yet to see a reason for the Server interface to have a setter for it.

Is it possible to change environment of default world? Eg to nether

Worlds in Sponge are always linited to a single dimension. So if you are able to set it to a specific world you can choose whatever dimension just using the World object.
AFAIK in forge a world is a collection of dimensions. But in Sponge it is not.

@st-ddt I wonder how the getWorld(name) method works when there are 3 worlds (= Minecraft Dimensions) with the same name (overworld, nether and end).

I guess this is a bug we should adress.
For example by adding getWorld(String name, Dimension dimension)

@ST-DDT @boformer Actually the nether and end are currently named DIM1 and DIM-1 respectively. Perhaps they should be renamed to be world_nether and world_the_end by default. But I heavily disagree with a getWorld(String name, Dimension dimension) method.

Each world must have a unique name. This is a non-issue.

Shouldn't there be a getter method? In Bukkit I would just use Bukkit.getWorlds().get(0), but since Sponge doesn't use a list (and a list actually doesn't even make sense), there ought to be an alternative.


G2P needs client JSON tests

Add some tests for g2p endpoints in tests/end_to_end/test_client_json.py. This depends on having a simulator in #936.

Fixed in #1344


[Docs]: Adding a MIT Licenses badge in the  Licenses section of readme

Current State
Lisenses section just has some text
Desired State
We can add a MIT Licenses badge and some more text to the section
Screenshots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

Please assign me this issue under GSSoC'23


Migrate SecurityBrowserTest.java to TS browser tests

Description
SecurityBrowserTest.java uses legacy JS/HTML interpreter which in the past blocked certain improvements like serving modern JS to users containing ES6+ features such as let, const, async/await. This PR migrates tests from that file to more robust browser test TS codebase.
Checklist
General

[x] Added the correct label: < feature | bug | dependencies | infrastructure | ignore-for-release >
[x] Created tests which fail without the change (if possible)
[ ] Extended the README / documentation, if necessary

User visible changes

[ ] Wrote browser tests using the validateAccessibility method
[ ] Manually tested at 200% size
[ ] Manually evaluated tab order

New Features

[ ] Add new FeatureFlag env vars to server/conf/application.conf
[ ] Conditioned new functionality on a FeatureFlag
[ ] Wrote browser tests with the feature flag off and on, etc.

Codecov Report

Merging #3957 (65e2a6b) into main (c33daa3) will decrease coverage by 0.66%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##               main    #3957      +/-   ##
============================================
- Coverage     80.81%   80.15%   -0.67%
+ Complexity     2463     2440      -23
============================================
  Files           298      298
  Lines          9683     9683
  Branches        659      659
============================================
- Hits           7825     7761      -64
- Misses         1604     1669      +65
+ Partials        254      253       -1

Impacted Files
Coverage Δ

server/app/controllers/CallbackController.java
20.00% <0.00%> (-60.00%)
:arrow_down:

server/app/auth/GuestClient.java
42.85% <0.00%> (-57.15%)
:arrow_down:

server/app/controllers/ProfileController.java
35.71% <0.00%> (-42.86%)
:arrow_down:

server/app/auth/FakeAdminClient.java
63.63% <0.00%> (-36.37%)
:arrow_down:

server/app/auth/ProfileUtils.java
57.57% <0.00%> (-24.25%)
:arrow_down:

server/app/controllers/LoginController.java
22.85% <0.00%> (-22.86%)
:arrow_down:

server/app/controllers/HomeController.java
61.29% <0.00%> (-19.36%)
:arrow_down:

server/app/auth/CiviFormHttpActionAdapter.java
83.33% <0.00%> (-16.67%)
:arrow_down:

...app/auth/oidc/CiviformOidcLogoutActionBuilder.java
76.47% <0.00%> (-11.77%)
:arrow_down:

server/app/auth/oidc/OidcProfileAdapter.java
75.38% <0.00%> (-10.77%)
:arrow_down:

... and 6 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


flutter doctor --android-licenses breaks because of java.lang.UnsupportedClassVersionError

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
Running flutter doctor --android-licenses gives the following error:
Error: LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
	java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

I am on MacOS Sonoma 14.0, and I have the Java SDK versions 19 and 21 installed. I have tried changing $JAVA_HOME from JDK 21 to JDK 19, and reinstalling the Android SDK command line tools using Android Studio. None of these solutions work.
Actual results
I expect to be able to accept android licenses through the command line
Logs

Logs

Error: LinkageError occurred while loading main class com.android.sdklib.tool.sdkmanager.SdkManagerCli
	java.lang.UnsupportedClassVersionError: com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Android sdkmanager tool was found, but failed to run (/Users/robclother/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager): "exited code 1".
Try re-installing or updating your Android SDK,
visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions.

#0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
#1      AndroidLicenseValidator.runLicenseManager (package:flutter_tools/src/android/android_workflow.dart:406:9)
<asynchronous suspension>
#2      DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:49:26)
<asynchronous suspension>
#3      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1297:27)
<asynchronous suspension>
#4      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#5      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#6      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:339:9)
<asynchronous suspension>
#7      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#8      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:285:5)
<asynchronous suspension>
#9      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:115:9)
<asynchronous suspension>
#10     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
<asynchronous suspension>
#11     main (package:flutter_tools/executable.dart:90:3)
<asynchronous suspension>

Flutter Doctor output

Doctor output

[✓] Flutter (Channel stable, 3.13.7, on macOS 14.0 23A344 darwin-arm64, locale en-GB)
    • Flutter version 3.13.7 on channel stable at /Users/robclother/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 2f708eb839 (9 days ago), 2023-10-09 09:58:08 -0500
    • Engine revision a794cf2681
    • Dart version 3.1.3
    • DevTools version 2.25.0

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/robclother/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[!] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    ✗ Unable to get list of installed Simulator runtimes.
    • CocoaPods version 1.12.1

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.83.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.74.0

[✓] Connected device (2 available)
    • iPhone (mobile) • dd62db7b39091ea641e9f94bf8d7248cd32db33e • ios          • iOS 16.5.1 20F75
    • macOS (desktop) • macos                                    • darwin-arm64 • macOS 14.0 23A344 darwin-arm64

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 2 categories.

Hi @cto-seak-global. Thanks for filing this. Can you check out this stack overflow thread to see if it helps in your case?
Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

I have tried all of the solutions described in the Stackoverflow thread, and none work.
This is very much an issue with Flutter itself. It is a flutter command that is failing.

Hi @cto-seak-global. Thanks for trying that out and responding. I mentioned it isn't an issue with flutter itself as there have been similar issues to yours which have been resolved.
You can also check out https://github.com/flutter/flutter/issues/120388 or https://stackoverflow.com/questions/75328050/flutter-doctor-android-licenses-not-working-due-to-java-lang-unsupportedclassv for more suggestions or by posting this on Stack overflow as well.


didSelectItemAt isn't getting called

func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath)
It is not getting called.

@SamranKhan
Are you setting delegate of collectionView?
geminiCollectionView.delegate = delegate

Yes. I can send you the code if you want!


ARROW-10623: [R] Parquet forwards compatibility testing

@github-actions crossbow submit test-r-rstudio-r-arrow-1.0.1-compatibility

@github-actions crossbow submit test-r-rstudio-r-arrow-1.0.1-compatibility

In case it helps, you don't need to run this through docker-compose. I might just create a new GHA yaml (like there is for as-cran testing) that does what I want. And what I want is something that: installs from commit, runs R script to write out a parquet or feather file (or multiple), bundle the files and stash them as a build artifact, and then a matrix job that depends on that one, matrix of R versions, downloads the artifact, remotes::install_version, run test script that reads the file(s) and asserts about them.
Also, feel free to put the writing and reading/testing scripts somewhere else that is is .Rbuildignored, they don't have to be part of the regular test suite.

In case it helps, you don't need to run this through docker-compose. I might just create a new GHA yaml (like there is for as-cran testing) that does what I want. And what I want is something that: installs from commit, runs R script to write out a parquet or feather file (or multiple), bundle the files and stash them as a build artifact, and then a matrix job that depends on that one, matrix of R versions, downloads the artifact, remotes::install_version, run test script that reads the file(s) and asserts about them.
Also, feel free to put the writing and reading/testing scripts somewhere else that is is .Rbuildignored, they don't have to be part of the regular test suite.


Admin panel

An admin panel should have the following features:

Manage users (list / update / ban)
Manage streams from all users (add or remove from the archive)
Get user role from discord server if environment variable is set

Hey there, has any progress been made on this specific feature? Would like to authorize certain members with-in a Discord who have a specific role to only be able to stream :)

Hey.
I haven't touched the project in a loooong time now and I doubt I will in
the future. I am however open to PRs, so if anyone feels like implementing
it - you're more than welcome to.
-John Patrick
On Sat, Feb 11, 2023, 14:33 AA @.***> wrote:

Hey there, has any progress been made on this specific feature? Would like
to authorize certain members with-in a Discord who have a specific role to
only be able to stream :)
—
Reply to this email directly, view it on GitHub
https://github.com/GOATS2K/overpass/issues/10#issuecomment-1426785606,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ANI5XUXI3Y4Y52KW43HYX7DWW6PKFANCNFSM4YCQ7EYQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


nquiry Regarding Project Replication and Error Resolution

An error popped up when I attempted to replicate it.

I'm wondering if the issue is due to a version difference in a certain package? Would you please provide me any advice about the error? Or maybe you prefer to share your requirement.txt so i can check for myself?

Could you please check if this commit fixes your issue?
https://github.com/wiseodd/lapeft-bayesopt/commit/6c8740f30fe7fdcf85ce95c1e14928a34b776d4c
PS. make sure also that you installed laplace-torch and asdl in the given order,  as in the README.md:
pip install git+https://github.com/aleximmer/Laplace.git@mc-subset2
pip install git+https://github.com/wiseodd/asdl.git@dev


Add phylake

Pre-submission checklist:
Please check each of these after submitting your pull request:

[ ] Are you only including a repo_url if your project is 100% open source? If so, you need to pick the single best GitHub repository for your project, not a GitHub organization.
[x] Is your project closed source or, if it is open source, does your project have at least 300 GitHub stars?
[x] Have you picked the single best (existing) category for your project?
[x] Does it follow the other guidelines from the new entries section?
[x] Have you included a URL for your SVG or added it to hosted_logos and referenced it there?
[x] Does your logo clearly state the name of the project/product and follow the other logo guidelines?
[x] Does your project/product name match the text on the logo?
[x] Have you verified that the Crunchbase data for your organization is correct (including headquarters and LinkedIn)?
[ ] ~15 minutes after opening the pull request, the CNCF-Bot will post the URL for your staging server. Have you confirmed that it looks good to you and then added a comment to the PR saying "LGTM"?

Deploy preview for landscape ready!
Built with commit 8a5478b8d11de47b106d73b1504f20c64bc7a7a0
https://deploy-preview-2087--landscape.netlify.app

Deploy preview for landscape ready!
Built with commit c617e3a107b1714b702d328f1b6c76c88d999064
https://deploy-preview-2087--landscape.netlify.app

LGTM

@torstenwalter can you update your commit by taking https://phylake.io/images/phylake-stacked.svg and putting it in hosted_logos/ - trying to avoid referencing external SVGs

@caniszczyk Thanks for reviewing. I move the logo into the hosted_logos directory as requested. Hope that the reference is correct.

Should I create a PR to adjust the pull request template?

Have you included a URL for your SVG or added it to hosted_logos and referenced it there?

Also is syncier.com really the crunchbase company for this project?

Yes it is. This product is just using a separate domain.


install in Windows turn wrong

#Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
when i install it in powershell,error message is that about Version mismatch .
I take this path AppData\Local\Temp\chocolatey,there are 7za.exe and chocolatey.zip,I cannot run the 7za.exe. So I delete the 7za.exe and it works.

@laxselocke please file an issue at https://github.com/chocolatey/choco/issues/new. Thanks!


keepass2 import fails when line breaks present in password

So I store some software keys on my keepass and they contain line breaks in the password, but when trying to import them into buttercup the buttercup-importer keepass2importer fails when it encounters those characters.
I attach a simple database with one password containing the problematic character.
buttercup-import-test.kdbx.zip
The database's password is bc

for reference, code breaks here

Thanks a lot for looking into this, we'll take a look shortly!

Hmm.. this may be due to the way we store history (entry properties). It probably doesn't handle new lines so well.. This could be a breaking change.

thank you!! perhaps serializing-deserializing? idk the details…

serializing-deserializing

Yes, we definitely overlooked that. It should be that we perhaps base64 encode the values first so that we don't corrupt archives with newlines..

This is blocked by buttercup-pw/buttercup-core#143

The work is done - should be fixed by updating buttercup core to 0.35.0.

Sorry @vectorsize - We need to patch it in this repo and then in the butterup GUI (buttercup-pw/buttercup) (requires both buttercup-importer and buttercup-core-web): buttercup-pw/buttercup#171. It should be done today or tomorrow.
Of course you could make an MR here to help speed up the process, but I suspect that the importer is the simpler part :)

All right, I thought I could try it right away... I' not in a hurry, and have other stuff on my plate this week, so I can't help much right now, I'll wait for it to be released :) thanks again!

@vectorsize I've published the fix in 0.7.0, so that should work for you now. I'll be integrating this into Buttercup GUI soon - unfortunately archives imported in this version will not yet work there until it's updated.

@vectorsize Thanks again! The new release of the GUI is here: https://github.com/buttercup-pw/buttercup/releases/tag/v0.10.1-alpha
All current versions should not be serialising their properties.

Great news, thanks a bunch and again great job!! Will try this soon and report if something doesn't go as expected! 🤓✌

Really sorry to say… strangely enough trying to import again a simple db with 2 passwords one of them with a line-break in the password and still doesn't work, is it possible there is some caching or something didn't refresh a dependency version?

@vectorsize What version of the UI are you using? It should say "0.10.1" on the main page.
If you running the dev version, make sure to npm install. You could also check that the buttercup-importer module is at 0.7.0.

Ok, seems I can still reproduce the issue.. Dang:

Sorry @vectorsize - We'll try again. Maybe we missed the version somehow.

💩

Ok, new release coming shortly, sorry.


Reassembling all parts of a whole can be replaced by the original whole

( Tuple.first originalTuple, Tuple.second originalTuple )
--> originalTuple

Tuple.pair (Tuple.first originalTuple) (Tuple.second originalTuple)
--> originalTuple

(found in the FSharpLint default config)
If type inference becomes available in the future, the same can be done for non-extensible records, although this might be a bit more controversial because same field names does not necessarily imply same semantics.
Somewhat related: https://github.com/jfmengels/elm-review-simplify/issues/29

Sounds good to me 👍

I don't think I like this anymore, for the same reason I wouldn't like the same rule for records: same position does not necessarily imply same semantics

Same position does not necessarily imply same semantics.

I'm not sure I follow. I agree with that sentence, but with the code to be simplified above, you don't get to add new semantics (like names).
I can see the code below as giving names to an existing thing as having some potential value.
let
    ( buyerId, products ) =
        userAndBasket
in
( buyerId, products )

but I can't see what you'd gain by doing
( Tuple.first userAndBasket, Tuple.second userAndBasket )
--> instead of
userAndBasket

Same for Tuple.pair
(I'll re-open for now)


⚠ Bofrost.fr has degraded performance

In 17e16d5, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 2541 ms

Resolved: Bofrost.fr performance has improved in f0fd8a1 after 16 minutes.


Cannot open chat in Hangouts on Mac OS

Describe the bug
I can sign into Hangouts in Franz. When opening a chat / starting conversation, I get an error "Uh oh something is not right. We're having trouble loading this hangout"
To Reproduce
Steps to reproduce the behavior:

Sign into Hangouts
Open a conversation / chat with anyone in contacts.
Observe error

Expected behavior
Expect that I can chat in Hangouts
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: Mac OS Big Sur 11.1
MacBook Pro (16-inch, 2019)
Browser [e.g. chrome, safari]
Version 5.6.1 (<IP_ADDRESS>0)

Additional context
I've been able to use Franz with Hangouts on Big Sur, but recently got a new laptop. Never worked on this machine.

Same issue, I tried reinstalling, disable-enable service, other Gmail accounts.
OS: MacOS Big Sur 11.1 (spanish)
MacBook Air  (M1, 2020)
Franz version: Versión 5.6.1 (<IP_ADDRESS>0) (Spanish)

Same issue, I tried reinstalling, disable-enable service, other Gmail accounts.
OS: MacOS Big Sur 11.1 (spanish)
MacBook Air  (M1, 2020)
Franz version: Versión 5.6.1 (<IP_ADDRESS>0) (Spanish)


Add Rust package with manual tests

Description of changes:
Adds a Rust package intended to assist in manually testing the features of the extension.
Resolved issues:
Related #17
Testing:

How is this change tested? Manually.

Is this a refactor change? No.

Checklist

[x] Each commit message has a non-empty body, explaining why the change was made
[x] Methods or procedures are documented
[x] Regression or unit tests are included, or existing tests cover the modified code
[x] My PR is restricted to a single feature or bugfix

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.

I also hope that we can add a few more scenarios, like cargo workspaces, crates with dependencies, bolero... Thus, I was wondering if we should change this crate to be inside resources/test-crates/simple-test/...

Done.


Create split_excel_sheet.py

This script can be used to recursively read excel files and for each sheet in the file, create a new excel file.
mention the source in the root_directory  and the destination in the new_directory.  The script reads any excel sheet recursively in the folder and following the same folder structure saves the new excel files those are generated.
The error_log.txt file contains the logs of file names in which any type of error occurs.

Please find the script to split the excel files into individual sheets.

Can you please do this with openpyxl directly and not use pandas please (I know, a pain). Pandas uses openpyxl behind the scenes, and we don't want pandas as a dependency because it has causes many operational issues over time.
Can you also please add an option to split and create the new files in the existing directory hierarchy, to simplify the next step when the curator needs to re-upload? Maybe name the split files according to the pattern {original-stem}-{internal-sheet-name}{original-suffix} (see pathlib for stem and suffix meanings), and leave the original file in place for reference?
Otherwise looks like it is going in the right direction.

I would also suggest splitting the file discovery and the splitting into two phases so that the second phase takes a list of files, because matching os.walk with the .xlsx suffix will produce unwanted results, e.g. because we don't want to do this to all xlsx files, but only a subset, so we will need to filter the files that we match in the first step.


tflite load model failed use static library, how to get the error info, now only ok or error code?

i have a tflite model with two type float and float16, run with gpu(use c++ interface). float run ok and both model run ok use python, but float16 failed when use c++ code at code: auto iRetCode = m_pDeeplabInterp->ModifyGraphWithDelegate(m_pGPUDelegate); but this only return one error code 1, but no any other information, i can't find any way to do more thing to check whether is model has ops not support by tflite or my convert pipeline has error.

can you share the model and the way you initialize & invoke the interpreter?

when use c++ to run tflite model<both c++ and python are tensorflow 2.1>, system has't any information or error message output, tflite::StderrReporter is not used for tflite system to output error information. so are there any way to output system error information like model load failed info, invoke error info, and any thing else.
i used tensorflow/lite/tools/make scripts to compiled static library and call model by ndk in android app, float32 or quant model all run ok. but float16 can't run, failed at m_pDeeplabInterp->AllocateTensors(). so is there any micro define or flags to enable float16 feature of tflite?

The error message may not be propagated in function definitions, but we print out details using context->ReportError() and this should be visible via adb logcat.  Well, at least that's how I get the details =/

sad to get nothing from adb logcat

@jdduke
Do you have guidance on how one can retrieve the TFLite context->ReportError()?

By default it should be routed to adb. Can you capture and send a bug report after you repro the issue? https://developer.android.com/studio/debug/bug-report


HARD: Add big elastic with staples to the track if it is long enough or 3 smaller in each track with staples around them

Doesn't work


TypeError - decode() argument 'encoding' must be str, not None

It seems slack just had a blip and returned some kind of error responses that did not feature the charset header. This broke in the SDK with:
TypeError - decode() argument 'encoding' must be str, not None

On this line:
https://github.com/slackapi/python-slackclient/blob/5a2c80eb78fa82c2805251a60bc3e0eccb0b1269/slack/web/base_client.py#L489
From the Sentry local-caputring I can see charset was None - in typing terms it's Optional[str] being used as a str.
Reproducible in:
Requires slack returning these unexpected responses, or simulating them
The Slack SDK version
2.9.1
Python runtime version
3.8.5
OS info
Linux
Steps to reproduce:
As above
Expected result:
Some kind of fallback decoding?
Actual result:
TypeError raised
Requirements
For general questions/issues about Slack API platform or its server-side, could you submit questions at https://my.slack.com/help/requests/new instead. :bow:
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Seeing same error with slackclient version 2.8.2, Python version 3.7.3

Thanks @adamchainz and @jalanb! It looks like Slack is having an intermitted issue right now.
I'm going to try to get a copy of the response headers and payload that is causing this issue in our SDK. If either of you have it one hand (@adamchainz maybe your Sentry issue has it logged) then I'd appreciate a copy (please scrub any confidential data). 🙏🏻
We can use the headers/payload to improve the error handling of the Python and Node SDKs.

We were trying to message Slack from deployment scripts, which use stackprint. and end of that traceback follows:
File "/opt/wwts/venvs/deployers/lib/python3.7/site-packages/slack/web/base_client.py", line 352, in _urllib_api_call
    266  def _urllib_api_call(
    267      self,
    268      *,
    269      token: str = None,
    270      url: str,
    271      query_params: Dict[str, str] = {},
    272      json_body: Dict = {},
    273      body_params: Dict[str, str] = {},
    274      files: Dict[str, io.BytesIO] = {},
    275      additional_headers: Dict[str, str] = {},
    276  ) -> SlackResponse:
 (...)
    348          if query_params:
    349              q = urlencode(query_params)
    350              url = f"{url}&{q}" if "?" in url else f"{url}?{q}"
    351
--> 352          response = self._perform_urllib_http_request(url=url, args=request_args)
    353          if response.get("body", None):
    ..................................................
     self = <slack.web.client.WebClient object at 0x7f624882c358>
     token = None
     url = 'https://www.slack.com/api/chat.postMessage'
     query_params = None
     Dict = typing.Dict
     json_body = {'text': '```$ __main__ soso --servers=sosotest```',
                  'username': 'build_bot',
                  'icon_emoji': ':computer:',
                  'channel': '********'}
     body_params = None
     files = None
     io.BytesIO = <class '_io.BytesIO'>
     additional_headers = {'Content-Type': 'application/json;charset=utf-8',
                           'Authorization': '********',
                           'User-Agent': 'Python/3.7.3 slackclient/2.8.2 Linux/3.10.0-
                           957.12.2.el7.x86_64'}
     SlackResponse = <class 'slack.web.slack_response.SlackResponse'>
     self._perform_urllib_http_request = <method 'BaseClient._perform_urllib_http_request' of <slack.
                                          web.client.WebClient object at 0x7f624882c358> base_client.p
                                          y:384>
     request_args = {'headers': {'Content-Type': 'application/json;charset=utf-8
                     ',
                                 'User-Agent': 'Python/3.7.3 slackclient/2.8.2 L
                     inux/3.10.0-957.12.2.el7.x86_64',
                                 'Authorization': '********'},
                     'data': {},
                     'params': None,
                     'files': None,
                     'json': {'text': '```$ __main__ soso --servers=sosotest```'
                     ,
                              'username': 'build_bot',
                              'icon_emoji': ':computer:',
                              'channel': '*******'}}
    ..................................................

File "/opt/wwts/venvs/deployers/lib/python3.7/site-packages/slack/web/base_client.py", line 483, in _perform_urllib_http_request
    384  def _perform_urllib_http_request(
    385      self, *, url: str, args: Dict[str, Dict[str, any]]
    386  ) -> Dict[str, any]:
 (...)
    479              # for compatibility with aiohttp
    480              resp["headers"]["Retry-After"] = resp["headers"]["retry-after"]
    481
    482          charset = e.headers.get_content_charset()
--> 483          body: str = e.read().decode(charset)  # read the response body here
    484          resp["body"] = body
    ..................................................
     self = <slack.web.client.WebClient object at 0x7f624882c358>
     url = 'https://www.slack.com/api/chat.postMessage'
     args = {'headers': {'Content-Type': 'application/json;charset=utf-8
             ',
                         'User-Agent': 'Python/3.7.3 slackclient/2.8.2 L
             inux/3.10.0-957.12.2.el7.x86_64',
                         'Authorization': '********},
             'data': {},
             'params': None,
             'files': None,
             'json': {'text': '```$ __main__ soso --servers=sosotest```'
             ,
                      'username': 'build_bot',
                      'icon_emoji': ':computer:',
                      'channel': '********'}}
     Dict = typing.Dict
     resp = {'status': 503,
             'headers': <http.client.HTTPMessage object at 0x7f6244152c1
             8>}
     charset = None
     body = b'{"text": "```$ __main__ soso --servers=sosotest```", "user
             name": "build_bot", "icon_emoji": ":computer:", "channel": "
             ********"}'
    ..................................................

---- (full traceback above) ----
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
File "/opt/wwts/clones/gitlab/bots/deployers/bots/apps/deploy/__main__.py", line 7, in <module>
    app.run()
File "/opt/wwts/clones/gitlab/bots/deployers/bots/apps/deploy_app.py", line 24, in run
    self._parse_args(inspect.currentframe().f_back)
File "/opt/wwts/clones/gitlab/bots/deployers/bots/apps/deploy_app.py", line 21, in _parse_args
    argv.parse_deploy_args(parser)
File "/opt/wwts/clones/gitlab/bots/deployers/tools/argv.py", line 110, in parse_deploy_args
    bots.build_bot.info(f'```$ {command_line()}```')
File "/opt/wwts/clones/gitlab/bots/deployers/tools/messaging/bots.py", line 95, in info
    self.log(template, *args)
File "/opt/wwts/clones/gitlab/bots/deployers/tools/messaging/bots.py", line 160, in log
    self.send(template, *args)
File "/opt/wwts/clones/gitlab/bots/deployers/tools/messaging/bots.py", line 63, in send
    self.api_send(message)
File "/opt/wwts/clones/gitlab/bots/deployers/tools/messaging/bots.py", line 74, in api_send
    icon_emoji=self.icon)
File "/opt/wwts/venvs/deployers/lib/python3.7/site-packages/slack/web/client.py", line 1041, in chat_postMessage
    return self.api_call("chat.postMessage", json=kwargs)
File "/opt/wwts/venvs/deployers/lib/python3.7/site-packages/slack/web/base_client.py", line 150, in api_call
    return self._sync_send(api_url=api_url, req_args=req_args)
File "/opt/wwts/venvs/deployers/lib/python3.7/site-packages/slack/web/base_client.py", line 248, in _sync_send
    additional_headers=headers,
File "/opt/wwts/venvs/deployers/lib/python3.7/site-packages/slack/web/base_client.py", line 352, in _urllib_api_call
    response = self._perform_urllib_http_request(url=url, args=request_args)
File "/opt/wwts/venvs/deployers/lib/python3.7/site-packages/slack/web/base_client.py", line 483, in _perform_urllib_http_request
    body: str = e.read().decode(charset)  # read the response body here

TypeError: decode() argument 1 must be str, not None

I'm going to try to get a copy of the response headers and payload that is causing this issue in our SDK. If either of you have it on hand...

I'm afraid I don't have any more info than I presented. But it's any response without the Content-Type header - the function being called is EmailMessage.get_content_charset (yes EmailMessage, Python reuses the logic for HTTP headers since they're the same) -  https://docs.python.org/3.8/library/email.message.html#email.message.EmailMessage.get_content_charset  - this returns None for no such header.

Btw it looks like the "happy path" would also have this problem, since it has identical lines for handling the charset + body:
https://github.com/slackapi/python-slackclient/blob/5a2c80eb78fa82c2805251a60bc3e0eccb0b1269/slack/web/base_client.py#L478-L479

Thanks for the details everyone! It seems like the unexpected response is:

Status Code 503
Undefined Content-Type header

@seratch do you feel that we need more information to improve the error handling for v2 and v3?

Thank you very much for reporting this issue (and we're sorry for the disruption due to the outage). The assumption where get_content_charset always returns a string seems to be obviously wrong.

@seratch do you feel that we need more information to improve the error handling for v2 and v3?

@mwbrooks We should resolve this issue in a new patch version for v2, plus in the latest beta for v3. I will check this issue later and work on the fix very soon.


Remove unused stuff from the game

This isn't Mari0: Alesan99's Entities, this is Super Mario Bros. CD for the PC!
Also why is GLaDOS still there?

semi-done


Masking policy with multiline statement updated every time

Provider Version
0.36
Describe the bug
When masking policy is created using multiline string, like this:
  masking_expression = <<EOF
        case
            when current_role() in ('ROLE_A') then
                val
            when is_role_in_session( 'ROLE_B' ) then
                'ABC123'
            else
                '******'
        end
    EOF

then it is updated each time.
The plan claim that it needs to replace case with the whole expression
Expected behavior
Plan should be empty when no change in masking expression is made.

It looks like when the masking policy is stored in snowflake, it will truncate newlines on the last line of text. If you wrap the multi-line string in a chomp, then terraform shows no difference.

Hi, I'm sorry for the late response. We've released v0.96.0, which includes adjusting and fixing row access policies. Please upgrade with the migration guide.

Closing the issue due to inactivity.


Question

Is there a way to inject css dependencies before the main css file in the head file?

If you mean that you want to insert the css file before in the dom, yes it is possible :
The files, by default, will be inserted before the last child of the head element. You can override this by using insertBefore: 'cssSelector':
$ocLazyLoad.load({
    name: 'TestModule',
    insertBefore: '#load_css_before',
    files: ['bower_components/bootstrap/dist/css/bootstrap.css']
});

Give an id to your style tag, and use this to insert before.

Would this work for style tag?

Sorry I meant link tag

Yes sure, you don't even need to use an id, you can use the src as an attribute if you want :)
Any css selector supported by angular (and jquery if you use it) will work.

This would be:
$ocLazyLoad.load({
  name: 'TestModule',
  insertBefore: '#load_before',
  files: ['bower_components/bootstrap/dist/css/bootstrap.css']
});

And if you use the href attribute:
$ocLazyLoad.load({
  name: 'TestModule',
  insertBefore: '[href="app/css/base.css"]',
  files: ['bower_components/bootstrap/dist/css/bootstrap.css']
});

Ok, when I involve resolve:, it seems not to work.

Can I plug it in into the config file?

Hmm no it's a load parameter only.

Ok, I figured it out.  I had a constant where I read all files needed to be loaded through a function.  Just modded that.  Thanks again. Great feedback as usual.

Anytime! :+1:


Pool Overview - Volume Number Handling

add a thousand separator (like in TVL) for the volume number

Same here (My Shares Detail view)


Are "MembersFlags" and "Flags" exactly the same?

What's the difference between "MembersFlags" and "Flags"? The descriptions are same for these two fields.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: bf25ecb4-4514-6967-a803-e0a951fa1511
Version Independent ID: 90b506aa-c3e1-c85b-85c7-09ccc6cd493d
Content: KSPROPERTY_MEMBERSHEADER (ks.h) - Windows drivers
Content Source: wdk-ddi-src/content/ks/ns-ks-ksproperty_membersheader.md
Product: windows-hardware
Technology: windows-devices
GitHub Login: @barrygolden
Microsoft Alias: bagold

Thanks @sun-xm, you have highlighted a probable error in the docs. I will open an internal work item to address this issue.
However, I would also recommend that you post your question in the following forums, where other driver developers and Microsoft engineers can be found.
Hardware and Application Developers on Q&A
NTDEV forum at OSR Online

Thanks @sun-xm, you have highlighted a probable error in the docs. I will open an internal work item to address this issue.
However, I would also recommend that you post your question in the following forums, where other driver developers and Microsoft engineers can be found.
Hardware and Application Developers on Q&A
NTDEV forum at OSR Online


sheets_and_friends doesn't currently have a method for modifying annotations

@mslarae13, I will be removing the Biosample slot_usages on MIxS terms. Everything besides the annotations will be implemented in sheets_and_friends
See https://docs.google.com/spreadsheets/d/1_TSuvEUX68g_o3r1d9wvOYMMbZ3vO4eluvAd2wNJoSU/edit#gid=826074070

class
slot
action
target
path
LinkML implementation notes
value

bioscales|soil
extreme_event

annotations:expected_value

date, string

bioscales|soil
fire

annotations:expected_value

date string

bioscales|soil
flooding

annotations:expected_value

date string

biofilm|bioscales|sediment|soil
water_content

annotations:expected_value

string

biofilm|bioscales|sediment|soil
water_content

annotations:preferred_unit

gram per gram or cubic centimeter per cubic centimeter

actually, there is a replace_annotation action


Adds method and optional status Labels to PrometheusBackend

Adds method and optional status labels to PrometheusBackend. At work, I was missing these labels out of the box. Having worked on-call in production for 3.5 years, I've found HTTP Methods and Status Codes to be valuable to understand running web services.
As a result, I opened this PR.
I completed the following for the observability/prometheus-backend project. I'm assuming CI/CD will run the overall compile and test.
Before submitting pull request:

[x] Check if the project compiles by running sbt compile
[x] Verify docs compilation by running sbt compileDocs
[x] Check if tests pass by running sbt test
[x] Format code by running sbt scalafmt

Thanks! I left some comments inline. We should probably make similar changes to the opentelemetry backend (either here or in a separate follow-up issue)

A few tests are still failing locally for me:
[info] PrometheusBackendTest:
[info] prometheus
[info] - should use default histogram name (120 milliseconds)
[info] - should allow creating two prometheus backends (2 milliseconds)
[info] - should use mapped request to histogram name (4 milliseconds)
[info] - should use mapped request to histogram name with labels and buckets (5 milliseconds)
[info] - should use mapped request to gauge name with labels (6 milliseconds)
[info] - should disable histograms (1 millisecond)
[info] - should use default gauge name *** FAILED *** (15 seconds, 111 milliseconds)
[info]   The code passed to eventually never returned normally. Attempted 107 times over 15.070412125 seconds. Last failure message: The Option on which value was invoked was not defined.. (PrometheusBackendTest.scala:165)
[info] - should use mapped request to gauge name *** FAILED *** (15 seconds, 95 milliseconds)
[info]   The code passed to eventually never returned normally. Attempted 106 times over 15.081156 seconds. Last failure message: The Option on which value was invoked was not defined.. (PrometheusBackendTest.scala:196)
[info] - should disable gauge *** FAILED *** (15 seconds, 94 milliseconds)
[info]   The code passed to eventually never returned normally. Attempted 107 times over 15.075386708 seconds. Last failure message: The Option on which value was invoked was not defined.. (PrometheusBackendTest.scala:228)
[info] - should use default counter name (46 milliseconds)
[info] - should not override user-supplied 'method' and 'status' labels (9 milliseconds)
[info] - should use default summary name (14 milliseconds)
[info] - should use error counter when http error is thrown (23 milliseconds)
[info] - should use failure counter when other exception is thrown (4 milliseconds)
[info] - should use success counter on success response (1 millisecond)

I'm suspicious that they are flaky, but I'll review again another day.

If anything stands out to you, @adamw, on the cause(s) of the failures on https://github.com/softwaremill/sttp/pull/1651#issuecomment-1374714854, let me know, please! Thanks

@kevinmeredith thanks!


backend-office add support for another language pack

hi
i am having troubles finding the correct files and folders for language pack translation, i am trying to translate to Portuguese but only found 2 files for translation .json which i created a new one for pt.json
but the full backend-office menus i have not found the files
also, the header.html i have added on the drop-down menu list the new language name definition ptbr... but after restart server nmp.. still only show up the 4 languages previously selected.
can you please guide me on which file and folder i need to play around for adding extra-language pack support

Hi Albert!
Please send us the translated string file and we will include it on the management system

hi please closing topic fixed language pack translation


corrects inaccuracies in truth tables for AND/OR

AND and OR operators do not take boolean data types as operands — they take boolean expressions, which can return UNKNOWN, but not NULL.

@NReilingh : Thanks for your contribution to the SQL documentation! The author, @barbkess, has been notified to review your proposed change.

@CarlRabeler can you please review.


clang: error: cannot specify -o when generating multiple output files (on Mac OSX)

Seems excluding .h file solves the problem and produces .so file.
 g++ -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -undefined dynamic_lookup -shared high_dim_filter.cc modified_permutohedral.cc -fPIC -I /Users/aub3/portenv/lib/python2.7/site-packages/tensorflow/include -O2 -o high_dim_filter.so

(portenv)COECISs-MacBook-Pro:crfasrnn_keras aub3$ python test_gradients.py
2017-08-10 00:52:39.321827: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-08-10 00:52:39.321853: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
Gradient check: measure1 = 0.000089, measure2 = 0.009579
Gradient check: success!
..
----------------------------------------------------------------------
Ran 2 tests in 0.968s

OK

Seems excluding .h fixes the issue when using clang.

This was fixed with https://github.com/sadeepj/crfasrnn_keras/commit/3779f294e3a8afe1b22641a81349f171d7bb7706. Thanks @AKSHAYUBHAT for reporting this and suggesting the fix.


need --admission-control=PersistentVolumeClaimResize flag to use VolumeResize

since kubernetes version 1.9 it seems to be possible to resize volumes on demand for this kind
of storage types

gcePersistentDisk
awsElasticBlockStore
OpenStack Cinder
glusterfs
rbd

To be able to use this feature you need to allow expanding PVCs by setting ExpandPersistentVolumes feature gate to true. Also, enable PersistentVolumeClaimResize admission plugin if you want to prevent resizing of all claims unless you enable resize in storage class.
If you are using AWS you will pay for that unused space even if you don't need it at the moment.  Manual resize is possible, but it isn't convenient.
Maybe the settings for the api-server can be part of the shoot-yaml. In this case, it is more flexible and even alpha features can be enabled for test purpose.
currently, it seems to fixed at https://github.com/gardener/kubify/blob/9904f72847b267092c8f123aca3a83355a8c9b75/basetemplates/manifests/kube-apiserver.yaml#L31
NOTE: Online resize support should be available in Kubernetes v1.11, and you won't need to recreate resources for file system resize.

All related: #254 (priority), #257 (Initializers), #258 (PodNodeSelector , PodTolerationRestriction), #259 (PersistentVolumeClaimResize).

FYI: Feature gates can already be tweaked in the shoot resource. What remains is the configuration of admission plugins.

FYI: https://github.com/gardener/gardener/blob/f6f8e2382143d9179d8ec13657515e46ffc97669/pkg/apis/garden/types.go#L984-L1058


chore: updating dependabot file to support gha and JS packages

Hi @WadeBarnes this is ready for review now.


chore(test): Ensure writeLogEntries is actually called on log write.

The test cases for log.write had their assertions within a manual logging service stub for writeLogEntries. If writeLogEntries was never invoked, these tests would still succeed. The refactor for the write test cases use sinon assertion patterns to avoid this scenario. Unit tests for the write suite should now read better, especially as the intention of each test has been refined too.
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[ ] Make sure to open an issue as a bug/issue before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[X] Ensure the tests and linter pass
[X] Code coverage does not decrease (if any source code was changed)
[X] Appropriate docs were updated (if necessary)

~Fixes #<issue_number_goes_here>~ no open issue for this 🦕

It looks good! I noticed one side effect, however, in regards to assertion failure output. Here's old vs. new:
it('should provide helpful output', () => {
  const obj1 = {a: 'b', c: 'd'};
  const obj2 = {a: 'b', c: 'e'};

  try {
    assert.deepStrictEqual(obj1, obj2);
  } catch (e) {
    console.log('assert.deepStrictEqual', e.message);
  }

  try {
    const spy = sinon.spy();
    spy(obj1);
    assert(spy.calledWithExactly(obj2));
  } catch (e) {
    console.log('sinon.spy', e.message);
  }
});

assert.deepStrictEqual Expected values to be strictly deep-equal:
+ actual - expected

  {
    a: 'b',
+   c: 'd'
-   c: 'e'
  }
sinon.spy The expression evaluated to a falsy value:

  assert(spy.calledWithExactly(obj2))

Is there something we could use that would provide more helpful messages in the event of a mismatch?

I noticed the unhelpful assertion failure output as well. Rewriting using chai would fix it, but would be medium-sized undertaking. Assertion messages would be an alternative, but IMO no more helpful than looking at the describe/it labels.

@bcoe @JustinBeckwith for thoughts on the output issue!


Time#zone returns the time zone used for time FAILED Expected "+03"  to equal "AST"

Hello!
What is wrong?
$ ruby -v /home/alex/Projects/ruby/mspec/bin/mspec-run core/time
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

1)
Time#zone returns the time zone used for time FAILED
Expected "+03"
 to equal "AST"

/home/alex/Projects/ruby/spec/core/time/zone_spec.rb:8:in `block (4 levels) in <top (required)>'
/home/alex/Projects/ruby/spec/core/time/zone_spec.rb:7:in `block (3 levels) in <top (required)>'
/home/alex/Projects/ruby/spec/core/time/zone_spec.rb:3:in `<top (required)>'
[/ | ==================100%================== | 00:00:00]      1F      0E

Finished in 0.077151 seconds

62 files, 503 examples, 9514 expectations, 1 failure, 0 errors, 0 tagged

Arch Linux:
$ uname -a
Linux Alex-ArchMainPC 4.9.11-1-ARCH #1 SMP PREEMPT Sun Feb 19 13:45:52 UTC 2017 x86_64 GNU/Linux

Europe/Moscow:
$ timedatectl
      Local time: Tue 2017-03-07 00:06:43 MSK
  Universal time: Mon 2017-03-06 21:06:43 UTC
        RTC time: Mon 2017-03-06 21:06:44
       Time zone: Europe/Moscow (MSK, +0300)
 Network time on: no
NTP synchronized: no
 RTC in local TZ: no

Ruby 2.4.0:
$ ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

The code is https://github.com/ruby/spec/blob/0fe99d24f4a17eaa39563623209747eee278c3d1/core/time/zone_spec.rb#L6-L9
So I guess your system timezone information does not know the Asia/Kuwait zone?

@eregon I also thought so, but…
$ cat /usr/share/zoneinfo/Asia/Kuwait
TZif2��6�+�*0LMT+03TZif2������6�+�*0LMT+03
<+03>-3

I have a slightly different version of that file:
cat /usr/share/zoneinfo/Asia/Kuwait
TZif2��6�+�*0LMTASTTZif2������6�+�*0LMTAST
AST-3

So it looks like yours does not have the AST shortname in it.
Maybe we should just use America/New_York => 'EST' for everything, would that work on your system?

@AlexWayfer I pushed a fix, could you check it works for you?
Thank you for the report!

@eregon Everything is perfect, thanks!

Wow, has USA abolished DST?:tada:


First touch to after reordering is being ignored

After reordering a cell, my first touch to select a cell is completely ignored, and didSelectRowAt does not fire. Only once I touch the cell again for a second time does didSelectRowAt gets called.
I did a dirty workaround by grabbing the gesture recognizer and setting cancelsTouchesInView to false, like so:
let gestureRecognizer = tableView.gestureRecognizers?.last   gestureRecognizer?.cancelsTouchesInView = false
I should add that my table view is within a UIView within a container view. Whether or not that makes a difference, I am not sure.
Should I submit a pull request that automatically sets this value in ReorderController?

Sure – if you're willing to do that, I'll take a look at it and do some testing as well.

Resolved by #36


Speed up build

This should speed up the build! Merge it if you like, @JasonLG1979

Don't send .git folder, since it's a massive context to Dockerfile
Run cargo with --jobs flag matching number of processors on machine

Right on thanks @dtcooper!!!


Use file service to listen to changes

Re #40533
Use file service to listen to changes

@bpasero I need a method in FileChangeEvent to check if given resource is changed or not. Updated FileChangeEvent.contains method to take change type as optional.

@bpasero Updated with your suggestion. Merging it.


Feature request

Hello. Is it possible to add functionality related to "Results" field?
if trivy json.stdout.result is empty - do not send a notification.
This will prevent a lot of noise.
PS. Thanks for the GitHub env wrapper.

This sounds like a reasonable change and it should probably be the default behaviour. 👍
Maybe it can be made possible to opt in via a --sth cli argument. I can take a stab at it.

I released a new version. Now, there has to be a "Results" key in the scan result as a default.
It is possible to opt-in via --send-always.
All still rough around the edges. There should be some tests covering this.
This should reduce the noice for now ;)

Hello @madflow
Cool.
It works as expected.
Thank you.
Tested, Closed :)

There seems to be more work, that has to be done. At least for vuln scanning. I only tested this with an "empty" directory with no dependencies. There can be "Results" - but no actual scanning results.
https://github.com/madflow/trivy-plugin-notify/issues/15


Network docs

This PR merges the network tests bringing code coverage up to 92% in network and 86% globally.  We need to discuss test runtime for the network based point pattern analysis methods.  I suspect that testing those is better deferred and placed into a point pattern module.

Coverage decreased (-4.13%) to 79.66% when pulling 6a4b1bbf29d18ea13046aad122c3666097721e7f on network_docs into 3beadc68a090dfb1cceaca244e6b1cc3ccd80ed7 on master.


"ENSURE: empty page must be defined as empty type" when adding and removing from collections simultaneously

LiteDB 5.0.17, Windows 11, .NET6
I have DB with 2 collections. 3 threads are working with this DB in parallel. The first thread adds documents to the first collection. The second thread adds documents to the second collection. The third thread removes all documents from one of these collections.
In such a scenario, I get "ENSURE: empty page must be defined as empty type" error.
I debugged it for version 5.0.17 and have found 2 different reasons for this problem. I see that it is also reproducible in 5.0.20, and seems that reproducible even much more often.
Here I share my observations.

Problems are related with the header page. This page does not belong to any specific collection and could be accessible (read and written) from different transactions.
To reproduce the problem we need to work with more than 1 collection. If we modify single collection from multiple transactions, the problem is not reproducible, because collection is locked by the first transaction that modifies this collection. This lock prevents access to the collection pages as well as to the header page.
But if we work with multiple collections, these locks don't help to synchronize access to the header page. To solve this problem LiteDB has lock on _header variable. But this lock is used not in all places where header page is accessed (and even modified). And here comes the first source of the problem.
The problem generally is related to _header.FreeEmptyPageList property. This property references first free page which could be retrieved to be used. In the linked-list fashion it has reference on the next free page, and so on. When we take page form this list, we need to set _header.FreeEmptyPageList to reference to the next free page.
So problem happens in TransactionService.PersistDirtyPages(). Here we modify header twice, but lock is taken only in one place. The problem is that following 2 lines are not in the lock:
page.Item.NextPageID = _header.FreeEmptyPageList;
_header.FreeEmptyPageList = _transPages.FirstDeletedPageID;
PersistDirtyPages is called on Commit and on Safepoint. In case of commit, we execute the 2 lines above. They are actually adding new page to the free page list. And this code comes into race conditions with Snapshot.NewPage(), where we take free page to be used for index or data. What happens here, is following (due to the lack of synchronization):

PersistDirtyPages wants to add some page to the list of empty page. So it calls page.Item.NextPageID = _header.FreeEmptyPageList to make this page reference the current free page list head.
Right after that Snapshot.NewPage() takes page from the free list (it is needed for some Insert operation) and calls this: _header.FreeEmptyPageList = free.NextPageID. Essentially it removes "free" page from the free page list.
After that, PersistDirtyPages() executes next line: _header.FreeEmptyPageList = _transPages.FirstDeletedPageID. It adds pages released by transaction to the free page list. Last page in this list has NextPageID set to the previously available free list head page (see step 1). So in fact it returns page back to the free page list (because last of the newly added free pages now references this page as NextPageID, and ignores changes made in step 2).
Finally all free pages that are going after this conflicting page will be lost, because Snapshot.NewPage() executes: free.NextPageID = uint.MaxValue.

As a result we have the same page to be used for index/data and to be present in the free page list. Code that acquired this page (step 2) sets its type to Index, Data, or maybe something else. But when some time later some other branch of execution wants to acquire this page from the free page list, it turns out, that it has type Index or Data, and so we get "ENSURE: empty page must be defined as empty type".
Theoretically, we could solve this problem by locking these 2 lines by _header. But it seems to be even more safe to lock whole block of PersistDirtyPages code that has access to _header, to make all access to the _header atomic. I have found that this was already done in code earlier, but was removed with the commit 3acd00377618f35f9e17e289a3a3d3039dbd2e14 (commit message was "Remove debug log and fix transaction log"). It was part of the implementation of a new transaction approach. Probably there were some reasons to do this exact change, but maybe that "reason" should be solved in some other way, because for me it looks like this lock is really needed.
But when we come to the second source of the problem, I will show that this lock should be moved even higher in the call hierarchy - to the Commit function itself.

There is also second source of this ENSURE error. It is related to the fact that header page is not part of any transaction and snapshot, while index and data pages are.
When one transaction adds page to the _header.FreeEmptyPageList on commit, all transactions immediately see this page and may try to acquire it when they need new index or data page. However problem is that in WAL index we may have different versions of each page. And each transaction may have its own Snapshot of the pages belonging to some collection. And each snapshot has _readVersion field, which specifies maximum version of the page in WAL index which could be used. When Snapshot.ReadPage() calls _walIndex.GetPageIndex(), it passes its _readVersion value, and so it can get only version of the page that is not newer than _readVersion. And this older version of the page may have type "Index" or "Data", and not "Empty".
So in other words: in transaction-independent header page we see that page is already free (it is assigned to _header.FreeEmptyPageList), but transaction only sees old version of the page which doesn't have "Empty" type. That's why acquiring this page causes "ENSURE: empty page must be defined as empty type".
To solve this problem we just need to take latest version of the page if we are acquiring new page, and not take into account Snapshot._readVersion.

It turned out, that during Commit operation TransactionService.PersistDirtyPages() should be executed as atomic operation together with _walIndex.ConfirmTransaction(). This will ensure that page that is added to _header.FreeEmptyPageList (by PersistDirtyPages) will get new version added to WalIndex. So that next operation which wants to acquires free page will both see this page in _header.FreeEmptyPageList and see its last version in WalIndex. Otherwise race conditions sometimes cause Snapshot.NewPage() to not see new version of the page in the WAL index even after this page is added to free page list.
Also, all changes to the header page which are done in TransactionService.PersistDirtyPages() are done only in the situation when commit is perfromed and when _transPages.HeaderChanged.
According to all this, it makes most sense to remove all header locks from TransactionService.PersistDirtyPages() and add header lock to the whole if-body of the Commit function (inside if (_mode == LockMode.Write || _transPages.HeaderChanged)).

I attach sample program to reproduce the problem. Also I will create PR with all the fixes described here.
It is still possible that there will be even more problems in the latest version which didn't exist in 5.0.17 which I was debugging.
Program5.zip

Hi @oleksii-datsiuk, firstly I would like to thank you so much for your observations and such detailed analysis about LiteDB. In the last few weeks I managed to organize a small team and we are revisiting and correcting the main problems. And this, certainly, is one of the most important bugs that LiteDB has: corrupting in environments and situations that I cannot simulate.
I planned LiteDB 5 to support multiple writing transactions, but only 1 per collection. The header is a very specific page and different from the others because it has a single instance in memory (although it is also stored in the log). I confess that it was a risky option, but I believed it was possible and made sense, since all data (except the header) has its own unique pages and does not communicate with each other. Today, when I think about it again, I believe that a good write lock system per database (without preventing anyone from reading) would be enough for the general use of LiteDB.
I saw that you created a pull request and I will look into it and get back to you.
Thanks for the effort