Error: SQLSTATE=22504 SQLCODE=-191

Please complete the following information:

Node.js version: v12.16.1
idb-connector version: 1.2.9
idb-pconnector version: 1.0.8
IBM i version: V7R3M0

Describe the bug
When I try to run an Sql Insert Statement, I get either of these Error Codes.

Error: SQLSTATE=58004 SQLCODE=-901 ("UNSUCCESSFUL EXECUTION CAUSED BY A SYSTEM ERROR THAT DOES NOT PRECLUDE THE SUCCESSFUL EXECUTION OF SUBSEQUENT SQL STATEMENTS")
Error: SQLSTATE=22504 SQLCODE=-191 ("A STRING CANNOT BE USED BECAUSE IT IS INVALID MIXED DATA")

I try to insert data into an Sql defined table with a CLOB field.
The funny thing is, some months ago (when I implemeted the feature which is now broken), the statement performed without any issues. Now I get the same behavior on both of our IBM i machines.
I think the error might origin in our environment or runtime - I just don't understand the error. Hopefully someone of you can help me figure it out.
To Reproduce
Sql Table definition:
create or replace table holog.HOLOJP (
  subjjl char(64) not null default '',
  lomejl clob not null default ''
)
rcdfmt holojlf0;

node.js TypeScript Code (snippets from my setup - please ask for further details if you need some):
// from data access layer
export const Repository = {
  addEntryToHoloj(
    params: {
      subject: string;
      object: object;
    },
    programNumber: number
  ): Promise<void> {
    return new Promise(async (resolve, reject) => {
      SqlDataProvider.execute(
        "insert into holog.holojp values (?, ?) with NC",
        params.subject,
        JSON.stringify(params.object)
      )
        .then(() => resolve())
        .catch(reject);
    });
  },
};

// data connector
const idbPConnectionPool = new DBPool(
  {
    url: "*LOCAL",
  },
  {
    debug: true,
    incrementSize: 8,
  }
);

// from framework layer
export default class SqlDataProvider {
  public static execute<ReturnType = any>(
    sqlStatement: string,
    ...sqlParams: Array<string | number>
  ): Promise<ReturnType[]> {
    return new Promise(async (resolve, reject) => {
      idbPConnectionPool
        .prepareExecute(sqlStatement, sqlParams, {
          io: "in",
        })
        .then(resolve)
        .catch((reason) => {
          Logger.warn(reason);
          reject(reason);
        });
    });
  }
}

Expected behavior
The supplied Sql Statement should add an entry to table holog/HOLOJP.
Additional context
Here's some debug output from the database connection. The json error message was generated after the reject by class Logger.
You can find the actual values for the parameters in this output - I just can't find why they should have a wrong format
Finding available Connection...
Connection 0 found
Preparing Statement...
Prepare().
SQLPrepare(0): insert into holog.jwtjtp values ((select ukjwtisji from qs36f.jwtisp where isidji = ?), ?, ?) with NC
Finding available Connection...
Connection 1 found
Preparing Statement...
Prepare().
SQLPrepare(0): insert into holog.holojp values (?, ?) with NC
Binding Parameters...
Size of BoundParams: 3
 [["Demo",1,1],["fbe47aa2-bf28-4c32-a2fc-d986c31fb9bb",1,1],[1604325629,1,2]]
BindParamAsync().
Binding Parameters...
Size of BoundParams: 2
 [["Demo Errors",1,1],["{\"userName\":\"dummy\",\"deviceId\":\"dummy1\",\"logEntries\":[{\"timestamp\":\"fancytime\",\"logType\":\"fancy\",\"severity\":\"error\",\"logMessage\":\"idk what to do\"}],\"sessionId\":\"lksensaergr3\",\"apiKey\":\"kaai3on\"}",1,1]]
BindParamAsync().
SQLBindParameter(0) TYPE[ 1] SIZE[ 32] DIGI[0] IO[1] IND[ -3] INDEX[0]
SQLBindParameter(0) TYPE[ 1] SIZE[ 36] DIGI[0] IO[1] IND[ -3] INDEX[1]
SQLBindParameter(0) TYPE[ 2] SIZE[ 14] DIGI[0] IO[1] IND[  0] INDEX[2]
Execute().
SQLBindParameter(0) TYPE[ 1] SIZE[ 64] DIGI[0] IO[1] IND[ -3] INDEX[0]
SQLBindParameter(0) TYPE[14] SIZE[1048576] DIGI[0] IO[1] IND[1048576] INDEX[1]
SQLExecuteAsync(0):
SQLNUMRESULTSCOLS(0) Column Count = 0
NO RESULTS :SQLExecuteAsync()
Execute().
Fetching Result Set...
FetchAllAsync().
SQL did not return a result set.
SQLFreeStmt: stmth 3 [SQL_DROP]
SQLFreeStmt(0)
SQLExecuteAsync(-1):
Detaching Connection 1...
SQLFreeStmt: stmth 5 [SQL_DROP]
SQLFreeStmt(0)
Connection 1 detached
{"level":"warn","message":"PE: Failed to execute() statement","metadata":{"pid":818329},"stack":"Error: PE: Failed to execute() statement\n    at /node/NodeCode-HRAS/node_modules/idb-pconnector/lib/dbPool.js:271:18\n    at DBPool.prepareExecute (/node/NodeCode-HRAS/node_modules/idb-pconnector/lib/dbPool.js:269:17)\nCaused By:\n Error: SQLSTATE=22504 SQLCODE=-191 Mischbytedaten oder UTF-8-Daten haben falsches Format.\n    at Object.<anonymous> (/node/NodeCode-HRAS/node_modules/idb-pconnector/lib/statement.js:153:18)","timestamp":"2020-11-02T14:03:43.061Z"}

What's the CCSID of the CLOB?

Table object has CCSID 273
And according to catalog SYSCOLUMNS the definition for field LOMEJL has CCSID 273

Two Sql Insert statements are performed one right after the other.
When debugging / single-stepping, it looks to me like the first one (holog.jwtjtp, dds defined, no special columns) always succeeds, and the second one (holog.holojp, sql defined - see definition above) always crashes.
When I try to run the exact statement (insert into holog.holojp) with another sql tool (in my case DBeaver), it works just fine.
But I gotta say, I have to copy-paste the parameter values from somewhere, e.g. VS Code debugging console - that could influence the value and change CCSIDs. So that's an unfair comparison.

@patrickhrastnik Did you manage to find a solution on this issue?

@patrickhrastnik Did you manage to find a solution for this issue?

No, not yet... I struggle to figure out what the issue is. It doesn't seem to have to do anything with codepages or special characters. But I didn't have much time to further investigate the issue, or to test different settings.
What's putting me off is, when I deployed the feature for the next team to work with, everything worked as intended. A few weeks/months later the feature was broken - and I wasn't able to find out what changed in the meantime.
Nevertheless, we decided last week to redevelop the broken feature using an ELK stack. That was the final goal after all.
I'm just curious if this bug only occurs with CLOB fields, with certain sql defined tables, ... whether I have to expect other features to break.

@patrickhrastnik Did you manage to find a solution for this issue?

No, not yet... I struggle to figure out what the issue is. It doesn't seem to have to do anything with codepages or special characters. But I didn't have much time to further investigate the issue, or to test different settings.
What's putting me off is, when I deployed the feature for the next team to work with, everything worked as intended. A few weeks/months later the feature was broken - and I wasn't able to find out what changed in the meantime.
Nevertheless, we decided last week to redevelop the broken feature using an ELK stack. That was the final goal after all.
I'm just curious if this bug only occurs with CLOB fields, with certain sql defined tables, ... whether I have to expect other features to break.

I'm expericing the same issue. We have a table as following
CREATE TABLE ORDERS ( 	ORDER_ID CHAR(25) DEFAULT ' ' NOT NULL, 	ERP_NAME CHAR(50) DEFAULT ' ' NOT NULL, );
In our case the error occur when we insert into that table with the following string in the column ERP_NAME

'DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG'

I've tried to play around with the string by removing and replacing characters. Apperantly in my case it seems to accept the string if I fx. change the 'Æ' in the word 'Anlæg' with 'A' and other standard characters.
The strange thing as you also mentioned is that it works fine in DBeaver. I think this might be a bug with the idb-pconnector.

@commIT-Esbjerg
What's the CCSID for your CHAR FIELDS?
Are you also running into the same errors listed above?

Error: SQLSTATE=58004 SQLCODE=-901 ("UNSUCCESSFUL EXECUTION CAUSED BY A SYSTEM ERROR THAT DOES NOT PRECLUDE THE SUCCESSFUL EXECUTION OF SUBSEQUENT SQL STATEMENTS")

Error: SQLSTATE=22504 SQLCODE=-191 ("A STRING CANNOT BE USED BECAUSE IT IS INVALID MIXED DATA")

Here is the code I used to try and reproduce the error
const { Connection, Statement } = require('idb-pconnector');

async function main() {
  const connection = new Connection({ url: '*LOCAL' });
  connection.debug(true);
  const statement = new Statement(connection);
  const schema = 'TEST';

  const schemaResult = await statement.exec(`SELECT SCHEMA_NAME FROM qsys2.sysschemas WHERE SCHEMA_NAME = '${schema}'`);
  await statement.closeCursor();

  if (!schemaResult.length) {
    await statement.exec(`CREATE SCHEMA ${schema}`);
  }

  await statement.exec(`CREATE OR REPLACE TABLE ${schema}.ORDERS ( ORDER_ID CHAR(25) DEFAULT ' ' NOT NULL, ERP_NAME CHAR(50) DEFAULT ' ' NOT NULL);`);

  await statement.exec(`INSERT INTO ${schema}.ORDERS(ERP_NAME) VALUES('DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG') with NONE`);

  const results = await statement.exec(`SELECT * FROM ${schema}.ORDERS`);
  console.log(`Result Set:\n ${JSON.stringify(results)}`);

  await statement.close();
  await connection.close();
}

main().catch((error) => {
  console.error(error);
});

Output:
SQLExecDirect(0): SELECT SCHEMA_NAME FROM qsys2.sysschemas WHERE SCHEMA_NAME = 'TEST'
SQLNUMRESULTSCOLS(0) Column Count = 1
DescCol(0)      index[0]        Type[VARCHAR]   Scale[0]        Precise[128]
SQLCloseCursor: stmth 3
SQLCloseCursor(0)
SQLExecDirect(1): CREATE OR REPLACE TABLE TEST.ORDERS ( ORDER_ID CHAR(25) DEFAULT ' ' NOT NULL, ERP_NAME CHAR(50) DEFAULT ' ' NOT NULL);
SQLExecDirect SUCCESS_WITH_INFO (7905) 01567
SQLNUMRESULTSCOLS(0) Column Count = 0
NO RESULTS: SQLExecDirect() callSQLExecDirect(0): INSERT INTO TEST.ORDERS(ERP_NAME) VALUES('DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG') with NONE
SQLNUMRESULTSCOLS(0) Column Count = 0
NO RESULTS: SQLExecDirect() callSQLExecDirect(0): SELECT * FROM TEST.ORDERS
SQLNUMRESULTSCOLS(0) Column Count = 2
Result Set:
 [{"SCHEMA_NAME":"                         ","":"D"}]
SQLFreeStmt: stmth 3 [SQL_DROP]
SQLFreeStmt(0)
SQLDisconnect: conn obj [1803aabf0] handler [2]
SQLFreeConnect: conn obj [1803aabf0] handler [2]
SQLFreeConnect[0]

On my end the CCSID is 37. The insert is successful but there is an issue fetching the data. As can be seen from the result set output:
Result Set:
 [{"SCHEMA_NAME":"                         ","":"D"}]

Although selecting the data from Run Sql Scripts shows the proper string:

@commIT-Esbjerg
What's the CCSID for your CHAR FIELDS?
Are you also running into the same errors listed above?

Error: SQLSTATE=58004 SQLCODE=-901 ("UNSUCCESSFUL EXECUTION CAUSED BY A SYSTEM ERROR THAT DOES NOT PRECLUDE THE SUCCESSFUL EXECUTION OF SUBSEQUENT SQL STATEMENTS")
Error: SQLSTATE=22504 SQLCODE=-191 ("A STRING CANNOT BE USED BECAUSE IT IS INVALID MIXED DATA")

Here is the code I used to try and reproduce the error
const { Connection, Statement } = require('idb-pconnector');

async function main() {
  const connection = new Connection({ url: '*LOCAL' });
  connection.debug(true);
  const statement = new Statement(connection);
  const schema = 'TEST';

  const schemaResult = await statement.exec(`SELECT SCHEMA_NAME FROM qsys2.sysschemas WHERE SCHEMA_NAME = '${schema}'`);
  await statement.closeCursor();

  if (!schemaResult.length) {
    await statement.exec(`CREATE SCHEMA ${schema}`);
  }

  await statement.exec(`CREATE OR REPLACE TABLE ${schema}.ORDERS ( ORDER_ID CHAR(25) DEFAULT ' ' NOT NULL, ERP_NAME CHAR(50) DEFAULT ' ' NOT NULL);`);

  await statement.exec(`INSERT INTO ${schema}.ORDERS(ERP_NAME) VALUES('DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG') with NONE`);

  const results = await statement.exec(`SELECT * FROM ${schema}.ORDERS`);
  console.log(`Result Set:\n ${JSON.stringify(results)}`);

  await statement.close();
  await connection.close();
}

main().catch((error) => {
  console.error(error);
});

Output:
SQLExecDirect(0): SELECT SCHEMA_NAME FROM qsys2.sysschemas WHERE SCHEMA_NAME = 'TEST'
SQLNUMRESULTSCOLS(0) Column Count = 1
DescCol(0)      index[0]        Type[VARCHAR]   Scale[0]        Precise[128]
SQLCloseCursor: stmth 3
SQLCloseCursor(0)
SQLExecDirect(1): CREATE OR REPLACE TABLE TEST.ORDERS ( ORDER_ID CHAR(25) DEFAULT ' ' NOT NULL, ERP_NAME CHAR(50) DEFAULT ' ' NOT NULL);
SQLExecDirect SUCCESS_WITH_INFO (7905) 01567
SQLNUMRESULTSCOLS(0) Column Count = 0
NO RESULTS: SQLExecDirect() callSQLExecDirect(0): INSERT INTO TEST.ORDERS(ERP_NAME) VALUES('DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG') with NONE
SQLNUMRESULTSCOLS(0) Column Count = 0
NO RESULTS: SQLExecDirect() callSQLExecDirect(0): SELECT * FROM TEST.ORDERS
SQLNUMRESULTSCOLS(0) Column Count = 2
Result Set:
 [{"SCHEMA_NAME":"                         ","":"D"}]
SQLFreeStmt: stmth 3 [SQL_DROP]
SQLFreeStmt(0)
SQLDisconnect: conn obj [1803aabf0] handler [2]
SQLFreeConnect: conn obj [1803aabf0] handler [2]
SQLFreeConnect[0]

On my end the CCSID is 37. The insert is successful but there is an issue fetching the data. As can be seen from the result set output:
Result Set:
 [{"SCHEMA_NAME":"                         ","":"D"}]

We will need to further investigate how to resolve retrieving the data at the idb-connector level
Although selecting the data from Run Sql Scripts shows the proper string:

@kadler Should users be using UTF-8 CCSID 1208 ?

I'm using CCSID 277 for the CHAR fields. I tried to change the CCSID to 1208 as you mentioned and the record was inserted succesfully.
The error I'm getting when CCSID 277 for the CHAR fields is as following:

SQLSTATE=22504 SQLCODE=-191 Mixed data or UTF-8 data not properly formed.

Go away, stale-bot!

Go away, stale-bot!

@commIT-Esbjerg @patrickhrastnik Can you each please give your ILE job locale information (CNTRYID, LANGID, Job CCSID, default Job CCSID when running node (eg. system dspjob | grep -E 'CNTRYID|LANGID|CCSID')?
Given that we can partially recreate the issue, hopefully with this we can more accurately recreate it and use internal tools to trace and diagnose the issue.

@commIT-Esbjerg @patrickhrastnik Can you each please give your ILE job locale information (CNTRYID, LANGID, Job CCSID, default Job CCSID when running node (eg. system dspjob | grep -E 'CNTRYID|LANGID|CCSID')?
Given that we can partially recreate the issue, hopefully with this we can more accurately recreate it and use internal tools to trace and diagnose the issue.

@kadler Here's the output of this command on our two systems.
  :   CNTRYID      AT
   ID des codierten Zeichensatzes . . . . . . .    :   CNTRYID      AT
   ID des codierten Zeichensatzes . . . . . . .  :   DFTCCSID     273
 Name                                    Wert                                                                              CCSID
 QIBM_PASE_CCSID                         '819'                                                                               273

@kadler Here's the output of this command on our two systems.
  :   CNTRYID      AT
   ID des codierten Zeichensatzes . . . . . . .    :   CNTRYID      AT
   ID des codierten Zeichensatzes . . . . . . .  :   DFTCCSID     273
 Name                                    Wert                                                                              CCSID
 QIBM_PASE_CCSID                         '819'                                                                               273

@kadler

@kadler

@kadler

@kadler

@commIT-Esbjerg
I was able to reproduce this issue within idb-connector:
Steps to reproduce:

Create the table

CREATE OR REPLACE TABLE TEST.ORDERS(
  ORDER_ID CHAR(25) CCSID 277 DEFAULT ' ' NOT NULL,
  ERP_NAME CHAR(50) CCSID 277 DEFAULT ' ' NOT NULL);

Run the following script

const { dbconn, dbstmt, IN, CHAR } = require('idb-connector');

const insert = `INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE`
const value = 'DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG';
const parametersOldFormat = [[value, IN, CHAR]];

// log length of the input string and the bytes length
console.log(console.log(`Length of value: ${value.length} byte length: ${(new TextEncoder().encode(value)).length}`););

const connection = new dbconn();
connection.debug(true);
connection.conn('*LOCAL');
const statement = new dbstmt(connection);

statement.prepare(insert, (error) => {
   if (error) { throw error; }
   statement.bindParam(parametersOldFormat, (error) => {
      statement.execute((out, error) => {
         if (error) { throw error; }
         statement.close();
         connection.disconn();
         connection.close();
      });
   });
});

Output:
$ node test.js
Length of value: 49 byte length: 52

SQLConnect(0): conn obj [180508270] handler [2]
Prepare().
SQLPrepare(0): INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE
BindParamAsync().
SQLBindParameter(0) TYPE[ 1] SIZE[ 50] DIGI[0] IO[1] IND[ -3] INDEX[0]
Execute().
SQLExecuteAsync(-1):
undefined:0

[Error: SQLSTATE=22504 SQLCODE=-191 Mixed data or UTF-8 data not properly formed.]

As you can see from output above, the the value DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG to insert contains 49 characters but the byte length is 52.
Interesting enough I found that if you use bindParameters instead of bindParam The insert is successful.
const { dbconn, dbstmt, } = require('idb-connector');

const insert = `INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE`
const value = 'DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG';
const parameters = [value];
const connection = new dbconn();

connection.debug(true);
connection.conn('*LOCAL');
const statement = new dbstmt(connection);

statement.prepare(insert, (error) => {
  if (error) { throw error; }
  statement.bindParameters(parameters, (error) => {
    statement.execute((out, error) => {
         if (error) { throw error; }
         statement.exec(select, (result) => { // retrieve the inserted value
           console.log(JSON.stringify(result));
           statement.close();
           connection.disconn();
           connection.close();
         });
    });
  });
});

Output:
$ node test.js
Length of value: 49 byte length: 52

SQLConnect(0): conn obj [1804c5310] handler [2]
Prepare().
SQLPrepare(0): INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE
BindParameters().
SQLBindParameter(0) TYPE[ 1] SIZE[ 50] DIGI[0] IO[3] IND[ 52] INDEX[0]
Execute().
SQLExecuteAsync(0):
SQLNUMRESULTSCOLS(0) Column Count = 0
NO RESULTS :SQLExecuteAsync()
SQLExecDirect(0): SELECT ERP_NAME FROM TEST.ORDERS
SQLNUMRESULTSCOLS(0) Column Count = 1
DescCol(0)      index[0]        Type[CHAR]      Scale[0]        Precise[50]
[{"ERP_NAME":"DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG "}]
SQLFreeStmt: stmth 3 [SQL_DROP]
SQLFreeStmt(0)
SQLDisconnect: conn obj [1804c5310] handler [2]
SQLFreeConnect: conn obj [1804c5310] handler [2]
SQLFreeConnect[0]

The main difference here is that the indicator is set the length of UTF-8 Strings in bytes (52) within bindParamters vs in bindParams the indicator is set to SQL_NTS. SQL CLI does not read the proper length of the string buffer and is not valid utf8 therefore the Error: SQLSTATE=22504 SQLCODE=-191 Mixed data or UTF-8 data not properly formed.]. We can fix this by setting the indicator properly like is done in the bindParameters case.

@commIT-Esbjerg
I was able to reproduce this issue within idb-connector:
Steps to reproduce:

Create the table

CREATE OR REPLACE TABLE TEST.ORDERS(
  ORDER_ID CHAR(25) CCSID 277 DEFAULT ' ' NOT NULL,
  ERP_NAME CHAR(50) CCSID 277 DEFAULT ' ' NOT NULL);

Run the following script

const { dbconn, dbstmt, IN, CHAR } = require('idb-connector');

const insert = `INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE`
const value = 'DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG';
const parametersOldFormat = [[value, IN, CHAR]];

// log length of the input string and the bytes length
console.log(console.log(`Length of value: ${value.length} byte length: ${(new TextEncoder().encode(value)).length}`););

const connection = new dbconn();
connection.debug(true);
connection.conn('*LOCAL');
const statement = new dbstmt(connection);

statement.prepare(insert, (error) => {
   if (error) { throw error; }
   statement.bindParam(parametersOldFormat, (error) => {
      statement.execute((out, error) => {
         if (error) { throw error; }
         statement.close();
         connection.disconn();
         connection.close();
      });
   });
});

Output:
$ node test.js
Length of value: 49 byte length: 52

SQLConnect(0): conn obj [180508270] handler [2]
Prepare().
SQLPrepare(0): INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE
BindParamAsync().
SQLBindParameter(0) TYPE[ 1] SIZE[ 50] DIGI[0] IO[1] IND[ -3] INDEX[0]
Execute().
SQLExecuteAsync(-1):
undefined:0

[Error: SQLSTATE=22504 SQLCODE=-191 Mixed data or UTF-8 data not properly formed.]

As you can see from output above, the the value DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG to insert contains 49 characters but the byte length is 52.
Interesting enough I found that if you use bindParameters instead of bindParam The insert is successful.
const { dbconn, dbstmt, } = require('idb-connector');

const insert = `INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE`
const value = 'DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG';
const parameters = [value];
const connection = new dbconn();

connection.debug(true);
connection.conn('*LOCAL');
const statement = new dbstmt(connection);

statement.prepare(insert, (error) => {
  if (error) { throw error; }
  statement.bindParameters(parameters, (error) => {
    statement.execute((out, error) => {
         if (error) { throw error; }
         statement.exec(select, (result) => { // retrieve the inserted value
           console.log(JSON.stringify(result));
           statement.close();
           connection.disconn();
           connection.close();
         });
    });
  });
});

Output:
$ node test.js
Length of value: 49 byte length: 52

SQLConnect(0): conn obj [1804c5310] handler [2]
Prepare().
SQLPrepare(0): INSERT INTO TEST.ORDERS(ERP_NAME) VALUES(?) with NONE
BindParameters().
SQLBindParameter(0) TYPE[ 1] SIZE[ 50] DIGI[0] IO[3] IND[ 52] INDEX[0]
Execute().
SQLExecuteAsync(0):
SQLNUMRESULTSCOLS(0) Column Count = 0
NO RESULTS :SQLExecuteAsync()
SQLExecDirect(0): SELECT ERP_NAME FROM TEST.ORDERS
SQLNUMRESULTSCOLS(0) Column Count = 1
DescCol(0)      index[0]        Type[CHAR]      Scale[0]        Precise[50]
[{"ERP_NAME":"DANF.MAGN.VENTIL 32U7115 TIL ÅBNE-/SANITÆRE ANLÆG "}]
SQLFreeStmt: stmth 3 [SQL_DROP]
SQLFreeStmt(0)
SQLDisconnect: conn obj [1804c5310] handler [2]
SQLFreeConnect: conn obj [1804c5310] handler [2]
SQLFreeConnect[0]

The main difference here is that the indicator is set the length of UTF-8 Strings in bytes (52) within bindParamters vs in bindParams the indicator is set to SQL_NTS. SQL CLI does not read the proper length of the string buffer and is not valid utf8 therefore the Error: SQLSTATE=22504 SQLCODE=-191 Mixed data or UTF-8 data not properly formed.]. We can fix this by setting the indicator properly like is done in the bindParameters case.

I'm going transfer this issue up to idb-connector to start working on a fix.

I'm going transfer this issue up to idb-connector to start working on a fix.


pact-jvm-master setup

I am trying to setup the pact-jvm-master project, and when building the project I am getting errors. So far I have:

cloned the project from github - https://github.com/DiUS/pact-jvm
open in intellij as existing project and imported using gradle
Added scala as intellij plugin
Added scala sdk to project within Project Structure | Global Libraries

When I go to Build | Build project, I am seeing 6 errros with Matchers.scala. Some examples of errors below:
1.pact-jvm-master\pact-jvm-matchers\src\main\scala\au\com\dius\pact\matchers\Matchers.scala
Error(76,37) not found: type MismatchFactory mismatchFn:MismatchFactory[Mismatch]):List[Mismatch] =  {
def domatch[Mismatch](matchers: MatchingRules, category: String, path: Seq[String], expected: Any, actual: Any,
mismatchFn: MismatchFactory[Mismatch]) : List[Mismatch] = {
val matcherDef = selectBestMatcher(matchers, category, path)
asScalaBuffer(MatcherExecutorKt.domatch(matcherDef, path, expected, actual, mismatchFn)).toList
}

pact-jvm-master\pact-jvm-matchers\src\main\scala\au\com\dius\pact\model\Matching.scala
Error:73,38) not found: type MismatchFactory, object HeaderMismatchFactory extends MismatchFactory[HeaderMismatch]{

object HeaderMismatchFactory extends MismatchFactory[HeaderMismatch] {
import JavaConversions._
def create(expected: Object, actual: Object, message: String, path: java.util.List[String]) = {
HeaderMismatch(path.toList.last, expected.toString, actual.toString, Some(message))
}
}
Is there anything else I need to do with Scala so that the project builds?

Remove the Scala SDK from the Global Libraries, IntelliJ will import all the required settings from the Gradle build file.
To build the project, use the gradle scripts in the root (gradlew for Linux and OSX, gradlew.bat for Windows) and run them from a command line terminal.
$ ./gradle build

This will compile all the source files, generate the jar files and execute all the tests.
If you want to run it from within IntelliJ, use the Gradle Tool window and double click the build task (you'll need to find it in the tree under pact-jvm | pact-jvm (root) | Tasks | build | build.

Thanks for the help.  I have removed the Scala SDK from the global libraries and running the build through the command line with gradle. The build  fails on task ':pact-jvm-matchers_2.11:compileScala.'

think I worked it out. if I run build.gradle from specific project, eg pact-jvm-consumer-junit, or pat-jvm-provider-junit then the project compiles successfully. If i run gradle.build from root pact-jvm-master then I get scala compilation errors.

Looks like Gradle is not compiling the source code in the correct order on your machine.

Aah, your're running the Gradle installed on your machine, which is probably version 4.0.
Use the gradlew.bat wrapper script in the root of the project. It will use the correct version of Gradle.

Awesome, thanks. I was using gradle 4.02. but now using gradlew.bat and running tests from root pact-jvm-master from the command line.  I think the wrapper is using gradle 3.5
One thing I did notice is that the junit consumer tests were failing with the error: 'java.lang.NoClassDefFoundError: Could not initialize class au.com.dius.pact.model.RequestMatching$'
To stop this error I added the dependencies below into pact-jvm-master/build.gradle, as  there was possibly a dependency mismatch
compile group: 'au.com.dius', name: 'pact-jvm-provider_2.11', version: '3.5.2'
compile group: 'au.com.dius', name: 'pact-jvm-consumer_2.11', version: '3.5.2'


Add @Supplied annotation for method parameters [Suggestion]

@Supplied annotation may be added for method parameters so that there is an equivalent of a method which replaces parameter T arg with Supplier<T> arg whose get() method is invoked when the value of a field is needed.
For example (logging seams to be the most obvoius one)
// in class Logger
void debug(final String message) {
    if (debug) log(LogLevel.DEBUG, message);
}

call like logger.debug("Manager set to ".concat(manager.toString())); // manager.toString() is a heavy operation would perform a heavy operation of creating a String object although this may be useless if debug in logger is set to false.
Instead Lombok would generate
// in class Logger
void debug(final Supplier<String> message) {
    if (debug) log(LogLevel.DEBUG, message.get());
}

so that the developer could use logger.debug(() -> "Manager set to ".concat(manager.toString())); // manager.toString() is a heavy operation which (thanks to lambda) would not allocate and calculate new Strings unless they are needed.
As for annotation paramaters there would be some which may be helpful in order to exand this feature's functionalitity:

boolean keepDefault or keepBasic or keepExact etc. — whether lombok should keep method without supplier or not (default value is to be discussed)
String generatedName — if keepDefault is to true then which names to use for generated method
boolean cache — whether the value should be cached once got from supplier or each refererence to the field should be replaced with Supplier#get() (defaults to true of course). It's to be discussed whether this feature is required or not as the false-case is a really specific one.
boolean allowExceptions whether to use default Supplier<T> or some equivalent which has a signature of T get() throws Throwable so that the developer should not catch exceptions in lambda body. This should be discussed as defult JRE does not have such class and so Lombok has to generate its own, probably for each class, otherwise, if generating one single class for the whole application, the developer should decide how to name it in lombok.config and/or annotation parameter (e.g. generatedSupplierClassName)

Why we closed this issue

I'm not saying it is a bad idea per se, it's just that I don't see this happening any time soon. Also, we will not accept pull requests, because of the maintenance load.


Make a static property storeURL for the default store URL

Just an idea for the storeURL to be declared in the CoreData infrastructure scope.
Maybe an idea not to import CoreData in the SceneDelegate, although Main can import anything. What do you think? Is this a thing to consider?

Hi @mihaicris, thank you for the PR!
Yes, the CoreDataStore can expose a default storeURL for the clients.
We prefer to choose a file URL in the Composition Root because that's an application-specific decision - and the CoreDataStore class can be used across applications.
In fact, an application may decide to create more than one store URL (for example, supporting multiple users in the app, using separate stores for each).
Thus, we prefer to leave this decision to clients.
But if you find it convenient to expose a default URL for your use case, that's fine too ✅


Castling impossible with Move::from_str

Just as title says. e1g1 returns false when using try_play and does not castle when using try_play_unchecked.
Thanks

This is intentional. Castling moves are represented with their FRC notation (king takes rook):

Play a move while checking its legality. Note that this only supports Chess960 style castling.
I may have to make some changes regarding this behaviour. Any thoughts?

I'm sorry - looks like I can't read the docs 🙈
I've no thoughts on the matter. It makes sense now that I see how to do it.
Thanks for your help and sorry for wasting your time!


src error

Hi, I just bumped into this error when cloned the repository:
Error: Image is missing required "src" property. Make sure you pass "src" in props to the next/image component. Received: {"width":256,"height":120}
Thank you for your time and consideration !

+1
I'm also facing same issue

Any suggestions/idea will be helpful.

Hi,
Thanks for reaching out!
If Im not mistaken I dumped this project because so many errors started
bumping out, but I believe to fix this one you should check the image size
and the size its being rended, because Next js doesn’t allow false
rendering hence its showing this error
Best of luck!
On Sat, 12 Aug 2023 at 7:47 PM, UMAIR MOHAMMAD @.***>
wrote:

+1
I'm also facing same issue
[image: image]
https://user-images.githubusercontent.com/16179313/260249382-338aa93c-6cdb-41e4-a717-b38b39cb4ea6.png
[image: image]
https://user-images.githubusercontent.com/16179313/260249465-ff55e2e5-9f20-4452-b091-70651f5f3a2f.png
Any suggestions/idea will be helpful.
—
Reply to this email directly, view it on GitHub
https://github.com/cosmicjs/unft-marketplace/issues/15#issuecomment-1676027806,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXU2MIGUOCEAOFVD77FQK2TXU66SFANCNFSM6AAAAAAYCXPGU4
.
You are receiving this because you authored the thread.Message ID:
@.***>

This may have been an issue with the user added content missing data. This has been updated to connect to the new dashboard and API which should fix this issue.

I recommend:

Log into the new Cosmic dashboard and create a new project. https://app.cosmicjs.com/login
Select start from template and choose the uNFT template.
Download the latest code from the repo which connects to the new dashboard since #17

I'm going to close this PR. Let me know if you run into any other issues! And thank you for the report 🙌🏻

Thank you @tonyspiro. It worked!


Display package page is partially broken on Internet Explorer

This breaks:

The copy button on current and new design
Opening/closing sections on current design

Other features (switching tabs/installation commands, telemetry) seem to work as expected.
Current design
URL https://dev.nugettest.org/packages/Newtonsoft.Json/13.0.1-beta1

Redesign
URL: https://dev.nugettest.org/packages/Newtonsoft.Json/13.0.1-beta1?preview=1

Moving this to backlog as according to @ryuyu the minimum requirement is Chrome and Edge support. Also, this bug predates the display package page redesign


Update pytmv1 to 0.8.3 for demisto PR (Trend micro vision one #34456)

Status
Ready
Related Content Pull Request
Related PR: link to the PR at demisto/content
https://github.com/demisto/content/pull/34456
Related Issues
Related: link to the issue
Description
Update pytmv1 package to 0.8.3 that adds an additional action (get observed attack techniques).

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: shaqnawe:x: JudahSchwartzYou have signed the CLA already but the status is still pending? Let us recheck it.

@BEAdi How I can go about resolving the update verify script error?


Unable to get id_token when OAuth2 v2.0.6

A nil is returned at the following location.
https://github.com/Sage/omniauth-cognito-idp/blob/v0.1.1/lib/omniauth/strategies/cognito_idp.rb#L76
When I did this, it worked correctly.
      def id_token
        access_token.response.parsed['id_token']
      end

Can confirm. Using the following monkeypatch for now, based on your comment:
module OmniAuth
  module Strategies
    class CognitoIdP < OmniAuth::Strategies::OAuth2
      def id_token
        access_token.response.parsed['id_token']
      end
    end
  end
end

I had to do 'access_token.token' in order to get it to work


Have better out of the box support for logback

@phejl Hi, could you please provide more details about the new capabilities provided by this PR?
Based on Spring Boot documentation:

In addition, a legacy base.xml file is provided for compatibility with earlier versions of Spring Boot.

So I would tend to think base.xml is not required to be included, for defaults.xml I am not sure but I think it is now done programmatically.
@wilkinsona Could you please confirm that base.xml is not required for a typical Spring Boot 2.5 app? What about defaults.xml, based on the documentation is seems needed but maybe such configuration is now performed programmatically?

@phejl Hi, could you please provide more details about the new capabilities provided by this PR?
Based on Spring Boot documentation:

In addition, a legacy base.xml file is provided for compatibility with earlier versions of Spring Boot.

So I would tend to think base.xml is not required to be included, for defaults.xml I am not sure but I think it is now done programmatically.

@sdeleuze Aha, that might be my misuderstanding. As most of the online resources still uses incluson of defaults.xml (including my app). Hence profiler suggested it should be included. Typehints are suggested for common things one ususally customize (console appender, rolling files).
Adds support for simple condisions in form isDefined('VAR') and isNull('VAR') as I believe this might cover major portion of use cases of Janino which would otherwise fail in native image as it is creating bytecode at runtime and loading it as class.

Interesting, so does this means we can now support basic logback.xml files by skipping Janino for such use cases?
In the documentation update you mentioned:

Logback XML configuration via -Dlogging.config or --logging.config is supported but you need to enable XML support

I recently removed the conditional activation of the Logback substitution based on the XML flag since we were not supporting it, if we do we should maybe bring back RemoveXmlSupport.class here.

Interesting, so does this means we can now support basic logback.xml files by skipping Janino for such use cases?

I thought the problem with logback.xml on classpath was it was triggering some unwanted build time initializations. My use case I have tested to be working was like ./my-native-image --logging.config=/my/logback-config.xml (with enabled xml support) containing simple conditions.

In the documentation update you mentioned:

Logback XML configuration via -Dlogging.config or --logging.config is supported but you need to enable XML support

I recently removed the conditional activation of the Logback substitution based on the XML flag since we were not supporting it, if we do we should maybe bring back RemoveXmlSupport.class here.

Hm, in my case of log file argument this code is actually bypassed (org.springframework.boot.logging.logback.LogbackLoggingSystem:185) as long as XML is enabled.

@sdeleuze I looked again at the problem with logback.xml bundled as resource (not something this PR intend to solve, but anyway). If I understand things correctly the problematic part is org.slf4j.impl.StaticLoggerBinder's static initializer calling SINGLETON.init();. I'm afraid we can't really push all this to build time. It would initialize custom things such as ch.qos.logback.core.spi.PropertyDefiners in build time when it might not be possible to really evaluate the value (might be deployment specific). On the other hand I assume we don't want to do everything at runtime. I guess the solution would be to postpone that init() method to be invoked lazily. I'm not sure how to do that without touching it's source code as it seems the @Substitution is not applied at the time class initializers are invoked at build time.

@wilkinsona Could you please confirm that base.xml is not required for a typical Spring Boot 2.5 app? What about defaults.xml, based on the documentation is seems needed but maybe such configuration is now performed programmatically?

A Boot app that only uses properties to configure its logging won't use base.xml or defaults.xml. If someone is using XML to configure Logback then they may import defaults.xml but they do not have to do so. They may also choose to import console-appender.xml or file-appender.xml. No one should be using base.xml any more, particularly not if they're on the leading edge and using Spring Native.

@wilkinsona Could you please confirm that base.xml is not required for a typical Spring Boot 2.5 app? What about defaults.xml, based on the documentation is seems needed but maybe such configuration is now performed programmatically?

A Boot app that only uses properties to configure its logging won't use base.xml or defaults.xml. If someone is using XML to configure Logback then they may import defaults.xml but they do not have to do so. They may also choose to import console-appender.xml or file-appender.xml. No one should be using base.xml any more, particularly if they're on the leading edge and using Spring Native.

@wilkinsona Thanks for your input! Should the patch be updated to allow access to defaults.xml, console-appender.xml and file-appender.xml (ommitting base.xml) as a result?

I think that's a question of what scope the Spring Native team want their Logback support to have, so I'll defer to them.

@phejl I see in the updated documentation:

Logback XML configuration via -Dlogging.config or --logging.config is supported but you need to enable <<spring-aot-configuration, XML support>>.

What prevents us to support logback.xml provided in the classpath if it uses the simple constructs supported in the PR?

@phejl Sorry I missed you comment on https://github.com/spring-projects-experimental/spring-native/pull/895#issuecomment-876198704 where you already explained that.
Please add a sample in order to allow me to merge this PR.

@sdeleuze

Please add a sample in order to allow me to merge this PR.

Sure I'll try. I just need some more spare time :)

@sdeleuze

Please add a sample in order to allow me to merge this PR.

Sample added.

@sdeleuze Please, is there anything more needed from my side?


Close express security vulnerability (4.19.2)

Per SYNK we should upgrade express to 4.19.2

Thanx, pay attension that this is probably an issue of you lock file, since the usage of ^ should get latest v4


ngx.balancer and ngx_postgrest working together (read connection info from env)?

Is there any way of making the two compatible?
The usecase is that i do not want (can't) to hardcode the connection info in the config file, i have to read it from the env.
For a proxy upstream i can do this
upstream myhost {
        server <IP_ADDRESS>:3000; #dummy
        balancer_by_lua_block {
            local balancer = require 'ngx.balancer'
            local host = os.getenv('HOST')
            local port = os.getenv('PORT')
            local ok, err = balancer.set_current_peer(host, port)
            if not ok then
                return ngx.exit(500)
            end
        }
        keepalive 64;
    }

How can i have something similar with ngx_postgrest?
Thank you

It should work. What errors are you seeing?

i am not seeing errors, i can't figure out how to call set_current_pear with host/posrt/user/pass/db parameters when it takes just 2 parameters.

postgres_server ip[:port] dbname=dbname user=user password=pass
vs
balancer.set_current_peer(host, port)

@ruslantalpa Oh yes, ngx_postgres provides its own postgres_server directive here. So no love.
How about just using the pgmoon Lua library that is based on ngx_lua module's nonblocking cosocket API? See
https://github.com/leafo/pgmoon
It's much more flexible than this ngx_postgres module.

Yes i will do that, just thought i could get away with something internal since i only use it to run one specific query and get the result internally using capture which.
PS: Thank you so much for your work on openresty, it's an amazing package.


Fix/default mode

Fixed source_mode and default mav_mode for simulation
Arming is now possible from qgroundcontrol

I corrected a mistake (coming from my side ;) ) BOD would say Julien.
Previously, we couldn't start the auto-landing procedure if we were in stopping condition.

I saw that the sys_id is on an onboard parameter anymore. This is an issue as soon as you have multiple drones... Could you fix that in this PR so we don't forget?


Add Initialize overload that takes existing listener instance.

This PR fixes #43 by adding an Initialize overload that takes an existing listener instance. This means I can obtain a listener from my DI container first, then pass it into the plugin.
I also replaced the use of Activator with a simple new, since the generic constraint already allows for that.

Nice collaboration. Thanks


Deploy New Service Version

Let's hold off on this one until I get the messaging stuff merged in to accommodate certificates, messaging auth, and the liveness API in the logging service.


Connecting MQTT server with login and password

Hello EnricoFerro,
I really enjoy the idea of your project to be able to integrate the YI Hack camera with Home Assistant. I'm trying to install it with Docker on a RPi 3B+ with the latest Home Assistant 0.118 and Mosquitto as a broker on the same RPi.
But I'm struggling to make it works. The yi-hack-to-mqtt log says :
<EMAIL_ADDRESS>start:prod
node dist/main
[Nest] 17   - 11/24/2020, 7:44:54 PM   [NestFactory] Starting Nest application...
[Nest] 17   - 11/24/2020, 7:44:54 PM   [InstanceLoader] ClientsModule dependencies initialized +105ms
[Nest] 17   - 11/24/2020, 7:44:54 PM   [InstanceLoader] DiscoveryModule dependencies initialized +4ms
[Nest] 17   - 11/24/2020, 7:44:54 PM   [InstanceLoader] ConfigHostModule dependencies initialized +1ms
[Nest] 17   - 11/24/2020, 7:44:54 PM   [InstanceLoader] ScheduleModule dependencies initialized +3ms
[Nest] 17   - 11/24/2020, 7:44:54 PM   [InstanceLoader] ConfigModule dependencies initialized +2ms
[Nest] 17   - 11/24/2020, 7:44:54 PM   [InstanceLoader] YiCamModule dependencies initialized +4ms
[Nest] 17   - 11/24/2020, 7:44:54 PM   [NestMicroservice] Nest microservice successfully started +46ms
[Nest] 17   - 11/24/2020, 7:44:54 PM   [Server] Object:
{
  "code": 5
}
 +229ms
[Nest] 17   - 11/24/2020, 7:44:55 PM   [Server] Object:
{
  "code": 5
}

It repeats the code 5 error until I stop the container.
I also check my mosquitto server log, the connexion to the MQTT server seems to be blocked. It logs this at each time the Code 5 error is generated :
1606083310: New connection from "IP.OF.DOCKER.CONTAINER" on port "MQTTSERVERPORT".
1606083310: Socket error on client <unknown>, disconnecting.

So my trouble seems to come from the connexion to the Mosquitto server. I'm wondering if the fact that my Mosquitto server is protected by a login and password is an issue? Because it is not possible to add these connexion parameters to the configuration file.
Thank you in advance for your help and your work,
Louloudu79

Hi Louloudu79,
I've updated the libraries  of mqtt and nestjs  and make some test with the mqtt login.
A new version is released 0.0.2.
I've added in the documentation the syntax server: mqtt://admin:password@hostname:port and with this syntax is possible to connect to mqtt with login and password.
Enrico

Hi EnricoFerro,
I installed it again after having changed the parameters according to the new options and it has solved my troubles. Everything is working as expected!
Thank you very much for this update!
Louloudu79


Support for nested directories

Hi there. The module was very helpful for my team! But there is a little problem with nested directories.
We have some nested directories to keep some fixtures organized. By doing so, the cypress-template-fixtureswill try to run
mkdir 'cypress/fixtures.out/first-level/second-level'

resulting in this error
We invoked the function exported by /.../cypress/plugins/index.js, but it threw an error.

It would be nice to add support for nested dirs

Fixed in 1.0.3.


Learn more! Help us

hello , my name is Bruno and I came to talk about the block launcher of my brother , he does not work on his tablet , always asks to download the substrate cydia , but when low cydia also does not work and the block launcher says " learn more " but the version and everything is compatible with minecraft ... I wanted you guys solve this maybe in the next update for that we are wanting to play together ... please help us .. hope his tablet is a : DL 3470 . OS : Android 5.1.1 hopefully help us .. thank your application is simply the best

Hello Bruno,
What versions of Block Launcher and Minecraft are you using?
To help you out, if you updated to 0.15:
It has not been updated for 0.15. It takes time to re-hook into all the functions. It was stated on Twitter that the author is going to TRY to get it ported for 0.15 by the end of the week. Please close this issue as it is wasting the author's time. Instead of porting the program he is spending his time closing issue like this which are just fodder. Porting the program is going to happen, so again, please close this so you do not waste the author's time.  If you are on 0.15, you will need to just play VANILLA MCPE together until this is updated.

not from the version 0.14.3 does not work ... but better and I expect the same updating .. to see if it will work ...

Hello Bruno,
What versions of BlockLauncher are you using?

If you want to use Blocklauncher, do not update to 0.15, there is NO BL that works at this time.
Are your devices x86?  If so, at this time, BL only works for X86 with v1.25 and that is actually Minecraft's fault, not BL.  I have an x86 device and have not been able to play MCPE on it since they changed to 0.14.2 until now.  I think it has to do with the OpenGL stuff.  In that case, BL cannot make MCPE work, since it is MCPE that is not working.


Why can makeNode throw an error? When would that ever happen?

I can totally see why the init of NodeInitializable needs to be able to throw, because you can never know if the Node you'll get is a valid Node. However, I don't see why the makeNode of NodeRepresentable should be able to throw.
If you make a type that conforms to NodeRepresentable then you know your variables should be compatible with the possible types of Node right?
If we can't think of a use-case where throwing is necessary then I vote to remove that. The less I have to worry about potentially throwing methods the better imo.

Perhaps one of the values you require when saving to the DB is nil.
But mostly it was done for parity between the init and make methods.

Perhaps one of the values you require when saving to the DB is nil.

I don't agree with that. The class that implements makeNode should not have to know what that data will be used for and therefor it shouldn't have to decide on whether it returns a valid node or not. If an entity requires some value not to be nil then it should enforce that before makeNode is called, i.e. by not making that value an optional. Don't you think?

But mostly it was done for parity between the init and make methods.

I can imagine that it feels better to have both of those throw, because of symmetry and what not. But I think the costs are far higher. Now every time I (or another developer) needs to use makeNode we either have to make our method throw as well, or we need to handle the possible errors somehow, or we need to write try! every time. All those options make the code less clean. It's also just very confusing if a method says it can throw an error when it actually never does (or even should).
Therefor, I would really appreciate it if we could remove the throws from makeNode. Would you be willing to accept a PR from me that removes it? Then I'm also willing to remove the try from every other method in every vapor repo that uses the makeNode method.

Before we do that, is this a plausible scenario. A model fetches a linked model from a database before creating a more complex Node object, this fetch is failable and would be a involved in the makeNode operation. In this scenario, throwing is easier to be honest about this.

Hmm yes, that does sound at least somewhat reasonable. Shit. :-P

One thing I've done in the past @Evertt is to not make it throw on models that don't throw. For example, if you call "".makeNode() it won't try to throw because the implementation on String explicitly does not throw. We only have it throw when the underlying type is unknown.

Oh right, I forgot you aren't actually obligated to implement the method with throws.


Set #stats utm_content

The current utm_content of the stats widget when clicking on the Algolia link sends a hardcoded website. It should reuse the value of the productionUrl
I should be able to pass it to the front through the window.CONFIG variable like I did for the main config

I actually read it from window.location


Foreach: Adjusting the number of loops in the "For each" action is not working in monitoring view

Describe the Bug with repro steps
1.Create a consumption logic app.
2.Click on edit and open designer.
3.Add http request trigger.
4.Add Dropbox - List files in folder action.
5.Add filter array action.
6.Add DisplayName token from Dropbox in Filter array parameter which adds implicit foreach.
7.In from parameter select body parameter.
8.Save and run the workflow.
9.Upon executing the workflow in the monitoring view, Adjusting the number of loops in the "For each" action is not working in monitoring view according to our preferences.
Expected: Upon executing the workflow in the monitoring view, Adjusting the number of loops in the "For each" action should be possible and work fine in monitoring view according to our preferences.
Actual: Upon executing the workflow in the monitoring view, Adjusting the number of loops in the "For each" action is not working in monitoring view according to our preferences.
What type of Logic App Is this happening in?
Consumption (Portal)
Which operating system are you using?
Windows
Are you using new designer or old designer
New Designer
Did you refer to the TSG before filing this issue? https://aka.ms/lauxtsg
Yes
Workflow JSON
No response
Screenshots or Videos
https://github.com/user-attachments/assets/c8719698-b3f6-455f-ba36-057a0a4e0d69
Browser
Edge
Additional context
Version: 0.2022.1.764

I think I see the issue. Its that you're trying to delete the 2 in the video, but this requires a value within the input or else it wouldn't know which loop to fetch. The right way to do this would be to select the 2 and replace the value you need to be replaced or to add the value after the 2, and then delete the 2.


[avisynthplus] Add new port

Describe the pull request

What does your PR fix? Fixes issue #
This PR adds the AviSynth+ port. It does not fix any issue. AviSynth+ is a dependency of FFMS2, so it could be related to #684 and #9105.

Which triplets are supported/not supported? Have you updated the CI baseline?
I'm only able to test x64-windows triplet. I have not updated the CI baseline. AviSynth+ only officially support Windows, and has experimental support for linux.

Does your PR follow the maintainer guide?
Yes.

Someone on slack told me that I should use Supprt: in CONTROL to skip the package build on CI, but it seems that it is not correctly skipping, at least on x64-windows-static. Other CI failed due to other packages broken, or some reason I cannot understand (PowerShell exited with code '1'.). Let me know if I still need to edit the CI baseline, and which one of fail / ignore I should use

/azp run

Well, I see that the only CI issue is x64-windows-static. I have already marked it as not supported in https://github.com/wangqr/vcpkg/blob/add-avisynthplus/ports/avisynthplus/CONTROL#L5 . The upstream does not support building as static library, see https://github.com/AviSynth/AviSynthPlus/issues/130 .

@wangqr Thanks for your PR. Please use vcpkg_fail_port_install in portfile.cmake to description this port doesn't support some triplets. And please modify VCPKG_PATH/scripts/ci.baseline.txt to account for the build failures on unsupported triplets.

I have already used vcpkg_check_linkage to early-fail the unsupported static build. Which one of fail / ignore / skip should I use for unsupported triplet in ci.baseline.txt? It looks like ignore is only for packages that are breaking other packages, and for the rest 2 I don't understand their use case from the description

Please use vcpkg_fail_port_install in portfile.cmake to description this port doesn't support some triplets. It will remind other users when they installing this port like this:
Error: UWP builds are currently not supported.
This port does not currently support architecture: arm

LGTM, thanks for the PR!


Support for private registry authentication

This PR includes a change by @pdeveltere and a README enhancement by me. It allows using shepherd for private registries.
Tested with Docker 18.03.0-ce. Closes #6

Thanks for the contribution!


terraform plan/apply: Error: failed to execute "bash"

I'm getting this while executing terraform plan or terraform apply:
$ terraform plan

Error: failed to execute "bash": .terraform/modules/tf_next.next_image.lambda_content/download.sh: line 7: wget: command not found
Failed to download https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>
Error: failed to execute "bash": .terraform/modules/tf_next.statics_deploy.lambda_content/download.sh: line 7: wget: command not found
Failed to download https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>
Error: failed to execute "bash": .terraform/modules/tf_next.proxy.proxy_package/download.sh: line 7: wget: command not found
Failed to download https://cdn.jsdelivr.net/npm/<EMAIL_ADDRESS>
The referenced zips appear to be fine when accessing via HTTP.
tf-next build and terraform init completed with no issues.
Any ideas?
--
Node 14.16
macOS 11.2.3

Hi, when running terraform apply we currently rely on some bash scripts that are executed while running the command.
One of the bash commands uses the program wget to download components for some Lambda related workflows (e.g. Proxy, Image optimization, etc).
You should make sure that wget is installed and available in your Terminal:
wget --version

If it is not installed, you need to install it first (e.g. with Homebrew).
Sorry for the confusion here, I will try to add some more information what programs should be installed in addition to Terraform soon (Most of them are already preinstalled with most OS, but depending on the configuration there can be differences).

Danke @ofhouse, that solved it!  wget wasn't installed. I guess I was expecting bash: wget: command not found.
Don't apologise - this is a great project. Thanks.


RTMP streaming

WIP / POC
Streaming ExoPlayer to RTMP
ExoPlayer is displaying content to a "Surface" that the RTMP library provides and use to stream content. So during a stream, there isn't a preview displayed on screen (ExoPlayer can't show content on the SurfaceView AND the Surface)
Todo :

We should find a way to keep a preview of the video stream
Add RTMP settings : RTMP URL / Key / (Auth?) - Output resolution / Bitrate / FPS - Audio source (From microphone or internal audio)
Add buttons to start/stop stream, mute audio
Show some streaming stats (bitrate/fps)

can we close this one ?

can we close this one ?

Yes I think we can close it.


Formalise and document rules for DLCS identifier generation

The asset filename in METS is used to generate an ID in a URL path segment (e.g., the identifier part of a IIIF Image Service).
It can't always be used as-is, because:

While unique within the METS file it might not be globally unique in the DLCS space
It might have characters in it that require escaping, and while valid in file names, produce ugly and fragile URLs that are technically equivalent but not visually the same as the source file name.

Consider:

spaces in image asset URLs
spaces in "file" (AV, PDF etc) asset URLs
b number prefix in archive items - should we stop that?

Result of discussion - agreed that we should do this, @jtweed where? Is this RFC-size? Seems a bit too small for that.
I can write it up, wherever it needs writing up.
While the DLCS handles spaces in AV asset identifiers, if we normalise them to _ (or whatever) we  should do a manual patch of those assets in the DLCS to avoid having to reprocess (to the DLCS it would be a new asset).

I wouldn't worry about the length of an RFC, it can also function as more of a decision record or one-pager on why we're doing something.
So I'd vote for yes, it should be recorded in a very short RFC. That way we'll at least always know where it is.

https://github.com/wellcomecollection/docs/pull/30

The above RFC is still a Draft PR. Thinking about timing of this, and the dual-running suggestion of #4674, we shouldn't have the new DDS using one set of rules and the old another. We've already ported the current rules, so we need to schedule the enabling of new rules with the retirement of old DDS.
There's still work to do on that RFC PR though.

Moved to milestone 5 as it can't be finished until retirement of DDS.
Can work on the rules / RFC in the spike.


Pass requestingSiteId to redirectToFn, withContent middleware

This allows for the designated redirecToFn to utilize the requesting site ID within itself (i.e checking if the content returned is being returned on the primary site versus not)

 301 Redirects for Clean Trucking


[Bug]: Been receiving this error when closing Genshin Impact.

Affected Version
1.73.4-Pre
Bug Behavior
System.ComponentModel.Win32Exception (0x80004005): There was an error while trying to launch the game!
	Throw: System.ComponentModel.Win32Exception (5): Access is denied.
   at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass)
   at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass)
   at CollapseLauncher.Pages.HomePage.StartGame(Object sender, RoutedEventArgs e)
 ---> System.ComponentModel.Win32Exception (5): Access is denied.
   at System.Diagnostics.Process.set_PriorityClassCore(ProcessPriorityClass)
   at System.Diagnostics.Process.set_PriorityClass(ProcessPriorityClass)
   at CollapseLauncher.Pages.HomePage.StartGame(Object sender, RoutedEventArgs e)

Expected Behavior
Should not be receiving this.
Steps to reproduce

Game repair
Checked for new update

Related Issues
No response
Screenshot(s)
No response
Additional Information
No response

Can you send more details like what OS are you using and if its modified in any way (eg. Custom ISO for the like of Tiny11, AtlasOS, etc) ?
And also did you make sure that Collapse run as admin? It should do that in the first place but just making sure because its saying that access to the process is denied likely when the "Bosst game priority" feature is activated

Can you send more details like what OS are you using and if its modified in any way (eg. Custom ISO for the like of Tiny11, AtlasOS, etc) ?
And also did you make sure that Collapse run as admin? It should do that in the first place but just making sure because its saying that access to the process is denied likely when the "Bosst game priority" feature is activated

sorry for the lack of info.

OS is Windows and nope. this is not custom OS. just plain Windows.
yes. Collapse is run as admin.

Can I have your system specs? Mainly:

CPU
GPU
RAM
Wheter your Genshin install is on SSD or HDD and the model number for the storage?

CPU: Intel i3 9th Gen
GPU: GeForce 710
RAM: 8GB
Whether your Genshin install is on SSD or HDD and the model number for the storage? - SSD

CPU: Intel i3 9th Gen
GPU: GeForce 710
RAM: 8GB
Whether your Genshin install is on SSD or HDD and the model number for the storage? - SSD

I wasn't receiving this error before the latest update. that's why I reported it.

I see, funny thing about that is, we have not changed anything about it for quite awhile xD
Though, my hypothesis is that the priority adjustment failed because it detected the process too early causing it to have "Access denied" because the process had just spawned.
I will try to fix this by adding a 10s delay to the Game Priority Booster and see if this can help with the situation.

same issues here, hope it will be fixed soon

Current workaround for not getting this error is to disabling "Boost Game Priority" in the Game Settings here:

I'm currently working on fixing HI3 settings mess so it might take me awhile to get this sorted out

Current workaround for not getting this error is to disabling "Boost Game Priority" in the Game Settings here:
I'm currently working on fixing HI3 settings mess so it might take me awhile to get this sorted out

noted on this. thank you so much!

Heyya~
I have submitted a commit that tries to fix this here https://github.com/CollapseLauncher/Collapse/commit/5148b3e6a6d9a652171b84b4af96347a6c68f1a4
You can download the nightly build here https://nightly.link/CollapseLauncher/Collapse/actions/runs/8158021629
PS. Dont replace your collapse files, just extract everything and run CollapseLauncher.exe directly.
Please re-enable the option and also enable Console in the settings. After pressing "Start Game", observe for anything that has [HomePage::GameBoost_Invoke] on the start of the line, if it has error, please send the entire log here

Hi,
I think it has fixed the issue. I'm no longer receiving the error when Boost Priority is on for Genshin when I opened Collapse from the extracted files.

Alrighty, thanks for the confirmation!
We will push the fix on next update schedule~


Build image failed without docker

I have podman installed but without docker, when I execute "make images", it failed with:
╰─# make images
Using existing imagebuilder from /root/go/bin/imagebuilder
Warning: Installed imagebuilder version 1.2.3 does not match expected version 1.2.1.
imagebuilder --allow-pull -t quay.io/open-cluster-management/addon-manager:latest -f ./build/Dockerfile .
reading authentication configurations: open /root/.dockercfg: no such file or directory
make: *** [Makefile:50: image-addon-manager] Error 1

After I create the /root/.dockercfg: manually? I got:
Using existing imagebuilder from /root/go/bin/imagebuilder
Warning: Installed imagebuilder version 1.2.3 does not match expected version 1.2.1.
imagebuilder --allow-pull -t quay.io/open-cluster-management/addon-manager:latest -f ./build/Dockerfile .
Get "http://unix.sock/images/golang:1.19/json": dial unix /var/run/docker.sock: connect: no such file or directory
make: *** [Makefile:50: image-addon-manager] Error 1

then I followed the README to pull the image:
╰─# podman pull docker-daemon:golang:1.19
Error: initializing source docker-daemon:golang:1.19: loading image from docker engine: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

So want to confirm if docker is required to use imagebuilder?
Imagebuilder version: 1.2.3

Yes, imagebuilder is built to do its heavy lifting with the help of a daemon accessed through a socket at the default location, or one listed in the environment as ${DOCKER_HOST}.


Cache::set / Cache:get 5.7

I'm and developing a new site in concrete5.7.  Previously I used Cache::get and Cache::set in order to store third party responses that don't change often to speed things up and to reduce calls out to the 3rd parties.  It seems that this is no longer available in 5.7.   I see CacheLocal which is deprecated and no documentation or explanation of how to handle this moving forward.  Can you point me in the right direction.
Thanks

check this https://github.com/concrete5/concrete5/pull/3327/files

Thanks,  not sure how this directly relates to what I am talking about other than the general discussion and that it doesn't seem to be worked out yet.  But I can't see why you would use permission keys to store 3rd party JSON data.  Maybe I'm missing something.

@sapland I attempted to add a page to the developer documentation today to start documenting caching, so that should be up for review now. I'll put the markdown here in hopes of answering your question immediately while my documentation submission is under review, but in general I think these sorts of discussion are best left to the forums or stackoverflow (and tagged with concrete5).
Object Caching
concrete5 makes use of a PSR-6 compatible caching layer, with 3 caching pools set up by default:

cache - An object cache intended to live in memory or accessed via a very fast caching driver. Objects put into this cache should be cleared when needed by the programmer, as these objects are intended to live across multiple requests. Note: By default this cache is also ephemeral, but can be configured via the concrete.cache.levels.object configuration.
cache/request - An ephemeral cache, meant to store objects in memory across a single request. Note: This is the replacement to the CacheLocal api.
cache/expensive - This was intended for things that have a performance benefit by going to a slow cache, generally a disk cache. Note: This cache by default is persisted on the filesystem, and loaded into ephemeral cache when it is accessed so that subsequent accesses to the same data within the same request can be quick. The drivers of the expensive cache can be configured via the concrete.cache.levels.expensive configuration.

Using the Object Cache
An example of using the object cache to retrieve a "StudentList" object:
/**
 * @return StudentList
 */
public static function getByCourseID($id)
{
    $expensiveCache = \Core::make('cache/expensive');
    $studentCourseList = $expensiveCache->getItem('StudentList/Course' . $id);
    if ($studentCourseList->isMiss()) {
        $studentCourseList->lock();
        $list = StudentList::findBy(array('course_id' => $id));
        $studentCourseList->set($list);
    }
    return $studentCourseList->get();
}

In this example, we are creating a cache based on the StudentList/Course{$id}. In the event that we did not find that item in our expensive cache we go to our database and add it to our expensive cache and then return the retrieved value.
Note: Be careful how deeply you nest your cache items, as this creates a directory structure for each / within the item path. This can be particularly harmful on file systems which have a limited number of chracters in a file path.
In the event we wanted to invalidate this cache (for instance when a new student is added to the course) we would do this:
public addStudentToCourse($studentId, $courseId)
{
    //code to actually add the student to the course
    $expensiveCache = \Core::make('cache/expensive');
    $studentCourseList = $expensiveCache->getItem('StudentList/Course' . $courseId);
    $studentCourseList->clear();
}

Cache invalidation for the built in concrete5 caching pools also happens when a user goes to the dashboard and clears the cache.
Note that in my examples you would simply replace cache/expensive with cache or cache/request to obtain the appropriate cache pool you're wanting to use.

@sapland it's an example of how to use the new "Cache::set", just have a closer look at the changes I've made. The comment from Joe explains it better though.

Thank you both.  Yes now that I see the example from Joe I can see how you used it in your example.

Thanks Joe. I approved your docs and moved them into a new Caching section.
Yours is the Overview page. We can add more docs to this section now,
including explanation of the different cache levels, explanation of
creating adapters and configuring them, etc...
Thanks!
On Tue, Jan 26, 2016 at 5:54 AM, sapland<EMAIL_ADDRESS>wrote:

Thank you both. Yes now that I see the example from Joe I can see how you
used it in your example.
—
Reply to this email directly or view it on GitHub
https://github.com/concrete5/concrete5/issues/3437#issuecomment-175025967
.

This issue can probably be closed?


Cannot Pop Modal before Ajax call

Description
If you try to open (show) a modal prior to an ajax call, it waits until the completion of the ajax call to fire the modal. Tried a bunch of different ways of doing it. Even adding a short "wait" function before firing the ajax, but no dice.
Codepen
Codepen  Example  click the "do stuff" button in the top left corner.

I cannot understand your codepen, for me it works well

Click the "do stuff" button. It works the first time, for some reason, but after that, it will not pop up the modal before hitting the js alert. Once the js alert shows, the modal never shows up.

@nution101 I testing and playing with it, it appears that is a problem with the alert that is blocking the animation, so it couldn't end
it looks clear when you wrap the ajax call in a settimeout function
http://codepen.io/fega/pen/wJZXxQ
I tested it on chrome.

You can use the callbacks provided here: http://materializecss.com/modals.html
Put the ajax under the complete function to ensure your modal opens fully first.


selectRaw() and DB::raw() appear to use MySQL "DIV" behaviour instead of '/' when attempting arithmetic division

Laravel Version: 5.6.31
PHP Version: 7.1.16
Database Driver & Version: mysql  Ver 8.0.11 for osx10.13 on x86_64 (Homebrew)

Description:
When dividing one value by another in a selectRaw or DB::raw query, the resultant division returns an integer, or appears to discard the numbers after the decimal point.
Outputting the query to SQL and running in mySQL directly returns decimal numbers in the result.
Steps To Reproduce:

Create a DB table

Schema::create('ratings', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->index();
            $table->string('rating_object');
            $table->integer('rating_object_id');
            $table->unsignedTinyInteger('rating');
            $table->string('comment')->nullable();
            $table->timestamps();

            $table->softDeletes();
        });

Populate the table with some data, using the same rating_object value.

Run a selectRaw query:

$data = DB::table('ratings')
                                     ->selectRaw('5 / 67 as nonIntResult')
                                     ->selectRaw('5 / 1 as intResult')
                                     ->groupBy('rating_object')
                                     ->get();

dd($data);

It looks like nonIntResult returns 0 and intResult returns 5.

Export the query to SQL:

select 5 / 67 as nonIntResult, 5 / 1 as intResult from ratings group by rating_object;

.. it returns decimals.

Replace the division operand / with the DIV keyword, and you appear to get the same result as the main issue, possibly indicating a little bug?

This isn't presenting in the same way in tinker - the issue must be somewhere between the my seat & my screen. Closing

Update: the issue appears to be something to do with PHPUnit and how it interprets numeric array data. For some reason it's boiling decimals down to integers. The search continues

What does your test look like?

What's the result of dd($ratingsData[0]->nonIntResult);?

"0"

Does your test use a different database?

It does actually, great thinking never thought of that - SQLite. Will test using the same DB server and comment!

Wow @staudenmeir thanks for this - you're on to something. Running the test suite in SQLite returns the behaviour described above. MySQL as the DB base of the test suite is returning correctly precise numbers.
I'll do some reading about (hopefully) working around this in SQLite, I'm not super-interested in rejigging our CI system to install mysql for testing..!!

https://www.sqlite.org/datatype3.html
"Note that a declared type of "FLOATING POINT" would give INTEGER affinity". Bing-pot!

You can use something like ->selectRaw('5 * 1.0 / 67 as nonIntResult').
I assume you are aware that testing your code with a different database can cause all kinds of issues and hide potential bugs?

Well, I am aware now - thanks! Running the test suite again brought up a couple of new testing issues - thankfully not many. The main set of tests are ensuring the API is working properly, it's a fairly simplistic application.
Thanks very much for taking part and lending your expertise; I've ported the testing suite & CI/CD setup to use the same DB engine as the production app.


eval_loss metric

Hello!
Thank you for providing this project, we've been trying to adapt it to our dataset and train it for segmenting prostate cancer. Something that we've noticed however is that our eval_loss metric seems to be behaving strangely. For one of our experiments, the metrics look as follows

what puzzles us is that even though val_mean_dice is improving, or at least changing, the eval_loss is completely flat after few epochs. The model then performs decently on test set that it hasn't seen before.
We have also tried to perform an experiment directly as is in the repository of the project, with metrics that ended up looking quite similar.

Note that for the first experiment (on our dataset) we've done some changes (for example using DataParallel on the model, changing the batch size to accommodate our hardware better and we've changed the spacing to [0,5;0,5;1,5], however the model, loss function and optimizer were untouched.). One of our guesses was that maybe empty images were somehow messing with the metrics, by producing NaNs or infinities, but an experiment without empty masks looked quite similar in the end.
We've been wondering if you maybe have encountered similar issue in your experiments and could point us to a potential problem that we might have introduced or to some direction that could explain this problem. Thanks!

Its some time since I've trained the models and I do not remember this exact issue. However, empty images can mess with the val loss. Also make sure, the data does not get converted to discrete numbers before the val loss is calculated. In the MONAI workflows the val loss sometimes gets treated as a metric, so values get converted to discrete, messing with the loss calculation and leading to a flat line. So maybe catch the output, before it gets send to the loss function.

Indeed, removing the AsDiscrete transformations from postprocessing of SupervisedEvaluator seems to have done the trick, thank you a lot for the advice!
To preserve the metrics that are already set in place we've added another ValidationHandler to train_handlers that has only EnsureTyped transformation, it slows down the trianing a bit by executing 2 validation handlers, but that way we seem to have easier time controlling the loss metric and other metrics that need the data transformed as it is in get_val_post_transforms. I suppose it should be possible to modify output_transform of other metrics instead

Good to hear that it works now! Happy to help


OAuth Refresh Token OR Device Authorisation flow instead - Password replacement

I would like to avoid using username/password saved as plaintext
I would like to have an authentication token instead of username or password in the yaml file on my machine.
Describe the solution you'd like
Use an Authentication token instead of username/password.
Additional context
It is not a bright idea for anyone to save passwords to local disk - especially if this password & username would give access to real servers running production services. I would like to request for authentication - OIDC/Device Authorisation Flow.

Hi there!
Thank you for the suggestion. While this is more related to UpCloud API and not the client, we don't have a separate public issue board for that so we can let this be here. As I noted in #80, authentication is currently undergoing upgrades so this will be addressed at that point (most likely with OIDC Device Auth flow or OAuth2 Device Auth Grant, not that it makes a difference here), but the work will take some time (months, not weeks). Leaving this open as it's a bit different from 2FA in #80 but related to the same concern.


FiberPhotometryResponseSeries incorrect shape error for 1D data

I just run nwbinspector on the converted sessions, and noticed that I got an incorrect shape error for FiberPhotometryResponseSeries:
FiberPhotometryResponseSeries/data (processing/ophys/FiberPhotometryResponseSeriesGreen/data): incorrect shape - expected '[None, None]', got '(103014,)'

In the spec file we have restricted that the data shape should always be 2D:
https://github.com/catalystneuro/ndx-fiber-photometry/blob/2e80a7ac040ddca2873cce03aceaabd7c816a5f6/src/spec/create_extension_spec.py#L364
Shouldn't we allow it to be 1D as well? What do you think @pauladkisson @luiztauffer @alessandratrapani ? If this was intentional then we at least have to modify the description, because currently it says 1D is allowed.

I ran into this as well, thanks for the fix @weiglszonja!
Looks like CommandedVoltageSeries has a similar issue tho:
FiberPhotometryTable/commanded_voltage_series (acquisition/fiber_photometry_table/commanded_voltage_series): incorrect shape - expected '[None, None]', got '(4,)'


Resource type field too wide

When viewing resource lists in a group view, the resource type field is unnecessarily wide.
003.zip

Fixed, can't reproduce in prod anymore, @ndebuhr please confirm and close

Closing as resolved


Give more helpful error when trying to set default values on an interface

Today I spent a moment scratching my head at the following snippet:
interface Foo {
	bar: number = 5;
}

"Of course!" I say now, I was trying to set a default value on an interface, which makes no sense. TypeScript didn't see that this might be something I would do, and instead gave me a syntax error:
Error TS1005: ';' expected.
Error TS1131: Property or signature expected.
Error TS1128: Declaration or statement expected.

Would it be possible to get a more useful error message for this case (and potentially cases like this?)

I am part of a group of students from the University of British Columbia looking to contribute to a bug fix. Is there anything we must do to get assigned onto this bug?

Nope, it's just good that you asked so others know you're working on it. Go for it. :smile:

The correct way to handle this would likely be to just allow parsing a full on property inside an interface.  We can then report an error later on that an interface property cannot have an initializer.  That way the parse tree is well formed, and features like formatting/navbars/etc. all work property.

@CyrusNajmabadi I'll try something else.
Is there any reason a missing node doesn't have a flag?
https://github.com/Microsoft/TypeScript/pull/4878/files#diff-ead24f0f0f59c0ea9c1c511052e8884bR1027
That seems useful.

It could be a single check here:
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/utilities.ts#L186
    export function nodeIsMissing(node: Node) {
        if (!node) {
            return true;
        }

        return node.flags & NodeFlags.Missing;
    }

Oops, moving my comments to #4878

I've been looking at the parser.ts file. It appears that in parseTypeMember(), if we return parsePropertyOrMethodDeclaration() for string and numeric literals instead of returning parsePropertyOrMethodSignature(), this will allow parsing full properties inside an interface. In this case, parsePropertyOrMethodDeclaration() should return parsePropertyDeclaration(). What is the best way for parsePropertyDeclaration() to report the desired error if an initializer is present on an interface property?

Thanks @delta-nry!


Add 2024 to checkstyle allowed year

Line does not match expected header line of ' * Copyright( 20(19|20|21|22|23)|) Amazon.com, Inc. or its affiliates. All Rights Reserved.'.

Error when trying to use 2024.

We've moved to using the shorter, yearless copyright header to avoid needing to update this every year.
/*
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0
 */


[Bug]:  list indices must be integers or slices, not str

What happened?
I have chroma 0.4.4 running on a remote server in docker
i'm using the chroma httpClient (also from 0.4.4)
I can get collections
but when i create a collection i get this error
client.create_collection(name="X")
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In [145], line 1
----> 1 client.create_collection(name="X")

File /opt/conda/lib/python3.9/site-packages/chromadb/api/fastapi.py:92, in FastAPI.create_collection(self, name, metadata, embedding_function, get_or_create)
     88 raise_chroma_error(resp)
     89 resp_json = resp.json()
     90 return Collection(
     91     client=self,
---> 92     id=resp_json["id"],
     93     name=resp_json["name"],
     94     embedding_function=embedding_function,
     95     metadata=resp_json["metadata"],
     96 )

TypeError: list indices must be integers or slices, not str

when using the fastApi from the server to create a collection, it works, i guess it's the way you handle the response
{
  "name": "X,
  "id": "f21cb31c-ab5b-4805-ad4e-de74af79d822",
  "metadata": null
}

Versions
0.4.4
python > 3.9
Relevant log output
No response

I am not sure how you are getting this, could you share a repro script if you don't mind?
Traceback (most recent call last):
File "", line 1, in
File "/Users/hammad/Documents/chroma/chromadb/api/fastapi.py", line 88, in create_collection
raise_chroma_error(resp)
File "/Users/hammad/Documents/chroma/chromadb/api/fastapi.py", line 385, in raise_chroma_error
raise (Exception(resp.text))
Exception: {"error":"ValueError('Expected collection name that (1) contains 3-63 characters, (2) starts and ends with an alphanumeric character, (3) otherwise contains only alphanumeric characters, underscores or hyphens (-), (4) contains no two consecutive periods (..) and (5) is not a valid IPv4 address, got X')"}
This is what I get for
client.create_collection(name="X")
For anything that conforms to the allowed names, it works just fine for me.

I'm all good for the moment, thanks

i should not have provided you with the example value X (i removed my real name which was longer)
i figured out the reason is that my remote server is https so i had not enabled ssl = True. The weird thing here is that using http (ssl =  False) (which get's redirected by our sever internally to https, returned an array with the list of all collections . So it passed the raise_chroma_server check (as status was OK) , but the resp.json() and retrieving the ID raised the error above (as the json response was an array.) Not that this is important but maybe one day you could check to ensure the response is of type what you expect and also not sure why the response was the list of collections. (maybe the server turned the Post into a Get ?)
so I solved it by setting ssl = True

Thanks


Feature/xivy 3568 use new webtest

https://jenkins.ivyteam.io/job/ivy-project-demos/job/feature%252FXIVY-3568_use_new_webtest/


Material units

This adds check_units to the Material class:
import ross as rs

Q_ = rs.units.Q_
steel = rs.Material(name='steel', rho=7810, E=Q_(3e7, 'psi'), G_s=Q_(1e7, 'psi'))

It also closes #445

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@62e1980). Click here to learn what that means.
The diff coverage is 80.5%.

@@            Coverage Diff            @@
##             master     #453   +/-   ##
=========================================
  Coverage          ?   75.74%
=========================================
  Files             ?       15
  Lines             ?     4012
  Branches          ?        0
=========================================
  Hits              ?     3039
  Misses            ?      973
  Partials          ?        0

Impacted Files
Coverage Δ

ross/fluid_flow/fluid_flow_geometry.py
97.14% <ø> (ø)

ross/bearing_seal_element.py
54.65% <100%> (ø)

ross/materials.py
88.88% <100%> (ø)

ross/fluid_flow/fluid_flow.py
97.44% <100%> (ø)

ross/api_report.py
88.45% <100%> (ø)

ross/shaft_element.py
94.67% <100%> (ø)

ross/utils.py
75.09% <100%> (ø)

ross/disk_element.py
96.42% <100%> (ø)

ross/units.py
100% <100%> (ø)

ross/results.py
47.68% <5.88%> (ø)

... and 3 more

Continue to review full report at Codecov.

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

There's still a conflict, I can't merge it.

There's still a conflict, I can't merge it.

I will try to solve this.


Package json removed

We had both yarn.lock and package-json.lock. This PR removes package-json.lock

I read a few articles and came to the conclusion that I would prefer the npm package-lock.json and move away from yarn. It seems yarn doesn't offer that many more benefits anymore and I find the v2 of yarn goes in the wrong direction. But I think in the end it doesn't make a big difference.
Would you mind if we went back to npm though? it's just a gut feeling

Ah cool! Already merged. I was reading something about the ins and outs of yarn. We should stick with v1


Create common pipelines in LFEdge Wiki

We need to describe all pipelines that are used by Eden users and that will be used as acceptance tests for Eden

https://wiki.lfedge.org/pages/viewpage.action?pageId=29885718


adding the set(int, int) method

Hi,
The set(int, int) method for Roaring has been implemented with some extended tests.
Cheers!

Thank you! I will be putting this to good use in the near future... probably this coming week.

Thanks again. A more ambitious implementation had begun in the rangeset branch when you submitted the PR so I manually merged your code in that branch. The branch has now been merged with master and is ready for the next release.

Ok. My code has been well merged. Thanks.


Motivation
We are still in an early phase and need to further validate our seed/shoot approach, before we roll it out.
Acceptance Criteria

[ ] Manually run, then automate in Jenkins CI:

[ ] E2E tests against a shoot cluster pass
[ ] Performance and scalability of a shoot cluster is comparable to our kops-based seed clusters or a Tectonic cluster

Resources

Performance tests: https://github.com/kubernetes/perf-tests
E2E test infrastructure: https://github.com/kubernetes/test-infra
E2E testing: https://github.com/kubernetes/community/blob/master/contributors/devel/e2e-tests.md
According to Martin Vladev<EMAIL_ADDRESS>you specify a specific label e.g.:go run hack/e2e.go -- -v --test --test_args="--ginkgo.focus=\[Feature:Performance\]"

Maybe Heptio Ark (disaster recovery) may be interesting to check out?

Definition of Done

[ ] Knowledge is distributed: Have you spread your knowledge in pair programming/code review?
[ ] Unit Tests are provided: Have you written automated unit tests or added manual NGPTT tickets?
[ ] Integration Tests are provided: Have you written automated integration tests?
[ ] Minimum API exposure: If you have added public API, was it really necessary/is it minimal?
[ ] Operations guide: Have you updated the operations guide?

:information_source: Migrated from Jira issue KUBE-184

Moved to https://github.wdf.sap.corp/kubernetes/landscape-dev-garden/issues/8.


Puma cluster mode causes terminal corruption

Problem description
When I run Puma with multiple workers in cluster mode, byebug tends to cause strange behavior on the terminal. For example, I'll try to type in quit at a breakpoint, but it will non-deterministically come out as qit, ui, qt, etc.
I'm able to get the correct input by repeatedly pressing certain keys (including backspace) until the desired input is displayed. However, when I press enter, it still complains that qit, ui, etc. doesn't exist even though the correct command is nominally on the screen. Stranger still, if I press enter a second time, it will appear to run the correct command even though there isn't any command waiting in the prompt anymore.
The generally recommended advice is to use Puma in single mode in development, but this isn't possible for my use case. I'm running SSR in a separate Node process that issues a request during SSR back to the Rails server. In single mode, there's only one process, so the SSR request times out because it's waiting on the browser request, but the browser request can't finish until SSR finishes...
Note, I get the same strange behavior when using pry and pry-byebug.
Expected behavior
Byebug should just work when using Puma in cluster mode.
Actual behavior
Byebug corrupts terminal input.
Steps to reproduce the problem

Create a Rails project with byebug and puma installed.
Insert a breakpoint.
Start the Rails server in cluster mode with two workers.
Initiate two simultaneous requests to the Rails server.
💥

It's almost as if byebug doesn't know which Puma process to latch onto, or somehow it gets confused and non-deterministically splits the terminal input between them.

Here's an example from when I typed continue. Notice that when I typed it, only oiu came out. Then, when I pressed enter a second time, it claimed that I was attempting to execute a command called cntne. In other words, the characters in the word continue got split up between two different streams and somehow got jumbled:
[71, 80] in /Users/ersin/projects/gamacy/app/services/redux_preloaded_state_service.rb
   71:     }
   72:   end
   73:
   74:   def populate_session_slice
   75:     byebug
=> 76:     result[:session] = { user: user.session_hash } if user.present?
   77:   end
   78:
   79:   # Makes Flipper features available via Redux
   80:   # e.g., :my_feature --> state.features.myFeature
(byebug) oiu
*** NameError Exception: undefined local variable or method `oiu' for #<ReduxPreloadedStateService:0x00007f94f0813530>

nil
(byebug) *** NameError Exception: undefined local variable or method `cntne' for #<ReduxPreloadedStateService:0x00007f94f011b8e0>

nil

Closing as duplicate of https://github.com/deivid-rodriguez/byebug/issues/487.


[Bug]: Using my own color variable from frontend theme

Current Behavior
So, we have specific mushroom-card palette in theme.yaml, it looks like:  white: 255, 255, 255
while all whole cards (and HA GUI) uses white: rgb(255,255,255)
We need a way to use variables like:   color: var(--white), but now we cant do it.
I tried set "white" in theme.yaml as rgb(), rgba(), #hex. No way to use "var" in mushroom-cards for all of them,
card waiting for "255,255,255" format only (for var), or hexa color #ffffff directly in card config.
I have my own list of colors in theme.yaml wich I using everywhere, and rly I dont want to copy-paste one more list in specific mushroom format.
Expected Behavior
No response
Steps To Reproduce
No response
Environment
- OS:
- Node:
- Version:
- Hassio:

Anything else?
No response

For now, it's due to a css limitation.
But I plan to improve the theme color to use hexa code instead of rbg values. I will move the issue to https://github.com/piitaya/lovelace-mushroom-themes


Android: GetObject doesn't work for "big" files

I am using SDK with arm-linux-androideabi-4.9 toolchain and I have problems with GetObject, it doesn't work for relatively small objects, for instance, I am able to GetObject for a file which size is 3k but for a file which is 250kb it's impossible. I always get a timeout error. I have enabled AWS logs and I see constantly the same output in loop:

21:49:59.437 EET - Content-Length: 253749
21:49:59.437 EET - Server: AmazonS3
21:49:59.438 EET -
21:50:00.439 EET - 12888 bytes written to response.
21:50:03.922 EET - 16384 bytes written to response.
21:50:09.258 EET - 16384 bytes written to response.
21:50:16.352 EET - 16384 bytes written to response.
21:50:25.257 EET - 16384 bytes written to response.
21:50:35.943 EET - 16384 bytes written to response.
21:50:48.605 EET - 16384 bytes written to response.
21:51:02.955 EET - 16384 bytes written to response.
21:51:02.957 EET - Curl returned error code 28
21:51:02.959 EET - Releasing curl handle 0xcdb8ee80
21:51:02.962 EET - Request failed, now waiting 0 ms before attempting again.`

It never gets finished, always an timeout error. For me it looks like an issue with some timers or condition variables, but who knows.
I will attach a small example to reproduce a problem, as well I will describe my environment.
Environment:

Android NDK 10e
arm-linux-androideabi-4.9 toolchain
HTC Nexus 9 with Android 7.0 as target device

I have used next command to build AWS SDK:
cmake -DTARGET_ARCH=ANDROID
-DCMAKE_BUILD_TYPE=Release
-DBUILD_SHARED_LIBS=OFF
-DANDROID_STL=gnustl_shared
-DANDROID_TOOLCHAIN_NAME=arm-linux-androideabi-4.9
-DANDROID_NATIVE_API_LEVEL=android-16
-DDISABLE_ANDROID_STANDALONE_BUILD=ON
-DBUILD_ONLY="s3"
-DENABLE_TESTING=OFF ../
Code for minimum example:(it uses Qt, but you can easily remove it)
android-aws-issue.txt
I will be grateful for any kind of help

This is a known issue when using the SDK against gnu stl and downloading to a stringstream; we have no workaround at the moment.  If you can switch to clang/libc++ rather than gnustl (which you won't be able to if api 16 is a requirement) the problem goes away.
There is a possibility that implementing and using your own "stringlike" stream (that does not use std::string under the hood) would fix this problem but it's not an avenue we have investigated yet.
If you download to a file this will also not be a problem.
For more details, see include/aws/core/utils/memory/stl/AWSString.h
We may revisit this in the future and we welcome any solutions to the problem as pull requests.

I have seen this code, but for me it doesn't explain why I get huge timeouts between writing to response,(you can see at the log that I have sent). Maybe you can explain this?
How can I download to file without GetObject?

When gnustl is used we use an alternative string definition (in that file) which disables certain constructors and operators that will crash the SDK if allowed.  Disabling those operators in turn causes every character push into a stringstream to do 4 full copies of the existing string value, so anything above a few thousand characters is going to blow up quadratically (but at least the SDK does not crash).

And how about downloading to file?
How that can be done?

Call SetResponseStreamFactory on the GetObjectRequest with a function that creates an Aws::FStream.  See  https://github.com/awslabs/aws-sdk-cpp-staging/blob/master/aws-cpp-sdk-s3-integration-tests/BucketAndObjectOperationTest.cpp#L794 for an example.

I was able to workaround the issue by providing a custom stream buffer and using Aws::IOStream instead of Aws::StringStream. Stream buffer is built on top of QByteArray + std::vector.(vector as internal one, and QByteArray as external). So now I got a working library on Android with arm-gcc-4.9 toolchain + gnu_stl. Thanks for your advice. Hope it will help somebody.

Would you be willing to supply a pull request?  Obviously we can't take anything involving Qt types, but I would probably be able to tweak your solution into a built-in default that works for gnustl, which would be tremendously helpful.

Sorry, for long reply. I will prepare a pull request this week, I will try to remove Qt stuff, to leave you minimum amount of work.

Yesterday's release included a string buffer and string stream replacement which is used by default on Android builds that use gnustl; from this point we will consider gnustl fully supported.


Pre-processed ScanNet v2 dataset  drive link require need a permission ?

Thank you for your great working and sharing. But your pre-processed ScanNet v2 dataset  link need a permission to access ? Could you please share with me ? Thank you.

I have tested the sharing link, and there is no problem. Please try again or show more details.

thank you very much. I will check it again.

@lyqun : I tried to download your link again but the message is still there. Could you please help me to check your pre-process Scannet v2 dataset link again ? Thank you very much
Permission denied: https://drive.google.com/uc?id=1xz59bKaIZbf0BU3oKSTs3qyV3gRf7aDW
Maybe you need to change permission over 'Anyone with the link'?

Does the Google Drive show 'Blocked Third-party cookies can prevent Drive Web downloads' when you download the sharing file?
If so, you could follow the steps in Download-a-file.


Update index.md

To use the write macro you need to use the core::fmt::Write trait. Just importing core::fmt isn't enough.

Closing as the import is already there (see https://github.com/phil-opp/blog_os/pull/849#discussion_r472782866). Thanks for opening this PR though! Let me know if you have problems with the import that is used in the post.