Integrating with Expo

Has anybody managed to get an Expo Module/Config Plugin working for this lib ?
This is the only lib under react-native-webrtc/ organization that doesn't provide this

Did you get any solution?

I have used it successfully with Expo Plugins to generate the delegate.

@disco-panda awesome! mind sharing your config plugin ?

I have used it successfully with Expo Plugins to generate the delegate.
You can use this in your app config to give the proper permissions
    ios: {
...
      infoPlist: {
        UIBackgroundModes: ["voip"],
      }
    },
    ```

Very nice. Share that bad boy?

@disco-panda well done! Could you share the plugin? I don't mind cleaning up and helping PR this repo
I would save a lot of people a lot of headaches.

@ramezrafla forked the repo and created my own plugin. We dont have any contribution guide here, I don't know if I should request a PR.
https://github.com/jexodusmercado/react-native-voip-push-notification

@ramezrafla forked the repo and created my own plugin. We dont have any contribution guide here, I don't know if I should request a PR.
Note: I implemented the RNCallKeep in the AppDelegate too. This is the exact requirements of our app.
https://github.com/jexodusmercado/react-native-voip-push-notification

Holy mac-n-cheese. There isn't a number that would accurately represent the amount of people you are helping with this. You could request a PR here, but the main dev is in and out alot.

@AlanGreyjoy Let me clean my code first then request a PR in a few days. I need sleep. The amount of trial and error to make it work locally and in the eas-build is too much.

@AlanGreyjoy Let me clean my code first then request a PR in a few days. I need sleep. The amount of trial and error to make it work locally and in the eas-build is too much.

I know the pain... been developing a node-red plugin.

I created the PR. Lets hope the main dev review this

Dear @jexodusmercado -- well done! We worked in parallel. We used app.config.js in our app to do the same. I am sharing here to help people:
Notes:

Save this file as app.config.js in your project root
Edit the obj-c to align with your own notification payload
You also need to add react-native-call-keep package -- this code handles both
Run npx expo prebuild and inspect the output AppDelegate.mm file
During build if you made a change and there is an error, look for it on the expo.dev build console and adjust
No need to call completion from JS side -- it's handled here already
Don't add self.bridge stuff from the README -- it's for pure React-Native. Expo handles for you

// app.config.js
// https://github.com/invertase/react-native-firebase/discussions/5386#discussioncomment-860295
// https://www.videosdk.live/blog/react-native-ios-video-calling-app-with-callkeep
// https://sendbird.com/docs/calls/sdk/v1/react-native/direct-call/receiving-a-call/receive-a-call-in-the-background

import { withAppDelegate } from '@expo/config-plugins'
import { addObjcImports, insertContentsInsideObjcFunctionBlock, findObjcFunctionCodeBlock } from '@expo/config-plugins/build/ios/codeMod'

const DID_FINISH_LAUNCHING = 'application:didFinishLaunchingWithOptions:'
const DID_UPDATE_PUSH_CREDENTIALS = 'pushRegistry:didUpdatePushCredentials:forType:'
const DID_RECEIVE_INCOMING_PUSH = 'pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:'
const CONTINUE_USER_ACTIVITY = 'application:continueUserActivity:restorationHandler:'

function addContinueUserActivity(contents) {
  // call the setup of RNCallKeep
  // https://github.com/react-native-webrtc/react-native-callkeep
  // call the setup of voip push notification
  // https://github.com/react-native-webrtc/react-native-voip-push-notification
  const setupContinue = 'BOOL resultRNCall = [RNCallKeep application:application continueUserActivity:userActivity restorationHandler:restorationHandler];'
  if (!contents.includes(setupContinue)) {
    contents = insertContentsInsideObjcFunctionBlock(
      contents,
      CONTINUE_USER_ACTIVITY,
      setupContinue,
      { position: 'head' }
    )
    contents = contents.replace('[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler]', '[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || resultRNCall')
  }
  return contents
}

// https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/expo-config-plugin/src/withPushAppDelegate.ts#L30
function addImports(contents) {
  return addObjcImports(
    contents,
    [
      '<PushKit/PushKit.h>',
      '"RNVoipPushNotificationManager.h"',
      '"RNCallKeep.h"'
    ]
  )
}

// https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/expo-config-plugin/src/common/addNewLinesToAppDelegate.ts
function addNewLinesToAppDelegate(content, toAdd) {
  const lines = content.split('\n')
  let lineIndex = lines.findIndex((line) => line.match('@end'))
  if (lineIndex < 0) throw Error('Malformed app delegate')
  toAdd.unshift('')
  lineIndex -= 1
  for (const newLine of toAdd) {
    lines.splice(lineIndex, 0, newLine)
    lineIndex++
  }
  return lines.join('\n')
}

function addDidFinishLaunching(contents) {
  // call the setup of RNCallKeep
  // https://github.com/react-native-webrtc/react-native-callkeep
  // call the setup of voip push notification
  // https://github.com/react-native-webrtc/react-native-voip-push-notification
  const setupCallKeep = `
  NSString *appName = [[[NSBundle mainBundle] infoDictionary]objectForKey :@"CFBundleDisplayName"];
  [RNCallKeep setup:@{
    @"appName": appName,
    @"supportsVideo": @NO,
    @"includesCallsInRecents": @YES,
    @"maximumCallGroups": @1,
    @"maximumCallsPerCallGroup": @1
  }];
  [RNVoipPushNotificationManager voipRegistration];
  `
  if (!contents.includes('[RNCallKeep setup:@')) {
    contents = insertContentsInsideObjcFunctionBlock(
      contents,
      DID_FINISH_LAUNCHING,
      setupCallKeep,
      { position: 'head' }
    )
  }
  return contents
}

function addDidUpdatePushCredentials(contents) {
  if (!contents.includes('didInvalidatePushTokenForType:(PKPushType)type')) {
    contents = addNewLinesToAppDelegate(contents, [
`
- (void)pushRegistry:(PKPushRegistry *)registry didInvalidatePushTokenForType:(PKPushType)type {
  // --- The system calls this method when a previously provided push token is no longer valid for use. No action is necessary on your part to reregister the push type. Instead, use this method to notify your server not to send push notifications using the matching push token.
}
`
    ])
  }

  const updatedPushCredentialsMethod = '[RNVoipPushNotificationManager didUpdatePushCredentials:credentials forType:(NSString *)type];'
  if (!contents.includes(updatedPushCredentialsMethod)) {
    if (!findObjcFunctionCodeBlock(contents, DID_UPDATE_PUSH_CREDENTIALS)) {
      contents = addNewLinesToAppDelegate(contents, [
`- (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(PKPushType)type {
    ${updatedPushCredentialsMethod}
}`
      ])
    }
    else {
      contents = insertContentsInsideObjcFunctionBlock(
        contents,
        DID_UPDATE_PUSH_CREDENTIALS,
        updatedPushCredentialsMethod,
        { position: 'tail' }
      )
    }
  }
  return contents
}

function addDidReceiveIncomingPush(contents) {
  // https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/expo-config-plugin/src/withPushAppDelegate.ts#L30
  // https://github.com/react-native-webrtc/react-native-callkeep#pushkit
  const onIncomingPush = `
  [RNCallKeep reportNewIncomingCall: [[NSUUID UUID] UUIDString]
    handle: payload.dictionaryPayload[@"handle"]
    handleType: @"generic"
    hasVideo: NO
    localizedCallerName: payload.dictionaryPayload[@"caller"]
    supportsHolding: YES
    supportsDTMF: YES
    supportsGrouping: YES
    supportsUngrouping: YES
    fromPushKit: YES
    payload: nil
    withCompletionHandler: completion];
  [RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];
`
  if (!contents.includes('[RNVoipPushNotificationManager didReceiveIncomingPushWithPayload')) {
    if (!findObjcFunctionCodeBlock(contents, DID_RECEIVE_INCOMING_PUSH)) {
      contents = addNewLinesToAppDelegate(contents, [
`- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion {
${onIncomingPush}
}`
      ])
    }
    else {
      contents = insertContentsInsideObjcFunctionBlock(
        contents,
        DID_RECEIVE_INCOMING_PUSH,
        onIncomingPush,
        { position: 'tail' }
      )
    }
  }
  return contents
}

// https://www.sitepen.com/blog/doing-more-with-expo-using-custom-native-code
// https://docs.expo.dev/config-plugins/plugins-and-mods/
// https://github.com/invertase/react-native-firebase/discussions/5386
function withVoipAppDelegate(config) {
  return withAppDelegate(config, (cfg) => {
    const { modResults } = cfg
    if (['objc', 'objcpp'].includes(modResults.language)) {
      modResults.contents = addImports(modResults.contents)
      modResults.contents = addDidFinishLaunching(modResults.contents)
      modResults.contents = addDidUpdatePushCredentials(modResults.contents)
      modResults.contents = addDidReceiveIncomingPush(modResults.contents)
      modResults.contents = addContinueUserActivity(modResults.contents)
      // console.log(modResults.contents)
    }
    return cfg
  })
}

module.exports = ({ config }) => {
  return withVoipAppDelegate(config)
}

I created the PR. Lets hope the main dev review this

Hey, sorry for the silly question but. How do I apply your approach? I add the plugin and run it? Or should I manually apply the modifications you outline in the AppDelegate.m modification? Or both? Thanks a lot for the help!

I created the PR. Lets hope the main dev review this

Hey, sorry for the silly question but: How do I apply your approach? I create the plugin file, add the plugin to the config and make a build / prebuild? Or should I manually apply the modifications you outline in the AppDelegate.m modification? Or both? Thanks a lot for the help!

I created the PR. Lets hope the main dev review this

Hey, sorry for the silly question but: How do I apply your approach? I create the plugin file, add the plugin to the config and make a build / prebuild? Or should I manually apply the modifications you outline in the AppDelegate.m modification? Or both? Thanks a lot for the help!

Don't manually make the modifications, that would be overwritten when you next build.
In your root folder (where you find package.json etc) create a file called voip.js, and paste the following into it (credit to @ramezrafla above):
// https://github.com/invertase/react-native-firebase/discussions/5386#discussioncomment-860295
// https://www.videosdk.live/blog/react-native-ios-video-calling-app-with-callkeep
// https://sendbird.com/docs/calls/sdk/v1/react-native/direct-call/receiving-a-call/receive-a-call-in-the-background

const { addObjcImports, insertContentsInsideObjcFunctionBlock, findObjcFunctionCodeBlock } = require('@expo/config-plugins/build/ios/codeMod')
const { withAppDelegate } = require('@expo/config-plugins')

const DID_FINISH_LAUNCHING = 'application:didFinishLaunchingWithOptions:'
const DID_UPDATE_PUSH_CREDENTIALS = 'pushRegistry:didUpdatePushCredentials:forType:'
const DID_RECEIVE_INCOMING_PUSH = 'pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:'
const CONTINUE_USER_ACTIVITY = 'application:continueUserActivity:restorationHandler:'

function addContinueUserActivity(contents) {
    // call the setup of RNCallKeep
    // https://github.com/react-native-webrtc/react-native-callkeep
    // call the setup of voip push notification
    // https://github.com/react-native-webrtc/react-native-voip-push-notification
    const setupContinue = 'BOOL resultRNCall = [RNCallKeep application:application continueUserActivity:userActivity restorationHandler:restorationHandler];'
    if (!contents.includes(setupContinue)) {
        contents = insertContentsInsideObjcFunctionBlock(
            contents,
            CONTINUE_USER_ACTIVITY,
            setupContinue,
            { position: 'head' }
        )
        contents = contents.replace('[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler]', '[super application:application continueUserActivity:userActivity restorationHandler:restorationHandler] || resultRNCall')
    }
    return contents
}

// https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/expo-config-plugin/src/withPushAppDelegate.ts#L30
function addImports(contents) {
    return addObjcImports(
        contents,
        [
            '<PushKit/PushKit.h>',
            '"RNVoipPushNotificationManager.h"',
            '"RNCallKeep.h"'
        ]
    )
}

// https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/expo-config-plugin/src/common/addNewLinesToAppDelegate.ts
function addNewLinesToAppDelegate(content, toAdd) {
    const lines = content.split('\n')
    let lineIndex = lines.findIndex((line) => line.match('@end'))
    if (lineIndex < 0) throw Error('Malformed app delegate')
    toAdd.unshift('')
    lineIndex -= 1
    for (const newLine of toAdd) {
        lines.splice(lineIndex, 0, newLine)
        lineIndex++
    }
    return lines.join('\n')
}

function addDidFinishLaunching(contents) {
    // call the setup of RNCallKeep
    // https://github.com/react-native-webrtc/react-native-callkeep
    // call the setup of voip push notification
    // https://github.com/react-native-webrtc/react-native-voip-push-notification
    const setupCallKeep = `
  NSString *appName = [[[NSBundle mainBundle] infoDictionary]objectForKey :@"CFBundleDisplayName"];
  [RNCallKeep setup:@{
    @"appName": appName,
    @"supportsVideo": @YES,
    @"includesCallsInRecents": @YES,
    @"maximumCallGroups": @1,
    @"maximumCallsPerCallGroup": @1
  }];
  [RNVoipPushNotificationManager voipRegistration];
  `
    if (!contents.includes('[RNCallKeep setup:@')) {
        contents = insertContentsInsideObjcFunctionBlock(
            contents,
            DID_FINISH_LAUNCHING,
            setupCallKeep,
            { position: 'head' }
        )
    }
    return contents
}

function addDidUpdatePushCredentials(contents) {
    if (!contents.includes('didInvalidatePushTokenForType:(PKPushType)type')) {
        contents = addNewLinesToAppDelegate(contents, [
            `
- (void)pushRegistry:(PKPushRegistry *)registry didInvalidatePushTokenForType:(PKPushType)type {
  // --- The system calls this method when a previously provided push token is no longer valid for use. No action is necessary on your part to reregister the push type. Instead, use this method to notify your server not to send push notifications using the matching push token.
}
`
        ])
    }

    const updatedPushCredentialsMethod = '[RNVoipPushNotificationManager didUpdatePushCredentials:credentials forType:(NSString *)type];'
    if (!contents.includes(updatedPushCredentialsMethod)) {
        if (!findObjcFunctionCodeBlock(contents, DID_UPDATE_PUSH_CREDENTIALS)) {
            contents = addNewLinesToAppDelegate(contents, [
                `- (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(PKPushType)type {
    ${updatedPushCredentialsMethod}
}`
            ])
        }
        else {
            contents = insertContentsInsideObjcFunctionBlock(
                contents,
                DID_UPDATE_PUSH_CREDENTIALS,
                updatedPushCredentialsMethod,
                { position: 'tail' }
            )
        }
    }
    return contents
}

function addDidReceiveIncomingPush(contents) {
    // https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/expo-config-plugin/src/withPushAppDelegate.ts#L30
    // https://github.com/react-native-webrtc/react-native-callkeep#pushkit
    const onIncomingPush = `
  [RNCallKeep reportNewIncomingCall: [[NSUUID UUID] UUIDString]
    handle: payload.dictionaryPayload[@"handle"]
    handleType: @"generic"
    hasVideo: YES
    localizedCallerName: payload.dictionaryPayload[@"caller"]
    supportsHolding: YES
    supportsDTMF: YES
    supportsGrouping: YES
    supportsUngrouping: YES
    fromPushKit: YES
    payload: nil
    withCompletionHandler: completion];
  [RNVoipPushNotificationManager didReceiveIncomingPushWithPayload:payload forType:(NSString *)type];
`
    if (!contents.includes('[RNVoipPushNotificationManager didReceiveIncomingPushWithPayload')) {
        if (!findObjcFunctionCodeBlock(contents, DID_RECEIVE_INCOMING_PUSH)) {
            contents = addNewLinesToAppDelegate(contents, [
                `- (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(PKPushType)type withCompletionHandler:(void (^)(void))completion {
${onIncomingPush}
}`
            ])
        }
        else {
            contents = insertContentsInsideObjcFunctionBlock(
                contents,
                DID_RECEIVE_INCOMING_PUSH,
                onIncomingPush,
                { position: 'tail' }
            )
        }
    }
    return contents
}

// https://www.sitepen.com/blog/doing-more-with-expo-using-custom-native-code
// https://docs.expo.dev/config-plugins/plugins-and-mods/
// https://github.com/invertase/react-native-firebase/discussions/5386
module.exports = function withPrefixedName(config, prefix) {
    //return config
    return withAppDelegate(config, (cfg) => {
        const { modResults } = cfg
        if (['objc', 'objcpp'].includes(modResults.language)) {
            modResults.contents = addImports(modResults.contents)
            modResults.contents = addDidFinishLaunching(modResults.contents)
            modResults.contents = addDidUpdatePushCredentials(modResults.contents)
            modResults.contents = addDidReceiveIncomingPush(modResults.contents)
            modResults.contents = addContinueUserActivity(modResults.contents)
            // console.log(modResults.contents)
        }
        return cfg
    })
}

Then in your app.config.js, add the following:

"plugins": [
"./voip",

And the following:
"ios": {
    "infoPlist": {
      "UIBackgroundModes": [
        "voip",
        "remote-notification"
      ]
    }
  },

Then just build normally.
A word of warning, this plugin assumes your VoIP notification contains a data dictionary with the properties handle, callerName and uuid. Without those, your app will crash when you receive a notification. If you want to change that, find them in voip.js and amend as needed.
Example push notification payload:
// Notification payload const notificationPayload = {   aps: {     alert: {       // add custom data here     },     sound: 'default',     'content-available': 1 // Indicates a VoIP notification   },   type: 'voip',   data: { 	handle: 'handle', 	callerName: 'Caller Name', 	uuid: uuid   } };
Final point - I changed the video settings to 'YES' - as this allows a user to automatically go to your app even if their phone was locked prior to receiving the call


[SPARK-12217] [ML] Document invalid handling for StringIndexer

Added a paragraph regarding StringIndexer#setHandleInvalid to the ml-features documentation.
I wonder if I should also add a snippet to the code example, input welcome.

Test build #47545 has started for PR 10257 at commit 8c293a5.

Test build #47545 has finished for PR 10257 at commit 8c293a5.

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

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

Merged build finished. Test PASSed.

Pinging @holdenk and @jkbradley

That looks good to me, I don't think a full code example is necessary.

@BenFradet  Thanks!  I agree you didn't have to write a full example, but it's nice that it explains it very clearly, so I'd keep it.
I just had small phrasing comments.

@jkbradley thanks for the comments.

LGTM pending tests
Thanks!

Test build #2209 has started for PR 10257 at commit 0fb5e2b.

Test build #47600 has started for PR 10257 at commit 0fb5e2b.

Test build #47600 has finished for PR 10257 at commit 0fb5e2b.

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

Test build #2209 has finished for PR 10257 at commit 0fb5e2b.

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

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

Merged build finished. Test PASSed.

Merging with master and branch-1.6


windows developer edition does not support server 1709 build.

When I try to run the a container based on the latest tag on a 1709 windows sever core docker host. I get the following error message.
failure in a Windows system call: The operating system of the container does not match the operating system of the host. (0xc0370101)
I expected that there would be a mssql-windows-developer-edition that is based on the latest server continer version 1709.

Thanks @erichexter!
We just published an updated mssql-windows-developer image that is based on the latest Windows Server version - Please give that a try.

I don't think the base image is using a 1709 based version. I was not able to use the latest version it gave me the same error as the 2017-latest.  I pulled the history for each of the 1709 container images and the latest developer image. It looks like the server version numbers are different.
I expected the base layer to be
Install update 10.0.16299.64    instead of  Install update 10.0.14393.1884
PS C:\Users\eric\github\DockerContainers\Containers\Build> docker history microsoft/windowsservercore:1709
IMAGE               CREATED             CREATED BY                     SIZE                COMMENT
be1324f21832        4 weeks ago         Install update **10.0.16299.64**   962MB
<missing>           2 months ago        Apply image 10.0.16299.15      4.62GB

PS C:\Users\eric\github\DockerContainers\Containers\Build> docker history microsoft/windowsservercore:1709_KB4048955
IMAGE               CREATED             CREATED BY                     SIZE                COMMENT
be1324f21832        4 weeks ago         Install update **10.0.16299.64**   962MB
<missing>           2 months ago        Apply image 10.0.16299.15      4.62GB

PS C:\Users\eric\github\DockerContainers\Containers\Build> docker history microsoft/mssql-server-windows-developer:latest

IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
9e08a14c562e        2 hours ago         powershell -Command $ErrorActionPreference =…   41kB
<missing>           2 hours ago         powershell -Command $ErrorActionPreference =…   41kB
<missing>           2 hours ago         powershell -Command $ErrorActionPreference =…   121MB
<missing>           2 hours ago         powershell -Command $ErrorActionPreference =…   1.1GB
<missing>           2 hours ago         powershell -Command $ErrorActionPreference =…   41kB
<missing>           2 hours ago         powershell -Command $ErrorActionPreference =…   42.8kB
<missing>           2 hours ago         powershell -Command $ErrorActionPreference =…   41kB
<missing>           2 hours ago         cmd /S /C #(nop)  ENV ACCEPT_EULA=_             41kB
<missing>           2 hours ago         cmd /S /C #(nop)  ENV attach_dbs=[]             41kB
<missing>           2 hours ago         cmd /S /C #(nop)  ENV sa_password=_             41kB
<missing>           2 hours ago         cmd /S /C #(nop)  ENV box=https://go.microso…   41kB
<missing>           2 hours ago         cmd /S /C #(nop)  ENV exe=https://go.microso…   41kB
<missing>           2 hours ago         cmd /S /C #(nop)  LABEL maintainer=Perry Sko…   41kB
<missing>           3 weeks ago         Install update **10.0.14393.1884**                  2.72GB
<missing>           11 months ago       Apply image 10.0.14393.0                        7.68GB

In the mean time, I have found that if I run this container using hyperv isolation on the windows server, I can use the image. so I think I am not blocked, just using a less optimal method.  As far as the developer workflows, we have to use hyperv on windows 10, so really not an issue there. it is just a problem on our build servers.

@eri

I think you have to explicit select the windowsservercore:1709 in order to pull from that base image.  its kind of a breaking changing in tag versions, but that is what the team id soing.

Got it! I'll pull the 1709 base image and build a new sql dev image shortly.

@clawrenceks can you share the Dockerfile you used to package SQL on 1709?

@sixeyed Sure, I actually just took the Dockerfile from this repo at https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows-developer/dockerfile and changed the FROM instruction to use microsoft/windowsservercore:1709 as the base.

Thanks @clawrenceks  - works for me :)

Thanks all for your help and feedback and apologies for the long delay - The SQL Developer and Express 1709 images are now published on DockerHub with a 1709 tag.
Please let me know if these work ok for you - I am closing this issue for now.
Thanks, Perry


feat: enable proxy support in the cli

closes: #862
Related: https://github.com/asyncapi/cli/issues/1508

As discussed with @Souvikns planning to create a global flags that is proxyHost and proxyPort that can easily help to integrate proxy supports with various commands of the CLI.

Asyncapi generate
Asyncapi validate
Asyncapi convert
Asyncapi optimise


CORE-391 - Hotfix: Fix dependency on LoremPixel

:tada: This PR is included in version 4.9.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


From v5.5.1, dependency "winston" was updated upto v3, which leads to a problem

From v5.5.1, dependency "winston" was updated upto v3(before is v2), which leads to incorrect log:

Hi @StinsonZhao,  Thanks for reporting, I am working on it now 👍

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Implementing get and update account methods

@lauraferraz5 I've done a minor update to the Features to go ahead and switch them to use the User.Id() (i.e. the user ID automatically coming from Azure when a user is logged in) instead of getting this value from the UI. In a perfect world, this value would never be visible in the UI, because the UI doesn't need it. When the user logs in, they're actually logging into the Features project, if that makes sense -- and so the UI doesn't even really know about the logged in user at all. But this makes sense because most of the secure things we want to do w/ an authenticated user exist on the Features project.
I've also merged from master to this branch to resolve the merge conflicts. Let me know if all this makes sense!

@josephatkuvio Yes, that makes sense! Thank you for the correction and the explanation!


[CUDA] Add CUDA_ARCHITECTURES to fix CMake warnings (#3754)

Set property CUDA_ARCHITECTURES would fix the warnings reported by CMake 3.20.x

@jameslamb

If you haven't tested that and aren't able to easily test it, I can try in the next day or two.

You've said you have an easy access to Linux with CUDA machine. If that's still true, could you please check this PR with CMake 3.16? I want to be sure these changes don't make old CMake panic with unrecognized target property.
https://github.com/microsoft/LightGBM/pull/4268#discussion_r631840059

If that's still true, could you please check this PR with CMake 3.16?

yep, definitely! I'll try soon and let you know what I find.

Compilation seemed to succeed and I don't see any warnings! Using CUDA 10.2 and CMake 3.16.9 (the latest version in the 3.16 series, as far as I could tell from https://cmake.org/cmake/help/latest/release/3.16.html).
output of nvidia-smi
Fri May 14 20:01:32 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100      Driver Version: 440.100      CUDA Version: 10.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 207...  Off  | 00000000:01:00.0 Off |                  N/A |
| N/A   51C    P8    10W /  N/A |    286MiB /  7982MiB |     12%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
+-----------------------------------------------------------------------------+

I used nvidia-docker to test this. Ran this command:
nvidia-docker run \
    --env DEBIAN_FRONTEND="noninteractive" \
    -it nvidia/cuda:10.2-devel-ubuntu18.04 \
    /bin/bash

Then this script inside the container:
testing scripts
apt-get update
apt-get install \
    -y \
    software-properties-common \
    apt-transport-https \
    curl \
    git \
    wget \
    libcurl4-openssl-dev \
    default-jdk-headless \
    libssl-dev \
    libxml2-dev \
    libboost-dev \
    libboost-system-dev \
    libboost-filesystem-dev \
    clinfo

# see install instructions at https://cmake.org/install/
mkdir -p /tmp/cmake-install
pushd /tmp/cmake-install

    CMAKE_VERSION=3.16.9
    CMAKE_TARBALL=cmake-${CMAKE_VERSION}.tar.gz

    curl -OL \
        https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_TARBALL}
    tar -xvzf ${CMAKE_TARBALL}
    rm -rf ./${CMAKE_TARBALL}
    cd cmake-${CMAKE_VERSION}
    ./bootstrap
    make
    make install
popd

# check CMake version
cmake --version

# get LightGBM from PR 4268
git clone --recursive https://github.com/RobinDong/LightGBM.git --branch master

cd LightGBM
mkdir ./build
cd ./build
cmake \
    -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
    -DUSE_CUDA=ON \
    ..

make _lightgbm -j4

See the logs below.
logs from 'cmake ..'
ran the following
cmake \
    -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
    -DUSE_CUDA=ON \
    ..

which resulted in these logs
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The CUDA compiler identification is NVIDIA 10.2.89
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found suitable version "10.2", minimum required is "9.0")
-- CMAKE_CUDA_FLAGS: -Xcompiler=-fopenmp -Xcompiler=-fPIC -Xcompiler=-Wall -gencode arch=compute_60,code=sm_60 -gencode arch=compute_61,code=sm_61 -gencode arch=compute_62,code=sm_62 -gencode arch=compute_70,code=sm_70 -gencode arch=compute_75,code=sm_75 -gencode arch=compute_75,code=compute_75 -O3 -lineinfo
-- ALLFEATS_DEFINES: -DPOWER_FEATURE_WORKGROUPS=12;-DUSE_CONSTANT_BUF=0;-DENABLE_ALL_FEATURES
-- FULLDATA_DEFINES: -DPOWER_FEATURE_WORKGROUPS=12;-DUSE_CONSTANT_BUF=0;-DENABLE_ALL_FEATURES;-DIGNORE_INDICES
-- Performing Test MM_PREFETCH
-- Performing Test MM_PREFETCH - Success
-- Using _mm_prefetch
-- Performing Test MM_MALLOC
-- Performing Test MM_MALLOC - Success
-- Using _mm_malloc
-- Configuring done
-- Generating done
-- Build files have been written to: /root/LightGBM/build

logs from 'make _lightgbm'
ran the following
make _lightgbm -j2

which resulted in the following logs
Scanning dependencies of target histo_16_64_256_sp
Scanning dependencies of target histo_16_64_256-fulldata_sp_const
[  2%] Building CUDA object CMakeFiles/histo_16_64_256_sp.dir/src/treelearner/kernels/histogram_16_64_256.cu.o
[  5%] Building CUDA object CMakeFiles/histo_16_64_256-fulldata_sp_const.dir/src/treelearner/kernels/histogram_16_64_256.cu.o
[  5%] Built target histo_16_64_256-fulldata_sp_const
Scanning dependencies of target histo_16_64_256_sp_const
[  7%] Building CUDA object CMakeFiles/histo_16_64_256_sp_const.dir/src/treelearner/kernels/histogram_16_64_256.cu.o
[  7%] Built target histo_16_64_256_sp
Scanning dependencies of target histo_16_64_256-fulldata_sp
[ 10%] Building CUDA object CMakeFiles/histo_16_64_256-fulldata_sp.dir/src/treelearner/kernels/histogram_16_64_256.cu.o
[ 10%] Built target histo_16_64_256_sp_const
[ 10%] Built target histo_16_64_256-fulldata_sp
Scanning dependencies of target _lightgbm
[ 15%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/boosting.cpp.o
[ 15%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/gbdt.cpp.o
[ 17%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/gbdt_model_text.cpp.o
[ 20%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/gbdt_prediction.cpp.o
[ 22%] Building CXX object CMakeFiles/_lightgbm.dir/src/boosting/prediction_early_stop.cpp.o
[ 25%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/bin.cpp.o
[ 27%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/config.cpp.o
[ 30%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/config_auto.cpp.o
[ 32%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/dataset.cpp.o
[ 35%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/dataset_loader.cpp.o
[ 37%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/file_io.cpp.o
[ 40%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/json11.cpp.o
[ 42%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/metadata.cpp.o
[ 45%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/parser.cpp.o
[ 47%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/train_share_states.cpp.o
[ 50%] Building CXX object CMakeFiles/_lightgbm.dir/src/io/tree.cpp.o
[ 52%] Building CXX object CMakeFiles/_lightgbm.dir/src/metric/dcg_calculator.cpp.o
[ 55%] Building CXX object CMakeFiles/_lightgbm.dir/src/metric/metric.cpp.o
[ 57%] Building CXX object CMakeFiles/_lightgbm.dir/src/network/ifaddrs_patch.cpp.o
[ 60%] Building CXX object CMakeFiles/_lightgbm.dir/src/network/linker_topo.cpp.o
[ 62%] Building CXX object CMakeFiles/_lightgbm.dir/src/network/linkers_mpi.cpp.o
[ 65%] Building CXX object CMakeFiles/_lightgbm.dir/src/network/linkers_socket.cpp.o
[ 67%] Building CXX object CMakeFiles/_lightgbm.dir/src/network/network.cpp.o
[ 70%] Building CXX object CMakeFiles/_lightgbm.dir/src/objective/objective_function.cpp.o
[ 72%] Building CUDA object CMakeFiles/_lightgbm.dir/src/treelearner/cuda_kernel_launcher.cu.o
[ 75%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/cuda_tree_learner.cpp.o
[ 77%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/data_parallel_tree_learner.cpp.o
[ 80%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/feature_parallel_tree_learner.cpp.o
[ 82%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/gpu_tree_learner.cpp.o
[ 85%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/linear_tree_learner.cpp.o
[ 87%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/serial_tree_learner.cpp.o
[ 90%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/tree_learner.cpp.o
[ 92%] Building CXX object CMakeFiles/_lightgbm.dir/src/treelearner/voting_parallel_tree_learner.cpp.o
[ 95%] Building CXX object CMakeFiles/_lightgbm.dir/src/c_api.cpp.o
[ 97%] Linking CUDA device code CMakeFiles/_lightgbm.dir/cmake_device_link.o
[100%] Linking CXX shared library ../lib_lightgbm.so
[100%] Built target _lightgbm

Now that I have this script working, it would be fairly easy and quick to test other CMake versions, so please let me know if there are other versions you'd like me to check.

@RobinDong Please update to the latest master branch to fix Dask environmental issues we fixed recently and we are ready to merge.


Training view angle details

Hello, it is a really nice work! May I ask about the exact elevation and azimuths angles for your 100 camera views used in training? Thanks!

Hi, it's basically sampled from a spiral path on a sphere surface:

Thanks! Looks like the camera elevation simply goes from 90 to -90, while the azimuth goes from 0 to 360 around 5 rounds?
Also, during training, are there any issues when the randomly selected  input views are too different from other views that used for supervision?


[Extensions] Filter internal users for Service Accounts and add associated API

As a follow-up to #2594, a filtering option can be added to the existing internal users functionality. The filtering should allow a client to fetch just true internal user (not service) accounts or just service accounts. This filtering should be applied to the backend as well as the internal users list capabilities of the frontend code. An API route will need to be added to the handleGet method of the internalUsersAPI since there is not currently group filtering functionality.
The backend logic can look something like this inside the UserService:
public static List<String> listServiceAccounts() {

        final SecurityDynamicConfiguration<?> internalUsersConfiguration = load(getConfigName(), false);

        List<String> serviceAccounts = new ArrayList<>();
        for (Map.Entry<String, ?> entry : internalUsersConfiguration.getCEntries().entrySet()) {

            final InternalUserV7 internalUserEntry = (InternalUserV7) entry.getValue();
            final Map accountAttributes = internalUserEntry.getAttributes();
            final String accountName = entry.getKey();
            if (accountAttributes.containsKey("service") && accountAttributes.get("service") == "true") {
                serviceAccounts.add(accountName);
            }
        }
        return serviceAccounts;
    }

    public static List<String> listInternalUsers() {

        final SecurityDynamicConfiguration<?> internalUsersConfiguration = load(getConfigName(), false);

        List<String> internalUserAccounts = new ArrayList<>();
        for (Map.Entry<String, ?> entry : internalUsersConfiguration.getCEntries().entrySet()) {

            final InternalUserV7 internalUserEntry = (InternalUserV7) entry.getValue();
            final Map accountAttributes = internalUserEntry.getAttributes();
            final String accountName = entry.getKey();
            if (!accountAttributes.containsKey("service") || accountAttributes.get("service") == "false") {
                internalUserAccounts.add(accountName);
            }
        }
        return internalUserAccounts;
    }

    public static Set<String> listUserAccounts() {

        final SecurityDynamicConfiguration<?> internalUsersConfiguration = load(getConfigName(), false);
        return internalUsersConfiguration.getCEntries().keySet();
    }

For the frontend logic, the PR will need to extend the existing code that fetches the internal users and displays it as part of the Security tab.
Completion of this issue should look like two PR:
One in the backend code base that introduces the filtering capabilities shown above as well as the associated API routes.
One in the frontend code base that updates the internal users tab to allow for filtering the shown users based on whether they are service accounts or not.

Hi @scrawfor99
The preliminary code that you provided in the issue description returns only the list of names of the accounts of the specified type, but the existing implementations on internalUsersAPI return the full account details.
Can you confirm if the objective on this is
1 - Just return the list of names
2 - Return the full account details.
I believe the latter is more appropriate to keep in line with existing functionality, but just want to confirm.
Thanks

Confirmed during last week's call that  the full account details is the correct approach.   PR was refactored to reflect this

Reopened as the PR on the  dashboards side https://github.com/opensearch-project/security-dashboards-plugin/pull/1502 still needs to be merged/reviewd

Pr merged, can be closed


Decide on a LICENSE and create file

Not sure what the best choice would be. I've used MIT and BSD-3 in the past, but haven't run into any situations where it really mattered what was used.

BSD-3 it is


windows-latest missing reference assemblies for .NETFramework,Version=4.6.1

Description
Azure Pipeline shows:
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1217,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks
on windows-latest. Reverting to windows-2019 fixes it.
I hope I am clear enough. A bit of a noob, I am afraid.
Virtual environments affected

[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] macOS 10.15
[ ] macOS 11
[ ] Windows Server 2016
[X] Windows Server 2019
[X] Windows Server 2022

Image version and build link
windows-latest versus windows-2019
Is it regression?
No response
Expected behavior
No response
Actual behavior
No response
Repro steps

Set: vmImage: 'windows-latest'

The error is produced.

Hi @chriscfox
Lets check whether it is sufficient to mitigate the issue by adding these components.
Could you please try to install them during runtime using following PowerShell snippet:
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files (x86)\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd = @(
  "Microsoft.Net.Component.4.6.1.SDK"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " +  $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
    Write-Host "components have been successfully added"
}
else
{
    Write-Host "components were not installed"
    exit 1
}

@chriscfox gentle ping on this

Hi All. Apologies for the delay. I have now tried this. It fails for me with exit code 1.

Strangely, my build now seems to be working with windows-latest. So I wonder if something else got fixed in the interim?

I have the same problem and when trying to use the suggested solution by @shilovmaksim.
Even after installation I still get the error message.
PowerShell:
==============================================================================
Task         : PowerShell
Description  : Run a PowerShell script on Linux, macOS, or Windows
Version      : 2.198.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/powershell
==============================================================================
Generating script.
========================== Starting Command Output ===========================
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'D:\a\_temp\4eef8efb-6e23-47c5-b0c1-4f1e986c26fe.ps1'"
components have been successfully added
Finishing: PowerShell

Build:
==============================================================================
Task         : Visual Studio build
Description  : Build with MSBuild and set the Visual Studio version property
Version      : 1.199.0
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/build/visual-studio-build
==============================================================================
"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.199.0\ps_modules\MSBuildHelpers\vswhere.exe" -version [17.0,18.0) -latest -format json
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\msbuild.exe" "D:\a\1\s\SistemaVenda.sln" /nologo /nr:false /dl:CentralLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.199.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll";"RootDetailId=a47fdb22-dd57-49a2-8032-e85af8bae11c|SolutionDir=D:\a\1\s|enableOrphanedProjectsLogs=true"*ForwardingLogger,"D:\a\_tasks\VSBuild_71a9a2d3-a98a-4caa-96ab-affca411ecda\1.199.0\ps_modules\MSBuildHelpers\Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.dll" /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="D:\a\1\a" /p:platform="Any CPU" /p:configuration="Release" /p:VisualStudioVersion="17.0" /p:_MSDeployUserAgent="VSTS_bdfd19a7-2e27-49d2-a000-a44800091457_build_3_0"
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
Build started 2/15/2022 3:11:48 AM.
Project "D:\a\1\s\SistemaVenda.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
  Building solution configuration "Release|Any CPU".
##[error]C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(1217,5): Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found. To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework version or retarget your application. You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

Hi @chriscfox, @IwryRozemberg  . Provided snippet can be executed inline. If you are calling it from the script then repo checkout should come first.
$InstallPath should be adjusted according the windows version you are running:
steps:
  - displayName: Install component on windows 2022
    pwsh: |
      Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
      $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
      $componentsToAdd = @(
        "Microsoft.Net.Component.4.6.1.SDK"
      )
      [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " +  $_}
      $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
      $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
      if ($process.ExitCode -eq 0)
      {
          Write-Host "components have been successfully added"
      }
      else
      {
          Write-Host "components were not installed"
          exit 1
      }

steps:
  - displayName: Install component on windows 2019
    pwsh: |
      Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
      $InstallPath = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
      $componentsToAdd = @(
        "Microsoft.Net.Component.4.6.1.SDK"
      )
      [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " +  $_}
      $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
      $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
      if ($process.ExitCode -eq 0)
      {
          Write-Host "components have been successfully added"
      }
      else
      {
          Write-Host "components were not installed"
          exit 1
      }

steps:
- uses: actions/checkout@v2
- name: Install component on windows 2022
  run: |
  # ...

or "runs-on: windows-2019" ?

@OZZlE the issue seems to affect only windows-2022

Did not work! :(
The install script ran but the build still failed!
Below is an image of the order used.:

@IwryRozemberg @chriscfox it turned out that VS2022 doesn't have Microsoft.Net.Component.4.6.1.TargetingPack, the minimal available version is Microsoft.Net.Component.4.6.2.TargetingPack — https://docs.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-enterprise?view=vs-2022. Could you try to install it in runtime and change your project to use 4.6.2 rather than 4.6.1?
      Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
      $InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
      $componentsToAdd = @(
        "Microsoft.Net.Component.4.6.1.SDK"
      )
      [string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " +  $_}
      $Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
      $process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
      if ($process.ExitCode -eq 0)
      {
          Write-Host "components have been successfully added"
      }
      else
      {
          Write-Host "components were not installed"
          exit 1
      }

As a palliative solution I changed the pipeline version to windows-2019, over the weekend, I will update the .NET in the project.
@miketimofeev  and @shilovmaksim, i appreciate the help.

Hi @chriscfox , @IwryRozemberg .
You can try to install both "SDK" along with "TargetingPack" via snippet suggested earlier to see if it helps.
$componentsToAdd = @(
    "Microsoft.Net.Component.4.[6](https://github.com/shilovmaksim/test-repo/runs/5213299825?check_suite_focus=true#step:2:6).1.SDK",
    "Microsoft .NET Framework 4.6.1 Targeting Pack"
  )

https://github.com/shilovmaksim/test-repo/runs/5213299825?check_suite_focus=true

Hi @shilovmaksim and @miketimofeev . I notice you're still tagging me in your proposals. And I don't want to appear ungrateful. But as of my message of 4 days ago, my issue was resolved. I guess I should have closed the issue, but then @IwryRozemberg passengered onto it, so I though I would leave it open for them.
Anyway, I just thought I would mention this as I didn't want you to think I was being rude and ignoring your suggestions.

@IwryRozemberg please feel free to open a new issue.

@OZZlE the issue seems to affect only windows-2022

Yes but "windows-latest" used to be Windows 2019 and we didn't notice that Github changed to 2022. Our code is made for 2019 and we have that on our servers so makes sense for us to just change. Probably never should have had latest, very future inconsiderate :P

Yes - that's right. When windows-latest was changed to Windows 2022, the error began to occur. I don't know what changed at Windows 2022 but compilation fails with error Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found..
It appears that changing the Github action runner to runs-on: windows-2019 resolves the issue.

I know this makes no sense, but my experience was:

I had runs-on: windows-latest
Then GitHub changed to windows 2022 and I started getting Error MSB3644: The reference assemblies for .NETFramework,Version=v4.6.1 were not found.
I changed my script to runs-on: windows-2019 and it worked again.
Then I changed it back to runs-on: windows-latest and it STILL WORKS - no error.

That last step makes no sense and I can't explain it. I can only relate my experience. Did something else also happen? I don't know.
.

That last step makes no sense and I can't explain it. I can only relate my experience. Did something else also happen? I don't know.

It's because windows-latest is migrating from windows-2019 to windows-2022
https://github.com/actions/virtual-environments/issues/4856


System.IndexOutOfRangeException when query index

Sometimes I get this exception when I query my db by one of 4 indexes on a collection of a simple database. It only occurres on stress tests on final v5.0 LiteDB.
System.IndexOutOfRangeException
at LiteDB.Engine.IndexService.Find(CollectionIndex index, BsonValue value, Boolean sibling, Int32 order)
at LiteDB.Engine.IndexEquals.d__3.MoveNext()
at LiteDB.Engine.BasePipe.d__6.MoveNext()
at LiteDB.Engine.BasePipe.d__8.MoveNext()
at LiteDB.Engine.QueryPipe.d__2.MoveNext()
at LiteDB.Engine.QueryExecutor.<>c__DisplayClass10_0.<g__RunQuery|0>d.MoveNext()
at LiteDB.BsonDataReader..ctor(IEnumerable1 values, String collection)    at LiteDB.Engine.QueryExecutor.ExecuteQuery(Boolean executionPlan)    at LiteDB.Engine.QueryExecutor.ExecuteQuery()    at LiteDB.Engine.LiteEngine.Query(String collection, Query query)    at LiteDB.LiteQueryable1.d__26.MoveNext()
at System.Linq.Enumerable.WhereSelectEnumerableIterator2.MoveNext()    at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable1 source, Func`2 predicate)

Hi, can you provide a full example to inspect whats going on?

I can try to build some. It must be a multi-threading issue. When I do updates/inserts in one thread and do a query in another on the same collection, this error occurres. At this time I try to prevent this situation. If I've git time I try to build an example from scratch...

@Lupinho Could you test it with v5.0.1?

I tried to recreate the error situation. I have to say, that I became sometime the error above (System.IndexOutOfRangeException) or "Invalid IndexPage buffer" (there is another issue #1374  for this). I could easily reproduce the later error, also with Version 5.0.1:
LiteDB.LiteException
HResult=0x80131500
Message=Invalid IndexPage buffer on 494
Source=
StackTrace:

This exception was originally thrown at this call stack:
LiteDB.Engine.IndexPage.IndexPage(LiteDB.Engine.PageBuffer)
LiteDB.Engine.IndexService.Find(LiteDB.Engine.CollectionIndex, LiteDB.BsonValue, bool, int)
LiteDB.Engine.IndexEquals.Execute(LiteDB.Engine.IndexService, LiteDB.Engine.CollectionIndex)
LiteDB.Engine.BasePipe.LoadDocument(System.Collections.Generic.IEnumerable<LiteDB.Engine.IndexNode>)
LiteDB.Engine.BasePipe.Filter(System.Collections.Generic.IEnumerable<LiteDB.BsonDocument>, LiteDB.BsonExpression)
LiteDB.Engine.BasePipe.Filter(System.Collections.Generic.IEnumerable<LiteDB.BsonDocument>, LiteDB.BsonExpression)
LiteDB.Engine.QueryPipe.Select(System.Collections.Generic.IEnumerable<LiteDB.BsonDocument>, LiteDB.BsonExpression)
...
[Call Stack Truncated]
My test case inserts many documents in bunches into the db. When I do this asynchronously in another thread and do a query while this is going on, this error occurres (and sometimes the other error). I try to build a simple test, if I get time for this.
Thanks for your support!

Here is a simple Unit-Test to reproduce the "Invalid IndexPage buffer" error:`
[TestClass]
public class LiteDBBugTest {
	public class Data {

		[BsonId]
		public ObjectId Id { get; set; }
		public string Name { get; set; }

		public string Index {
			get { return GetIndex(Name); }
		}
		public static string GetIndex(string name) {
			if (name == null) {
				return null;
			} else {
				byte[] hash = new SHA256Managed().ComputeHash(Encoding.Unicode.GetBytes(name.ToLowerInvariant()));
				StringBuilder str = new StringBuilder();
				foreach (byte num in hash) {
					str.Append(num.ToString("x2"));
				}
				return str.ToString();
			}
		}
	}
	[TestMethod]
	public void Test() {
		string tmp = System.IO.Path.GetTempFileName();
		File.Delete(tmp);
		const int MAX_DATA = 1000000;
		const int MAX_CACHE = 10000;
		ConnectionString conf = new ConnectionString(tmp);
		conf.Password = "1234567890";
		using (LiteDatabase db = new LiteDatabase(conf)) {
			ILiteCollection<Data> dataCol=db.GetCollection<Data>("data");
			dataCol.EnsureIndex(x => x.Index);
			Random rnd=new Random();
			List<Data> cache=new List<Data>();
			Task flushTask = null;
			for (int i = 0; i < MAX_DATA; i++) {
				cache.Add(new Data(){
					Name="Name_"+i.ToString("D8")
				});
				if (cache.Count > MAX_CACHE) {
					List<Data> fcache = cache;
					cache=new List<Data>();
					if (flushTask != null) {
						flushTask.Wait();
					}
					flushTask=Task.Factory.StartNew(() => {
						db.BeginTrans();
						dataCol.Insert(fcache);
						db.Commit();
					});
				}
				dataCol.Query().Where(x => x.Index == Data.GetIndex("Name_" + rnd.Next(0, MAX_DATA).ToString("D8"))).ToList();
			}
			if (flushTask != null) {
				flushTask.Wait();
			}
		}
	}
}

`

This insert thread, are you using explicit transaction, insert as array of documents or insert one by one? Is this document too big or have any special type of something?
I do many test using this scenario and got error only in alpha e beta version (and I fix in RC). I will publish in another repo this tests so we can do any test there

I think the error occurred with or without explicit transactions. The document I work with is very simple and normally not big. It consists of some strings, a long, an enum, a DataTime and a Id. Nothing special. I put 3 indexes o calculated properties as strings. I splitted away an array of Guid's in an own document, which is referred via BsonRef; because I realized that updating the main document took a lot of time by updating the indexes. Only updating the referenced document seemed to be faster.
But even if my real setting is a bit more complicated you should be able to reproduce the example above to run into the error.

Hi @Lupinho, I found this problem and fix in current master branch. Can you please test again? I will release this fix in next release

Yes! At least now my test does not run into errors anymore. Tested with and without extra transaction. Also my other use-case seems to behave now errorless!
Thanks alot!


Feature .csv to .ts converter utils function

Reference Issues/PRs
No reference
What does this implement/fix? Explain your changes.
A utils function that can be used to convert csv files to the .ts format. The function autogenerates the .ts headers by looking at the data provided (i.e. determining if it's of equal length, univarate/multivariate, number of dimensions etc.) and also allow you to select which column to group each series by, allowing for flexibility in creating data sets to experiment with. For example my use case is with covid data and therefore for initial experimentation I want to create each series by country. However, in the future I may want have each series by data/month, continent or weather and therefore this functionality to generate by different columns is nice.
Does your contribution introduce a new dependency? If yes, which one?
No new dependencies
PR checklist
For all contributions

[x ] I've added myself to the list of contributors.
[N/A ] Optionally, I've updated sktime's CODEOWNERS to receive notifications about future changes to these files.
[x ] I've added unit tests and made sure they pass locally.

For new estimators

[N/A ] I've added the estimator to the online documentation.
[N/A ] I've updated the existing example notebooks or provided a new one to showcase how my estimator works.

Any other comments?

we will merge this with uea_dev and PR it from there

we will merge this with uea_dev and PR it from there


Does EmberFire support FirebaseUI Authentication?

I cannot seem to find it here or anywhere and it seems to be where AUTH is moving for hosted FB domains.

You could use the FirebaseUI widgets to do auth. Once you know the FirebaseUI state changed, you would need to call this.get('session').fetch() to have Torii look up the firebase auth state and populate its session object.

I haven't personally tried, so let us know how that goes.

OK Cool that it is possible. Will try out at some point and will add my findings here.
Thanks @tstirrat

We moved over to using the FirebaseUI widget for auth in our app. Here is a gist for our implementation.

@steven-ferguson you are awesome for creating that Gist. It will be a huge help to many I am sure.
Thanks a lot.
Brendan

Proposing we add this to an Additional Resources section on the Guide #440


Polish and rename .git-blame-ignore-revs grammar

This pull-request combines the following changes in the support of github/linguist#5903:

Grammar renamed to be more context-agnostic.[^1]
Revision IDs with leading or trailing whitespace are now highlighted correctly.
Invalid lines containing whitespace now yield nicer-looking highlighting.

[^1]: I explained the rationale for this in my original review, but if you feel strongly about keeping the current name for some reason, you can revert ed99b26 specifically.
Preview: Before | After

Sorry, fixed.

@Nixinova BTW, that CSON file was created because I needed to manually add a fileTypes array in order to preview it in Atom:
 name: Git Revision List
 scopeName: source.git-revlist
+fileTypes:
+- git-blame-ignore-revs
 patterns:
 - include: '#main'

If you make a point of filling out the fileTypes array, it might help to automate conversion to other grammar formats. :wink: Note that Atom stupidly requires leading dots to be removed from both filenames and file-extensions, so for maximum portability, the above snippet should really be:
fileTypes:
-  git-blame-ignore-revs
- .git-blame-ignore-revs

No pressure if you CBF though, it's purely on you. Seriously.


6d pose representation

Hi,
I have one more question:
If you are converting to 6d poses and you are converting it back to rotation matrices how do you ensure that the final matrices are still valid? As far as I know, wouldnt this affect how it is displayed in the image?

Please have a look at this function. It converts the 6D poses to a valid rotation matrices.

Just to make sure.
a) Are you using the prepare_smpl_params function that internally converts the 6D poses to rotation matrices before running the SMPL model?
b) Are rotating the x-axis by 180 degrees before rendering, as done here?

Please have a look at how we convert to 6D pose here. You will only need to omit the aa_to_rotmat() function call, if rotation matrices are used for the pose.
Please convert the rotation matrices to 6D, as we do in the highlighted code.


[v0.0.18] Issue running the command mila init

What command did you run?
mila init
Describe the bug
FileNotFoundError when trying to register public key.
Error Traceback
(mila) C:\Users\marle>mila init
Checking ssh config
Fixed the permissions on ssh directory at C:\Users\marle.ssh to 700
Fixing permissions on C:\Users\marle.ssh\config to 600
Did not change ssh config
OK
Checking passwordless authentication
(local) $ ssh -oPreferredAuthentications=publickey mila 'echo OK'
? Your public key does not appear be registered on the cluster. Register it? Yes
(local) $ 'powershell.exe type $env:USERPROFILE.ssh\id_rsa.pub | ssh mila "cat >> ~/.ssh/authorized_keys"'
Traceback (most recent call last):
File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 68, in main
mila()
File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 362, in mila
return function(**args_dict)
File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 408, in init
setup_passwordless_ssh_access()
File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\commands.py", line 445, in setup_passwordless_ssh_access
here.run(command)
File "C:\Users\marle\miniconda3\envs\mila\lib\site-packages\milatools\cli\local.py", line 34, in run
return subprocess.run(
File "C:\Users\marle\miniconda3\envs\mila\lib\subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "C:\Users\marle\miniconda3\envs\mila\lib\subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\marle\miniconda3\envs\mila\lib\subprocess.py", line 1456, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
Desktop (please complete the following information):

OS: Windows 10

Additional context
milatools version=0.1.0
created new environment from within miniconda3
Thanks!

Hey there @marlens123 , thanks for posting!
I'm familiar with this issue, I think this will be fixed by #93. A new release should come out soon that will include these changes.

Hi @lebrice, thanks for referring to this! I have tried ssh-keygen -t rsa -f {file_path} -N='{passphrase}' as suggested in  #93 and ensured that my local .pub and remote authorized_keys contain the same key (they do now, had to delete a '+' in the authorized_keys file), but still passwordless login is not working. Using git bash on Windows 11. not sure if I'm missing smth here...

Would you mind trying with just mila init with the code of that PR?
pip uninstall milatools
pip install "git+https://www.github.com/lebrice/milatools@fix_sshkeys_passphrase"
mila init

Let me know if that works! :)

thanks for following up! This then finishes with: 'ssh-copy-id mila' appears to have failed!. Though the key in authorized_keys now matches.


Format paths for Linux platform containers

This isn't a permanent solution. If cloak ever wants to support Windows containers, I'm not sure this will work. But, it gets me past the extension install phase so I can actually test other parts.

Hey @cdhunt we are working on migrating PRs to a different repo and wanted to make that as easy as possible for you, so I went ahead and rebased this and merged in a different PR: https://github.com/dagger/cloak/pull/228
Appreciate the contribution! There is a follow up described here but I was not even aware of this issue before your change, so it's extremely helpful to have the initial one in and to know that we have to deal with this going forward.


Set inputs to read-only

Could you provide some context for this change?
Im trying to checkout two different git repos into two different working directories within one Bitrise build and found out that this relatively recent change prevents me from using this step several times with slightly different Git repository URL and Clone destination (local) directory path.
I did not find information about that in the Bitrise support community and came here by looking through the change logs for the build step.
Please point me to a discussion or reasoning behind this change if a public one exists.
What should be the proper way to implement this build process provided that I'm not allowed to change the input variables?

@yM1ndst0rM sure! In short, please do not use this step to clone any other repository other than the primary one of the workflow.
Why? Because this step is configured by default to use configurations passed to the build, like branch, commit, pull request infos etc.
So if you just set it to another repository and then you start a pull request build for the primary repo (the one you connected on bitrise.io) then you'll end up git cloning the secondary repo with similar params e.g. the pull request branch, which is not what you want.
For any other repo other than the primary please use a Script step and do git clone there, the way you intend to; or add the secondary repo as a submodule to the primary so that a single git clone step can clone / checkout both.
If you'd have any questions just let us know! :)


Enable prettier java

Yes it's opinionated, but much easier to have automatic formatting. mvn prettier:write will take care of formatting anything for those that don't have the intellij plugin. Will resolve conflicts on the othe branches with this in a bit, but it's a good time to do it since we don't ahve any large pending PRs

🚢


spanner: add threading to benchmark

@pongad Are you finished making changes? When do you want this merged?

@blowmage I am ready to merge, but I made a change so I thought of waiting for another LGTM. If it looks good to you, please go ahead :)


recover publicKey from a rawtx

hi. i have a hard time recovering the public key from raw transactions altough i found the corresponding needed functions in the code.
could you please point me to achieve it?
this is an old TX style:
0xf86f83182a6a854dfc936580830249f0940cd7304fbfdef3ca0c62b5349142626a80f426a087e7fe0107d540008025a0ae9996a4e4884df44de0e494b8b4865de50f6fcd4245a7069aee1c715d476d9ca01d4142d8d344daa967f82845e9e3172aa22278f589225c66ae06a7521396bc0a
and this is an EIP1559 tx:
0x02f875018327aef18477359400850627bf1b43825208941ed4eafa58b16e362bbfc35dab5c6ff13e8228318754607fc96a600080c080a02eda525e657a93ef1d586d8bedb62b4cd83c488c3f8b305b859ee2b8447d8656a02b63e13b201050b86418cde396c64b043f1c11e3b0fbe4d6b0393be7eb1401bd
how do i reliably recover the pubkey from these in web3.php ???
thanks a lot!

me too


Subscription support

In the wiki you mention that it's not supported yet.
Is it desired/anyone working on it? It's something I'd like - and might be able to start work on at some point.

Hi @tw,
I don't really know what is demand for subscriptions, but I guess it would be really nice addition to KGraphQL. I'm almost sure nobody is working on it, so feel free to start!
Do you already have any ideas/intial design? I would love to hear them.

@pgutkowski thanks for the response. I myself would like them so I could start to consider using it at work (we're currently using graphql-java, I'd like something a bit smaller, and more native).
I suppose I'd probably use channels to handle subscriptions - especially now co-routines are non-experimental.


Disallow duplicate enumerator names in the same enum

Fixes https://github.com/shader-slang/slang/issues/2895

Overloaded enums are much less defensible than overloaded functions.


Retrieve updated check/damage domains from context clones

Closes #13931

I'd like to know if the enabled/ignored change works for check dialogs, if it does, this looks good to me.


No email and password logged!

It runs the server correctly. When I switch to that Access Point and then type the local IP,  i see the web page.
I enter the email and password and then on the flipper when I want to stop the portal, I save the logs. But in the log.txt there is only information until client connected line:
html set
ap set
all set
starting ap Free WiFi
ap ip address: <IP_ADDRESS>
web server up
client connected

Hi, same problem as you, everything works properly except you get no datas when "connection" is clicked.
found a personnal solution testerday for my personnal portals.
Works perfect for me...!
Here is how you can do :
you use this html code (with dynamic display for different screens ;-) ) :

seems github servers have difficulties with my message, maybe too long,
I put the html code here again :

sorry display for the html file is strange on github, you can find it attached to this message as .txt
Portal.txt

Wow that's cool @Axxl07. I'll have a look at this and maybe even update the script to include your HTML with dynamic displays if that is okay for you?

that's more than ok for me !!
Happy that if it can helps you...
You can thanks ChatGPT4 for the dynamic code, less than 1s to get it !!!  :-)
Let me know if you succeed ;-)

Thanks a mill!
About , do we need to put any special code here to store the data on the FZ SD card? or that part is only for extra hacking like sending/emailing the credentials to ourselves?

the script is to get the datas from client , email and password.
This script works really well for me on flipper zero.
Just put this script between  and normally everything works...
for info the script is just one line in my index.html
Copy the script from this attached file  ;-)
https://github.com/FlippieHacks/EvilPortalGenerator/files/13268805/SCRIPT.txt

and yes the script take datas (email & password) and send it to the flipper zero screen and evilportal logs...

https://github.com/FlippieHacks/EvilPortalGenerator/files/13268805/SCRIPT.txt

yes, I had the same script but didn't log anything!
function showErrorPage() {
    document.write("

Our servers seem to be having some difficulties

");
}
document.getElementById("submitbtn").addEventListener("click", showErrorPage);
document.getElementById("forgot_credentials").addEventListener("click", showErrorPage);

That was the reason I've opened this issue.

Strange....don't understand why....the joy of computing ! ;-)
Last thing I can tell you is, take this index.html, it's one from me for local city hall...
It works fro me whith Flipper, get the datas....and try with yours, After you just have to change the svg pic and some text details and normally it will work...
Crossing fingers...! ;-)
Mairie.txt

Hey, just an idea for you.....do you remember the max size for you index.html ? 20kb maximum !
If your index is too heavy, Flipper can run the server but doesn't work for getting the datas ! ;-)
Maybe it can explain the problem...just an idea... ;-)

Hey, just an idea for you.....do you remember the max size for you index.html ? 20kb maximum ! If your index is too heavy, Flipper can run the server but doesn't work for getting the datas ! ;-) Maybe it can explain the problem...just an idea... ;-)

5 KB.
And with typing the IP address directly, it displays the page. the issue it is not popping up the page automatically, plus not logging the credentials.


Graph menu with import from/export to JSON

The graph viewer should have a Graph menu with at least four starting items: import from JSON, export to JSON, "Clear All," and "Close."

What properties import/export actually supports will be an ongoing concern.


Don't allow explicit undefined fields on unions that don't have an undefined case

🔍 Search Terms
union, undefined, keys, non-shared, properties
✅ Viability Checklist

[X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
[X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

⭐ Suggestion
I think unions should enforce that keys can't be assign undefined if neither half of the union accepts it. If I can't assign an object to either interface, I wouldn't expect to be able to assign it to the union of the 2.
As an example, let's say I have these 2 interfaces:
interface IForumPost {
  id: string;
  title: string;
  description: string;
}

// A new forum post doesn't have an ID yet until it is persisted in the database
interface INewForumPost extends Omit<IForumPost, 'id'> {}

I don't have a scenario where the id field should be allowed to exist, but be undefined. Both of these object declarations will throw an error:
const post: IForumPost = {
  id: undefined, // error, needs to be a string for this interface
  title: 'Hello, world!',
  description: 'This is a forum post'
};

const post: INewForumPost = {
  id: undefined, // error, obj doesn't exist on this interface
  title: 'Hello, world!',
  description: 'This is a forum post'
};

The problem I had is that id can be undefined if I have a union of these 2:
const post: IForumPost | INewForumPost = {
  id: undefined, // TypeScript is fine with this
  title: 'Hello, world!',
  description: 'This is a forum post'
};

The part that had this lead to a bug in my code is that TS then doesn't let me simply do an if (post.id) or if (typeof post.id === 'string')  check to determine which side of the union I have (those checks would be safe here), but it makes me do if ('id' in post) check (which is not safe here because it's true for undefined).
📃 Motivating Example
Let's say I have a function that tries to route the changes correctly to either "update" or "create":
const saveForumPost = (post: IForumPost | INewForumPost) => {
  if ('id' in post) {
    updateForumPost(post);
  } else {
    createForumPost(post);
  }
};

And I am creating this post object using a form that works for both editing or creating:
const postFromFormData: IForumPost | INewForumPost = {
  id: isNew ? formData.id : undefined,
  title: formData.title,
  description: formData.description
};

That id assignment is a pretty innocent ternary, but actually should not be accepted. saveForumPost now treats this as an existing entry and attempts to update instead of create. This change would require me to either provide a proper value for id or omit the key completely, leading to safer code.
💻 Use Cases
1. What do you want to use this for?
I would like to use this to ensure stronger type safety in my code.
2. What shortcomings exist with current approaches?
Current approaches allow assigning invalid objects to unions.
3. What workarounds are you using in the meantime?
I have fixed the code, as needed, but not until after my bug was found. The workaround for now is just to be extra careful in this type of situation.

Duplicate of #20863. But even with that you can't really rely on it, because TypeScript is structurally typed, excess properties are generally allowed. You'd need "exact types" to avoid this issue. #12936
And wow, you use excessive amounts of words as search terms. I think the idea of @fatcerberus to add a "summary" field is really good (mentioned in another issue).

Oh sorry I totally misread the template for the search terms part, I'll fix that now

Okay hopefully that's better
Would it be more reasonable to propose a strict setting that would require adding an undefined or typeof check to these kinds of unions instead of just the in check? For scenarios where the structural typing could cause this

You can do this today:
interface INewForumPost extends Omit<IForumPost, 'id'> {
	id?: never;
}


Added missing dependency on json-simple to build.gradle

Code compiles now.

Hi,
Oh my. Thanks a lot!
Anton


InterRep user/attester sign up

Is your feature request related to a problem? Please describe.
Use InterRep to prevent sybil attack
and identity the levels (gold, silver, bronze) of users/attesters
Describe the solution you'd like

User signs up through InterRep (with semaphore idCommitment)
User generates a merkle tree proof to prove that idCommitment is one of the leaves in InterRep merkle tree
User submit merkle tree proof + idCommitment to Unirep contract
Unirep contract checks merkle tree proof matches one of the current InterRep merkle tree roots
Unirep contract marks the idCommitment is a signed up user in Unirep

If users want to get different levels in InterRep, users generate different merkle tree proofs in different InterRep merkle tree
e.g. user signs up as twitter-silver level, then Unirep checks the twitter-silver tree root in InterRep
(getRoot from different groupId in InterRep)

Should this be a part of the Unirep core? Seems like it would be nice to have a utility that attesters could use to add verification parameters. e.g. user has a signup code and is at least github-bronze or twitter-bronze or reddit-bronze.
Might be good to include this in the next version of unirep social, even just as a reference implementation for other attesters. I'd like to see the bronze levels be a bit lower though, 500 followers is a lot 😅

Yeah I think it has to be in Unirep core
because our circuits cannot host more then 2**GSTDepth users
and users can easily generate random number to sign up (even if they don't have the ZKIdentity itself)
But do you think every user should sign up through a signed up attester? (now it is not necessary)
yeah we can help attesters choose the root (github-bronze...) they want to sign up users
yeah I am even not any of the bronze users in InterRep 😅
I think we can discuss this with InterRep team and maybe set our unirep-bronze, unirep-silver... rules

I agree that DOS is a problem, especially when GSTDepth is small like 2**9. Before we integrate some anti-sybil in the core protocol we should benchmark increasing GSTDepth to something like 2**32. If the GST depth is high enough then filling the tree becomes very expensive. Though an attacker could still increase the sync time by signing up lots of identity commitments (still spending money to do so).
I'm just hesitant to add something as big as interrep to the core implementation, especially when attackers have no incentive to spend money to halt the system.

But do you think every user should sign up through a signed up attester? (now it is not necessary)

I don't really think it matters. If someone wants they can make themselves an attester and then sign themselves up. But when we have an attester whitelist i think we should only allow signup through attester.

we should benchmark increasing GSTDepth to something like 2**32

We will also do this  https://github.com/Unirep/Unirep/issues/53
But in my experience it is almost not possible to increase to 2**32 and generate proofs in frontend (using wasm)
I think it is not reasonable for attackers to halt system but once Unirep contract is halted, our loss could be much more than the attackers' cost (because we will deploy contracts and what we pay for the honest users will be in vain)

when we have an attester whitelist i think we should only allow signup through attester

so I think the whitelist can also be maintained by InterRep. Like we only let twitter-silver level organizations/user signs up as an attester ( I remember that Barry said about it)

Closing this as we decided this is an attester level feature


icon: Init at 9.5.1

Motivation for this change
New package for Icon Language
Things done

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

[x] NixOS
[ ] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Icon is a very high level general-purpose programming language with
extensive features for processing strings (text) and data structures.

Naming the derivation icon might lead to confusion. Maybe icon-lang or icon-ipl (debians name) might be better.

@hrdinka I have updated the attribute to icon-lang is this what you meant?

@vrthra yes, I think it's better this way. I have updated the name as well and changed the website URL to use https. Hope you're fine with that. I have tested all changes locally. Thanks for your contribution.

@hrdinka thanks, much appreciated.


How can I add Freehand tool manually using (x,y) coordinate array?

:hand: Hello Team I want to add freehand tool with static array data which has X and Y coordinate array

The FreehandRoi tool position data is stored in the "points" object in the FreehandRoiTool variable in cornerstoneTools.js. You could assign it to your array before it's drawn. See the code around line 24149 in cornerstoneTools.js

@mtm12 Thank You for guiding me 👍


Running cargo install bob-nvim on Macos results in compile error.

wup,
I am not so familiar with rust and cargo so this might be an easy one to solve but atm this is what I get when trying to install bob.
╰ cargo install bob-nvim
    Updating crates.io index
  Installing bob-nvim v1.2.1
error: failed to compile `bob-nvim v1.2.1`, intermediate artifacts can be found at `/Users/hjalmarjakobsson/.local/share/cargo/target`

Caused by:
  failed to select a version for the requirement `clap = "^4.0.15"`
  candidate versions found which didn't match: 3.2.23, 3.2.22, 3.2.21, ...
  location searched: crates.io index
  required by package `bob-nvim v1.2.1`

could you try installing using cargo install --git https://github.com/MordechaiHadad/bob.git and see if this happens with this too?

Yeah ofc, I should have added that I tried this as well, and I think it returns pretty much the same error:
 cargo install --git https://github.com/MordechaiHadad/bob.git
    Updating git repository `https://github.com/MordechaiHadad/bob.git`
  Installing bob-nvim v1.2.1 (https://github.com/MordechaiHadad/bob.git#cb0500e9)
    Updating crates.io index
error: failed to compile `bob-nvim v1.2.1 (https://github.com/MordechaiHadad/bob.git#cb0500e9)`, intermediate artifacts can be found at `/Users/hjalmarjakobsson/.local/share/cargo/target`

Caused by:
  failed to select a version for the requirement `clap = "^4.0.15"`
  candidate versions found which didn't match: 3.2.23, 3.2.22, 3.2.21, ...
  location searched: crates.io index
  required by package `bob-nvim v1.2.1 (/Users/hjalmarjakobsson/.local/share/cargo/git/checkouts/bob-f97b36b3fbc90c07/cb0500e)`

oh... i will try on my machine thanks

np. ill get back if i find something on my end.

@molleweide can you try updating your cargo installation?

Updateing cargo with rustup update solved the issue.
My previous version of cargo was:
cargo 1.59.0 (49d8809dc 2022-02-10)
and now it is :
cargo 1.66.0 (d65d197ad 2022-11-15)


Add Support for Multi Panel

It would be best if you could select which panel (e.g. app and admin) it should be for when creating a page/resource and only register it there. In my opinion, otherwise no plugin system makes sense if I can only use it on one level.

Okay, I get you.
Use Selected Module in your panel
you can use the selected module in your panel by using this code in your PanelProvider
->plugin(\TomatoPHP\FilamentPlugins\FilamentPluginsPlugin::make()->modules([
    'CRM'
]))

so you will see only the selected modules in your panel
Stop Auto Discover Module Resources
you can stop auto-load module resources by using this code in your PanelProvider
->plugin(\TomatoPHP\FilamentPlugins\FilamentPluginsPlugin::make()->autoDiscoverModules(false))


Autocomplete Field Names

It would be great if an autocomplete feature suggested field names alphabetically as you type, instead (or in addition) of having to select the field name from a list below.

Hi @energidi,
It would be great to have more context 😄 more important I think is : which page are you talking about ? Could you explain with screenshots ?
Best would have been to follow up the template:
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Sorry for not being clear.
I'm referring to the 'Data Export' feature.

It would be great if an autocomplete feature suggested field names alphabetically as you type the query, instead (or in addition) of having to select the field name from a list below.
Please see the attached screenshot as an example.

Thanks for adding the info, it is clearer now.
Before considering a new feature, are you aware of the shortcuts to select the suggested fields from the autocomplete list ?

In this case, press tab and enter to select the field and get your cursor back on the query

Hello @tprouvot
Thank you for letting me know!
I wasn't aware of this feature.
While I find that autocomplete for fields as in the provided example makes typing easier, the existing feature is still quite satisfying.
Thanks again for such a useful app!


Update index.md.njk

Updated row 32 to sentence case 'one-third'

You can preview this change here:
Built with commit fce5cab667729803ea6188d16352d821d8fa6248
https://deploy-preview-950--govuk-design-system-preview.netlify.com

Thanks a lot for helping us with the research!
I'm going to close this out for now so we can use this content change for a future research session.


[Help] Error creating cluster after laptop is rebooted

I'm not sure if I'm doing anything wrong, but I installed k3s & k3d as per the instructions. I can use k3d to create a cluster. But once I restart the laptop, the cluster doesn't exist and k3s is still running.
If I run k3d create, I get errors:
k3d create
INFO[0000] Created cluster network with ID c3c7cdc20ba89d608c47593061d2fac8e8dcc9a2cc2cd112f9b531bc5561ff9e
INFO[0000] Created docker volume  k3d-k3s-default-images
INFO[0000] Creating cluster [k3s-default]
INFO[0000] Creating server using docker.io/rancher/k3s:v1.17.0-k3s.1...
INFO[0003] ERROR: Cluster creation failed, rolling back...
INFO[0003] Removing cluster [k3s-default]
INFO[0003] ...Removing server
WARN[0003] couldn't remove network for cluster k3s-default
Error response from daemon: error while removing network: network k3d-k3s-default id c3c7cdc20ba89d608c47593061d2fac8e8dcc9a2cc2cd112f9b531bc5561ff9e has active endpoints
INFO[0003] ...Removing docker image volume
INFO[0003] Removed cluster [k3s-default]
FATA[0003]  Couldn't start container k3d-k3s-default-server
Error response from daemon: driver failed programming external connectivity on endpoint k3d-k3s-default-server (5364374a25c2e81e5c59b9c8d4a4d3a1060c79375e41f41dc94152624a5808e8): Error starting userland proxy: listen tcp <IP_ADDRESS>:6443: bind: address already in use

Most likely I'm doing something wrong, but I'm not sure what. Any pointers appreciated.

How was the cluster created?

k3d create

What did you do afterwards?

Nothing, as it results in errors.

What did you expect to happen?

I hoped that the cluster would be created.

Which OS & Architecture?
Latest kubuntu
Which version of k3d?

output of k3d --version

Which version of docker?
 I'm going to close this as a user error. Thanks for your help.


Add example with subnet tags

What this PR does / why we need it
I was not sure about how to use the subnet tags, so I figured adding an example would help us in the future.

Fixed the build for you, let's merge as-is


boost 1.67 python lib issue

See e.g. https://ci.appveyor.com/project/chcg/pythonscript/build/<IP_ADDRESS>/job/9lx99ogcnyvyapys
LINK : fatal error LNK1104: cannot open file 'libboost_pythonPY_MAJOR_VERSIONPY_MINOR_VERSION-vc140-mt-s-x32-1_67.lib' [C:\projects\pythonscript\PythonScript\project\PythonScript2010.vcxproj]

of https://github.com/chcg/PythonScript/tree/boost_1_67.
Probably a known issue mentioned in https://www.boost.org/users/history/version_1_67_0.html which is fixed by:
https://www.boost.org/patches/1_67_0/0003-Python-Fix-auto-linking-logic-Windows-only.patch
Is it possible to build new packages of boost python XY with this fix?

@sergey-shandar boost 1.68 is available. This should fix this problem.


Error fixed: Strings were compared by using ==

Thanks for this PR. The code has been applied. Do you mind closing this ticket?


Use named Image constructors

Some folks didn't realize these existed and asked us to add them. By
using them in examples, hopefully folks will discover them more easily.

@Hixie @HansMuller

LGTM

We should make the name and src arguments positional also.
The reason I didn't use them for these cases when I added the constructors was that it doesn't really help with these specific cases, because they have so many other arguments.

https://github.com/flutter/flutter/pull/5149 <--- shorten the names


Dracula GRUB Theme

[GRUB] Dracula
Dracula theme for GRUB.I know there is another one but it did not fit my setup.So I created a original one.
The link https://github.com/pspiagicw/dracula-grub

Hey @pspiagicw, thanks for building it! Would you mind adding a screenshot? We will need that to feature it on the site ;)
About the other theme, I believe you might be referring to: https://github.com/zshzero/dracula-grub2
@zshzero are you interested in merging efforts?

Hey @pspiagicw, thanks for building it! Would you mind adding a screenshot? We will need that to feature it on the site ;)
About the other theme, I believe you might be referring to: https://github.com/zshzero/dracula-grub2
@zshzero are you interested in merging efforts?

I added in the screenshot.Sorry for the delay

I added in the screenshot.Sorry for the delay

Great! You can now transfer the repository to the Dracula org ;)

Great! You can now transfer the repository to the Dracula org ;)

@zenorocha Yes

@zenorocha Yes

@pspiagicw friendly ping ;)

Ping recieved :)

Sorry for the late reply , I missed the point that I have to transfer the repository .I thought you being the maintainer would transfer.I never noticed that I was supposed to transfer.Sorry again! I can imagine what you must of thought.Sorry again.I will transfer it today itself, I am a little new to GitHub can you provide some instruction on how to do it.
If in any way you got offended please , forgive me.

I transfered the repository.Sorry for the misunderstanding again.I think you can close the repository.

No problem at all @pspiagicw, that's totally fine, it's all good 😄
I just wanted to let you know that your theme is now live! 🎉 🎉 🎉
https://draculatheme.com/grub
Thanks for creating it!


The example in this page doesn't work

This doesn't work:
IfError( 1/0, Notify( "Internal error: " & ErrorInfo.Control & "." & ErrorInfo.Property ) )
I did exactly the same as in example provided, trigger it from a button with OnChange()
The whole catch doesn't work, try this: IfError( 2/0, 1 ), it will give you blank instead of 1

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

ID: e7e0983e-5863-d1eb-43e5-e6e9546c4e2b
Version Independent ID: cc7abb21-14fd-04de-e1bd-2605697adcd3
Content: IfError and IsError functions in Power Apps - Power Apps
Content Source: powerapps-docs/maker/canvas-apps/functions/function-iferror.md
Service: powerapps
GitHub Login: @gregli-msft
Microsoft Alias: gregli

Thanks for contacting us. We have updated the docs and pushed it live. Closing the issue. If you need further help, please reopen or create a new issue.


Add DockerChallenge class

This adds support for a new "on-demand" challenge type implemented using a docker back end.
This DockerChallenge class has a number of nice properties such as:

allows full per-user isolation
allows multi-service challenges
allows greater developer flexibility with no system-wide impacts
allows competitors to reset their environment

More information on the architecture is provided in the documentation.
Multiple examples of the utilization are provided
This functionality was developed in support of All-Army CyberStakes and was tested over multiple years against thousands of competitors. Initial implementation and inspiration was provided by GRIMM. Integration into the picoCTF platform and refinement was performed by the ACI.
This port into picoCTF has been tested from a fresh vagrant up. All example challenges deploy as expected and the Vagrant development environment is configured to support this functionality.

Also tested with  vagrant reload --provision after merge from current master and all works as intended.

Additional reference documentation we pointed competitors to during out event (themed to an unlock challenge): https://acictf.com/distancing/
Might be helpful context.


Update dependencies

What

Updates dependencies
Updates dependabot to daily and use prefix fix

:tada: This PR is included in version 0.4.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


[MANGO-274] Add coverage profile and set up Coveralls.

Resolves #274.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/mango-prb/354/
Test FAILed.

Changes Unknown when pulling b7c07f26e18cc9668006acf6c40e929323054d7f on fnothaft:issues/274-coveralls into ** on bigdatagenomics:master**.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/mango-prb/355/
Test PASSed.

Changes Unknown when pulling 354531eefe42ed3a18a163a8ea7da63a17d837a8 on fnothaft:issues/274-coveralls into ** on bigdatagenomics:master**.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/mango-prb/356/
Test PASSed.

Thanks @fnothaft !


How is this fundamentally different from Ethereum ?

Other than being Forked form Libra which sucks anyways, how is this different from Ethereum ?

...or from Bitcoin. I cannot see any issue on your home page that is not avoidable using another crypto