Multiple AzureOpenAIGenerator serialization issues

When attempting to deploy a pipeline created with AzureOpenAIGenerator to Hayhooks with hayhooks deploy my_pipeline.yaml, I encountered the following issues:

Unexpected Parameters: Hayhooks did not seem to expect default_headers and generation_kwargs. I removed them from the YAML configuration, and it got better (into the following errors), but I’m unsure why these were problematic.

Pydantic type handling: I encountered type handling issues in Pydantic, specifically with types like Optional[Callable[[StreamingChunk], NoneType]].

Pipeline parameters mismatch: The deployed pipeline required additional parameters beyond those expected in pipe.run(). At this point the pipeline returned the desired results, but I had to pass empty parameters to make it work

500 Internal Server Error: After resolving issues 2 and 3, I encountered a new error but only when trying to access the /docs page. The logs show the following:

hayhooks-1 | INFO: <IP_ADDRESS>:45200 - "GET /openapi.json HTTP/1.1" 500 Internal Server Error hayhooks-1 | ERROR: Exception in ASGI application

The error seems to originate from Pydantic: pydantic.errors.PydanticInvalidForJsonSchema: Cannot generate a JsonSchema for core_schema.CallableSchema
For reference, the pipeline consisted of a single PromptBuilder and a generator:
AzureOpenAIGenerator(
 azure_deployment=os.environ['AZURE_OPENAI_MODEL_DEPLOYMENT_NAME']
)

I have fixes for issues 2 and 3, but they may not be useful as issue 4 persists.
Deployment: Docker with image deepset/hayhooks:main
Python Version: 3.12

Hello @alex-stoica , @mpangrazzi worked on this issue and we tested and merged https://github.com/deepset-ai/hayhooks/pull/41
In case it still doesn't work for you, feel free to reopen this issue.


typo fixed: frecency -> frequency

That's just by design :smile:

i should've googled it first. sorry :disappointed:


Support plugin "Reminder"

Please add support for the "Reminder" plugin. From what I noticed, the defer notification button is slightly shifted. The screenshot is attached below. Thanks.

Plugin link:
https://github.com/uphy/obsidian-reminder

Added in 5.2.7


data: project addition by jfmartinz

Add a new project to the list
I'm in GSSOC'23. I want to add a new project to the list which is Etch a Sketch. I'd be happy to add this website to the website since I really work hard for this project and learned a lot JS concepts. Pls assign this to me :)

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Completed. Thanks for your contributions 🎉 ❤


netutils/dhcpd: bind socket to the interface

Summary
to handle the multiple netcard correctly.
Impact
Testing
boot device with two net device, and run dhcpd to wait the client.

@acassis could you help review this patch?

@xiaoxiang781216 I don't have a way to test it here. BTW I approved it because the modifications are self-contained and are under #ifdef symbol


Going into dormant state

Hi, in my application I'd like the RP2040 to completely power off in certain cases, so it consumes minimal current.
According to several sources its possible to go into a dormant state in which the power consumption is <1mA.
Ive looked around and it seems this involves disabling interrupts and then disabling several of the system clocks.
I also saw this PR https://github.com/rp-rs/rp-hal/pull/613 which seems to have a halt function, but that doesnt put the main core to sleep as far as I could tell. Using WFE/WFI even with interrupts disabled still puts my Pico at ~20mA of draw. A timer sleep puts it at around 9mA.
Is there any way using the existing HAL code to go into deep sleep?

Hello,
Out of curiosity, have you tried the c-sdk's hello_dormant to verify what could be achieved with your setup?
20mA seem to be quite a lot as the bootsel mode typically runs around 14mA.
This makes me think that your MCU may not be sleeping at all.
From reading the rp2040 datasheet, it seems to me that core1 enters deepsleep at boot (WFE + SCR.SLEEPDEEP set).
The first core on the other hand needs to be configured (setting SCR.SLEEPDEEP) to behave like so.
Based on what I can see from the listed source, the dormant mode is not linked to deepsleep/WFI/WFE.
It's literally stopping the clock.
https://github.com/raspberrypi/pico-extras/blob/master/src/rp2_common/pico_sleep/sleep.c
https://github.com/raspberrypi/pico-sdk/blob/6a7db34ff63345a7badec79ebea3aaef1712f374/src/rp2_common/hardware_xosc/xosc.c#L52
Anyways, I should have started with this:
The rp2040-hal implements CrystalOscillator::dormant() which should (partially) achieve what you are looking for.
One could argue this is incomplete as there does not seem to be a way to recover a CrystalOscillator<Stable> from a CrystalOscillator<Dormant> to which I'd reply that all contributions are more than welcome 😃.

Thank you. I will look into that and make sure to submit a PR if I end up writing recovery logic 🙂

So I've gotten around to play with this now and at the moment I haven't even been able to put the Pico into a deep sleep where it consumes less than 8mA, which is still quite a lot.
The examples in pico-extras and in the sdk are kind of confusing.
As far as I could tell from the documentation - the only thing I need to do to achieve the low dynamic power sleep is stop the PLLs and the external oscillator.
However some of the examples disable the xosc outright, and some put it into dormant mode.
In the RTC wake example the sleep_en0/1 masks are modified, in the rest they aren't (?).
In that same example the SCB register is modified to enable deep sleep - but this isn't present in the other examples.
So I'm not quite sure what I'm doing wrong - my setup and codes as follows:
I'm initializing the bare minimum I need to get the onboard LED flashing for 5 seconds, before attempting to do into deep sleep.
The bare minimum being:

Setting up the external oscillator and binding it as the system clock
Minimal GPIO setup so I can access the LED (bsp::Pins)

I'm not initializing the PLLs nor am I configured any of the other clocks, so as far as I understand I shouldn't need to stop them explicitly.
So far I've tried -

Disabling the xosc outright
Setting the xosc to dormant
Setting sleep_en0 and sleep_en1 to 0
Setting SCB_SCR_SLEEPDEEP in the SCB

Of course non of these are meant to be recoverable at the moment - just trying to go into deep sleep.
This is my code:
#![no_std]
#![no_main]

use bsp::entry;
use defmt_rtt as _;
use embedded_hal::digital::v2::OutputPin;
use panic_halt as _;

use rp_pico as bsp;

use bsp::hal::{
    clocks::{Clock, ClocksManager, ClockSource, StoppableClock},
    pac,
    sio::Sio,
    watchdog::Watchdog,
    pll::{
        common_configs::{PLL_SYS_125MHZ, PLL_USB_48MHZ},
        setup_pll_blocking, Error as PllError, Locked, PhaseLockedLoop,
    },
};

use fugit::{HertzU32, RateExtU32};

#[entry]
fn main() -> ! {
    let mut pac = pac::Peripherals::take().unwrap();
    let core = pac::CorePeripherals::take().unwrap();
    let sio = Sio::new(pac.SIO);

    let external_xtal_freq_hz = 12_000_000u32;
    let xosc =  bsp::hal::xosc::setup_xosc_blocking(pac.XOSC, external_xtal_freq_hz.Hz()).unwrap();

    let mut clocks = ClocksManager::new(pac.CLOCKS);
    clocks.system_clock.configure_clock(&xosc, xosc.get_freq()).unwrap();

    let mut delay = cortex_m::delay::Delay::new(core.SYST, clocks.system_clock.freq().to_Hz());

    let pins = bsp::Pins::new(
        pac.IO_BANK0,
        pac.PADS_BANK0,
        sio.gpio_bank0,
        &mut pac.RESETS,
    );

    let mut led_pin = pins.led.into_push_pull_output();

    for i in 0..5 {
        led_pin.set_high().unwrap();
        delay.delay_ms(500);
        led_pin.set_low().unwrap();
        delay.delay_ms(500);
    }
    // Halt forever
    unsafe {
        let SCB_SCR_SLEEPDEEP: u32 = 0x1 << 2;
        (*pac::SCB::PTR).scr.modify(|scr| scr | SCB_SCR_SLEEPDEEP);
        xosc.disable();
        //xosc.dormant();
    }
    loop {
        cortex_m::asm::wfi();
    }
}

Hello,
I got it to go to deepsleep and wake from it. I don't have any power measurement tool accurate enough to see any consumption at all (it must always be <1mA at 5V, or my tool is really crappy).
I'll continue trying to identify the issues under this in the coming days.

Actually, I wasn't far from making it work: https://github.com/ithinuel/hello-dormant-rp2040
As mentionned before, I don't have the tools to measure power consumption.
Also, my code may not be the shiniest.
Let me know if this helps identify the issue you're having.

I got hold of a power measurement tool and I can confirm that:

the dormant mode does consume as much in my example than it does on the pico-playground (about 1.8mA)
the deepsleep on the other hand still consumes a lot more. 2mA on pico-playground hello-sleep while about 5mA on my example, I need to investigate.

Also, while it did run as expected as the time I pushed on the repository, when I ran the power measurement, my example wouldn't wake from dormant mode.
Another limitation I found is that the rp2040-hal lacks the ability to recover from that dormant mode and the clock object gets consumed in the process, so one cannot re-enter dormant after waking up.

Amazing, thank you.


Get items index on focus

Hey there
Anyone know how can i get the index of the current item showed and store it on a state?
thanks

Hi,
I am looking at the same thing. The this.state.current keep track of the current item active, but I have not found a way to get it out from the component. (react beginner) :)
It would be nice to have some sort of callback for this?

Hey there, an example of this exists on the following site in the randomize button section

Asalem1, the example you provide show how to set current item, but not how to get it. It would be great with a similar code example showing how to get the currently selected image, or better some kind of callback called whenever coverflow change which image is currently shown.

I tried extending the Coverflow class, though run into some problems. Maybe this is not the way to go?
class CoverflowExt extends Coverflow {
  _handlePrevFigure = (e) => {
    super._handlePrevFigure(e);

    console.log('_handlePrevFigure() called. Callbacks called here.');
  }

  _handleNextFigure = (e) => {
    super._handleNextFigure(e);

    console.log('_handleNextFigure() called. Callbacks called here.');
  }
}

In an ideal world, I would have a place to call a callback when any mouse wheeling or dragging has happened. But I get the error message "Uncaught TypeError: Cannot read property 'call' of undefined" trying to call super._handleNextFigure(e);

I got it working this way:
Overriding as in the example above I am able to override the setState and get a place where I can call callbacks:
  setState(props) {
    let prev = this.state.current;

    // Source: https://stackoverflow.com/questions/41896878/react-setstate-getstate-and-asynchronous
    super.setState(props, () => {
      console.info(this.state.current);
      console.log('this works');

      if (prev !== this.state.current) {
        console.log('callbacks n stuff here');
      }
    });
  }

Hope it helps someone!


Frontend: Fetch endangered species data from laji.fi API to the map

Fetch species data from Laji.fi. You need to implement this to the client side map, because these should not go to the server.
You do not need to implement the markers on the map, just make sure that if the species layer is selected, there is functionality to fetch species to that location on the map.
For now, the fetched data does not need to be cleaned, lets work on that later when we know what we want to show.

Fetch your access token from https://api.laji.fi/explorer and create a .env file on the root folder of the project.
.env file syntax:
VITE_ACCESS_TOKEN=YOUR_ACCESS_TOKEN_HERE


Export the regular expressions for use in the parsers

There are ones for string literals and regular expressions, and possibly others.

String literal, regular expression and whitespace regular expressions have all been exported by way of their respective tokens.


Update section 5.

[]
Hi,
Would you please update Step 5 of section Configure automatic user account provisioning to ThousandEyes in Azure AD, please?
The screenshot should be this: https://monosnap.com/file/UAnfAZOM5zP9cypfVpcZiA4zOy7q1G
And step 5 should read: Under the Admin Credentials section, input the OAuth Bearer Token
generated by your ThousandEyes's account (you can find and or generate a token under your ThousandEyes account Profile Section).

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

ID: 3dca5199-a8d8-0d37-84e7-f2173519dd81
Version Independent ID: 92a8809f-c713-807f-125f-abcff50d1ca5
Content: Tutorial: Configure ThousandEyes for automatic user provisioning with Azure Active Directory
Content Source: articles/active-directory/saas-apps/thousandeyes-provisioning-tutorial.md
Service: active-directory
GitHub Login: @asmalser-msft
Microsoft Alias: asmalser-msft

@jalcockte
Thanks for your feedback! We will investigate and update as appropriate.

@jalcockte Thanks for reporting! I have assigned the issue to the content author to investigate and update as appropriate.


Add license header to each file

Add license header to each file

Can use php-cs-fixer for that, it has a header_comment fixer, that's what I use.

Thanks for the suggestion! Didn't know that :+1:

example


refactor(FieldTheory/Finite/GaloisField): replace Fintype.card with Nat.card in theorems about GaloisField

Replace Fintype.card with Nat.card in theorems about GaloisField because we deprecate FiniteDimensional.fintypeOfFintype and GaloisField.instFintype, which are noncomputable def/instance of Fintype.
See discussions at Zulip.

maintainer merge

bors merge


[http][v2] http could not set the origin in header

Hello everyone,
I am studying to write a tauri app and today I upgraded my tauri http plugin from 2.0.0.beta7 to 2.0.0.beta8, then I found my code could not get the data from a  site correctly. I need some helps, thank you very much.
Reproduction
import { fetch } from "@tauri-apps/plugin-http";

    fetch('http://localhost/GRAPARA.TXT', {
      headers: {
        origin: 'https://www.abc.com',
        cookie: 'test=123',
        host: 'myhost.com',
      },
    })
      .then(response => response.text())
      .then(result => console.log(result))
      .catch(error => console.log('error', error));

I captured the package in the server, and got the header that is
GET http://localhost/GRAPARA.TXT HTTP/1.1
user-agent: tauri-plugin-http
origin: http://localhost:1420/test
accept: */*
cookie: HFS_SID_=0.0392719367519021
host: localhost

it seems that the header I specified didn't been sent to server.
the http 2.0.0.beta8 would sent the origin: http://localhost:1420/test , but 2.0.0.beta7 would not. That made the server reject my request. HOW to resolve, please advise, thank you!
Full tauri info output
[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 125.0.2535.67
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.77.2 (25ef9e3d8 2024-04-09)
    ✔ cargo: 1.77.2 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 22.2.0
    - pnpm: 9.1.2
    - yarn: 1.22.22
    - npm: 10.7.0
    - bun: 1.1.2

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.0
    - tao [RUST]: 0.28.0
    - tauri-cli [RUST]: 1.5.11
    - @tauri-apps/api [NPM]: 2.0.0-beta.13
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite

should be fixed by #1392 but only if you enable unsafe-headers cargo feature flag

Hello, is there a way to completely reset or remove the default origin?  Currently if I set a custom origin then it ends up having multiple origin in the request header.
origin: 'http://the-origin-i-set-with-unsafe-headers-flag, http://localhost:1420/'

@henryliu-git seems like a bug in #1392, will open a PR to fix it


first pass at presentation exchange

I'm closing this PR since the mediator no longer offer issue and presentation credential protocols


Hook to prevent auto-update of CLI during ng update

🚀 Feature request
Command (mark with an x)

- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [X] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Description
When running ng update, it automatically updates to the most recently released version. When doing local development, this is undesirable because devs want to use their locally built version.
Describe the solution you'd like
Either a --skip-self-update flag or an environment variable to avoid this behavior.
Describe alternatives you've considered
Only workaround is to manually change this line to an if (false) { /* ... */ } before a local build.

You can use the following env variable NG_DISABLE_VERSION_CHECK. Just be sure that you ran your local ng with either npx or yarn.
Example yarn ng update ....

Oh nevermind, there is no check for that in that method.

Oh interesting, what does NG_DISABLE_VERSION_CHECK do if not preventing self-updating? Would it make sense to use the same environment variable to do so?

When that env variable is set to true or 1. The CLI will bypass parts of the bootstrapping logic and will force the usage of the currently invoked process. Typically the CLI will always use the local version. But in some cases such as ng update self update we want to use the currently spawned process.
https://github.com/angular/angular-cli/blob/862b28f844cddcc406defac6a32d6e266221d499/packages/angular/cli/lib/init.ts#L79
I think we can use this env variable for this use case too. As also, if we use this, we will be reducing an HTTP call. Since the cli will set this variable when using the self update version, but currently we don’t check it during ng update and thus when running in self update mode the spawned process will try to redundantly fetch the latest manifest of the cli again.


Support viewing a control's class

Description
As a user of the OSCAL Viewer/Editor, I would like to be able to view the class of a control.
Acceptance Criteria

The class [0 or 1] attribute of a control is displayed properly
The class display should be a re-usable component, such that it can be used for groups, params, and other OSCAL syntax that offers @class

Proposed Solution
This could be the element that displays underneath a title of a sub-control and appears as the first element when a control grouping is expanded.
Additional Notes
No response
Implementation

[ ] I can (or plan to) submit a pull request to implement this
[ ] Implementing this may result in a breaking change

For initial implementation this will display all classes as if they are unrecognized.
Later, the edit functionality ( #820) should offer a list of recognized classes, and for any recognized class, a user-friendly presentation would have to be provided here in addition to the raw presentation for unrecognized classes.

Here is the design that I have at the moment. I used the code we have for generating colors from a string to make it so that a particular string will always appear the same way -- this helps visually distinguish SP800-53 from sp800-53a better. In the future, we might make these colors user-selectable?

I used the code we have for generating colors from a string to make it so that a particular string will always appear the same way

I really like this design. I think being able to clearly distinguish class will be very helpful


Convert HtmlParser to ES6 class

I've gone ahead and gave converting HtmlParser to an ES6 class a go. @sethyates mentioned it in https://github.com/krux/postscribe/pull/138#discussion_r59112302 and I got curious enough to try it myself.
Code could look a bit cleaner using class properties, but I'm not sure if you want to use stage 1 proposal features just yet. If you do, I can add the transform and clean up a bit more.
All tests still pass without modifications.
Any thoughts?
(I'm also not sure how to sign the CLA at this point, but consider it signed and agreed with.)

Hi @Ambroos, thanks for that.  Yes you're right, we don't want class properties since AFAIK, those are defined using Object.defineProperty which is broken in IE8.  I've created another repo for html parser and will share that around.  Let me review this.  Thanks again.

Hi @Ambroos, looks pretty good, apart from the fixedReadTokenFactory having to call a private method of the parser argument.  We should either make that method public or find another way to do this.

Well, the entire factory could basically be merged into the class. Convert all methods inside the factory to private methods inside the class, and put the initialisation code in the constructor. It'd add a lot of methods to the class, but would definitely be cleaner and more flexible long-term than how it is now, I suppose.

Or pass in this._readTokenImpl into the fixedReadTokenFactory call.

Alright, this is cleaner indeed.

LGTM.  Thanks!


Need API be override instance weights and tags

@rshriram commented on Fri May 19 2017
Envoy supports weighted routing within a cluster as well. We need to expose an API to allow users to set such weights as well as add additional tags to the instances through an API. There are use cases where the tags attached to a pod change frequently and a single pod can host multiple different tags (1000s of tags) [imagine a content cache].
An internal use case came up, where both pods and external entities need to be able to specify the set of tags that each pod serves. Also, there is a need to assign rank (or weights) to pods based on certain processing costs, and then send traffic to the pod with lowest/highest weight, within an envoy cluster. While tags can be manifested as k8s labels, we do not know the overhead of adding or removing 1000s of labels per pod very frequently. Even if it's low, if services want to be able to control the tags assigned to their pods at runtime via APIs, they would have to interact with k8s runtime (which creates platform dependence)
Two options: the manager calls out to external entities for rewriting routes (requires others to understand our data model) or it exposes an API for others to just specify the additional info, while we apply the overrides. There are trade offs and operational complexities in both cases.
cc @louiscryan @kyessenov

@rshriram commented on Sun May 21 2017
Referring to https://github.com/istio/proxy/issues/278

@kyessenov commented on Fri Nov 03 2017
Issue moved to istio/istio #1442 via ZenHub

ServiceEntry is likely to be the API we expose for this. We can also investigate annotating pods / services in K8S to control this behavior without an API.


Running docker container in VM environment

Hi there,
I would like to create a training environment for my colleagues. After building and starting the docker container on a Debian VM, I open the URL https://<IP_ADDRESS> in the browser, ignore the certificate message and continue. The browser then shows the error "503 Service Temporarily Unavailable" (same for http://<IP_ADDRESS>).
docker command
sudo docker run --privileged -d -v "${DOJO_PATH}:/opt/pwn.college:shared" -p 2222:22 -p 80:80 -p 443:443 --name dojo -e DOJO_HOST=<IP_ADDRESS> -e DOJO_CHALLENGE=challenge-mini pwncollege/dojo
docker logs output

Is it generally possible to run dojo containers in an internal network on Debian VMs (XenCenter Server, Proxmox or Portainer)? If yes, what a the rough instructions to do so (debian and docker version / network and firewall settings / certificate configuration)?
Thanks in advance for your support,
Michael

The problem is that nginx, until we merge https://github.com/pwncollege/dojo/pull/336, doesn't have a default host. You'll need to access via hostname (which gets passed as an HTTP header that nginx uses to send you to the right place). The default deploy will respond to localhost.pwn.college (which resolves to <IP_ADDRESS>).

Ok, I have the feeling that there is some documentation missing in the root README file for people like me (with very basic knowledge).
Maybe it could help to put a few words there. Maybe something like "Using docker-compose: You can use docker-compose to run the setup on Windows or Ubuntu. Debian is not supported. Here is one example configuration for setting all the environment variables that are availabe for customization: [...]".

It is not recommended to run docker-compose directly, the docker run command does that. The dojo should run on any distro that supports docker, so I'm not sure why debian would be unsupported.
If you want to modify environment variables, I recommend you edit config.env instead of using the docker command line.


Call SwaggerUI only in dev env

See internal issue
Call to app.Swagger included in if block to keep method calls in the same order and not have to create another if block.
@jongalloway please review.

@jongalloway Can we get help merging this?


Allow favorite_event to be configured from UI

I believe it is worth mentioning that regular camera entities will now have the attribute device_class=camera (and that motion camera entities already had device_class=motion).
This could be useful for blueprints, like the famous Frigate Mobile App Notifications for filtering out the motion camera entities when selecting.

FYI: @NickM-27 also.
Thanks @felipecrs !


Cannot connect to host ccab4aaf-frigate:5000 ssl:default [DNS server returned answer with no data]

This error originated from a custom integration.
Logger: custom_components.frigate.api
Source: custom_components/frigate/api.py:260
integration: Frigate (documentation, issues)
First occurred: 12:45:58 (1 occurrences)
Last logged: 12:45:58
Error fetching information from http://ccab4aaf-frigate:5000/api/stats: Cannot connect to host ccab4aaf-frigate:5000 ssl:default [DNS server returned answer with no data]
Current version: 0.15.0-beta1 (Changelog)
NVR with realtime local object detection for IP cameras.
Visit the Frigate (Full Access) Beta page for more details
It will not connect
Core
2024.11.2
Supervisor
2024.11.3
Operating System
13.2
Frontend
20241106.2

You are using the beta which has a different hostname


v3.3.0 - improve error system and build tools.

Replaces babel with buble. Compile 4x faster while producing similar output and passes all tests.
Enhance error system.


flutter command: "the active Flutter" warning can be confusing

cd /builds/dev/smoke/flutter/bin/examples/flutter_gallery; flutter test test/smoke_test.dart
Warning - the active Flutter is not the one from the current directory:
  active Flutter   : /builds/dev/flutter
  current directory: /builds/dev/smoke

In this case what the warning meant was that the flutter command found on my PATH wasn't the one from the directory that contained the example I was running.
Referring to 'the active Flutter' is a bit opaque. Maybe 'flutter command' would be clearer.

@HansMuller, totally open to work-smithing! The code lives here https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/runner/flutter_command_runner.dart#L280, and the same terminology is used a little further below.

Just ran into this with customer leafy. We definitely need to make this message clearer. It should explain what the problem is, how to fix it, and why we care.

Seems like we could also provide devs way to fix this.  Like "run flutter create or flutter upgrade on your project to switch to the flutter in your path" or some-such.


Flaky test on the UI for mytools.ts

Describe the bug
Encountered this flaky test on the UI for my PR.
AssertionError: Timed out retrying after 30000ms: Expected to find element: `[data-cy=topicInput]`, but never found it.
    at Context.eval (webpack://dockstore-ui2/./cypress/e2e/group3/mytools.ts:99:9)

https://app.circleci.com/pipelines/github/dockstore/dockstore-ui2/10741/workflows/45e9d688-6602-4e8a-9c0a-8669e19fe6e0/jobs/47884/tests
Expected behavior
Test should pass
┆Issue is synchronized with this Jira Story
┆Issue Number: DOCK-2471
┆Sprint: Backlog
┆Issue Type: Story

In dockstore/dockstore-ui2#1848, skipped flaky test. Implementer of this fix should remove the skip here.


⚠ GitLab Server has degraded performance

In b77d7b6, GitLab Server (https://gitlab01.its-telekom.eu) experienced degraded performance:

HTTP code: 200
Response time: 6928 ms

Resolved: GitLab Server performance has improved in 904938e.


Add support for using Dispatch in lit tests on Linux

Today, several lit tests use and test Dispatch, but this is only available on macOS/iOS and gated behind REQUIRES: objc_interop. This PR introduces a different flag, REQUIRES: dispatch and makes it available on Linux (if you use build-script with --libdispatch). The individual pieces:

In build-script, when building libdispatch on Linux, copy the resulting libdispatch.so and swiftmodule files to the right location in the Swift resource directory.
In lit, detect whether the build has libdispatch.so, and add dispatch as an available feature. On macOS, this is always available.
Change a few tests to use REQUIRES: dispatch instead of REQUIRES: objc_interop
Remove the Dispatch module from mock SDKs.

@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - 26df5ed63db93de4f072aecaaca8bad056c795eb

Build failed
Swift Test OS X Platform
Git Sha - 26df5ed63db93de4f072aecaaca8bad056c795eb


About i-Mix for Supervised Contrastive Learning

Hello, thank you for the great work!
I have a question regarding the extension of i-Mix on supervised contrastive learning (Appendix section A.2, A.3 in your paper):
The supervised contrastive learning loss introduces the term $N_{y_{i}}$ (the number of data with label $y_i$), and I'm not sure how to handle the number of positive samples for the mixed classes.
Does the linearity of losses (proved in Appendix section B) hold in this case too?
In other words, does the following equation hold for both SupCLR/ N-Pair SCL?
$l_{SupCon}(\lambda x_i + (1-\lambda)x_j, \lambda v_i + (1-\lambda) v_j ; B) = \lambda l_{SupCon}(\lambda x_i + (1-\lambda)x_j, v_i ; B) + (1-\lambda) l_{SupCon}(\lambda x_i + (1-\lambda)x_j, v_j ; B)$
If not, can you give the i-Mix implementation for supervised contrastive learning?
Thank you.

For the supclr experiments in the appendix, I implemented i-mix on top of the official supclr code. They did not actually use the linearity of the loss for their implementation, but it also satisfies the linearity, as it can also be represented in the form of the cross-entropy loss. $N_{y_i}$ is the normalizer, which is the number of softmax probablities (each mixed sample is considered as one sample in i-mix) you added to compute the loss. Just make sure that you weight each (mixed) sample equally when computing the averaged loss.
https://github.com/HobbitLong/SupContrast
https://arxiv.org/pdf/2004.11362v1.pdf

Hi, thank you for the quick response.
I'd like to make sure that I understand your work thoroughly. Please kindly answer the follow-up question
Let's say mixing ratio $\lambda = 0.7$, and there are three classes A, B, and C. (one-hot labels are (1 0 0), (0 1 0), (0 0 1), respectively.)
Data mixing produces many new mixed classes, for instance
M1: 0.7A + 0.3B   (0.7 0.3 0)
M2: 0.3A + 0.7B   (0.3 0.7 0)
M3: 0.7A + 0.3C   (0.7 0 0.3)
Are M1, M2, and M3 considered to be separate classes? Thank you for clarifying.

I went through my old implementation and found that I generated two masks and then used the linearity to compute the final loss.
To answer your question, I think M1 is consider to be 0.7 of class A and 0.3 of class B, assuming that the math in the supcon paper is matched with their implementation in the official repo. If you want to be mathematically rigorous, you can do the math on your side to confirm it with the code below, which is the essential change from the original supcon repo. mask2 is the mask for the samples with the multiplier $1-\lambda$.
https://github.com/HobbitLong/SupContrast/blob/master/losses.py#L92
mean_log_prob_pos = (mask * log_prob).sum(1) / mask.sum(1)
->
mean_log_prob_pos = lam * (mask * log_prob).sum(1) / mask.sum(1) + (1. - lam) * (mask2 * log_prob).sum(1) / mask2.sum(1)


Homepage redesign - prototype

[ ] Color change for accessibility
[ ] Background photo
[ ] 3 cards

“For Climate Job Seekers”
“For Climate Funders”
“Who we are”

[ ] Climate Clock #37
[ ] Footer
[ ] Content pass

(Desktop design then mobile design below)

Desktop

Mobile

@connor-cs this one's all you now! @ArLough is taking over the Data Magic work with our AI content generator.

@UlianaBil @futuresoup Is there a color palette list anywhere for our new AAA colors? So I can start adding them to my docusaurus site

@bigolboyyo I invited you to my Figma files. Go to Homepage and you will see all the colors used on the right-side panel. If you need help with anything - let me know

@connor-cs @bigolboyyo @ArLough @futuresoup
Guys, after testing - the home page is ready.  if Jacob is ok with that design or wants to use some part of it.
Cards didn't work with user that well, and also the "about" section was removed as we want to focus the user on "Job seekers" and "Funders"
About the clock - it can be an animated slide, like an idea.
Please check the prototype to see an interaction ( top right corner in Figma)
Notes are inside Figma file, next to home page
Figma file - https://www.figma.com/file/BnLv0mzFVOk0qrRx4TFzqr/The-Climate-Tech-Handbook?type=design&node-id=65%3A3&t=hiSGxqtgFHElqfup-1


Webpack defaults

Add the webpack-defaults to the project.
Closes #8

This has been failing because npm & yarn don't play well together.
Delete your yarn.lock so travis doesn't try & use it

I'm sure there is a more elegant way to tell Travis to ignore a yarn.lock file, I just never bothered to figure our what that is.

Alright - travis is finally passing. @d3viant0ne are you ok with these changes from defaults?


Is it possible to pause and resume script execution in JSRT?

Hi,
I’m trying to use the built in JSRT engine to build a simple non-visual browser for crawling and data scraping solution. I’m following HTML5 WHATWG specifications.
One point that I don’t know whether it is possible in  JSRT or not is the ability to pause the execution of a script, execute another one and then resume the paused script.  This is one of the requirements defined in HTML5 specs as described here https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model

In some situations, HTML5 requires to ”Immediately execute the script block, even if other scripts are already executing.” This is defined as “an operation that is to run immediately must interrupt the currently running task, run itself, and then resume the previously running task”
This point is important especially when handling dynamically created and inserted scripts into the DOM. Otherwise, the script engine may block the HTML parser.
I’m aware about JsDisableRuntimeExecution API but this as I know will cancel the execution on the whole runtime, and there is no way to resume the execution again. Also, this is not suitable as I may have multiple execution contexts (for example when dealing with Iframes and other types of nested browsing contexts).
Any idea how to achieve pause and resume behavior in JSRT. Or any workarounds?
Regards,
Atef

Others may answer this better. I will try to approach to this problem generally.
Lets consider a JavaScript loop logic below;
for(var i=0; i<100; i++) {
  // do something
}

This will keep the thread busy until the loop ends. In order to pause this at any given time, we may have to pause the execution from another thread.
AFAIK, There is no magical solution to this.
1 - Decide on order prior to running any script. I know, there are cases make this really hard.
2 - You could inject a function call as given below and decide whether you want to pause or not.
void myPauseFunction (....)
{
    if (shouldPause) {
       // call pthread - Windows thread wait / sync etc. to keep this thread on hold
    }
}

for(var i=0; i<100; i++) {
  myPauseFunction();
  // do something
}

3 - One another option is to suspend / resume the thread using C/C++ etc. features..
On Windows you could use SuspendThread and ResumeThread on JS engine's thread. However, this may lead to an unknown behavior due to GC thread / locks, reaching JSRT from another thread etc.. You might have to keep runtime from using background threads. (JsRuntimeAttributeDisableBackgroundWork)
See also pthread_suspend for non Windows.
FYI; regardless from the implementation, suspending the thread is not instant or guaranteed.
P.S. This is not a good option in case you want to run another script while the JS thread is suspended unexpectedly.
4 ) Listen to memory allocation callback -> [JsMemoryAllocationCallback] (https://github.com/Microsoft/ChakraCore/wiki/JsMemoryAllocationCallback) This is similar to (2) and you can keep the execution on pause. However, loading another script here is a bit more tricky (if it is doable properly at all)

AFAIK there's no direct way to pause & resume in JSRT. Pausing in the middle of an execution actually leaves the engine in a weird intermediate state and in most cases we don't allow script re-entrancy as it could mess up our internal state.

Looks like this question is answered. Closing.


Generic invoices (BP+LNP+RGB)

PR has to be moved into a separate crate

PR has to be moved into a separate crate


dyld symbol not found when Linking Tests Dynamically on MacOS

It happens on all the tests that are using config, the error message is:
dyld[2104]: symbol not found in flat namespace '__ZN8simdjson8internal11error_codesE'

This symbol was defined in external/simdjson/src/internal/error_tables.cpp
$ nm -C bazel-bin/external/simdjson/libsimdjson/lib/libsimdjson.a | grep error_codes
---------------- S __ZN8simdjson8internal11error_codesE

and the failing tests have linked with libsimdjson.a
$ cat bazel-bin/tests/config_test-2.params
-o
bazel-out/darwin_arm64-opt/bin/tests/config_test
-Xlinker
-rpath
-Xlinker
@loader_path/../_solib_darwin_arm64/
-Xlinker
-rpath
-Xlinker
@loader_path/config_test.runfiles/cris-core/_solib_darwin_arm64/
-Lbazel-out/darwin_arm64-opt/bin/_solib_darwin_arm64
bazel-out/darwin_arm64-opt/bin/tests/_objs/config_test/config_test.o
-llibconfig
bazel-out/darwin_arm64-opt/bin/external/simdjson/libsimdjson/lib/libsimdjson.a
-ltests_Slibcris_Ugtest_Umain
-llibsignal
-llibtimer
-llibutils
bazel-out/darwin_arm64-opt/bin/external/fmt/libfmt/lib/libfmt.a
-lexternal_Scom_Ugithub_Ugoogle_Uglog_Slibglog
-lexternal_Scom_Ugithub_Ugflags_Ugflags_Slibgflags
-lexternal_Sgtest_Slibgtest
-undefined
dynamic_lookup
-headerpad_max_install_names
-Wall
-Werror
-Wextra
-Wno-fuse-ld-path
-Wall
-Werror
-Wextra
-Wno-fuse-ld-path
-Wall
-Werror
-Wextra
-Wno-fuse-ld-path
-Wall
-Werror
-Wextra
-Wno-fuse-ld-path
-Wall
-Werror
-Wextra
-Wno-fuse-ld-path
-Wall
-Werror
-Wextra
-Wno-fuse-ld-path
-lpthread
-pthread
-L/opt/homebrew/opt/openssl/lib
-L/opt/homebrew/lib
-flto=thin
-lc++
-lm

But it only happens on Mac OS (with Apple Clang toolchain), so this is not a blocker.

Please provide the entire bazel-bin/tests/config_test-2.params

@xkszltl updated the description

I guess it may be because the loader on the Mac OS does not load the symbols from the static library for the dynamic libraries. Seems a bug to me.

I guess it may be because the loader on the Mac OS does not load the symbols from the static library for the dynamic libraries. Seems a bug to me.

Are you trying to say A.dylib depends on B.a but doesn't includes everything from B.a?
That's expected, A.dylib is not responsible for unused parts in B.a, dynamic lib shares the same linking logic with executable.

Linker cmd LGTM, wondering if it has anything to do with LTO.
Recommend to try without LTO first.
That S in symbol table also looks suspicious.

Each symbol name is preceded by its value (blanks if undefined).  Unless the -m option is specified, this value is followed by one of the following characters, representing the symbol type: U (undefined), A (absolute), T (text section symbol), D
(data section symbol), B (bss section symbol), C (common symbol), - (for debugger symbol table entries; see -a below), S (symbol in a section other than those above), or I (indirect symbol).  If the symbol is local (non-external), the symbol's
type is instead represented by the corresponding lowercase letter.  A lower case u in a dynamic shared library indicates a undefined reference to a private external in another module in the same library.

FYI, disabling lto does not help.

chenhao@haos-mac-mini ~/d/c/bazel-bin> nm -C external/simdjson/libsimdjson/lib/libsimdjson.a | grep error_codes
---------------- S __ZN8simdjson8internal11error_codesE
chenhao@haos-mac-mini ~/d/c/bazel-bin> nm -C libconfig.dylib | grep error_codes
                 U simdjson::internal::error_codes
chenhao@haos-mac-mini ~/d/c/bazel-bin> nm -C tests/config_test | grep error_codes

On Mac, the symbol in the dylib file is demangled, while the symbol in .a is mangled. Also, in the executable binary output, there are no such a symbol.
While on Linux, the output is the following:
root@88e7bcfc9359:~/.cache/bazel/_bazel_root/2cd59afb93b178a87ec7d73dc50fa44d/execroot/cris-core/bazel-out/aarch64-opt/bin# nm -C external/simdjson/libsimdjson/lib/libsimdjson.a | grep error_codes
00000000 T simdjson::internal::error_codes
root@88e7bcfc9359:~/.cache/bazel/_bazel_root/2cd59afb93b178a87ec7d73dc50fa44d/execroot/cris-core/bazel-out/aarch64-opt/bin# nm -C libconfig.so | grep error_codes
                 U simdjson::internal::error_codes
root@88e7bcfc9359:~/.cache/bazel/_bazel_root/2cd59afb93b178a87ec7d73dc50fa44d/execroot/cris-core/bazel-out/aarch64-opt/bin# nm -C tests/config_test | grep error_codes
0000000000209248 R simdjson::internal::error_codes


Fix for the infinite drag bug

Fix for bug related at: https://github.com/jgwhite/ember-sortable/issues/86

The tests are failing right now due to a breaking changes in Ember 2.5 beta. I need to fix ember-sortable’s acceptance tests. Thanks for the PR and thanks for your patience!

Hey sorry for the delay on this — still looking for a solution for the failures on beta/canary.

It's ok! For my project i reopened the addon with the modifications to solve the bug untill the official update. So, no rush! I just hope this change help other people too and have no unexpected side-effects. And thanks again for your help!

I’ve fixed the issue with our drag helper. Could you rebase on top of master?

This looks good to me. Could you squash into one commit with a descriptive commit message containing the phrase “closes #86”? Thanks!

@raelbr ping :)

I'm sorry, as it's my first contribuition i'm a little confused on how to squash it into one single commit... tried some tutorial but i think something went wrong =S

@raelbr no problem! Here’s the process:
git remote add upstream git@github.com:jgwhite/ember-sortable
git fetch upstream
git rebase -i upstream/master

This will give you a UI that looks like this:
pick 92d152d closes #86
pick 9087cff closes #86
pick 48906e8 fix for the infinite drag bug

Edit it to look like this:
reword 92d152d closes #86
fixup 9087cff closes #86
fixup 48906e8 fix for the infinite drag bug

Then save and the rebase will run and pause to allow you to reword the first commit. It'd suggest rewording the first commit to match the name of this PR: “Fix for the infinite drag bug”
Then finally:
git push origin master -f

Hello @jgwhite.  I think the best bet is to run:
git commit --amend --author "Your name goes here <your email goes here>"

@jgwhite, Done! Is it ok now? =)

👍

Nice! Thank you for you patience, @jgwhite !


Inspector: Move shader code to core

See https://forum.babylonjs.com/t/texturetools-gettexturedataasync-get-texture-data-error/47549/3

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/15037/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15037/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15037/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/15037/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/15037/merge
https://gui.babylonjs.com/?snapshot=refs/pull/15037/merge
https://nme.babylonjs.com/?snapshot=refs/pull/15037/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/15037/merge#BCU1XR#0

WebGL2 visualization test reporter:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15037/merge/testResults/webgl2playwright/index.html

Visualization tests for WebGPU (Experimental)
Important - these might fail sporadically. This is an optional test.
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/15037/merge/testResults/webgpuplaywright/index.html


Add jupytext

Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts! Repository at https://github.com/mwouts/jupytext.
This enables easier version tracking by writing Jupyter Notebooks (usually in JSON format) as plain text Python scripts which are easier to diff. Something I've been using at https://github.com/geo-smart/deepicedrainpipe/pull/10.
Can also be a good example on how people can add dependencies to the cryo-hub-image :see_no_evil:

/condalock

/condalock

/condalock


Migrating to CustomVariableSupport breaks query template variables

What happened:
As described here, we need to investigate why this happens and reimplement custom variable support.

we need to use metricFindQuery for query variable support, otherwise the variable object resolves to {text: "Demo Wind Farm Asset", value "Demo Wind Farm Asset"}, which is not what we want, since when they are selected in dashboards, their IDs are sent in different types of queries and not their names.
The only time we would need the names is when the variables are being filtered by regex like https://github.com/grafana/iot-sitewise-datasource/issues/154. However, the solution for this in the original commit is just a consequence of the values being the same as names, and not a proper fix.
I will reopen the original ticket, since we will need to reimplement custom variable support.

We should investigate why the values resolve to {text: "Demo Wind Farm Asset", value "Demo Wind Farm Asset"} and not to the assetId. For some reason the variable value in the redux state is equal to its text, for example:

What you expected to happen:
The variable value should have value of the id.
How to reproduce it (as minimally and precisely as possible):
Screenshots

Anything else we need to know?:
Environment:

Grafana version:10.2.0
Plugin version:1.10.0
OS Grafana is installed on:
User OS & Browser:
Others:

From investigating the linked athena issue, the problem seems to be that CustomVariableSupport expects data frames with text and value fields. I suspect that the query we're returning doesn't have those fields, so instead it takes the first field (in the example case the name) and uses it for both values. If that is the case, we're going to have to process the results (maybe write resource handlers for them) to get them into the correct formats to be used as variables


Not does not apply to all operators

https://github.com/oasis-open/cti-stix2-json-schemas/blob/master/pattern_grammar/STIXPattern.g4#L45
Not should apply to = and != as well as the ordering operators.
Though their use here does not make sense, there is nothing in the spec that prevents their use.  I don't see a good reason to restrict them either.

A good (though not great) reason to restrict them is that the use of NOT in front of =, !=, <, <=, >, or >= amounts to more than one way to do something, which we try to avoid.
I agree that, as written, the spec does not prohibit NOT != (or the others), but in my opinion we should strongly discourage their use. That said, the pattern grammar is somewhat lax, in that it doesn't (on its own) validate correct object types or property names, so there is something to be said for allowing NOT != in the grammar, but raising warnings/errors in the STIX-Validator.
Since this is an open repository, we can't change/influence the specs here; we just need to implement what is specified.
@chisholm @clenk @ikiril01 @treyka What do you think?

I would disagree that we should restrict the use of NOT before any operators permitted by the Patterning specification. It's not two different ways of doing the same thing; that's how boolean logic works.
Which is to say that it's not(not(not))) two different ways of doing the same thing. ;-)

I'd say boolean logic allows multiple ways of doing the same thing.  E.g. A=>B <=> !A | B, A <=> !!A <=> !!!!A, !(A|B) <=> !A & !B, etc, etc...
I'd be all for allowing the full range of propositional logic expression.  But let's face it, NOT != isn't exactly a standard notation.  In fact it's really weird, and surely anyone looking at it would wonder what the author was thinking when he wrote it.
In this case, we have lots of custom operators (i.e. beyond those of propositional logic), and inserting NOT before the operator in some cases actually reads better to humans.  A NOT LIKE B reads more like a sentence, so it makes sense in terms of human understandability.  A NOT != B is going make people squint and scratch their heads.  I guess that's why I wrote the grammar that way.  It was making me squint and scratch my head :-P
So yeah, it's not consistent across all operators, but I guess it made more sense to me to be inconsistent.  I guess we gotta be totally spec-compliant, but I do think the spec allows some weird patterns :)

that's just how boolean logic works.

Unless I'm misunderstanding/misremembering the spec, NOT really (pun intended 😁 ). The spec doesn't allow <comparison expression A> AND NOT (<comparison expression B> OR <comparison expression C>). In effect, we can only apply NOT to "leaf nodes", which is equivalent to using the opposite operator in the comparison.
That does raise the issue (which I thought we resolved but now can't find in the spec) of whether a object that is missing property will ever match a comparison expression using that property. Thus, given a foo object {bar: 42}, the  pattern [foo:bar = 42] would match. But what about [foo:qux != 37]? Should that be interpreted differently than [foo:qux NOT = 37] ? There's also the issue of incompatible types. [foo:bar > 'tacos'] is False, and [foo:bar <= 'tacos'] is also False, so does that mean that [foo:bar NOT > 'tacos'] is True?
Regardless of the answers to the above questions, I agree that the grammar needs to be updated to support what's in the spec (and the matcher updated accordingly), and if we want to discourage diabolical uses of NOT, we should do that elsewhere.

While I agree that NOT != is not friendly, as is pointed out, you can do similar things in many languages, even python allows not (a == b).  We do have a bit more context due to where we put the NOT though than other languages.
This is correct that NOT only applies to the results of the comparison.  We have not defined what NOT  would result in, and is invalid.
Re missing properties.  I'm pretty sure we had text in the document, but I do not see it.  IIRC, not present is somewhat like the empty set, so it's never be equal, but always !=.  and in that case NOT = and != I would expect to return the same.
It is known that we do not have a function to test the presence of a missing property.  The real question is, does missingprop MATCHES '.*' return true or false?  (and what happens when missingprop is present but not a string?)  And we do not have this defined in the spec.  I thought we had resolved this too and added text, but it is not present.

you can do similar things in many languages, even python allows not (a == b).

Actually, I was thinking of the customary unary prefix NOT operator as being the contrasting approach, not the similar, comparable one.  not (a != b) actually seems more reasonable to me, perhaps because it's negating a whole sub-expression, as opposed to the juxtaposed NOT != which looks like a confusing and unnecessary double-negation.  Unary prefix NOT seems like a general purpose tool for logically negating arbitrary sub-expressions, which makes sense to have.  NOT != just looks like a clumsy confusing syntax.
As far as missing properties, the philosophy embodied in the matcher is that an object path is basically a selector of values from cyber observable objects, which will participate in the comparison.  Having a non-existent property means that no values are selected, which means that no comparison can happen.  There is nothing to compare.  Therefore, there are no "root" cyber observable objects, and the ramifications flow from that.  E.g. if that was the only comparison expression within the observation expression (e.g. within the square brackets), then it won't match the observation; the comparison operator is irrelevant (even if it was '!=').
If the spec were to say the result was true when the operator was '!=' and the property was not found, it would effectively be saying there is a match without a matching cyber observable object.  How do you resolve that idea against the common root cyber observable constraint?  It seems contradictory.  Consider a compound comparison expression:
[foo:missingprop != 1 AND foo:name = 'alice']
The first evals to true, and let's say the second does too, because the prop exists with the given value.  Since they're ANDed, one might think the whole thing must eval to true, and match.  But what is the common root cyber observable here?  The first comparison expression didn't match any.  So there can't be a common cyber observable.  That suggests that there can be no match.  So is it a match or not?  If a match, then what do you do with the common root cyber observable constraint?
As far as type mismatches, 4.2.1 does state that if the types are incompatible, '!=' results in true, all other operators result in false.  The matcher follows this: if the selected value isn't a string, the MATCHES operator will yield false.

Fixed by #59


Improve local password collection

Closes #256 and #190

Resolves an issue where by if we accept a local password over 32 bytes we'll crash at key generation
time. Instead, we now warn if the password is over 32 chars and prompt the user to try again. On the
third attempt we throw a provider error.
To go along with the above, we now will warn the user if confirmation of a local password
does not match the original entered local password vs immediately throwing, instead the user has 3 attempts
to correctly confirm.

I will open up a PR to forward port this to master after this is merged.


Release Binaries

The current install for this program (if using Cargo) looks something like:

Install Rust language support
Install system library dependencies (openssl, alsa-lib, libdbus)
Install spotify_player using Cargo

Bunch of crates are downloaded
Bunch of crates are compiled
If you're missing a system library, this is when you find out. Restart Cargo build after you've fixed any issues

Add ~/.cargo/bin to $PATH

This process may be long for users that have never used Rust before (20 min? Unacceptable! :grin:). I thought I'd look into how things might be improved.
I found out the binary in the Docker image you provide "just works" and doesn't need all the crates installed. The first easy step could be to add that binary as a Release artifact. But...I know 100% statically linked binaries are a thing in languages like Go. Could things be even easier here?
I found this statement online:

By default, Rust will statically link all Rust code. However, if you use the standard library, it will dynamically link to the system's libc implementation.

And that's confirmed with the binary obtained from the Docker image:
$ file spotify_player
spotify_player: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=8614a73108df435bc93ac676acd49b907f730034, for GNU/Linux 3.2.0, with debug_info, not stripped

$ ldd spotify_player
        linux-vdso.so.1 (0x00007ffcd1df9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faa06fbe000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faa06f9c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faa06e58000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faa06e52000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faa06c8d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007faa07edf000)

With a few edits to the Dockerfile and spotify_player/Config.toml, a 100% statically-linked binary is possible:
$ file /tmp/spotify_player
/tmp/spotify_player: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), static-pie linked, BuildID[sha1]=7289f836bdf693be7dc24b6bb26cb8e448311ffe, with debug_info, not stripped

$ ldd /tmp/spotify_player
	statically linked

Cool. As a test, I dropped the binary in a vanilla Ubuntu container to see if it would run:
$ docker run --rm -it -v /tmp:/app ubuntu

root@699340233eb9:/# /app/spotify_player --help
spotify-player 0.9.3
Thang Pham <phamducthang1234@gmail>
A command driven spotify player

USAGE:
    spotify_player [OPTIONS]

OPTIONS:
    -c, --config-folder <FOLDER>
            Path to the application's config folder (default: $HOME/.config/spotify-player)

    -C, --cache-folder <FOLDER>
            Path to the application's cache folder (default: $HOME/.cache/spotify-player)

    -h, --help
            Print help information

    -t, --theme <THEME>
            Application theme (default: dracula)

    -V, --version
            Print version information

Even cooler!
Summary of changes:

Dockerfile:

Add musl library support to build container
Use rustup to enable building for musl targets
Configure environment such that musl libraries are used during the build

Config.toml

Use OpenSSL crate, which has a magic "vendored" setting to support static linking

I don't know anything about Rust or single line of your program but what you made is pretty sweet. Making it dead-simple to install can help more people enjoy it! I'd love to help with these type of Packaging/Release/Distribution challenges.

Thanks @braheezy for an amazing finding.

The first easy step could be to add that binary as a Release artifact. But...I know 100% statically linked binaries are a thing in languages like Go. Could things be even easier here?

Adding binaries to release was mentioned a few times, I did look into this briefly before. However, as you already mention, it's not fully statically linked, so things may not work.

And that's confirmed with the binary obtained from the Docker image:
$ file spotify_player
spotify_player: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=8614a73108df435bc93ac676acd49b907f730034, for GNU/Linux 3.2.0, with debug_info, not stripped

$ ldd spotify_player
        linux-vdso.so.1 (0x00007ffcd1df9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007faa06fbe000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007faa06f9c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007faa06e58000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007faa06e52000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007faa06c8d000)
        /lib64/ld-linux-x86-64.so.2 (0x00007faa07edf000)

Summary of changes:

Dockerfile:

Add musl library support to build container
Use rustup to enable building for musl targets
Configure environment such that musl libraries are used during the build

Config.toml

Use OpenSSL crate, which has a magic "vendored" setting to support static linking

Dynamically link the binary provided in the docker image is simpler than dynamically linking the actual application because by default, the binary docker image doesn't include all the features (streaming, image, media-control, etc). With docker version, libc and openssl can be worked around to use the static link counterparts.  I'm not too sure about the state of other dependencies when enabling all the default features.
That said, it's still better to provide any kinds of "just work, easy-to-install" binaries and not require people to install Rust/cargo to install the applications. I'll take a deeper look into how to improve these things. Will keep you updated.
Anyway, really appreciate your effort put into this :bow:.

Dynamically link the binary provided in the docker image is simpler than dynamically linking the actual application because by default, the binary docker image doesn't include all the features (streaming, image, media-control, etc)

Ahh. This is my lack of Rust showing. I see the language has all that built-in support for conditionally compiling. That might explain your --no-default-features flag in the Dockerfile(?). I might explore with building all features.

That said, it's still better to provide any kinds of "just work, easy-to-install" binaries and not require people to install Rust/cargo to install the application.

Exactly it's all about having multiple choices. I've been taking inspiration from how bat provides targets. I was delighted to find out it was also a Rust project. I got some of the musl ideas from there.

I think a 100% static binary is off the table.
A few functions ultimately depend on dynamic linking because of the nature of what the functions do. This post sums it up.
Functions:

getgrouplist
initgroups
getgrgid_r
getgrnam_r
getpwnam_r
getpwuid_r
getaddrinfo
gethostbyname

The main warning during build:
Using 'gethostbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking

Any code rewrites to support this are surely not worth it.

Hey @braheezy,

I think a 100% static binary is off the table.

That's sad to hear :<. I planned to play around with musl after release v0.9.4. Thanks for the investigation, it did save me time then =).
Also, FYI, I added a CD workflow that will publish binaries whenever I release new version. You can find the prebuilt binaries in the release page (e.g v0.9.4). Please lmk if those binaries don't work. I only tested briefly on my Ubuntu. Note that you still need to install the dynamic dependencies (openssl, alsa-lib, libdbus, etc).
In the meantime, I'll close this issue for now. Feel free to reopen if you encounter any issues.


fix: improve robustness of flood risk notebook by adding polling

Summary
Adding polling to geospatial analytics notebook to fix flakiness

/azp run

Codecov Report

Merging #1427 (5c1aab9) into master (891761d) will decrease coverage by 84.22%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #1427       +/-   ##
==========================================
- Coverage   84.82%   0.60%   -84.23%
==========================================
  Files         287     258       -29
  Lines       14250   12989     -1261
  Branches      719     719
==========================================
- Hits        12088      78    -12010
- Misses       2162   12911    +10749

Impacted Files
Coverage Δ

...m/src/main/scala/com/microsoft/lightgbm/SWIG.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...ain/scala/org/apache/spark/ml/param/MapParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...n/scala/org/apache/spark/ml/param/UDPyFParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...cala/org/apache/spark/ml/NamespaceInjections.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...cala/org/apache/spark/ml/param/DataTypeParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...ala/org/apache/spark/ml/param/ByteArrayParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...ala/org/apache/spark/ml/param/EvaluatorParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...la/org/apache/spark/ml/param/ParamSpaceParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...la/org/apache/spark/ml/param/TypedArrayParam.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

...a/com/microsoft/azure/synapse/ml/stages/udfs.scala
0.00% <0.00%> (-100.00%)
:arrow_down:

... and 270 more

Continue to review full report at Codecov.

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


Story "Implement AAS registry"

          # Story "Implement AAS registry"

Repository: https://github.com/eclipse-tractusx/knowledge-agents-aas-bridge
Statement
As a (potential) KA participant, I want my AAS bridge to implement the AAS 3.0 registry interface
Acceptance Criteria

additional templates

Estimation
5 SP
Originally posted by @drcgjung in https://github.com/eclipse-tractusx/sig-release/issues/306#issuecomment-1770956815

is an alternative to https://github.com/eclipse-tractusx/knowledge-agents-aas-bridge/issues/7

out of scope


Example to use additional_set

hello,
I'm trying to add multiple sets, but I don't understand how it would look in HCL, it always gives me an error.
Thanks in advance.

i have it:
  additional_set = [
    {
      set = {
        name  = "serviceAccount.annotations.\\eks\\.amazonaws\\.com/role-arn"
        value = aws_iam_role.cert-manager-role.arn
        type  = "string"
      },
      set = {
        name = "installCRDs"
        value = true
      }
    }
  ]

Thanks!!!

I check the module and find that I don't need to set installCRDs.. so with this work:
  additional_set = [
    {
        name  = "serviceAccount.annotations.\\eks\\.amazonaws\\.com/role-arn"
        value = aws_iam_role.cert-manager-role.arn
        type  = "string"
    }
  ]

Thanks!!!


Premade flashing packages for Air Unit - V01.00.0606

Hi, thanks for you job! Is there a way to have premade flashing packages for Air Unit - V01.00.0606, I need it to recover my air unit after chrome crash during wtfos install.. Maybe I just don't don't understand how can I do it but I only see package for V01.00.0608.
Thanks for your help!

Hey I created a package, hope it helps you.
https://drive.google.com/file/d/1I_zdqVhi-qHQq60vEq7K0Bl11toPfhsl/view?usp=share_link
If you want to create your own package, here is a video
https://www.youtube.com/watch?v=UtxJIX_UPZk

Thank you very much i'm going to try it tonight!

Thank you I manage to recover my air unit thanks to your file!


Some emotes doesn't work (BTTV)

Some emotes for example (KEKW, LULW) doesn't work. Tried reinstalling and clearing cache/settings.
Tried both normal 2.1.5 and nightly 2.1.5 versions.

Are you sure they're BTTV? because FFZ have been having some issues, not BTTV.

Might be FFZ instead, get them confused.

FFZ have been having issues lately with their servers, im 99% sure theres nothing to do with chatterino.
they should fix that soon on their part

Ah oke, but I could see the emotes in Twitch's site.
They seem to be working in Chatterino atm tho so you might be right about server issues.


why new ?

How comes that you use the __new__ method with self, even though it is a static method by definition?
https://github.com/jswhit/pyproj/blob/master/lib/pyproj/__init__.py#L608

Geod and Proj both have __new__ methods.  Looking at the python docs, it looks like self should be changed to cls for the __new__ method.  This is something I noted while looking at this and does nothing to answer your question, sebhahn.

I tried __init__ vs __new__ with the Geod class this a little when I was fixing issues #64 (PR #65).  IMHO Cython's documentation isn't clear enough about what is happening during object creation regarding __new__ and __cinit__.  So, some of this is my conjecture about how the functions __init__, __cinit__, and __new__.
For Proj, the __new__() is called first, which subsequently calls _proj.Proj.__new__(), which I assume is an alias for the __cinit__().   If you were to rename the Proj class function to __init__() it would happen after the function has been initialized.   What is in __new__() is python code that parses parameters or makes ellipse calculations and passes it up to something that the __cinit__ which interfaces with the rest of the C code (proj.4 library).
That could probably be moved directly into the Cython __cinit__ functions, but then the code would also have to be compiled along with the rest of it.
The __new__ function has a cls parameter (which is currently confusingly called self as mentioned previously), which should not be stored to because the memory has not yet be allocated, which was what was happening in issue #64 .
TLDR The best answer is that __new__ was a design decision to add functionality in python code, then calls the corresponding Cython code to initialize the C library facing parts.  __init__ would happen after __cinit__ meaning that the code in __new__ would not be able to feed into __cinit__.

This has changed in the most recent version 2.1.0.


Token usage calculation is not working for ChatOpenAI

Token usage calculation is not working for ChatOpenAI.
How to reproduce
from langchain.callbacks import get_openai_callback
from langchain.chat_models import ChatOpenAI
from langchain.schema import (
    AIMessage,
    HumanMessage,
    SystemMessage
)
chat = ChatOpenAI(model_name="gpt-3.5-turbo")
with get_openai_callback() as cb:
    result = chat([HumanMessage(content="Tell me a joke")])
    print(f"Total Tokens: {cb.total_tokens}")
    print(f"Prompt Tokens: {cb.prompt_tokens}")
    print(f"Completion Tokens: {cb.completion_tokens}")
    print(f"Successful Requests: {cb.successful_requests}")
    print(f"Total Cost (USD): ${cb.total_cost}")

Output:
Total Tokens: 0
Prompt Tokens: 0
Completion Tokens: 0
Successful Requests: 0
Total Cost (USD): $0.0

Possible fix
The following patch fixes the issues, but breaks the linter.
From f60afc48c9082fc6b09d69b8c8375353acc9fc0b Mon Sep 17 00:00:00 2001
From: Fabio Perez<EMAIL_ADDRESS>Date: Mon, 3 Apr 2023 19:06:34 -0300
Subject: [PATCH] Fix token usage in ChatOpenAI

---
 langchain/chat_models/openai.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/langchain/chat_models/openai.py b/langchain/chat_models/openai.py
index c7ee4bd..a8d5fbd 100644
--- a/langchain/chat_models/openai.py
+++ b/langchain/chat_models/openai.py
@@ -274,7 +274,9 @@ class ChatOpenAI(BaseChatModel, BaseModel):
             gen = ChatGeneration(message=message)
             generations.append(gen)
         llm_output = {"token_usage": response["usage"], "model_name": self.model_name}
-        return ChatResult(generations=generations, llm_output=llm_output)
+        result = ChatResult(generations=generations, llm_output=llm_output)
+        self.callback_manager.on_llm_end(result, verbose=self.verbose)
+        return result

     async def _agenerate(
         self, messages: List[BaseMessage], stop: Optional[List[str]] = None
--
2.39.2 (Apple Git-143)

I tried to change the signature of on_llm_end (langchain/callbacks/base.py) to:
    async def on_llm_end(
        self, response: Union[LLMResult, ChatResult], **kwargs: Any
    ) -> None:

but this will break many places, so I'm not sure if that's the best way to fix this issue.

having the same issue... following thread

Is this feature to know about the tokens before the actual execution or after execution ?

For me, after, as in the OP example

That's correct, @kinged007.
@hwchase17 Could you guide me to a possible solution so I can create a PR?

Sorry I am deviating from the problem, should we have something to calculate the tokens before hand as well?

also for embeddings

Related to https://github.com/hwchase17/langchain/pull/1924, pls take a look at the discussion there

is there any active working solution for this? @stephenleo  I tried yours but not working, unfortunately.

Still an issue today for me.  Code to reproduce.
model_name = 'gpt-4'

with get_openai_callback() as cb:
    chat4 = ChatOpenAI(
        temperature=0.1,
        model=model_name,
    )

response = chat4(chat_prompt)

print(cb)

Results:
Tokens Used: 0
	Prompt Tokens: 0
	Completion Tokens: 0
Successful Requests: 0
Total Cost (USD): $0.0

@captivus You have to call the model within the context manager for it to work. Since you call it outside the context, the token counting callback is already removed

@hinthornw this doesn't work for streaming responses though.
Is there any way to make OpenAICallbackHandler work with ChatOpenAI(streaming=True) ?
The issue is that on_llm_end is entered before the response is complete which leads to usage being 0.

This is how I managed to count tokens for streaming: true with callbacks:
const model = new ChatOpenAI({ modelName: "gpt-3.5-turbo", streaming: true });
const chain = new LLMChain({ llm: model, prompt })
const { text: assistantResponse } = await chain.call({
    query: query,
  }, {
    callbacks: [
      {
        handleChatModelStart: async (llm, messages) => {
          const tokenCount = tokenCounter(messages[0][0].content);
          // The prompt is available here: messages[0][0].content
        },
        handleChainEnd: async (outputs) => {
          const { text: outputText } = outputs;
          // outputText is the response from the chat call
          const tokenCount = tokenCounter(outputText);
        }
      }
    ]
  }
);

@liowalex I guess we really want the count that OpenAI is returning. Note that langchain will retry failed calls, which will also count towards the token rate limit. So input and output tokens are not the complete picture.

This is how I managed to count tokens for streaming: true with callbacks:
const model = new ChatOpenAI({ modelName: "gpt-3.5-turbo", streaming: true });
const chain = new LLMChain({ llm: model, prompt })
const { text: assistantResponse } = await chain.call({
    query: query,
  }, {
    callbacks: [
      {
        handleChatModelStart: async (llm, messages) => {
          const tokenCount = tokenCounter(messages[0][0].content);
          // The prompt is available here: messages[0][0].content
        },
        handleChainEnd: async (outputs) => {
          const { text: outputText } = outputs;
          // outputText is the response from the chat call
          const tokenCount = tokenCounter(outputText);
        }
      }
    ]
  }
);

Just curious what is this tokenCounter ?


Error connect moodle

Hello,
First of all thank you for this work which can help us enormously.
I encounter a small problem when I want to use the script.
I have no problem installing the "moodle" module.
On the other hand, when I want to connect to the moodle instance I have an error:
Invoke-RestMethod : Le serveur distant a retourné une erreur : (404) Introuvable.
Au caractère C:\Program Files\WindowsPowerShell\Modules\Moodle\0.7\public\Connect-Moodle.ps1:62 : 16
+     $result  = Invoke-RestMethod -Uri ([uri]::new($Uri, $path))
+                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Could not connect to http://<IP_ADDRESS>/moodle with the given token.
Au caractère C:\Program Files\WindowsPowerShell\Modules\Moodle\0.7\public\Connect-Moodle.ps1:70 : 9
+         throw "Could not connect to $Uri with the given token."
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Could not conne...he given token.:String) [], RuntimeException
    + FullyQualifiedErrorId : Could not connect to http://<IP_ADDRESS>/moodle with the given token.

It works fine when I use:
http://<IP_ADDRESS>/moodle/webservice/rest/server.php?wstoken=XXXX&wsfunction=core_webservice_get_site_info&moodlewsrestformat=json
{"sitename":"Test Julien","username":"apiweb","firstname":"api","lastname":"web","fullname":"api web","lang":"fr","userid":4,"siteurl":"http:\/\/<IP_ADDRESS>\/moodle","userpictureurl":"http:\/\/<IP_ADDRESS>\/moodle\/theme\/image.php\/boost\/core\/1600691171\/u\/f1","functions":[{"name":"core_webservice_get_site_info","version":"2020061501"},{"name":"auth_email_get_signup_settings","version":"2020061500"},{"name":"core_auth_confirm_user","version":"2020061501"}],"downloadfiles":0,"uploadfiles":0,"release":"3.9.1 (Build: 20200713)","version":"2020061501","mobilecssurl":"","advancedfeatures":[{"name":"usecomments","value":1},{"name":"usetags","value":1},{"name":"enablenotes","value":1},{"name":"messaging","value":1},{"name":"enableblogs","value":1},{"name":"enablecompletion","value":1},{"name":"enablebadges","value":1},{"name":"messagingallusers","value":0},{"name":"mnet_dispatcher_mode","value":0}],"usercanmanageownfiles":true,"userquota":104857600,"usermaxuploadfilesize":33554432,"userhomepage":1,"userprivateaccesskey":"df10d3059cf0f044a62442acdfa7b83c","siteid":1,"sitecalendartype":"gregorian","usercalendartype":"gregorian","userissiteadmin":false,"theme":"boost"}
thank you

Hi brilliantju!
It might be something to do with the fact that your Moodle instance lives under a /moodle folder on your server.
Can you try specifying a URL with a trailing slash in your Connect-Moodle call?
So instead of:
Connect-Moodle -Uri http://<IP_ADDRESS>/moodle -Token ...

... try:
Connect-Moodle -Uri http://<IP_ADDRESS>/moodle/ -Token ...

Let me know if that works!

Hmm, no, that doesn't help.
I don't think I expected a Moodle instance to be hosted somewhere other than the root. I will need to make some changes to fix this. Stay tuned!

Ok, update to version 0.8 and try again! Let me know if this solves your issue.

Bonjour Mabster,
Merci, pour ta réponse.
C'est mieux. Mais j'ai une nouvelle erreur.
PS C:\Windows\system32> C:\Users\jbrillant\Desktop\test_moodle.ps1
Connected to Test Julien as user apiweb.
Impossible d’appeler une méthode dans une expression Null.
Au caractère C:\Users\jbrillant\Desktop\test_moodle.ps1:12 : 9
+         $PsCmdlet.SessionState.PSVariable.Set("_MoodleUrl", $Url)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Impossible d’appeler une méthode dans une expression Null.
Au caractère C:\Users\jbrillant\Desktop\test_moodle.ps1:13 : 9
+         $PsCmdlet.SessionState.PSVariable.Set("_MoodleToken", $Token)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation : (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

I will see to modify the url to access moodle so that it is at the root.
Thank you

Can you show me the command you're running inside your "test_moodle.ps1" script?

It kinda looks like you have an old copy of the Module. I can see a line there referencing $Url, but we use $Uri in the newest versions of the module. Double check that you only have version 0.8 installed by typing:
Get-Module Moodle -List

It's fine !
The connexion it's OK.
PS C:\Windows\system32> Get-Module Moodle -List

    Répertoire : C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     0.8        Moodle                              {Add-MoodleCohortMember, Connect-Moodle, Copy-MoodleCourse, Disconnect-Moodle...}

But i am sorry.
I have a little problem..
When I want to test the order
Get-MoodleUser -UserName 'dupond' | Set-MoodleUser -Suspended $true
I have the following error.
Set-MoodleUser : Exception du contrôle d'accès
Au caractère Ligne:1 : 37
+ Get-MoodleUser -UserName 'dupond' | Set-MoodleUser -Suspended $true
+                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Set-MoodleUser

Thank you

Ok so that's Moodle permissions. The account you are connecting to your Moodle instance with does not have permission to modify users. Does that make sense? I don't know enough about Moodle administration to help you fix that.

OK, I'll take a look at the rights.
The user has the role: "manager"
Thank-you for your prompt response.

Ok I'm gonna close this issue 'coz the original problem of not working with Moodle instances not in the root is now fixed. Thanks for helping me find that bug! Feel free to open a new issue if you still have problems!


FTW!

Add drewc/ftw (For The Web!) to gerbilPackages-unstable. Needed for recent glow-lang work.

LGTM


io_uring support is used when available

Although early days on Netty io_uring support it has some pretty positive performance improvements over epoll. As an extension to the work for that (#2444) would be great to get this too where it's available.

Closing; Helidon 4.x is no longer based on Netty


cudnn_cudatoolkit_11_0: 8.1.0 -> 8.1.1

Motivation for this change
Changelog:
https://docs.nvidia.com/deeplearning/cudnn/release-notes/rel_8.html#rel-811
Also change the builder to accept the hash argument for SRI hashes.
Things done

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

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

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

They seem to be including CuDNN now, which is great! But something seems to have gone wrong there with symbolic links. I wil have a look tonight. In the meanwhile, I'll put this into draft to avoid that it gets merged.

But something seems to have gone wrong there with symbolic links.

I think lsd --tree counts the symlinks together which means the 6.6GB is definitely wrong but the 2.3GB is counted with du which is correct.

But something seems to have gone wrong there with symbolic links.

I think lsd --tree counts the symlinks together which means the 6.6GB is definitely wrong but the 2.3GB is counted with du which is correct.

Then it is kinda expected. CUDA is very big and now they added CuDNN as well (interestingly not in the release notes). I could, however, look if we can remove the static CuDNN library, but I'll have to do some test builds.

Reopening this PR, since everything looks fine. People who do not want the large static library can use the existing removeStatic option.


[nuxt] Error while initializing app TypeError: "fs$ReadStream is undefined"

Version
v2.1.0
Reproduction link
https://github.com/hichamelkaddioui/nuxt-fs-bug-report
Steps to reproduce

Clone https://github.com/hichamelkaddioui/nuxt-fs-bug-report
Run npm install
Run npm start and visit http://localhost:3000
Open browser's console

What is expected ?
No error with packages using fs
What is actually happening?
Console error [nuxt] Error while initializing app TypeError: "fs$ReadStream is undefined" (see screenshot)

Additional comments?
Repo is just a minimal nuxt app trying to use fs-extra. To first make fs work with nuxt, I added extra configuration as mentioned in #1485.

This bug report is available on Nuxt community (#c7897)

I dont think fs-extra supposed to work in browser, so the error is valid

I dont think fs-extra supposed to work in browser, so the error is valid

True, no fs library is supposed to. I realized that what I wanted perform was server-side, not client-side.
I just wrapped my code like so:
if (process.server) {
   // do fs stuff
}


Ship watch is broken in 0.23.0

Expected behavior
after a successful ship init, ship watch should block until an upstream change is detected
Actual behavior
after a successful ship init, ship watch immediately fails
Information

Ship version: 0.23.0
Docker version: ...
Command line run:

ship init https://github.com/helm/charts/tree/master/stable/datadog
ship watch

Steps to reproduce the behavior

ship init https://github.com/helm/charts/tree/master/stable/datadog
ship watch
Error: Could not determine application type of upstream https://github.com/helm/charts/tree/master/stable/datadog\ngithub.com/replicatedhq/ship/pkg/specs

Fixed by #697, part of release 0.24.0. A basic ship watch sanity check has been added to the init and init_app integration test suites to hopefully catch similar regressions in the future.


URLs returned by /search signed twice with token authentication

Describe the bug
I configured "Stream Security"/token based authentication on an Opencast 11 distributed setup on Docker using the minimal configuration example from the docs. Everything works when doing the manual testing steps. But engage UI does not work: thumbs and videos are not loading because the URLs delivered by the "/search/" API are signed twice. URLs delivered by the external API (curl 'https://opencastadmin.htw-berlin.de/api/events?sign=true&withpublications=true') are signed correct.

curl https://opencast.htw-berlin.de/search/episode.json:
[...]
                            {
                            "id": "4b3132c7-ba44-4700-bf3c-aebbbe7517bb",
                            "type": "presentation/player+preview",
                            "ref": "track:track-5",
                            "mimetype": "image/jpeg",
                            "tags":
                            {
                                "tag": "engage-download"
                            },
                            "url": "https://ocdownload.htw-berlin.de/static/mh_default_org/engage-player/d1c1f0e4-574a-4105-8e54-d3239b1d8ed4/82f65169-6327-49da-995b-033debdb3899/file_example_MP4_480_1_5MG_3_000s_player.jpg?policy=eyJTdGF0ZW1lbnQiOnsiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6MTY0MzI4NjIyOTcxMX0sIlJlc291cmNlIjoiaHR0cHM6XC9cL29jZG93bmxvYWQuaHR3LWJlcmxpbi5kZVwvc3RhdGljXC9taF9kZWZhdWx0X29yZ1wvZW5nYWdlLXBsYXllclwvZDFjMWYwZTQtNTc0YS00MTA1LThlNTQtZDMyMzliMWQ4ZWQ0XC84MmY2NTE2OS02MzI3LTQ5ZGEtOTk1Yi0wMzNkZWJkYjM4OTlcL2ZpbGVfZXhhbXBsZV9NUDRfNDgwXzFfNU1HXzNfMDAwc19wbGF5ZXIuanBnIn19&keyId=default&signature=aeda95221df35f5813ecea64367c88ce08f473b3f5f69526c9101c7d58db59b2&policy=eyJTdGF0ZW1lbnQiOnsiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6MTY0MzI4NjIyOTcxOH0sIlJlc291cmNlIjoiaHR0cHM6XC9cL29jZG93bmxvYWQuaHR3LWJlcmxpbi5kZVwvc3RhdGljXC9taF9kZWZhdWx0X29yZ1wvZW5nYWdlLXBsYXllclwvZDFjMWYwZTQtNTc0YS00MTA1LThlNTQtZDMyMzliMWQ4ZWQ0XC84MmY2NTE2OS02MzI3LTQ5ZGEtOTk1Yi0wMzNkZWJkYjM4OTlcL2ZpbGVfZXhhbXBsZV9NUDRfNDgwXzFfNU1HXzNfMDAwc19wbGF5ZXIuanBnP3BvbGljeT1leUpUZEdGMFpXMWxiblFpT25zaVEyOXVaR2wwYVc5dUlqcDdJa1JoZEdWTVpYTnpWR2hoYmlJNk1UWTBNekk0TmpJeU9UY3hNWDBzSWxKbGMyOTFjbU5sSWpvaWFIUjBjSE02WEM5Y0wyOWpaRzkzYm14dllXUXVhSFIzTFdKbGNteHBiaTVrWlZ3dmMzUmhkR2xqWEM5dGFGOWtaV1poZFd4MFgyOXlaMXd2Wlc1bllXZGxMWEJzWVhsbGNsd3ZaREZqTVdZd1pUUXROVGMwWVMwME1UQTFMVGhsTlRRdFpETXlNemxpTVdRNFpXUTBYQzg0TW1ZMk5URTJPUzAyTXpJM0xUUTVaR0V0T1RrMVlpMHdNek5rWldKa1lqTTRPVGxjTDJacGJHVmZaWGhoYlhCc1pWOU5VRFJmTkRnd1h6RmZOVTFIWHpOZk1EQXdjMTl3YkdGNVpYSXVhbkJuSW4xOSZrZXlJZD1kZWZhdWx0JnNpZ25hdHVyZT1hZWRhOTUyMjFkZjM1ZjU4MTNlY2VhNjQzNjdjODhjZTA4ZjQ3M2IzZjVmNjk1MjZjOTEwMWM3ZDU4ZGI1OWIyIn19&keyId=default&signature=39a037d383941310fb18eb52565b075380efc93212cf467c05d72d3dd010d43c",
                            "size": 20627
                        },
[...]

To Reproduce
Steps to reproduce the behavior:

Disable static resource authentication by setting authentication.required = false in etc/org.opencastproject.fsresources.StaticResourceServlet.cfg
Configure "Stream Security" on Opencast 11 as described here
Verify correct setup by doing the testing steps
Open the engage UI in browser see that thumbnails and videos fail to load
Open browser dev tools and check the cause of failed resources. You should see that URLs are signed twice and the URL verification fails (Status Code 400)
Verify that URLs are signed twice by curl https://opencast.htw-berlin.de/search/episode.json

Environment Information 1

OS: Ubuntu 20.04
Docker Version: 20.10.7-0ubuntu5~20.04.2
Browser Chromium
Opencast version 11.3 Docker images

Environment Information 2

OS: Ubuntu 20.04
Browser Chromium
Opencast 11.4.0 - 248a5fc - built on 2022-02-23

etc/org.opencastproject.security.urlsigning.filter.UrlSigningFilter.cfg
# The UrlSigningFilter is a verification component that works with the UrlSigningVerifierImpl to protect Opencast
# internal resources. The filter uses a set of regular expressions to determine which requests to an Opencast instance
# need to be verified.

# Enable or disable the UrlSigningFilter. If disabled no internally provided files will be protected by Stream Security
#enabled=false
enabled=true

# Enable or disable strict checking of resources. Strict checking includes verifying that the entire requested URL
# matches the one in the policy. Non-strict checking will only verify that the path to the resource matches the policy.
# This is useful if requests for signed material is failing due to hostname changes due to redirects, players adding
# extra URL information such as ports etc.
strict=true

# This configuration file defines the urls that will be protected by the UrlSigningFilter filter. These endpoints will
# require a signed url by stream security before a file can be downloaded

# Protects: /files/collection/{collectionId}/{fileName}
url.regex.collection=.*files\/collection\/.*

# Protects: /files/mediapackage/{mediaPackageID}/{mediaPackageElementID}
# and Protects: /files/mediapackage/{mediaPackageID}/{mediaPackageElementID}/{fileName}
url.regex.mediapackage=.*files\/mediapackage\/.*

# Protects: /staticfiles/{uuid} but not /staticfiles/{uuid}/url
url.regex.staticfiles=(?\=(.*staticfiles.*))(?=^(?!.*staticfiles.*url|.*docs.*).*$)(.*)

# Protects: /archive/archive/mediapackage/{mediaPackageID}/{mediaPackageElementID}/{version}
url.regex.archive=.*archive\/archive\/mediapackage\/.*\/.*\/.*

# Protects files hosted by the built in jetty server for engage
url.regex.engage=.*static\/engage-player.*

# Protects files hosted by the built in jetty server for previews / editing
url.regex.internal=.*static\/internal.*

# According to https://docs.opencast.org/r/11.x/admin/#configuration/stream-security/
url.regex.files=.*ocdownload.htw-berlin.de/static/.*

etc/org.opencastproject.security.urlsigning.provider.impl.GenericUrlSigningProvider.cfg
key.default.secret=6EDB5EDDCF994B7432C371D7C274F
key.default.url=https://ocdownload.htw-berlin.de/static/

etc/org.opencastproject.security.urlsigning.verifier.impl.UrlSigningVerifierImpl.cfg
key.default=6EDB5EDDCF994B7432C371D7C274F

I can confirm that Opencast 11.4.0 - 248a5fc - built on 2022-02-23 installed on Ubuntu 20.04 via package is also affected.

@mliradelc any news on this? Is there something I can help with?

Hi, sorry for still not looking this, I just got married a few weeks ago and I'm taking back all my duties.
Well, I think the problem with double signing maybe comes from my PR, in the meantime you can look at #3058, We haven't any issues with that here, I recommend you to start there.

@jojoob Last week was submitted this PR #3674 , I believe that will solve your issue. Can you review it?

Hi @mliradelc I cherry-picked the patch onto the code of Opencast version 11.6: I can confirm it fixes the double signing problem. :+1:

Solved with #3674


fix(ci-cd): add commitlint and husky

Description
Add commitlint and husky commit hooks
Fix formatting

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Bug: Certain nkit.iso formatted backups do not work with Gamecube Backup Manager

Expected behavior:
Any valid "good" dump of a game ISO, converted to NKit v1.4's .nkit.iso format, should be importable in Gamecube Backup Manager.
Description of issue:
A rare few of my good dumps, once converted to .nkit.iso, do not import in Gamecube Backup Manager, and instead throw the error: The image is too small!

Files I've received this error message from, so far:

Title: Casper - Spirit Dimensions (USA).nkit.iso

Game ID: GS9E6S
md5sum: 76f062b4ae094780d371e47fdf0702ef
CRC-32: afae94cd

Title: Mario Power Tennis (USA) (Rev 1).nkit.iso

Game ID: GOME01
md5sum: 60752fd6c7037486b599653b3045cad1
CRC-32: ef719371

Title: Shrek Extra Large (USA).nkit.iso

Game ID:** GS9E6S
md5sum: e54b297ea5d89a2e6d98a81a04ed6df6
CRC-32: f2b6e2c1

Dolphin's Properties > Verify tab does not report any unique errors with these files
The below errors display on all of my 200+ .nkit.iso files, but only the above 3 give Gamecube Backup Manager trouble, so far:

"This disc image has an unusual size. This will likely make the emulated loading times longer. When using NetPlay or sending input recordings to other people, you will likely experience desyncs if anyone is using a good dump."

"This disc image is in the NKit format. It is not a good dump in its current form, but it might become a good dump if converted back. The CRC32 of this file might match the CRC32 of a good dump even though the files are not identical."

However, if I convert these files back to full-sized ISOs, Dolphin now shows the message This is a good dump., as expected.
The full-sized version of these ISOs can be read by Gamecube Backup Manager, without issue;
The trimmed versions created by NKit v1.4 do not.
The interesting thing about this is that running the Install Game (Scrub) operation against these files results in game.iso files which are approximately the same size as the .nkit.iso files, anyway.
The resulting game.iso files in Dolphin report:

"This disc image has an unusual size. This will likely make the emulated loading times longer. You will likely be unable to share input recordings and use NetPlay with anyone who is using a good dump."

I'm also getting the The image is too small! error with the following games:

Title: Grooverider Slot Car Thunder.nkit.iso

Game ID: GVRE7H
md5sum: b92725ea559d70f051f7098d680fec12
CRC-32: 9dd1131e

Title: Tonka - Rescue Patrol

Game ID: GTQE6S

Is this issue considered closed since PR #59 was merged in?
Is any further testing or messaging to the user required?

I would defnitely not consider #59 a fix for this issue, it's just a temporary measure to let the program be used with nkit.iso files for now without throwing size errors. There are no checks to make sure the nkit.iso file is valid, beyond reading the header data. Even worse is that this fix does nothing for the installed files once they get named to game.iso or disc2.iso. The program will not recognize that they're nkit.iso files, and continues to throw the same image too small error.
Since the changes in #59 are still better than nothing, I made a PR for them despite all these shortcomings, but someone who understands nkit.iso format will need to add file format checks beyond file extension, and also add integrity checks.

@Brycey92 @jmynes @laetemn Can we discuss further on #42 ?


Update Readme file

Update Readme file for my personal repository.

Can i work on this @codemaniac-sahil ?

Yes @clairecharles

I will suggest you to make this readme file on your own and write about yourself, I can surely help by suggesting you ways to make it look good. @codemaniac-sahil

Just write the template


snapshot only-testing for specify file can't work

As we know when we run xcode script "xcodebuild -only-testing:TestFileName", it will only run the specified files.
But when run "fastlane snapshot --xcargs "only-testing=TestFileName", it seems not work, all test files will run in current scheme.
I know we can using single scheme and specify to run it.
But does any way to specify file to run the test and produce screenshot ?

@84798012 can you try it with
fastlane snapshot --xcargs "'-only-testing:TestFileName'"

@hjanuschka ,it works like a charm.
Thank you very much!!


[tracking] Add stub for unit tests

https://github.com/RedHatInsights/insights-results-aggregator-mock/issues/98

First part: https://github.com/RedHatInsights/insights-results-aggregator-mock/pull/160
Second part: https://github.com/RedHatInsights/insights-results-aggregator-mock/pull/162
Third part: https://github.com/RedHatInsights/insights-results-aggregator-mock/pull/166


changed dependency syntax to latest Swift-4 Syntax.

Codecov Report

Merging #42 into master will decrease coverage by 1.98%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master     #42      +/-   ##
=========================================
- Coverage   74.78%   72.8%   -1.99%
=========================================
  Files           9       6       -3
  Lines         579     239     -340
  Branches       54       0      -54
=========================================
- Hits          433     174     -259
+ Misses        120      65      -55
+ Partials       26       0      -26

Flag
Coverage Δ

#KituraSession
72.8% <ø> (-1.99%)
:arrow_down:

Impacted Files
Coverage Δ

Sources/KituraSession/SessionState.swift
55% <0%> (-6.54%)
:arrow_down:

Sources/KituraSession/CookieCryptography.swift
66.66% <0%> (-6.42%)
:arrow_down:

Sources/KituraSession/Session.swift
68.62% <0%> (-3.44%)
:arrow_down:

Sources/KituraSession/InMemoryStore.swift
70% <0%> (-1.43%)
:arrow_down:

Sources/KituraSession/CookieManagement.swift
91.17% <0%> (-1.33%)
:arrow_down:

Sources/KituraSession/RouterRequest+Session.swift
100% <0%> (ø)
:arrow_up:

Tests/KituraSessionTests/TestSession.swift

Tests/KituraSessionTests/KituraTest.swift

Tests/KituraSessionTests/CookieUtils.swift

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 d72430d...7214a91. Read the comment docs.