Cannot get LaraParse started (working) for user authentication

I am new to parse and am trying to get this working in my laravel site. I am running 5.1.7 and followed the install steps and tried to use the out-of-the-box methods in the registersUsers.php middleware to get the data sent to parse. after seeing that not work, I added this to the postRegister function:
$user = new ParseUser();
$user->set("username", $request['user_name']);
$user->set("password", $request['password']);
$user->set("arcardz_id", $request['arcardz_id']);
    try {
      $user->signUp();
      // Hooray! Let them use the app now.
    } catch (ParseException $ex) {
      // Show the error message somewhere and let the user try again.
      return("Error: " . $ex->getCode() . " " . $ex->getMessage());
    }

this did not work either. There is no error thrown and a return of $request['user_name'] and others returns the correct data. What am I doing wrong here?

without seeing all the code, here's a few things to check:

have you set your auth provider to 'parse' in the auth config file?
have you updated your model in the auth config file? if you aren't extending the User class, then it should be LaraParse\Subclasses\User
in your postRegister function you should be creating a new LaraParse\Subclasses\User not ParseUser. Remember you're creating a new User in your application, and the library will take care of interacting with the storage system (in this case Parse)

What exception are you seeing?

Ok, so looking at what you said, it looks like I am doing everything
incorrectly. Can you please outline how to get this setup the correct way?
there was no mention of interacting with models in the setup instructions.
I went to the RegistersUsers.php trait after tracing the calls in laravel
back to where it attempts to login the user. Please see my attached files
containing my user model, RegistersUsers.php trait file, my AuthController,
my routes.php file, and my view, register.blade.php.
I have never used parse before and am trying to learn as I go. I am
familiar with the front-end of laravel and starting to become dangerous
with the back-end section of laravel. Any help on getting started would be
greatly appreciated!
Sincerely,
Marc Tanne
On Wed, Sep 23, 2015 at 2:14 AM, nicklee1990<EMAIL_ADDRESS>wrote:

without seeing all the code, here's a few things to check:

have you set your auth provider to 'parse' in the auth config file?
have you updated your model in the auth config file? if you aren't
extending the User class, then it should be LaraParse\Subclasses\User
in your postRegister function you should be creating a new
LaraParse\Subclasses\User not ParseUser. Remember you're creating a new
User in your application, and the library will take care of interacting
with the storage system (in this case Parse)

What exception are you seeing?
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-142537069
.

to answer your questions:

yes
no it is currently showing app\user::class
I do not understand what you mean. I am going to research subclasses now.

On Wed, Sep 23, 2015 at 10:20 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

Ok, so looking at what you said, it looks like I am doing everything
incorrectly. Can you please outline how to get this setup the correct way?
there was no mention of interacting with models in the setup instructions.
I went to the RegistersUsers.php trait after tracing the calls in laravel
back to where it attempts to login the user. Please see my attached files
containing my user model, RegistersUsers.php trait file, my AuthController,
my routes.php file, and my view, register.blade.php.
I have never used parse before and am trying to learn as I go. I am
familiar with the front-end of laravel and starting to become dangerous
with the back-end section of laravel. Any help on getting started would be
greatly appreciated!
Sincerely,
Marc Tanne
On Wed, Sep 23, 2015 at 2:14 AM, nicklee1990<EMAIL_ADDRESS>wrote:

without seeing all the code, here's a few things to check:

have you set your auth provider to 'parse' in the auth config file?
have you updated your model in the auth config file? if you aren't
extending the User class, then it should be LaraParse\Subclasses\User
in your postRegister function you should be creating a new
LaraParse\Subclasses\User not ParseUser. Remember you're creating a new
User in your application, and the library will take care of interacting
with the storage system (in this case Parse)

What exception are you seeing?
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-142537069
.

well the readme assumes you have an \App\User model which is the default in auth settings and it advises that you should extend LaraParse\Subclasses\User. Basically in your User model, just put
class User extends LaraParse\Subclasses\User{
//code
}

I can't see your attached files? but here's some code that should work i think:
public function __construct(Guard $auth,  \LaraParse\Auth\Registrar $registrar, User $user)
{
    $this->auth = $auth;
    $this->registrar = $registrar;
    $this->user = $user;
    $this->middleware('guest', ['except' => 'getLogout']);
}

/**
 * Handle a login request to the application.
 *
 * @param  \Illuminate\Http\Request $request
 * @return \Illuminate\Http\Response
 */
public function postLogin(Request $request)
{
    $this->validate($request, [
        'email' => 'required|email',
        'password' => 'required',
    ]);

    $credentials = $request->only('email', 'password');

    if ($this->auth->attempt($credentials, $request->has('remember_token'))) {
        return redirect()->intended($this->redirectPath());
    }

    return redirect($this->loginPath())
        ->withInput($request->only('email', 'remember_token'))
        ->withErrors([
            'email' => $this->getFailedLoginMessage(),
        ]);
}

 /**
 * @param Request $request
 * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
 */
public function postRegister(Request $request)
{
    $validator = $this->registrar->validator($request->all());

    if ($validator->fails()) {
        $this->throwValidationException(
            $request, $validator
        );
    }

    $this->auth->login($this->registrar->create($request->all()));

    return redirect()->intended($this->redirectPath());
}

ok, so should I delete the current class User extends Model implements
AuthenticatebleContract, CanResetPasswordContract{}?
To confirm, the code you sent me goes in side the class User extends
LaraParse\Subclasses\User{}?
On Wed, Sep 23, 2015 at 10:31 AM, nicklee1990<EMAIL_ADDRESS>wrote:

well the readme assumes you have an \App\User model which is the default
in auth settings and it advises that you should extend
LaraParse\Subclasses\User. Basically in your User model, just put
class User extends LaraParse\Subclasses\User{
//code
}
I can't see your attached files? but here's some code that should work i
think:
public function __construct(Guard $auth,  \LaraParse\Auth\Registrar $registrar, User $user)
{
$this->auth = $auth;
$this->registrar = $registrar;
$this->user = $user;
$this->middleware('guest', ['except' => 'getLogout']);
}
/**

Handle a login request to the application.

@param  \Illuminate\Http\Request $request

@return \Illuminate\Http\Response
*/
public function postLogin(Request $request)
{
$this->validate($request, [
'email' => 'required|email',
'password' => 'required',
]);
$credentials = $request->only('email', 'password');
if ($this->auth->attempt($credentials, $request->has('remember_token'))) {
return redirect()->intended($this->redirectPath());
}
return redirect($this->loginPath())
->withInput($request->only('email', 'remember_token'))
->withErrors([
'email' => $this->getFailedLoginMessage(),
]);
}

/**

@param Request $request

@return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function postRegister(Request $request)
{
$validator = $this->registrar->validator($request->all());
if ($validator->fails()) {
$this->throwValidationException(
$request, $validator
);
}
$this->auth->login($this->registrar->create($request->all()));
return redirect()->intended($this->redirectPath());
}

—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-142673241
.

let me share the files with you in drive

RegistersUsers.php
https://drive.google.com/file/d/0B_Gko_M4eE0wenFuaEE5eldqOGtyVE05b3BnR2lGWDhXVG1J/view?usp=drive_web

AuthController.php
https://drive.google.com/file/d/0B_Gko_M4eE0wNXY1RTlvdFM2WUhmMlBLVm5obVVGUkU3bEp3/view?usp=drive_web

routes.php
https://drive.google.com/file/d/0B_Gko_M4eE0wUGg4YUx4ZHNWelplNE9HenI5TExTWVBhT0dV/view?usp=drive_web

User.php
https://drive.google.com/file/d/0B_Gko_M4eE0wY2RqODRQQXZvYXk4cE5VMjlMUmhuRHlJVzlz/view?usp=drive_web

register.blade.php
https://drive.google.com/file/d/0B_Gko_M4eE0wa05JSVRhM21Vdkw4THVQN3JwdmdwYzFsQmpr/view?usp=drive_web

On Wed, Sep 23, 2015 at 10:42 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, so should I delete the current class User extends Model implements
AuthenticatebleContract, CanResetPasswordContract{}?
To confirm, the code you sent me goes in side the class User extends
LaraParse\Subclasses\User{}?
On Wed, Sep 23, 2015 at 10:31 AM, nicklee1990<EMAIL_ADDRESS>wrote:

well the readme assumes you have an \App\User model which is the default
in auth settings and it advises that you should extend
LaraParse\Subclasses\User. Basically in your User model, just put
class User extends LaraParse\Subclasses\User{
//code
}
I can't see your attached files? but here's some code that should work i
think:
public function __construct(Guard $auth,  \LaraParse\Auth\Registrar $registrar, User $user)
{
$this->auth = $auth;
$this->registrar = $registrar;
$this->user = $user;
$this->middleware('guest', ['except' => 'getLogout']);
}
/**

Handle a login request to the application.

@param  \Illuminate\Http\Request $request

@return \Illuminate\Http\Response
*/
public function postLogin(Request $request)
{
$this->validate($request, [
'email' => 'required|email',
'password' => 'required',
]);
$credentials = $request->only('email', 'password');
if ($this->auth->attempt($credentials, $request->has('remember_token'))) {
return redirect()->intended($this->redirectPath());
}
return redirect($this->loginPath())
->withInput($request->only('email', 'remember_token'))
->withErrors([
'email' => $this->getFailedLoginMessage(),
]);
}

/**

@param Request $request

@return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
*/
public function postRegister(Request $request)
{
$validator = $this->registrar->validator($request->all());
if ($validator->fails()) {
$this->throwValidationException(
$request, $validator
);
}
$this->auth->login($this->registrar->create($request->all()));
return redirect()->intended($this->redirectPath());
}

—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-142673241
.

just modify User.php to extend  LaraParse\Subclasses\User
Then the big chunk of code i pasted goes in your AuthController

the code you sent me. Does it replace the existing code in the auth
controller?
On Thu, Sep 24, 2015 at 5:54 AM, nicklee1990<EMAIL_ADDRESS>wrote:

just modify User.php to extend LaraParse\Subclasses\User
Then the big chunk of code i pasted goes in your AuthController
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-142918988
.

it looks like the code in the auth controller is for a different class. I
first implemented it in the user model. that did not work. I got an illegal
offset error in the parse object. I will try this and let you know what
happens. Thanks again for all of your help. I cannot express enough to you
how much this means to me!
On Thu, Sep 24, 2015 at 11:05 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

the code you sent me. Does it replace the existing code in the auth
controller?
On Thu, Sep 24, 2015 at 5:54 AM, nicklee1990<EMAIL_ADDRESS>wrote:

just modify User.php to extend LaraParse\Subclasses\User
Then the big chunk of code i pasted goes in your AuthController
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-142918988
.

Hi NickLee,
I have worked with another developer on my team and tried to implement what
you have said. We are still getting errors.
Are you sure your code is supposed to be dropped in the AuthController?
We dropped the code in the user.php model and got closer to what we want.
We are still getting errors on the constructor:
Argument 1 passed to App\User::__construct() must be an instance of
App\Guard, none given, called in /Users/Marc/Sites/
local.arcardz.com/app/Http/Controllers/Auth/AuthController.php on line 60
and defined
I feel like we are missing a fundamental step here to get this working. At
this phase, I am trying to get a new user to save to our parse DB. Here are
our updated files:
Sincerely,
Marc Tanne
On Thu, Sep 24, 2015 at 11:06 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

it looks like the code in the auth controller is for a different class. I
first implemented it in the user model. that did not work. I got an illegal
offset error in the parse object. I will try this and let you know what
happens. Thanks again for all of your help. I cannot express enough to you
how much this means to me!
On Thu, Sep 24, 2015 at 11:05 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

the code you sent me. Does it replace the existing code in the auth
controller?
On Thu, Sep 24, 2015 at 5:54 AM, nicklee1990<EMAIL_ADDRESS>wrote:

just modify User.php to extend LaraParse\Subclasses\User
Then the big chunk of code i pasted goes in your AuthController
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-142918988
.

ok, so let's try it this way.
step 1. Update your auth config to have the driver set as Parse.
step 2. Update your auth config to have the model set as:
 use LaraParse\SubClasses\User;

step 3. Add the code from above into your AuthController (deleting any methods already there with the same name.
Paste any exception you get here.

ok, to confirm, you wanted me to alter the auth.php file under the config
folder:
I am now getting a Failed to load resource: the server responded with a
status of 500 (Internal Server Error)
On Thu, Sep 24, 2015 at 4:34 PM, nicklee1990<EMAIL_ADDRESS>wrote:

ok, so let's try it this way.
step 1. Update your auth config to have the driver set as Parse.
step 2. Update your auth config to have the model set as:
use LaraParse\SubClasses\User;
step 3. Add the code from above into your AuthController (deleting any
methods already there with the same name.
Paste any exception you get here.
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-143079859
.

If I do not change the model delcaration in auth.php (change driver to
parse) and load the page, I get this error:
FatalErrorException in AuthController.php line 71:Cannot declare class
App\Http\Controllers\Auth\User because the name is already in use
On Thu, Sep 24, 2015 at 4:45 PM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, to confirm, you wanted me to alter the auth.php file under the config
folder:
I am now getting a Failed to load resource: the server responded with a
status of 500 (Internal Server Error)
On Thu, Sep 24, 2015 at 4:34 PM, nicklee1990<EMAIL_ADDRESS>wrote:

ok, so let's try it this way.
step 1. Update your auth config to have the driver set as Parse.
step 2. Update your auth config to have the model set as:
use LaraParse\SubClasses\User;
step 3. Add the code from above into your AuthController (deleting any
methods already there with the same name.
Paste any exception you get here.
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-143079859
.

what is the actual exception when you get the 500 error and have set the model in your auth config? check your laravel logs

check your use statements at the top of your Auth Controller. I imagine you've already include a class called User. if so just delete that use statement, or at least but 'as AppUser' or something just while you try to get it to work

ok, will do. Let me do that and I will let you know what happens.
On Fri, Sep 25, 2015 at 4:14 AM, nicklee1990<EMAIL_ADDRESS>wrote:

check your use statements at the top of your Auth Controller. I imagine
you've already include a class called User. if so just delete that use
statement, or at least but 'as AppUser' or something just while you try to
get it to work
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-143189317
.

ok, so I did not have any use statements declaring App\User
I tried to rename the user class you declared and that stopped the error
but it still did not work.
I began looking at the parseUser.php file and found the signUp() method. I
got it to hit the DB once, but then I got a Guard error.
I reverted the code and attached my authController.php to show you the
code. with the code like this, it throws the same error:
FatalErrorException
in/Users/Marc/Sites/local.arcardz.com/app/Http/Controllers/Auth/AuthController.php
line 74:Cannot declare class App\Http\Controllers\Auth\User because the
name is already in use

in AuthController.php line 74

If you have any time, can we skype or gchat? I think that will help stop
this back-and-forth. Thanks again!

AuthController.php
https://drive.google.com/file/d/0B_Gko_M4eE0wMm5WcFItU29wNGs/view?usp=drive_web

On Fri, Sep 25, 2015 at 11:37 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, will do. Let me do that and I will let you know what happens.
On Fri, Sep 25, 2015 at 4:14 AM, nicklee1990<EMAIL_ADDRESS>wrote:

check your use statements at the top of your Auth Controller. I imagine
you've already include a class called User. if so just delete that use
statement, or at least but 'as AppUser' or something just while you try to
get it to work
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-143189317
.

ok, Looking back at the train of messages I see I misunderstood you. I
placed the functions in the authController and extended  the model as you
mentioned. this is now what the error message displays as:
ReflectionException in Container.php line 790:Class
App\Http\Controllers\Auth\Guard does not exist
On Fri, Sep 25, 2015 at 12:19 PM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, so I did not have any use statements declaring App\User
I tried to rename the user class you declared and that stopped the error
but it still did not work.
I began looking at the parseUser.php file and found the signUp() method. I
got it to hit the DB once, but then I got a Guard error.
I reverted the code and attached my authController.php to show you the
code. with the code like this, it throws the same error:
FatalErrorException in/Users/Marc/Sites/local.arcardz.com/app/Http/Controllers/Auth/AuthController.php
line 74:Cannot declare class App\Http\Controllers\Auth\User because the
name is already in use

in AuthController.php line 74

If you have any time, can we skype or gchat? I think that will help stop
this back-and-forth. Thanks again!

AuthController.php
https://drive.google.com/file/d/0B_Gko_M4eE0wMm5WcFItU29wNGs/view?usp=drive_web

On Fri, Sep 25, 2015 at 11:37 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, will do. Let me do that and I will let you know what happens.
On Fri, Sep 25, 2015 at 4:14 AM, nicklee1990<EMAIL_ADDRESS>wrote:

check your use statements at the top of your Auth Controller. I imagine
you've already include a class called User. if so just delete that use
statement, or at least but 'as AppUser' or something just while you try to
get it to work
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-143189317
.

Hey man,
I teamed up with my lead developer and we got it working. Thanks for all
your help!
On Fri, Sep 25, 2015 at 3:50 PM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, Looking back at the train of messages I see I misunderstood you. I
placed the functions in the authController and extended  the model as you
mentioned. this is now what the error message displays as:
ReflectionException in Container.php line 790:Class
App\Http\Controllers\Auth\Guard does not exist
On Fri, Sep 25, 2015 at 12:19 PM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, so I did not have any use statements declaring App\User
I tried to rename the user class you declared and that stopped the error
but it still did not work.
I began looking at the parseUser.php file and found the signUp() method.
I got it to hit the DB once, but then I got a Guard error.
I reverted the code and attached my authController.php to show you the
code. with the code like this, it throws the same error:
FatalErrorException in/Users/Marc/Sites/local.arcardz.com/app/Http/Controllers/Auth/AuthController.php
line 74:Cannot declare class App\Http\Controllers\Auth\User because the
name is already in use

in AuthController.php line 74

If you have any time, can we skype or gchat? I think that will help stop
this back-and-forth. Thanks again!

AuthController.php
https://drive.google.com/file/d/0B_Gko_M4eE0wMm5WcFItU29wNGs/view?usp=drive_web

On Fri, Sep 25, 2015 at 11:37 AM, Marc Tanne<EMAIL_ADDRESS>wrote:

ok, will do. Let me do that and I will let you know what happens.
On Fri, Sep 25, 2015 at 4:14 AM, nicklee1990<EMAIL_ADDRESS>wrote:

check your use statements at the top of your Auth Controller. I imagine
you've already include a class called User. if so just delete that use
statement, or at least but 'as AppUser' or something just while you try to
get it to work
—
Reply to this email directly or view it on GitHub
https://github.com/HipsterJazzbo/LaraParse/issues/36#issuecomment-143189317
.

no problem, glad its working for you now

Hello Dear @nicklee1990
I followed your instructions that you mentioned here , am also working with laraParse provider .
I am trying to login with exist users on my parse User table but the login failed and I am getting this message
These credentials do not match our records.
Note : registration work fine
thanks

Hi @nicklee1990, im almost finishing the installation of laraparse. below i share with you the code of my AuthController.php class.
when typing ../auth/login, im getting:
BadMethodCallException in Controller.php line 283:
Method [getLogin] does not exist.
Thanks in advance!
Damian
<?php

namespace App\Http\Controllers\Auth;

use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;

// use LaraParse\Auth\Subclasses\User;
use Illuminate\Auth\Guard;

class AuthController extends Controller
{
    public function __construct(Guard $auth,  \LaraParse\Auth\Registrar $registrar, User $user)
{
    $this->auth = $auth;
    $this->registrar = $registrar;
    $this->user = $user;
    $this->middleware('guest', ['except' => 'getLogout']);
}

/**
 * Handle a login request to the application.
 *
 * @param  \Illuminate\Http\Request $request
 * @return \Illuminate\Http\Response
 */
public function postLogin(Request $request)
{
    $this->validate($request, [
        'email' => 'required|email',
        'password' => 'required',
    ]);

    $credentials = $request->only('email', 'password');

    if ($this->auth->attempt($credentials, $request->has('remember_token'))) {
        return redirect()->intended($this->redirectPath());
    }

    return redirect($this->loginPath())
        ->withInput($request->only('email', 'remember_token'))
        ->withErrors([
            'email' => $this->getFailedLoginMessage(),
        ]);
}

 /**
 * @param Request $request
 * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
 */
public function postRegister(Request $request)
{
    $validator = $this->registrar->validator($request->all());

    if ($validator->fails()) {
        $this->throwValidationException(
            $request, $validator
        );
    }

    $this->auth->login($this->registrar->create($request->all()));

    return redirect()->intended($this->redirectPath());
}
}

You need to use the traits which contain these methods. At the top of your class put use AuthenticatesAndRegistersUsers

El 9 ene 2016, a las 6:22, Damian Marcos<EMAIL_ADDRESS>escribió:
Hi @nicklee1990, im almost finishing the installation of laraparse. below i share with you the code of my AuthController.php class.
when typing ../auth/login, im getting:
BadMethodCallException in Controller.php line 283:
Method [getLogin] does not exist.
Thanks in advance!
Damian
auth = $auth;
    $this->registrar = $registrar;
    $this->user = $user;
    $this->middleware('guest', ['except' => 'getLogout']);
}

/**
 * Handle a login request to the application.
 *
 * @param  \Illuminate\Http\Request $request
 * @return \Illuminate\Http\Response
 */
public function postLogin(Request $request)
{
    $this->validate($request, [
        'email' => 'required|email',
        'password' => 'required',
    ]);

    $credentials = $request->only('email', 'password');

    if ($this->auth->attempt($credentials, $request->has('remember_token'))) {
        return redirect()->intended($this->redirectPath());
    }

    return redirect($this->loginPath())
        ->withInput($request->only('email', 'remember_token'))
        ->withErrors([
            'email' => $this->getFailedLoginMessage(),
        ]);
}

 /**
 * @param Request $request
 * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
 */
public function postRegister(Request $request)
{
    $validator = $this->registrar->validator($request->all());

    if ($validator->fails()) {
        $this->throwValidationException(
            $request, $validator
        );
    }

    $this->auth->login($this->registrar->create($request->all()));

    return redirect()->intended($this->redirectPath());
}
}

—
Reply to this email directly or view it on GitHub.

But its already there!
This is what i have at the top of my AuthController.php class.
namespace App\Http\Controllers\Auth;

use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use AuthenticatesAndRegistersUsers;
use Illuminate\Auth\Guard;

I had changed the driver to parse, and the model is 'model' =>  LaraParse\Subclasses\User::class.
If i do what you say, this happens:
Cannot use AuthenticatesAndRegistersUsers as AuthenticatesAndRegistersUsers because the name is already in use
Then, i comment the line use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
BadMethodCallException in Controller.php line 283:
Method [getLogin] does not exist.
Which is exactly the trait i have to include? I couldn't find any AuthenticatesAndRegistersUsers class inside laraparse...
Thank you very much for your help!

no what you had was correct
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;

that's just importing/aliasing the file (http://php.net/manual/en/language.namespaces.importing.php). AuthenticatesAndRegistersUsers is a Trait that is included in the base installation of laravel, so your auth controller has to actually use the trait
class AuthController extends Controller
{
        use AuthenticatesAndRegistersUsers, ThrottlesLogins;

// Rest of your class

PHP Traits - http://php.net/manual/en/language.oop5.traits.php


When there are 0.0% vans in startyear it is not possible to 'add' them

Example: In the dataset for Aarhus no vans were added. If you change the applications of freight transport from trucks to vans, nothing shows up in the graph even thought the energy demand for trucks declines.

@Charlottevm well-spotted! This is the same issue we have encountered before in the industry: https://github.com/quintel/etlocal/issues/378
I think the same solution would apply here:

This should be fixed by setting one slider to 100% by default when the sub sector demand is 0. For the steel industry for example the blast furnace slider is set to 100% if there is no steel production.

We would therefore have to make sure that for each transport technology one of the shares falls back to 100%. Below you can see for Aarhus that all the shares are 0%. For Slovakia the same issue occurs for inland shipping.


[sourcekitd] Remove XPCTracing

This code was an experiment in how to collect information after a crash,
that did not end up being used.  It's unclear how much it has bitrotted
at this point, since it has no tests and was not designed with automated
testing in mind.  Parts of it interfere with some changes I want to make
to the underlying tracing mechanism, so I am finally removing it.  This
also lets us remove the buffer copying in the parts of tracing used by
the compile notifications, improving performance.
For rdar://39538847

@swift-ci please smoke test


Crash while cutting down trees.

The game crashes every time I try to cut down a tree. It will insert a new log into the spot I just cleared a couple times and then when it finally breaks for good the game crashes.
I have a fresh install of 1.11.2 with no other mods installed. I have tried it on multiple new worlds with the same affect.
Thank you.

I need a crash log

I increased the amount of ram it can use from 1 gig to 4 and that seems to have solved the problem. I will post a crash log if it happens again.

It just did it again. Here's the crash report.
crash-2017-06-26_13.24.34-server.txt

Nothing to do with ram usage, hopefully fixed in next version though.


Consider prefixing OE libmbedtls for easier disambiguation

My system has both the real libmbedtls and the OE version. find_package has to be carefully constructed to disambiguate between them, it would be less error prone if the OE version had the oe prefix.

Likely superseded by work for #401 to consolidate mbedtls libs into oecrypto lib.

This should no longer be relevant by using CMake.


Handle strings for the :key_mgmt option

One of the most common typos reported on the slack channel is typing the following:
key_mgmt: "WPA-PSK"
instead of:
key_mgmt: :"WPA-PSK"
It seems like this could easily be fixed by making the key_mgmt be a string rather than an atom. To avoid breaking old code, we should still support atoms.

This is fixed now. See this comment for potential api breaking issues on later versions.


tchar support

MERGE AFTER #174
I combined all unicode functions that it can be implemented in single line.
remain  #if (_WIN32) && (_UNICODE) is essential for working.
It works fine in ubuntu too.

This review includes this PR, and the following others: #174, #173, #170
Works as described. There's an issue with duration calculation though, but that seems to have existed before this PR as well. so I'll open a separate issue for that at some point.


Machine learning advances in code representation

https://paperswithcode.com/paper/contrastive-code-representation-learning

Thanks!


Add url prop to Hook struct

When retrieving repo/org hooks, either by id or a list, the github api returns a url property.  Currently the Hook struct doesn't map this to a URL prop.  This would be really useful to expose, wondering if there is a reason it isn't currently?  I'm happy to open a PR to add this if not.

fixed in 59f41ca


Cannot relaunch after failure

After I experience #89 the hello task does not work anymore. I complains about address in use. "Failed to bind to address http://[::]:5000: address already in use."
Not sure that this is crank issue, or hello example.
crank --config samples/hello/hello.benchmarks.yml --scenario hello --profile local --application.options.displayOutput true
[08:24:59.452] Running session '314abc03af4a432f88872e712807d495' with description ''
[08:24:59.516] Starting job 'application' ...
[08:24:59.567] Fetching job: http://localhost:5010/jobs/3
[08:25:00.593] Job has been selected by the server ...
[08:25:00.596] Job is now building ...
[application] AspNetCore location: C:\Users\kant\AppData\Local\Temp\benchmarks-agent\benchmarks-server-3504\bxtapxpz.wjm\crank\samples\hello\published\Microsoft.AspNetCore.Hosting.Abstractions.dll
[application] AspNetCore version: 3.1.6
[application] NETCoreApp location: C:\Users\kant\AppData\Local\Temp\benchmarks-agent\benchmarks-server-3504\bxtapxpz.wjm\crank\samples\hello\published\System.Private.CoreLib.dll
[application] NETCoreApp version: 3.1.5-servicing.20269.1+018cfd06dceb19b6eb1e9217a500fb1071946fcd
[application] crit: Microsoft.AspNetCore.Server.Kestrel[0]
[application]       Unable to start Kestrel.
[application] System.IO.IOException: Failed to bind to address http://[::]:5000: address already in use.
[application]  ---> Microsoft.AspNetCore.Connections.AddressInUseException: Only one usage of each socket address (protocol/network address/port) is normally permitted.
[application]  ---> System.Net.Sockets.SocketException (10048): Only one usage of each socket address (protocol/network address/port) is normally permitted.
[application]    at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
[application]    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
[application]    at System.Net.Sockets.Socket.Bind(EndPoint localEP)
[application]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
[application]    --- End of inner exception stack trace ---
[application]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
[application]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass21_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
[application] --- End of stack trace from previous location where exception was thrown ---
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
[application]    --- End of inner exception stack trace ---
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context)
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context)
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
[application]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
[application] [STDERR] Unhandled exception. System.IO.IOException: Failed to bind to address http://[::]:5000: address already in use.
[application] [STDERR]  ---> Microsoft.AspNetCore.Connections.AddressInUseException: Only one usage of each socket address (protocol/network address/port) is normally permitted.
[application] [STDERR]  ---> System.Net.Sockets.SocketException (10048): Only one usage of each socket address (protocol/network address/port) is normally permitted.
[application] [STDERR]    at System.Net.Sockets.Socket.UpdateStatusAfterSocketErrorAndThrowException(SocketError error, String callerName)
[application] [STDERR]    at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
[application] [STDERR]    at System.Net.Sockets.Socket.Bind(EndPoint localEP)
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
[application] [STDERR]    --- End of inner exception stack trace ---
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketConnectionListener.Bind()
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets.SocketTransportFactory.BindAsync(EndPoint endpoint, CancellationToken cancellationToken)
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.<>c__DisplayClass21_0`1.<<StartAsync>g__OnBind|0>d.MoveNext()
[application] [STDERR] --- End of stack trace from previous location where exception was thrown ---
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
[application] [STDERR]    --- End of inner exception stack trace ---
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindEndpointAsync(ListenOptions endpoint, AddressBindContext context)
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions.BindAsync(AddressBindContext context)
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.AnyIPListenOptions.BindAsync(AddressBindContext context)
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.AddressesStrategy.BindAsync(AddressBindContext context)
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.AddressBinder.BindAsync(IServerAddressesFeature addresses, KestrelServerOptions serverOptions, ILogger logger, Func`2 createBinding)
[application] [STDERR]    at Microsoft.AspNetCore.Server.Kestrel.Core.KestrelServer.StartAsync[TContext](IHttpApplication`1 application, CancellationToken cancellationToken)
[application] [STDERR]    at Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken)
[application] [STDERR]    at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
[application] [STDERR]    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
[application] [STDERR]    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token)
[application] [STDERR]    at Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host)
[application] [STDERR]    at hello.Program.Main(String[] args) in C:\Users\kant\AppData\Local\Temp\benchmarks-agent\benchmarks-server-3504\bxtapxpz.wjm\crank\samples\hello\Program.cs:line 21
[08:25:21.858] Job failed on benchmark server, stopping...

[08:25:21.861] Job has failed, interrupting benchmarks ...
[08:25:21.870] Stopping job 'application' ...
[08:25:23.185] Deleting job 'application' ...

application
-------

## Host Process:
CPU Usage (%):        2
Raw CPU Usage (%):    16.90
Working Set (MB):     34
Build Time (ms):      9,150
Published Size (KB):  86,819

I fix the related issue.
You might need to kill some processes that are still running and holding on the 5000 ports. Try to kill all "dotnet" tasks.


Super slow performance when emmet is enabled

This has been plaguing my work for months , I had to disable everything to find out what was causing it, and its emmet, any HTML file over 400-500 lines , hitting, let's say return, to get a new line causes a 4 seconds delay.
This is bad, get's worst after, I'm running this on the latest version, on a quad i7 on a 4k monitor.

You should try new plugin (currently in alpha): https://github.com/emmetio/atom-plugin


Failed to run if/else in Docker

When I run a simple if/else statement in a docker like this:
if 7%2 == 0 {
fmt.Println("7 is even")
} else {
fmt.Println("7 is odd")
}
it failed to run and the server log output is:
Error running goimports:
/tmp/002613501/func_proxy.go:4:4: expected declaration, found 'if'
regarding a for loop, it works for a single line code like this "for i:= 1; i < 5; i++ {fmt.Println("Line %s", i)}"
but not work if format the code like this:
for i:= 1; i < 5; i++ {
fmt.Println("Line %s", i)
}
what is the limitation here?

Thanks @gangtao.  Great catch.  I will work on fixing this, which seems to be a bug.

This likely has to do with how I'm parsing braces { and }

@dwhitena great to hear it, looking forward to using the fixed version soon.

@gangtao Sorry it has taken so long, but this should be fixed in the v1 RC.  Closing for now, but please reach out with any issues.  Thanks!


Completely surround pane with border to make it easy to see active pane

Hi,
I'm often using Windows Terminal with two adjacent panes.
Here, the left pane is active:

and here the right pane:

Since the border of the active pane is not visible on the outside edges of the window, it is very difficult to see which of these panes is active.
I'd rather have that blue border surround the whole pane.
Using more panes, it gets easier for the inner panes, because more of the border is visible, e.g.

I guess this is not a bug - so I'd rather kindly request this as a feature :)
I'm using Windows Terminal version: 1.17.11461.0 on Windows 11 Pro 22H2
Greetings
Nico

/dup https://github.com/microsoft/terminal/issues/12186


Add example for Bayesian Exploration with NaNs

Adds an example for Bayesian Exploration with the evaluate function returning NaNs if constraints are violated.

Can you merge this to the pydantic generator branch? It will have to get updated eventually


Add some tests and error checking for changing job name and notes

Cleans up #283

Combine edit_job_notes into edit_job
Add some error checking for dealing with empty values
Add some basic tests

@gheinrich can you review and merge? This is pretty minor.


Error when enable Debug JS Remotely

I have added lottie to my project.
It very good run normally.
but when i enable Debug JS Remotely, application can't open and have a error in logcat.
java.lang.NoSuchMethodError: No virtual method getOpenSourceSoftwareLicenseInfo(Landroid/content/Context;)Ljava/lang/String; in class Lcom/google/android/gms/common/GoogleApiAvailability; or its super classes (declaration of 'com.google.android.gms.common.GoogleApiAvailability' appears in /data/app/com.whatsnext-2/base.apk)
My implement:

build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
  // NOTE: Do not place your application dependencies here; they belong
  // in the individual module build.gradle files

}

allprojects {
repositories {
mavenLocal()
jcenter()
google()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}

app/build.gradle
compileSdkVersion 26
buildToolsVersion "26.0.2"

dependencies {
compile project(':lottie-react-native')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:26.1.0"
compile "com.facebook.react:react-native:+"  // From node_modules
compile project(':react-native-config')
compile project(':react-native-device-info')
compile project(':react-native-linear-gradient')
compile(project(':react-native-maps')){
exclude group: 'com.google.android.gms', module: 'play-services-base'
exclude group: 'com.google.android.gms', module: 'play-services-maps'
}
compile 'com.google.android.gms:play-services-base:+'
compile 'com.google.android.gms:play-services-maps:+'
}

packages.jgon
"dependencies": {
"eslint": "^3.9.1",
"eslint-config-airbnb": "^13.0.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "2.2.3",
"eslint-plugin-react": "^6.6.0",
"eslint-plugin-react-native": "^2.0.0",
"eslint-watch": "2.1.14",
"lottie-react-native": "^2.2.7",
"prop-types": "^15.6.0",
"react": "16.0.0-alpha.12",
"react-native": "0.48.4",
"react-native-config": "^0.7.1",
"react-native-device-info": "^0.11.0",
"react-native-device-log": "^1.0.2",
"react-native-linear-gradient": "^2.3.0",
"react-native-maps": "^0.16.4",
"react-navigation": "^1.0.0-beta.11",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-async-await": "^1.0.1",
"redux-thunk": "^2.2.0",
"sha1": "^1.1.1"
},

I try downgrade version to 2.2.2, 1.2.2
but still same problem.
If uninstall app to stop debug remote is it run normally.
because can't stop via menu (Command + M)
Thank You.

+1
"dependencies": {
"@mapbox/polyline": "0.2.0",
"bugsnag-react-native": "2.3.2",
"date-fns": "1.28.2",
"lottie-react-native": "^2.2.7",
"phone": "1.0.12",
"react": "16.0.0-alpha.12",
"react-native": "0.48.4",
"react-native-actionsheet": "2.3.0",
"react-native-appsflyer": "git://github.com/AppsFlyerSDK/react-native-appsflyer.git",
"react-native-background-geolocation": "2.9.4",
"react-native-country-picker-modal": "0.3.0-rc1",
"react-native-credit-card-input": "0.3.3",
"react-native-device-info": "0.11.0",
"react-native-drawer": "2.3.0",
"react-native-fbsdk": "git://github.com/facebook/react-native-fbsdk.git#065507aa1d2b8b0b6cb50d13117694123f8303fa",
"react-native-fcm": "8.0.0",
"react-native-google-analytics-bridge": "5.2.2",
"react-native-image-crop-picker": "0.15.0",
"react-native-image-zoom-viewer": "2.0.5",
"react-native-linear-gradient": "2.2.0",
"react-native-maps": "0.16.3",
"react-native-navigation": "1.1.235",
"react-native-parallax-view": "2.0.6",
"react-native-permissions": "1.0.0",
"react-native-prompt": "1.0.0",
"react-native-scrollable-tab-view": "0.6.7",
"react-native-swiper": "1.5.9",
"react-native-vector-icons": "4.3.0",
"react-redux": "5.0.5",
"redux": "3.7.1",
"redux-logger": "2.10.2",
"redux-thunk": "2.2.0",
"remote-redux-devtools": "0.5.12",
"reselect": "3.0.1"
},

@tidusvn05 Can you upgrade your Google Play Service API library in the Android app?

@tidusvn05 I actually don't think this should happen with the latest version of lottie-react-native and the play services library. Feel free to reopen if it's still an issue.


Just riffing to see what this might look like.

I primarily wanted to see how interesting/painful it might be to set the payload to an arbitrary value or primitive (eg. AnyValue.of(Long) or whatever.  This was motivated by @scheler pointing out that #6813 doesn't quite match the language in the spec, and some users might have a need for this (especially in the case of String).
Mostly offering this here for discussion.  @jack-berg has already responded in #6813 that he'd like to add this on later, so we can definitely defer until later or until it's specifically asked for.
At least trying this out helped me to understand that adding it on later is straightforward given the API implementation in #6813, and that we weren't making it too difficult.

I think the API has moved well beyond this now. 🍻


Fix testing suite

Closes #2.

Changes proposed in this pull request:

Add GitHub workflow that runs tests and linter.
Fix up tests.

To do

[x] Add CI Action
[ ] Linting
[ ] Coverage

I'm getting the following error:
Run python -m pytest --pyargs bids/reports --cov=bids/reports
[2](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:2)
  python -m pytest --pyargs bids/reports --cov=bids/reports
[3](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:3)
  shell: /usr/bin/bash {0}
[4](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:4)
  env:
[5](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:5)
    pythonLocation: /opt/hostedtoolcache/Python/3.7.12/x[6](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:6)4
6
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.7.12/x64/lib
[8](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:8)
ImportError while loading conftest '/home/runner/work/pybids-reports/pybids-reports/bids/reports/tests/conftest.py'.
[9](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:9)
bids/reports/__init__.py:2: in <module>
[10](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:10)
    from . import _version, parameters, parsing, report
[11](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:11)
bids/reports/parameters.py:10: in <module>
[12](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:12)
    from bids.reports.utils import list_to_str, num_to_str, remove_duplicates
[13](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:13)
E   ModuleNotFoundError: No module named 'bids.reports'
[14](https://github.com/bids-standard/pybids-reports/runs/5169084359?check_suite_focus=true#step:6:14)
Error: Process completed with exit code 4.

I installed my fork's pybids that doesn't include the reports module, so it shouldn't conflict with pybids-reports, and yet bids.reports doesn't exist. 😕

@effigies do you have any idea why the parent package wouldn't retain the namespace package when both are installed?

So what I did above makes things work in full installations, but not in editable mode (pip install -e). To do that, we would need to add __path__ = __import__('pkgutil').extend_path(__path__, __name__) to bids/__init__.py in this package, which would override it in pybids, making things like bids.BIDSLayout cease to work.
We could move it to bids.ext.reports and bids.ext could be set aside so that we could make -e work. PyBIDS could have bids.reports from pybids.ext.reports import * (while warning) to provide an on-ramp.


[bug]: Insufficient GPU memory to load model. Aborting on 12 Gb VRAM system

Is there an existing issue for this problem?

[X] I have searched the existing issues

Operating system
Windows
GPU vendor
Nvidia (CUDA)
GPU model
RTX 2060
GPU VRAM
12GB
Version number
v4.0.0
Browser
Yandex Browser
Python dependencies
{
"accelerate": "0.28.0",
"compel": "2.0.2",
"cuda": "12.1",
"diffusers": "0.27.2",
"numpy": "1.26.4",
"opencv": "<IP_ADDRESS>",
"onnx": "1.15.0",
"pillow": "10.2.0",
"python": "3.10.9",
"torch": "2.2.1+cu121",
"torchvision": "0.17.1+cu121",
"transformers": "4.39.1",
"xformers": "0.0.25"
}
What happened
`[2024-04-02 22:35:41,214]::[ModelManagerService]::WARNING --> Insufficient GPU memory to load model. Aborting
[2024-04-02 22:35:41,216]::[InvokeAI]::ERROR --> Error while invoking session a2efc518-d2d3-4375-b492-821cb6b74ae5, invocation be45bf0e-9a59-41b9-a2b9-81db91120b09 (denoise_latents):
[2024-04-02 22:35:41,216]::[InvokeAI]::ERROR --> Traceback (most recent call last):
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\app\services\session_processor\session_processor_default.py", line 179, in _process
outputs = self._invocation.invoke_internal(
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\app\invocations\baseinvocation.py", line 281, in invoke_internal
output = self.invoke(context)
File "Z:\InvokeAI.venv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\app\invocations\latent.py", line 772, in invoke
ip_adapter_data = self.prep_ip_adapter_data(
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\app\invocations\latent.py", line 533, in prep_ip_adapter_data
with image_encoder_model_info as image_encoder_model:
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\backend\model_manager\load\load_base.py", line 31, in enter
self._locker.lock()
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\backend\model_manager\load\model_cache\model_locker.py", line 42, in lock
self._cache.move_model_to_device(self._cache_entry, self._cache.execution_device)
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\backend\model_manager\load\model_cache\model_cache_default.py", line 273, in move_model_to_device
self._check_free_vram(target_device, cache_entry.size)
File "Z:\InvokeAI.venv\lib\site-packages\invokeai\backend\model_manager\load\model_cache\model_cache_default.py", line 432, in _check_free_vram
raise torch.cuda.OutOfMemoryError
torch.cuda.OutOfMemoryError
[2024-04-02 22:35:41,217]::[InvokeAI]::INFO --> Graph stats: a2efc518-d2d3-4375-b492-821cb6b74ae5
Node   Calls   Seconds  VRAM Used
sdxl_model_loader       1    0.000s     0.000G
sdxl_compel_prompt       2    2.513s     1.545G
noise       1    0.012s     1.538G
core_metadata       1    0.000s     1.538G
controlnet       1    0.001s     1.538G
collect       2    0.000s     1.538G
ip_adapter       1    0.000s     1.538G
denoise_latents       1   10.898s     9.464G
TOTAL GRAPH EXECUTION TIME:  13.424s
TOTAL GRAPH WALL TIME:  13.429s
RAM used by InvokeAI process: 6.48G (+5.831G)
RAM used to load models: 13.60G
VRAM in use: 7.923G
RAM cache statistics:
Model cache hits: 13
Model cache misses: 9
Models cached: 9
Models cleared from cache: 0
Cache high water mark: 12.07/24.00G`
Happens during attempt of generation of an image with 'ip_adapter_sdxl' and 'controlnet-sd-xl-1.0-softedge-dexined'. Regardless to used model, steps etc.
The same render config was used at the same machine with 3.7.1 and it works fine. Similar config at the same machine works fine under Fooocus.
I was tried to modify invokeai.yaml to the following with no success:
ram: 24 vram: 11 lazy_offload: true
What can be wrong?
What you expected to happen
A picture generated
How to reproduce the problem
Use IPAdapter with ControlNet SoftEdge with SDXL
Additional context
No response
Discord username
No response

We expect it to fail with vram set to 11GB on a 12GB card. vram dictates how much space should be allocated for the VRAM cache of model weights. Whatever is left over is available for inference. In this case, that leaves only 1GB for inference, which is definitely not enough.
Suggest removing the vram setting entirely, let us manage it - did you already try that?

Suggest removing the vram setting entirely, let us manage it - did you already try that?

Yes, initially the yaml file was without VRAM directive. So I've added it hoping that that can solve the problem. Not helped.

Ok, thanks for confirming.
@lstein, we've had a number of reports of OOMs on v4 that did not occur on v3.7. Enough reports to suggest that VRAM usage has changed substantially since v3.7. Can you please investigate?

I have attempted to reproduce the problem using an SDXL model, ip_adapter_sdxl, and controlnet-sd-xl-1.0-softedge-dexined. Sure enough it runs out of memory on 4.0.2, but it also runs out of memory on 3.7.
Do you happen to have a working copy of 3.7 still around, and if so could you tell me what versions of the dependencies you have? I'd like to check this to see if it may be a problem upstream (e.g. with diffusers).

Which model were you using?

But the problem appears also with other models.

The adapters are here.
That works for sure with 3.7. And it works with Fooocus with the same models and adapters (actually they are not the same but do the same work).

@SuperBoss9 Thank you.
I did some testing on a windows machine with an RTX 4070 TI w/ 12GB VRAM (like your 2060). I was able to reproduce the issue using the same models.

Some background:
There was a problem in v3 where if we ran out of VRAM, sometimes we couldn't reclaim the VRAM allocated to the models. This caused a VRAM memory leak. Unfortunately, this behaviour seems to be inherent to torch.
To mitigate this, v4 does an additional check before loading a model. The check ask torch how much memory is available before loading the model. If there isn't enough, it raises the error you are getting.
This works as expected on Linux, but not on Windows 10/11. When a process on Windows requests more VRAM than is available on the GPU, Windows is able to allocate some of the system's RAM - up to 50% by default, apparently. You can see how much RAM is used for this in the Task Manager's GPU section with label Shared GPU memory usage.
Here's an nvidia support article describing how to opt-out of this behaviour: https://nvidia.custhelp.com/app/answers/detail/a_id/5490
When we ask torch how much memory is available, it only reports the GPU VRAM. It does not report much RAM is available to it - this is managed by Windows at a higher level. The result is that torch under-represents the amount of memory available to the GPU.

Back to my testing. I disabled the extra VRAM check and do not get an OOM error. GPU memory is at 100%, but Windows picks up the slack and an additional ~3GB RAM is used. The GPU is using 15GB of memory in total (on the 12GB card).
So the check we are doing to prevent the memory leak mistakenly thinks that we will get an OOM error if we try to load the model and bails out.
Two proposals:

Remove the VRAM check entirely. Fix the memory leak. Update docs and link to the nvidia support article, help users to select the correct python executable to.
I think this is best, even if we don't fix the memory leak issue immediately. The existing behaviour is retained. We let the GPU driver handle the shared GPU memory stuff.

Add an invoke setting to opt-out (e.g. allow_shared_gpu_memory: bool).
Though this works around the memory leak, it puts the burden on us to carefully manage memory. Ideally, we don't need to do this.

I prefer option 1.
@lstein @RyanJDick @hipsterusername

I've PR'd proposal 1 above. IMO, we should get this out ASAP to resolve user-facing issues.

Note:
After upgrade to 4.0.2 I can use IPAdapter and T2I Adapter with the rest settings and it doesn't lead to OutOfMemory error.


Implement floating-point manipulation functions for BigFloat

BigFloat already has an implementation of frexp because hash needs it (I think); this PR adds the remaining floating-point manipulation operations.
Methods that take an additional integer accept an Int directly, so this takes care of the allowed conversions in #10907.
BigFloat from GMP doesn't have the notion of signed zeros, so copysign is only an approximation. (As usual, MPFR floats feature signed zeros.)

CI is failing on Windows: https://github.com/crystal-lang/crystal/actions/runs/10698882947/job/29660333970?pr=11007
  1) BigFloat Math .frexp
     Failure/Error: Math.frexp(2.to_big_f ** 1_000_000_000_000).should eq({0.5, 1_000_000_000_001})

       Expected: {0.5,<PHONE_NUMBER>001}
            got: {2.43829426113685079336e+327749382, -727379967}

     # spec\std\big\big_float_spec.cr:585

  2) BigFloat Math .logb
     Failure/Error: Math.ilogb(2.to_big_f ** 1_000_000_000_000).should eq(1_000_000_000_000.to_big_f)

       Expected:<PHONE_NUMBER>000.0
            got: -727379968

     # spec\std\big\big_float_spec.cr:559

  3) BigFloat Math .ilogb
     Failure/Error: Math.ilogb(2.to_big_f ** 1_000_000_000_000).should eq(1_000_000_000_000)

       Expected:<PHONE_NUMBER>000
            got: -727379968

     # spec\std\big\big_float_spec.cr:553

These exponents will overflow even when GMP / MPIR handles the internal exponents correctly, so a fix similar to #14971 is needed


assert support is not  working correctly

I neglected to parse the message parameter, as well as the possibility of trailing parameters and 0 parameters. This should all be fixed as of 0.4.2 (a07497e).


Darwin config and INSTALL doc fixes

Using [[ options ]] syntax irks me, since for example every manpage uses single brackets. I'm curious what VMS does about that.
Also, using {{ something }} should be fixed since we're now using markdown which can convey things better.

Using [[ options ]] syntax irks me, since for example every manpage uses single brackets. I'm curious what VMS does about that.
Also, using {{ something }} should be fixed since we're now using markdown which can convey things better.

If you can figure out a notational convention that you think looks better and can convey the same information and is consistent and wouldn't be too easily confused with known command line syntax, by all means express the idea.
Regarding VMS, I suggest you have a look at one of the manuals and have a look at "Typographical Conventions".  In https://vmssoftware.com/docs/VSI_DCL_DICT_VOL_I.pdf, you find it in section 7 of the Preface.  I actually find their notation less readable, 'cause they use single [ and ] to indication optional stuff, and don't even surround them with spaces...  so you get to see things like DIRECTORY [filespec[,...]]...  keep in mind that explicit [ and ] are used on VMS as delimiters for the directory portion of a path.
Other than that, VMS does nothing with [[, ]] etc...  or well, if you misunderstand what a notational convention is and type those in explicitly on the command line, you get a syntax errpr...

So I think INSTALL.md should follow the conventions in the OpenSSL manpages (which of course follow Unix conventions), as in [option...]  And apparently the VMS docs are close enough to that to be acceptable there as well.
As for {{..}} it is used in one place and could be dropped, written-around. I'll make a separate PR for those.

I noticed there is a -w option that wasn't documented which does the same as the environment variable. So I documented that and removed the env var.

Fixup commit for a typo: s/thie flag/this flag/

24 hours has passed since 'approval: done' was set, but as this PR has been updated in that time the label 'approval: ready to merge' is not being automatically set.  Please review the updates and set the label manually.

Merged to master.  Thanks.


[GHSA-5qx5-vg5w-5mx3] Jenkins Badge Plugin 1.9 and earlier does not escape the...

Updates

Affected products
Source code location
Summary

Hello @ westonsteimel,
Thank you for submitting information about this Jenkins Plugin. This falls into an edge case of how we handle java packages. The Jenkins’ plugins tend not to be hosted on maven central and so, don't technically fit in to our Maven ecosystem. We can accept this contribution as well as your others given that there is no name space collision. Thank you for going to the trouble of improving these contributions and hopefully we can make our ecosystems clearer going forward :) As you were kind enough to provide updates for multiple plugin advisories that are being accepted, I am including this comment on each of the pull requests for posterity:
https://github.com/github/advisory-database/pull/210
https://github.com/github/advisory-database/pull/211
https://github.com/github/advisory-database/pull/214
https://github.com/github/advisory-database/pull/215

@ronwoch , thanks for looking into these and for the additional clarification!  I wasn't entirely sure if these should fit in the Maven ecosystem for the reasons you mentioned, but I did notice that they all use a pom file with groupId and artifactId and that since the groupId is org.jenkins-ci.plugins they hopefully wouldn't collide with existing Maven libraries.
Should I continue to submit Jenkins plugin information to the Maven ecosystem for now until there is potentially a separate ecosystem supported for them?

@westonsteimel Absolutely! Maven is the closest fit in this case. Your analysis is pretty spot on to our internal discussions about, and decision to include these contributions. Please do continue to use the Maven ecosystem to submit Jenkins advisory improvements. Our discussions around this are ongoing, so a separate ecosystem, if any, would likely be pretty far out.
Thanks again for your contributions!


First list item after header doesn't click

First list item after header doesn't click, but all other item are clickable.
This my code ListView initialization:
menuListView = new StickyListHeadersListView(getSherlockActivity());
menuListView.setBackgroundColor(getResources().getColor(android.R.color.white));
menuListView.setAreHeadersSticky(true);
menuListView.setOnItemClickListener(this);
menuListView.setOnHeaderClickListener(this);
In my list for example I have header item with back button and 5 category items. When I click on first category item - nothing is happen(onItemClickwasn't called for this item). But after that I click on second category item - it's work fine - onItemClick was called and second item have 1 position it adapter list. When I try to get list item for position 0,
View firstView = mList.getChildAt(0);
int firstViewVis = firstView.getVisibility();
firstViewVis is View.Visible. Please, help me as soon as possible - I must made release today.

I can validate this. Anytime I try to click the item after the header the first time it does not work. Also having problems with clicking header item a lot and all of a sudden the clickListener for the non-headers is called...

+1 same problem

does anybody fix that?


Incorrectly non-nullable typed _CastError fields

Running
main() {
  try {
    null!;
  } on TypeError {
    // _CastError implements TypeError
  }
}

should result in a swallowed exception, but actually results in:
% out/ReleaseX64/dart --null-assertions --no-sound-null-safety --enable-asserts test.dart
Unhandled exception:
'dart:core-patch/errors_patch.dart': Failed assertion: line 117 pos 27: '_url != null': is not true.
#0      _AssertionError._doThrowNewSource (dart:core-patch/errors_patch.dart:54:69)
#1      _AssertionError._throwNewNullAssertion (dart:core-patch/errors_patch.dart:46:5)
#2      new _CastError._create (dart:core-patch/errors_patch.dart:117:27)
#3      main

This issue resurfaces with replacing the CastError with TypeError. I will address this in the migration CL.
Thanks for the regression test @mkustermann!


feat: add array and custom component support to auto-form

relates to #251
fixes #322
relates to #334
Realized with my initial effort I wasn't using Formik properly, so I've added some initial array support to auto-form in addition to custom component support.  The basic filter step still looks the same as previous screenshots I've sent out, but now the trash icons and the "Add another rule" link do stuff.

The connector/connection details validation was a bit of a pita for the refactoring effort needed.  I created #334 to track this and will fix it in a subsequent PR, this PR is groundwork for finishing up the basic filter page, left to do there is validation, saving and then calling the backend to get all the typeahead and the proper values for the 'ops' dropdown.

You can try and add one to "DescribeDataAbuse" or look at the one in "From React" to play with it.


Add tsc as a part of the pre-commit

So we can happily push to origin and not worry about tests failing like they do all the time 🤣

Closed in a90cb85e05990c33783e62c134993e744d383293.


"Illegal instruction: 4" With new Heimdall 1.4.0 on Mac

I just downloaded the new Heimdall 1.4.0 on my mac, installed just fine, then went to start up the frontend. It immediately crashed. So then I thought maybe i'd try it in terminal, would get the error "Illegal instruction: 4" whenever I tried. Installed just through the suite 1.4.0 pkg. Any help would be appreciated! Thanks.

@cttran Your method worked well for me. Thanks for sharing.
I'm using Mac OS X Lion 10.7.5 (11G63). Don't know how to check Kernel Version.


Setting log levels

I am trying to parse a rather large diff file with UnifiedDiff udf = UnifiedDiffReader.parseUnifiedDiff(diff);
It is choking on the file and giving me the error message:
Jul 28, 2022 12:52:33 AM com.github.difflib.unifieddiff.UnifiedDiffReader processLine
WARNING:   >>> no rule matched
Exception in thread "main" com.github.difflib.unifieddiff.UnifiedDiffParserException: expected file start line not found
	at com.github.difflib.unifieddiff.UnifiedDiffReader.parse(UnifiedDiffReader.java:120)
	at com.github.difflib.unifieddiff.UnifiedDiffReader.parseUnifiedDiff(UnifiedDiffReader.java:191)

The source code shows that the "no rule matched" line is supposed to include the offending line, but in this case that is an empty line. Naturally I want to turn on some finer logging to show some context of the previous lines so I can find the bad line in my diff file. How do I do that?
BTW the error message could be greatly improved by including the line number.

To increase log level use a logging properties. The surefire plugin in the project is already configured this way.
However better log messages is always a good way to improve user experience.


First implementation of an approximate AD system based on MPScalculus

The plan is to develop an approximate AD system, and an approximation is based on the MPScalculus presented in https://arxiv.org/pdf/1912.03014.pdf.

Looks like a good start!
Is the reason for introducing the MPSTensor type instead of just using the MPS type so that you can overload functions like contract, ITensor, and getindex? Also, what's the reason for allowing MPSTensor to store either an ITensor or an MPS?

Looks like a good start!
Is the reason for introducing the MPSTensor type instead of just using the MPS type so that you can overload functions like contract, ITensor, and getindex? Also, what's the reason for allowing MPSTensor to store either an ITensor or an MPS?

Yes that's right, also we don't need to specify parameters like maxdim and cutoff in the contract. The reason to allow storing ITensor is that, for some tensors, such as a fully contracted network, the tensor has 0 dimension and cannot be stored as an MPS. This is just used to handle this corner case.

Looks like a good start!
Is the reason for introducing the MPSTensor type instead of just using the MPS type so that you can overload functions like contract, ITensor, and getindex? Also, what's the reason for allowing MPSTensor to store either an ITensor or an MPS?

Yes that's right, also we don't need to specify parameters like maxdim and cutoff in the contract. The reason to allow storing ITensor is that, for some tensors, such as a fully contracted network, the tensor has 0 dimension and cannot be stored as an MPS. This is just used to handle this corner case.

I see, in that case couldn't it be Union{MPS, Number}? Also, I don't see why you can't store a scalar in an MPS, it could just be an MPS with just a single scalar ITensor, such as MPS([ITensor(3.5)]).
More generally, a "scalar" MPS is any MPS without any external/site indices, in principle we could define scalar for MPS like:
isscalar(M::MPS) = isempty(noncommoninds(M...))
function scalar(M::MPS)
  !isscalar(M) && error("MPS is not a scalar")
  return prod(M)[]
end

In principle the Pan-Zhang algorithm could output an MPS like that, but I guess the last step of the algorithm contracts it down to a scalar.

Looks like a good start!
Is the reason for introducing the MPSTensor type instead of just using the MPS type so that you can overload functions like contract, ITensor, and getindex? Also, what's the reason for allowing MPSTensor to store either an ITensor or an MPS?

Yes that's right, also we don't need to specify parameters like maxdim and cutoff in the contract. The reason to allow storing ITensor is that, for some tensors, such as a fully contracted network, the tensor has 0 dimension and cannot be stored as an MPS. This is just used to handle this corner case.

I see, in that case couldn't it be Union{MPS, Number}? Also, I don't see why you can't store a scalar in an MPS, it could just be an MPS with just a single scalar ITensor, such as MPS([ITensor(3.5)]).
More generally, a "scalar" MPS is any MPS without any external/site indices, in principle we could define scalar for MPS like:
isscalar(M::MPS) = isempty(noncommoninds(M...))
function scalar(M::MPS)
  !isscalar(M) && error("MPS is not a scalar")
  return prod(M)[]
end

In principle the Pan-Zhang algorithm could output an MPS like that, but I guess the last step of the algorithm contracts it down to a scalar.

Yeah these make sense, sorry I falsely closed it lol

@mtfishman please take a look

Just a few comments about the code style, but otherwise looks good.


Fix flaky test QuotaManagerTest#testDetectUserResource

What changes were proposed in this pull request?

Fix flaky test QuotaManagerTest#testDetectUserResource
Why are the changes needed?

The process of parsing quota file is asynchronous.
https://github.com/apache/incubator-uniffle/actions/runs/3695326069/jobs/6257565865
Does this PR introduce any user-facing change?

No
How was this patch tested?

No need

Codecov Report

Merging #421 (279a7f5) into master (66c752f) will decrease coverage by 0.93%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #421      +/-   ##
============================================
- Coverage     58.54%   57.60%   -0.94%
+ Complexity     1611     1393     -218
============================================
  Files           195      173      -22
  Lines         11035     9223    -1812
  Branches        966      816     -150
============================================
- Hits           6460     5313    -1147
+ Misses         4195     3573     -622
+ Partials        380      337      -43

Impacted Files
Coverage Δ

.../java/org/apache/uniffle/server/ShuffleServer.java
64.49% <0.00%> (-2.90%)
:arrow_down:

.../java/org/apache/uniffle/common/util/RssUtils.java
58.45% <0.00%> (-2.14%)
:arrow_down:

...rg/apache/uniffle/client/util/DefaultIdHelper.java
100.00% <0.00%> (ø)

...uniffle/storage/factory/ShuffleHandlerFactory.java
0.00% <0.00%> (ø)

...client/request/CreateShuffleReadClientRequest.java
0.00% <0.00%> (ø)

.../storage/handler/impl/MemoryClientReadHandler.java
0.00% <0.00%> (ø)

...torage/handler/impl/ComposedClientReadHandler.java
0.00% <0.00%> (ø)

...orage/request/CreateShuffleReadHandlerRequest.java
0.00% <0.00%> (ø)

.../hadoop/mapreduce/task/reduce/RssEventFetcher.java

...preduce/task/reduce/RssRemoteMergeManagerImpl.java

... and 21 more

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

Thanks @xianjingfeng for the work. A few suggestion here:

You can use Awaitility for the wait, see https://github.com/apache/incubator-uniffle/search?q=awaitility
Please prove this change actually fixes the flaky test.
For example (see below), you can change this test to a ParameterizedTest locally and repeat it many times.

  static IntStream range() {
    return IntStream.range(0, 100);
  }
  @ParameterizedTest
  @MethodSource("range")
  public void testDetectUserResource(int dummy) throws Exception {

The test result (before the change):
NOTE: Seems there are some issues in iteration 58, maybe we should add a @Timeout.

@kaijchen


Default export function expression regression found under very specific circumstance

TS and JS Grammar Extension version:  0.0.22 / latest
Hi there,
I think I may have found a regression in the language under a very specific circumstance. The example below should trigger this issue for you.
Issue
export default ({
  foo = [],
//^^^source.ts meta.export.default.ts meta.objectliteral.ts
  bar = '',
  baz = true,
}: any) => baz;

Annotated above are the scopes that the lines are receiving.
If the same expression is written on one line, here's the scopes that it receives (which all appear to be correct)
No Issue
export default ({foo = [], bar = '', baz = true, }: any) => baz;
//               ^^^source.ts meta.export.default.ts meta.arrow.ts meta.parameters.ts meta.parameter.object-binding-pattern.ts variable.parameter.ts

Let me know if I can clarify further
Thanks again for all your amazing work on the this! 😄

This is by design because of limitation of tmLanguage grammar syntax. The lookups aren't multiline which means at first line we cant certainly say that its a arrow function and hence the failure to colorize.


Fix code action issue for function-invocations

Purpose

Fix code action issue for function-invocations

Fixes https://github.com/ballerina-platform/ballerina-lang/issues/26507
Approach

Describe how you are implementing the solutions along with the design details.

Samples

Provide high-level details about the samples related to this feature.

Remarks

List any other known issues, related PRs, TODO items, or any other notes related to the PR.

Check List

[x] Read the Contributing Guide
[ ] Updated Change Log
[ ] Checked Tooling Support (#)
[ ] Added necessary tests

[ ] Unit Tests
[ ] Spec Conformance Tests
[ ] Integration Tests
[ ] Ballerina By Example Tests

[ ] Increased Test Coverage
[ ] Added necessary documentation

[ ] API documentation
[ ] Module documentation in Module.md files
[ ] Ballerina By Examples

Let's add a test case too


check for missed closing braces at the end of the parsing

Seems like a good idea. Waiting for some more people to chime in on it before merging.

any update?

Grace period passed, merging.

Reverting this on master, even the most obvious tests are not passing anymore.  The check is relevant, but is malplaced since the parser is recursive and EOF is received when at least one or more levels down.


Migrate to Gradle 6 to get rid of "path too long" widgetset building problem

Environment

Platform version: 7.2.

Description of the bug or enhancement

use Windows
create project
add several add-ons, e.g. like below:

    appComponent("com.haulmont.cuba:cuba-global:$cubaVersion")
    appComponent("com.haulmont.reports:reports-global:$cubaVersion")
    appComponent("com.haulmont.charts:charts-global:$cubaVersion")
    appComponent('de.diedavids.cuba.instantlauncher:instantlauncher-global:0.5.0')
    appComponent('com.haulmont.addon.admintools:cuba-at-global:1.5.1')
    appComponent('com.haulmont.addon.emailtemplates:yet-global:1.4.2')
    appComponent('com.haulmont.addon.restapi:restapi-global:7.2.2')

Studio automatically creates app-web-toolkit module
try to run the application

Actual:
building project fails, because of the "Error 206 path too long" problem. This is really a blocker for Windows users.
Problem is known for a long time: #14.
Workaround is tedious: https://doc.cuba-platform.com/manual-7.2/widgetset_win_path_too_long.html
According to some Haulmont developers, you can get rid of this problem by upgrading project to Gradle 6.1.
However, there may be some incompatibilities, so we must be careful.
If implemented, also to be done in CUBA Studio project template.

Gradle doesn't fix the problem withBuildWidgetSet and long classpath. So update to Gradle 6 was reverted. The original problem is fixed in #14

Haha, why then devs from Custom Solutions told us it helped them?

This may work for other Java processes but not for widgetSet.


Use of OpenTracing.global_tracer.active_span ?

I'm having difficulty collecting traces that contain multiple spans with your gem. Based on your README, I'm assuming that the spans are linked by OpenTracing.global_tracer.active_span, but it isn't clear to me where this method is defined. Typically, I see:
undefined method `active_span' for #<Zipkin::Tracer:0x007fd6429e6068>

I hacked together a gem which solves this for now, but it is pretty much just a copy of the work you've done, so I'd rather understand how to use your gem properly. Any assistance/direction regarding this would be much appreciated.
Thanks

I put the Rails::Tracer.instrument in my application_controller.rb as a before_action and it seems to work now. Is this the intended method? Maybe mentioning where this should be done in the README would be useful?
In any case, getting serious value from your gem 👍


Add fee option on all classes for @stacks/bns.

Is your feature request related to a problem? Please describe.
While i am creating PreOrder and Register transactions to register domain name on bns, i'd like to set the network fee such that the transaction is not halted because of the fee. Currently, there's no fee option available for that.
Describe the solution you'd like
I'd like to have an option to set the fee similar to what we have on https://github.com/hirosystems/stacks.js/tree/master/packages/transactions#stx-token-transfer-transaction

just found out you can set the fee option to unsigned transaction using  unsignedTX.setFee(NETWORK_FEE);
closing this issue and will be creating a PR to show that option on the transactions.


[#4269]feat(flink-connector): add flink connector doc

What changes were proposed in this pull request?

add flink connector doc
add flink connector hive doc

Why are the changes needed?
Fix: #4269
Does this PR introduce any user-facing change?

on

How was this patch tested?

no need

@FANNG1 Please help review this MR. Thanks.

@FANNG1 Please help review this MR when you have time. Thanks.

@FANNG1 I have fixed. Please take a look. Thanks.


test: add test file to test timestampToYearMonthDay

Based on this issue https://github.com/code-chronicles-code/leetcode-curriculum/issues/305
Added a few test cases to test the timestampToYearMonthDay function
Output

Suggestion
I worked on a test that checks if the separator is valid or not and tried to pass undefined or a string
   it('throws an error if an invalid separator has been passed', () => {
    expect(() => timestampToYearMonthDay(1672531199, "test")).toThrow();
    });

but it's telling me that it is returning an anonymous function

so perhaps it would be great to add a block of code to validate what is being passed, or use a char instead of a string

@elimanzo
Thank you for your feedback!

Another cool test we could test out is how big and small can the timestamp be :)

I have added a test with a long timestamp. However, when I tried to use a negative timestamp in an EPOCH converter, it gave me a date prior to JAN 01 1970. Therefore, it wouldn't be possible to test with smaller timestamps

Nice! Just a small nit, and I think it's good to go off my end. Also, I think the checks is still complaining, try running yarn lint

I've had a few problems with yarn lint, but i was able to fix it now. The issue was found in the test that tests large time stamps where it complained that this large number would lose precision over time.

Thank you for working on this! It looks good to me.
We could definitely consider validating the separator down the road, particularly if we want to restrict what qualifies as a valid separator and whether it should be limited to a single character. Or we could deliberately choose to be flexible with the separator (like it is now).

Thank you for working on this! It looks good to me.
We could definitely consider validating the separator down the road, particularly if we want to restrict what qualifies as a valid separator and whether it should be limited to a single character. Or we could deliberately choose to be flexible with the separator (like it is now).

Yeah the flexibility is good. Perhaps restrict certain characters like \0 and an empty string? since those two generate a timestamp without anything to separate and identify the date

Thanks for the PR @youssef-itanii, I think this is almost ready to merge. I added some comments that I think will get it across the finish line.

I'll look into those now!

Regarding restricting the separator -- I think we can stay flexible here. Empty string is perfectly valid, "20240816" is pretty straightforward to read for humans, and can be useful in auto-generated filenames. And "\0" doesn't have the same meaning in JavaScript as it does in C, so if somebody really wants to use it, we don't have to worry about stopping them.

Hmm, I guess the way I looked at it is how readable it is, since it could be tough for some people, but I guess it's fine.

Also, one last thing I wanted to confirm: are you ok with your contribution being distributed under this repository's license, i.e. the MIT License?

Yes, I'm okay with that!

Thanks again!

It was a pleasure! Thank you for taking your time to review and comment :smile:


Deployment failure of blog and failure in making changes.

Sir, the deployment is failing continuously after several attempts. Second issue is its says "Complilation failed " when i tried to add instagram/linkedin in place of twiiter.

Give me your codesandbox url.

here's the url  https://codesandbox.io/s/friendly-butterfly-stc7v
On Thu, Mar 19, 2020 at 8:49 AM Tanay Pratap<EMAIL_ADDRESS>wrote:

Give me your codesandbox url.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/tanaypratap/tanay-demo-blog/issues/1#issuecomment-600966296,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALWNUX7RG3WBRFPDE4ONRKTRIGFKHANCNFSM4LO2KRPQ
.


[NSE-534] Columnar SHJ: Error if probing with empty record batch

GHA, Jenkins CI passed. Merging.


Add mousewheel support

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

No mousewheel support. please add.

Context

Your Environment

RobotJS version:
Node.js version:
npm version:
Operating System:

never mind. found scrollMouse.
it should be called mouseScroll though. Naming is weird.


drivers: clock_control: stm32h7: systick for tickless kernel

Do not enable Systick for a tickless kernel in the clock control initialization.

Fixes #41691

Please rebase to fix CI issue (fixed by https://github.com/zephyrproject-rtos/zephyr/pull/41725)


identifier_check isn’t run for iati-activity/iati-identifier

In the IATI standard, there’s currently an iati-identifier rule that:

iati-identifier should match the regex [^/&|?]+

Additionally, the iati-identifier overview page of the IATI standard reference site says:

The iati-identifier should have no leading or trailing whitespace.

In this repo, these rules exist in identifier_check for various identifiers, but not for iati-activity/iati-identifier.
This seems like it might be an accidental omission?

An omission indeed, Andy.

Okay, great – glad this was useful. Thanks for resolving it.
I’m slightly puzzled by one small thing in the fix… Wouldn’t it be better to either check iati-activity/iati-identifier here, or remove this bit?
I guess there is no problem with overlapping rules, but in this case it seems avoidable.

It's a bit due to overlapping work actually: we're removing all version 1.0x checks from the validator still, and that includes the second bit you mention: the iati-organisation/iati-identifier is a v1.0x element.

Aha – gotcha! Thanks for clarifying.


[Reg_type.INVALID_MODULE] No module named svn_connector.svn_conn

Hi,
I was just trying this connector while registering the connection I'm getting following error
I copied both the connectors to the site-package as mentioned

Traceback (most recent call last):
File "/usr/local/storediq/bin/register_connector.py", line 22, in
cd.register(class_name, writable=write_enable)
File "/usr/lib/python2.6/site-packages/deepfile/registration/connregistrationfactory.py", line 163, in register
raise Exception(str(e))
Exception: [Reg_type.INVALID_MODULE] No module named svn_connector.svn_conn

Bellow is the command I'm using for the registration
python32 /usr/local/storediq/bin/register_connector.py -c svn_connector.svn_conn.SvnConnector
I'm fairly new to StoredIQ and the Python, so when you are saying the module name are you referring it to the file which has connecter class?

Hi @nmaiya , it seems to be some naming issue.
if your Connector folder is my_connector, class name is MyConnector and the module that defines the class is my_module, then class-path will be my_connector.my_module.MyConnector

Yes, module name is the filename which connector class.
Check the command output python32 /usr/loca/storediq/bin/register_connector.py -h for more information.

Did it work for you?


expose kubernetes node metrics on discovered kubernetes pods

We use kubernetes discovery with role: pod as our primary way to discover kubernetes services. Unfortunately, pod labels / annotations do not include properties of the node like instance type or region.
This change adds node labels to pods, so that discovered pods include information about the node that runs them.

Because our targets are pods, we found it non-trivial to dynamically label them with even the pod name.
However, I agree that it'd be really bad UX to break existing use cases, so I've added a configuration option to the kube sd config to enable this functionality.

I'm not too sure about this one. My feeling is that this is a case of "to make the easy things easy, and the hard things possible", and extending service discovery with this feature introduces inconsistencies such as what does podNodeLabels do when enabled for node, ingress or service roles?

I'm not quite sure I understand the second part; but knowing about the runtime environment of a workload is very important for monitoring, since otherwise we might totally miss issues that are correlated to availability zone, for example.
I think that should be easy, not merely possible; and needing another scraped third party cluster component plus relatively complex join queries everywhere is not easy.
On the second point, the flag is only valid for pods, and is rejected otherwise:
 		if c.Role != "pod" && c.PodNodeLabels {
				return fmt.Errorf("pod_node_labels can only be used with role=pod")
			}

I don't know, I don't think joining is hard, and node metadata may change over time, while the target is actually static. I think the target should only have target identifying labels, everything is additional metadata that should be added at query time.

While I understand the reasoning behind your opinion, it does not seem consistent with the Prometheus documentation on labels:

Use labels to differentiate the characteristics of the thing that is being measured:

Identifying properties of the location where a workload is being run seem like important differentiating characteristics.
Furthermore, the Node a Pod is running on never changes, so a given named pod will always run on the same node. The node's AZ never changes, so a given node will always have the same AZ. Which is to say, many of the node labels are in fact constant. Not all, of course, but that's true also of pods, or prometheus targets in general.
In fact, for the use cases I have in mind, this won't even result in an increase in cardinality.

@brancz can this be closed?


Implement fiber local storage

I've previously implemented this in https://github.com/kelunik/fiber-local, but I think it's important to clear the storage if we reuse fibers.

@kelunik This looks nice now, I think I prefer it over the changes in my branch. Can we add a template type to FiberLocal?

@kelunik Can you add a (simple) example on how to use this to the examples/ folder?

@WyriHaximus I've added two examples.

It's good to see how merging #41 makes some tests here fail. :smile:


Credentials in target_url are ignored and not presented to upstream as Authorization: Basic header

If an upstream (target_url) requires Basic Auth via a statically provisioned API KEY or similar thing, it is customary to be able to provide the credentials in the URL, and for the user agent to detect the userInfo in the URL and to move it over to an Authorization: Basic <base64(userInfo)> header.
Curl is an example of this, and it allows you to use either of 2 forms to set an Auth Basic header:

$ curl -u user:password http://myhost:port
$ curl http://user:password@myhost:port

Reproduction Steps:

Register an API with /myRoute/* ==> http://user:password@upstream
Restart Janus (issue #95 workaround)
Attempt to access http://janus/myRoute. Get 401 Unauthorized

Expected behavior:
Upstream would be presented with Authorization: Basic header  and would authorize.
Observed behavior:
Upstream returns 401 Unauthorized which means it was not presented with an Authorization: Basic header.
Janus version: 1.7.4-rc.6

Implemented on #185


Added auto-select midi device feature in response to issue #65

I added an auto-connect feature to the preferences window in February. It was just an on/off button so if both buttons for auto-connecting in a new window and auto-connecting in a current window were selected, it combined both behaviors. Most recent commits in June changed the UI so that the preferences were chosen using a radio button.
This is my first real pull request to an open source project. Please let me know if I need to change anything. I'm happy to do anything necessary in order to be able to participate in this project. Thank you!

Added the uninstall instructions to the documentation.

Hi, thank you for the PR. it has been an exceptionally busy few months for me (iOS 13...) and I'm trying to catch up. Taking a look.
I think the uninstall instructions change (#68) would ideally be a separate PR.

I've fixed all the issues you've mentioned and push them to my master branch. Is there anything I need to do on this pull request, or can you see those changes?

Got the rest of the changes, thanks! Will take a look over the holiday this week or the weekend.


BREAKING: Improve UX and support multiple pages

Why? Sinco only really supported one page, and sometimes it made no sense.. Say you click a link and it opens a new tab, you still only have one 'page' and there's no way to get back to your original page. Some methods (such as click()) were using a hacky approach to get a solution. A lot of properties and methods on classes (internal methods) didnt make sense for them being on those classes
What?

renamed Client#done to Client#close: await browser.close() > await browser.done()
Moved a lot from the protocol class to be under the client, as it didnt belong, such as browser process, browser, firefox path
The client's connection was actually the page's, which makes no sense, so i've made the client class use a separate connection which isn't connected to a page, but can be used for general browser things
Client#create now returns { browser, page }, it's more semantic for it to be named "browser" instead of client or Sinco, and we know they want to make a page, so we make sure to do that for them here. Whilst a page did open originally, the change here is we create a page instance and attach to it:const { browser, page } = await buildFor("chrome")
await page.cookie(...) // set our auth creds before going to the page, something we couldnt do before
await page.location("https://my-app.com")

// as opposed to
const sinco = await ...
const page = await sinco.goTo(...) // already here, so we have a 403, need to set cookies THEN goto here again

Support for multiple pages. Whilst you can't directly create a page yourself, if a new tab/page is openedin the browser, a new item gets pushed to Client#pages, which can control that page:

await page.location() // drash.land
await page.querySelector(...).click()
await page.location() // drash.land
const page2 = await browser.page(2)
await page2.location() // github.com/drashland

If any action will open a new page, button: "middle" needs to be passed to click for us to properly handle these different pages

Can now close a single page

Can focus a page (but doesnt really do anything)

Removed waitForPageChange(), instead use .click({}, true)

Removed selector from takeScreenshot, instead moved this to Element class, so to take a screenshot of an element, you'd call it on the element instead of a page

The tree is:

--- = one-to-one
--> or <-- = one to many
                Client
                    |
 Protocol---+--> Page
                               |
                          Protocol

So: client has a protocol, and a client has many pages, and each page has their own protocol

I dont want to make another major version, but the internal code and API needed to change

and a bunch of QOL stuff for us:

able to pass in a class to client.close(), for which the error shoudl be thrown with
a bunch of other stuff i cant remember rn lol

we mixing and matching camel case and snake case object keys 😬 . honestly, i don't know if we should continue to be uniform with these. reason being in the Open API service i'm working on in Drash, Open API Specification uses camel case for object keys, so the Open API service needs to build Open API Specification objects using camel case. kinda sucks, but it killed our uniformity. i know a solution would be to use snake case and then convert all snake case keys to camel case, but that seems unnecessary.
want your thoughts though on if we should continue to enforce snake case in our codebase OR do it based on requirements. like since Open API Specification requires camel case, then the Open API service should use camel case.

lets just do snake case all the way


[api] skrz/meta

A library to map from PHP arrays, JSON, XML and Protocol Buffers (protobuf) to PHP objects and back.
https://github.com/skrz/meta

I personally think this is a solution in search of a problem. Thanks for the pr.


Check CUDA Retries

What does this PR do?
Increases grad_accum if there are cuda alloc retries going on. This causes throughput degradation if we're seeing this.
What issue(s) does this change relate to?
CO-1159

It’s really hard to get a batch size where we get multiple retries for malloc but no Cuda OOM. I was able to get a few runs where retry forces auto grad accum to 2x at batch 1 but it’s able to keep running without OOMs for 10-20 batches otherwise without OOMing. In this scenario, running the lower grad accum value up until the OOM resulted in higher throughput.
I think this would probably work if we just barely lowered the batch size so that it would fit more cleanly into memory, but 2xing grad accum is worse – the lower microbatch size gives worse performance, which dominates any improvement from avoiding multiple malloc calls.


ambari-blueprint topology validation error

TASK [ambari-blueprint : Upload the blueprint mytestcluster_blueprint to the Ambari server]

I followed the instructions and I got topology validation error when blueprint role should be applied.
fatal: [ec2-********.us-west-2.compute.amazonaws.com]: FAILED! => {"cache_control": "no-store", "changed": false, "connection": "close", "content": "{\n  "status" : 400,\n  "message" : "Cluster Topology validation failed.  Invalid service component count: [HST_SERVER(actual=0, required=1), OOZIE_SERVER(actual=0, required=1+)].  To disable topology validation and create the blueprint, add the following to the end of the url: '?validate_topology=false'"\n}", "content_type": "text/plain;charset=utf-8", "date": "Sat, 01 Dec 2018 11:15:09 GMT", "expires": "Thu, 01 Jan 1970 00:00:00 GMT", "json": {"message": "Cluster Topology validation failed.  Invalid service component count: [HST_SERVER(actual=0, required=1), OOZIE_SERVER(actual=0, required=1+)].  To disable topology validation and create the blueprint, add the following to the end of the url: '?validate_topology=false'", "status": 400}, "msg": "Status code was 400 and not [200, 201, 202, 409]: HTTP Error 400: Bad Request", "pragma": "no-cache", "redirected": false, "set_cookie": "AMBARISESSIONID=node01cquhcwxberao1cexdpriqvgv115.node0;Path=/;HttpOnly", "status": 400, "url": "http://*******.us-west-2.compute.internal:8080/api/v1/blueprints/mytestcluster_blueprint", "user": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER", "x_content_type_options": "nosniff, nosniff", "x_frame_options": "DENY", "x_xss_protection": "1; mode=block"}

The issue was caused by myself. I deleted few services from group_vars/all which I don't use and the blueprint role could not handle it. Once I rolled back the deletion, the role could be applied.


Bitcoin Pro

What is the product that is being developed here?..

Looks like they thought they would fork BTC, then just created an EVM token, and forgot to put the source code on GitHub, or forgot to link it correctly!