NodeJS domain not behaving properly with express.json middleware

Context:

Node version 6.14.3
Express version 4.16.4

Steps (Generating a simple Express app):

$ npm install express-generator -g
$ express --view=pug myapp
$ npm i
Edit ./myapp/routes/users.js changing router.get('/', ...) to router.post('/', ...)
Edit ./myapp/app.js to include two more middleware with some domain implementations.

var createError = require('http-errors');
var express = require('express');
var path = require('path');
var cookieParser = require('cookie-parser');
var logger = require('morgan');
var domain = require('domain');

var indexRouter = require('./routes/index');
var usersRouter = require('./routes/users');

var app = express();

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'pug');

// Add this middleware as the first one
app.use(function(req, res, next) {
    let activeDomain = domain.active ? domain.active : domain.create();
    activeDomain.run(() => {
        next();
    });
});

app.use(logger('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

// And add this middleware here
app.use((req, res, next) => {
    if (!domain.active.trapArr) {
        domain.active.trapArr = [];
    } else {
        // This is the trap
        domain.active.trapArr.push({});
    }

    next();
});

app.use('/', indexRouter);
app.use('/users', usersRouter);

// catch 404 and forward to error handler
app.use(function(req, res, next) {
  next(createError(404));
});

// error handler
app.use(function(err, req, res, next) {
  // set locals, only providing error in development
  res.locals.message = err.message;
  res.locals.error = req.app.get('env') === 'development' ? err : {};

  // render the error page
  res.status(err.status || 500);
  res.render('error');
});

module.exports = app;

$ npm start
Send a POST request to the /users.

Expected:
200 response.
Actual:
500 response with error TypeError: Cannot read property 'trapArr' of undefined
But when I comment the app.use(express.json()); line, the response become 200 normally.
A link to a repo to reproduce:
https://github.com/m0uneer/domain-body-parser-problem

I would guess it is the line domain.active.trapArr.  I do not use domains, as they are deprecated, so I am not sure how the domain.active property works, but to me it looks like it is `undefined.
You should probably consider not using domains, and just handling errors normally.  But that is just my 2c.

First f all, thanks for your comment and regarding using the domain or not, it is not our scope here ^_^. Second, when running a function inside a domain the property domain.active will be set natively.
The part responsible for setting and binding the middleware scopes into domain is
    activeDomain.run(() => {
        next();
    });

So now inside next() there is domain.active and inside any internal calls too. So, I disagree about the label question. It seems like a bug as the code works great without the line app.use(express.json());. If there is a question it will be why this line causes the error?!

@wesleytodd , any thoughts?

Can you post the stack trace of the error?  The message you are saying the request is returning does not contain enough information to pinpoint the issue.

@wesleytodd
The stacktrace
Cannot read property 'trapArr' of undefined
TypeError: Cannot read property 'trapArr' of undefined
    at app.use (/home/mouneer/myapp/app.js:52:21)
    at Layer.handle [as handle_request] (/home/mouneer/myapp/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/home/mouneer/myapp/node_modules/express/lib/router/index.js:317:13)
    at /home/mouneer/myapp/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/home/mouneer/myapp/node_modules/express/lib/router/index.js:335:12)
    at next (/home/mouneer/myapp/node_modules/express/lib/router/index.js:275:10)
    at /home/mouneer/myapp/node_modules/body-parser/lib/read.js:129:5
    at invokeCallback (/home/mouneer/myapp/node_modules/raw-body/index.js:262:16)
    at done (/home/mouneer/myapp/node_modules/raw-body/index.js:251:7)
    at IncomingMessage.onEnd (/home/mouneer/myapp/node_modules/raw-body/index.js:307:7)

Ok, that also does not illuminate anything.  Seeing as the error is related to trapArr something your app is creating, and that .active is not present in the docs,  I am back to that line where you do not safely check before accessing domain.active.
If you can create a reduced test case where you can isolate some express behavior which is broken we can re-open this, but my guess is that you will find it is something to do with that line if (!domain.active.trapArr) {.

@wesleytodd
OK let me rephrase. We have a simple app that works great but when adding this line app.use(express.json()); it crashes. Why?! To answer, one should have minimum knowledge of domain and Implicit Binding. I will help you get the point through the following code:
const domain = require('domain');

middlewareList = [
  (req, res, next) => domain.create().run(() => next()), // #1
  (req, res, next) => next(), // #2
  (req, res, next) => setTimeout(next), // #3
  (req, res, next) => next(), // #4
  (req, res, next) => { console.log('Active Domain:', domain.active); next() }, // #5
];

const req = {};
const res = {};
currentIndex = 0;

function next () {
  if (currentIndex === middlewareList.length) return console.log('done');
  middlewareList[currentIndex++](req, res, next);
}

next();

The code above working as expected and the active domain will always be logged. Imagine if we replaced // #4 middleware for example with express.json();, why the domain.active became undefined?

@m0uneer I'm guessing that something in the raw-body package (which body-parser uses under the hood, which is express.json) doesn't properly propagate the active domain to the later asynchronous context.
https://github.com/stream-utils/raw-body/blob/master/index.js
I'm guessing that a target PR there could fix it, although I think that you will find that many other packages will also cause you the same problem. Since domains are deprecated, and since we've never (AFAIK) stated that express is compatible with domains, I don't think that there is too much we could/should do here...
Is there a specific reason why you are using domains?

@LinusU I'm developing a tool that depends on the domains heavily to track the context. Regarding this issue, I followed the logic and found that I loose the active domain inside stream event listener used inside raw-body package. So the problem seems between streams and domains and not related to express or body-parser. But last thing, do you have any idea about this stream-domain problem?

@m0uneer you could probably wrap the middleware with a domain re-activation trap to work around it:
const jsonParser = express.json()

app.use((req, res, next) => {
  jsonParser(req, res, domain.bind(next))
})

Thanks @LinusU I will give it a try.


General cleanup

Added Javadoc files.
Moved code implementation of consensus to ConsensusRole.java, making the server initial page more clean.
Changed how cleanup of old replicas is made. Check added method in ReplicasManagerInterface.java

@Cepos-e-Mabecos/sd-group1
I will instantly accepting this pull request since I didn't change any of the app behaviour.
You will be able to find a website with the Javadocs here on GitHub. Will also update the README.md.


[FR] Add gesture for reseting the timer

Just like swipe up adds one minute, something like a double/triple tap could reset the timer (different enough from other gestures to not be confusing).
Use case: When starting a new session and having to do something external in the first couple of minutes. This would allow the user to start the session again, without increasing the session counter, unlike skipping, which does increase it.

It's already implemented. Swiping down will reset the timer.

My bad, thanks :)


Broader session logout fixes #4860

This fixes #4860 . @Kartones , CR this, please.

:+1:

@matallo CR this as well, please.

Frontend tests were OK :+1: (details)

:+1:


[python][treasury-report] add force-regenerate parameter to allow for deletion of the existing treasury file before generation

Backend changes for adding a force-regeneration parameter to the treasury report generation lambda.
To be merged after the mypy changes in https://github.com/usdigitalresponse/cpf-reporter/pull/506 to avoid potential merge conflicts

@as1729 I think this was the intent of #510; but let me know if some additional files should also be deleted.
I'm not sure about how to make the FE changes to add a button or an option for this because I haven't tried launching the FE before 😅

@nowei one more change requested. This will require adding permissions to delete s3 files in the terraform for the lambda function.
Here's where the permissions are defined currently:
https://github.com/usdigitalresponse/cpf-reporter/blob/main/terraform/treasury_generation_lambda_functions.tf#L229
The following needs to be added:
    AllowDeleteTreasuryReports = {
      effect = "Allow"
      actions = [
        "s3:DeleteObject",
      ]
      resources = [
        # These are completed XLSX version of the project (1A, 1B, or 1C) file that can be submitted to treasury.
        # Path: /treasuryreports/{organization_id}/{reporting_period_id}/{OUTPUT_TEMPLATE_FILENAME_BY_PROJECT[project]}.xlsx
        "${module.reporting_data_bucket.bucket_arn}/treasuryreports/*/*/*.xlsx",
        "${module.reporting_data_bucket.bucket_arn}/treasuryreports/*/*/*.csv",
        "${module.reporting_data_bucket.bucket_arn}/treasuryreports/*/*/*.json",
        "${module.reporting_data_bucket.bucket_arn}/treasuryreports/*/*/*.zip",
      ]
    }


add_entry function using multiple text boxes

Thanks for getting this excellent library out there.
I'm currently using it to run a server to connect to a BBB, after which I'm interfacing with the IO using Adafruit's library. I'm pretty new at server client interaction and javascript, and I've been trying to accomplish the following:

Create a form consisting of multiple text entry boxes, just as the ones used in the add_entry function.
Click a submit button that takes the input from these multiple text boxes and allows me to pass them as an array into the function I'm specifying in my lambda expression.

I've been trying to tweak the library to accomplish this, but I don't think I can sift through all the interactions to get it fully working. Is this something that's supported or could be somewhat easily implemented using the pyBBIO framework? If so, any help would be much appreciated.

First of all, you're going to run into issues with device tree and pinmuxing if you try to use PyBBIO and Adafruit_BBIO in the same program. Is there something you need that PyBBIO doesn't have?
One thing you could do is use the add_html() method to add a custom HTML form with a submit button. It would require some additional code either in the Javascript or on the server side to handle the form submission.


Doesn't detect Platform.operatingSystem: iOS [web]

I LOVE your package and need it very much BUT the package from 0.5.0 above somehow cannot detect iOS. The package thinks iPhone and iPad (your package never detected iPad as iOS but as macOS instead) are macOS instead of iOS. Can you please fix it?
Live Demo
You can check the latest version where at least iPhone was detected as iOS which is 0.4.0 here: https://experiment0.web.app/#/: as you can see iPad is still incorrectly detected as macos.
Results in various devices
Safari on iPad mini 2 (iOS 12) universal_io: 0.2.0+ (basically all versions) : I couldn't test versions below 0.2.0 since they were not compatible with Flutter 1.19

Google Chrome on iPhone XR (iOS 13.5) universal_io: 0.5.0-1.0.1 :

**Safari on iPhone XR (iOS 13.5) universal_io: 0.5.0-
1.0.1 :** (same thing on iPhone 5S (iOS12)

The package detects following OS:

macOS: as macOS
iPad: as macOS
iPhone (0.5.0+): as macOS
windows: as windows
android: as android

Min repro code
Just use the default counter flutter app and add Platform.operatingSystem like this:
import 'package:flutter/material.dart';
import 'package:universal_io/io.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        // This is the theme of your application.
        //
        // Try running your application with "flutter run". You'll see the
        // application has a blue toolbar. Then, without quitting the app, try
        // changing the primarySwatch below to Colors.green and then invoke
        // "hot reload" (press "r" in the console where you ran "flutter run",
        // or simply save your changes to "hot reload" in a Flutter IDE).
        // Notice that the counter didn't reset back to zero; the application
        // is not restarted.
        primarySwatch: Colors.blue,
        // This makes the visual density adapt to the platform that you run
        // the app on. For desktop platforms, the controls will be smaller and
        // closer together (more dense) than on mobile platforms.
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  // This widget is the home page of your application. It is stateful, meaning
  // that it has a State object (defined below) that contains fields that affect
  // how it looks.

  // This class is the configuration for the state. It holds the values (in this
  // case the title) provided by the parent (in this case the App widget) and
  // used by the build method of the State. Fields in a Widget subclass are
  // always marked "final".

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      // This call to setState tells the Flutter framework that something has
      // changed in this State, which causes it to rerun the build method below
      // so that the display can reflect the updated values. If we changed
      // _counter without calling setState(), then the build method would not be
      // called again, and so nothing would appear to happen.
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    // This method is rerun every time setState is called, for instance as done
    // by the _incrementCounter method above.
    //
    // The Flutter framework has been optimized to make rerunning build methods
    // fast, so that you can just rebuild anything that needs updating rather
    // than having to individually change instances of widgets.
    return Scaffold(
      appBar: AppBar(
        // Here we take the value from the MyHomePage object that was created by
        // the App.build method, and use it to set our appbar title.
        title: Text('Platform: ${Platform.operatingSystem}'),
      ),
      body: Center(
        // Center is a layout widget. It takes a single child and positions it
        // in the middle of the parent.
        child: Column(
          // Column is also a layout widget. It takes a list of children and
          // arranges them vertically. By default, it sizes itself to fit its
          // children horizontally, and tries to be as tall as its parent.
          //
          // Invoke "debug painting" (press "p" in the console, choose the
          // "Toggle Debug Paint" action from the Flutter Inspector in Android
          // Studio, or the "Toggle Debug Paint" command in Visual Studio Code)
          // to see the wireframe for each widget.
          //
          // Column has various properties to control how it sizes itself and
          // how it positions its children. Here we use mainAxisAlignment to
          // center the children vertically; the main axis here is the vertical
          // axis because Columns are vertical (the cross axis would be
          // horizontal).
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}

flutter doctor -v

[✓] Flutter (Channel beta, 1.19.0-4.1.pre, on Mac OS X 10.13.6 17G65, locale en-SK)
    • Flutter version 1.19.0-4.1.pre at /Users/tomas/code/flutter
    • Framework revision f994b76974 (4 weeks ago), 2020-06-09 15:53:13 -0700
    • Engine revision 9a28c3bcf4
    • Dart version 2.9.0 (build 2.9.0-14.1.beta)

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.

[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the
        Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

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

[✓] Connected device (2 available)
    • Web Server • web-server • web-javascript • Flutter Tools
    • Chrome     • chrome     • web-javascript • Google Chrome 83.0.4103.116

! Doctor found issues in 3 categories.

A quick fix for basic linux & ios detection would be to change the function _operatingSystemFromUserAgent in this file:
https://github.com/dint-dev/universal_io/blob/master/packages/universal_io/lib/src/driver/default_impl_browser.dart
to this:

String _operatingSystemFromUserAgent(String userAgent) {
  final userAgent = html.window.navigator.userAgent.toLowerCase();
  if (userAgent.contains('iphone') ||
      userAgent.contains('ipad') ||
      userAgent.contains('ipod')) {
    return 'ios';
  }
  if (userAgent.contains('mac os x')) {
    return 'macos';
  }
  if (userAgent.contains('android')) {
    return 'android';
  }
  if (userAgent.contains('linux')) {
    return 'linux';
  }
  return 'windows';
}

Hi! Thanks for the issue reports. We don't have test automation for this, but this should be fixed in 2.0.3. If the issue persists,
please file a new issue.


Add support for image digests in helm charts

Read per commit

test-backport-1.7

test-backport-1.7

test-backport-1.7

test-backport-1.7-k8s


test: added a test case for TC-1817

So basically trustify looks decoupled from all user input when storing files, is this right?

Yes, that's right.
Still, there's a name field in the SBOM, which in this case has the value registry.k8s.io/coredns/coredns:v1.9.3. I think adding this test anyway should keep us a bit safer for the future.


[write-fonts] Fix writing of PackedPointNumbers

Fixes https://github.com/googlefonts/fontc/issues/313

LGTM but can we add a test?

LGTM but can we add a test?

That might be above my paygrade currently :D. I'll take a look.

LGTM but can we add a test?

That might be above my paygrade currently :D. I'll take a look.

Done.

The read-fonts counterpart to this fix is here btw:
https://github.com/googlefonts/fontations/blob/e6f31f06d7c40cde5e9059aa3dd7769875adb41e/read-fonts/src/tables/variations.rs#L253


Variation for feature

Working on unit tests!

Coverage decreased (-0.3%) to 99.502% when pulling fdd909698c52ada32be161508e10e89bf9137ef5 on msohailhussain:variation_for_feature into 986565a4e2f878b258815923ad12835bbf1dc549 on optimizely:master.


bintools-wrapper: make ld-wrapper mimic GNU ld behavior with dynlink

Description of changes
Recreates the behavior GNU ld does with --dynamic-linker:

GNU ld seems to ignore --dynamic-linker for a position-dependent executable (ET_EXEC) when there is no DT_NEEDED entry. ld.lld respects --dynamic-linker in this case. Before this kernel report, I do not know any user inconvenienced by this difference. (mold respects --dynamic-linker as well.) This could be helpful to test an executable with PT_INTERP but no DT_NEEDED.

Ref<EMAIL_ADDRESS>This PR will fix pkgsLLVM.linux on x86_64-linux.
Draft until we can nail down the same behavior and prevent any other issues.

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Did we rule out fixing lld?  This is going to be very difficult to get right — right now you're identifying linked objects by checking for .o, but they could have any time, and in fact shared objects are quite likely to be called .so, right?

Did we rule out fixing lld?

No, I opened an issue with LLVM https://github.com/llvm/llvm-project/issues/109896


add keywords to metadata

It would be useful to tag metadata with keywords like "bioinformatics", "economics", "image", etc. I'm not sure of a principled way to do this, but I imagine we might want to use a reference ontology (like ACM CSS?). Discussion welcome.

I'm in favor of keywords but I'm not sure ACM CSS is an ideal ontology for datasets.

Any idea what keyword ontologies are out there? I'm having trouble finding examples.

added in PR #69 :)

Hmm... I thought we added a keywords field to all auto-generated metadata.yaml files that haven't been manually modified.
But I don't see keywords, e.g., here.

we haven't added keywords by default except to the template. i'm not sure how we would put them in auto-generated files? just have a blank entry?

Oh I see. Hmm I was thinking like what you have in the template:
keywords:
  - keyword1
  - keyword2

i don't think we should have dummy keywords appearing in the auto-generated files

Perhaps keyword1 and keyword2 are not great place holders. Maybe needs_keyword or replace_me would work?
I think we need to make it as easy as possible for a contributor to come in with little knowledge of yaml and can still contribute. The contributor shouldn't have to come back to the template to find out what other fields are there to add. This will make the reviewer's job easier as well. I myself have missed this field most times when reviewing metadata files.
And having two place holders will also avoid a situation where keywords are put in as
keywords:
  - keyword1, keyword2

I'm happy to implement this. I feel like it's a case of practicality beats purity we have here.

How about we add a line like
keywords: # descriptive terms for the dataset, each hyphenated on a new line (see metadata_template.yaml)

Addressed in #107.


USB status is outside of the rows/columns. Loads right below navbar.

looks weird, and is hard to read because of the white text.

This is now way worse because of the white background. Now its impossible to notice USB Status errors..


SCP-1193: Stablecoin prototype

A simple stablecoin prototype using state machines

This would be a nice example for property testing

Ah yes, I forgot this is converted from Scala. I guess we shouldn't "fix it" too much then :P

I did what I could :D


The game does not run

This patch does not work with the jack sparrow version of the game. When applied, nothing happens.

It's impossible to know what has been done to said version, maybe it's not even a Steam version of the game, it's unpatched, or it has been tampered with. If it doesn't work, there's nothing I can do about it.

Update: Just in case, I asked for the patch to be checked for compatibility with the recently released GOG.com version and it works just fine. Therefore, it seems like issue lies in whatever changes were made to the version of the game you're using.

Closing due to no activity, feel free to reopen if you have any more info.


[feature] Add disabled property to md-tab

A common UX situation requires us to disable certain areas of the view (buttons, dropdowns etc...).  My use case is that certain tabs should not be accessible to the user based on a model value.  A clean solution would be to have a disabled property on the tab, to be used like:
<md-tab-group>
  <md-tab [disabled]="isDisabled">
    <template md-tab-label>One</template>
    <template md-tab-content>

Some tab content

...

    </template>
  </md-tab>
  <md-tab>
    <template md-tab-label>Two</template>
    <template md-tab-content>

Some more tab content

...

    </template>
  </md-tab>
</md-tab-group>

The best alternative I could think about is very clumsy: to watch the selectedIndex property with a setInterval or click handler, and if that becomes the index of a tab that should not be accessible, to reset it to the previous index value.
If the tab group emitted a selected event with the index of the newly selected tab, I could bind to that instead but even that wouldn't be as clean as a disabled property that could be data-bound.
PS: I realize that *ngIf could be used to remove a tab from the DOM but this doesn't serve the same purpose: sometimes you need the user to be aware of the UI element that she cannot activate (just as you would disable rather than hide a form submit button)

Further
in Angular 1 Material it existed:
https://material.angularjs.org/latest/demo/tabs

It's there but it doesn't add a class. I can't indicate that it's disabled - there are no styles etc.

+1 i am looking to for a solution to disable this tabs.


sessionless support

In the network router control protocol space, the order of BGP and IGP updates define the state of the router at that point in time.  In order to be able to deduce a device's control plane state at any point in time, this packet arrival ordering needs to be maintained.  If we treat BGP like a normal TCP session (in the moloch sense), where multiple updates are grouped and recorded as arriving at the same time disparate aggregation points, down stream analytics loose the ability to accurately deduce the router state at any point in time.
This feature request is to allow the moloch operator to define a sequence of protocols and/or protocol:port combinations which the capture system should treat as "sessionless", meaning each packet is a unique session.  No aggregation occurs for those streams which are to be treated as sessionless and thus both packet arrival sequence and packet arrival timing is maintained.
A new config variable to specify which protocols and/or protocol:ports would be defined to indicate which should be treated a sessionless.   An example of what this might look like is below:
// enumerate which protocols and/or protocol:port tuples should be processed
// as being sessionless (packets have no relationship to each other).
sessionless=1;2;6:179
In the above example protocols 1 (icmp), 2 (igmp) and 6:179 (tcp bgp) would be treated as sessionless.  For all other protocol and/or protocol:port combination, the existing session oriented behavior is maintained.

Not sure icmp should ever be considered sessionless, at least by default.  I still think there is probably a better way to do this, just need to spend some time on it.

thanks for the input.   it's up to the moloch operator to determine what protocols and/or protocols+ports would be treated as sessionless.  default is normal moloch behavior.  info specified in the "sessionless" config would allow the operator to override default moloch behavior


[PROD-9][product-service] Implement Global Exception handling

Hello @shshetudev Bhai,
Greetings of the day!
FYI, we will update the response entity type after completing the common response model.
That's why I added todo there.
If you have more feedback, will incorporate it as a priority.
with thanks,
Badrul


"Global" variables when collecting information about individual debts

The debt info screen collects two variables that are “global”-like variables and not tied to the specific debt - new_name (which should be fixed) and another_debt_solution (which may be okay, or maybe should be tied to user, since it will be true for each debt.)

Changed new_name to debt[i].other_name


Assist returning JSON, but not doing anything.

What version of Music Assistant has the issue?
2.2.1
What version of the Home Assistant Integration have you got installed?
2024.8.2
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

[X] Yes

The problem
I was following the directions for voice assistant stuff here https://music-assistant.io/integration/voice/ and everything seems to work well, except Assist is returning JSON without acting on it.  Like if I ask it to play 90's it returns {"media_id": ["Nirvana - Smells Like Teen Spirit", "Radiohead - Creep", "Oasis - Wonderwall", "Foo Fighters - Everlong", "Weezer - Buddy Holly"], "media_type":"track"}
but no music is played.  I'm currently using home-llm listed here https://github.com/acon96/home-llm where everything seems to work except for this.  Any ideas?
How to reproduce
Use Ollama, Llama 3.1, and home-llm to control house locally.  Add the prompts and the yaml in custom_sentences\en.  Ask to play music, get raw JSON out.
Music Providers
Spotify
Player Providers
Home Assistant and Snapcast
Full log output
No relevant logs, as it doesn't seem to ping Music Assistant at all.  Just returns raw JSON.
Additional information
No response
What version of Home Assistant Core are your running
2024.8.2
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Linux

This really should be a discussion Q&A as this is not a problem with MA. Having said that it sounds like you haven’t set this up properly. Show a screenshot of the HA integration configuration screen and a screenshot of the voice assistant you have setup

Sorry, and this can totally be closed if it's beyond the scope of this project.  I was just trying to incorporate the home-llm with MA for Voice Assist.  It looks like it's so close, just for some reason it's not parsing the JSON, rather passing it through the voice pipeline.

I see you have called the config voice agent JarvisLLM but in the Assist dialog you are using Jarvis?

In your Jarvis voice assistant what conversation agent is configured there? Returning the json usually means that is incorrect

In my Jarvis voice assistant the JarvisLLM linked above is configured.  My only thought process is that since it's using Ollama/Llama3.1 it's probably using tools?  Either that or it wants me to format the JSON differently?
It's weird, because it can do everything else like control the lights and stuff correctly.  Just having issues with controlling the music.
Also, thanks again for your help.  I realize this is like a really fringe issue.

I am no expert on this but I think the issue is you are combining the music discovery and the control in one agent.
Since you have opted to specify a MA specific conversation agent then it should be SPECIFIC. This agent creates the JSON and passes it back for use by MA. Then you need to ensure you have done all of the steps here https://music-assistant.io/integration/voice/#ma-specific-conversation-agent
As I understand it the LLM should be aware of the MassPlayMediaOnMediaPlayer intent and use that when the JSON is returned.
I don't use a local LLM so you will need to ask in the HA forums for more help with that.
So in summary what normally is configured:

You create a service in the LLM integration which takes a query and converts it into a JSON that MA understands. Lets call this LLM MUSIC
In the MA Integration config you set LLM MUSIC as the MA specific conversation agent.
You set up a voice assistant to use your general purpose conversation agent. I use "Home Assistant" but you will use "Jarvis". The issue for you is making sure Jarvis knows what to do.

It's okay, I'm no expert either.  Yeah, I've followed all of the steps except 'make it specific' because I'd basically be giving up control of the house for control of the music, and I'd really need both to get rid of the Alexa's.
The fact that it's spitting out what looks like the correct JSON to me when asked to play music and everything else still works makes me think that I'm close though.
Quick question for you; did you have to do any edits to your configuration.yaml?  Looking at the Home Assistant section for custom intents (https://www.home-assistant.io/voice_control/custom_sentences/) I see that they mentioned creating a .yaml in the custom_sentences/en directory like we do here for MA, but right below that they they say you can use the custom intent script integration to implement an action and provide a response by editing the configuration.yaml, but I don't see that in any of the setup documentation for this.
Am I going down the wrong rabbit hole here you think?  Did you have to include the intent_script in your configuration.yaml?
Again, thanks for your time.

Why do you say

I'd basically be giving up control of the house for control of the music

Ah okay.  Good to eliminate that possibility.
I say that because I can only have one voice assistant as default.  So the Wyoming Sattelites I have will only use the star'd (default) Voice Assistant, which is fed in a prompt about the devices and their current states and whatnot.  If I set up a Music Assistant specific Voice Assistant, then set that as default, it won't have the information about the devices.
That's why I was trying to append the prompt for Music Assistant to my current prompt, so that it had the device information but also knew how to format prompts for Music Assistant.
All that being said it's probably something that I did, but disabling everything I've got going and just following the Music Assistant instructions above using local Ollama integration and Home Assistant Assist it still seems to just return JSON for me?
I'll be able to tinker with it a bit more tomorrow and see if it's something else I did, but going with all default stuff and just following the instructions line by line I'm still having the same problem.

No you don't need to setup a dedicated voice assistant for MA (you can for testing but that is a different conversation). I said set up a specific LLM agent not voice assistant.
But I don't think you are following the instructions as you have ONE LLM integration when you need two. I think everything is working fine for what you have done. The bottom section of your LLM prompt tells OLLAMA what to do when it gets a music request and that is to return a JSON string which is exactly what it is doing. What you haven't done is told it what to do with that string?
This is where I get sketchy. I understand that normally when people set these things up that the LLM is aware of all of the available service calls and intents. So it works out what to do. So if you said "Give me some rocking 80s in the Study" then it does its magic to interpret that as a request to play 80s rock music then knows that to play music it needs to use X intent or service call and so does that. Your issue as far as I can tell is that last step.

Haha, shoot, yeah.  I think we both have about the same understanding and we're stuck at the same step?  It's interesting to me that it's giving me the right JSON just for some reason it's interpreting it as text output rather than an action, which is why I was thinking I'd done something wrong with setting up the intent stuff.
My other backup would be to create a bunch of sentence based automatons for now.  But it would be nice to figure this out for more elaborate requests.  Tomorrow during the day I'll try and reset/disable a bunch of stuff and see if I can get it to work with just what's listed in the instructions.  I kinda tried that today, but didn't have enough time to really troubleshoot and see if I missed anything else.

I think you should try something like adding to your prompt that once it has that JSON then use the mass.play_media service call. Like I said I understand that normally happens automagically but maybe you can force it?

I can confirm now that it's something to do with the home-llm integration.  Removing that and using the Ollama integration (and restarting Home Assistant, I think I missed that yesterday) it does perform the action, but you get a bunch of noise in the response.
"Play Third Eye Blind in the kitchen"
"Based on the tool call response, it seems like the user asked about the current temperature in the living room. The output from the tool call response indicates that the current temperature in the living room is 73.8°F."
It does play the music though, however sometimes it generates incredibly long responses about all the lights and stuff.  I'll have to figure out why the home-llm integration doesn't work, as that is leaps and bounds above the local Ollama integration currently offered by HA, but as this doesn't seem to be an issue with MA but rather home-llm I'll mark it as closed.
Thanks for your help!


Issue with AnyLogic 8.8.2

I'm getting the following error under AnyLogic 8.8.2:

java.lang.ClassCastException: class [Com.anylogic.engine.presentation.ModelElement Descriptor Utils;
cannot be cast to class [Lcom.anylogic.engine.presentation.ModelElementDescriptor; ([Lcom.anylogic.engine.presentation.ModelElementDescriptorUtils;
and [Lcom.anylogic.engine.presentation.ModelElementDescriptor; are in unnamed module of loader 'app')

With AnyLogic 8.8.1 everything is working nicely. I'm suggesting not to (auto)update AnyLogic when using Pypeline.
By the way: thanks for this great library!

Hi, glad to hear you've enjoyed it up to this point! And thanks for posting this -- fortunately the fix just required the library to be recompiled/reexported in the latest version (guessing they changed something internally).
I went ahead and did that and published a new version: download from Releases.


Porting gradients to C++ from python

System information

TensorFlow version (you are using): v2
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
I'm writing a Java gradient optimizer to allow training models on the JVM. I've got pretty much everything working, but some of the gradients can't be calculated as they aren't available in C++, and so I get errors of the form Exception in thread "main" org.tensorflow.TensorFlowException: No gradient defined for op: SparseSoftmaxCrossEntropyWithLogits.. What's the roadmap for porting gradients from Python to C++? If there isn't a roadmap, would a pull request to add this gradient be accepted (and is there any relevant guidance for working in the TF C++ codebase)? The relevant issues according to GitHub are all from 2016/7 and the internals might be quite different after the v2 release.
Will this change the current api? How?
It will expand the set of models that can be trained using languages other than python. It should only add API endpoints and won't change any of the existing ones.
Who will benefit with this feature?
Users of the the TF Java API, users of the C API, and other languages which bind the C API. Without the ability to train models using a specific language binding it's very hard to say Tensorflow actually supports that language.

There isn't a roadmap, and we'll happily take pull requests.

Ok. Is there any programmatic way to figure out what ops have a C++ gradient and what ones don't? Or some grep based magic I could run on the source tree? I'd prefer to fix a bunch of them at once rather than run into them piecemeal as we expand our usage of the TF Java API.

I believe you want the REGISTER_OP_GRADIENT macro
On Wed, Nov 6, 2019 at 11:54 AM Adam Pocock<EMAIL_ADDRESS>wrote:

Ok. Is there any programmatic way to figure out what ops have a C++
gradient and what ones don't? Or some grep based magic I could run on the
source tree? I'd prefer to fix a bunch of them at once rather than run into
them piecemeal as we expand our usage of the TF Java API.
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/issues/33899?email_source=notifications&email_token=AAABHROOBDPJLJK5XSTV7A3QSMOIFA5CNFSM4JHUO5TKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDHYQIY#issuecomment-550471715,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAABHRMAWJP32IZRSSW3OS3QSMOIFANCNFSM4JHUO5TA
.

--

Alex

Missing gradients is a blocker for us to use the new TF Java API......


<pinheader /> component breaks 3d viewer

/bounty $10

@seveibar can you increase the bounty for this one? It's a lot more complicated then it sounds

@seveibar i think it is fixed now?


Add version_id transport parameter for fetching a specific S3 object version

Added file check by id.
Added check for the existence of the passed id.
Fix #306

Also, looks like unit tests are failing, please fix:
======================================================================
ERROR: test_readline_tiny_buffer (smart_open.tests.test_s3.SeekableBufferedInputBaseTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/moto/core/models.py", line 71, in wrapper
    result = func(*args, **kwargs)
  File "/home/travis/build/RaRe-Technologies/smart_open/smart_open/tests/test_s3.py", line 249, in test_readline_tiny_buffer
    with smart_open.s3.BufferedInputBase(BUCKET_NAME, KEY_NAME, buffer_size=8) as fin:
  File "/home/travis/build/RaRe-Technologies/smart_open/smart_open/s3.py", line 222, in __init__
    self._content_length = _get(self._object, self._version_id)['ContentLength']
AttributeError: 'BufferedInputBase' object has no attribute '_version_id'

@interpolatio Congrats on your very first contribution to smart_open! 🥇 Keep them coming!


Documentation: wrong expiry value

The example code in
https://github.com/memcached/memcached/wiki/BinaryProtocolRevamped#example-2
shows one hour( 0e10 ) expiry, instead of two ours ( 1c20 ):

The following figure shows an add-command for with key = "Hello", value = "World", flags = 0xdeadbeef and expiry: in two hours.

 Extras              :
     Flags      (24-27): 0xdeadbeef
     Expiry     (28-31): 0x00000e10

thanks.

Indeed, that is correct! I've fixed. thanks!


Reporting capabilities of AS path matching

Cheers,
seems I either misunderstand the path match reporting mechanisms or I need to investigate into enhancing/fixing this perhaps.
Background:
I send an UDPATE of one of our prefixes into the DFZ. For that prefix I did configure a path match of '$MYASN' in prefixes.yml.
The resulting report of this UPDATE is:

always just a single report, doesn't matter how many different paths via/to $MYASN do exist
${summary} is expanded to matchDescription + "on prefix $PREFIX 1 times"
${earliest} and ${latest} expanded
${pathNumber} and ${path} expanded (BUT always just to a single one eg. "Top 1 most used AS paths: [3356,$MYASN]")
no other expansions are possible, the above is the maximum possible to get out of it

My main use case is reporting me any occurence of $MYASN being suddenly reachable through major/transit-free ASNs, multiple times, in noncontinous fashion (leakages). But for testing purposes all what I do is matching on $MYASN without any regex.
What I would expect to see is all UPDATES matching the regex being reported. You could be able to see where a leak or any other regex match was seen, by ${peer} and also seeing the AS path of all those UPDATES spreading through the DFZ. You would be able to see the impact of that. Currently all you see is one PATH where the UPDATE matching the regex was seen, but not even from which peer.
What do you think, missing feature, wrong usage or bug? I'm out of clue for now, but continue to feel some love for BGPalerter, so would like to get more out of it.

Hi @jesk78,
By default, BGPalerter is instructed to report a single alert for each monitored issue.
This is the most common use case in order to reduce noise and make the alerts actionable.
(e.g. if you have a hijack you don't want to receive 600 messages, one for each peer detecting the hijack).
Which is more inline with the idea to inform you asap when something happens more than giving you a complete map of it (also because there is no way to define "complete").
For your use case tho, this default configuration is not ideal. What you could do:
Option 1:

Imagine it would be enough for you to receive a list of 50 paths used. Increase the  thresholdMinPeers parameter of monitorPath(here) to 50. Increase the showPaths value to 50 for the report of interest (e.g. here if you are using email).
With this solution, you will receive a cumulative alert as soon as you reach 50 peers reporting the same alert (and so also 50 paths). You will not receive any alert if the update doesn't reach 50 peers (which it would mean it's visibility is really limited). This is also what happens with the other monitoring.

Option 2:

Decrease notificationIntervalSeconds to something small enough (e.g. 1 second). Be aware that this means you will be receiving an alert every single time the path is matched. I would suggest to use another instance of BGPalerter for this type of monitoring in order to don't affect the other monitors.

Possible options which require changes to the code:
Option 1:

We could define a delay parameter which essentially prevents the alert to be sent immediately. The delay (in seconds) would allow the monitor to collect a set of paths. After such delay the paths are included in the alert, the alert sent and not repeated again before notificationIntervalSeconds expires. So imagine you would set the delay=30, after 30 seconds from the first received update you will receive an alert. The alert will contain Top X most used AS paths where X is the amount of path seen by BGPalerter in 30 seconds.

Option 2:

We define a new key for the path matching alert here. The first parameter of the publishAlert method is the key which is used to group together alerts and avoid duplicates. As you can see from the linked code, at the moment this parameter is the prefix matched. You could use for example the pathString instead (which it will be always different for each path). It would essentially behave like the Option 2 above without the need to run it on a separated instance to avoid other monitors to adopt the same behavior. You will receive an alert for each path matched. This is more an ad-hoc change if you are running the code.

Massimo, thanks for providing those details and also possible options.
The thresholdMinPeers options has - as you pointed out - some serious drawback which makes it not very suitable for this. In case of setting the notificationIntervalSeconds to 1 would that really mean that it would react really on every single message? Even if when multiple messages are received in a single second? I suspect that by setting it to 1 it will still miss events, while it will make some sort of sophisticated aggregation support required in the systems receiving them from BGPalerter (which is not really possible when using for example email, as in my case).
So if you ask me your suggested delay parameter to aggregate events into single alerts, makes a lot of sense for me - very beneficial in many situations, providing alerts with more granular information, helping to detect location and scope of your prefixes going ham.
I suppose that aggregating events into single alerts by using a timer is not something totally trivial to bring into the code. But anyway I will try to think about the feasibility for me patching this in.

The feature of the delay is not a bad idea indeed. Not sure how easy it is but I'll try to arrange something as soon as I have some time. Contributions are welcome.
In the meanwhile I would use the thresholdMinPeers set to a "reasonable value" (no idea which, I would keep it below 60 and tune it from there). While it is true that you will not receive alerts if you don't reach such threshold, it is also true that for your use case (especially leaking in tier1) you would easily have a visibility of more than 50 peers (which is a small fraction of the total available).

Yup, should be ok for that. But you never know. Just short inconsistency in policy with immediate fix (seen that) could mean only reaching a subset of those peers.


Update initializers.py

According to Understanding the difficulty of training deep feedforward neural networks and the codes, it is sqrt(2. / (in + out))

Can one of the admins verify this patch?

@sguada what do you think?

Not clear to me the paper mentioned that.
On Jun 27, 2017 12:09 AM, "drpngx"<EMAIL_ADDRESS>wrote:

@sguada https://github.com/sguada what do you think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tensorflow/tensorflow/pull/10985#issuecomment-311196225,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABr0fAAf9uRW59WXpzQgtIWFBIBprdhIks5sICwpgaJpZM4OCR42
.

@sguada The paper mentioned that in (eq.12).
The variance of the weights is  2. / (in + out) , so the standard deviation should be sqrt(2. / (in + out)).

ping @sguada

The normalized initialization is defined in eq. (16)
sqrt(6) / sqrt(n_in + n_out)
which equivalent to
sqrt(3 / ((n_in + n_out)/2))

@sguada
Eq. (16) uses uniform distribution.
If W is sampled from a uniform distribution in the range [-sqrt(6) / sqrt(n_in + n_out), sqrt(6) / sqrt(n_in + n_out)], then it has a standard deviation of sqrt(2) / sqrt(n_in + n_out).
So when W is sampled from a normal distribution, the standard deviation should be sqrt(2) / sqrt(n_in + n_out).
You could check the code in https://github.com/tensorflow/tensorflow/blob/r1.2/tensorflow/contrib/layers/python/layers/initializers.py .
If mode == 'FAN_AVG', it uses a standard deviation of sqrt(2) / sqrt(n_in + n_out) for normal distribution. Because it is sampled from a truncated normal distribution, so it multiply the factor with 1.3 to keep the standard deviation at sqrt(2) / sqrt(n_in + n_out).

Can one of the admins verify this patch?

@zhongzyd Thanks for the clarification, I miss understood your previous comment.

@sguada Thanks.

Jenkins, test this please.


image-attachments API POST Request: Unsupported media type "multipart/form-data"

Environment

Nautobot version (Docker tag too if applicable): 1.5.7
Python version: 3.8.10
Database platform, version: postgresql, Ubuntu 12.12-0ubuntu<IP_ADDRESS>
Middleware(s): -

Steps to Reproduce

Upload a jpg file via api POST request and "multipart/form-data" content type to https://nautobot-server/api/extras/image-attachments/

Expected Behavior
The image will be uploaded like in 1.4.x releases

Observed Behavior
Upload is not possible anymore and cancels with the error message "Unsupported media type "multipart/form-data; boundary="xxxxxxx""
According to the api documentation only "application/json" is available in v1.5.7. With older nautobot versions multipart/form-data was available. The API POST command for image-attachments is useless without multipart/form-data as content-type.

The issue was caused by the following commit:
Allow and Handle Multipart Payloads Job API (https://github.com/nautobot/nautobot/pull/2644[)](https://github.com/nautobot/nautobot/commit/3aa950a2a84cdcc1a4655882489f900c20d64d3f)
After adding "DEFAULT_PARSER_CLASSES": ("rest_framework.parsers.JSONParser",),
nautobot/core/settings.py
If I remove this line in nautobot/core/settings.py , multipart/form-data is available via api again.

The mentioned issue also affects https://pypi.org/project/nautobot-ui-plugin/ , because it uses a jquery x-www-form-urlencoded way of submitting its data.

Might be as simple as adding parser_classes = [JSONParser, MultiPartParser] to ImageAttachmentViewSet.

Might be as simple as adding parser_classes = [JSONParser, MultiPartParser] to ImageAttachmentViewSet.

I have done this in another app, this is the solution that worked for me.


@vitest/web-worker error when using browser environment

Describe the bug
I'm trying to get test coverage output with istanbul but I've found out vitest can't see codes executed in web workers (per #2911). So I figured I could wrap my worker with @vitest/web-worker and execute it in main thread. However, since that worker executes WebAssembly I want to keep using browser environment.
Now, in theory I don't see any problem with this approach but I'm getting a dynamic import error.

TypeError: Failed to fetch dynamically imported module: http://localhost:5173/home/foo/workspace/bar/node_modules/@vitest/web-worker/dist/index.js?v=1704701752071

This could be just a configuration error on my side, maybe there is a way to bundle this worker wrapper in browser environment but  that didn't shine any ideas to my mind.
Reproduction
If the problem is not obvious I'll create a reproduction project
System Info
System:
    OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (32) x64 Intel(R) Core(TM) i9-14900K
    Memory: 54.16 GB / 62.57 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
  Browsers:
    Chrome: 120.0.6099.129
  npmPackages:
    @vitejs/plugin-react: ^4.2.1 => 4.2.1
    @vitest/browser: ^1.1.3 => 1.1.3
    @vitest/coverage-istanbul: ^1.1.3 => 1.1.3
    @vitest/coverage-v8: ~1.1.3 => 1.1.3
    @vitest/ui: ~1.1.3 => 1.1.3
    @vitest/web-worker: ^1.1.3 => 1.1.3
    vite: ^5.0.11 => 5.0.11
    vitest: ~1.1.3 => 1.1.3

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

This package is exclusively for running tests in Node.js environment.

Do I have any alternative for getting coverage report for workers then?

Do I have any alternative for getting coverage report for workers then?

From what I understand, it should just work in the browser because worker import is processed on the server. cc @AriPerkkio

I'm not actually sure how this works right now. My guess is that runner in browser doesn't see worker's scope and cannot collect the coverage from window.__VITEST_COVERAGE__ object. @DenizUgur could you minimal reproduction for this?

Here you go @AriPerkkio: https://github.com/DenizUgur/vitest-worker-coverage

That's true. Let me know if I can be of assistance in any way..

This is fantastic progress, thank you. Although this seems like the proper way to approach this problem, wouldn't be easier if we force worker to run in main thread? Like what @vitest/web-worker is trying to do?
What exactly blocks us from doing that? We get a syntax error when we try to use it but if that gets resolved, it should just work right?
See this new branch on my demo repo

Like what @vitest/web-worker is trying to do?

This package is not trying to run web workers in the same thread, it's a side effect of trying to bring Web Worker API to Node.js. Since web workers are already supported in the browser, this package is not needed.
The proper way would be to communicate with the worker, although I am not sure it's a good idea to send messages to user workers. Maybe something like BroadcastChannel API is better suited.

Will this be implemented or is it in the backlog? Just asking to set my expectations. Thank you

At the moment this is not being worked on.
I cannot give any time estimates right now but at some point we should try to implement this. This won't be easy task so I would imagine some kind of proof-of-concept work to be needed first. Supporting browser's Workers would be a good first step before looking into node:child_process and node:worker_threads support.

Got it, thank you for the clarification.

Hi @AriPerkkio, I'm really invested in this idea and would like to help bring Worker coverage support for both browser and Node. If nobody is working on this atm I can try to propose a PR.
For that though, I might need some pointers. Are you open to discussing this feature?

I'm not yet sure how exactly the implementation would go. I would need to do some proof-of-concept work before to see the bigger picture.
But basically the idea would be:

Browser mode requests my-worker.js?worker
Vite plugin detects this request from ?worker query and injects code for receiving and sending messages from/to main thread.
Tests run and worker's coverage is collected as usual. This part should already be implemented.
Tests end and main thread calls Coverage Provider module's takeCoverage(). This method should be modified to also read coverage from the intercepted workers.

I think main thread should also know how many Workers it should be waiting for in takeCoverage().

I would need to do some proof-of-concept work before to see the bigger picture.

Let me know if I can be any help. I'll have some time soon, I can work on it.

Also a quick note, it's not related to this issue but if we were to attach BroadcastChannel or similar solution to get coverage reports we could use the same solution to relay console.logs

I also ran into the same issue. Here I tried to implement something like Mutex and Condition described in https://github.com/tc39/proposal-structs. They must be tested in real Web Worker environment so I didn't use @vitest/web-worker. It would be nice if Vitest can collect coverage from real worker.

Now that we have V8 coverage for browser mode, I would have expected worker's coverage to be automatically collected from there. I'm not sure if it's even possible to control worker via CDP when it's created inside browser and not with playwright. 🤔

This looks like a relevant issue on playwright side (which is unfortunately closed as out of scope :cry:)

https://github.com/microsoft/playwright/issues/22992#issuecomment-1547665490

They sound like it's technically possible by manually creating cdp session with Target.attachedToTarget, but a proper integration seems too complicated.
FWIW, Vitest can technically inject any code on ?worker_file transform (something like https://github.com/vitest-dev/vitest/pull/6569), so there might be more flexibility on Vitest side though.


Not enough MLG

need more mountain dew, doritos, etc.

Don't forget dubstep

Partially closed: there is dubstep


How to ... in InputFilter

I use InputFilter in Apigility validation POST data. I want to make optional user object in json. However if it's appear then some fields should be required.
{
  "number": "1234",
  "user": {
    "name": "John",
    "company": {
        "name": "Company name",
        "vat_id": "00011114444",
        "address": {
          "locality": "Paris",
          "postal_code": "333",
          "country": "FR"
        }
    }
  }
}

My InputFilter config:
return [
    'input_filter_specs' => [
        'OrdersApi\V1\Rest\ShippingOrders\Validator' => [
            'number' => [
                'required' => true,
            ],
            'user' => [
                'type' => Zend\InputFilter\InputFilter::class,
                'company' => [
                    'type' => Zend\InputFilter\InputFilter::class,
                    'name' => [],
                    'vat_id' => [],
                    'address' => [
                        'type' => Zend\InputFilter\InputFilter::class,
                        'locality' => [
                           'required' => false,
                        ],
                        'postal_code' => [],
                        'country' => [],
                    ],
                ],
            ],
        ],
    ],
];

In this case I need to send all fields (only locality is not required), but I need to be able to not send whole user object.
Any advice?

This issue tracker is only for bugs and feature requests. Please post your question in a Q&A site like Stackoverflow.
Hint: Play with this snippet
$inputSpecification = [
  'allow_empty'       => true, // keep this as true always
  'continue_if_empty' => true,  // keep this as true always
  'validators' => [
    [
      'break_chain_on_failure' => true,
      'name'                   => 'Zend\\Validator\\NotEmpty',
    ],
  ],
];


Improve YAML format by including assessment date & model versions (and possibly more)

With the proliferation of models and model variants it becomes more important to track assessment dates and model versions.
So far we've been able to treat model families as one, because it rarely happens that, say, 7B differ from 30B versions along the dimensions we distinguish. But this may change, or it may be useful to track things that do differ across model siblings.
Also, for datasets, we have so far tracked projects that disclose versus don't disclose datasets. But a further distinction could be made in terms of the actual availability of datasets.
And this is even more of a pipe dream but it might be even cooler if we were able to track commonly used pretraining datasets, base models and finetuning/post-training datasets. E.g. give me all models that were trained on CommonCrawl and use Antropic RL data for post-training.

Also, models like NeuralChat use multiple post-training stages, so maintaining only a single decision point for RL data is getting a bit tricky.
We do face a quickly proliferating set of data points here, so there is something to be said for just pretraining (LLM) vs posttraining (instruction tuning / DPO / SFT / RLHF) the way we have had it originally. Thoughts @liesenf ?

Agree. I think the two dimensions can be broadened to: base model training steps / tuning training steps.


The ping value is inaccurate。

public class NetClient : MonoBehaviour, INetEventListener
{
private NetManager _netClient;
private NetPeer _serverPeer;
private NetDataWriter _dataWriter = new NetDataWriter();
private int now;
private SendOptions _option = SendOptions.Unreliable;
void Start ()
{
    UberDebug.Log("start");
    _netClient = new NetManager(this, "sample_app");
    _netClient.Start();
}

void Update()
{
    _netClient.PollEvents();
    if (_serverPeer == null || _serverPeer.ConnectionState != ConnectionState.Connected)
    {
        _netClient.SendDiscoveryRequest(new byte[] { 1 }, 5000);
    }
}

void OnDestroy()
{
    if (_netClient != null) _netClient.Stop();
}

public void OnPeerConnected(NetPeer peer)
{
    _serverPeer = peer;
    StartCoroutine(GetPing());
}

private IEnumerator GetPing()
{
    for (int i = 0; i < 20; i++)
    {
        yield return new WaitForSeconds(1f);
        now = DateTime.Now.Millisecond;
        _serverPeer.Send(_dataWriter, _option);
    }

}

public void OnNetworkReceive(NetPeer peer, NetDataReader reader)
{
    Debug.Log("ping:" + (DateTime.Now.Millisecond - now));// Response time

is 20+ms
Debug.Log("serverPeer ping:" + (_serverPeer .Ping));// ping value is 0ms
}
}

29/5000
Zài júyùwǎng nèi de xiǎngyìng shíjiān jīběn dàyú 30ms, dànshì ping zhí wèi 0;
The response time in the LAN is basically greater than 30ms, but the ping value is 0;

The response time in the LAN is basically greater than 30ms, but the ping value is 0;

Is my calculation method is not right？

Use more accurate Stopwatch class or
long milliseconds = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;

Is my calculation method is not right？
yes.

Thank you

I think it should be the cause of the event being executed in the Update function。UnsyncedEvents is false。

Very possible.


(PDB-3079) Fix 3.2.x travis bitrot

CLA signed by all contributors.

Test FAILed

Test FAILed

Test FAILed

this fixed the travis bitrot. ticketing the jenkins bitrot separately.


Could not create SwiftyPress.framework in clean_arch

The build was successful with clean_arch. However, the SwiftyPress.framework file is not created. Why is this?

The SwiftyPress project was added as a submodule to the app and dropped into the workspace. This made it easier to code in both repos faster, but I plan on adding SwiftyPress to the Cartfile eventually.

After built SwiftyPress in submodule, I was found SwiftyPress.framework in the xcode library directory.
I added this to "Project navigater", "Linked Frameworks and Libraries", "Embedded Binaries".
But, "No such module SwiftyPress" error was repeated. Can you tell what's wrong?

The update has been merged into master and develop with readme instructions and a full working sample app. Please try again with the new code base and open a new issue if the issue persists. Thanks!


Duktape::Runtime - functions require at least a parameter

This triggers error
require "duktape/runtime"

  # A Runtime (optionally) accepts an initialization block
  rt = Duktape::Runtime.new do |sbx|
    sbx.eval! <<-JS
      function test() { return "this does not work unless test has a parameter"; }
    JS
  end

  rt.call("test") # => error

this work
require "duktape/runtime"

  # A Runtime (optionally) accepts an initialization block
  rt = Duktape::Runtime.new do |sbx|
    sbx.eval! <<-JS
      function test(dummy param) { return "this works"; }
    JS
  end

  rt.call("test", "thisisadummyparam") # => works

Hey @dinh, thanks for using Duktape!
I'm able to reproduce the issue - you've definitely stumbled upon a bug!
The issue doesn't throw any exceptions/errors, but the problem is that the function never actually gets called when using the call runtime method without arguments.
The bug stems from this logic: https://github.com/jessedoyle/duktape.cr/blob/6fa1f4f762909549a676af6f7d0acb2f34452e94/src/duktape/runtime.cr#L231.
If no arguments are passed to the call method, then we just read the property instead of calling the function. This allows us to read constants and properties that are namespaces (such as Math.PI, but doesn't work correctly for all cases.
I suspect a fix is to include a call to @context.is_callable in the condition when with no arguments. Essentially, if the property is callable, then we we call it (as opposed to only reading it).
I'll be able to dig in more over the next few days, but PRs are welcome if anyone wants to submit a bug fix.

Hi @dinh - I created a PR here: https://github.com/jessedoyle/duktape.cr/pull/58.
Are you able to verify that this fixes your issue?
Thanks!

I'm going to merge #58 and cut a new 0.19.1 release that includes a fix to this bug!


Cannot index into a null array.

If i run the script after installing the module en setting up the host on my g: drive i get the following:
PS G:\AutoLab\Configurations\PowerShellLab> unattend-lab
   This runs Setup-Lab, Run-Lab, and Validate-Lab

Starting the lab environment
    This is the Setup-Lab script. This script will perform the following:

    * Run the configs to generate the required .mof files
    Note! - If there is an error creating the .mofs, the setup will fail

    * Run the lab setup
    Note! If this is the first time you have run this, it can take several
    hours to download the ISO files and resources depending on the configuration.
    You may also see new drives being added and removed as the ISO is mounted
    and converted. This step should only happen the first time you run this
    command.

    ** Possible problem
    If the downloads finish but the script doesn't continue (pauses),
    press the Enter key once and it should continue

    *You will be able to wipe and rebuild this lab without needing to perform
    the downloads again.

Installing required DSCResource modules from PSGallery
You may need to say "yes" to a Nuget Provider
Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\PSAutoLab\4.1.1\functions\public.ps1:230 char:13

    if ($dscmod[0].version -ne ($DSCResource.RequiredVersion -as  ...

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : InvalidOperation: (:) [], RuntimeException
FullyQualifiedErrorId : NullArray

Cannot index into a null array.
At C:\Program Files\WindowsPowerShell\Modules\PSAutoLab\4.1.1\functions\public.ps1:230 char:13

    if ($dscmod[0].version -ne ($DSCResource.RequiredVersion -as  ...

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : InvalidOperation: (:) [], RuntimeException
FullyQualifiedErrorId : NullArray

Build the .Mof files from the configs
At G:\AutoLab\Configurations\PowerShellLab\VMConfiguration.ps1:26 char:5

Import-DSCresource -ModuleName PSDesiredStateConfiguration,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Could not find the module '<xComputerManagement, <IP_ADDRESS>>'.
+ CategoryInfo          : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ModuleNotFoundDuringParse
Building the lab environment for PowerShellLab
Name                           Value

Password                       System.Security.SecureString
NoSnapshot                     True
WarningAction                  SilentlyContinue
Path                           G:\AutoLab\Configurations\PowerShellLab
IgnorePendingReboot            True
ConfigurationData              G:\AutoLab\Configurations\PowerShellLab*.psd1
Cannot locate node 'DOM1' file and no DSC configuration can be applied. Ensure the DSC configuration has been run succe
ssfully.
At line:114 char:13

        throw ($localized.CannotLocateMofFileError -f $Name);

        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

CategoryInfo          : OperationStopped: (Cannot locate n...n successfully.:String) [], RuntimeException
FullyQualifiedErrorId : Cannot locate node 'DOM1' file and no DSC configuration can be applied. Ensure the DSC c
onfiguration has been run successfully.

PS G:\AutoLab\Configurations\PowerShellLab>
What do i have to do to make the script run without errors?

Can you run Get-PSAutolabSetting and post the result? Is this a new install of the module or did you have older versions installed? For some reason the DSC resources aren't being download which causes everything else to fail. Are you running in an elevated Power Shell session?
I am finishing up a conference in India and then flying back to the US so any other responses will be delayed.
I don't have an easy answer. I have built that lab several times on different systems so it should work. We need to figure out where you are different.

It is a new install but i had older versions on the pc.
I removed the older version and deleted the old autolab folder completely.
I rebooted the pc and after that I followed the instructions as mentioned.
I started powershell as an administrator.
The output you asked for looks like:
PS G:\AutoLab\Configurations\PowerShellLab> Get-PSAutolabSetting
PSVersion : 5.1.17763.592
Edition   : Desktop
OS        : Microsoft Windows 10 Pro
PSAutolab : 4.1.1
Lability  : 0.18.0
Memory    : 67069200

working on an update.

I think I found the problem. Updated the code to better handle checking DSC resource module versions. Update to 4.2.0 which I just published to the PowerShell Gallery and try again. Run Refresh-Host after you upgrade to copy over the latest configuration files.

It works fine now, thanks.


AV1, hevc codec support

Improvement**
Would be nice if the media player would support hevc or AV1 video files

We has this request multiple timed already. Streama only supports whats built into the browser itself, which hevc and av1 aren't at the moment. The day the mozilla or chrome devs decide to implement support for it will make it available for streama, the same goes for multiple audio tracks. You can try opening a bug on their bugtrackers and see how that goes.

https://caniuse.com/#feat=av1 AV1 has a fair amount of support now. HEVC probably can't be supported easily without transcoding https://caniuse.com/#feat=hevc

https://en.wikipedia.org/wiki/HTML5_video
Both Chrome (v70) and FF (v65/v67) have had support for AV1 since late 2018 beginning 2019.


sepperate unvalidated blocks from gossip

Overview / Motivation
add a validated tag to blocks to avoid double validation
The Task
TODO: Clearly describe the issue requirements here...
Implementation Notes
TODO: Add links to relevant resources, specs, related issues, etc...
Contribution Guidelines
Important: Issue assignment to developers will be by the order of their application and proficiency level according to the tasks complexity. We will not assign tasks to developers who have'nt introduced themselves on our Gitter dev channel

Introduce yourself on go-spacemesh dev chat channel - ask our team any question you may have about this task
Fork branch develop to your own repo and work in your repo
You must document all methods, enums and types with godoc comments
You must write go unit tests for all types and methods when submitting a component, and integration tests if you submit a feature
When ready for code review, submit a PR from your repo back to branch develop
Attach relevant issue to PR

@zalmen i guess we don't need this anymore ?
we decided to drop invalid blocks and not save them in the db at all


[DOCFIX] Update alluxio-go import package name

What changes are proposed in this pull request?
Update alluxio-go import package name
Why are the changes needed?
Old name cannot be compiled
Does this PR introduce any user facing changes?
NA

alluxio-bot, merge this please

@chengyu-l  Please sign the CLA, thanks

Ping @chengyu-l


cmake 3.3.2

Bump version to 3.3.2.

What's the testing / rollout strategy for something like this?

For the new IDR hardware I was thinking:

code review
deploy to one server
if it fails reprovision that server from scratch
deploy system wide

For cowfish it's a tradeoff between the "reprovision-if-it-fails" strategy vs testing. Not my call.

There's no urgency for this particular one--I found my cmake Boost PR didn't make it into this release so we're waiting on the next one.  And I found a workaround in the meantime.

It would be useful to have this merged and run so we can start to run bfcpp builds on centos7.

With this diff (on a merge build):
diff --git a/ansible/ci-provision.yml b/ansible/ci-provision.yml
index cdd914b..93456a5 100644
--- a/ansible/ci-provision.yml
+++ b/ansible/ci-provision.yml
@@ -3,8 +3,4 @@

 - hosts: ci-jenkins-linux
   roles:
-  - role: lvm-partition
-    lvm_lvname: jenkins-workdir
-    lvm_lvmount: "{{ jenkinsworkdir }}"
-    lvm_lvsize: "{{ jenkinssize }}"
-  - role: jenkinsslave
+  - role: omero-build

I got:
TASK [omero-build : cmake | symlink] *******************************************
changed: [localhost -> localhost]

TASK [omero-build : cmake | set the global path to include cmake bin] **********
changed: [localhost -> localhost]

TASK [omero-build : exe4j packages | install] **********************************
changed: [localhost -> localhost]

...

PLAY RECAP *********************************************************************
localhost                  : ok=17   changed=3    unreachable=0    failed=0

when running:
ansible-playbook -i example-hosts -u $USERNAME -b ci-provision.yml --limit localhost -c local -C

Executed with:
ansible-playbook -i example-hosts -b --ask-become-pass ci-provision.yml --limit localhost -c local

to get
PLAY RECAP *********************************************************************
localhost                  : ok=19   changed=3    unreachable=0    failed=0

:+1: Propose to merge and cleanup in follow ons.


cosign: enable PIV key support

Motivation for this change
This was disabled by default in cosign 0.5.0 (see https://github.com/NixOS/nixpkgs/commit/de0014a227e45b6e82dcf817807e5700138c992f) and we did not enabled it back when we upgraded cosign (https://github.com/sigstore/cosign/commit/749c7e3e5d80f3fa976f31084317a556718c3e54).
The support for PIV keys is enabled by default and can be disabled if needed.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Relase notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Tested with a YubiKey 5.

Result of nixpkgs-review pr 130208 run on x86_64-linux 1

1 package built:

cosign


fix(node.js): default name for node wrapper

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Update cs1061.md

Fixes https://github.com/dotnet/docs/issues/24006

Closing and reopening. OPB looks stuck.


"Run selection/line in python terminal" function doesn't automatically activate python console if used in a previously used python terminal

If you use the "Run selection/line in python terminal" from a fresh powershell terminal, the python console is automatically activated and the script runs. This is how it should be.
However, I get an error when using the "run selection/line in python terminal" if it is done in a terminal where I previously exited a python console using the exit() function. This function then runs each line of python code using the powershell environment. Shouldn't this function actually (re)activate the python console before running the code?
Environment data

VS Code version: 1.21.1
Extension version: 2018.2.1
OS and version: Windows 10
Python version: Python 3.6
Type of virtual environment used: N/A

We have no way to know that you exited the REPL because VS Code's APIs for working with the terminal treat it as a blackbox we can only send text into.


Implement the Receiving Mode

[ ] The P2P  will have a user interface to activating sending or receiving mode using buttons.

[ ] On clicking the receive mode the device will start advertisin.

[ ] P2P_STAR should be used as the strategy

[ ] After starting adverting then the buttons will be hidden and a progress dialog will be shown that notifies the user that the device waits for a sender.

[ ] A cancel button will be displayed below the progress  dialog above that when clicked stops the device from advertising itself.

My idea around this is that this view will have all the views between choosing the sync mode and authorization

The initial view above
The progress dialog when waiting for the sender
The views to be shown when a discoverer initiates a connection with the device
Views to be show for authentication
Views for authorization


How to set -pix_fmt?

I need to set -pix_fmt yuv420p using your APIs. How do I do it?
I am completely dependent on this. Please help me out if at there is an option. I am not able to set it.

Any update on this?

There is no native support for setting pix_fmt, but you should be able to use addExtraArgs. For example:
FFmpegBuilder builder = new FFmpegBuilder()
    .setInput("input.mp4")     // Filename, or a FFmpegProbeResult
    .addOutput("output.mp4")   // Filename for the destination
      .setFormat("mp4")        // Format is inferred from filename, or can be set

      .setVideoCodec("libx264")            // Video using x264
      .addExtraArgs("-pix_fmt", "yuv420p") // Extra ouput arg `-pix_fmt yuv420p'
      .done();

System.out.println(builder.build());
// Prints:
// [-y, -v, error, -i, input.mp4, -f, mp4, -vcodec, libx264, -pix_fmt, yuv420p, output.mp4]

Which should do what you want.

@bramp  thank you so much

@bramp  how to create the quality of the video?


Option for showing the plan without applying the script (i.e. dry run)

It would be useful to have an option to skip any confirmation, but answering it as "no". This would be the opposite of the option --yes.
My use case is showing the execution plan in a pipeline stage, then stop for manual confirmation.
Terraform has this same concept, with their plan/apply commands

Hi,
Something along the lines of --plan-only then? We were considering dry run to also dump the list of API calls in a file for allowing manual review.
Thanks

Something along those lines would be great. Writting and debugging migrations / exploring is kind of hard to do right now (create a branch, do silly stuff, come back).

We would love to have this feature as well and it should include a list of requests that would execute (at least method and URL).

Any news on this? Would love to see this feature! Would be great improvement when running migration scripts in automation.

+1 on this. Any progress on this? Right now i'm just running and deleting the environment after. Good work around, but only if you have sufficient environment available.

Hey @marcolink @matthew-contentful @phoebeschmidt @giotiskl
Any idea if this is an enhancement to be considered? I can send a PR if it's something you would like to have in the repo. I also have a need for this and don't want to maintain my own fork/version of the CLI for this enhancement.

Hi @pmbanugo 👋
There is currently nothing planned for such a feature, but if you provide a PR, I'm happy to review/merge it :)

Closing due to inactivity - please feel free to re-open again.


Modify a number of the viewer preferences, whose current default value is 0, such that they behave as expected with the view history

The intention with preferences such as sidebarViewOnLoad/scrollModeOnLoad/spreadModeOnLoad was always that they should be able to unconditionally override their view history counterparts.
Due to the way that these preferences were initially implemented[1], trying to e.g. force the sidebar to remain hidden on load cannot be guaranteed[2]. The reason for this is the use of "enumeration values" containing zero, which in hindsight was an unfortunate choice on my part.
At this point it's also not as simple as just re-numbering the affected structures, since that would wreak havoc on existing (modified) preferences. The only reasonable solution that I was able to come up with was to change the default values of the preferences themselves, but not their actual values or the meaning thereof.
As part of the refactoring, the disablePageMode preference was combined with the adjusted sidebarViewOnLoad one, to hopefully reduce confusion by not tracking related state separately.
Additionally, the showPreviousViewOnLoad and disableOpenActionDestination preferences were combined into a new viewOnLoad enumeration preference, to further avoid tracking related state separately.

[1] This is mostly my fault, since I wrote the initial implementation which has then been used as a template when additional preferences were added.
I've been aware of these problems for quite a while now, and seing issue #10335 provided the final impetus needed to actually try and fix this.
[2] Given that a ViewHistory value may easily override the relevant Preference value.

/botio-linux preview

I notice there is migration code for the Chrome extension, but how will the removal of the old preferences work for the version embedded in Firefox? Don't we need some migration code for that as well, i.e., temporarily handle both the old and the new preferences?

I notice there is migration code for the Chrome extension, but how will the removal of the old preferences work for the version embedded in Firefox?

Honestly, I was kind of hoping not having to bother with general preference migration[1], since it's only in the Chrome extension that the preferences are easily accessible.
In Firefox, the only way that a user has changed any of the PDF.js preferences is manually through about:config, which I'm assuming/hoping is somewhat rare in practice. There's also "prior art" when it comes to not migrating general preferences, see e.g. the textLayerMode pref added in PR #9479.

Don't we need some migration code for that as well, i.e., temporarily handle both the old and the new preferences?

If you insist on migration being necessary here, I really cannot object too strongly though[2].
Given that none of these preferences will outright "break" anything, but rather only (potentially) change the initial view when loading a PDF document, I was simply trying to take the easy way out here :-)
Ninja-edit: Darn, I just found https://github.com/mozilla/pdf.js/issues/8972#issuecomment-335049270 which means that general migration code probably cannot be ignored after all :-(

[1] Which unfortunately the BasePreferences class itself, nor the code in PdfStreamConverter.jsm, isn't really well-equipped to handle.
[2] Most likely, with my review hat on, I would've asked the exact same questions.

I agree with this. Changing preferences through about:config is always at the user's own risk since no guarantees are generally made, as far as I know, that the preferences will keep on existing in newer versions. Since these preferences also don't break anything, I'm fine with this.

Thank you for improving this!


Better UI feedback when building a schema with an unsupported Wikibase data type

I was trying to upload data to a custom Wikibase instance associated with a new property, which has a local media file data type (a new data type, non existing in Wikidata). Right now I get a message that indicates the desired data type is unsupported when adding the new property to the schema. The corresponding value field goes red initially, but then it still allows me to drag a column with values into it and even renders a correct preview. I am then able to select Upload option, but get stuck at 0%.
Proposed solution
The property field should go red if user attempts to add a property with custom data type that is not yet supported by OpenRefine and its Wikibase extension. User should not be allowed to proceed until they rebuild their schema with different properties.
Additional context
This relates to issue #3263

No longer needed since custom datatypes are now supported as well.


[Major] NyumatFlix Version 2.0

It's finally that time!

Presenting NyumatFlix 2.0. An improved, fully-featured successor to NyumatFlix.

Background.
This was my first front-end "passion" project and I've gotten A LOT better since then. I'm super excited to release NyumatFlix 2.0 here soon, but I still have a bit more work to do on it before it can be merged with master.
Features (TBD)

View data (overview, genres, rating) about any movie or tv show.
Stream any movie or tv show.
Debounced search any movie and tv show.
Filter any movie and tv show by category.
Persist the watch point of any movie tv show.
Opt-in User authenticaton/authorization to allow and persist watchlist(s)
No ads option for users with an account.
Content favoriting system, similar to what I did with SwiftyMovies.
Individual Movie/Tvshow comment sections

ETA
It's probably another month or so until I can deploy the new version to due to school, however, I'll be linking major commits to this issue for referencing and a 'mini-timesheet'.

V2 Commit Header Key:
[Feature]: A major aspect/feature that is being added to the application.
[Deps]: New dependencies added/changes to package.json.
[Pole]: A mini part of a feature being completed. (useful for incremental work)
[NIP]: A part of the application that is tested and works, but needs improvement.
[Mini]: A small and generally emeregency/quick fix to a piece of the application.
[Improv]: A minor feature/improvement to the application.


Remove redundant invoke_tx implementation in transaction_test

This change is

Codecov Report

Merging #964 (4b7e601) into main (d93b237) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #964   +/-   ##
=======================================
  Coverage   68.79%   68.79%
=======================================
  Files          47       47
  Lines        5987     5987
  Branches     5987     5987
=======================================
  Hits         4119     4119
  Misses       1493     1493
  Partials      375      375

Files
Coverage Δ

crates/blockifier/src/transaction/transactions.rs
66.53% <ø> (ø)

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


[SPARK-35839][SQL] New SQL function: to_timestamp_ntz

What changes were proposed in this pull request?

Implement new SQL function: to_timestamp_ntz.
The syntax is similar to the built-in function to_timestamp:
to_timestamp_ntz ( <date_expr> )

to_timestamp_ntz ( <timestamp_expr> )

to_timestamp_ntz ( <string_expr> [ , <format> ] )

The naming is from snowflake: https://docs.snowflake.com/en/sql-reference/functions/to_timestamp.html
Why are the changes needed?

Adds a new SQL function to create a literal/column of timestamp without time zone.
It's convenient for both end-users and developers.
Does this PR introduce any user-facing change?

Yes, a new SQL function to_timestamp_ntz.
How was this patch tested?

Unit tests

Test build #140062 has started for PR 32995 at commit a0542a9.

Test build #140066 has started for PR 32995 at commit ba38bb6.

@gengliangwang Thanks for the ping. I will review it today slightly later.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44588/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44592/

Test build #140062 has finished for PR 32995 at commit a0542a9.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140062/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44588/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44592/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44588/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44592/

Test build #140072 has started for PR 32995 at commit 6da6d8e.

Test build #140072 has finished for PR 32995 at commit 6da6d8e.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44600/

Test build #140066 has finished for PR 32995 at commit ba38bb6.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140066/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140072/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44600/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44600/

Test build #140079 has started for PR 32995 at commit cead8b6.

2 high-level comments:

I think this new function should just go with the non-legacy behavior if the legacy conf is enabled, instead of failing.
We can make ToTimestamp more general to support this new function, instead of adding a new subclass of ToTimestamp

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44607/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44607/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44607/

Test build #140086 has started for PR 32995 at commit 7eba75c.

@cloud-fan your comments are addressed. PTAL.

Test build #140089 has started for PR 32995 at commit d5afd6a.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44615/

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44615/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44615/

Test build #140079 has finished for PR 32995 at commit cead8b6.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140079/

Kubernetes integration test unable to build dist.
exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44617/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44617/

Test build #140086 has finished for PR 32995 at commit 7eba75c.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140086/

Test build #140089 has finished for PR 32995 at commit d5afd6a.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/140089/

Merging to master


Script ignores small switch

I have specified small switches, so they would show in help and so I have "power" over them. But when I try to use myscript run  -t alfa, the type doesnt set. It works for -i and -m just fine. But with type I need to write --type
#!/usr/bin/env ruby

require 'rubygems'
require 'commander/import'

program :name, 'MyScript'
program :version, '0.1.0'
program :description, "Script execution"

command :run do |c|
  c.syntax = 'test_runner run [options]'
  c.description = 'Run test script or a set of test scripts'
  c.option('-t STRING', '--type STRING', String, 'Type')
  c.option('-i STRING', '--input STRING', String, 'Path')
  c.option('-m STRING', '--max_depth STRING', String, 'Maximal depth')
  c.action do |args, options|
    options.default max_depth: '0'
    say "Params are: #{options.type}, #{options.input}, #{options.max_depth}"
  end
end

c.option('-t', '--type STRING', String Does not work either.

On my way on the subway I realized the -t is small switch for --trace. Moving on.

That's right, it is a global switch that Commander defines. If that's an important feature you'd like to have, there's a similar issue https://github.com/commander-rb/commander/issues/64 about disabling the -v / --version predefined switch — you could create a patch if you're interested.


Popup window

In this milestone;

Created a popup modal for each project and linked it to the project button
Made the close button functional when the user clicks on it
Refactored the project section by storing all project information in a javascript array and objects
Fixed HTML, CSS, and JavaScript linter errors
Edited README file

Thanks for the Approval 👍


Move default case at the top in log10

See Jean Cavallera's suggestion here.

This is not possible, unfortunately. Solidity throws the following error:

Case not allowed after default case.solidity(4904)


feat(@ciscospark/plugin-phone): add call:connected event

A few things on this PR:

A new phone event call:created was added
Whenever a locus event happens to a call we aren't aware of via emittedCalls, the event will trigger
Event names have been exported as an object phoneEvents to reduce the amount of "magic strings"
Refactored the register locus listing to use the listActiveCalls method
Expanded integration tests

@ianwremmel requested changes have been made