once a user has been deleted, it is not possible to re-invite it

branch 4.x

how to reproduce the problem:

create a new realm
add internal provider (default options) and enable it
add password provider (default options) and enable it
go to the users menu and "Invite User"
enter an email (in the example<EMAIL_ADDRESS>delete the user
insert the email of the 5th point

aac hangs:
Hibernate: insert into resources (authority, provider_id, resource_id, type, id) values (?, ?, ?, ?, ?)
2023-01-31 15:33:11.686  WARN 2076 --- [nio-8080-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : SQL Error: 1062, SQLState: 23000
2023-01-31 15:33:11.688 ERROR 2076 --- [nio-8080-exec-9] o.h.engine.jdbc.spi.SqlExceptionHelper   : Duplicate entry<EMAIL_ADDRESS>for key 'resources.UKt7i9but74j1vilgwqqbd17gy9'
2023-01-31 15:33:11.690  INFO 2076 --- [nio-8080-exec-9] o.h.e.j.b.internal.AbstractBatchImpl     : HHH000010: On release of batch it still contained JDBC statements
2023-01-31 15:33:11.706 ERROR 2076 --- [nio-8080-exec-9] i.s.aac.console.ConsoleExceptionHandler  : error processing request: could not execute statement; SQL [n/a]; constraint [resources.UKt7i9but74j1vilgwqqbd17gy9]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
2023-01-31 15:33:11.722  WARN 2076 --- [nio-8080-exec-9] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [resources.UKt7i9but74j1vilgwqqbd17gy9]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement]

in the delete operation:

users are deleted from internal_users and users
but they stay in resources and internal_users_passwords


cbtemulator: 1.22.0 -> 1.29.0

Description of changes

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

[ ] Fits CONTRIBUTING.md.

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

Built on x86_64-linux and confirmed it now contains https://github.com/googleapis/google-cloud-go/pull/9665:
result/bin/cbtemulator --help
Usage of result/bin/cbtemulator:
  -address string
    	address:port number or unix socket path to listen on. Has priority over host/port
  -host string
    	the address to bind to on the local machine (default "localhost")
  -port int
    	the port number to bind to on the local machine (default 9000)

Thanks for the PR!


On installation, npm prints many warnings of stale dependencies

Issue Summary
I've just added sqlite3 to my project, it is using version 5.1.7 (the latest as of this writing), and I get these warnings:
$ npm install
npm warn deprecated<EMAIL_ADDRESS>This functionality has been moved to @npmcli/fs
npm warn deprecated<EMAIL_ADDRESS>This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated<EMAIL_ADDRESS>This package is no longer supported.
npm warn deprecated<EMAIL_ADDRESS>Rimraf versions prior to v4 are no longer supported
npm warn deprecated<EMAIL_ADDRESS>This package is no longer supported.
npm warn deprecated<EMAIL_ADDRESS>Glob versions prior to v9 are no longer supported
npm warn deprecated<EMAIL_ADDRESS>Glob versions prior to v9 are no longer supported
npm warn deprecated<EMAIL_ADDRESS>Glob versions prior to v9 are no longer supported
npm warn deprecated<EMAIL_ADDRESS>Glob versions prior to v9 are no longer supported
npm warn deprecated<EMAIL_ADDRESS>This package is no longer supported.

I try to keep my project clean of these type of warnings.  All of them trace back to an old node-gyp version being used.
For example:
$ npm ls @npmcli/move-file
<EMAIL_ADDRESS>/home/david/Projects/akasharender/akasharender
└─┬<EMAIL_ADDRESS>  └─┬<EMAIL_ADDRESS>    └─┬<EMAIL_ADDRESS>      └─┬<EMAIL_ADDRESS>        └──<EMAIL_ADDRESS>
All the other dependencies have a similar output.
I haven't checked if updating node-gyp will fix these stale dependencies.  But that would be a good first start.  If any remain, then it's a matter of informing the other projects to update their dependencies.
Relevant logs or output
See above
Version
5.1.7
Node.js Version
22.x
How did you install the library?
npm install sqlite3 --save

I was able to get rid of these in my project by adding an override in package.json for node-gyp to 10.2.0 and another for glob 11.0.0.  Upgrading these didn't seem to affect node-sqlite3 (as far as I can tell. It builds and it works for what I need it to do :) )
"overrides": {         "glob": "11.0.0",         "node-gyp": "10.2.0"     },

Good to know about this workaround.  That would seem to support the idea that the sqlite3 team could bump the dependency version number with little about having to spend months working on upgrading the code.  Sounds like it would instead be a 2 minute task.


Only do first block of the file for a finger print [Matches javascrip…

For generating a fingerprint, the javascript client only does an md5_sum of the minimum of the block size or file size; not the entire file. This PR would mirror the python to this behavior.
https://github.com/tus/tus-js-client/blob/13383e8178635d432d585ab13326b2de223a452f/lib/node/fingerprint.js#L15

Thank you for the PR!
Asides from consistency, what else is the benefit from hashing only a chunk of the file? 🤔
Also, the implementation from the javascript counterpart is quite different in that it also combines the file size, endpoint, and md5, so it reduces the chances of collision.
In tus-py-client's case however, it uses only the md5 hash, so it's safer to reduce the chances of collision by hashing a larger chunk.

The driver behind only using only a chunk of the file is performance. If uploading large files, the md5 is non-trivial.
Usage of the additional elements seems like a good idea to minimize collisions.

I agree about the performance part. Maybe we can for now string the file size along with hashing only the first block. Will you be open to update the PR to do this?

thank you for the work!

Out of curiosity, do you know when you are planning to push another release to PyPi?

this change is a breaking change since it now behaves differently. Releasing this will therefore be a major release. Which is likely going to come along with this major change.
If you need this functionality ASAP, maybe you can pass it as a custom fingerprinter parameter? 🤔


Unify MillBuildModule with MillBuildRootModule

MillBuildModule is basically a lightweight partial implementation of MillBuildRootModule. Now that we have MillBuildRootModule, we should use it

Also, expose the mill-build to be used by mill. Maybe we can expose it as an external module. Or we could invent some cli arg to enable the meta-build.


Minor changes for psr middleware

Migrated component to psr middlewares without checking release-1.0 branch. After rebase some useful changes remained

Thanks, @Xerkus!


Implement Prometheus factory and config V2

Github issue: https://github.com/open-telemetry/opentelemetry-service/issues/38
Testing done:

make && make otelsvc
Run otelsvc with the following config and make sure Prometheus can scrape :

receivers:
  opencensus:
    port: 55678

  prometheus:
    config:
      scrape_configs:
        - job_name: 'demo'
          scrape_interval: 5s

zpages:
  port: 55679

exporters:
  prometheus:
    endpoint: "<IP_ADDRESS>:8889"

pipelines:
  metrics:
    receivers: [prometheus]
    exporters: [prometheus]

Reviewers, all fixed, please check again.

Codecov Report

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

@@            Coverage Diff            @@
##             master      #89   +/-   ##
=========================================
  Coverage          ?   71.41%
=========================================
  Files             ?       96
  Lines             ?     6133
  Branches          ?        0
=========================================
  Hits              ?     4380
  Misses            ?     1527
  Partials          ?      226

Impacted Files
Coverage Δ

cmd/occollector/app/builder/receivers_builder.go
85.18% <0%> (ø)

exporter/prometheusexporter/factory.go
87.87% <87.87%> (ø)

Continue to review full report at Codecov.

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


Inequality constraint for injected power coded with the wrong sign[BUG]

Describe the bug
In constraint_equations.f90 the constraint residue tmp_cc should be coded such that it will be negative if the constraint is satisfied, although the code is a little confusing:
      cc(i) = tmp_cc
....
    ! Issue 505 Reverse the sign so it works as an inequality constraint (cc(i) > 0)
    ! This will have no effect if it is used as an equality constraint because it will be squared.
    cc = -cc

This seems to have been coded incorrectly for the following case:
   subroutine constraint_eqn_030(tmp_cc, tmp_con, tmp_err, tmp_symbol, tmp_units)
      !! Equation for injection power upper limit
..
      tmp_cc =  1.0D0 - pinjmw / (fpinj * pinjalw)

If the actual value of the injected power pinjmw is smaller than the specified upper limit pinjalw and fpinj=1 (constraint is physically satisfied) then tmp_cc is positive, which is incorrect.
@timothy-nunn @jmorris-uk
Steps to reproduce
See attached output file in comment below.  Tim has made this converge by setting fpinj=0.25.
Expected behaviour
tmp_cc should be negative when pinjmw is smaller than the specified upper limit pinjalw and fpinj=1 .
Additional context
This only arises when inequality constraints are used instead of f-values.
The constraint table in OUT.DAT is a little confusing because the constraint residue printed seems to be positive or negative at random, irrespective of whether the constraint is physically an upper or lower limit (indicated by the symbol < or >).
As far as I can see at the moment the injected power limit is the only inequality with this problem, although this should be checked.
Also the symbol is incorrect for the LH threshold power, which is a lower limit but is printed as "<".

OUT 1.DAT.TXT

Proposed change:
tmp_cc =  1.0D0 - fpinj*pinjalw/pinjmw
tmp_con = pinjalw
tmp_err = pinjalw  - pinjmw / fpinj

Before the change:

large-tokamak with f-values: pinjmw = 75.398
large-tokamak without f-values: does not converge unless fpinj=0.25

After the change:

large-tokamak with f-values: pinjmw = 80.143
large-tokamak without f-values: pinjmw = 85.831

NOTE: the large-tokamak regression test converges on a different (still valid) point, I presume due to the solver taking a slightly different path.

Hi Tim,
So you have four valid solutions with different answers, varying over a range of 10% in injected power.  Very interesting.  Could you send me all four OUT.DAT files?
All the best,
Michael

From: Timothy @.>
Sent: 31 January 2024 10:29
To: ukaea/PROCESS @.>
Cc: Kovari, Michael D @.>; Author @.>
Subject: Re: [ukaea/PROCESS] Inequality constraint for injected power coded with the wrong sign[BUG] (Issue #3033)
Proposed change:
tmp_cc =  1.0D0 - fpinj*pinjalw/pinjmw
tmp_con = pinjalw
tmp_err = pinjalw  - pinjmw / fpinj
Before the change:

large-tokamak with f-values: pinjmw = 75.398
large-tokamak without f-values: does not converge unless fpinj=0.25

After the change:

large-tokamak with f-values: pinjmw = 80.143
large-tokamak without f-values: pinjmw = 85.831

NOTE: the large-tokamak regression test converges on a different (still valid) point, I presume due to the solver taking a slightly different path.
—
Reply to this email directly, view it on GitHubhttps://github.com/ukaea/PROCESS/issues/3033#issuecomment-1918822281, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACKEVEALO74UB77MK7DS7MDYRIMHBAVCNFSM6AAAAABCMAYOHKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJYHAZDEMRYGE.
You are receiving this because you authored the thread.Message ID: @.***>


add wel package to t-model for correction flux (name = RIV_CORR)

I think this pull request can be closed, because the changes in it were committed in commit d4fac75a2c0edf3aa5622c78717c4f6fde09927d

@HendrikKok do you agree?


Use gflags ALIAS instead of ${gflags_XXX} vars

The gflags project updated their CMake config last year with a gflags ALIAS target. This can be used instead of the legacy ${gflags_LIBRARIES} and ${gflags_INCLUDE_DIRS} variables. It also looks cleaner.
Fixes #198

Which gflags introduced the alias? This needs to be set here.

Updated with gflags version.

Any additional comments @sergiud?

@v1bri Looks good to me now.

Thanks! Would you like to merge @shinh or @ukai?


Next/Prev skips one track

I started noticing a funny behavior of my phoniebox. Each press on my next/prev buttons advances the playlist by two songs instead of just one. I might have messed up my gpio settings somewhere. Any ideas what might cause this behavior?
You can see in the logs that the command really gets called twice with each press of the button:
########### SCRIPT playout_controls.sh (2020-07-24.20:45:02) ##
########### SCRIPT playout_controls.sh (2020-07-24.20:45:02) ##
VAR COMMAND: playerprev
VAR COMMAND: playerprev
VAR VALUE:
VAR VALUE:

hmm, i found out how to stop this behavior but I am puzzled by the solution: In the webApp, under Settings > External Devices & Interfaces , I have to DEACTIVATE GPIO Buttons to make the GPIO Buttons work properly.
When GPIO Buttons is toggeled ON, I get the skipping issue.
When GPIO Buttons is deactiveated, everything is fine.
This seems counter intuitive.

Hi @jlarsch
this is not only counter intuitive, it's not how it should be :) did you do a fresh install or upgraded your system with git pull?

What's the result of sudo tail -n 300 /var/log/lighttpd/error.log after you experienced that behavior?

Hi @jlarsch is this still happening? If not, can you share what had been happening? And if not, please close the ticket.
Thanks for your input (I keep my fingers crossed that the issue is resolved :) nobody else reported it, so I wouldn't even know where to start looking...)

Hi @jlarsch. Were you able to fix this? I just setup a new box with the interactive install script and face the same issues. It almost seems that the service that checks for button presses is running twice. But I haven't dug any deeper. Maybe you also have a hunch of what could go wrong?

It seems that this is related to the debouncing of the buttons in my case. What helped was to start a thread for every press to trigger the event. https://www.raspberrypi.org/forums/viewtopic.php?t=143478 pointed me in that direction.
I still find it surprising that are restarted service with the original code does not exhibit that behavior.

Closing. Please feel free to reopen this issue, if the problem persists.


Make neighbor list building for graphs consistent

Currently the pymatgen version borks if you pass it a nonperiodic structure (e.g. molecule)...I think switching over to the ASE version may work better, then we can just feed that into the weight-calculating function. Probably the voronoi option will just have to only work with pymatgen structures for awhile...

forgot to link PR to the issue but this is fixed


Webpack polyfills for Node.js

When you install modules that use native nodejs modules (path, fs, os, crypto, etc.), I run npm run start and get:
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

I'm trying to use the npm package: electron-settings
Have you run into this at all?

Regarding the package you want to install, last version of electron-settings (from 2020) may not be compatible with webpack 5.
I would like to help but first could you please give more details about how to reproduce.
Dont forget to mention your node/npm/ngcli versions.

I am currently using this version of electron-settings. But yes, this is not compatible with Webpack 5.
Versions:
Angular CLI: 12.2.0
Node: 16.6.1
Package Manager: npm 7.20.3
OS: darwin x64
I'm trying to use this class:
import { StorageEngine } from '@ngxs/storage-plugin';
import SettingsStorage from 'electron-settings';

class ElectronStorage implements StorageEngine {

  public get length(): number {
    try {
      return SettingsStorage.keysSync().length;
    } catch (err) {
      return 0;
    }
  }

  public setItem(key: string, data: string): void {
    try {
      SettingsStorage.setSync({ [key]: data });
    } catch (err) {
      console.error('Error: Failed to set key: ', key);
      console.error(err);
    }
  }

  public getItem(key: string): any {
    try {
      return SettingsStorage.getSync(key);
    } catch (err) {
      console.error('Error: Failed to get key: ', key);
      console.error(err);
    }
  }

  public removeItem(key: string): void {
    try {
      SettingsStorage.unsetSync(key);
    } catch (err) {
      console.error('Error: Failed to unset key: ', key);
      console.error(err);
    }
  }

  public clear(): void {
    try {
      SettingsStorage.unsetSync();
    } catch (err) {
      console.error('Error: Failed to unset all keys');
      console.error(err);
    }
  }

  public getAllKeys(): string[] {
    try {
      return SettingsStorage.keysSync();
    } catch (err) {
      console.error('Error: Failed to get all keys');
      console.error(err);
      return [];
    }
  }
}

const storage = new ElectronStorage();
export {
  storage,
  ElectronStorage,
}

I have tried:

adding this plugin: node-polyfill-webpack-plugin
adding paths in tsconfig compilerOptions

https://github.com/angular/angular-cli/issues/20819

This issue was closed because it has been open for more than 30 days with no activity.


Use unique-less readable PIR for Budget.Spec

The golden PIR files for Budget.Spec often need to be inspected to understand why a change to the compiler leads to different costs. Using the readable version makes this much easier.
Adding the uniques would be helpful for disambiguation (although it can also be distracting), but it makes it harder to diff two PIRs since the uniques can be totally different. So it doesn't print the uniques.

I wonder if we should use this throughout?

No objection!

So it doesn't print the uniques.

Doesn't that introduce a risk that two different things may end up looking the same?  Presumably that's unlikely but possible.x

Doesn't that introduce a risk that two different things may end up looking the same? Presumably that's unlikely but possible.

The whole PIR programs look the same but are actually different? That seems very unlikely. If they look the same and also have the same cost then I don't think we need to care. If they look the same but have different costs, then we can debug further by adding the uniques to the output.


Add support for the attach command

We don't support attaching dbs at the moment. Unclear if it should even be supported but it does make testing and exploration simpler.

this makes it somewhat problematic: https://www.sqlite.org/vtab.html#eponymous_virtual_tables

Eponymous virtual tables exist in the "main" schema only, so they will not work if prefixed with a different schema name.

would require quite a bit of re-work to crsql_changes


HomeKit Support For Remote Controls

iOS 12 To Offer HomeKit Support For Remote Controls,
do you have plan to add this accessories to HomeKitTypes.js ?
Thanks

@KhaosT
If I understand well, Remotes Accessories in iOS12 use for 3rd Party Device, not only apple TV.
HomeKit support for third-party remote controls coming in iOS 12 also include apple TV.
Link: https://appleinsider.com/articles/18/06/12/homekit-support-for-third-party-remote-controls-coming-in-ios-12-and-tvos-12
Because I have some plugin for homebridge when I must use many switch for power OFF/ON, Volumes UP and Down, change channel, turn HDMI.
It would be wonderful to have it all in one Accessories. I suppose that new Remotes Accessories used to it.

That’s not what the remote controller profile is primarily for… the whole profile is designed to only work for tvOS…

@KhaosT
Is that still the case in the latest iOS 12.1.1?

Yup

I can't find any information about the profile, is the information you got coming from reverse engineering or a developer webpage?

Anything specific you want to know? Yeah, you can figure out the capability of remote from tvOS homed binary.
Sent from my iPhone

On Dec 29, 2018, at 11:52 AM, Miguel Ripoll<EMAIL_ADDRESS>wrote:
I can't find any information about the profile, is the information you got coming from reverse engineering or a developer webpage?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Does this remote controller profile support Siri integration?
If yes I would be interested in trying to implement it

It allows accessory to act as a Siri Remote to Apple TV. If you are interested in supporting data stream for HomeKit, feel free to do so :)

Any idea where to start? Anything documented which one could work with?

Unfortunately I can’t find any information about the tvOS homed binary. Where did you get the human readable version?

Feature was added some time ago


Roundup: [oss-security] Re: Linux kernel: CVE-2017-6074: DCCP double-free vulnerability (local root)

Here is a vulnerability from the oss-security mailing list
for Vulnerability Roundup 26.
Instructions:
Identification
Identify if we have the software, in 16.09, 17.03, and unstable.
Then determine if we are vulnerable, and make a comment with
your findings. It can also be helpful to specify if you think there is
a patch, or if it can be fixed via a general update.
Example:
unstable: we are not vulnerable (link to the package)
17.03: we are vulnerable (link to the package)
16.09: we don't have it packaged

IMPORTANT: If you believe there are possibly related issues, bring
them up on the parent issue!
Patching
Start by commenting on this issue saying you're working on a patch.
This way, we don't duplicate work.
If you open a pull request, tag this issue and the master issue
for the roundup.
If you commit the patch directly to a branch, please leave a comment
on this issue with the branch and the commit hash, example:
fixed:

release-16.09: abc123

Upon Completion ...

[ ] Update Graham's database

Info
Triage Indicator:
-needs-triage +roundup26 thread:0000000000003db4 # [oss-security] Re: Linux kernel: CVE-2017-6074: DCCP double-free vulnerability (local root)

File Search: https://search.nix.gsc.io/?q=linux-kernel&i=fosho&repos=nixos-nixpkgs
GitHub Search: https://github.com/NixOS/nixpkgs/search?utf8=✓&q=linux-kernel+in%3Apath&type=Code

Wed, 22 Feb 2017 14:28:35 +0100 Andrey Konovalov <andreyknvl-at-google.com><EMAIL_ADDRESS>Hi,

This is an announcement about CVE-2017-6074 [1] which is a double-free
vulnerability I found in the Linux kernel. It can be exploited to gain
kernel code execution from an unprivileged processes.

Fixed on Feb 17, 2017:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4

The oldest version that was checked is 2.6.18 (Sep 2006), which is
vulnerable. However, the bug was introduced before that, probably in
the first release with DCCP support (2.6.14, Oct 2005).

The kernel needs to be built with CONFIG_IP_DCCP for the vulnerability
to be present. A lot of modern distributions enable this option by
default.

The bug was found with syzkaller [2].

### Bug details

In the current DCCP implementation an skb for a DCCP_PKT_REQUEST
packet is forcibly freed via __kfree_skb in dccp_rcv_state_process if
dccp_v6_conn_request successfully returns [3].

However, if IPV6_RECVPKTINFO is set on a socket, the address of the
skb is saved to ireq->pktopts and the ref count for skb is incremented
in dccp_v6_conn_request [4], so skb is still in use. Nevertheless, it
still gets freed in dccp_rcv_state_process.

The fix is to call consume_skb, which accounts for skb->users,
instead of doing goto discard and therefore calling __kfree_skb.

To exploit this double-free, it can be turned into a use-after-free:

//  The first free:
kfree(dccp_skb)
// Another object allocated on the same place as dccp_skb:
some_object = kmalloc()
// The second free, effectively frees some_object
kfree(dccp_skb)

As this point we have a use-after-free on some_object. An attacker can
control what object that would be and overwrite it's content with
arbitrary data by using some of the kernel heap spraying techniques.
If the overwritten object has any triggerable function pointers, an
attacker gets to execute arbitrary code within the kernel.

I'll publish an exploit in a few days, giving people time to update.

New Ubuntu kernels are out so please update as soon as possible.

### Timeline

2017-02-15: Bug reported to<EMAIL_ADDRESS>2017-02-16: Patch submitted to netdev
2017-02-17: Patch committed to mainline kernel
2017-02-18: Notification sent to linux-distros
2017-02-22: Public announcement

### Links

[1] http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2017-6074
[2] https://github.com/google/syzkaller
[3] http://lxr.free-electrons.com/source/net/dccp/input.c?v=4.9#L606
[4] http://lxr.free-electrons.com/source/net/dccp/ipv6.c?v=4.9#L351
[5] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4

Sun, 26 Feb 2017 01:45:54 +0100 Andrey Konovalov <andreyknvl-at-google.com><EMAIL_ADDRESS>I've uploaded the proof-of-concept exploit here:
https://github.com/xairy/kernel-exploits/tree/master/CVE-2017-6074

It includes a SMEP/SMAP bypass, however it's not very reliable. The
exploit was tested on Ubuntu 16.04 with 4.4.0-62-generic kernel. It
will most likely crash on anything else, unless you at least update
the offsets.

A little detail that's missing from the initial announcement is that
this bug is technically a use-after-free followed by a double-free.
The kernel frees skb in dccp_rcv_state_process and then again when
destroying the socket due to inet6_destroy_sock. There's actually a
lot more stuff going on under the hood, but that's the essential part.

The use-after-free happens on skb and skb->data (they are allocated
and freed separately though one right after another). Exploiting this
would allow us to overwrite skb or skb->data with arbitrary data. The
double-free, however, allows us to control what object we overwrite by
doing the trick I mentioned in the previous email.

To get execution control we can overwrite skb->data, since it has
skb_shared_info struct at the end, and
shinfo->destructor_arg->callback is a function pointer, which is
triggered by skb_release_data. The exploit puts ubuf_info struct and
the payload to get root in userspace, so this will be detected by SMAP
and SMEP.

To disable SMEP and SMAP I used the idea from the CVE-2016-8655
exploit by Philip Pettersson. We can overwrite packet_sock struct,
which has a timer_list field deep inside it, which contains a callback
and it's argument. We allocate this struct, overwrite the time_list
field and schedule the timer. I used native_write_cr4 as the callback
and a value with SMEP and SMAP bits disabled for it's argument. Note,
that CVE-2016-8655 by itself resulted in a use-after-free on the
packet_sock struct, but in this case we make a use-after-free happen
by exploiting a double-free.

As I mentioned, the exploit is not very reliable, but I don't want to
spend any more time on it. The kernel can crash due to a memory
corruption if we fail to reallocate some objects in time or in the
correct order. However I've managed to make it work on three different
environments I have set up (including two vms and a real machine).

On Wed, Feb 22, 2017 at 2:28 PM, Andrey Konovalov<EMAIL_ADDRESS>wrote:
> Hi,
>
> This is an announcement about CVE-2017-6074 [1] which is a double-free
> vulnerability I found in the Linux kernel. It can be exploited to gain
> kernel code execution from an unprivileged processes.
>
> Fixed on Feb 17, 2017:
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4
>
> The oldest version that was checked is 2.6.18 (Sep 2006), which is
> vulnerable. However, the bug was introduced before that, probably in
> the first release with DCCP support (2.6.14, Oct 2005).
>
> The kernel needs to be built with CONFIG_IP_DCCP for the vulnerability
> to be present. A lot of modern distributions enable this option by
> default.
>
> The bug was found with syzkaller [2].
>
> ### Bug details
>
> In the current DCCP implementation an skb for a DCCP_PKT_REQUEST
> packet is forcibly freed via __kfree_skb in dccp_rcv_state_process if
> dccp_v6_conn_request successfully returns [3].
>
> However, if IPV6_RECVPKTINFO is set on a socket, the address of the
> skb is saved to ireq->pktopts and the ref count for skb is incremented
> in dccp_v6_conn_request [4], so skb is still in use. Nevertheless, it
> still gets freed in dccp_rcv_state_process.
>
> The fix is to call consume_skb, which accounts for skb->users,
> instead of doing goto discard and therefore calling __kfree_skb.
>
> To exploit this double-free, it can be turned into a use-after-free:
>
> //  The first free:
> kfree(dccp_skb)
> // Another object allocated on the same place as dccp_skb:
> some_object = kmalloc()
> // The second free, effectively frees some_object
> kfree(dccp_skb)
>
> As this point we have a use-after-free on some_object. An attacker can
> control what object that would be and overwrite it's content with
> arbitrary data by using some of the kernel heap spraying techniques.
> If the overwritten object has any triggerable function pointers, an
> attacker gets to execute arbitrary code within the kernel.
>
> I'll publish an exploit in a few days, giving people time to update.
>
> New Ubuntu kernels are out so please update as soon as possible.
>
> ### Timeline
>
> 2017-02-15: Bug reported to<EMAIL_ADDRESS>> 2017-02-16: Patch submitted to netdev
> 2017-02-17: Patch committed to mainline kernel
> 2017-02-18: Notification sent to linux-distros
> 2017-02-22: Public announcement
>
> ### Links
>
> [1] http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=2017-6074
> [2] https://github.com/google/syzkaller
> [3] http://lxr.free-electrons.com/source/net/dccp/input.c?v=4.9#L606
> [4] http://lxr.free-electrons.com/source/net/dccp/ipv6.c?v=4.9#L351
> [5] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5edabca9d4cff7f1f2b68f0bac55ef99d9798ba4

I think 4.9.13 onward contain a fix for this: https://cdn.kernel.org/pub/linux/kernel/v4.x/ChangeLog-4.9.13


Fix #165

Okay, maybe it's not #165 only :sweat_smile:

make test succeeds

Thanks!
I wonder why CircleCI doesn't kick in... 🤨

Are you sure you're up to date with master? c7777c6 doesn't seem to fit with what's in master

Yeah, the last one fixed that


Derivitives

Adding derivative methods.
Also:

A fix for import / export methods
made quaternion rotation consistent for non-unit quaternions
Reworked the tests a little; with the new derivative methods tested against ForwardDiff

Coverage increased (+18.08%) to 70.303% when pulling 121e73d7fce6c6f997eaabaaa0086e15fc9e8620 on derivitives into dcbdcff6478745c0f624566ee25e97f429ce11b6 on master.


Added main files to bower.json

Adding main files allows the binding to be used with, for instance, rails-assets and webpack without having to specify the file to be imported

@safrazik Thanks for pulling that in. Would you mind bumping the version (in bower.json and the git tag) so that rails-assets picks up the change?

@cbankester done! Thanks for the pull request


Time duration behaviour - Default configuration for job execution

Hi, :-)
currently i am having problems with the OSGI-version of Camunda to bring a simple timer duration event to work. As described in this it seems to be that "waiting 10 seconds from now on" is not possible with the default job-configuration. 1 Minute is the smallest value. That is okay for me too, when testing it. My timer event is waiting endless... It never ends. I have defined it in the bpmn file as:
<timerEventDefinition>
  <timeDuration>PT1M</timeDuration>
</timerEventDefinition>

The token arrives, but it never leaves...
We are running it on Apache karaf with Jetty installed.

Do you know if timer events are working fine in context of osgi?
How can i define the timer duration correctly? I just want to wait 1 minute or if possible 10 seconds if the job-configuration can be adjusted.

UPDATE: I have tested PT1M out in a usual spring-environment and there it is working fine. It seems to be, that you have to configure something in the osgi- environment. The job executor seems to be active in my osgi-environment too, because, when i run after the timer-duration event is reached:
List<Job> joblist = this.processEngine.getManagementService().createJobQuery().list();
it shows me the timer event... Do you have an idea, how i can use the timer-duration event correctly or is it a bug?
Thanks a lot in advance
Andy

Hi Andy,
to answer your questions:

I don't know why it shouldn't work. The OSGi extension does not replace the JobExecutor so it should does its thing. Maybe you could provide a unit test so I could take a better look at it. But so far I've never used the event within the OSGi context.
This is more a general camunda BPM question. I can only point you to the documentation here and the Wikipedia article

Cheers,
Ronny

Hi Ronny,
thank you for your quick reply. The documentation is fine and PT1M is working fine for me in a non-osgi-environment. Strange thing...
Cheers,
Andy

I suppose it must be the JobExecutor or somethig related to it.
Does the job arrive in the database?

Yes it arrives in the database :)
This is my simple process...

After starting the instance, the  joblist contains the timer in this list...
List joblist = this.processEngine.getManagementService().createJobQuery().list();

Do you use the "basic" OSGi extension or an extended one like Blueprint or OSGiProcessApplication?
And why is your schema.version fox? Shouldn't it be camunda?

We are using Blueprint, but we have extended BL EL resolver with our own one in order to use DMN like this:
public class BlueprintELResolver extends org.camunda.bpm.extension.osgi.blueprint.BlueprintELResolver {

  private static final Logger LOGGER = LoggerFactory.getLogger(BlueprintELResolver.class);
  private Map<String, JavaDelegate> delegateMap = new HashMap<String, JavaDelegate>();
  private Map<String, TaskListener> taskListenerMap = new HashMap<String, TaskListener>();
  private Map<String, ActivityBehavior> activityBehaviourMap = new HashMap<String, ActivityBehavior>();

  @Override
  public Object getValue(ELContext context, Object base, Object property) {
    if (base == null) {
      // according to javadoc, can only be a String
      String key = (String) property;
      for (String name : delegateMap.keySet()) {
        if (name.equalsIgnoreCase(key)) {
          context.setPropertyResolved(true);
          return delegateMap.get(name);
        }
      }
      for (String name : taskListenerMap.keySet()) {
        if (name.equalsIgnoreCase(key)) {
          context.setPropertyResolved(true);
          return taskListenerMap.get(name);
        }
      }
      for (String name : activityBehaviourMap.keySet()) {
        if (name.equalsIgnoreCase(key)) {
          context.setPropertyResolved(true);
          return activityBehaviourMap.get(name);
        }
      }

      VariableContext variableContext = (VariableContext) context.getContext(VariableContext.class);
      if (variableContext != null) {
        if (VAR_CTX_KEY.equals(property)) {
          context.setPropertyResolved(true);
          return variableContext;
        }
        TypedValue typedValue = variableContext.resolve((String) property);
        if (typedValue != null) {
          context.setPropertyResolved(true);
          return unpack(typedValue);
        }
      }

    }

    return null;
  }

  @Override
  public void bindService(JavaDelegate delegate, Map props) {
    String name = (String) props.get("osgi.service.blueprint.compname");
    delegateMap.put(name, delegate);
    LOGGER.info("added Camunda service to delegate cache {}", name);
  }

  @Override
  public void unbindService(JavaDelegate delegate, Map props) {
    String name = (String) props.get("osgi.service.blueprint.compname");
    if (delegateMap.containsKey(name)) {
      delegateMap.remove(name);
    }
    LOGGER.info("removed Camunda service from delegate cache {}", name);
  }

  public void bindTaskListenerService(TaskListener delegate, Map props) {
    String name = (String) props.get("osgi.service.blueprint.compname");
    taskListenerMap.put(name, delegate);
    LOGGER.info("added Camunda service to delegate cache {}", name);
  }

  public void unbindTaskListenerService(TaskListener delegate, Map props) {
    String name = (String) props.get("osgi.service.blueprint.compname");
    if (taskListenerMap.containsKey(name)) {
      taskListenerMap.remove(name);
    }
    LOGGER.info("removed Camunda service from delegate cache {}", name);
  }

  public void bindActivityBehaviourService(ActivityBehavior delegate, Map props) {
    String name = (String) props.get("osgi.service.blueprint.compname");
    activityBehaviourMap.put(name, delegate);
    LOGGER.info("added Camunda service to activity behaviour cache {}", name);
  }

  public void unbindActivityBehaviourService(ActivityBehavior delegate, Map props) {
    String name = (String) props.get("osgi.service.blueprint.compname");
    if (activityBehaviourMap.containsKey(name)) {
      activityBehaviourMap.remove(name);
    }
    LOGGER.info("removed Camunda service from activity behaviour cache {}", name);
  }

  public boolean isReadOnly(ELContext context, Object base, Object property) {
    return true;
  }

  public void setValue(ELContext context, Object base, Object property,
                       Object value) {
  }

  public Class<?> getCommonPropertyType(ELContext context, Object arg) {
    return Object.class;
  }

  public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
                                                           Object arg) {
    return null;
  }

  public Class<?> getType(ELContext context, Object arg1, Object arg2) {
    return Object.class;
  }

  protected Object unpack(TypedValue typedValue) {
    if (typedValue != null) {
      return typedValue.getValue();
    }
    return null;
  }
}

Btw. i have done the same in a Spring-environment, where the timer event is working. Here you can see the object's contents. It looks like the :
Working version in default Spring-environment:
Data on starting instance: Fri Apr 07 14:20:41 CEST 2017
Management-Service-Properties: {next.dbid=1, schema.version=fox, historyLevel=3, deployment.lock=0, schema.history=create(fox)}
Job:TimerEntity[repeat=null, id=9dab9aa7-1b8c-11e7-a0d0-54ab3a0294d6, revision=1, duedate=Fri Apr 07 **14:21:41** CEST 2017,
                lockOwner=null, lockExpirationTime=null, executionId=9dab9aa5-1b8c-11e7-a0d0-54ab3a0294d6, processInstanceId=9dab9aa3-1b8c-11e7-a0d0-54ab3a0294d6,
                isExclusive=true, retries=3, jobHandlerType=timer-intermediate-transition, jobHandlerConfiguration=IntermediateThrowEvent_1n8xc5j,
                exceptionByteArray=null, exceptionByteArrayId=null, exceptionMessage=null, deploymentId=9d9616c1-1b8c-11e7-a0d0-54ab3a0294d6]
Priority 0
Suspendedfalse

Non working versin in OSGI-environment:
Processinstance-Start Datetime: Fri Apr 07 14:37:13 CEST 2017
Management-Service-Properties: {next.dbid=2101, historyLevel=2, schema.version=fox, deployment.lock=0, schema.history=create(fox)}
JOBS:
Job:TimerEntity[repeat=null, id=2021, revision=1, duedate=Fri Apr 07 14:38:13 CEST 2017, lockOwner=null, lockExpirationTime=null, executionId=2019, processInstanceId=2017,
                isExclusive=true, retries=3, jobHandlerType=timer-intermediate-transition, jobHandlerConfiguration=IntermediateThrowEvent_1j9iuag,
                exceptionByteArray=null, exceptionByteArrayId=null, exceptionMessage=null, deploymentId=2013]
Priority 1
Suspendedfalse

I have tested some things out. In a nutshell you can say:

The engine adds the instance-execution of the timer process in ACT_RU_EXECUTION
The engine adds the execution of the timerevent at time t with due date (t+1 minute) with active state true
In spring it is deleting the execution from ACT_RU_EXECUTION, when the due date is reached. In my OSGI-context it never deletes the execution from the table.

So it seems to be, that the engine is never informed about firing the event, when the due date is reached. Also there is no log in ACT_HI_JOB_LOG.

Hi Andy,
I wonder, do you have any idea, why the IDs in your OSGi environment all look like 20xx?
Looking at your output I see ... id=2021 ... executionId=2019, processInstanceId=2017.... This seems way too regular for the usual IDs that are present within camunda.

Hi Ronny,
sorry for the late answer. I don't know why there are processinstance ids like 2xxx, The camunda-scripts are identically. Maybe that has something to do with our internal configuration.
However i could solve the job executor problem. We have used our own JTA-Configuration Factory and the method:
JtaProcessEngineConfiguration conf = new JtaProcessEngineConfiguration();
conf.setJobExecutorActivate(true);
was never called. Now it is working fine. This issue can be closed.

Hi Andy,
glad to hear that you could fix your! Explicitely activating the job executor can be annoying sometimes ;)
Cheers,
Ronny


Fix a typo in "PioPeripheral"

Renames "PioPeripherial" to "PioPeripheral" (without the second i).

bors r+


make pankti detect pure methods

get a set of public and private pure methods in application

Pure methods

are deterministic
do not alter the state of calling objects, passed objects, or global variables
have a body - actually compute something
return a value
can be public or private (and called by a public method)

Consider empty methods and getters?


fix: adapted script path in action

Fixes script path to generator, see https://github.com/jotaen/homebrew-klog/pull/6#issuecomment-1399568366

Whoops, that was my bad… Thanks for verifying again, and sending the fix!


Updated config.expand-env related variable and templating

Resolved #187.
promtail_config_expand_env variable changed from "false" to False to avoid templating issue.
-config.expand-env={{ "true" if promtail_config_expand_env else "false" }} templating has been simplified, now it's -config.expand-env={{ promtail_config_expand_env | lower }}

Thank you for the fix - will be in the upcoming release


When base and quote currency are equal it throw exception

In google provider, when the base and quote currency are equal (EUR/EUR)., it throw ChainProviderException. because google converter didn't handle this case it return Could not convert.
it suppose to return 1 in this case.
http://www.google.com/finance/converter?a=1&from=EUR&to=EUR
it's only work with USD/USD:
http://www.google.com/finance/converter?a=1&from=USD&to=USD

Fixed in https://github.com/florianv/swap/pull/33


removed useless expect.assertions

In a lot of case expect.assertions(1); is no need. It can be confusing.
In fact, we should never use expect.assertions ^^

I think this is intentional, from those same docs:

Make sure to add expect.assertions to verify that a certain number of assertions are called. Otherwise a fulfilled promise would not fail the test

@rickhanlonii exactly ! So why should we use expect.assertions(1); even if we are sure to call expect ?

So I looked a little closer and this change is great - expect.assertions is not needed when using resolves/rejects 👍
To explain a little better and answer your question - when you're using resolves/rejects, we have built in checking for unexpected behavior. So let's say you have this test:
const fetchData = () => Promise.resolve('foo');

test('the fetch fails with an error', () => {
  expect(fetchData()).rejects.toMatch('error');
});

Then we show this error:

So we tell you that you're expecting it to reject, but it resolved.
Where you need the expect.assertions is when you do your own promise handling, as in the other examples:
const fetchData = () => Promise.resolve('foo');

test('the fetch fails with an error', () => {
  expect.assertions(1);
  return fetchData().catch(e => {
    expect(e).toMatch('error')
  });
});

Here without the expect.assertions then the promise will resolve and the expectations in the .then block will not run and the test will pass. Using expect.assertions in this case is basically a replacement for adding a .then block that fails

This needs a changelog entry and it can go

Hey @rickhanlonii , I did rebase on master to resolve the conflict. But it is on my fork. How should I process ? and can I restart continuous-integration/appveyor/pr  ?


newThreadsCount vs old newMessagesCount in Messagable trait

Why did you replace newMessagesCount with newThreadsCount in Messagable trait? So now to count new messages in all threads I need to implement my own method right? how about to have both in the package?

Thanks to this https://github.com/cmgmyr/laravel-messenger/issues/109
I found that the method was working wrong previously. Now we have userUnreadMessages($user_id) or userUnreadMessagesCount($user_id) in Thread Model. But to me it looks more logical to put that into the Messagable trait because to count ALL unread messages for user, not only related to specific thread. It's a common case when you need to display some badge in app navigation with total count of unread messages.

yes, I agree there are a handful of user type methods that would be better suited on the trait. I'll take a look at moving them soon

Submitted a pull request to add this functionality https://github.com/cmgmyr/laravel-messenger/pull/245


Fix for #58, fromPrimitive_TIMESTAMP_MICROS (TypeError when dividing a string by BigInt)

Fix of TypeError: Cannot mix BigInt and other types for fromPrimitive_TIMESTAMP_MICROS
In fromPrimitive_TIMESTAMP_MICROS(value: String): Date, value (string) divided by 1000n (BigInt), which causes TypeError: Cannot mix BigInt and other types in Node v12.19.1

#58


Use rpds::List serde feature instead of using a custom wrapper

Deserialization is slightly space-inefficient since we will have linked
lists instead of vectors; however, it does not matter very much since
this is for log analysis code which can be slow, and it reduces
complexity.
Also fix an issue with pre-commit hook which was not failing when
rustfmt itself fails.

bors r+

bors retry


Contributors

Create automated TY to contributors

@all-contributors please add @inetbiz  for content✏

@all-contributors please add @inetbiz for content

@all-contributors please add @inetbiz for code


python-pyqt5: Disable parallel install

use python3native during build for both py3 and py2 versions as per
http://pyqt.sourceforge.net/Docs/PyQt5/installation.html
Avoid certain race during do_install
|   File
"/mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/python-pyqt5/5.11.3-r0/PyQt5_gpl-5.11.3/mk_distinfo.py",
line 108, in
|     fn_f = open(fn, 'rb')
| FileNotFoundError: [Errno 2] No such file or directory:
'/mnt/a/yoe/build/tmp/work/cortexa7t2hf-neon-vfpv4-yoe-linux-gnueabi/python-pyqt5/5.11.3-r0/image//usr/lib/python2.7/site-packages/PyQt5/QtCore.so'
Signed-off-by: Khem Raj<EMAIL_ADDRESS>

use python3native during build for both py3 and py2 versions as per
http://pyqt.sourceforge.net/Docs/PyQt5/installation.html

I read there:

The configure.py script normally introspects the Python installation of the interpreter running it in order to determine the names of the various files and directories it needs.
You patch changes python interpreter from V2 -> V3 for python-pyqt5

The recipe creates build configuration based on ${PYTHON_BASEVERSION}. You patch changes ${PYTHON_BASEVERSION} from V2 -> V3 for python-pyqt5

In configure.py there are the following fragments:

class HostPythonConfiguration:
    """ A container for the host Python configuration. """

    def __init__(self):
        """ Initialise the configuration. """

        self.platform = sys.platform
        self.version = sys.hexversion >> 8

and
class TargetConfiguration:
    """ A container for configuration information about the target. """

    def __init__(self):
        """ Initialise the configuration with default values. """

        # Values based on the host Python configuration.
        py_config = HostPythonConfiguration()
        self.py_debug = py_config.debug
        self.py_inc_dir = py_config.inc_dir
        self.py_venv_inc_dir = py_config.venv_inc_dir
        self.py_lib_dir = py_config.lib_dir
        self.py_platform = py_config.platform
        self.py_version = py_config.version
        ...

You patch changes python from V2 -> V3 for python-pyqt5

I tested this patch: As I expected python-pyqt5 now builds /usr/lib/python3.5m instead of /usr/lib/python2.7 which is WRONG: Your patch makes python-pyqt5 build same as python3-pyqt5!

What else do I have to do to not be ignored and keep you from breaking recipes without a single word about why this change is necessary? What kind of tests did you perform?

didn't I say I will do a V2 ? so all you need to do is .. wait


Order of module imports causes reference location issues (possible language service caching related)

TypeScript Version:  2.8.0-dev.20180302

Search Terms: module import, modules,
Code
This isn't related to code as such, so I'll do my upmost to describe the problem.
I'm inside a lerna mono repo, with two sub projects, ProjectA and ProjectB.
ProjectA has a dependency on rxjs, as does ProjectB.
ProjectB has a dependency on ProjectA which lerna manages by using symlinks.
The problem is, in ProjectB, I have a file which does the following imports:
import { Something } from 'ProjectA';
import { Subject } from 'rxjs/Subject'
import { Observable } from "rxjs/Observable";

In that file, there is a class which has a private variable which is a Subject, and it exposes it as a Observable. However, Typescript is complaining with the following error:

Type 'Subject<ActionRequestResult<any>>' is not assignable to type 'Observable<ActionRequestResult<any>>'.
Property 'source' is protected but type 'Observable<T>' is not a class derived from 'Observable<T>'.

After investigating, it turns out the two rxjs imports at the top of the file are actually being imported from two different locations. So even though Subject extends Observable, it is not the same Observable that is being imported and referenced in my file.
I managed to resolve the issue by moving the ProjectA import to the end, as such:
import { Subject } from 'rxjs/Subject';
import { Observable } from "rxjs/Observable";
import { Something } from 'ProjectA';

I suspect this is caused by a caching issue in the language service, as when it imports ProjectA, it walks the tree and finds that the class being imported also imports rxjs/Subject, so when I import it as well, it reuses the reference it already has.
Expected behavior:
rxjs is imported from the same location, regardless of what the previous imports have touched.
Actual behavior:
Subject is imported from ProjectA's node_modules, while Observable is imported from ProjectB's node_modules.

are you compiling with --preserveSymlinks?

No I wasn't aware of that compiler flag, I will have to experiment with it when I go to work on Monday though.
I'll report back.


Update to new model for auth user (fixes #502)

This PR is dependent on Core PR - https://github.com/almighty/almighty-core/pull/578

Current coverage is 68.00% (diff: 55.55%)

Merging #518 into master will not change coverage

@@             master       #518   diff @@
==========================================
  Files            27         27
  Lines          1266       1266
  Methods         269        269
  Messages          0          0
  Branches        250        249     -1
==========================================
  Hits            861        861
  Misses          405        405
  Partials          0          0

Powered by Codecov. Last update a0f3fa0...9143cb0


Reinforcement learning

Reinforcement learning would allow the bot to learn while chatting. A large part of the network has to be re-written though, but it would improve it significantly

Requires network rewriting though. All old saves will be invalid, which is why supporting the old system is also a priority. I'll split it up into model classes to make sure both are usable


Changed onCreateView to onCreateViewHolder #11

Renamed ItemTypesAdapter to MultiTypeAdapter
Changed onCreateView to onCreateViewHolder
Changed onBindView to onBindViewHolder
Added register check to avoid insert the same type for pool to fixed #2
Updated version to 1.1-beta3

Thanks for @TellH & @LuckyJayce !


Create CONTRIBUTING.md

Added contributing.md for task-manager repo.

Hi @DhanushNehru

why is this coming?

Click on that  ( question mark ) also verify hacktoberfest rules on what type of contribution is counted @bhavya2021245


Add preset-create-react-app

Resolves https://github.com/storybookjs/storybook/issues/7221
Additional issues resolved:

https://github.com/storybookjs/storybook/issues/4841
https://github.com/storybookjs/storybook/issues/7220

In this PR:

[x] Warn when used with preset-typescript or preset-scss.
[x] Document passing in option scriptsPackageName.

Hello, It is possible to use this version of Storybook though an alpha?

Hi @montogeek, this is compatible with the latest beta of Storybook - but this preset itself hasn't been published.
@shilman, perhaps we could publish a beta so that people can start testing this preset?

@mrmckeb https://www.npmjs.com/package/@storybook/preset-create-react-app
One step ahead of ya...

You always are ^^ 😆


ansible_mitogen: Handle templated ansible_ssh_user.

This PR expands the evaluation of templates in inventory/group variables to include ansible_ssh_user.
Please let me know if it requires any changes.
Fixes: #1116

After reviewing #1145, I decided to prune this PR down to handling the templated username only.

Thank you, I'll review your code shortly.
The single test failure is due to #1058. I'd like to check something works for you,  so I can update the instructions in that issue .

On the checks tab for this PR do you see a "Re-run all jobs" button in the the top right? (Please don't click it yet)
On the actions run 99 page

Do you see a "Re-run jobs" button in the top right?
Can you able to click that button and use "Re-run failed jobs" in the drop down list?

I've recently moved the test runner from Azure to GitHub, and I'm stilling learning the finer details for who has permission to do what.

Hold off on answering the previous questions. Your push at 0803 UTC retriggered the CI. I'll update the questions, based on the outcome.

Before I triggered the next CI run, I went through each of the questions you asked.

On the checks tab for this PR do you see a "Re-run all jobs" button in the the top right? (Please don't click it yet)

There was no "Re-run all jobs" button in the top-right nor anywhere else that I could see.

On the actions run 99 page

Do you see a "Re-run jobs" button in the top right?
Can you able to click that button and use "Re-run failed jobs" in the drop down list?

There is no "Re-run jobs" button in the dropdown. The only available option was "Create status badge".

The change is probably correct, but it needs tests that cover the templating. I'm still trying to find a good structure for these tests.
For now, if you feel confident, please use 551690e#diff-3ec47820fbd7f6bf8db852de80857cdce3f6aec7f76c5a452c93923501dc23ac as a template. Otherwise if you prefer I'll add a commit to this PR containing the new tests

If you already have a test case in mind then feel free to modify this branch as you see fit.
I can try writing some test cases after 2024-10-09 01:00 UTC.

There was no "Re-run all jobs" button in the top-right nor anywhere else that I could see.

At the time you looked were there any failed checks?

There was no "Re-run all jobs" button in the top-right nor anywhere else that I could see.

At the time you looked were there any failed checks?

There were two failed checks: one for an an intermittently failing test and one for the aggregate check.

There were two failed checks

Rats. I'd been hoping that GitHub Actions would be easier re-run for third-party contributers. I'll see if there's a GHA equivalent of "/AzurePipelines run"

There were two failed checks

Rats. I'd been hoping that GitHub Actions would be easier re-run for third-party contributers. I'll see if there's a GHA equivalent of "/AzurePipelines run"

Although it's not precisely the same thing, you may be able to trigger a Github Actions workflow based on a issue_comment event that contains a string like /test, and have the workflow use the Github CLI to re-run failed jobs.


Improve docstring of summarize_clusters_stc

Return value was poorly documented. Hopefully this helps.

Current coverage is 86.85% (diff: 100%)

Merging #3511 into master will not change coverage

@@             master      #3511   diff @@
==========================================
  Files           341        341
  Lines         59704      59704
  Methods           0          0
  Messages          0          0
  Branches       9130       9130
==========================================
  Hits          51858      51858
- Misses         5107       5111     +4
+ Partials       2739       2735     -4

Powered by Codecov. Last update 9ed6a7e...0852fe3

Thanks


nixos/userborn: fix username typo

Things done
i think this is a typo... apologies if i have misunderstood!

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

[ ] Fits CONTRIBUTING.md.

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

Redirect this to Master branch.

yeah, oops... made commit from web ui and didn't notice the branch 😅
will wait to hear back from @nikstur first

Isn't the username taken ATM from the attr maps key? See line 99.
If you want to take the name attribute inside the users attr. It's called "name".
"Name" is predefined with the attra key, when undefined.
So that should fix a thing if someone is doing the following
users.users.foo = {
         name = "bar";
        ....
};

Which does not make a lot sense (to me) but would be possible according docs ( https://github.com/NixOS/nixpkgs/blob/bc947f541ae55e999ffdb4013441347d83b00feb/nixos/modules/config/users-groups.nix#L91 )

So  as far as I can see that should fix a thing if someone is doing like
users.users.foo = {
   name = "bar";
   ....
 };

Atm it should create a folder called "foo" for a user named "bar", which might be not the desired result.
To I find the scenario of that mixing quite strange.

yes, this is a pattern in nixos, you understand correctly

Thanks! Yeah I think what you're doing is correct. Please re-direct to master and we can merge.

thanks for confirming @nikstur!
and i will mention i started using this on a little side project i am working on for fun... it is awesome! every bit as fantastic as i hoped it would be when you announced it
keep up the great work you have been doing ❤


[WIP] Implement approximate mode

[WIP]
Comprehensive implementation of approximate mode. Modifies the C++ and Python sides to match. Adds parameters to existing tests, but does not add any new tests.
Note that 2 tests are still failing:

TestVideoDecoder::test_dimension_order[approximate-cpu-NCHW]: Failing on the contiguous memory check. This is because in VideoDecoder::getFramesPlayedByTimestampInRange() we're creating a vector of tensors, and then stacking them. We do this because we don't know the total number of frames we're going to decode up front. Maybe we can relax this requirement?
TestVideoDecoder::test_get_frames_by_pts_in_range[approximate]: For all stream indices tested, getting the error The values for attribute 'shape' do not match: torch.Size([6, 3, 180, 320]) != torch.Size([5, 3, 180, 320]). This is also due to the same logic in VideoDecoder::getFramesPlayedByTimestampInRange(). Here it's probably just plain wrong and it needs some real debugging.

I know that doing all of the changes in one go - C++, core ops, Python public interface - is a bear to review. But I wanted to quickly get to a state where we could compare performance.

Initial performance numbers are encouraging. I generated a video with the following command:
ffmpeg -y -f lavfi -i mandelbrot=s=1920x1080 -t 120 -c:v h264 -r 60 -g 600 -pix_fmt yuv420p mandelbrot_1920x1080_120s.mp4

That produced a 141 MB video file. I then ran our standard benchmark with:
python benchmarks/decoders/benchmark_decoders.py --decoders torchcodec_public_nonbatch:seek_mode=exact,torchcodec_public_nonbatch:seek_mode=approximate --min-run-seconds 40 --video-paths mandelbrot_1920x1080_120s.mp4

And that yields:
[-------------------------------------------------- video=mandelbrot_1920x1080_120s.mp4 h264 1920x1080, 120.0s 60.0fps -------------------------------------------------]
                                                      |  decode 10 uniform frames  |  decode 10 random frames  |  first 1 frames  |  first 10 frames  |  first 100 frames
1 threads: --------------------------------------------------------------------------------------------------------------------------------------------------------------
      TorchCodecPublicNonBatch:seek_mode=approximate  |           1580.4           |           1989.0          |       26.4       |        41.1       |       170.4
      TorchCodecPublicNonBatch:seek_mode=exact        |           1626.2           |           2013.3          |       79.4       |        92.0       |       212.9

Times are in milliseconds (ms).

The sampling-style benchmarks are not great - approximate mode is better, but not by much. But we see significant improvement when decoding from the beginning. On the sampling-style benchmarks, we may be seeing the cost of cloning and re-stacking. We can probably be more clever about that.


Banned, Not In Corp Pilot on Mapper

We have a banned (in pathfinder), not in corp pilot who continues to appear on our mapper. This pilot has been out of corp for +7 days.

@eophten Thanks for your issue:

What means "in pathfinder"? is he visual on the map, moving around? Just visible in some tables e.g. "scan statistics"? Still visible inside the /admin page?

More information:
This pilot is no longer in corp. We have banned him through the pathfinder /admin interface. He still displays as in corp within the pathfinder /admin page.  He is visible on the map (always in Jita), although we do not see him moving around. His character triggers a connection from home hole to Jita periodically if we delete Jita from the mapper. Last login in /admin reflects when we removed him from corp.
Our current work around is to leave Jita on the mapper but detached from the chain and his character remains in that system.

Ok thanks. One more question:

I guess this happens on the official server right? - could you please tell me the Character´s name (pathfinder@exodus4d.de), this would help me to figure out what happens by checking log files.

In the meantime I´ll try to reproduce this on my local dev-server...
For now, don´t worry! The lastLogin timestamp, shown at the /admin page is not the inGame login timestamp. It represents the last login on Pathfinder.
If a character was banned, it should be kicked out of PF immediately (if he is currently logged in) and should not be able to Log into until:

He changed his Corp and the new Corp is not blacklisted by the Server.
Someone revokes the kick/ban on the /admin page
He "sold" his Character, CCP transfers the Character to a new Owner and then tries to log into PF again (very unlikely!). But This is needed for e.g. a public installation like mine.

But all of this does not explain the auto-generated Jita connection.
If this happens on a private server:

Which PF version is installed?
Please double check if your Cronjob is configured right and running (check PHP error logs, and PFs Chronjob log file for last execution /logs/cron.log).

@exodus4d this is on a private server running pathfinder v1.5.3, ubuntu 18.04 (ec2), amazon rds mysql 8.0.16
I can provide log files, db access, or pathfinder access if required.
We have setup the server with pathfinder.login limited based on corporation ID and that confirms how I expected the lastLogin to work (so I have no security concerns).
* * * * *  cd /opt/www/pathfinder/; sudo -u www-data php index.php /cron >> /var/log/cron-www/pathfinder.log 2>&1
pathfinder.log has not been written to recently (there were some errors during initial setup). Executing the cronjob command runs/exits without error (although there is no output indicating success). Is there a database value that I can query for last success? Is it possible to add output (timestamp, debugging output, etc.) and I can handle setting up log rotation?

Thanks. Your Cronjob setup looks right!
I guess your problem relates to #830 which will be fixed in the next version.
You should manually replace one line of code, wait 5min (for the next cronjob trigger) and see if the character disappear from map: https://github.com/exodus4d/pathfinder/commit/e32bc214450b20a4e3c58a87764263b300d3bc01
Explanation:
All PHP files in  app/main/cron/ contain standalone cronjob methods that will be triggered by the main cronjob at its time.
All of them are configured in cron.ini (and should not be changed!).
In your case deleteLogData() should be triggered @instant (= * * * * * == every minute)
https://github.com/exodus4d/pathfinder/blob/7d118518af40837dab0004d4fe1dddb3d248d771/app/cron.ini#L33
For testing (or development), you can run each of these manually vom CLI (Terminal). The command for manually execution of a single Cronjob method is always mentioned in the code documentation above. check: characterupdate.php#L39
php index.php "/cron/deleteLogData"

Simple, cd to the Pathfinders [root] dir (where index.php is located), and run this command.
In your case Unix users www-data or root should be used for that.
Any debug output you have added should be visible in your Terminal.
Log rotation
There is a core log file updated every time a cronjob was executed: logs/cron.log.
In addition there are multiple logs/cron_*.log files written by some cronjob methods, too. (In your case deleteLogData() does not have its own cron_deleteLogData.log file! - because it runs to frequently - every minute).
Adding Logrotate to them is highly recommended.

#830 definitely seems related, we were also experiencing that bug. I have pulled in the changes to that file and it appears to have resolved our issue. Thanks so much for your help!


Swift 5.0 support

please!

Done and available via version 2.3.13 😉

dont work :( last xcode and swift and yout pod, with old xcode and swift work fine

What was the requirement for Swift 5.0? Is there a need for projects/apps which only use Swift 5.0?

What was the requirement for Swift 5.0? Is there a need for projects/apps which only use Swift 5.0?

on my project donr work :( before xcode update on 10.2 all worked fine

Any chance to get some details on what happened?

Any chance to get some details on what happened?

at night, my xcode was updated, after building a project with a new version, your library does not work, that is, the menu does not fall out, and if you build an old xcode, it works

Hello, @hell4opt  same the issue with me.

:0: error: unable to load standard library for target 'arm64-apple-ios9.0'

Hello, @hell4opt  I also facing the same issue.
:0: error: unable to load standard library for target 'arm64-apple-ios9.0'


When operating on a list, switching to a new item loses any changes to current textbox

I have a list of people (name, age) and two data input textboxes, if I exit the textboxes in any fashion except by  clicking on a person, the change takes effect.  If I click on a person, any change to the current textbox is lost.
The culprit is clearly using RaisePropertyChanged when the selected Index changes which updates the textboxes -- unexpectedly BEFORE the textbox's property change fires
int _SelectedIndex = 0;
public int SelectedIndex
{
get { return _SelectedIndex; }
set { if (Set(ref _SelectedIndex, value))
{ RaisePropertyChanged(nameof(SelectedPerson)); }
}
}
I would have expected OnEnter property changes to be handled AFTER OnExit property changes.
Below is the XAML . . . .
    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
        RelativePanel.AlignLeftWithPanel="True" RelativePanel.Below="pageHeader" >
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="0" Orientation="Vertical">
            <ListView  x:Name="MainList" ItemsSource="{x:Bind People.List, Mode=OneWay}"
        SelectedIndex="{x:Bind People.SelectedIndex, Mode=TwoWay}" MinWidth="250" Margin="5">
                <ListView.ItemTemplate>
                    <DataTemplate x:DataType="vm:PersonViewModel" >
                        <TextBlock Text="{x:Bind Name, Mode=OneWay}" />
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
            <Button Content="Add" Click="{x:Bind People.Add}" Margin="5"/>
        </StackPanel>
        <StackPanel Grid.Column="2" Orientation="Vertical">
            <TextBox Text="{x:Bind People.SelectedPerson.Name, Mode=TwoWay, FallbackValue=''}" Margin="5" />
            <TextBox Text="{x:Bind People.SelectedPerson.Age, Mode=TwoWay, FallbackValue='0'}" Margin="5" />
            <Button Content="Delete" Click="{x:Bind People.Delete}" Margin="5" />
        </StackPanel>
    </Grid>

Thanks!

What a bizarre timing issue. Do you have any suggestions?

I solved it by using a CollectionViewSource to synch the Master List and the Details instead of effectively rolling my own by using SelectedIndex (using SelectedIndex was a bad idea not that I know about CollectionViewSources -- even if they are castrated versions of their WPF parents.  :-)
Thanks for replying!


Libyang errors when connecting to Opendaylight MDSAL Netconf

I am trying to connect to the Opendaylight MDSAL Netconf server through netopeer2-cli. I am able to connect, but see many errors related to libyang:
> connect --ssh --login admin --port 2830
The authenticity of the host 'localhost' cannot be established.
ssh-rsa key fingerprint is ee:ee:a3:97:e3:76:44:17:09:00:c4:55:67:f6:f3:28:d1:b1:7c:1e.
Are you sure you want to continue connecting (yes/no)? yes
Password authentication

Password:
ly WARNING: Missing status in deprecated subtree (/opendaylight-queue-types:{grouping}[queue-prop-min-rate]/common-queue), inheriting.
ly WARNING: Missing status in deprecated subtree (/opendaylight-queue-types:{grouping}[queue-prop-min-rate]/rate), inheriting.
_truncated_
ly ERROR: Missing keyword "key" as a child to "list". (/network-topology:network-topology/topology/node/opendaylight-topology-view:original-node)
ly WARNING: Missing status in deprecated subtree (/opendaylight-inventory:{grouping}[node]/id), inheriting.
ly WARNING: Missing status in deprecated subtree (/opendaylight-inventory:{grouping}[node]/node-connector), inheriting.
_truncated_
ly ERROR: Module "opendaylight-meter-types" parsing failed.
ly ERROR: Importing "opendaylight-meter-types" module into "opendaylight-flow-types" failed.
ly ERROR: Importing "opendaylight-port-types" module into "flow-node-inventory" failed.
ly ERROR: Missing keyword "key" as a child to "list". (/openflow-instruction:instruction-container/instruction-choice/write-actions-case/write-actions/action)
ly ERROR: Module "openflow-instruction" parsing failed.
_truncated_
ly ERROR: Importing "opendaylight-flow-types" module into "opendaylight-table-types" failed.
ly ERROR: Module "opendaylight-table-types" parsing failed.
ly ERROR: Importing "opendaylight-table-types" module into "sal-table" failed.
>
>
> get-config --source=running
DATA
<upgrade-config xmlns="urn:opendaylight:serviceutils:upgrade">
  <upgradeInProgress>false</upgradeInProgress>
</upgrade-config>

I'm not sure if this issue is related to Opendaylight or if it has to do with libyang or netopeer2, etc. I thought I would ask here and see what you think. For the record, when I connect via regular SSH, I don't see these errors (though regular SSH boots me off after 20 secons)
$ ssh -p 2830 admin@localhost -s netconf
Password authentication
Password:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:xml:ns:yang:ietf-netconf-with-defaults?module=ietf-netconf-with-defaults&revision=2011-06-01</capability>
<capability>urn:opendaylight:openflowplugin:extension:general?module=openflowplugin-extension-general&revision=2014-07-14</capability>
_truncated_
<capability>urn:opendaylight:l2:types?module=opendaylight-l2-types&revision=2013-08-27</capability>
</capabilities>
<session-id>2</session-id>
</hello>
]]>]]>

I truncated much of this, so if you are interested, I can get more full logs, but I think this tells the story.
Does anyone have experience running SSH into OpenDaylight's Netconf server?

libnetconf2 v1.1.26
libyang v1.0.184
netopeer2 v1.1.39
sysrepo v1.4.70
ODL v0.11.0 (Sodium)

Hi,
the first error
ly ERROR: Missing keyword "key" as a child to "list". (/network-topology:network-topology/topology/node/opendaylight-topology-view:original-node)

is valid, I have just checked, the YANG module is incorrect. The rest of the errors may just be the consequences of this one.

I confirmed there is an error related to the list/key of the ODL yang models. Hopefully ODL fixes them or something corrects this, for now I had to add key's.


Store preferred language for resources (closes #93)

Replaces/continues #94, closes #93 -- moved modifications to that PR into here so it could be a branch I have access to.
@Treggats, I started work on revising your PR. I paused when I saw that you were storing the user preference as an int; I'd rather we store them as strings. I'm going to pause for now, but next steps as I see it:

[ ] Change user preferences to be stored as strings
[x] Move preferences to be a JSON column on the user. Consider something like https://github.com/Grimthorr/laravel-user-settings (but maybe it's better to just write it ourselves?)
[ ] Matt review the preferences page
[ ] Add the preferences back to the module page, as per my original mockups, and build them in Vue
[ ] Add tests around PreferenceController

Hitting pause for the night, but just in case anyone else takes a look, I moved preferences to be a JSON column on the user, and added a convenience method on the user named preferences().
It functions like the global config() helper; pass it a key and you get that key. Pass it a key and a value, you get that key and if it's not set you get the value. Pass it an associative array and it saves the contents of that array.
However, there's one big difference; it has defaults pre-set for each key, and you can only set keys that are in the pre-set list of preferences. So as we add a preference, we'll add its key, it's possible options, and its default into that list.

I would also suggest to try to keep the pr a little bit smaller so it is more easy to go through the changes that were made.

Yep.

Allowing a few todo's in  because they relate to work addressed in #115


Index property within Layer declaration gets ignored

This one still applies

Framer bug :-)

Fixed: https://github.com/koenbok/Framer/commit/efc5aa4810a605f1f9aec43161cce403b3ddd4f4


introduce consistency on folder naming from SourceRoot and UnitTest directory

Currently we name source root for the Objectscript source code without "/"
E.g.
src
But the directory for unit-tests should be indicated with "/", .e.g.

Could we support both "/tests" and "tests" notation for folder naming for unittests?

From a resource naming perspective, there's a lot of meaning (and dependencies in code) where a name starting with "/" indicates something on the filesystem and a name that doesn't indicates something in the database (e.g., a class/package/routine/%Studio.AbstractDocument). I believe this distinction is important and worth maintaining. SourcesRoot is a different context so the inconsistency does not bother me too much.

@isc-tleavitt  - I think this needs more consistency.  Technically unittests and code resources are the same classes and packages. But the way we ask developers to describe unittests resources is just different. E.g. see the following module XML:
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
  <Document name="csvgen.ZPM">
    <Module>
      <Name>csvgen</Name>
      <Version>1.5.1</Version>
      <Description>Module to generate import and export csv data using InterSystems ObjectScript</Description>
      <Packaging>module</Packaging>
      <SourcesRoot>src</SourcesRoot>
      <Resource Name="community.PKG"/>
      <UnitTest Name="/tests" Package="community.csvgen.UnitTests" Phase="test"/>
    </Module>

  </Document>
</Export>

For the source code we have SourcesRoot path where we can expect resources:
src
and then Resource tag with Name element for the package:

For the unit tests the path starts with "/" which is different to SourceRoot notation where leading "/" is not needed.
I'd suggest we introduce  tag to point to the folder with unit tests source code, e.g.:
<UnitTestsRoot>tests</UnitTestsRoot>

And  tag to list unittest code resources. E.g in this case:
<TestResource> Name="community.csvgen.UnitTests" </TestResource>

So the final module.xml will be in this case:
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="25">
  <Document name="csvgen.ZPM">
    <Module>
      <Name>csvgen</Name>
      <Version>1.5.1</Version>
      <Description>Module to generate import and export csv data using InterSystems ObjectScript</Description>
      <Packaging>module</Packaging>
      <SourcesRoot>src</SourcesRoot>
      <Resource Name="community.PKG"/>
      <UnitTestsRoot>tests</UnitTestsRoot>
      <TestResource Name="community.csvgen.UnitTests" Phase="test"/>
    </Module>

  </Document>
</Export>

@evshvarov that's fair - reopening.


mkimage-arch: get root shell first

Signed-off-by: Jun-Ru Chang<EMAIL_ADDRESS>

ping @tianon, Can you please take a look at this now?

This still fails in the case of being the root user already but not having sudo installed.  Is sudo part of the base set in Arch?  I know in both Debian and Gentoo it's an optional addition.
I still think this whole thing could be replaced by the simple four-liner:
if [ $EUID -ne 0 ]; then
    # if there is no sudo, this will error with a nice message like "sudo: command not found"
    exec sudo "$BASH_SOURCE" "$@"
fi

Especially since Bash itself will give us an error message if "sudo" is missing, which should signal to any astute user that they ought to install it (but they'll likely already have it, I'd imagine).

If the current user is root, I think that it is not important whether sudo has been installed or not. It will skip exec sudo $0 to keep on executing, because EUID is 0.
hash sudo &>/dev/null || {
        echo "Could not find sudo. Run pacman -S sudo"
        exit 1
}

[ $EUID -eq 0 ] || exec sudo $0

If the user is the normal user, exec sudo $0 will be ran, and sudo will be checked. If sudo can not be found in the system, the error message will be shown and exit.

It's the "hash sudo" part above that which will fail if the user is root
and doesn't have sudo installed.

That's right. It's my fault. I will push the new commit based on your suggestion. Thanks for your review.


The metedata.py should not depend on NM.Client.

Currently, the generate_ifaces_metadata() need an instance of NM.Client to get the current interface holding DNS configuration.
To fix this, need libnmstate.show() to provide metadata somehow.

PR #1035 is fixing this by providing desire DNS config to plugin and plugin will handle the use case of:

DNS config not changed and interface still up to hod DNS configure. Should preserve old DNS config.
DNS config changed, old interface which holding current DNS config should be marked as changed.


Use programmatic API

Use the programmatic API as said in https://github.com/sindresorhus/ava/issues/345.

@sindresorhus do you have checked this ?

Sorry about the delay @bored @paulohp. I'm just not happy about how much boilerplate is required to use the AVA API. Feels like we have to reimplement almost the whole AVA cli.js.
@vdemedes I think we either need to improve the API or expose some kind of CliApi, of which is what's in this PR. // @jamestalmage @novemberborn

I think I have a start on the CLIApi. I was working on extracting the config - and it kinda turned into that.

@jamestalmage and/or @sindresorhus after looking through gulp-ava and ava repos, it looks like this is still an outstanding issue.
An inability to dynamically generate and pass config into gulp-ava is likely to block the adoption of ava for a current work project, despite my desire to harness the framework.  Is there a clear direction on programmatic API in gulp-ava planned at this time?

I've opened https://github.com/avajs/ava/issues/1043 to discuss the necessary API work in AVA itself.

Closing this for now. We can reopen when the AVA API is stable.


cibuildwheel GitHub Action creates a lot of spurious notifications

This is for regular opening of a PR, and I think it also happens when adding a label to a PR for example:

The trigger conditions are unusual:
on:
  schedule:
  #        ┌───────────── minute (0 - 59)
  #        │  ┌───────────── hour (0 - 23)
  #        │  │ ┌───────────── day of the month (1 - 31)
  #        │  │ │ ┌───────────── month (1 - 12 or JAN-DEC)
  #        │  │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
  #        │  │ │ │ │
  - cron: "9  9 * * 6"
  # push:
  pull_request:
      types: [labeled, opened, synchronize, reopened]
  workflow_dispatch:

It may be those conditions, or it may be the needs: get_commit_message condition of build_wheels, which is also unique.
Cc @andyfaff, @lithomas1 in case one of you has already looked at this. scikit-learn has an alternative method: https://github.com/scikit-learn/scikit-learn/blob/main/.github/workflows/wheels.yml#L37. @thomasjpfan are you happy with how that functions?

It's not clear to me what you mean by spurious notifications. Are you getting sent emails  that the run is being skipped?
We don't necessarily need labelled. Numpy uses that when they add specific labels to a PR.
The other conditions are a subset of all the other pull_request possibilities for triggering a run (probably the only ones we need).

Yes, I get emails with those notifications. I think others will too, when they open or merge a PR.

Ok, I've not seen any of those notifications. I guess they'd be very annoying if you got enough of them. I don't know why they get issued or whether you can stop them. I wonder why numpy doesn't experience the same issue.
I guess the sklearn approach is just as good an alternative.
The conditions we want the wheels to be built are:

if a commit message contains [wheel build]
once a week (scheduled)
if there is a release tag
if it gets manually started (workflow dispatch)

I think the push on line 20 needs to be uncommented.

You might be getting notified because you merged the PR that contained the workflow.

It could be that since its a two stage pipeline, and the get-commit-message part always runs, but you still get notified when the wheel builders part get skipped, since part of it ran. (see for example, https://github.com/scipy/scipy/actions/runs/2999316305)

@thomasjpfan are you happy with how that functions?

I am happy with it, but I have all GitHub notifications turned off for Actions.
scikit-learn has the same type of pipeline where the first step always runs. Based on the pull_request event docs, the only difference between SciPy and scikit-learn in terms of the pull_request event is the "labeled" trigger.
@rgommers Do you also get notified for skipped workflows from your fork such as the Build GitHub Docker image workflow?

I forgot, I do get notifications for PRs made against my fork, but not against the main repo

@rgommers Do you also get notified for skipped workflows from your fork such as the Build GitHub Docker image workflow?

No, pretty sure I don't. It's just this action.

I forgot, I do get notifications for PRs made against my fork, but not against the main repo

So it's either a "it's a PR you merged" thing or a permissions/owner thing.
Thanks for the feedback everyone, I'll try to figure it out through some changes to wheels.yml. And if I'm the only one who sees this then I may deal with it with an email filter.


Hi Youtube embed doesn't work

Hello,
I tried the demo. It doesn't work for me.
Unknown file extension ".astro" for<EMAIL_ADDRESS>I get this error initially.
Hint:
You likely need to add this package to vite.ssr.noExternal in your astro config file.
Stacktrace:
I added the needed changes.
The Youtube and Tweet don't render in md files. It doesn't work.
thanks,
Hany

Thanks for the report!
Seems to be due to a change in how packages like this are handled. Tracking the bug here: https://github.com/withastro/astro/issues/4071

So does this plugin not work at all now? 😢

This issue should be fixed in the next Astro release!
Once https://github.com/withastro/astro/pull/4623 is merged, astro-embed will be handled correctly.

Hi @delucis, the 'astro-embed/integration' method still doesn't work, however I was able to use a different method, via a remark plugin, to get things working as described here in case it's helpful to anyone else:
https://github.com/withastro/astro/issues/4071#issuecomment-1238541788

Thanks again for the bug report @hanymorcos — this should be fixed in astro 1.1.6, which just went out.
@taoeffect That integration was designed for a previous version of Astro that supported components inside .md files. That support was dropped in Astro v1 unfortunately so we may need to look at an alternative route. Happy to see a new issue to discuss what we should do and if an integration still makes sense.

@delucis Done! https://github.com/astro-community/astro-embed/issues/17


Correction for raw affiliation INRA, UMR1347 Agroécologie Dijon, France.

Correction needed for raw affiliation INRA, UMR1347 Agroécologie Dijon, France.
raw_affiliation_name: INRA, UMR1347 Agroécologie Dijon, France.
new_rors: 05y503v71;00mkad321
previous_rors: 05y503v71
works_examples: W2017755248;W2068313421;W1578847722
contact: 8001b21cd32d71c5c644c09c46eef1f8:de3aace039892c727d9ff35b @ institut-agro.fr

This issue was accepted and ingested by the OpenAlex team on 2024-12-19. The new affiliations should be visible within the next 7 days.


Cannot find RoutesBuilderLoader in classpath for native application

Bug description
Issue
When attempting to load routes from YAML content using a fresh CamelContext in native execution, the application cannot locate an appropriate RoutesBuilderLoader in the classpath that supports the file extension .yaml (camel-quarkus-yaml-dsl dependency included).
Expected Behavior
The expected behavior is to successfully load routes using the fresh CamelContext without errors.
Actual Behavior
Instead, the method call throws an exception when trying to load routes for the given YAML content.
How to Reproduce
A minimal reproducer is set up at:
GitHub - fvcortes/camel-context-main
JVM Executable
Build:
mvn clean package

Run:
java -jar target/quarkus-app/quarkus-run.jar LSBmcm9tOgogICAgdXJpOiAiZGlyZWN0Om15LXJvdXRlIgogICAgc3RlcHM6CiAgICAgIC0gbG9nOgogICAgICAgICAgbWVzc2FnZTogIkxvZ2dpbmcgZnJvbSBteS1yb3V0ZS4uLiI=

Output:
2024-04-28 10:55:20,416 INFO  [io.quarkus] (main) camel-quarkus-context-main 1.0.0 on JVM (powered by Quarkus 3.9.1) started in 0.540s.
2024-04-28 10:55:20,419 INFO  [io.quarkus] (main) Profile prod activated.
2024-04-28 10:55:20,419 INFO  [io.quarkus] (main) Installed features: [camel-core, camel-yaml-dsl, cdi]
2024-04-28 10:55:20,496 INFO  [org.acm.mai.Main] (main) Routes loaded successfully.
2024-04-28 10:55:20,498 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.4.1 (camel-2) is shutting down (timeout:45s)
2024-04-28 10:55:20,502 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Routes stopped (stopped:0)
2024-04-28 10:55:20,511 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.4.1 (camel-2) shutdown in 14ms (uptime:)

Native Executable
Build:
mvn clean package -Pnative

Run:
./target/*-runner LSBmcm9tOgogICAgdXJpOiAiZGlyZWN0Om15LXJvdXRlIgogICAgc3RlcHM6CiAgICAgIC0gbG9nOgogICAgICAgICAgbWVzc2FnZTogIkxvZ2dpbmcgZnJvbSBteS1yb3V0ZS4uLiI=

Output:
2024-04-28 10:58:46,556 INFO  [io.quarkus] (main) camel-quarkus-context-main 1.0.0 native (powered by Quarkus 3.9.1) started in 0.006s.
2024-04-28 10:58:46,556 INFO  [io.quarkus] (main) Profile prod activated.
2024-04-28 10:58:46,556 INFO  [io.quarkus] (main) Installed features: [camel-core, camel-yaml-dsl, cdi]
2024-04-28 10:58:46,559 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.4.1 (camel-2) is shutting down (timeout:45s)
2024-04-28 10:58:46,559 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Routes stopped (stopped:0)
2024-04-28 10:58:46,560 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.4.1 (camel-2) shutdown in 0ms (uptime:)
2024-04-28 10:58:46,560 ERROR [io.qua.run.Application] (main) Failed to start application (with profile [prod]): java.lang.IllegalArgumentException: Cannot find RoutesBuilderLoader in classpath supporting file extension: yaml
        at org.apache.camel.impl.engine.DefaultRoutesLoader.resolveRoutesBuilderLoader(DefaultRoutesLoader.java:298)
        at org.apache.camel.impl.engine.DefaultRoutesLoader.findRoutesBuilders(DefaultRoutesLoader.java:124)
        at org.apache.camel.impl.engine.DefaultRoutesLoader.findRoutesBuilders(DefaultRoutesLoader.java:101)
        at org.apache.camel.spi.RoutesLoader.findRoutesBuilders(RoutesLoader.java:133)
        at org.apache.camel.spi.RoutesLoader.loadRoutes(RoutesLoader.java:85)
        at org.acme.main.Main.load(Main.java:58)
        at org.acme.main.Main.run(Main.java:50)
        at org.acme.main.Main_ClientProxy.run(Unknown Source)
        at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:132)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
        at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
        at org.acme.main.Main.main(Main.java:38)

2024-04-28 10:58:46,560 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.4.1 (camel-1) is shutting down (timeout:45s)
2024-04-28 10:58:46,560 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Routes stopped (stopped:0)
2024-04-28 10:58:46,560 INFO  [org.apa.cam.imp.eng.AbstractCamelContext] (main) Apache Camel 4.4.1 (camel-1) shutdown in 0ms (uptime:)
2024-04-28 10:58:46,561 INFO  [io.quarkus] (main) camel-quarkus-context-main stopped in 0.000s

Alternative Solution
For this specific task of dynamically loading routes, I've set up a branch in the reproducer that utilizes the CamelRuntime retrieved from Quarkus ARC. This provides a CamelContext that successfully loads routes in native mode:
GitHub Branch - arc-camel-context-main
This issue may not necessarily be a bug, but rather unexpected behavior from which I was expecting more clarity.
Exception stack-trace suggest that the routes loader for the yaml extension has not been found in camel registry when calling the method org.apache.camel.impl.engine.DefaultRoutesLoader.getRoutesLoader()
I might be missing something about Camel context initialization in a Camel-Quarkus environment and would appreciate enlightenment on this topic.
Thank you in advance for your help.

Without additional configuration new DefaultCamelContext() is pretty much guranteed to fail in native mode.
There shouldn't really be any need to instantiate own CamelContext. One is already created for you at build time and you can customize it with configuration properties, CDI beans, observers etc.
You can also @Inject an instance of it into your Main class.

Thanks for your answer @jamesnetherton and I appreciate your tip on using the injectable bean CamelContext.
I understand that instantiating a camel context manually with no configuration is not adequate for native execution, hence this is not a legitimate bug request.
In this particular scenario, I would also like to make use of the initialization capabilities of the init() method, provided by the AbstractCamelContext implementation but the CamelContext injectable bean doesn't seem to provide one since the everything is already set up at this point.
Do you have any suggestions?


41 ability to pass custom component in link component

@all-contributors please add @shettyMegh9  for code, bug


Continuously send message triggered from server

How can I send continuous status as message for example
$topic->broadcast(['msg' => '10% complete']);
sleep(20); //or some bulk process
$topic->broadcast(['msg' => '30% complete']);
now all the messages are dumped once the process completed, I cannot partially flush messages,
Please help ...!!!

In RPC also we can send one return, here is it possible to return multiple messages.

Using Pusher, Ya I got it..


Add a soft redirect to README

According to #3 this project is abandoned. For some reason it is much easier to search and find this version, and not the maintained version at https://github.com/PawelAdamski/HttpClientMock

NVM the other one is for the Apache HTTP client, not for the native Java 11 client


Product page: images disappear too early when scrolling the screen

What

Product page: images disappear too early when scrolling the screen

https://user-images.githubusercontent.com/39344769/153712299-5fca99fc-ea8d-47e0-a2a4-c244c14a80d8.mp4

@M123-dev You mean something like a SliverAppBar?

No, when you look closely at the images, they dissapear before they completely left the screen

OK, I see. We can survive with that bug.

We survived it. Closing


AccessViolationException when working with Index8 png

Recently I updated SkiaSharp to v1.60.0 from v1.59.3 and now it fails with AccessViolationException. Platform - Windows 10, the code is quite standard, it should resize the image
using (var input = File.OpenRead(sourcePath))
{
    using (var inputStream = new SKManagedStream(input))
    {
        using (var original = SKBitmap.Decode(inputStream))
        {
            if (original.ColorType != SKImageInfo.PlatformColorType)
            {
                original.CopyTo(original, SKImageInfo.PlatformColorType); // <-- Exception happens here
            }

            using (var resized = original.Resize(new SKImageInfo(size.Width, size.Height), resizeMethod))
            {
                using (var image = SKImage.FromBitmap(resized))
                {
                    using (var output = File.OpenWrite(targetPath))
                    {
                        image.Encode(SKEncodedImageFormat.Png, 100)
                            .SaveTo(output);
                    }
                }
            }
        }
    }
}

Any ideas why and how this can be fixed?

Thanks for reporting this. I found the bug and fixed it. It should be available in the next (v1.60.1) release.