Not working on Android | number of channels is -1

Sounds are working on iOS using the below code but not working on Android. I have notification.wav file in the android/app/src/main/res/raw directory.  Help please.
const s = new Sound('notification.wav', Sound.MAIN_BUNDLE, (e) => {
      if (e) {
        console.log('error', e);
        return;
      }
      console.log('sound: duration in seconds: ' + s.getDuration() + 'number of channels: ' + s.getNumberOfChannels());
      s.play(() => s.release());
    });

On log I am getting this but no sound played. And the number of channels is -1

sound: duration in seconds: 0.542number of channels: -1

change  your react-native-sound package dependency by "react-native-sound": "git+https://github.com/zmxv/react-native-sound.git#fix_android_network_sound"
try npm install again.

@Winglonelion
Installed the react-native-sound with your PR. Below is the code to play the sound. On iOS it plays the sound. On Android there are no errors and it prints the log "sound played" but there is no sound.
playTapSound(){
    const s = new Sound('../sounds/tap.wav', (e) => {
      if (e) {
        console.log('error', e);
        return;
      } else{
        console.log('sound loaded successfully: '+s.isLoaded()+" volume is "+s.getVolume())
        s.play((success) => {
          if(success){
            console.log('sound played')
            s.release();
          } else{
            console.log('sound failed to play')
          }
        });
      }
    });
  }

Can you try this on new version 0.10.2? This should be fixed

@benvium It worked just the first time but after that i doesn't work ever. After closing the app and reopening, the sound does not work even for the first time too. All the time I am getting the sound played callback though.

@rohitgoyal Can you have a go with react-native-sound-demo and see if that works for you?

Tried it. No sounds in react-native-sound-demo on android too. :-/

Which device and OS are you on?

Google Nexus 6P
OS: 6.0.0
API 23

I have the same problem.
"duration in seconds: 3.63number of channels: -1"
but when i try to play it i receive this error from callback:
"playback failed due to audio decoding errors"

bump

I have the same problem.
"duration in seconds: 3.63number of channels: -1"
but when i try to play it i receive this error from callback:
"playback failed due to audio decoding errors"

The same here. Running on android device.

"duration in seconds: 3.63number of channels: -1"
but when i try to play it i receive this error from callback:
"playback failed due to audio decoding errors"

The same here.
Samsung Galaxy S6
OS: 5.1.0
API 22

Anybody has solved the problem?

solved... just put "music.play()" out of constructor error part, like this:
const music = new Sound('nargiz_vdvoyom.mp3', Sound.MAIN_BUNDLE, (error) => {
if (error) {
console.log('failed to load the sound', error);
return;
}
// loaded successfully
console.log('duration in seconds: ' + music.getDuration() + ' number of channels: ' + music.getNumberOfChannels());
	// Play the sound with an onEnd callback
		music.play((success) => {
			if (success) {
				console.log('successfully finished playing');
			} else {
				console.log('playback failed due to audio decoding errors');
			}
		});
	});

What @DavitVosk means is to put the play() call inside the constructor callback. This has solved playback for me.

new Sound() uses android.media.MediaPlayer.prepareAsync(). So new Sound() returns immediately and it could have been not prepared completely. You could try to add a timeout, but it's most save to start playing from the onError callback, I think. (and the name onError is a bit confusing)

And the original title of this issue is:

Not working on Android | number of channels is -1

But that is not the real issue, because it will always return -1 on Android because getNumberOfChannels() hasn't been implemented on Android. See also:  #258

@rohitgoyal Is your problem fixed with the latest version? I see that you already were playing from the onError callback

@gvenk I got it working while playing from the Main Bundle but it still doesn't work from a dir path.
In case of Main bundle it doesn't work with an Emulator.
Lot of people might be testing it on an Emulator.

@rohitgoyal if you want to get it working from a dir path in the app, you have to remove the second parameter Sound.MAIN_BUNDLE. The onError handler must be the second parameter.
Annoying it's not working on the emulator. I don't have any problem with the emulator, so it's difficult to debug :-(

@gvenk I did try it after removing the second parameter only. It didn't work on Android but worked on iOS(Check 3rd reply on the thread).
On Emulator it might be specific emulator issue as well. I tried on genymotion emulator with following config
Google Nexus 6P
OS: 6.0.0
API 23

@rohitgoyal ah, I overlooked that comment. Was this on a real device, or emulator?
Ah, I don't have access to the genymotion emulator, so I'm not able to debug this, sorry.

@gvenk On a real device.
No issues. As of now things are working for me using Main Bundle :)

Ok, @rohitgoyal so this issue can be closed according to you?
Maybe we have to add a note about which emulators we know are working with this project.

@gvenk Yeah I guess. You can add the note for sound not playing on emulator and sound not playing on real android device using dir path.

@gvenk does this relate to switching from true / false?

@trepidity don't think so

// audio is a remote url
s = new Sound(audio, null, (e) => {
        if (e) {
            console.log('error', e);
        } else {
            console.log('sound loaded successfully: ' + s.isLoaded() + " volume is " + s.getVolume());

            s.play((success) => {
                if (success) {
                    console.log('sound played');
                    s.release();
                } else {
                    console.log('sound failed to play')
                }
            });
        }
    });

this solved my issue, Sound.MAIN_BUNDLE and play() took place inside the callback function
React = 16.5.2
React-Native = 0.57.1
React-Native-Sound = 0.10.9

@Faisal-Manzer But does this mean that we have to initiate the same sound as new, every time we use it? I used to put the sound in a window variable (e.g. window.sound1 = new Sound(...), so that I could just play it later in a different route. It used to work, now not. What is the change needed? Thanks!

Android could not play the sound embedded in the bundle. There is no problem in iOS (even you can initiate the sound once and then use play() function consecutively.

Im still experiencing this issue on android still. (June 7th, 2021)
Device: OnePlus 7Pro - Android 10
I am trying to play from network
the number of channels is always -1;
let s;
// component
() => {
const onPressPlay = () => {

        if(playing){
            s.pause();
            setPlaying(false);
        }else{
            if(!songLoaded){
                setSongLoading(true)
                s = new Sound(audio_src, null, (error) => {
                    if(error){
                        console.log(e);
                        Alert.alert("Audio Error", error);
                        setSongLoading(false);
                        return;
                    }

                    console.log("Success Loading Audio");
                    console.log('duration in seconds: ' + s.getDuration() + 'number of channels: ' + s.getNumberOfChannels());

                    setSongLoading(false);
                    setSongLoaded(true);
                    s.play((success) => {
                        if(success){
                            console.log("Success Playing Audio");
                            setPlaying(true)
                        }else{
                            console.log("Error Playing Audio");
                        }
                    })
                });
                setSongLoaded(true);
            }else{
                s.play((success) => {
                    if(success){
                        console.log("Success Playing Audio");
                        setPlaying(true)
                    }else{
                        console.log("Error Playing Audio");
                    }
                });
            }
        }
    }
}


animateToRegion should have a callback argument

Feature Request

Why it is needed

Would make possible to do something after the animation.
Possible implementation

Add a callback param in animateToRegion that's get executed after the animation is played.
Code sample

mapRef.animateToRegion(region, duration, callback)

+1

Out of curiosity, what do you want to use it for?

Callbacks after animations are pretty common and can be useful in multiple situations. As an example, if I use it to center the camera on a coordinate, I could use the callback to know when the camera is now centered.

@nabati
I would use it to search that new region automatically when the animateToRegion has finished, or if someone selects a location, the map animates there, open the callout during the callback function.

+1

+1

+1

+1

+1

+1

You can use MapView's onRegionChange and onRegionChangeComplete for this purpose, as these events are also fired when using animateToRegion.

Hey, let me describe my use case. To me it feels it can not be achieved without callback or promise on the animateToRegion function.
I'm implementing my own followsUserLocation functionality. The docs say it is Apple only and I want my custom user location icon anyway.
I'm using animateToRegion to navigate the map to users current position, when a "zoom to current location" button is pressed. Since then, I want the map to follow users location (using useEffect and the same zooming function). If animateToRegion was async function and/or had a callback, I would call my setFollowUserLocation(true) state function when the animation is done. I'm currently doing it using setTimeout (with timeout slightly longer than the animation duration) which is just sad.
I use onRegionChange to unset the followUserLocation flag when user drags the map manually, or presses my other button to zoom elsewhere (specifically to zoom to see all the POIs on the map).
Perhaps I'm missing some other easy way to implement this without callback, but I can't really see it.

Chiming in here because I had issues implementing both animateCamera and animateToRegion together because there's no way to know when the animation is finished (long story, but I can't just use the center property in animateCamera -- I need to set latitudeDelta and longitudeDelta dynamically).
I was able to implement a pseudo-callback on animateToRegion using React Native's InteractionManager:
this.mapRef?.animateToRegion({
  latitude,
  longitude,
  latitudeDelta,
  longitudeDelta,
})

InteractionManager.runAfterInteractions(() => {
  this.animateHeading()
})


Introduced global throttling for Marathon health checks (#6850)

Summary:

introduced a new command line argument --max_concurrent_marathon_health_checks
that defines the maximum number of concurrent Marathon health checks (HTTP/S and TCP)
internally all Marathon health checks are now using the same materialized akka-stream
MergeHub which throttles the health checks
HealthCheckWorkerActor became HealthCheckWorker returning a Future[HealthResult]

JIRA issues: MARATHON-8596

This is a forward port of https://github.com/mesosphere/marathon/pull/6850.

@alenkacz, @zen-dog approved it 😉


Change the allow_downgrade pseudo-default in the package provider superclass to true

package providers that don't know anything about allow_downgrade should
get true by default.
Signed-off-by: Lamont Granquist<EMAIL_ADDRESS>

Strangely this got added in c196fa94b5353402916d96b6b92ddb6a1830ab25 almost 4 years ago.


Security issue with duplicit-load-prevention example

Hi!
The duplicit-load-prevention example is subject to XSS injection.
The example add a /addTranslations route that seems to modify the translations stored in memory.
How to reproduce:

Start sveltekit in the example: npm run preview
call /addTranslations manually, with a malicious value for home.text:

curl 'http://localhost:3000/addTranslations' -X POST -d '{
    "translationProps":[
        {"en":
            {"menu.home":"home",
                "menu.about":"About",
                "menu.notification":"You have {{count:gt; 0:{{count}} new {{count; 1:message; default:messages}}!; default:no messages...}}",
                "home.title":"Welcome to SvelteKit",
                "home.text":"Visit kit.svelte.dev to read the documentation"
            }
        },{"en":["menu",
                "home"]}]
}'

Results:

I don't really understand duplicit-load-prevention example but, considering the risk of using it, I think it should be removed from this repo (and maybe advertise that addTranslations() sould never be called with input from an untrusted source).

Hi @Baldinof thank you for letting me know!
Anyway, i don't think this is really about addTranslations - i would say it's more about Svelte's @html – as noted in Svelte's docs:

Svelte does not sanitize expressions before injecting HTML. If the data comes from an untrusted source, you must sanitize it, or you are exposing your users to an XSS vulnerability.

FYI the duplicit-load-prevention example is there, because currently SvelteKit does not provide a way how to load translations only once (on server) and pass it on to the client (during the first page load). It will be replaced later when layout endpoints are implemented...
Please, correct me if I'm wrong and I will reopen this issue...

It's not just about XSS, even if properly escaped, the example still allows to change server translations :/
I don't think that's what users of this package would expect, by just reading the documentation, and take inspiration from the example you get a vulnerable app (without any warning in the example code).
If duplicit-load-prevention is really something needed, I think the example should show a secured way to do it.

Well, i don't have any stats, but I think that duplicit-load-prevention example is just an edge case for apps where every single api request matters. Anyway, what you are saying does make sense, so i'll add a note to the example's docs as this solution will be replaced before SvelteKit 1.0.0..


Use newest versions of stylecheck packages

@asi1024 Could you update autopep8 etc. as well?

I'll kick the CI after the coming code freeze to save the CI resources.

pfnCI, test this please.

Jenkins CI test (for commit 7e815a33fac94876a543e979865545c19725c9ea, target branch master) succeeded!


Merge feature/body into develop branch

Merge feature/body branch into develop branch for the next step to merging with main branch

Merge the secondary detailed infromation


Ext: Istio Virtual Services

Description
Changes proposed in this pull request:

[x] Virtual Services List view
[x] Virtual Service Form

[x] HTTP
[x] Modified KeyValuePair widget to handle the data structure: map<string, StringMatch>. Added docs including modifications.
[x] TLS
[x] TCP
[x] Gateways & Hosts
[x] Placeholders

[x] Virtual Services Details view

[x] Linking to Gateways in the Table
[x] ResourceGraph relations
[x] Collapsible sections for:

[x] TCP
[x] TLS
[x] HTTP

[x] Translations

To improve User Experience when using a modified KeyValuePair widget, the Notification widget will be used.
Related issue(s)
Resolves #1731

/retest

/retest

/retest

The component bugs when the same label is entered twice

I think these are present in the schema but the form doesn't display them:
spec[].http.name
spec[].http.directResponse

/retest

/test pre-busola-integration-test-k3s-namespace

/test pre-busola-integration-test-k3s-namespace

/test pre-busola-integration-test-k3s-namespace

/test pre-busola-integration-test-k3s-namespace

/test pre-busola-integration-test-k3s-namespace

/test pre-busola-integration-test-k3s-cluster


HHH-14059 Cannot use full qualified enum name which has two uppercase alphabet prefix

Hi,
Here is the jira issue about this pull request. Please review whether it's ok.

applied upstream.
Thanks @zhengyhn


⚠ Bofrost.at has degraded performance

In 3aa5a20, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1405 ms

Resolved: Bofrost.at performance has improved in 26ea0b9.


Refactor: Remove project.fsharp.json

It might be possible to soly use the APIs from Project in DNX, while still maintaining file order. If not, simply merge the two files together somehow, instead of keeping them as two files.

I can look into this.
I was thinking that you could just have an "fsharp" configuration section in the project.json alongside the "dependencies" and "commands" and whatnot.
{
  "version": "1.0.0-*",
  "description": "",
  "authors": [ "" ],
  "tags": [ "" ],
  "projectUrl": "",
  "licenseUrl": "",

  "dependencies": {
    "FSharp.Dnx": { "type": "build", "version": "" },
    "Microsoft.AspNet.Testing": "1.0.0-*",
    "xunit.runner.aspnet": "2.0.0-aspnet-*"
  },

  "commands": {
    "test": "xunit.runner.aspnet"
  },

  "frameworks": {
    "dnx451": { }
  },

  "compiler": {
    "name": "F#",
    "compilerAssembly": "FSharp.Dnx",
    "compilerType": "FSharp.Dnx.FSharpProjectCompiler"
  },

  "fsharp": {
    "autoDiscoverFsi": true,
    "files": [
      "test.fs"
    ]
  }
}

Let me know what you think

Yeah, that was my thoughts too. At least for the initial version.


Change UID and GID to USER_ID and GROUP_ID

According to https://github.com/dhs-ncats/pshtt/blob/1d3db29e69b5af5d8f6dfdb40a2ab4bbc9cac1c7/entrypoint.sh the environment variables should be USER_ID and GROUP_ID instead of UID and GID, so this change updates README.md with the correct instructions.

👍 👍   yup!


elf: Heap-safe backtrace can survive OOM

It's also nice to know that backtrace kinda works with stripped, just no function names. Exceptions work normally, and all other strings are present.


Update base.php

translated warning
changed unauthorized into "better german"

A new inspection was created.

The inspection completed: No new issues

I'll trust your German over mine 😉 Thanks @fellwell5  - it'll be available in the next patch update, most likely on Monday. Cheers!


Use bot.chatType

Are there more cases like this?

https://github.com/grammyjs/website/blob/main/site/docs/plugins/ratelimiter.md?plain=1#L203-L239

Do you want to quickly fix it yourself?


Storage options + pin all photos

Still working on this, but wanted to start sharing the flow that seems to work

@asutula would you be willing to jump into this branch and see about integrating it into your thread share flow? the trick is simply that

wallet photos will be pinned to wallet before any remote pinning, so need to do a remote pin from an existing wallet which is different than the current setup
for remote pin, we may want to do it right from the wallet data and not the path data, since path could go away

this rough stab worked, https://github.com/textileio/textile-mobile/pull/481 but just isn't right i don't think

Yea, can do.
On Sep 9, 2018, 17:40 -0500, Andrew W. Hill<EMAIL_ADDRESS>wrote:

@asutula would you be willing to jump into this branch and see about integrating it into your thread share flow? the trick is simply that

wallet photos will be pinned to wallet before any remote pinning, so need to do a remote pin from an existing wallet which is different than the current setup
for remote pin, we may want to do it right from the wallet data and not the path data, since path could go away

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

We can talk about this on the call, but just want to be sure I understand the use case around adding photos to the wallet without remote pinning. As a user, why would I want to do that?

Moved to PR 480


ML-402: Update ML.Tests.Explanatory.Cluster.ecl

Update the test code for K-Means and Yinyang K-Means to fix the issue of import data not found.

@richardkchapman  Reviewed and good to merge.


Add action to enable/disable control mouse explicitly

Updating the behavior of the action to match the original toggle_control function, which allows passing a bool to enable or disable the control mouse mode. I want to enable and disable the control mouse mode via hotkeys specified in a talon file. This allows a hot key to have a consistent behavior regardless of whether the mode was initially enabled or disabled. If no bool is passed in, it maintains the current behavior of flipping the current mode.

I'm personally okay with this style.


fix typo

fixed a typo in the documentation.

Thanks for snagging this @maikroservice ! Let's get your first PR merged!

<3 thank you :) hopefully many more will come.


Fixes for missing directories, default files and Node.js availability

Hi, this PR cleans up a few issues I encountered during testing:

Corrects the module name so everything links up properly.
Adds the logs directory if it’s missing to avoid runtime errors.
Fixes the “default rules file not found” error by placing a default.ztrules file inside the rules folder.
Adds a fallback to use system-wide Node.js if the local one isn’t available (I've already installed Node on my system, so I don’t need the local executable).

Feel free to edit my code if there’s anything you’d like to change. I’m already working on new improvements and fixing other issues I’ve encountered recently.

I've also added a flow rules helper inside the rules editor.


Add a license

I'd like to include this project as part of a React Native app, but couldn't find the preferred license to do so.
Please add a license so this project can be used in other projects (or not).

This applies to us as well. Please license as MIT or something similarly permissive.

Added MIT License


I agree to open merging together our repos

Hello,i have been writing new version 2.0 of this script and i will want to create new repository for it with name "multiPopupJS", and so i agree to open merging together our repo.

oh great! I commented on the original discussion here:
https://github.com/cyberua/modalJS/issues/1


Front End Communications to Notify Students which path to take  at Part-Time Release

We need to communicate to students that Part-Time is within SIMS, and Full-Time is within SFAS
This can be accomplished through combination of:

Banner message on SABC website advising them of which system to use (James Harada Down responsible for this - not devs)
Banner message on SIMS login page and SIMS landing page notifying them that SIMS is for Part-Time only

@michesmith I think James confirmed that this work is indeed a blocker to launch, but does NOT implicate Dev resources in any way. I.e. its being handled between James and IMB folk, and therefore can be included in Yash's Project Plan but doesnt necessarily need to be reflected in ZenHub .
If this is just placeholder for us not to forget about - fine, jsut want to make sure you didn't take a different impressio from the meeting this AM

Closing as obsolete and replaced by System Announcement tickets.


Catalog Rule -> Add Conditons -> One of the details is having translation missing.

Terms

[X] Before you openning this issue, i have checked if the issue has already been reported.

Bagisto Version(s) affected
Master
Issue Description
Catalog Rule -> Add Conditons -> One of the details is having translation missing.
Preconditions
Admin must be logged in.
Steps to reproduce

Go to Admin -> Promotions -> Catalog Rule -> Create
Add Condition -> check the dropdown.

Expected Result
Translation must be clear and proper.
Actual Result
Please check the screenshot below.

Screenshots
No response
Additional context
No response

Hello, @ashishkumar-webkul Sir
Checked, this issue is not appearing, please re-install and check or provide proper steps in detail so that we can replicate the issue

Checked after the fresh installation and found that the issue is not appearing.


Branch - dispatch_strategies

[ ] Have owners review branch to identify functionality to include in HOPP
[ ] Back-merge dev/refactor into respective branches
[ ] Remove extraneous code
[ ] Merge branch and delete old branch

This has a PR associated with it, #34


Enhancement/node

NodeKind can be gotten through the class name, Constants seem almost useless. We can validate through instanceof.
Also eliminates need for reflection, and turns Node into an abstract class.

Hi @decanus, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

There seems to be a lot of repetition with child classes implementing the getNodeKindName() method. It would be far better to simply declare that method in the abstract Node class, and use a little LSB:
public function getNodeKindName() : string
{
    return static::class;
}

Or if the full namespace isn't desired, then do a little parsing:
public function getNodeKindName() : string
{
    $parts = explode('\\', static::class);
    return $parts[count($parts) - 1];
}

Of course, if the Node kinds were going to see a lot of usage in the future (as seen with TokenKind in the parser), then it would probably be more optimal to keep the nodes identified by integers (because performance).

@tpunt I was thinking of using your second solution, might be smart. But instead of integers can we not just test on the instance of the class?

@decanus Sure, but a simple integer comparison will be much more performant than an instanceof operation. Like I said though, it depends how much usage the node kind will see in the future.

@tpunt Do you know if this method would even be efficient?
public function getNodeKindName() : string
{
    $parts = explode('\\', static::class);
    return $parts[count($parts) - 1];
}

@decanus It's still going to be faster than what was there before, because it doesn't make use of reflection.

@tpunt Yeah fair enough, I originally took out the reflection part due to concerns for speed.

Sorry for the delayed response - was heads down on VS Code release activities last week.
Thanks for the PR, and some good discussion here :smiley:.
To give a bit of context, the original reason that $kind existed was because as @tpunt mentioned, I figured that integer comparisons would be faster than instanceof. After some experimenting, though, I realize I was actually wrong about this because while the comparison itself might be faster, it wasn't when combined with the property access. Plus, removing the $kind property resulted in a nice memory reduction.
This change, however, to remove $kind, was made right before the release, and I didn't have the time to clean up remaining references to getKind, so I chose to let them stand for the time being.
So instead of this change, which makes refactorings a bit of a burden because we need to remember to change the string every time we change the Node name, I like the idea @decanus mentioned in https://github.com/Microsoft/tolerant-php-parser/pull/55#issuecomment-275260083, and we can consider other methods if we find later that it's important to optimize serialization.
@decanus, would you mind making these updates to the PR so we can merge in? Also, fyi #35 just went through, which causes some merge conflicts because the new namespace is Microsoft\PhpParser, rather than PhpParser

@mousetraps I'll open a new pull request so I don't need to fix all the conflicts

@mousetraps if you say that there is not really any difference with instanceof, can we not just stick to that for comparison? That would allow full deletion of the constants, and would reduce the size of the code base

@decanus yep, that's right - the NodeKind constants can be removed at this point in favor of instanceof comparisons.


Migrate from Xamarin.Essentials.Preferences to .NET MAUI Preferences

Users updating their apps from Xamarin.Forms to .NET MAUI will hit an issue if they stored data in their Forms app using Xamarin.Essentials Preferences. While .NET MAUI uses the same Preferences implementation, it stores data using a different preferences shared name.
In Xamarin.Essentials the preferences shared name is {your-app-package-id}.xamarinessentials.{feature}. In .NET MAUI the preferences shared name is {your-app-package-id}.microsoft.maui.essentials.{feature}.
Write a doc on how to migrate their app data from Xamarin.Essentials Preferences to .NET MAUI Preferences.
https://github.com/xamarin/Essentials/blob/main/Xamarin.Essentials/Preferences/Preferences.shared.cs
https://github.com/dotnet/maui/blob/main/src/Essentials/src/Preferences/Preferences.shared.cs

Note that the Essentials VersionTracking API uses a named store of {your-app-package-id}.xamarinessentials.versiontracking.


[INTEGRATION][Airflow] Collect the query plan in Snowflake integration

Given the Snowflake query id, the explain plan can be retrieved with the following query:
(using the query id 019bbdfa-0400-571a-0000-00301d038151 as an example here)
select system$explain_plan_json('019bbdfa-0400-571a-0000-00301d038151') as explain_plan;

This returns a json representation of the plan that should go in a Snowflake facet
Here is an example of a plan:
{
  "GlobalStats":{
    "partitionsTotal":4,
    "partitionsAssigned":4,
    "bytesAssigned":2042880
  },
  "Operations":[
    [
      {
        "id":0,
        "operation":"Result",
        "expressions":[
          "number of rows inserted"
        ]
      },
      {
        "id":1,
        "parent":0,
        "operation":"Insert",
        "objects":[
          "DEMO_DB.PUBLIC.FOO"
        ]
      },
      {
        "id":2,
        "parent":1,
        "operation":"SortWithLimit",
        "expressions":[
          "sortKey: [SUM(LINEITEM.L_EXTENDEDPRICE * (1 - LINEITEM.L_DISCOUNT)) DESC NULLS FIRST]",
          "rowCount: 20"
        ]
      },
      {
        "id":3,
        "parent":2,
        "operation":"InnerJoin",
        "expressions":[
          "joinKey: (ORDERS.O_ORDERKEY = LINEITEM.L_ORDERKEY)"
        ]
      },
      {
        "id":4,
        "parent":3,
        "operation":"InnerJoin",
        "expressions":[
          "joinKey: (NATION.N_NATIONKEY = CUSTOMER.C_NATIONKEY)"
        ]
      },
      {
        "id":5,
        "parent":4,
        "operation":"TableScan",
        "objects":[
          "SNOWFLAKE_SAMPLE_DATA.TPCH_SF001.NATION"
        ],
        "expressions":[
          "N_NATIONKEY",
          "N_NAME"
        ],
        "partitionsAssigned":1,
        "partitionsTotal":1,
        "bytesAssigned":2048
      },
      {
        "id":6,
        "parent":4,
        "operation":"InnerJoin",
        "expressions":[
          "joinKey: (ORDERS.O_CUSTKEY = CUSTOMER.C_CUSTKEY)"
        ]
      },
      {
        "id":7,
        "parent":6,
        "operation":"Filter",
        "expressions":[
          "(ORDERS.O_ORDERDATE >= '1993-10-01') AND (ORDERS.O_ORDERDATE < '1993-11-01')"
        ]
      },
      {
        "id":8,
        "parent":7,
        "operation":"TableScan",
        "objects":[
          "SNOWFLAKE_SAMPLE_DATA.TPCH_SF001.ORDERS"
        ],
        "expressions":[
          "O_ORDERKEY",
          "O_CUSTKEY",
          "O_ORDERDATE"
        ],
        "partitionsAssigned":1,
        "partitionsTotal":1,
        "bytesAssigned":407552
      },
      {
        "id":9,
        "parent":6,
        "operation":"JoinFilter",
        "expressions":[
          "joinKey: (NATION.N_NATIONKEY = CUSTOMER.C_NATIONKEY)"
        ]
      },
      {
        "id":10,
        "parent":9,
        "operation":"TableScan",
        "objects":[
          "SNOWFLAKE_SAMPLE_DATA.TPCH_SF001.CUSTOMER"
        ],
        "expressions":[
          "C_CUSTKEY",
          "C_NAME",
          "C_ADDRESS",
          "C_NATIONKEY",
          "C_PHONE",
          "C_ACCTBAL",
          "C_COMMENT"
        ],
        "partitionsAssigned":1,
        "partitionsTotal":1,
        "bytesAssigned":109568
      },
      {
        "id":11,
        "parent":3,
        "operation":"Filter",
        "expressions":[
          "LINEITEM.L_RETURNFLAG = 'R'"
        ]
      },
      {
        "id":12,
        "parent":11,
        "operation":"JoinFilter",
        "expressions":[
          "joinKey: (ORDERS.O_ORDERKEY = LINEITEM.L_ORDERKEY)"
        ]
      },
      {
        "id":13,
        "parent":12,
        "operation":"TableScan",
        "objects":[
          "SNOWFLAKE_SAMPLE_DATA.TPCH_SF001.LINEITEM"
        ],
        "expressions":[
          "L_ORDERKEY",
          "L_EXTENDEDPRICE",
          "L_DISCOUNT",
          "L_RETURNFLAG"
        ],
        "partitionsAssigned":1,
        "partitionsTotal":1,
        "bytesAssigned":1523712
      }
    ]
  ]
}

For the following query:
 insert into DEMO_DB.PUBLIC.foo (c_custkey, c_name, revenue, c_acctbal,
    n_name,
    c_address,
    c_phone,
    c_comment) SELECT
    c_custkey,
    c_name,
    sum(l_extendedprice * (1 - l_discount)) as revenue,
    c_acctbal,
    n_name,
    c_address,
    c_phone,
    c_comment
FROM
    customer,
    orders,
    lineitem,
    nation
WHERE
    c_custkey = o_custkey
    AND l_orderkey = o_orderkey
    AND o_orderdate >= date '1993-10-01'
    AND o_orderdate < date '1993-11-01'
    AND l_returnflag = 'R'
    AND c_nationkey = n_nationkey
GROUP BY
    c_custkey,
    c_name,
    c_acctbal,
    c_phone,
    n_name,
    c_address,
    c_comment
ORDER BY
    revenue desc
LIMIT 20;

note that the nodes "operation":"TableScan" have the input table in their objects field.
and in this case the node  "operation":"Insert" has the output in the objects filed.

We turned off Snowflake calls in this PR cause of their connector being buggy, so I'm closing it for now.


kak-lsp: 8.0.0 -> 9.0.0

Motivation for this change
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.

Thanks for pointing to PR #108363. It seems kak-lsp is already part of nixpkgs, just not part of kakounePlugins, where I was expecting it to be present. I will submit a new diff to update existing derivation instead. Should I open a new PR, or overwrite this one ?

Thanks for pointing to PR #108363. It seems kak-lsp is already part of nixpkgs, just not part of kakounePlugins, where I was expecting it to be present. I will submit a new diff to update existing derivation instead. Should I open a new PR, or overwrite this one ?

Should I open a new PR, or overwrite this one ?

Overwriting and changing the title would be fine for me.

Should I open a new PR, or overwrite this one ?

Overwriting and changing the title would be fine for me.

Should I open a new PR, or overwrite this one ?

Overwriting and changing the title would be fine for me.

Pushed, thanks!

Should I open a new PR, or overwrite this one ?

Overwriting and changing the title would be fine for me.

Pushed, thanks!

Can you reuse the top-level kak-lsp package like it is done for parinfer-rust and rep?

Can you reuse the top-level kak-lsp package like it is done for parinfer-rust and rep?

Can you reuse the top-level kak-lsp package like it is done for parinfer-rust and rep?

Sorry, I'm confused. This PR (the latest commit) changes the file pkgs/tools/misc/kak-lsp/default.nix and that file is already referenced in pkgs/top-level/all-packages.nix. If this is not what you expect, then could you please elaborate ?
Thanks!

Can you reuse the top-level kak-lsp package like it is done for parinfer-rust and rep?

Sorry, I'm confused. This PR (the latest commit) changes the file pkgs/tools/misc/kak-lsp/default.nix and that file is already referenced in pkgs/top-level/all-packages.nix. If this is not what you expect, then could you please elaborate ?
Thanks!

The change to pkgs/tools/misc/kak-lsp/default.nix looks good, thanks for the update.
You add the same file again at pkgs/applications/editors/kakoune/plugins/kak-lsp.nix, which is not necessary.
You can add kak-lsp to kakounePlugins with inherit kak-lsp; in the beginning of pkgs/applications/editors/kakoune/plugins/default.nix (just add it to the list of inherit parinfer-rust rep; and to the package inputs in the first line).
inherit pkgname; is equivalent to pkgname = pkgname;: It adds an attribute with the same name as a variable from the current scope.

The change to pkgs/tools/misc/kak-lsp/default.nix looks good, thanks for the update.
You add the same file again at pkgs/applications/editors/kakoune/plugins/kak-lsp.nix, which is not necessary.
You can add kak-lsp to kakounePlugins with inherit kak-lsp; in the beginning of pkgs/applications/editors/kakoune/plugins/default.nix (just add it to the list of inherit parinfer-rust rep; and to the package inputs in the first line).
inherit pkgname; is equivalent to pkgname = pkgname;: It adds an attribute with the same name as a variable from the current scope.

The change to pkgs/tools/misc/kak-lsp/default.nix looks good, thanks for the update.
You add the same file again at pkgs/applications/editors/kakoune/plugins/kak-lsp.nix, which is not necessary.
You can add kak-lsp to kakounePlugins with inherit kak-lsp; in the beginning of pkgs/applications/editors/kakoune/plugins/default.nix (just add it to the list of inherit parinfer-rust rep; and to the package inputs in the first line).
inherit pkgname; is equivalent to pkgname = pkgname;: It adds an attribute with the same name as a variable from the current scope.

The change to pkgs/tools/misc/kak-lsp/default.nix looks good, thanks for the update.
You add the same file again at pkgs/applications/editors/kakoune/plugins/kak-lsp.nix, which is not necessary.
You can add kak-lsp to kakounePlugins with inherit kak-lsp; in the beginning of pkgs/applications/editors/kakoune/plugins/default.nix (just add it to the list of inherit parinfer-rust rep; and to the package inputs in the first line).
inherit pkgname; is equivalent to pkgname = pkgname;: It adds an attribute with the same name as a variable from the current scope.

You need to add kak-lsp to the arguments, otherwise it will not be found.
error: --- UndefinedVarError ----------------------------------------------------------------------------------------------------------- nix-env
at: (3:2) in file: /home/sebi/.cache/nixpkgs-review/pr-110663/nixpkgs/pkgs/applications/editors/kakoune/plugins/default.nix

     2|
     3| {
      |  ^
     4|   inherit parinfer-rust rep kak-lsp;

undefined variable 'kak-lsp'

You need to add kak-lsp to the arguments, otherwise it will not be found.
error: --- UndefinedVarError ----------------------------------------------------------------------------------------------------------- nix-env
at: (3:2) in file: /home/sebi/.cache/nixpkgs-review/pr-110663/nixpkgs/pkgs/applications/editors/kakoune/plugins/default.nix

     2|
     3| {
      |  ^
     4|   inherit parinfer-rust rep kak-lsp;

undefined variable 'kak-lsp'

You need to add kak-lsp to the arguments, otherwise it will not be found.
error: --- UndefinedVarError ----------------------------------------------------------------------------------------------------------- nix-env
at: (3:2) in file: /home/sebi/.cache/nixpkgs-review/pr-110663/nixpkgs/pkgs/applications/editors/kakoune/plugins/default.nix

     2|
     3| {
      |  ^
     4|   inherit parinfer-rust rep kak-lsp;

undefined variable 'kak-lsp'

Ofcourse, and sorry, I overlooked that. It now builds fine when referenced with kakounePlugins.kak-lsp.
Thanks!

You need to add kak-lsp to the arguments, otherwise it will not be found.
error: --- UndefinedVarError ----------------------------------------------------------------------------------------------------------- nix-env
at: (3:2) in file: /home/sebi/.cache/nixpkgs-review/pr-110663/nixpkgs/pkgs/applications/editors/kakoune/plugins/default.nix

     2|
     3| {
      |  ^
     4|   inherit parinfer-rust rep kak-lsp;

undefined variable 'kak-lsp'

Ofcourse, and sorry, I overlooked that. It now builds fine when referenced with kakounePlugins.kak-lsp.
Thanks!

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 110663 run on x86_64-darwin 1

1 package built:

kak-lsp

This is a semi-automatic executed nixpkgs-review which is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 110663 run on x86_64-darwin 1

1 package built:

kak-lsp

@wahjava please fix the merge conflitct.

@wahjava please fix the merge conflitct.

Merged, and forced pushed.

This is a semi-automatic executed nixpkgs-review with nixpkgs-review-checks extension. It is checked by a human on a best effort basis and does not build all packages (e.g. lumo, tensorflow or pytorch).
If you have any questions or problems please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 110663 run on x86_64-darwin 1

1 package built:

kak-lsp


KAFKA-5188: Integration tests for transactions

cc @hachikuji

Thanks for the updates. I will merge this as soon as the builds complete.


Fix: removed d3d12_lib from main meson.build,

Can not build this library on linux, because there is no d3d12_lib found anywhere. Moved lib declaration directly to test meson.build files, as it is where we use this library. And commented out from main meson.build file.

@microsoft-github-policy-service agree


turn FrontEndMessage into a base trait

Codecov Report

Merging #219 into master will decrease coverage by 0.26%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #219      +/-   ##
==========================================
- Coverage   83.06%   82.79%   -0.27%
==========================================
  Files         103      100       -3
  Lines        1187     1180       -7
  Branches       27       25       -2
==========================================
- Hits          986      977       -9
- Misses        201      203       +2

Impacted Files
Coverage Δ

...ore/src/main/scala/net/BufferedMessageSocket.scala
96.15% <100.00%> (ø)

...odules/core/src/main/scala/net/MessageSocket.scala
100.00% <100.00%> (ø)

modules/core/src/main/scala/net/message/Bind.scala
100.00% <100.00%> (ø)

...odules/core/src/main/scala/net/message/Close.scala
100.00% <100.00%> (ø)

...les/core/src/main/scala/net/message/Describe.scala
75.00% <100.00%> (ø)

...ules/core/src/main/scala/net/message/Execute.scala
100.00% <100.00%> (ø)

...e/src/main/scala/net/message/FrontendMessage.scala
100.00% <100.00%> (ø)

...odules/core/src/main/scala/net/message/Parse.scala
100.00% <100.00%> (ø)

...e/src/main/scala/net/message/PasswordMessage.scala
92.85% <100.00%> (ø)

...odules/core/src/main/scala/net/message/Query.scala
100.00% <100.00%> (ø)

... and 3 more

Continue to review full report at Codecov.

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


stringify_keys returns whole config when used with a Hash value

I've a config which has one value as a Hash as follows:
PlannerConfig.driving
=> {"average_speed"=>50,
 "driver_off_duty_time"=>10,
 "max_driver_on_duty_time"=>14,
 "day_one_cap_value"=>300,
 "max_continuous_drive_time"=>10,
 "max_waiting_time"=>48,
 "mandatory_rest_after_drive"=>0.5,
 "sleeping_time"=>10}

PlannerConfig is using SettingsLogic to the values from a yaml file. The values are:
  distance:
    redis_cache: true
  ts:
    max_iterations: 1000
    max_unchanged_iterations: 200
    thread_count: 1
    timeout: 5
    shuffle: 5
    cost_tolerance: 1.0
    mode_selection: false
    cost_calculation: true
    ignore_capacity: false
  constraints:
    max_number_of_stops: 3
    out_of_route_items_attributes: [
      {distance_value: 0, percent: 40}
    ]
  driving:
    average_speed: 50
    driver_off_duty_time: 10
    max_driver_on_duty_time: 14
    day_one_cap_value: 300
    max_continuous_drive_time: 11
    max_waiting_time: 48
    mandatory_rest_after_drive: 0.5
    max_continuous_drive_time: 10
    sleeping_time: 10
  task:
    key: 'planner:running'

When passing this to an AR object as a parameter for initialization, it throws an error with missing attributes:
[1] pry(main)> Optimization::DrivingHoursConfiguration.new(PlannerConfig.driving)
ActiveRecord::UnknownAttributeError: unknown attribute 'distance' for Optimization::DrivingHoursConfiguration.
from /home/ashish/.rvm/gems/ruby-2.3.8/ruby/2.3.0/gems/activerecord-4.2.11/lib/active_record/attribute_assignment.rb:59:in `rescue in _assign_attribute'

This happens in Rails 4.2.x, doesn't happen in Rails 4.1.x. On investigation I found out that when using stringify_keys the output is not as expected:
[2] pry(main)> PlannerConfig.driving
=> {"average_speed"=>50,
 "driver_off_duty_time"=>10,
 "max_driver_on_duty_time"=>14,
 "day_one_cap_value"=>300,
 "max_continuous_drive_time"=>10,
 "max_waiting_time"=>48,
 "mandatory_rest_after_drive"=>0.5,
 "sleeping_time"=>10}
[3] pry(main)> PlannerConfig.driving.stringify_keys
=> {"distance"=>{"redis_cache"=>true},
 "ts"=>{"max_iterations"=>2500, "max_unchanged_iterations"=>1000},
 "constraints"=>{"max_number_of_stops"=>3, "out_of_route_items_attributes"=>[{"distance_value"=>0, "percent"=>40}]},
 "driving"=>
  {"average_speed"=>50,
   "driver_off_duty_time"=>10,
   "max_driver_on_duty_time"=>14,
   "day_one_cap_value"=>300,
   "max_continuous_drive_time"=>10,
   "max_waiting_time"=>48,
   "mandatory_rest_after_drive"=>0.5,
   "sleeping_time"=>10},
 "task"=>{"key"=>"planner:running"},
 "average_speed"=>50,
 "driver_off_duty_time"=>10,
 "max_driver_on_duty_time"=>14,
 "day_one_cap_value"=>300,
 "max_continuous_drive_time"=>10,
 "max_waiting_time"=>48,
 "mandatory_rest_after_drive"=>0.5,
 "sleeping_time"=>10}

This is happening due to change in activesupport where we're using self.class.new instead of populating a hash, reference commit here. So it does PlannerConfig.new which adds all the keys and hence getting this error.
For now I am doing Optimization::DrivingHoursConfiguration.new(PlannerConfig.driving.to_h).

Moved to https://github.com/settingslogic/settingslogic/issues/19.


Add Lambda Custom Runtime mode

Add Lambda Custom Runtime mode
Expected Behaviour

The of-watchdog has several modes including http, streaming and a classic mode which simulates the classic watchdog.
I carried out a PoC that showed we can support functions directly from AWS Lambda using the new custom runtime and published the first solution of its kind on GitHub. The code was just a PoC and needs some refactoring to be hardened.
https://github.com/alexellis/lambda-on-openfaas-poc
I was able to show that given a file-system created by the docker-lambda project we can take code written for a custom runtime on AWS Lambda and run it on OpenFaaS with Kubernetes or any of the other back-ends.
Rather than using channels on their own, for synchronization we should also use a SyncMap or a Map with a RWMutex as demonstrated in my inlets project: https://github.com/alexellis/inlets/compare/sync
I'm looking for a volunteer to add this mode to the of-watchdog and port across the example shown in the repo alexellis/lambda-on-openfaas-poc. This will then allow us to create a template and base Docker images to allow people to run their AWS Lambda Node/Python/Go etc projects on OpenFaaS.
Alex

@ewilde had volunteered to take this on.
Any update since we spoke Ed?

No progress made on this yet


feat: validator details page

cc @goldsteinsveta
if you wish, please find some inspiration in Lunie, i.e. https://lunie.io/
show details about validators.
If they are in https://github.com/paritytech/Nomidot/tree/master/validator-info then show some badge or something to show they are "verified" like on Twitter or Instagram.
If not, do nothing.
The main area should have some nice charts about:

[ ] - rewards history
[ ] - slashing history

and a Call to Action:

[ ] - Stake
[ ] - Unstake

Hey @yjkimjunior do you have an example of data objects to be visualised? This would be useful for storybook chart components


Extension for setup GCP logging

Would it be possible to configure Quarkus Logging for GCP logging ?
As quarkus ignore java.util.logging.config.file, it is not possible to configure it with the GCP LoggingHandler like explianed in https://cloud.google.com/logging/docs/setup/java#the_javautillogging_handler
The only workaround I found, is to register and configure the handler manually ...
The console handler produces logs but the level of the log message is not set in the severity of the LogEntry, etc ...
But maybe I missed something ...
Otherwise, a new extension would be nice, as it was suggested in https://stackoverflow.com/questions/67870277/is-there-is-a-way-to-set-up-google-cloud-logging-for-quarkus#comment119986717_67870277 :)

There is a JUL log Handler, com.google.cloud.logging.LoggingHandler so it should be easy to create an extension to use this handler with Quarkus.

For information the quarkus-logging-json from quarkiverse, resolve my problem (last version):

it avoid both writing the log in stdout / stderr and sending well formatted logs to gcp loggging api (=> only to stdout)
the json produces in stdout is well parsed by GCP logging and the JUL log level, is set as the severity (difference with the quarkus-logging-json extension from quarkus)

The problem remains if you need to send logs to a remote GCP logging console and use the GCP log Handler.


Rollback jdk compile verison to make jnode-fs more backward compatible.

Yeah, to make it more backward compatible we need to use an older version of jdk.
Some other projects are still using the bytecode lib which only supports the older jdk.
E.g. https://github.com/cglib/cglib supports JDKs up to 13.


Please provide an option to select the time as well

Bug, feature request, or proposal:
Feature Request
What is the expected behavior?
Time selection should also be available along with date.
What is the current behavior?
Only date picker is available as of now
What are the steps to reproduce?
On installing the angular material and using the import {MatDatePickerModule} from '@angular/material'
What is the use-case or motivation for changing an existing behavior?
A feature should be available to select the time while selecting the date
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4
Material 2
Windows 7
Typescript 2.2.0
Chrome Version 61.0.3163.100
Is there anything else we should know?
Please let me know if this is feature is already available

Duplicate of #5648. Please search before creating issues

ooops sorry for the inconvenience

You can use amazing time picker (amazing-time-picker) for this purpose, and it is fully compatible with Angular 2-7 and Material design:
https://github.com/owsolutions/amazing-time-picker
Live demo:
https://owsolutions.github.io/amazing-time-picker
Thanks.


Align default number of worker threads to default SQS batch size

This is a continuation of the discussion in #359.  The default number of worker threads was less than the default number of messages pulled per batch from SQS, so this resulted in TaskRejectedExceptions being thrown.
Are there any concerns around increasing the default threads to 10 to match the SQS batch size?

Came here to fix just this :-) so +1 from me.
In my project, as a fix, we set the maxmessages to 4 , so batchsize would be 4 and max threads would be (4 + 1) times queues. We chose 4 as 10 seemed a bit high for our use case. Maybe queue depth in the taskexecutor would be a property to consider, but then again it would be more prudent to just configure a taskexecutor explicitly anyway.
Was a bit nasty as well this, with multiple queues configured all seems ok, when load hits one queue there are enough worker threads (due to the ‘spinning threads’ multiplier. But when load arrives on all queues, errors all over the place :-/
Again, just on the alignment of the batchsize and max threads to prevent the errors +1 :-)

Good call @JanGroot.  Does this look right to you?  I defaulted maxNumberOfMessages in the abstract class so it should flow down to the max thread pool calculation and dropped the default max threads change.

I see that broke the test: MessageListenerContainerTest.testMaxNumberOfMessages:150 expected null, but was:<10>
Is this the right way to fix it though?

Sounds good.  What do you think of this in the child class?  Keep it?  The child class shouldn't have to assume the parent always will return a non null value?
int maxNumberOfMessagePerBatch = getMaxNumberOfMessages() != null ? getMaxNumberOfMessages() : DEFAULT_WORKER_THREADS;

In Holland we have a saying, there are multiple roads to Rome.
You could also just change the visibility of the DEFAULT_MAX_NUMBER_OF_MESSAGES and just reference that in the child class

Good idea.  That keeps less consumer logic in the abstract class.  Going forward with that.

We ran into the same problem. The workaround described here works. Nevertheless I'm looking forward to seeing this fixed in the lib. Is there any progress here? Right now I see conflicting files.

@ryanjbaxter  @OlgaMaciaszek fyi

@danieladams456 could you fix the merge conflicts?

@ryanjbaxter looking at it now.  I'll verify that this change logic is still valid since the files have diverged.  On first glance, it just seems like a file-wide formatting change is causing the conflict.

Rebased on the latest master, then fixed tabs vs spaces. 😄 @ryanjbaxter should be good to merge now.
Thanks!


The sample code doesn't work with the latest @azure/openai (Node.js)

Type of issue
Code doesn't work
Description
The following sample code on this page does not work with the latest (2.0.0-beta.1) @azure/openai (Node.js).
const { OpenAIClient, AzureKeyCredential } = require("@azure/openai");
const client = new OpenAIClient(
"https://.openai.azure.com/",
new AzureKeyCredential("")
);
Running that code returns the following error:
TypeError: AzureKeyCredential is not a constructor
Workaround
If you install the module by specifying the version as shown below, no errors will occur.
npm install<EMAIL_ADDRESS>My proposal
I think it would be better to add a note to specify the version number in the installation command for the @azure/openai client library, or to provide sample code that works with the latest version.
Page URL
https://learn.microsoft.com/en-us/javascript/api/overview/azure/openai-readme?view=azure-node-preview
Content source URL
https://github.com/MicrosoftDocs/azure-docs-sdk-node/blob/main/docs-ref-services/preview/openai-readme.md
Document Version Independent Id
320f9d0d-6ca4-8c03-8fce-0142ee95c115
Article author
@azure-sdk
Metadata

ID: e2311766-d544-eb4a-f3e3-4fc53ebfe828
Service: openai

Hi @osamum, thank you for raising this issue. We are working on getting the docs updated to reflect the latest version available. In the meantime, please check out our latest README and samples here in the Github repository and let us know if you have any questions. Thank you!

Thank you for your information.
I use is.


allow plugins to define subplugins

Is your feature request related to a problem? Please describe.
if you have a cell plugin that has children (layout plugin), you might want to restrict the plugins that are allowed as children there. See https://github.com/react-page/react-page/issues/946
Additionaly you might also want to alter the plugins a bit, e.g. change some styling or have plugins that are only available on this plugin
Describe the solution you'd like
a CellPlugin<T> could define a property
cellPlugins?: CellPlugin[] | (data: T, parentPlugins: CellPlugin[]) => CellPlugin[]
So in the simple case, it just uses an array of cell plugins or it takes a function that returns cellplugins. The function could also use the parent plugins to filter or re-use some of them and it could use the data to change the plugins based on data. The parent plugins are either the plugins that are defined on the Editor ("root") or if the parent Cell itself defines plugin it returns these.
We would introduce a hook useAvailablePluginsForCell(nodeId: string)  that returns the plugins that are available inside the given nodeId.
If you move plugins between cells (inside another cell or out of a cell) that have different plugins, this only works if the id matches, if the id is different, you cannot drop the cell. If the id matches the plugin will be moved. This also enables to have plugins that behave the same, but look different depending on where there are added.
Describe alternatives you've considered
alternativly we could require that all plugins need to be added to the Editor and plugins need filter them. If a plugin is only allowed inside another plugin, than the Editor must have a filter function as well. That's a bit ugly.
On the other hand, the proposed solution might be slightly tricky regarding migration, but i think this is solveable.
Additional context
Add any other context or screenshots about the feature request here.

:tada: This issue has been resolved in version 2.1.0-beta.1 :tada:
The release is available on:

v2.1.0-beta.1
GitHub release

Your semantic-release bot :package::rocket:

:tada: This issue has been resolved in version 2.1.0 :tada:
The release is available on:

v2.1.0
GitHub release

Your semantic-release bot :package::rocket:


refactor(dockerfile): update to 0.8.0 and simplify dockerfile

sorry committed the wrong version, one moment

it still doesn't work for me. I had to:

Create /opt before downloading tgz file (RUN mkdir /opt )
Untar file (RUN tar zxvf /opt/cerebro-${CEREBRO_VERSION}.tgz -C /opt) before moving it

After those changes the image is built and weight ~200MB less :)
would you do those changes? or should I add them?
thank you!

I will do it this evening.

Already done  :-D

Thank you!

I think this PR make it worse
$ docker version
Client:
 Version:      17.06.0-ce
 API version:  1.30
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:31:53 2017
 OS/Arch:      darwin/amd64

Server:
 Version:      17.06.0-ce
 API version:  1.30 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   02c1d87
 Built:        Fri Jun 23 21:51:55 2017
 OS/Arch:      linux/amd64
 Experimental: true

$ docker build .
...
tar: can't open '/opt/cerebro-0.8.1.tgz': No such file or directory
The command '/bin/sh -c tar zxvf /opt/cerebro-${CEREBRO_VERSION}.tgz -C /opt && mv /opt/cerebro-${CEREBRO_VERSION} /opt/cerebro' returned a non-zero code: 1

Why keeping the archive file in docker image? Have you ever checked the size of docker images by using RUN mv separately?

I try to fix it in #304


Typo

Under the 'Getting Started' section and within the 'Android' tab, at the bottom, Android is spelling incorrectly -- Anroid.

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

ID: 33758e0e-bd5d-0829-b458-6cdfabe98b44
Version Independent ID: d3ed3057-798b-44b9-b5a0-35e657f7a4b8
Content: Xamarin.Essentials: Connectivity - Xamarin
Content Source: docs/essentials/connectivity.md
Product: xamarin
GitHub Login: @jamesmontemagno
Microsoft Alias: jamont

I have a PR for this thanks!


How do I programmatically clear the user selection?

Still fairly new to Reactjs and glide-data-grid.
I've set row markers, and users are able to select rows.  I've also added a filtering capability.
I'd like to programmatically clear the selection when users filter the data.
Thanks

hey no problem. In general you the data grid work similar to how a react input works, just a lot more complex.
So with an input you would do something like.
import React, { useState } from 'react';

function Example() {
  const [inputValue, setInputValue] = useState(''); // Initialize with an empty string

  const handleChange = (event) => {
    setInputValue(event.target.value); // Update the state with the input's current value
  }

  return (

      <input
        type="text"
        value={inputValue}
        onChange={handleChange}
      />

Typed value: {inputValue}

  );
}

The primary difference with the data grid is that instead of value and onChange you use gridSelection and onGridSelectionChange. The values in the gridSelection you are looking for are stored in the rows property. You can also reset the gridSelection to undefined when you start filtering.


Is it possible to deselect the date in FScalendar other  than user's deselection?

Hi,
In my scenario,users should select continous dates before they proceeding to booking(like 1,2,3 ...)..if by mistake they selected 3 instead of 2...at that time i have to display alert with "please select continous dates"...with add action "ok",when users selecting "ok",at that time the 3 should be deselected automatically...is it possible to implement like dis with FSCalendar?

[calendar deselectDate:]


[CT-550] [Bug] a database called "$scratch" does not render in the documentation whilst present in the json metadata files.

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
Dremio's default datalake is known as "$scratch".
When generating documentation, I can find its data objects inside the json metadata files,
but when serving these files, the static site does not render the $scratch database.
Is it because of the "$" sign ?
Best regards,
Expected Behavior
I would expect dbt documentation to show data objects inside the $scratch database.
Steps To Reproduce
No response
Relevant log output
No response
Environment
- OS:
- Python:
- dbt:

What database are you using dbt with?
other (mention it in "Additional Context")
Additional Context
Dremio

This would be a problem in dbt-docs, so I've transferred the ticket.

If you are somebody else in the community is up for it, we'd welcome somebody trying to fix this.


OSD-25983: making sure that the Makefile installs the tools needed by the various targets or at least display a meaningful error if some tool is not installed

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 39.75%. Comparing base (4c76c01) to head (893aba1).
Report is 2 commits behind head on main.

Additional details and impacted files

@@           Coverage Diff           @@
##             main     #323   +/-   ##
=======================================
  Coverage   39.75%   39.75%
=======================================
  Files          22       22
  Lines        1738     1738
=======================================
  Hits          691      691
  Misses        999      999
  Partials       48       48

Files with missing lines
Coverage Δ

pkg/aws/mock/aws.go
50.28% <ø> (ø)

pkg/ocm/mock/ocmmock.go
42.66% <ø> (ø)

pkg/pagerduty/mock/pagerdutymock.go
35.48% <ø> (ø)


[PE-D][Tester D] Add event feature doesn't restrict name input to alphanumeric characters

There is some inconsistency with the name input for events, as non-alphanumeric characters are allowed in event names. For instance, I was allowed to create a new event containing Japanese characters as follows:

Allowing non-alphanumeric characters in the event names will make the code much harder to test rigorously. in fact, when I attempted to use the find_all feature to find events corresponding to one of the Japanese characters, the events were not returned:

I could have split this into two separate bug reports but I feel this will help to illustrate the reason why restricting inputs to alphanumeric characters is necessary (at least in this context). Of course, if you intend to do more extensive testing for these irregular inputs, that will work as well!

Labels: severity.Medium type.FeatureFlaw
original: yytan25/ped#5

TODO:

Restrict the accepted name inputs for events (need to check if this is allowed)

Bug fixed by @nicleongyj


Do not work on the OBS window

I noticed that when the OBS window is in focus, no sound are being played.

I recommend you to use VoiceMeeter Banana, and make OBS capture the sound from VoiceMeeter Ouput.
Try to find out the tutorial in Youtube about using VoiceMeeter.
I'm an elementary teacher and find this VoiceMeeter is beyond helpful.


cell template not getting compiled on scroll

When you scroll the cell templates are not compiling immediately. I think it's missing $digest or $apply somewhere.
Please see this pen

In ScrollerDirective, change $scope.$digest() with $scope.$apply()

Changing  $scope.$digest() with $scope.$apply() does correct template compiling but at the cost of performance.

Thanks @Thrilleratplay


Add usage instructions for Maven

Description
I wrote instructions for adding the api as a dependency in pom.xml. They are formated a bit differently than instructions for gradle as I believe this is for more fitting for XML. This of course is up to preference so make sure to adjust it to your likings.
How Has This Been Tested?
The pom.xml bits have been tested with a test paper plugin using maven. It Built without a problem and also worked on a Paper server. API functions also worked fine.

I'm just gonna assume it's all correct, I can't be bothered to try and read Maven XML lmao, thank you!

Sounds like healthy code maintanance! ;)


Bug in escaping/unescaping URLs

To reproduce the bug, try downloading a URL that includes + in the path, + as the real plus not a escaped space. The following code should demonstrate the bug:
local url = require("socket.url")
local request_url = "http://www.example.com/download/my%2bsample.file"
local result = url.build(url.parse(request_url))
print(result)

print statement should print the original URL, but instead it prints http://www.example.com/download/my+bsample.file.

This problem appears when using http.request as you can see in https://github.com/diegonehab/luasocket/blob/master/src/http.lua#L254 and https://github.com/diegonehab/luasocket/blob/master/src/http.lua#L200

Seems removing + from protected_segments fixes the issue: https://github.com/diegonehab/luasocket/blob/master/src/url.lua#L56

Build() is not the inverse of parse(). Parse() removes escaping because when you use the results of parsing you typically want the unescaped values. Build() only adds escapes where they are needed. In your example, there is no need to escape the + sign because it is valid in within an URL segment. The RFC 2396 is very specific about which characters are allowed and we follow it to the letter. (Pun intended.)

Yes, indivisually it is correct. But as a whole it is a bug. I can not use http.request with a URL that has escaped plus (℅2b) in it. When recieved on the server, it will be '+' which is interpreted as space. Instead, I should recieve the exact path I requested for.

This is just not true. The server must never change '+' to a space. As I said, '+' is a perfectly valid character in a path component of an URL. It is only translated to a space by CGI scripts themselves, not by the server, and that should only be done in the query component of the URL (what comes after the '?' sign). What server are you using?

It is amazonaws, S3.

I meant what HTTP server...

Amazon S3 is a static hosting, I upload files to it and it serves them. I'm not sure what it is because it is not something I can manage.

If you are using HTTP, there is an HTTP server somewhere that you are using. Any request will return headers. The headers will normally tell you what the server name is. Get all headers and dump them to screen using LuaSocket itself. Also, what is the exact URL you are trying to download?

See this:
https://forums.aws.amazon.com/thread.jspa?messageID=722673
It's a bug in their server. You can write code in Lua to protect your path segments. I am very reluctant to change LuaSocket to conform to buggy servers.

I see. You are right.

@diegonehab How can I protect my path?
I have tried both + and %2B in my url but LuaSocket sends + for both. It automatically unescapes the url.
I know that LuaSocket is conforming to the standard but why it unescapes an already escaped url?

Because you are probably using the simplified interface to request() that receives the URL as a string, right? In that case, LuaSocket has to parse the URL itself, and it will do so following the RFC rules. You may be able to prevent LuaSocket from parsing the URL by using the general interface to request() that receives a table with all fields already defined. Something like this (untested)
local t = {}
local ret, code, headers, status = http.request{
    host = "http://www.example.com",
    port = 80,
    uri = "download/my%2bsample.file",
    sink = ltn12.sink.table(t)
}
print(table.concat(t))

The only problem I can foresee is if the server sends a redirect. In that case, LuaSocket will follow the redirect and will have to parse the location from the provided URL. This will, unfortunately, unescape the results. Can you try it?

it does not work:
/usr/lib/lua/socket/url.lua:186: attempt to index local 'parsed' (a nil value)
stack traceback:
        /usr/lib/lua/socket/url.lua:186: in function </usr/lib/lua/socket/url.lua:185>
        (tail call): ?
        /usr/lib/lua/ssl/https.lua:118: in function 'request'
        stdin:1: in main chunk
        [C]: ?

It needs a leading / in uri. It works with LuaSocket but still I cannot get it to work with LuaSec.

Maybe LuaSocket can try to preserve more of the URI when parsing so you can use the simple interface and so it can work with redirects. I'll see what I can do. But I don't control LuaSec.

@milani, can you try again with the most recent push?

There has been a fair amount of URL path consistency work since this issue was posted.  Whether it's due to that or otherwise, in any case, the result seems to currently be:
$ lua <<EOF
> local url = require("socket.url")
> local request_url = "http://www.example.com/download/my%2bsample.file"
> local result = url.build(url.parse(request_url))
> print(result)
EOF
http://www.example.com/download/my%2bsample.file

which I believe was the desired result.  If I am mistaken, please let me know.
We're reviewing open items in preparation for a release.  If action is needed here, please add a comment.  Otherwise, this issue will be closed on or after 24-Feb-2019.
Thanks!

Thank you for responding to this issue. To me, this is the correct behavior. Happy new release!


Take advantage of arrangement reuse in antijoin

https://github.com/TimelyDataflow/differential-dataflow/issues/130

Resolved by PR #149


Feature request: support deleting head branch of Github pull requests

Requesting that you support the new feature to automatically delete the head branch of pull requests that Github just announced here: https://help.github.com/en/articles/managing-the-automatic-deletion-of-branches. A small thing but it saves manual effort. Thanks in advance!

Happy to do this as soon as go-github support it, I raised an issue over on their repository: https://github.com/google/go-github/issues/1245

Thanks, @springerigor. I've opened #342 though there are still a few issues with the PR.

Can someone assign this to me? I'll get it finished this week

Would still love to see this if it's possible :)

We also waiting for this feature, tell me if i can help


False Positive with Running App Services

We are using JobScheduler in our app and it seems it's flagged as a container service:
com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService
I know we can add it to the list of appServices but it seems like something that should be ignored by default.
Here:

Since it's running and I didn't add it to appServices, then it falsely thinks we are running a container.

@blundell  Thanks once again. I will have a look on this along with other bugs you reported.


Add create package for simpler project init

Currently it is not as easy as it could be to get started with SDE.  With the new build and plugin system, we have most of the foundation in place, and there is a hello-world project that can be used as a kind of template, but it would be better if the user could just type the following:
# Assume that my-dir contains a Vensim model
cd my-dir
npm create @sdeverywhere
npm start

Ideally that one create command would create files such as package.json, sde.config.js, a "core" library (that wraps the generated wasm model), and a simple app template to get the user started.
The start command would then start the local dev builder, which runs the generated app and opens the model-check report.

I modeled the implementation on Astro's create-astro package, which I thought was nicely done and makes good use of the ora and prompts packages for a nice CLI experience.
Here's a screenshot of what the new create command looks like:

It automates the following steps that would normally be manual and tedious:

create project structure (from one of the two templates)
set up the sde.config.js file to point to the new config + mdl files
generate a sample model-check ({mdl}.check.yaml) test file
configure a graph in graphs.csv (optional)
configure a few sliders in inputs.csv (optional)
install the Emscripten SDK (optional)
install npm/yarn/pnpm dependencies (optional)
initialize a git repo (optional)


Environment variables get cleared/reset when an upgrade is done

Rancher versions:
rancher/server: v1.6.8
rancher/agent:
Infrastructure Stack versions:
healthcheck:
ipsec:
network-services:
scheduler:
kubernetes (if applicable):
Docker version: (docker version,docker info preferred)
17.03.2-ce
Operating system and kernel: (cat /etc/os-release, uname -r preferred)
Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
AWS
Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
Single Node Rancher
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Cattle
Steps to Reproduce:
Results:

Unable to reproduce this on v1.6.11, can you share steps taken/definitions used and try if it still happens on v1.6.11?

Create a service with certain environment variables
Upgrade and add new environment variables
Allow automated deployment to make an update.

PS: Automated deployment from: https://github.com/phedoreanu/rancher-auto-redeploy
Dockherhub: phedoreanu/rancher-auto-redeploy

Not completely sure what happens in rancher-auto-redeploy but it seems like it's using old information to upgrade the service? Can you reproduce by using manual steps?

Closing as stale.


Inconsistent name for mouse mm10 genome file.

Hi Aaron and everybody
Bedtools needs and distributes files indicating the size of chromosomes for some reference genomes.
human.hg18.genome
human.hg19.genome
human.hg38.genome
mouse.mm10.genome.txt
mouse.mm8.genome
mouse.mm9.genome

In the case of mm10 only, the file has an extra .txt in its name, which slightly complicates scripting.  Would it be possible to rename it mouse.mm10.genome in the next release ?
Cheers,
--
Charles

This (and a little more) is PR #289.


📅The giant persistent Event Queue📅

Rule
Update the queue by editing this comment, rather than adding a separate comment.
The Queue

[x] #378
[x] #383
[x] #390
[x] #371
[x] #372
[x] #373
[x] #401
[x] #392
[x] #409
[x] #393
[x] #405
[x] #419
[x] #406
[x] #394
[x] #407
[x] #430
[x] #408
[x] #439
[x] #431
[x] #449
[x] #375
[x] #459
[x] #385
[x] #460
[x] #461
[x] #483
[x] #473
[x] #480
[x] #468
[x] #474
[x] #475
[x] #476
[x] #477
[x] #381
[x] #478
[x] #481
[x] #487
[x] #522
[x] #479
[x] #520
[x] #527
[x] #528
[x] #529
[x] #488
[x] #530
[x] #531
[x] #532
[x] #566
[x] #489
[x] #533
[x] #534
[x] #535
[x] #536
[x] #537
[x] #538
[x] #539
[ ] #422
[ ] #391
[ ] #545
[ ] #386
[ ] #387

I am thinking about closing this because we will be successfully reduce the number of open issues here, thanks to #561. Let me know if you have any comments!


Install-WindowsUpdate via Remote Call fails due to insufficient permissions

Our Powershell script operates from a central machine and cycles thru a bunch of virtual machines (Win2019, Win2022) in order to install the existing Windows updates using cmdlet "Install-WindowsUpdate".
eg.
.....
$Computer="SRV37V162"
Invoke-Command -ComputerName ($Computer) {Install-WindowsUpdate -ForceInstall -Verbose -AcceptAll}
.....
However, this results in the following error:
VERBOSE: Accepted [1] Updates ready to Download
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
+ CategoryInfo          : NotSpecified: (:) [Get-WindowsUpdate], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException,PSWindowsUpdate.GetWindowsUpdate
+ PSComputerName        : SRV37V162
The Powershell is executed with Administrator privileges.
Jochen Eckwerth
Kaufmännische Krankenkasse
Hannover

Funny we have similiar issue just at the same moment

Also seeing a similar issue:

DEBUG: 5/1/2024 10:15:47 AM ParameterSetName: Default
DEBUG: 5/1/2024 10:15:47 AM Set pre search criteria: IsInstalled = 0
DEBUG: 5/1/2024 10:15:47 AM Set pre search criteria: IsHidden = 0
DEBUG: 5/1/2024 10:15:47 AM Search criteria is: IsInstalled = 0 and IsHidden = 0
DEBUG: 5/1/2024 10:15:47 AM HOSTNAME: Connecting...
DEBUG: 5/1/2024 10:15:48 AM Module version: <IP_ADDRESS>
DEBUG: 5/1/2024 10:15:48 AM Dll version: <IP_ADDRESS>
DEBUG: 5/1/2024 10:15:49 AM UpdateSessionObj mode: Activator

Confirm
HOSTNAME: Unknown failure.
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): a
get-wulist : HOSTNAME: Unknown failure.
At line:1 char:1
+ get-wulist -Verbose -Install -AcceptAll -IgnoreReboot -ComputerName @ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (:) [Get-WindowsUpdate], Exception
    + FullyQualifiedErrorId : Unknown,PSWindowsUpdate.GetWindowsUpdate

This is after running Enable-WURemoting

get-help Invoke-WUJob


METRON-492 Run metron_common build check as local_action

When testing various deployment options, noticed the logic for the metron_common role didn't work as expected. Updated to check for metron jar locally (where the playbook was initiated) and fail when it doesn't exist.
Tested successfully in single node vm.

+1, this is great. It'll be good to have this working.


Update youtube extension

Description
Added video duration in the details view. Fixes #7086
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Hi 👋
Thanks for your contribution 💪
I have now tested your extension, and I have some feedback ready for you:

Do you mind adding a changelog entry too

I'm looking forward to testing this extension again 🔥
Request a new review when you are ready. Feel free to contact me here or at Slack if you have any questions.

Added! 👍
Thanks for your reply!

Can you approve this @tonka3000 🙂


Panic while connecting to invalid address

Describe the bug
While attempting to connect to an invalid address, permify panics after a few retries:
$ docker run -it -e PERMIFY_DATABASE_ENGINE=postgres -e PERMIFY_DATABASE_URI="postgres://user:foo@localhost:5432/db" permify/permify serve

██████╗ ███████╗██████╗ ███╗   ███╗██╗███████╗██╗   ██╗
██╔══██╗██╔════╝██╔══██╗████╗ ████║██║██╔════╝╚██╗ ██╔╝
██████╔╝█████╗  ██████╔╝██╔████╔██║██║█████╗   ╚████╔╝
██╔═══╝ ██╔══╝  ██╔══██╗██║╚██╔╝██║██║██╔══╝    ╚██╔╝
██║     ███████╗██║  ██║██║ ╚═╝ ██║██║██║        ██║
╚═╝     ╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝╚═╝╚═╝        ╚═╝
_______________________________________________________
Fine-grained Authorization System v0.7.3
time=2024-02-20T12:18:22.395Z level=INFO msg="🚀 starting permify service..."
time=2024-02-20T12:18:22.395Z level=ERROR msg="Account ID is not set. Please fill in the Account ID for better support. Get your Account ID from https://permify.co/account"

time=2024-02-20T12:19:08.179Z level=ERROR msg="failed to migrate database: %w" !BADKEY="failed to connect to `host=localhost user=user database=db`: dial error (dial tcp [::1]:5432: connect: cannot assign requested address)"
time=2024-02-20T12:19:53.700Z level=ERROR msg="failed to initialize database: %w" !BADKEY="failed to connect to `host=localhost user=user database=db`: dial error (dial tcp [::1]:5432: connect: cannot assign requested address)"
panic: runtime error: invalid memory address or nil pointer dereference
        panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xbad6c8]

goroutine 1 [running]:
github.com/Permify/permify/pkg/cmd.NewServeCommand.serve.func1.2()
        /home/runner/work/permify/permify/pkg/cmd/serve.go:151 +0x28
panic({0xce7080?, 0x1a46240?})
        /opt/hostedtoolcache/go/1.21.6/x64/src/runtime/panic.go:920 +0x26c
github.com/Permify/permify/internal/factories.DataReaderFactory({0x0, 0x0})
        /home/runner/work/permify/permify/internal/factories/storage.go:14 +0x20
github.com/Permify/permify/pkg/cmd.NewServeCommand.serve.func1(0x400015c100?, {0x1aa2fe0?, 0x4?, 0xed26df?})
        /home/runner/work/permify/permify/pkg/cmd/serve.go:237 +0xcc8
github.com/spf13/cobra.(*Command).execute(0x40002f6300, {0x1aa2fe0, 0x0, 0x0})
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:983 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x40002f6000)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(0x40002f6000?)
        /home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.0/command.go:1039 +0x1c
main.main()
        /home/runner/work/permify/permify/cmd/permify/permify.go:37 +0x204

To Reproduce
Steps to reproduce the behavior:
$ docker run -it \
  -e PERMIFY_DATABASE_ENGINE=postgres \
  -e PERMIFY_DATABASE_URI="postgres://user:foo@localhost:5432/db" \
  permify/permify

Expected behavior
It should either manage an exit or allow more options for retries.
Environment (please complete the following information, because it helps us investigate better):
Using Docker 25.0.3 on MacOS 14.3.1

Hello @jbergstroem, this issue will be resolved in version 0.7.5. We have added it to the roadmap

Right now it seems to exit with the help flag; not sure how useful that is to have in your logs? Perhaps just exit cleanly with "retries exceeded, exiting"

Also, the string formatting for the message seems broken:
time=2024-02-24T18:27:47.935Z level=ERROR msg="failed to migrate database: %w" !BADKEY="failed to connect to `host=localhost user=user database=db`: dial error (dial tcp [::1]:5432: connect: cannot assign requested address)"
time=2024-02-24T18:28:29.797Z level=ERROR msg="failed to initialize database: %w" !BADKEY="failed to connect to `host=localhost user=user database=db`: dial error (dial tcp [::1]:5432: connect: cannot assign requested address)"

Hello @jbergstroem, we've made an update regarding this. Can you try it in v0.7.7?

The error stings are now fixed but I still think its strange to exit with a help message? The user is not invoking the command incorrectly, rather passing incorrect options.

Can you open a different issue for this? @jbergstroem


Inconsistencies in reporting deprecations with creator applications, aliases

Scala 3.4.2
There are a few spurious deprecations (warn!) and a few missing ones (no!).
@deprecated class C(x: Int); object C
class D @deprecated() (x: Int); object D

@deprecated case class E(x: Int)
case class F @deprecated() (x: Int) // warn! - two spurious warnings from synthetic code

class T:
  type AC = C  // warn
  val AC = C   // no
  type AD = D  // no
  val AD = D   // no
  type AE = E  // warn
  val AE = E   // no
  type AF = F  // no
  val AF = F   // no

  def t1 = new C(1)    // warn
  def t2 = C(1)        // warn
  def t3(x: C) = 1     // warn
  def t4 = C.toString  // no
  def t5 = new AC(1)   // no
  def t6 = AC(1)       // warn! - spurious warning, should be the same as t5
  def t7(x: AC) = 1    // no
  def t8 = AC.toString // no

  def u1 = new D(1)    // warn
  def u2 = D(1)        // warn
  def u3(x: D) = 1     // no
  def u4 = D.toString  // no
  def u5 = new AD(1)   // warn
  def u6 = AD(1)       // warn
  def u7(x: AD) = 1    // no
  def u8 = AD.toString // no

  def v1 = new E(1)    // warn
  def v2 = E(1)        // warn
  def v3(x: E) = 1     // warn
  def v4 = E.toString  // warn! - spurious warning on toString only? no warning on hashCode.
  def v5 = new AE(1)   // no
  def v6 = AE(1)       // warn! - spurious warning, should be the same as v5
  def v7(x: AE) = 1    // no
  def v8 = AE.toString // warn! - same bug as v4?

  def w1 = new F(1)    // warn
  def w2 = F(1)        // no! - missing warning, should be the same as w1
  def w3(x: F) = 1     // no
  def w4 = F.toString  // no
  def w5 = new AF(1)   // warn
  def w6 = AF(1)       // no! - missing warning, should be the same as w5
  def w7(x: AF) = 1    // no
  def w8 = AF.toString // no

There was a discussion about what should ideally happen on the Scala 2 PR: https://github.com/scala/scala/pull/10792#discussion_r1634404635.
To summarize, given @deprecated case class C(x: Int):

Currently the synthetic companion object is not deprecated; no warning for calling C.hashCode
It was considered too easy to miss the deprecation, so a warning was added when using C.apply to make sure C(1) warns
In general, deprecations should not propagate through type / value aliases. A warning is issued when defining type CC = C, but not when using CC in new CC(1).
The warning issued for using C.apply also shows up when using an alias (val CC = C; CC.apply(1) – example v6 in the bug report above). That is an issue, it was just fixed in Scala 2 (#10792).

Maybe instead of intercepting the apply call and warn if the companion class is deprecated, the annotation should be propagated to the synthetic compaion by default.

@deprecated case class C(x: Int) => the synthetic companion object C is deprecated
case class C @deprecated (x: Int) => the synthetic apply method in the companion object C is deprecated

Doing that change could affect many projects.


Update deps for terraform 0.8.2

Updates deps for terraform 0.8.2. A minor version release should probably be done after this is merged.

retest this please

Closing in favor of #14


UNRESOLVED_IMPORT warning when importing libs from the same Nx workspace

I have a Nx workspace with 1 app and 6 libs (4 of which were generated using @nxext/stencil):

MyApp
MainLib (stencil)
LibA (stencil)
LibB (stencil)
LibC (stencil)
Utils
Types

MainLib is dependent on LibA and LibB.
When building MainLib I get this error for both LibA and LibB:
Bundling Warning UNRESOLVED_IMPORT
'@bv0012/lib-a' is imported by
../../../libs/main-lib/src/theme/component-map.ts, but could
not be resolved – treating it as an external dependency

There are no inline errors in component-map.ts and my tsconfig.json paths property looks like this:
"paths": {
      "@bv0012/main-lib": ["libs/main-lib/src/components.d.ts"],
      "@bv0012/main-lib/*": ["libs/main-lib/src/*"],
      "@bv0012/main-lib/loader": ["dist/libs/main-lib/loader"],
      "@bv0012/main-lib/react": [
        "dist/libs/generated/main-lib/react/src/components.ts"
      ],
      "@bv0012/types": ["libs/types/src/index.d.ts"],
      "@bv0012/utils": ["libs/utils/src/index.ts"],
      "@bv0012/lib-a": ["dist/libs/lib-a"],
      "@bv0012/lib-b": ["dist/libs/lib-b"],
      "@bv0012/lib-c": ["dist/libs/lib-c"]
    }

I'm pointing the lib paths to dist/ because they're publishable.
I feel like this is a node-resolve issue but I haven't had any success debugging it so far.

My current workaround is to npm link each libs dist directory and then npm link @bv0012/lib-ain the root directory and remove the paths for those libs fromtsconfig.json`

I also found out that even though lib-a and lib-b are not bundled with main-lib, the app that depends on main-lib is able to resolve the dependencies correctly without using npm link.

Here's a minimal reproduction.
Run nx build lib-a followed by nx build main-lib to see the issue.

It seems that path mappings are not supported out of the box by the stencil compiler which seems to be using rollup. There are dedicated Rollup plugins for that issue:
https://github.com/bitshiftza/rollup-plugin-ts-paths
https://github.com/simonhaenisch/rollup-plugin-typescript-paths
https://github.com/Mutefish0/rollup-plugin-typescript-path-mapping/blob/master/index.js
However, in context of Nx we have the additional challenge, that the app is built with apps/my-app/tsconfig.json but the path mappings are configured in the root tsconfig.json  (which the app-specific tsconfig.json extends).
If the Rollup plugin uses the root config, the root path does not match the app path and the module resolution fails.
If the Rollup plugin uses the app config, the plugins would have to resolve the extends reference to know about the path mappings in the root config, which none of the plugins seem to be capable of.

I spent the afternoon on a PR for rollup-plugin-typescript-paths and got the extends part working (simonhaenisch/rollup-plugin-typescript-paths#5). However, I noticed too late, that the plugin runs after TypeScript compilation:

It assumes that your Typescript code has already been transpiled before being rolled up

Which means that path mappings that reference the index.ts file of a lib won't work (as they are currently generated by the @nxext/stencil plugin):
    "baseUrl": ".",
    "paths": {
      "@my-org/my-lib": [
        "libs/my-lib/src/index.ts"
      ],
      "@my-org/my-lib/loader": [
        "dist/libs/my-lib/loader"
      ]
    }

@luchsamapparat thank you for sharing your investigation!
FWIW I'm on Mac OS.
I found that the changes introduced in the PR you mentioned were subsequently removed in this PR which has a lot of changes but very little context and has something to do with removing the legacy compiler.
I don't know if they were incorporated into another file because it's a large PR.

I did a quick check yesterday and created a new project with npm init stencil. I added "@foo": "src/some-file.ts" as path mapping to the generated tsconfig and then added an import for @foo to the generated component - and it worked 🤔

@luchsamapparat thanks for your help.
Sorry for the late response, I'm at holidays right now.
I'll take a look at soon as I can

@DominikPieper no problem, enjoy your holiday :)
@luchsamapparat I'm not seeing an issue with paths like your example. It's when the path is pointing to a build dir, e.g. "@bv0012/lib-a": ["dist/libs/lib-a"].
I did the same quick check using npm init stencil but with a path like above and I still see Bundling Warning UNRESOLVED_IMPORT.
I haven't tried using rollup-plugin-typescript-paths yet, it's on my todo list.

This is my stencil-only test for path mappings: https://github.com/luchsamapparat/stencil-path-mapping
[tsconfig.json](https://github.com/luchsamapparat/stencil-path-mapping/blob/master/tsconfig.json#L20)
    "paths": {
      "@foo": [
        "src/util.ts"
      ]
    }

[src/util.ts](https://github.com/luchsamapparat/stencil-path-mapping/blob/master/src/util.ts)
export const foo = 'bar';

[src/components/app-home/app-home.tsx](https://github.com/luchsamapparat/stencil-path-mapping/blob/master/src/components/app-home/app-home.tsx#L14)
        <h1>{foo}</h1>

No warning in my console:
❯ npm start

><EMAIL_ADDRESS>start {...}\stencil-path-mapping
> stencil build --dev --watch --serve

[23:05.9]  @stencil/core v1.12.2
[23:10.4]  build, app, dev mode, started ...
[23:10.5]  transpile started ...
[23:13.8]  transpile finished in 3.29 s
[23:13.8]  copy started ...
[23:13.8]  generate lazy started ...
[23:14.2]  copy finished (3 files) in 459 ms
[23:15.6]  generate lazy finished in 1.78 s
[23:15.6]  build finished, watching for changes... in 5.16 s

[23:15.6]  http://localhost:3333/

@hnipps Ah, then Stencil probably didn't implement the module resolution, that TypeScript is perfoming, which is quite complex:
https://github.com/microsoft/TypeScript/blob/2c08affa0d0d7fc55f15ab22e0326b93326d21d8/src/compiler/moduleNameResolver.ts#L927
https://github.com/microsoft/TypeScript/blob/2c08affa0d0d7fc55f15ab22e0326b93326d21d8/src/compiler/moduleNameResolver.ts#L1165
Maybe it's worth an issue in Stencil...?

Okay, now I'm back and looked into this. I'll do some experiments as well. The ugly/fastes solution could be using rollup again to bundle the libs. The @nrwl/web plugin does this, cause you can request the dependency tree und bundle up then. I'll try some more with the stencil compiler but maybe that's an workaround

Hey guys, finally I had some time to investigate deeper into this. Right now I try to find a solution for buildable libs. Trying with stencil 2.0 (maybe something fixed in the meantime) if I export the components I want to use in the libraries index.ts instead of the generated components.d.ts file it works ootb. I'll change the default template for not buildable libraries I think, to work here like the angular builders.

Unfortunately, the new version brings in a half solution—there a now the concept of buildable and not buildable libraries like in the Angular plugins. Import from not buildable plugins works well (just typescript doing some work here) but buildable libs, there's not a solution yet :-(

i was able to solve this by updating paths in tsconfig.base.json to this:
"paths": {
  "@cool-app/component-a": ["dist/libs/component-a/dist"],
  "@cool-app/component-b": ["dist/libs/component-b/dist"],
  "@cool-app/component-c": ["dist/libs/component-c/dist"],
  "@package": ["package.json"]
}

and by importing the packages in the global script:
import '@cool-app/component-a';
import '@cool-app/component-b';
import '@cool-app/component-c';

export default async () => {
  /**
   * The code to be executed should be placed within a default function that is
   * exported by the global script. Ensure all of the code in the global script
   * is wrapped in the function() that is exported.
   */
};

it feels wrong, but it works and doesn't appear to break the dependency graph

i was able to solve this by updating paths in tsconfig.base.json to this:
"paths": {
  "@cool-app/component-a": ["dist/libs/component-a/dist"],
  "@cool-app/component-b": ["dist/libs/component-b/dist"],
  "@cool-app/component-c": ["dist/libs/component-c/dist"],
  "@package": ["package.json"]
}

and by importing the packages in the global script:
import '@cool-app/component-a';
import '@cool-app/component-b';
import '@cool-app/component-c';

export default async () => {
  /**
   * The code to be executed should be placed within a default function that is
   * exported by the global script. Ensure all of the code in the global script
   * is wrapped in the function() that is exported.
   */
};

it feels wrong, but it works and doesn't appear to break the dependency graph


add more arguments to the function sfunction in linalg.ordqz

In the current scipy version, one may pass a callable as the argument sort of the function linalg.ordqz. This callable is supposed to be a function taking two arguments - alpha and betha, which are thought to be enough to figure out the sorting procedure. I have found applications where sorting is performed is a way that it also requires information on the eigenvectors Q and Z. Therefore, I propose to spread the argument list of the callable making it to accept also Q and Z outputing from the function _qz - that function is normally called before sorting. If you find this feature useful - let me know and I will make a pull request. In the pull request I have changed the line 358 in the module _decomp_qz.py
from
select = sfunction(alpha, beta)

to
select = sfunction(alpha, beta, Q, Z)

Can you give an example of such case? What kind of condition do you need such that you use QZ?

Each eigenvalue, E, can be computed as E=alpha/betha.  In my case the eigenvalues are complex numbers and I need to sort them: if |E| < 1 - they go to the upper-left block, if |E| > 1 - lower-right block.  So far, so good. The problem arises when |E| = 1. In this case, the decision can made using eigenvectors computing so called group velocity of the wave packet: Im[Z[:, j] * Z[:, j].T] > 0 - upper block, Im[Z[:, j] * Z[:, j].T] < 0 - lower block.
The modification I have mentioned can be made in a way that it does not affect the code requiring only alpha and betha by providing default values for Q and Z.

This still doesn't sort unit sized eigs. Comparison would still be the same for all |E| =1 and to be honest this can be done much quicker after obtaining the QZ decomposition and working with the subset of blocks.

This still doesn't sort unit sized eigs.

How do you know that? How does this statement comes? In my code it works perfectly.
Why do you think that only eigenvalues can be used to rearrange Shur forms - isn't it a lack of generality? I just don't want to patch scipy and add it into my package every time I need to distribute my software.

In LAPACK sorting is done by the function ?TGSEN. It accepts a logical argument select which is fully user defined and library itself doesn't impose restrictions that it can be computed only on the basis of eigenvalues. However full information is eigenvalues and eigenvectors.

So if you have two blocks both satisfying Im[Z[:, j] * Z[:, j].T] > 0 do you check their positiveness magnitude to sort them further? Or you just want them to appear at the top without any subsorting  among |E|=1. That was my previous remark maybe worded a bit cryptic.

So what is the final decision on the issue?

@ilayn any more thoughts?
@freude maybe share your code (as a link, gist or open a PR) so it's easier to discuss about?