How to emulate a simple blocking call?

I'm trying to re-use an existing asyncblock scope to avoid sprinkling a new scope in every function that needs to call async APIs and to support blocking calls. The module.exports.getCurrentFlow seems to be what I need. Is getCurrentFlow() officially supported?
"use strict";

console.log("main start");
console.time("main finish");

let asyncblock = require("asyncblock");

//let optionForceError = true;
let optionForceError = false;

function nonblockingRoutine (done) {
  if (optionForceError)
    setTimeout(() => done(new Error("something bad happened"), "test data"), 1000);
  else
    setTimeout(() => done(null, "test data"), 1000);
}

function blockingRoutine () {
  console.log("    blockingTest 1");
  let flow = asyncblock.getCurrentFlow();
  nonblockingRoutine(flow.add());
  let result = flow.wait();
  console.log("    blockingTest 2");
  return result;
}

asyncblock((flow) => {
  console.log("  enter level 1");
  try {
    let result = blockingRoutine();
    console.log("  result A = " + JSON.stringify(result));
  } catch (e) {
    console.log("  caught exception:", e.stack);
  }
  console.log("  leave level 1");
});

console.timeEnd("main finish");

You can call asyncblock.getCurrentFlow() to do what you want.
Thanks,
Chris

On Mar 17, 2016, at 3:07 AM, ani<EMAIL_ADDRESS>wrote:
I'm trying to find a way to develop simple "blocking call" functions that perform multiple asynchronous function calls. This doesn't seem possible with the asyncblock module at the moment.
Asyncblock requires a function to create a new asyncblock scope any time the function needs to wait for one or more asynchronous functions to complete before returning. As per my initial understanding of asyncblock there's no way to wait on a flow.add() outside the asyncblock((flow) => {...}). Therefore a blocking function doesn't possible.
I never understood why creating nested asyncblock scope was necessary. I developed a demo using Fibers module to show that such nesting is not required. The blockingRoutine() below calls a simulated nonblockingRoutine(). The blockingRoutine() is quite clean, conceptually and literally. If we can retrieve the flow object without creating a new asyncblock scope then it's also possible to recreate a very simple blockingRoutine().
/*
2016-03-16
Objective:
Find a way to minimize changes needed to emulate blocking functions.
Motivation:
Synchronous programming is easier to develop and maintain. Co-routines
(fibers) help simplify synchronous programming under asynchronous
execution environments. Node.js is primarily a single threaded asynchronous
work loop design. Many APIs under Node.js are asynchronous. Simple
sequences of control calls in synchronous programming can turn into
complicated implementations under asynchronous programming. While several
solutions exist to make asynchronous sequential, the problem is minimizing
the maintenance cost required to use them.
State machines:
Need to add one state for every asynchronous function call and a set of
states to represent every asynchronous API. Incompatible with developing
blocking functions.
Lists:
Each function in a list of asynchronous functions is run once per
callback invoked. Additional framework support is needed for error
handling. Incompatible with developing blocking functions.
Promises:
Functions are wrapped in functors and chained together. Callbacks invoke
the next functor to execute. Error handling must also be added as a
functor in the sequence. Incompatible with developing blocking functions.
Generators:
Special built-in functors that maintain state. One asynchronous routine
called from a function forces all callers up the calling stack to
participate in the yield which means all callers must also turn into
generators. Incompatible with developing blocking functions.
Asyncblock:
Based on Fibers. All function calls within the asyncblock scope may be
sequential. Incompatible with developing blocking functions.
Fibers:
Implements co-routine primitives and supports nested fibers. Is possible
to build blocking functions, but how?
Strategy:
The solution will develop an Fiber wrapper to capture callback arguments
and will throw on errors.
Command-line:
node --harmony_destructuring test9.js
*/
"use strict";
//let optionForceError = true;
let optionForceError = false;
console.log("main start");
console.time("main finish");
let Fiber = require("fibers");
function getFiberCallback () {
let signal = Fiber.current;
return function () {
signal.run(arguments);
};
}
function waitForFiberToReturn (throwOnErrorFlag) {
if (typeof throwOnErrorFlag != "boolean" || throwOnErrorFlag) {
let [err, ...others] = Fiber.yield();
if (err) throw err;
return others;
}
return Fiber.yield();
}
function nonblockingRoutine (done) {
if (optionForceError)
setTimeout(() => done(new Error("something bad happened"), "test data"), 1000);
else
setTimeout(() => done(null, "test data"), 1000);
}
function blockingRoutine () {
console.log("    blockingTest 1");
nonblockingRoutine(getFiberCallback());
let result = waitForFiberToReturn();
console.log("    blockingTest 2");
return result;
}
Fiber(function () {
console.log("  outer 1");
try {
let result = blockingRoutine();
console.log("  result A = " + JSON.stringify(result));
} catch (e) {
console.log("  caught exception:", e.stack);
}
console.log("  outer 2");
}).run();
console.timeEnd("main finish");
/* OUTPUT (with optionForceError=false and waitForFiberToReturn() or waitForFiberToReturn(true)):
main start
outer 1
blockingTest 1
main finish: 6ms
blockingTest 2
result A = ["test data"]
outer 2
*/
/* OUTPUT (with optionForceError=false and waitForFiberToReturn(false)):
main start
outer 1
blockingTest 1
main finish: 6ms
blockingTest 2
result A = {"0":null,"1":"test data"}
outer 2
*/
/* OUTPUT (with optionForceError=true and waitForFiberToReturn() or waitForFiberToReturn(true)):
main start
outer 1
blockingTest 1
main finish: 6ms
caught exception: Error: something bad happened
at null._onTimeout (C:\Users\ayu\OneDrive\Project\fibers\test9.js:84:27)
at Timer.listOnTimeout (timers.js:92:15)
outer 2
*/
/* OUTPUT (with optionForceError=true and waitForFiberToReturn(false)):
main start
outer 1
blockingTest 1
main finish: 6ms
blockingTest 2
result A = {"0":{},"1":"test data"}
outer 2
*/
―
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

A couple more thoughts on this:

One drawback of using getCurrentFlow is that callers lose the ability to choose whether to execute a function as blocking or in parallel

Another drawback is that you can't use it with source transformation (func().sync()), as those have to be nested directly within an asyncblock for the parser to find them.

In a large application, it would be confusing if some functions auto-blocked and some required a callback. I think you'd want to use it consistently.

If libraries create their own "threads" by calling setTimeout or after I/O, those "threads" won't have a Fiber attached and the getCurrentFlow call will return null.

For those reasons, when writing code in general I don't use getCurrentFlow. However, in some special circumstances it can create a simpler API. For instance, I use it in https://github.com/scriby/browser-harness quite extensively, as it makes sense to auto-block when doing browser testing.

Can attest that all points are true and I'm OK with their properties in my applications.
In most cases the main work loop will be serial, each incoming message is handled by a switch, and each case calls a blocking function to process the message.
The blocking function can:

call aync routines and parallel wait;
create a nested asyncblock (no advantage over option 1);
parallel wait on WebWorkers (similar to option 1).

The getCurrentFlow() is a core API in my opinion. It enables sequential programming by allowing signal/event primitive to be built and used. Co-routines are here to stay. It's just less overhead than Promises.
Thank you for your response and really appreciate your work.


Decimal128 fail to validate minimum/maximum

Reproduction:
import { Decimal128 } from "bson";
var Ajv = require("ajv");
var ajv = new Ajv();
require("ajv-bsontype")(ajv);

const schema = {
  bsonType: "object",
  properties: {
    decimal: {
      bsonType: "decimal",
      minimum: 0,
      maximum: 100
    }
  }
};

const dec = Decimal128.fromString("1000.1");

const data = {
  decimal: dec
};

const valid = ajv.validate(schema, data);
console.log(valid);

Try it here https://codesandbox.io/s/ajv-bsontype-decimal128-6lmoq
This validation passes even though the decimal value is out of bounds.
I currently use ajv-bsontype v1.0.6 (the previous version) and convert Decimal types to floats before validating, which works. I was hoping to remove this hack by upgrading to v1.0.7, but it does not seem to work properly. That or I'm missing something :)
I can take a stab at fixing it if you just point in the right direction.

Problem is ajv handles the min/max validation and ajv-bsontype is checking the type validation
you would have to run with { coerceTypes: true } and include the original type format eg.
  bsonType: "object",
  properties: {
    decimal: {
      bsonType: "decimal",
      type: "number",
      minimum: 0,
      maximum: 100
    }
  }
};```

other wise ajv-bsontype would have to rewrite all of ajv’s validators aswell


Adding \n after every regex match

My previous PR: #125,  as stated by you earlier, captures only 1st match. Appending \n to the end of every fully matched string
Signed-off-by: Dinesh Prasanth M K<EMAIL_ADDRESS>

Travis tests have failed
Hey @SilleBille,
Please read the following log in order to understand the failure reason.
It'll be awesome if you fix what's wrong and commit the changes.
Node.js: 8
View build log

     npm test

><EMAIL_ADDRESS>test /home/travis/build/bluzi/travis-buddy
> mocha

  api
    POST /
22:02:19.059Z  INFO unknown : Pipe load payload finished
22:02:19.060Z  INFO unknown : (travis payload validation) Validating payload
22:02:19.060Z  INFO unknown : (travis payload validation) Pipe travis payload validation finished
22:02:19.060Z  INFO unknown : (travis payload validation) Pipe validate payload finished
22:02:19.061Z  INFO unknown : (get metadata) Metadata created
22:02:19.061Z  INFO unknown : (get metadata) Pipe get metadata finished
22:02:19.061Z  INFO unknown : (wait) No wait time
22:02:19.061Z  INFO unknown : (wait) Pipe wait finished
22:02:20.188Z  INFO unknown : (travis parser) bluzi/name-db #501: Pipe travis parser finished
22:02:20.188Z  INFO unknown : (travis parser) bluzi/name-db #501: Pipe parse payload finished
22:02:20.352Z  INFO unknown : (star repo) bluzi/name-db #501: Pipe star repo finished
22:02:20.534Z  INFO unknown : (fetch configuration) bluzi/name-db #501: Selected config
22:02:20.534Z  INFO unknown : (fetch configuration) bluzi/name-db #501: travis.yml
22:02:20.534Z  INFO unknown : (fetch configuration) bluzi/name-db #501: Pipe fetch configuration finished
22:02:20.535Z  INFO unknown : (search for a stop comment) bluzi/name-db #501: Pipe search for a stop comment finished
22:02:21.041Z  INFO unknown : (fetch build logs) bluzi/name-db #501: Done found after 0/10 attempts.
22:02:21.042Z  INFO unknown : (fetch build logs) bluzi/name-db #501: Found log for job #295066347 Node.js: 8
22:02:21.042Z  INFO unknown : (fetch build logs) bluzi/name-db #501: Found all logs
22:02:21.042Z  INFO unknown : (fetch build logs) bluzi/name-db #501: Pipe fetch build logs finished
22:02:21.043Z  INFO unknown : (fetch job scripts) bluzi/name-db #501: Found 1 scripts
22:02:21.043Z  INFO unknown : (fetch job scripts) bluzi/name-db #501: Script npm test
22:02:21.044Z  INFO unknown : (fetch job scripts) bluzi/name-db #501: Fetched scripts
22:02:21.044Z  INFO unknown : (fetch job scripts) bluzi/name-db #501: Pipe fetch job scripts finished
22:02:21.044Z  INFO unknown : (filter out duplicate jobs) bluzi/name-db #501: Pipe filter out duplicate jobs finished
22:02:21.044Z  INFO unknown : (filter out duplicate jobs) bluzi/name-db #501: Pipe collect failure data finished
22:02:21.135Z  INFO unknown : (fetch template) bluzi/name-db #501: Template
22:02:21.135Z  INFO unknown : (fetch template) bluzi/name-db #501: Pipe fetch template finished
22:02:21.138Z  INFO unknown : (format message) bluzi/name-db #501: Message formatted
22:02:21.138Z  INFO unknown : (format message) bluzi/name-db #501: Pipe format message finished
22:02:21.138Z  INFO unknown : (format message) bluzi/name-db #501: Pipe format message finished
22:02:21.311Z ERROR unknown : 403 error making request POST https://api.github.com/repos/bluzi/name-db/issues/501/comments: "Forbidden"
      1) should return HTTP status 200 and ok message
    GET /status
      ✓ should be running and return HTTP status 200

  site
    GET /
      ✓ should return HTML and status 200
    GET /getting-started
      ✓ should return HTML and status 200
    GET /contact-us
      ✓ should return HTML and status 200
    GET /dashboard
      ✓ should return HTML and status 200

  TravisBuddy configuration
    ✓ should parse successfully (119ms)

  6 passing (2s)
  1 failing

  1) api
       POST /
         should return HTTP status 200 and ok message:
     Error: expected 201 "Created", got 500 "Internal Server Error"
      at Test._assertStatus (node_modules/supertest/lib/test.js:266:12)
      at Test._assertFunction (node_modules/supertest/lib/test.js:281:11)
      at Test.assert (node_modules/supertest/lib/test.js:171:18)
      at Server.assert (node_modules/supertest/lib/test.js:131:12)
      at emitCloseNT (net.js:1664:8)
      at _combinedTickCallback (internal/process/next_tick.js:136:11)
      at process._tickDomainCallback (internal/process/next_tick.js:219:9)

npm ERR! Test failed.  See above for more details.

     npm run lint

><EMAIL_ADDRESS>lint /home/travis/build/bluzi/travis-buddy
> eslint .

/home/travis/build/bluzi/travis-buddy/pipes/fetch-job-scripts.pipe.js
   96:9   error  Unexpected assignment within a 'while' statement  no-cond-assign
   96:17  error  'regexResult' is not defined                      no-undef
   98:39  error  Unexpected string concatenation                   prefer-template
   98:39  error  'regexResult' is not defined                      no-undef
  100:38  error  Expected '===' and instead saw '=='               eqeqeq

✖ 5 problems (5 errors, 0 warnings)
  1 error, 0 warnings potentially fixable with the `--fix` option.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR<EMAIL_ADDRESS>lint: `eslint .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2018-10-09T22_02_22_856Z-debug.log

TravisBuddy Request Identifier: 005953b0-cc0f-11e8-8a50-ef4c233df90b


Add HOME and END to supported key identifiers.

The HOME and END keys are used for the home and end operations:

...
...
...

home
HOME
Go to the first item in the list.

end
END
Go to the last item in the list.

macro-prefix
,
Initiate macro execution. The next key press selects the actual macro and runs it.

They aren't mentioned in the key identifier section of the docs that follows:

Keys, as used in the bind-key configuration command, use a special syntax. Lowercase keys, uppercase keys and special characters are written literally. The "Enter" key is written as ENTER, while the "Esc" key is written as ESC. The function keys "F1" to "F12" are written as F1 to F12. The "Space" key is written as SPACE. Key combinations with the "Ctrl" key, such as "Ctrl-R", are written as ^R. Please be aware that all Ctrl-related key combinations need to be written in uppercase. The following identifiers for keys are supported:

ENTER (Enter key)
BACKSPACE (backspace key)
LEFT (left cursor)
RIGHT (right cursor)
UP (up cursor)
PPAGE (page up cursor)
NPAGE (page down cursor)
DOWN (down cursor)
ESC (Esc key)

Thanks for spotting this, @ottopiramuthu! I submitted a PR that fixes this, #937.


MYXProtocol thrown when using large integers as prepared parameters.

Create a test database like this:
DROP SCHEMA IF EXISTS `test` ;
CREATE SCHEMA IF NOT EXISTS `test` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ;
USE `test` ;

DROP TABLE IF EXISTS `test`.`user` ;

CREATE  TABLE IF NOT EXISTS `test`.`user` (
  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT ,
  `dataSourceId` INT UNSIGNED NOT NULL ,
  `name` VARCHAR(64) NOT NULL ,
  `added` DATETIME NOT NULL ,
  `statusId` TINYINT UNSIGNED NOT NULL DEFAULT 1 ,
  PRIMARY KEY (`id`) ,
  UNIQUE INDEX `dataSourceId_name_UNIQUE` (`dataSourceId` ASC, `name` ASC) ,
  INDEX `fk_user_status1_idx` (`statusId` ASC) ,
  INDEX `added_INDEX` (`added` ASC) ,
  INDEX `fk_user_dataSource1_idx` (`dataSourceId` ASC))
ENGINE = InnoDB DEFAULT CHARACTER SET = utf8 COLLATE = utf8_bin;

INSERT INTO user (id, dataSourceId, name, added, statusId) VALUES
(1, 2, "test1", NOW(), 3),
(4, 5, "test2", NOW(), 6);

Then run the following code:
import mysql.connection;
import std.stdio;

void main(string[] args)
{
    auto connection = new Connection("localhost", "user", "password", "test");

    auto command = Command(connection);
    scope (exit) command.releaseStatement();

    command.sql  = "SELECT id, dataSourceId, LOWER(name), UNIX_TIMESTAMP(added), statusId
                      FROM user
                     WHERE id = 1
                        OR (UNIX_TIMESTAMP(added) >= (? - ?) AND UNIX_TIMESTAMP(added) <= ?)
                     LIMIT ?";

    command.prepare();

    uint baseTimeStamp    =<PHONE_NUMBER>;
    uint cacheCutOffLimit = int.max;
    uint recordLimit      = int.max;

    command.bindParameter(baseTimeStamp, 0);
    command.bindParameter(cacheCutOffLimit, 1);
    command.bindParameter(baseTimeStamp, 2);
    command.bindParameter(recordLimit, 3);

    writefln("Retrieving results...");

    auto results = command.execPreparedResult();

    writeln("Got results."); // Doesn't reach here!
}

The query never completes and hangs indefinitely. This query works fine in MySQL Workbench and on the command line so i'm assuming it's an issue with this driver.

I strongly suspect the fix for #22 may have fixed this as well. Can you verify?

I think the library needs updating first:
/home/gary/Desktop/mysql-native/source/mysql/protocol/commands.d(288): Deprecation: module mysql.protocol.packet_helpers is not accessible here, perhaps add 'static import mysql
.protocol.packet_helpers;'

After fixing that I get the following:
Retrieving results...
mysql.common.MySQLProtocolException@/home/gary/Desktop/mysql-native/source/mysql/result.d(129): Expected null header byte for binary result row
----------------
??:? pure bool std.exception.enforceEx!(mysql.common.MySQLProtocolException).enforceEx!(bool).enforceEx(bool, lazy immutable(char)[], immutable(char)[], ulong) [0x4f6a8c]
??:? ref mysql.result.Row mysql.result.Row.__ctor(mysql.connection.Connection, ref ubyte[], mysql.protocol.packets.ResultSetHeaders, bool) [0x4de6b3]
??:? mysql.result.ResultSet mysql.protocol.commands.Command.execPreparedResult(mysql.protocol.extra_types.ColumnSpecialization[]) [0x4e49c1]
??:? _Dmain [0x4d14b6]
??:?  _Dmain [0x4d14ea]
??:? _D2rt6dmain211_d_run_mainUiPPaPUAAaZiZ6runAllMFZ9__lambda1MFZv [0x5229b2]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5228fc]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).runAll() [0x52296e]
??:? void rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).tryExec(scope void delegate()) [0x5228fc]
??:? _d_run_main [0x52286d]
??:? main [0x4d1cfd]
??:? __libc_start_main [0xf3d63a3f]

shell returned 1

Finally tracked this one down. Fix is on the way. (Hooray for wireshark! Even if my machine really, really doesn't want to allow it without sudo priveledges, grumble, grumble...)
Wireshark revealed the server was sending an error:
BIGINT UNSIGNED value is out of range in '(? - ?)'

Unfortunately, the error was being sent at a point during communications where mysql-native wasn't expecting to receive an error packet (when attempting to retrieve the first row, AFTER an initial OK packet and some column info).
It's worth noting this bug would not have occurred if packet-handling was fully encapsulated and guaranteed ONE location where packets are retrieved and checked to be an error. This is a perfect example of why the low-level internals need some serious cleanup (a current priority for mysql-native).
A fix is on the way. The timing is unfortunate, as I wanted to give the v2.1.0 release candidate one week before finalizing (five more days). Git master has undergone some internal refactorings in the meantime, which may make it difficult to cherry-pick this into v2.1.0. So there's a possibility I might just follow-up v2.1.0 with an immediate v2.1.1 including this. But this has been open for so long I'll try to get it into v2.1.0.

Included in v2.1.0-rc3


Fix template app documentation

The PR fixes template app documentation
Pre-launch Checklist

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I signed the CLA.
[ ] I listed at least one issue that this PR fixes in the description above.
[x] I updated/added relevant documentation (doc comments with ///).
[ ] I added new tests to check the change I am making, or this PR is test-exempt.
[x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Per this comment, you will need to request a test exemption (which I'm sure will be approved): https://github.com/flutter/flutter/pull/131125#issuecomment-1646588683


[WIP] fix for s3 TF state bucket logs loop - issue 1333

This PR is aiming to fix this issue: https://github.com/gruntwork-io/terragrunt/issues/1333

[x] Fix related bug (pre-existing) to this issue - more details can be found here. Thanks to @yorinasub17 & @zackproser
[ ] Decide what to do with skip_bucket_access_logging - do we deprecate or fix forward & replace with enable_bucket_access_logging)

see below in comments

[x] Implement enable_bucket_access_logging as bool to flip logic around - e.g. if not provided, by default the logging will be turned off for the bucket. Thanks to @infraredgirl
[x] implement enable_bucket_access_logging as a string - if provided, we enable access logging for the bucket & use the string param as a name for the bucket; if not provided - disable access logging by default Thanks to @infraredgirl
[x] implement create bucket for access logs if name is provided, but bucket does not exist yet
[x] refactor for reausability the s3 create & set access methods
[ ] refactor to avoid duplication createS3BucketIfNecessary & CreateLogsS3BucketIfNecessary - potentially we can pass function call as a param?
[x] update/ add to automated tests
[x] update logging so it's clear that a setting has been turned on:
- EnableVersioningForS3Bucket (e.g. enabling..... -> enabled.....)
- EnableSSEForS3BucketWide
- EnableAccessLoggingForS3BucketWide
- EnablePublicAccessBlockingForS3Bucket
- configureBucketAccessLoggingAcl

last-terragrunt-apply-output.txt
☝ this is the output of the code ran at the last commit state.
All the logs are expected for the following terragrunt config:
# stage/terragrunt.hcl
remote_state {

  backend = "s3"
  generate = {
    path      = "backend.tf"
    if_exists = "overwrite_terragrunt"
  }

  config = {
    bucket = "ina-1"
    accesslogging_bucket_name = "ina-1-logs"
    key = "${path_relative_to_include()}/terraform.tfstate"
    region         = "eu-west-2"
    encrypt        = true
    dynamodb_table = "ina-1"
  }
}

Next steps to pick up:

confirm we can still see the same behaviour as the logs above show
confirm if param is not provided that S3 bucket for logs is not created
confirm if we need to sanitise input for name of s3 bucket
confirm what happens to skip... parameter
refactor duplication between createS3 bucket methods (for logs, and for standard state bucket)

As part of this PR, the default behaviour of terragrunt's functionality to create the TF State S3 bucket will change.
- previous implementation: create TF State S3 bucket with server access logging enabled & set to the origin (same) S3 bucket. For more details, please read through https://github.com/gruntwork-io/terragrunt/issues/1333, demonstrating why this is undesirable behaviour.
- new implementation with this PR" create TF State S3 bucket with server access logging disabled. Terragrunt users will be able to enable server access logging for the TF State S3 bucket by providing a name for the desired logs target bucket. This can be done using the accesslogging_bucket_name <string> parameter in the terragrunt.hcl configuration of their implementation.
In more detail:

The skip_bucket_accesslogging terragrunt option is being deprecated. It's no longer going to take effect on the S3 bucket for TF state creation and logging configuration.
A new terragrunt configuration option is added: accesslogging_bucket_name <string>

states in the terragrunt.hcl configuration file

not present -> server access logging disabled by default for TF State S3 bucket
empty -> server access logging disabled by default for TF State S3 bucket
present (valid string) -> the server access logging for the TF State S3 bucket will be enabled; the target logging bucket will be the S3 bucket with name as specified by the configuration option value accesslogging_bucket_name

if bucket with such name does not exist, the user will be prompted to create the S3 bucket.

Deprecating skip_bucket_accesslogging:
_We've got 3 options identified as to how to proceed. After chatting to @brikis98 we've decided it's best to go with a combination of 1 & 2. Option 3 is the most ideal scenario one, and feels like it's outside of the scope of this PR currently. As a way to see what's the engagement/appetite for option 3, here's an issue raised on the Terragrunt repo. _

basic option - remove the flag & update the docs & release notes
we detect the param - show error & provide guidance
warn people of existing bug & point them to fix it/or we automatically fix it for them (existing buckets)

Tests have been updated very little. The reasoning is, the important thing is that the terraform state is initialised using s3 backend. I couldn't find any other examples of the other config options being tested.
For the accesslogging_bucket_name config option, it feels like the effort to automate the testing of it will be more than the value of it would actually bring. I'm happy to take guidance if anyone feels strongly we should have the tests cover this explicitly. If that's the direction we take, I'd suggest doing it separately, so we can also test the rest of the properties alongside with this one, which would increase the test confidence in what the terraform init will affect if run with terragrunt.
I have tested manually the following cases:

not providing accesslogging_bucket_name => ✅
providing the value accesslogging_bucket_name => ✅
providing incorrect S3 name for the bucket => ✅
providing accesslogging_bucket_name as incorrect type of input => ✅
keeping the skip_bucket_accesslogging => ✅
providing value (bool) for the skip_bucket_accesslogging => ✅

I've not also gone ahead and added a new integration test as suggested @yorinasub17. This is still [WIP] as I needed to touch terratest as such functionality wasn't there yet. Please see this Draft PR.
I'm worrying that by touching terratest as part of this, it might be a bit of a scope creep, but the changes seem quite quick anyway. What's your take on this?

What's your take on this?

You can always start by having the function as a private function in the repo that will use it (in this case terragrunt), and then add a comment or file a TODO to port it to terratest. Even better if you start the PR in terratest (like you did here) so that we are less likely to forget it.
The main goal here is to disassociate merging this in from the terratest PR so that they can be released at different times. That way, if you end up in a massive yak shave to generalize the function or we have extended conversations about whether or not the function makes sense in terratest, it doesn't block this PR.

@yorinasub17 Have a look at the issue I've created here for the purposes of the discussion in your comment

What's your take on this?

You can always start by having the function as a private function in the repo that will use it (in this case terragrunt), and then add a comment or file a TODO to port it to terratest. Even better if you start the PR in terratest (like you did here) so that we are less likely to forget it.
The main goal here is to disassociate merging this in from the terratest PR so that they can be released at different times. That way, if you end up in a massive yak shave to generalize the function or we have extended conversations about whether or not the function makes sense in terratest, it doesn't block this PR.

Roger that! Thanks for the support!
So, I just pushed the last bit of changes I've added to this repo, but so far the test is not proving anything, as it points to the not yet implemented function in Terratest.
Do you suggest that I implement a temp function using the s3client in terragrunt & get the test passing, or is leaving it as a commented TODO like you've pointed out enough?

Some new commits here. Another review would be very welcome 👀 🙂

Thank you @brikis98 🎉
I think the reasoning we agreed on with @yorinasub17 was to not necessarily wait on the terratest, as that might be a yak shave, as it's turning out. I'll release this first thing on Monday, and then keep as a priority to close the terratest PR too.


GitHub Advanced Security: Setup

Task Description
To discover how to secure our code with GitHub Advanced Security features at various stages of our development lifecycle.

Dependabot is already setup(it is not raising more PRs as the previous ones are not merged for a while)
Code Scan: CodeQL is replaced by SonarQube.
Secret Scan: Activated and Push protection is enabled

Closing CC @Parsh


Some downloads do not work from aws

Checklist

[X] I'm reporting a broken site
[X] I've verified that I'm running yt-dlp version 2022.05.18 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[X] I've read about sharing account credentials and I'm willing to share it if required

Region
USA
Description
I just finished downloading another mp3 from aws with similar URL and this one failed.
Verbose log
14:47 [admar@marbase:/htera/flash] $ yt-dlp -vU https://fhtj22.s3.amazonaws.com/final/Pam_Oslie.mp3
[debug] Command-line config: ['-vU', 'https://fhtj22.s3.amazonaws.com/final/Pam_Oslie.mp3']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2022.05.18 [b14d52355] (zip)
[debug] Python version 3.10.4 (CPython 64bit) - Linux-5.15.0-39-generic-x86_64-with-glibc2.35
[debug] Checking exe version: ffprobe -bsfs
[debug] Checking exe version: ffmpeg -bsfs
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2
[debug] Optional libraries: secretstorage-3.3.1, sqlite3-2.6.0
[debug] Proxy map: {}
Latest version: 2022.05.18, Current version: 2022.05.18
yt-dlp is up to date (2022.05.18)
[debug] [generic] Extracting URL: https://fhtj22.s3.amazonaws.com/final/Pam_Oslie.mp3
[generic] Pam_Oslie: Requesting header
WARNING: [generic] Could not send HEAD request to https://fhtj22.s3.amazonaws.com/final/Pam_Oslie.mp3: HTTP Error 403: Forbidden
[generic] Pam_Oslie: Downloading webpage
ERROR: [generic] Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on  https://github.com/yt-dlp/yt-dlp/issues?q= , filling out the appropriate issue template. Confirm you are on the latest version using  yt-dlp -U
  File "/home/admar/bin/yt-dlp/yt_dlp/extractor/common.py", line 642, in extract
    ie_result = self._real_extract(url)
  File "/home/admar/bin/yt-dlp/yt_dlp/extractor/generic.py", line 2737, in _real_extract
    full_response = self._request_webpage(request, video_id)
  File "/home/admar/bin/yt-dlp/yt_dlp/extractor/common.py", line 786, in _request_webpage
    raise ExtractorError(errmsg, cause=err)

  File "/home/admar/bin/yt-dlp/yt_dlp/extractor/common.py", line 768, in _request_webpage
    return self._downloader.urlopen(url_or_request)
  File "/home/admar/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3596, in urlopen
    return self._opener.open(req, timeout=self._socket_timeout)
  File "/usr/lib/python3.10/urllib/request.py", line 525, in open
    response = meth(req, response)
  File "/usr/lib/python3.10/urllib/request.py", line 634, in http_response
    response = self.parent.error(
  File "/usr/lib/python3.10/urllib/request.py", line 563, in error
    return self._call_chain(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.10/urllib/request.py", line 643, in http_error_default
    raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: Forbidden

14:56 [admar@marbase:/htera/flash] $

The URL gives 403 in browser as well

This is the base URL where the above one was embedded: https://fhtjoy.com/replay/?simplero_object_id=su_tuWAVBXNs3LAtJ42emfZc8A8#Pam
Does that help?

If you want to open a "site request" for that site, you can - and hopefully someone will add support. I'm not going to spend my time figuring out how to get working stream URLs from the site and teaching that to each user.
If you don't really want the site supported, but just want to know how to manually get the manifest, you'll have better luck asking in community forums like r/youtube-dl - definitely not in the project's issue tracker!


Invariant decorator option to revert state changes to the blockchain

When developing stateful fuzz tests, I have had a few scenarios where I want to run a transaction to check that a condition holds, but I do not want that change commit those changes to the blockchain.
Here is an example of how I use this change in practice to verify that a user is able to can withdraw funds after a flow occurs, this should always be possible and I use the invariant to verify that.
 @invariant(period=1,commitChanges=False)
 def can_withdraw(self) -> None:
        #if a user has a balance, they should be able to withdraw and get all tokens back
       balance = self._bank.balanceOf(user);
       assert balance == self._bank.withdraw(balance, from_=user)

Hey @khegeman , thank for the Pr!
Fwiw I also agree with this design decision. In fact I would go a bit further: I think that invariants by default should not preserve state to better reflect human intuition of an invariant.
Fwiw here are my thoughts

I would rename the parameter to commit_changes
I would make it False by default
I would also rename the attribute to the same name (eg commit_changes)

ok.  I also think it should be False by default, but I didn't want to introduce a breaking change for any existing tests so I defaulted to the existing behavior.

Hey @khegeman, thank you for this pull request!
I agree with the comments from @hacker-DOM with the only exception that False as the default behavior may cause performance degradation. Let me evaluate this.
If we decide to go with the default False, I will merge this PR once I am sure the next release will be Woke 4.0 (because of the breaking change).

I am still learning woke.  Found this decorator in the docs today for snapshot and revert, adding this to an invariant does the same thing as my code change.
In further testing, I have noticed some unexpected side effects of using snapshot / revert with invariants, for instance tx_callback triggers for the invariant tx.  In addition, I believe there are some issues with block.timestamp and anvil when using the snapshot /revert.  I was noticing that inside my flows I was seeing that block.timestamp for flow n + 1 <= block.timestamp for flow n .  This is with both my proposed change and with the decorator.  Both exhibit the same behaviors.
    @default_chain.snapshot_and_revert()
    @fuzz_test.invariant(period=1)

A better solution for some of my invariants was to use a gas estimate, something like this:
self._bank.withdraw(balance, from_=user,request_type='estimate')

This will revert if it's not possible to execute withdraw and cause the invariant to fail.  But does not commit changes to the block.
For situations where this is suitable , it avoids the issues I was noticing with snapshot / revert.
In conclusion, you might not want to merge this change.

Yes, this decorator already exists and can also be used as a context manager:
with default_chain.snapshot_and_revert():
    tx = foo.bar()

Still, adding an easier way to revert all chain changes caused by transactions in an invariant may be reasonable.
Regarding the issue with timestamps, you are right. It seems that Anvil does not increase the timestamp of the next block right after a snapshot revert. I think this can be considered an issue in Anvil, I will communicate it with the Foundry team.
You may try request_type="call" instead of estimate. Calls are implicitly used for the execution of pure/view functions but you can enforce the call request type even for state-changing functions.


WIP: DynamicPrompt class creation (todo actually make it dynamic)

Checking that this structure looks generally ok -- going to sub in logic where the TODO comment is then add a test.

messed up the git state a bit initially but think i fixed it with the branch force push

also added callable for returning length attribute of prompt


Fix KiCAD8 var names

While trying to run a the README example for kicad8 (#179) I noticed the var names in kicad8/lib.py were wrong. It's still complaining about KICAD8_SYMBOL_DIR env var missing, is that user error?
$ cat test.py
#!/usr/bin/env python3

import os
import sys
from skidl import KICAD8
from skidl import set_default_tool
from skidl import lib_search_paths
from skidl import footprint_search_paths
from skidl import TEMPLATE
from skidl import Part
from skidl import Net
from skidl import generate_netlist
from skidl import generate_pcb

os.environ["KICAD8_SYMBOL_DIR"] = "/usr/share/kicad/symbols/"
set_default_tool(KICAD8)

lib_search_paths[KICAD8].append('/usr/share/kicad/symbols')
footprint_search_paths[KICAD8].append('/usr/share/kicad/footprints')
print(f"{footprint_search_paths=}", file=sys.stderr)

# Create part templates.
q = Part("Device", "Q_PNP_CBE", dest=TEMPLATE)
r = Part("Device", "R", dest=TEMPLATE)

# Create nets.
gnd, vcc = Net("GND"), Net("VCC")
a, b, a_and_b = Net("A"), Net("B"), Net("A_AND_B")

# Instantiate parts.
gndt = Part("power", "GND")             # Ground terminal.
vcct = Part("power", "VCC")             # Power terminal.
q1, q2 = q(2)                           # Two transistors.
r1, r2, r3, r4, r5 = r(5, value="10K")  # Five 10K resistors.

# Make connections between parts.
# ptlint:
a & r1 & q1["B C"] & r4 & q2["B C"] & a_and_b & r5 & gnd
b & r2 & q1["B"]
q1["C"] & r3 & gnd
vcc += q1["E"], q2["E"], vcct
gnd += gndt

generate_netlist()

$ ./test.py
WARNING: KICAD_SYMBOL_DIR environment variable is missing, so the default KiCad symbol libraries won't be searched. @ [/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap_external>:940=>/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap>:241]
WARNING: KICAD7_SYMBOL_DIR environment variable is missing, so the default KiCad symbol libraries won't be searched. @ [/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap_external>:940=>/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap>:241]
WARNING: KICAD8_SYMBOL_DIR environment variable is missing, so the default KiCad symbol libraries won't be searched. @ [/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap_external>:940=>/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap>:241]
WARNING: KICAD6_SYMBOL_DIR environment variable is missing, so the default KiCad symbol libraries won't be searched. @ [/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap_external>:940=>/home/cfg/cad/skidl/bug_179/<frozen importlib._bootstrap>:241]
footprint_search_paths={'kicad': ['/home/user/.config/kicad'], 'kicad7': ['/home/user/.config/kicad'], 'kicad8': ['/home/user/.config/kicad', '/usr/share/kicad/footprints'], 'skidl': ['/home/user/.config/kicad'], 'kicad6': ['/home/user/.config/kicad'], 'spice': ['/home/user/.config/kicad']}
WARNING: Could not load KiCad schematic library "Device", falling back to backup library. @ [/home/cfg/cad/skidl/bug_179/example_from_readme_bug_179.py:23]
WARNING: Could not load KiCad schematic library "Device", falling back to backup library. @ [/home/cfg/cad/skidl/bug_179/example_from_readme_bug_179.py:24]
WARNING: Could not load KiCad schematic library "power", falling back to backup library. @ [/home/cfg/cad/skidl/bug_179/example_from_readme_bug_179.py:31]
WARNING: Could not load KiCad schematic library "power", falling back to backup library. @ [/home/cfg/cad/skidl/bug_179/example_from_readme_bug_179.py:32]
INFO: No errors or warnings found while generating netlist.

Thanks! I incorporated your fixes into the development branch.


Fix most non-ASCII characters treated as fullwidth

When the rendering engine decides that a character is full-width, it skips a space, leaving it untouched, and continues in the next space. This looks really bad when the character is not, in fact, full-width. (I don't know if it looks good when the character is full-width.) This patch just fixes the detection of full-width characters in the Basic Multilingual Plane. (That last cc > 0xffee is also wrong, but didn't seem worth fixing.)
There's probably still issues with this line, as this change also squishes Chinese characters together for example... but Chinese characters didn't fit vertically into the cell either in my quick test. Still, additional ranges for CJK ideographs probably need to be added.

Hi,
thanks for this PR. I am going to merge it, although I am not really sure how this whole fixed-width feature works (it is a contributed code and my knowledge of this BMP/Unicode area is pretty leaky). Hopefully this patch improves the status quo :smile:


validation score of VQA

I downloaded the pre-trained model, and fine-tuned the VQA tasks. But I found while fine-tuning, the validation scores of VQA decreases in the first 4 epochs. Is this normal? I think it is hard to believe that the validation scores decrease but test scores increase...

I am using PyTorch 1.7, and I would check whether PyTorch version is the cause. But if so, I think maybe the mask has something to do with the results.

seems to be my own reason


profile inspector

Description
add a feature to inspect profile
How to invoke

Option 1: Right click on a message → Inspect user profile

Option 2: Slash command

Option 3: Right click user → Inspect profile

Usage
When inspecting user profile, it shows

basic info
the number of strikes the user currently has
recent moderation log for this user
buttons to add strike or reset strike

Right now getting a strike does not do anything.
Type of change

[x] New feature (non-breaking change which adds functionality)

Checklist:

[x] I have run pnpm format and my code don't have any linting issues

[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation

If we keep all moderation log, in long run production the DB might be too large. I suggest having a measure to handle this like deleting the moderation log after a period of time.

@01110111-wave this is a valid concern.
doing quick maths, the server currently has at least ~30 GB of free space. assuming each log entry takes 1 KB, and there are 10,000 moderation logs per day (e.g. every 9 seconds), it’s going to take 8 years to fill up that disk space.
so in my opinion, it doesn’t have to be implemented immediately and we can have such process in the future. the deployment team can help us monitor the disk usage in the meantime.


The feature "Allow to output full component via computeDelta" has issues

The recent optimization done to speed up flutter test runs by allowing the front end to output a full component via computeDelta has issues with flutter restart.
The CL https://dart-review.googlesource.com/c/sdk/+/47020 was reverted to allow us to proceed with getting other fixes into google3.

CL in review now.


Publisher portal font style gets changed when on the Test console

Describe your problem
On the publisher portal, entering the Test Console - Initialize test makes the whole publisher portal's font larger and bold.
Screenshots
Normal Screen

Test console Screen

the issue is fixed from https://github.com/wso2/carbon-apimgt/pull/9056


Scrolling to the bottom of the page whenever clicking to the next step

Describe the bug
Whenever clicking or starting the tour on the current component, the window will scroll away from the target and go to the bottom of that page. This repeats with every step forward or backwards. It will not scroll to the target, it will instead scroll to the bottom of the page, but the v-tour popup will be placed correctly at the top.
To Reproduce
Steps to reproduce the behavior:

Start tour, initial load will appear at the top of the page, the window will scroll to the bottom of the page
Scroll to the top of the page to click "next", the next step will appear and the page will scroll again.

Expected behavior
The window would scroll to where the v-tour step occurs
Desktop (please complete the following information):

OS: Windows 10
Browser Chrome
Version 85.0.4183.102

https://codepen.io/jtoddp14/pen/ExKGVWK - doesnt work but you can see how everything is written

Hi @jtoddp14,
It's weird we never experienced such a behavior when testing. It certainly has something to do with the auto-scroll feature though. Have you tried to disable it? (https://github.com/pulsardev/vue-tour/wiki/Features#disable-scroll-between-steps)
{
  target: '#v-step-0',
  content: `Discover <strong>Vue Tour</strong>!`,
  params: {
    enableScrolling: false
  }
}

Really weird, especially given that if you don't set a custom duration or offset, we also use scrollIntoView().
https://github.com/pulsardev/vue-tour/blob/master/src/components/VStep.vue#L126
I'll close the issue for now, as the issue seems to be linked to your project setup, but we'll keep an eye on it when migrating the lib to Vue 3.


Search to URL

I'm using this search option in the mixitup filter: (https://demos.kunkalabs.com/mixitup/filtering-by-text-input/)
I want to add the result in the url like: https://example.com/#search=example. Is this possible?

Hi @Sybrenb - this functionality isn't part of MixItUp - but you could easily create some custom code to generate and populate your URL hash segment as part of the existing keyup handler code.
You'd also need to adapt the demo a bit to:

Read from and parse the URL on page load
then throw your search value into the input field
and, provide that value to mixitup as its initial filter value:

const initialSearchValue = ... // code to parse URL hash segment

inputSearch.value = initialSearchValue;

const mixer = mixitup({
    load: {
        filter: initialSearchValue ? '[class*="' + searchValue + '"]' : 'all'
    }
});

Hope that makes sense.

Closing for now, but let me know if you need more information.


Pomelo Game Framework facing table freeze issue Or memory leakage issues

Hi Pomelo team,
Our multi-user Poker game is made on Pomelo framework 2.2.5. We are using Mongo DB as the database.
We are facing table freeze issue sometimes. Could it be the memory leakage issue on this version of Pomelo?
Kindly assist with some feedback.

what does We are facing table freeze issue sometimes. mean?
pomelo just only a framework .

Hello whtiehack,
"We are facing table freeze issue sometimes" mean?
It means that my game engine is pomelo and front end is on cocos2dx (Cocos Creator) some times our game's broadcast got stuck. Is there any problem in rpc (socket.io) connection of Pomelo?

PRC？ 服务器之间的RPC？是超时吗？


Added option for geodesic curvature in the GaussCurvature functional

This PR adds the option of setting a flag geodesic to be true in the GaussCurvature functional object. This is useful to compute the Gaussian curvature integrals for open surfaces using the discrete Gauss-Bonnet theorem. This allows us to do something like
var mesh = Mesh("disk.mesh")
mesh.addgrade(1)
var bnd = Selection(mesh, boundary=true)

// Geodesic curvature
var lgc = GaussCurvature()
lgc.geodesic = true
print lgc.total(mesh, selection=bnd) //expect 2*Pi * Euler characteristic, = 2*Pi

Hmm, the geodesiccurvature test is passing on my laptop. Will have to look into it further.

Turns out I forgot to add the disk mesh file :/
Passing the tests finally.

I will add documentation and more tests later today.

I have now added documentation and updated the test. The geodesic curvature calculation is now tested on a flat disk, an open tube and a hemispherical shell.


An error occurs when 'const' is added to the enum export and the tsconfig.json setting is 'isolatedModules': true'.

Commit that caused the problem
https://github.com/BabylonJS/Babylon.js/commit/a6dc77a5c1cbab71b4ba8559bb5d8269a0bda811
Description

Suppose that the options for tsconfig.json are.
The typecript displays an error when using the PhysicsMotionType enum as follows.

I don't think it's a good idea to simply modify the option "isolatedModules" to false, for example, because Next.js, a much-used framework, recommends using the option "isolatedModules" as true.
This is my personal opinion and I would like to hear from the contributors.

let me find a solution for this. This is a typescript types-only issue, as the enums are exported correctly. Will probably need to adjust the types exported.

updated to 7.13.2, now everything works, great job 😚


No import feature implemented in savings account

The current state of app has no mechanism to restore wallet from mnemonics.

closing since we're archiving the repo


add rsprague81's file

created a branch,  created a file,  made a commit and opened a pull request

merged commits


Better error handling

Currently any error returns an empty page with a big red traceback block. It would be nice if we could make this a bit more graceful.

see http://remix.run/docs/en/1.13.0/route/error-boundary and http://remix.run/docs/en/1.13.0/tutorials/jokes#unexpected-errors

Bartender errors are now forwarded see https://github.com/i-VRESSE/bartended-haddock3/commit/6c4b1a0ee959ab68780041bbe9fd426952542270

https://github.com/i-VRESSE/bartended-haddock3/pull/47#pullrequestreview-1578308524 also mentions error reporting improvements.

PR #71 form errors are handled.


chore: convert undefined to null to support go omitempty

This supports languages like Go, who can omitempty any nil/empty fields in a JSON encoded struct.

Will run through CI tests on the bindgens once this is released, but manually passed Go and TypeScript.


Investigate an approach to maintaining the latest resources (modules) in alignment to the latest API Versions

Description
We need to have a method for reading the latest published API versions from Azure resources and find a smart way to creating GitHub issues where it makes sense so that we don't constantly populate issues that makes it hard to track or maintain.

Can be achieved using the 'AzureAPICrawler ' module that we're already leveraging in our Pester tests. Further, @rahalan created a logic we can re-use to create issues based on that. We'd however need to make sure we're not creating issues to update the API verisons - and also created issues to fix failing pipelines (that fail due to the failing API versions).


need adobe creative cloud api documentation

Documentation Location
Appdirect
Issue Description
I need complete API documentation for adobe creative cloud for our internal project development.
I want all updates on asset and folder
Receive updates on assets
Receive updates on folders

This is not the project for creative cloud documentation. I believe that is https://github.com/AdobeDocs/creative-sdk


Installation script bug: st2_deploy.sh latest

According to Installation Docs It's possible to pass latest parameter to installation script.
sudo ./st2_deploy.sh latest
sudo ./st2_deploy.sh stable

However it doesn't work.
The reason is that $LATEST (or $STABLE) from st2_deploy.sh looks like:
LATEST=`curl -Ss -q https://downloads.stackstorm.net/deb/pool/trusty_unstable/main/s/st2api/ | grep 'amd64.deb' | sed -e "s~.*>st2api_\(.*\)-.*<.*~\1~g" | sort | uniq`
echo "$LATEST"
0.10dev
0.9
0.9.0
0.9dev

which generates incorrect download URL:
https://downloads.stackstorm.net/releases/st2/0.10dev 0.9 0.9.0 0.9dev/debs/st2_deploy.sh
Also: https://downloads.stackstorm.net/releases/st2/0.9/debs/st2_deploy.sh - 404

Thanks for the report. We are looking into a fix.

As per @DoriftoShoes, this has not been resolved. Thanks again for the report.


Split out results fetch on crew details page

Since they will change during the course of the race, it's probably worth fetching them in a separate AJAX request. This will probably mean that we can simplify some of the View code as well.

Duplicate of #11


update for Svelte 3

Wow, things are really moving quickly for Svelte v3! Very exciting days :smile:

It might be nice to add a prepare script so that people can try this out by installing it directly from Git.

Decided to make this slightly simpler — this branch now supports Svelte 2 and 3, so it can be released as a minor version. Instead of adding a prepare script I've just moved the whole thing into a CJS index.js file. Makes life easier all round.


Fix pig latin challenge description

Added statement for beginning with consonants as it is a bit unclear if you just read the two existing statements.

[x ] I have read freeCodeCamp's contribution guidelines.
[x ] My pull request has a descriptive title (not a vague title like Update index.md)
[x ] My pull request targets the master branch of freeCodeCamp.
[x ] None of my changes are plagiarized from another source without proper attribution.
[x ] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x ] My changes do not use shortened URLs or affiliate links.

Closes #XXXXX

I'll let whomever has the ability to review it decide,

I am reviewing it.  I personally do not think this change is needed, but I will let other mods voice their opinion also.  Together we will come to a consensus of how to proceed with this PR.
Thank you for your input.

I redid the challenge and I don't think it's terribly worded.  We could perhaps make it clearer, though.  How about:

If a word begins with a vowel just add "way" to the end.
Otherwise take the first consonant (or consonant cluster), move it to the end of the word and append "ay"
If there are no vowels, you should still append "ay"

The third rule is technically redundant (it's covered by the second rule), but it should make it clear that you should do something, even if there are no vowels.

@Manish, just close it then. I think the wording on a lot of challenges needs reviewed but this one in particular is the one that annoyed me. Since no one can see the flaw in how it’s structured then I guess I am alone in this.

This PR has been sitting here for a bit. I kind of agree that it doesn't quite seem right. The problem is that the first line is referring to "Pig Latin", while the second two lines are referring to "you" as in the user. So the first line doesn't feel like an instruction. What about this...
Pig Latin is a way of altering English Words. The rules are as follows:

If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add "ay" to it.

If a word begins with a vowel, just add "way" at the end.

Translate the provided string to Pig Latin. Input strings are guaranteed to be English words in all lowercase.

I also don't mind the other two suggestions, but I think I like mine.

I like Tom's suggestion.  It gets rid of the redundant "If a word does not contain a vowel, just add "ay" to the end. " and clearly separates the description from the instruction.  I would also suggest moving the instruction part within the instructions sections to make it more clear.
@ojeytonwilliams @Manish-Giri If you are ok with that, then let us know, so we can instruct the OP to make the applicable changes and merge something that makes any improvement to what is currently written.  Otherwise, we should just close this PR.

Sure, let's go with Tom's suggestion.

I'm also fine with the suggestion, let's go ahead.

@crandalj Can you please implement @moT01's suggestion?  Thank you.

@crandalj @ojeytonwilliams @moT01 @Manish-Giri In an effort to save time, I have made the suggestions made by @moT01.  I added an undorded list to the description, but I am fine changing it to something else if need be.  Also, I moved the instructions to the Instructions section.
Can we get two final reviews on the changes?
Thanks.

I don't mind the unordered list, but wondering if an ordered list would be better here. Either way works for me.

I don't really think an ordered list is needed as there is not a specific order in which the requirements must be performed.  I think of an ordered list as steps in a process where order matters.


Feature request: Jump to file:line from console

eg, if I call @which from the console, it would be cool to click on the filename and line number that it outputs and have an editor pane jump to the named buffer location.

I had this working in Juno/LT for error messages as well as method lists etc. – definitely planning to get it working in Atom as well.

your wish is my command

thanks! finally i can now live the life ive imagined for myself.


Community Feedback Ask - Pending Changes

We're thinking of implementing the Ops Manager pre-deploy-check endpoint in om(a 2.6+ feature). Our thoughts are to put it into pending-changes, which is a different, less complete version of the endpoint. however, pre-deploy-check sounds better than pending-changes, so we're considering

making an entirely new pre-deploy-check command
changing the pending-changes command name to pre-deploy-check
just keeping it a part of the pending-changes command (with a flag like --verbose or something)

Any thoughts from the community on this matter? We'll be starting the work today, under the assumption of keeping these changes at the very least in the pending_changes_service, whether they stay there, move to their own, or are renamed.

There appear to be two endpoints for pre-deploy-check, one for the director, and one for products
/api/v0/staged/director/pre_deploy_check
/api/v0/staged/products/:product_guid/pre_deploy_check
Perhaps it makes more sense, with this knowledge, to have pre-deploy-check as its own command

perhaps it'd make sense to introduce pre-deploy-check as it's own experimental command first, and then decide whether it's worth rolling it into an existing command or not once you have some feedback?
in particular, now that we're in semver-land, the experimental flag may be useful as a way to iterate on changes until they are ready to become part of the supported "api".

We decided to have a new command as suggested @mcwumbly ! Thank you for the response!


Poster and backdrop images don't load

In MovieDetailFragment.java, both poster and backdrop images don't load. Should investigate further to find out cause of issue.

Careless error wherein url parameter passed to glide was the imageview and not url.


Handle deep linking with kubeconfig ID, figz #841

Description
Changes proposed in this pull request:

...
...
...

Related issue(s)
Closes #841
Closes #853

/retest

/test pre-busola-integration-test-k3s


UI doesnt give the option of disabling scheduler in env template creation screen

Rancher versions:
rancher/server: 1.5.10
Steps to Reproduce:

create environment template (in this case kubernetes based)
scheduler stack/service is enabled
no option to disable scheduler stack from env template

@deniseschannon pointed out that you have to hit Ctrl or Command + clicking the requied. maybe a pop up dialog or something to hint would be nice.

302 @willchan, the only reason there's a hidden option is because I didn't want to make them required...

Old and n/a to 2.0.


Error when first installing

When I tried to install cesium on a TI-84 Plus CE-T I got an error that said: "Attempted to use a variable or function where it is not valid."

Looks like you need to use the arTIfiCE jailbreak?

Yes, I didn't now that was a thing. Thank you


Fix dot lookup paths

I'm going to merge this in. Feel free to leave comments anyway if you like and I can follow up.

Nice catch, and well fixed!


stringr draft PDF

Updates to 1.4.0
Changes:
-str_starts() and _ends() added
-starts/ends/detect/which/subset have a new negate argument
-str_remove() and _remove_all() added
-str_to_sentence() added
-str_squish() added
-str_flattens() replaced a str_c() example

@mine-cetinkaya-rundel

@garrettgman


Only add --color to grep's alias if that option is valid.

The option --color is not available on all versions of grep. This change verifies that the option is valid before adding it to the alias used by default.
Fixes #3470.

Closed by the identical #3538.


AppExtras is still on settings, although we have a configuration registry entry for it...

It seems we never really made the migration :(
config.AppExtras is there but the one really working is: config.settings.AppExtras.

I did not knew there's an config.AppExtras . I think it's fan to keep it in config.settings.

Then let's remove the config.AppExtras :)


Fixed charts container width

Related issue #44

Cool @sakhawy , thank  you

Hi @Darkbeast-glitch! Thanks for taking a look! I checked again and it looks like the rest of the page -including the other charts and page content after the first chart- is mistakingly nested inside that first column(?) That's why the lazy fix of changing the class from col-md-4 to col-md-12 worked I think.

(The yellow underline is highlighted by a popular VSCode extension called "Highlight Matching Tags".)
I did a quick count of opened div tags vs closed ones and looks like there are 2 missing closing </div>s:
$ grep -o "<div" schedule_talx.html | wc -l
13
$ grep -o "</div" schedule_talx.html | wc -l
11

Thank you soo much @sakhawy  for the help

Oh! The chart got removed I see. The other ones look good! Thanks, I'm closing this PR! Should I close the other issue as well since that chart isn't there anymore (#46)?


fix typo

I saw it was already fixed somewhere else in the README file

Cool, thanks a lot, Riccardo!


Portfolio website

Deploying on GitHub pages.

Deploy

@Nowshin1077 I suspect you have opened this PR mistakenly against the upstream instead of your own fork. Is it the case?


[UBS-User.Edit Profile] The keyboard navigation in the drop-down list does not work.

Environment: all
Reproducible: always
Build found: 24/07/2023
Preconditions

The registered user is logged in https://www.greencity.social/#/ubs
User data tab is opened

Steps to reproduce

Click on “Edit data” button
Click on "Add address" button
Input first letter "K" in "Region" field
Choose the keyboard navigation in the drop-down list second region
Input first letter "K" in "City" field
Choose the keyboard navigation in the drop-down list second city
Input first letter "K" in "Street" field
Choose the keyboard navigation in the drop-down list second street

Actual result
The user can not navigate through the item  drop-down list using keyboard.

Expected result
The user should be able navigate through the item  drop-down list using keyboard.
User story and test case links
E.g.: "User story #3811
Labels to be added
"Bug", Priority ("Medium"), Severity ("Minor"), Type ("Functional")

This bug is fixed


[Design] - HR Portal

Status

[x] Being Researched
[x] Prototyping and Testing
[ ] Data Story
[ ] Ready For Dev

Design Goal
Please explain the primary goals of this design work.
HR users need their own portal to view posters, review applicant screening, etc.
Research
Please list/link to all research performed for or referenced in this design work. This can include research you've done in the past. Include research relevant to insights from team members as well. Don't be afraid to ask for references or documents! This section should also incorporate data collected from user testing.

Direct interactions (emails/conversations) with HR Managers and HR Advisors requesting this feature.

Assumptions
Please list all assumptions made during your design work. This should include behavioural assumptions made by the team that have no direct research references.

Creating an HR Advisor Profile will be the same as creating a Manager Profile and is not shown within the wireframes.
HR Advisors will initially have the ability to view and only add notes as shown within the wireframes. There is no additional functionality other than notes.

Important Notes / Copy
This is a space to include important notes for other team members, including things like key copy, questions that need to be asked at a later date, etc.

The tabs presented within this set of wireframes are for discussion only are not apart of the actual issue itself.

Wireframes / Images

HR Advisor Portal

Final Data Story
Use this section to summarize where we started, and how and why we got to the approved design. This section must be complete before the issue can be handed off to development.

https://github.com/GCTC-NTGC/TalentCloud/issues?utf8=✓&q=is%3Aissue+is%3Aopen+label%3ADesign+


breaking changes from 9 to 10 not documented

Current behavior

can you please document what has changed in the api from 9 to 10 and 2 to 3
Expected behavior

How do you think that we should fix this?

Minimal reproduction of the problem with instructions

Environment

ngx-translate version: X.Y.Z
Angular version: X.Y.Z

Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

For Tooling issues:
- Node version: XX
- Platform:

Others:

All changes are documented here: https://github.com/ngx-translate/core/releases


read_block throws out of bounds exception even when rectangle is in bounds

Hi,
I've been facing some issues when using the slideio python library, particularly with the read_block function.
First an explanation of what I'm trying to achieve (can be skipped but as an extra reference for clarity):
I am trying to read blocks of 40000x40000 (as determined by MAG_LEVEL_SIZES and self.magnification_level) from SVS files that vary in size significantly.
Many images are smaller than 40000 pixels in one dimension or both, so I crop the width and height and change the x and y coordinates if necessary.
In short, I am trying to take a center crop of an image, without stretching or rescaling
I then want to rescale the image to fit into a 1024x1024 image (determined by self.patch_size) without scaling it up or down relative to differently sized images. This means if there is a 10000x10000 image, then the resulting patch should be 256x256 since 10000 is 4x less than the desired crop of 40000 and so 256 is 4x less than the desired crop of 1024.
        slide = slideio.open_slide(self.svs_dir + self.train_slide_ids[slide_index] + ".svs", "SVS").get_scene(0)
        width, height = slide.size

        center_x = width // 2
        center_y = height // 2
        zoomed_size = MAG_LEVEL_SIZES[self.magnification_level]
        x = center_x - zoomed_size // 2
        y = center_y - zoomed_size // 2

        cropped_x = 0 if x < 0 else x
        cropped_width = zoomed_size + 2 * x if x < 0 else zoomed_size

        cropped_y = 0 if y < 0 else y
        cropped_height = zoomed_size + 2 * y if y < 0 else zoomed_size

        patch_width = int(cropped_width * (self.patch_size / zoomed_size))
        patch_height = int(cropped_height * (self.patch_size / zoomed_size))

        cropped_patch = slide.read_block((cropped_x, cropped_y, cropped_width, cropped_height), size=(patch_width, patch_height))

The important line of code here is:
cropped_patch = slide.read_block((cropped_x, cropped_y, cropped_width, cropped_height), size=(patch_width, patch_height))

When I run this, it works on almost all SVS files, but there are a few that throw the following error on the read_block line:
  File "venv/lib/python3.9/site-packages/slideio/py_slideio.py", line 142, in read_block
    return self.scene.read_block(rect, size, channel_indices, slices, frames)
RuntimeError: OpenCV(4.1.1) data/opencv/4.1.1/slideio/stable/build/d2d7c166445ab3854d53f31fe8dffbc378a29414/source_subfolder/modules/core/src/matrix.cpp:465: error: (-215:Assertion failed) 0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols && 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows in function 'Mat'

(the opencv assertion is here https://github.com/npinto/opencv/blob/42f7329c788bf2eb60b2c1de2ed8efb91ae84cde/modules/core/src/matrix.cpp#L321)
This would seem to indicate a problem with the rectangle coordinates and width/height I passed in.
The dimension of the SVS file this fails for is 52188x37393 and below are the values I used for cropped_x, cropped_y, cropped_width, cropped_height, patch_width, and patch_height, and whether the error was thrown or not.

cropped_x
cropped_y
cropped_width
cropped_height
patch_width
patch_height
error?

6094
0
40000
37392
1024
957
yes

6094
0
39999
37391
1024
957
yes

6094
0
39997
37392
1024
957
yes

6094
0
40000
37392
1024
1024
yes

6094
0
40000
37392
1000
1000
yes

6094
0
40000
37392
1
1
yes

6094
0
40000
37392
0
0
no

6094
0
39996
37392
1024
957
no

6094
0
39995
37392
1024
957
no

6094
0
39990
37382
1024
957
no

6094
0
1000
1000
1024
957
no

The first row in the table above are the values that I actually want to run this with, the rest are just me testing whether it works or not.
I expected this to work for every single one of the entries in the table above, and have no idea why it suddenly starts working when cropped_width < 39997 even though 6094 + 40000 < 52188. I also thought that the size parameter (i.e. patch_width/height) should have no impact on whether this fails, but clearly when size=(0,0) this works fine.
I've been trying to figure this out for the last few days so any help at all would be super appreciated!
Thanks,
James

Hello James,
thanks a lot for the message. I tried to reproduce the problem, but had no success. Do you use the latest (2.0.8) version? If not, please upgrade. I recently made a few fixes that may solve the problem.
Should the problem persist, please share with me the following information about the problematic image:

tile size (you can see it in the Image/Information dialog of ImageScope).
compression type (in the same dialog).
If possible, please share the image with us, as it would greatly assist us in reproducing and fixing the problem. However, this may not be necessary in this case.
Best regards,
Stanislav

Thanks for the quick reply - will try the latest version tomorrow and get back to you asap with the extra info if it doesn't work!

Doh! I was on 1.0.4, but I have just upgraded to 2.0.8 and it seems to be working fine now. Thanks for your help - maybe this is worth noting somewhere as although in hindsight it's obvious I should have tried updating, it would have been much easier to solve if it was flagged somewhere as a bug in a previous version :)
Thanks so much for your help!


[TACHYON-1428] Documented parts of the tachyon-servers module in preparation for the checkstyle rule

https://tachyon.atlassian.net/browse/TACHYON-1428

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Tachyon-Pull-Request-Builder/7812/
Test PASSed.

@HorizonNet thanks for the PR. I put a comment inline regarding IllegalArgumentException. Otherwise the patch looks good to me. Thanks!

@apc999 Thanks for the comment. It was very helpful. I updated the PR to include the description for the IllegalArgumentException  in the general documentation for the methods and removed the exception from the signature.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Tachyon-Pull-Request-Builder/7820/
Test FAILed.

Jenkins, test this please.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Tachyon-Pull-Request-Builder/7823/
Test PASSed.

+1 LGTM


Add nullability macros to all EarlGrey headers.

Unit tests fail:
https://travis-ci.org/google/EarlGrey/jobs/351569357

Full error:
/Users/travis/build/google/EarlGrey/Tests/UnitTests/Sources/GREYFailureFormatterTest.m:38:45: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
  NSString *failure = [GREYFailureFormatter formatFailureForTestCase:currentTestCase

Will merge once that's fixed.

Updated Project. PTAL.

Still see a lot of failures: https://travis-ci.org/google/EarlGrey/builds/357608543?utm_source=github_status&utm_medium=notification

Exact error:

No such file or directory: '/Users/travis/build/google/EarlGrey/EarlGrey/EarlGrey.m'


cilium: fix service_cache_test literal copies

Fix literal copies in service_cache_test caused by passing struct with
a RWMutex lock via copy. Instead pass the pointer.
Version and error from 'make' below
$ go version
go version go1.11.2 linux/amd64
$ make
can't load package: package github.com/cilium/cilium/test/bpf: C source files not allowed when not using cgo or SWIG: bpf-event-test.c unit-test.c
go tool vet api pkg test proxylib envoy plugins bpf daemon cilium-health bugtool tools operator
pkg/k8s/service_cache_test.go:340: literal copies lock value from svcCache: k8s.ServiceCache contains github.com/cilium/cilium/pkg/lock.RWMutex
pkg/k8s/service_cache_test.go:446: literal copies lock value from svcCache: k8s.ServiceCache contains github.com/cilium/cilium/pkg/lock.RWMutex
pkg/k8s/service_cache_test.go:533: literal copies lock value from svcCache: k8s.ServiceCache contains github.com/cilium/cilium/pkg/lock.RWMutex
pkg/k8s/service_cache_test.go:563: literal copies lock value from svcCache: k8s.ServiceCache contains github.com/cilium/cilium/pkg/lock.RWMutex
Makefile:212: recipe for target 'govet' failed
make: *** [govet] Error 1
Signed-off-by: John Fastabend<EMAIL_ADDRESS>

This change is

Coverage decreased (-0.1%) to 44.053% when pulling db189af8cf1b6aea56b7bf0b092353f6c847a7fe on fix-k8s-gotest into 79f604f48a855c412f05403ba85e0fbb775815bf on master.

Given that travis-ci passed, this can be merged.


Collapsible items in groups DataTree

What is your issue?
Originally posted by @ in
Having collapsible items (like xarray.Datasets) in groups repr_html_ would help to have user friendly overview of Python objects.
I am wondering whether this feature is already available or not.

Clarification: The ask here is to make individual groups collapsible in the HTML rendering, so it is possible to see all the child groups, without having to see the full contents of a group.

When migrating this issue, we discussed that this work may need to (or wait for) be part of a larger rewrite of the HTML rendering code.


Enable POP3 on 995 or 110 port for GMAIL.

enable pop3 on por 995 or 110 for import mails from GMAIL, because GMAIl does not import from IMAP

Thank you for the task Erajuan. We will review the it.

It should be enabled. Can you provide a bit more details how do you install EasyMail?

Download ans start the script install.sh , without docker
> wget https://github.com/runeasymail/easymail/archive/v0.6.3.tar.gz -O easymail.tgz && mkdir easymail && cd easymail && tar -xvzf ../easymail.tgz --strip 1
> bash install.sh

I remove RAM + SWAP valitation (for DROPLET on digital ocean 1GB RAM)
Ubuntu 10.04.2 x 64

Configuration with server POP 110
El servidor ha denegado el acceso POP3 a este nombre de usuario y contraseña.
El servidor ha devuelto el error "[AUTH] Plaintext authentication disallowed on non-secure (SSL/TLS) connections."
Configuration with server POP 995
Se ha producido un problema al conectar con mail.example.com
El servidor ha devuelto el error "Connection refused"
The user and password is ok, I login in Roundcube

Hi
It seems like you are using mail.example.com which is not a valid name. Did you try with your own domain?
Thanks,
Gyuner Zeki

Yes. I use my domain

Hi @erajuan
What do you have as a result if you try to check the port for example with http://ping.eu/port-chk/ ?
Thanks,
Gyuner

Port 110 is OPEN
Port 995 is CLOSED
COPY from last comment
Configuration with server POP 110
El servidor ha denegado el acceso POP3 a este nombre de usuario y contraseña.
El servidor ha devuelto el error "[AUTH] Plaintext authentication disallowed on non-secure (SSL/TLS) connections."

Can you send me screenshot from the Gmail page where you put the settings?

Hi @erajuan
I have just tested it on one of live server based on EasyMail and here are the settings.
http://store.picbg.net/pubpic/8F/4C/6127f9b88fe08f4c.png
Can you please check is that works for you?
Thanks,
Gyuner Zeki

Hi @GyunerZeki
I tried that, but my port 995 is closed (http://ping.eu/port-chk/)
My server based on EasyMail v0.6.3
Port 995
Server returned error: "Connection refused"

Hi @erajuan
I have just tested in the new version of the EasyMail and it doesn't really work on the last a few versions. From tomorrow we're starting to search for the problem and try to fix it really ASAP.
In the slack channel (runeasymail.slack.com) we are starting a discussion about it and fix it. If you want to be informed of details you can join too.
I personally would like to say thank you for reporting this problem and I will go back to you when we resolve that problem.
Thanks,
Gyuner

Thanks @GyunerZeki

Hi @erajuan
I found the problem. Since you already have an installed version of Easymail cam you try to execute the following can and check is solving the 995 port problem.
echo "
ssl = required
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
" >> /etc/dovecot/dovecot.conf && service dovecot restart
Please let me know the result.
Thanks,
Gyuner

This problem is fixed on https://github.com/runeasymail/easymail/pull/139 and will be released on the new version of Easymail

Yes. The problem was fixed.
Thanks.


Attach

This implements the Attach API. We do this with a unix domain socket to copy back the data from the container stdio and a control fifo for terminal resizes.
We still need to implement non-terminal attach in a follow-on.

@sameo @runcom PTAL
You will need to apply this patch to runc:
diff --git a/libcontainer/console_linux.go b/libcontainer/console_linux.go
index e431766..4364511 100644
--- a/libcontainer/console_linux.go
+++ b/libcontainer/console_linux.go
@@ -20,9 +20,9 @@ func newConsole() (Console, error) {
        if err != nil {
                return nil, err
        }
-       if err := saneTerminal(master); err != nil {
-               return nil, err
-       }
+       //if err := saneTerminal(master); err != nil {
+       //      return nil, err
+       //}
        console, err := ptsname(master)
        if err != nil {
                return nil, err

cluster/kubectl.sh run ex-shell  --rm -it --image busybox

I'll fix the tests.

Is the runc patch going upstream?

Eugh, more issues with saneTerminal. Was I completely wrong to include that code? Should we set up the termios properly on the read side to fix it?

@cyphar I will look into this a bit further. It will be good if we can fix it in conmon. The issue I am seeing is exactly what was reported against docker.

Pushed changes (but haven't run tests locally).

retest

retest

The tests are failing with container id exists. Probably a race somewhere. I'll dig into the failing tests further.

CI is failing with a weird error
Jun  2 18:28:04.222: INFO: At 2017-06-02 18:21:46 -0400 EDT - event for downwardapi-volume-dd0779cf-47e1-11e7-80f6-fa163e5ea14c: {kubelet crio-int-prs-rhel-33dxu6.localdomain} Failed: Failed to create container with error: rpc error: code = 2 desc = error reading container (probably exited) json message: EOF
Jun  2 18:28:04.223: INFO: At 2017-06-02 18:21:46 -0400 EDT - event for downwardapi-volume-dd0779cf-47e1-11e7-80f6-fa163e5ea14c: {kubelet crio-int-prs-rhel-33dxu6.localdomain} FailedSync: Error syncing pod, skipping: failed to "StartContainer" for "client-container" with rpc error: code = 2 desc = error reading container (probably exited) json message: EOF: "Create Container Failed"

Jun  2 18:28:04.223: INFO: At 2017-06-02 18:21:47 -0400 EDT - event for downwardapi-volume-dd0779cf-47e1-11e7-80f6-fa163e5ea14c: {kubelet crio-int-prs-rhel-33dxu6.localdomain} FailedMount: MountVolume.SetUp failed for volume "kubernetes.io/downward-api/dd07a0d9-47e1-11e7-8ca4-fa163e5ea14c-podinfo" (spec.Name: "podinfo") pod "dd07a0d9-47e1-11e7-8ca4-fa163e5ea14c" (UID: "dd07a0d9-47e1-11e7-8ca4-fa163e5ea14c") with: remove /var/lib/kubelet/pods/dd07a0d9-47e1-11e7-8ca4-fa163e5ea14c/volumes/kubernetes.io~downward-api/podinfo/resolv.conf: device or resource busy
Jun  2 18:28:04.223: INFO: At 2017-06-02 18:21:47 -0400 EDT - event for downwardapi-volume-dd0779cf-47e1-11e7-80f6-fa163e5ea14c: {kubelet crio-int-prs-rhel-33dxu6.localdomain} Failed: Failed to create container with error: rpc error: code = 2 desc = container create failed: container with id exists: e2e-tests-projected-ggctv-downwardapi-volume-dd0779cf-47e1-11e7-80f6-fa163e5ea14c-0-client-container-0

Jun  2 18:28:04.223: INFO: At 2017-06-02 18:21:47 -0400 EDT - event for downwardapi-volume-dd0779cf-47e1-11e7-80f6-fa163e5ea14c: {kubelet crio-int-prs-rhel-33dxu6.localdomain} FailedSync: Error syncing pod, skipping: failed to "StartContainer" for "client-container" with rpc error: code = 2 desc = container create failed: container with id exists: e2e-tests-projected-ggctv-downwardapi-volume-dd0779cf-47e1-11e7-80f6-fa163e5ea14c-0-client-container-0
: "Create Container Failed"

retest

retest

retest

The tests are in good shape now.

Awesome, can you rebase on master to get full rhel coverage as well?

Rebased to master.

LGTM

Awesome, is this ready to go? You'll follow up for multiple attach right @mrunalp?

I'll kick off e2e for this tomorrow morning to check it fixes our last failures there.

@runcom Yeah, this is good to go. We can add multi-attach and non-terminal attach building on top of this.


INSERT to db json2mysql example

Im trying to insert into mariadb trough json2mysql but im failling miserably. I can do simple select and joins using examples. Do you have an INSERT example? Thanks!!

Hi @vibrion121,
sorry for the late response - my email client died!
Here's some better documentation: https://github.com/caitken-com/SimpleSqlBuilder
json2mysql is a wrapper for my SimpleSqlBuilder project.

{
    "insert": {
         "table": "users",
         "columns": {
              "first_name", "?",
              "last_name", "?",
              "age": "?"
         }
     },
     "params": [
        "John",
        "Doe",
        30
     ]
}

Sorry if I'm being dense or using this beyond it's intent here, but I am having a problem filling in the params for an insert. Can I get a little guidance?
{     "insert": {         "table": "site_log",         "columns": {             "uploaded": false,             "headwater": "?",             "tailwater": "?",             "nethead": "?",             "plantflowcfs": "unknown",             "gen1_wickets": "?",             "gen1_flow": "unknown",             "gen1_kw": "?",             "bearing1": "?",             "bearing2": "?",             "totalkw": "?",             "username": "nr-logger"         }     },     "params": [         "msg.payload.site3.hydrology.headwater_sensor.computed",         "msg.payload.site3.hydrology.tailwater_sensor.computed",         17,         "msg.payload.site3.gen1.wickets.computed",         "msg.payload.site3.gen1.kw.value",         "msg.payload.site3.gen1.bearing.upper.value",         "msg.payload.site3.gen1.bearing.lower.value",         "msg.payload.site3.gen1.kw.value"     ],     "return": "count" }

Hi @yNosGR,
What you’ve done looks correct, except you’ve put quotes around your variables making them static literal values/strings.
Eg:
"msg.payload.site3.gen1.wickets.computed",
The fix:
msg.payload.site3.gen1.wickets.computed,

Hmm, I'll try it again, maybe it has a typo I missed.
On Sat, Dec 9, 2023, 4:21 PM Christopher Aitken @.***>
wrote:

Hi @yNosGR https://github.com/yNosGR,
What you’ve done looks correct, except you’ve put quotes around your
variables making them static literal values/strings.
Eg:
"msg.payload.site3.gen1.wickets.computed",
The fix:
msg.payload.site3.gen1.wickets.computed,
—
Reply to this email directly, view it on GitHub
https://github.com/caitken-com/node-red-contrib-json2mysql/issues/2#issuecomment-1848745144,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AD4JKHCLLNNXYVJY4M6TBDTYITQAJAVCNFSM6AAAAAA6F7KJYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBYG42DKMJUGQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

No, we are still getting  [warn] [json2mysql:insertInto_test] SyntaxError: Unexpected token m in JSON at position 470 which ends up being the first line we try to call msg.payload.site3.hydrology.headwater_sensor.computed.  With No quotes, it shows errors (the red blocks/underlines) in the nodered linter/editor. Is there some escaping that I'm, doing wrong?

What kind of node are you writing your json in that screen-shot? It appears it can't read the variable msg.payload.site3.gen1.wickets.computed. I think the issue is what node kind you're trying to write your json in. I'd personally use a function node.

The endpoints I grabbed are being used by other functions..

In between your json node and your insertinto node, add the function node as per my example above.
http-node -> json-node -> *function-node* -> json2sql-node

I've inserted the function, even made it re-map things down to make it a little easier to copy it over to the other sites. We still get errors that seem to either be the json interpreter complaining, or maybe the json linter complaining about it not being proper json?

Hi @yNosGR.
your screenshot still suggests that is not a function node. Are you using the template field within the json2sql node?? Because that can not be used to grab values from the previous node(s), it's a static json string.
If you want to use the json template field. Do this:
json2sql node's template field:
{
    "insert": {
        "table": "site_log",
        "columns": {
            "uploaded": false,
            "headwater": "?",
            "tailwater": "?",
            "nethead": "?",
            "plantflowcfs": "unknown",
            "gen1_wickets": "?",
            "gen1_flow": "unknown",
            "gen1_kw": "?",
            "bearing1": "?",
            "bearing2": "?",
            "totalkw": "?",
            "username": "nr-logger"
        }
    },
    "return": "count"
 }

testFunction node:
let payload = {
    "params": [
        msg.payload.site3.hydrology.headwater_sensor.computed,
        msg.payload.site3.hydrology.tailwater_sensor.computed,
        17,
        msg.payload.site3.gen1.wickets.computed,
        msg.payload.site3.gen1.kw.value,
        msg.payload.site3.gen1.bearing.upper.value,
        msg.payload.site3.gen1.bearing.lower.value,
        msg.payload.site3.gen1.kw.value
    ]
};

msg.payload = payload;
reutrn msg;

This will update (inject) the static json template with the dynamic params of your flow.

Sweet, it works. Thanks for the assist here, It's been driving me nuts for a few days.
I ended up moving the params section out of the json2mysql node and into the function section as it shows in your latest reply.
json2Mysqlfunction Node
let payload = {
    "params": [
        parseFloat(msg.payload[siteName].hydrology["headwater_sensor"].computed),
        parseFloat(msg.payload[siteName].hydrology["tailwater_sensor"].computed),
        0,
        parseInt(((msg.payload[siteName].gen1["wicket_closed_cts"].value-40)*((1-100)/(3280-32768)))+1),
        parseInt(msg.payload[siteName].gen1.kw.value),
        parseInt(msg.payload[siteName].gen1.bearing.upper_temp.value),
        parseInt(msg.payload[siteName].gen1.bearing.lower_temp.value),
        parseInt(msg.payload[siteName].gen1.kw.value),
        "nrLogger"
    ]
};

msg.payload = payload;
return msg;

json2Mysql Node
{
    "insert": {
        "table": "s3_site_log",
        "columns": {
            "uploaded": false,
            "headwater": "?",
            "tailwater": "?",
            "nethead": "?",
            "plantflowcfs": 0,
            "gen1_wickets": "?",
            "gen1_flow": 0,
            "gen1_kw": "?",
            "bearing1": "?",
            "bearing2": "?",
            "total_kw": "?",
            "username": "?"
        }
    },
    "return": "count"
}

Nice work.


Push notification, sound vs soundname

does not play a sound, will not play default sound either
        $data = [
            'title' => $title,
            'body' => $body,
            'sound' => "mysound"
        ];

        $message = CloudMessage::withTarget('token', $deviceToken)
            ->withData($data);

does play a sound
        $data = [
            'title' => $title,
            'body' => $body,
            'soundname' => "mysound"
        ];

        $message = CloudMessage::withTarget('token', $deviceToken)
            ->withData($data);

Three days of troubleshooting to figure out how to play a sound.
Hopefully this saves someone else the headache...

Thank you for the information! Is this related to iOS, Android, WebPush notifications, or even all of them?
Sounds are somehow a recurring issue - have you tried using https://firebase-php.readthedocs.io/en/5.14.0/cloud-messaging.html#notification-sounds to see if that helps?
I haven't seen the soundname field before, could you show me some official documentation where it is described? This SDK currently only works with what I know from https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages and https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/PayloadKeyReference.html

Yes I have tried using
https://firebase-php.readthedocs.io/en/5.14.0/cloud-messaging.html#notification-sounds

But I could only get default sounds working, and then my other settings would stop working.
I am working on Android through Cordova. Here is the documentation that mentions soundname. I have older apps that still use sound, not soundname, but I guess there was an update somewhere that changed it to soundname
https://github.com/havesource/cordova-plugin-push/blob/master/docs/PAYLOAD.md#sound

After some research I have the strong feeling that soundname is something Cordova-specific or at least client-side-framework-specific - the only places where I could find soundname instead of sound was in the Cordova-Plugin you linked to and https://github.com/zo0r/react-native-push-notification/issues/1432... nowhere else.
I tried adding it somewhere in the AndroidConfig (similarly to what I shared in https://github.com/kreait/firebase-php/discussions/533#discussioncomment-254070), but this was rejected by the FCM APIs.
Long story short: thank you for sharing your findings, hopefully others will stumble upon this thread when they face similar issues - unfortunately there's little that can reliably be done on the SDK side :/


System Guard Secure Launch and SMM protection question

[Enter feedback here]
Hi all,
We are trying this feature on our system,but got fail.
For this feature - System Guard Secure Launch and SMM protection
Is it support Legacy boot mode bios? or it only support UEFI boot mode.

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

ID: 31d623d9-316c-0ef1-b6be-c3773d77ca21
Version Independent ID: 83ddb59d-0cfc-34f2-e666-8927d86a04a7
Content: System Guard Secure Launch and SMM protection (Windows 10) - Windows security
Content Source: windows/security/threat-protection/windows-defender-system-guard/system-guard-secure-launch-and-smm-protection.md
Product: m365-security
Technology: mde
GitHub Login: @Dansimp
Microsoft Alias: dansimp

@mikegan < It supports only UEFI Mode,

@mikegan < It supports only UEFI Mode,

Thanks your information.


fix: restore json result to original for code coverga

@W-12965378@
Fix regression in package version report code coverage result in json

QA Notes
setup:
create package
create PV with --code-coverage
before:
 ➜  sfdx package:version:report --package 05i3i000000TNT4AAO --json
{
  "status": 0,
  "result": {
...
    "CodeCoverage": "98%",

✅ : after
 ➜  sfdx package:version:report --package 05i3i000000TNT4AAO --json
{
  "status": 0,
  "result": {
    ...
    "CodeCoverage": {
      "apexCodeCoveragePercentage": 98
    },

and with an older toolbelt version of packaging
 ➜  sfdx force:legacy:package:version:report --package 05i3i000000TNT4AAO --json
{
  "status": 0,
  "result": {
...
    "CodeCoverage": {
      "apexCodeCoveragePercentage": 98
    },


PropTypes defined in an external file

We have some prop types that are shared across many components and defined in their own module.
I want to be able to specify a component like this:
'use strict';

var React = require('react');
var externalPropTypes = require('./my_module');

var CommitView = React.createClass({
  propTypes: externalPropTypes.mySharedPropTypes,

  render: function() {
    return (

        {this.props.myExternallyDefinedProp}

    );
  }
});

module.exports = CommitView;

However it complains about this.props.myExternallyDefinedProp.
I understand that there is no way for eslint to be helpful and successfully lint this file and I'm fine with that. I just don't think it should be complaining here.
It does not complain (as it shouldn't) if the keys are defined and the values are pulled in externally:
'use strict';

var React = require('react');
var externalPropTypes = require('./my_module');

var CommitView = React.createClass({
  propTypes: React.PropTypes.shape({
    foo: externalPropTypes.sharedFooDefinition
  }),

  render: function() {
    return (

        {this.props.foo.bar}

    );
  }
});

module.exports = CommitView;

I think the rule should have the same non behavior when the whole value is pulled from an external file it doesn't know about.

It does not complain in this case:
var externalPropTypes = require('./my_module');

var Hello = React.createClass({
  propTypes: externalPropTypes,
  render: function() {
    return
Hello {this.props.name}
;
  }
});

So it should be a bug when assessing something like externalPropTypes.mySharedPropTypes instead of externalPropTypes directly.


Don't check StreamingCallSink is alive at close

There is nothing in place which guarantees that sending the last
message on the Sink, and closing the Sink, happen atomically.
There is currently a race condition where if the server responds
incredibly quickly, its response may be received between the last
streaming message being sent, and close being called.
It isn't obvious to me what value this check_alive call is bringing; if
there is one, we should try to guarantee its success by either:

Implementing a custom send_all implementation such that the last
send and close are called atomically, getting rid of the window
where the race can be lost.
Establishing a happens-before relationship between
StreamingCallSink.close and whatever code receives the server
response (I think Call.start_recv_message?). I think this would
either need a pretty coarse-grained lock, or a pretty complex
restructuring of code.

But as the check doesn't appear to provide any useful guarantees (and
indeed mostly appears to make losing this race condition problematic),
I figured I'd try just removing it...

My assumption is that once the server has sent a message, further sends from the client cease to be allowed.
What I believe we're seeing is that the server is responding so quickly that the receiving half of the channel is closed before we start trying to close the sending half, and so we get an RpcFinished error when we try to close the sending half.
(I can reproduce this semi-deterministically - about 20% of attempts with the right server behaviour set up on a localhost server, and can deterministically not reproduce it after this PR is applied)

Can you add a test case for it?


Research and create a base Template and change existing templates to use that

Currently each template has its own twig or xsl file used to generate the representation of a structural element. This is however inconvenient as it will increase maintenance severely. A point of investigation is whether we can create a common series of twig template files that contain fine-grained blocks that act as a template of templates.
This way we can have, for example, a class block that will generate the same results for each template but that can be overridden specific for a template.
Tasks

[ ] Make a list of fine-grained blocks in the existing templates
[ ] Research how to make block layouts that can be overridden in specific templates (starting point: http://twig.sensiolabs.org/doc/tags/embed.html) without having to override the individual blocks
[ ] Create / extract these blocks and place them in a special folder in /data and add that to the template folders as first one
[ ] Create a version of the Responsive-Twig template based on this
[ ] Create a version of the clean template based on this

Closing the 3.0 tickets, will reconsider them after our re-alignment