[QUESTION] What is the point of using USE_DELEGATES in SkiaApi.cs?

I found the code to dynamically load the native lib 'libSkiaSharp.*'.
https://github.com/mono/SkiaSharp/blob/master/binding/Binding/SkiaApi.cs
This is required for products are shipped for multiple platforms. But at the same time, dynamic loading is used only for the full .NET Framework, and in fact only starting from version 4.6.2.
https://github.com/mono/SkiaSharp/blob/e8869d17a62dc4ca985a55a63cd2a90f4a15f5f5/binding/SkiaSharp/SkiaSharp.csproj#L11-L13
https://github.com/mono/SkiaSharp/blob/e8869d17a62dc4ca985a55a63cd2a90f4a15f5f5/binding/SkiaSharp/SkiaSharp.csproj#L3
At the moment I have a project that is built for .NET Framework 4.6.1 and is shipped for Windows (both x86 and x64). As a result, in my case, the managed SkiaSharp.dll compiled for netstandard2.0 is referenced (with static loading of the native libSkiaSharp.dll, because USE_DELEGATES = false).
Could you please explain me what is the point of using USE_DELEGATES and why is it only applied to the full .NET Framework?
How is 'libSkiaSharp.*' supposed to load for solutions shipped for multiple platforms on non-Windows OS?

USE_DELEGATES is used to switch between using the p/invokes and using lazy loaded delegates:
https://github.com/mono/SkiaSharp/blob/master/binding/Binding/SkiaApi.generated.cs#L95-L106
The reason for this is mostly for working with the logic to load the native library. In the case of Android/iOS, there is only ever one libSkiaSharp to load, so we can just use the default lookup for native libraries. On Windows, there may be several libSkiaSharp libraries in memory, so we have to manually look up each function pointer.
One use case was for VS. Multiple extensions can be installed, each with a different version of SkiaSharp. To avoid crashes, we have to explicitly load the functions for the specific binaries in the extension package. If we used normal p/invokes, then it would pick the one that was already loaded, and might crash.
SkiaSharp also only is really supporting net462 as we needed some features that came there. If you need to support NETFX, you will have to update to 4.6.2.

USE_DELEGATES is used to switch between using the p/invokes and using lazy loaded delegates:
https://github.com/mono/SkiaSharp/blob/master/binding/Binding/SkiaApi.generated.cs#L95-L106
The reason for this is mostly for working with the logic to load the native library. In the case of Android/iOS, there is only ever one libSkiaSharp to load, so we can just use the default lookup for native libraries. On Windows, there may be several libSkiaSharp libraries in memory, so we have to manually look up each function pointer.
One use case was for VS. Multiple extensions can be installed, each with a different version of SkiaSharp. To avoid crashes, we have to explicitly load the functions for the specific binaries in the extension package. If we used normal p/invokes, then it would pick the one that was already loaded, and might crash.
SkiaSharp also only is really supporting net462 as we needed some features that came there. If you need to support NETFX, you will have to update to 4.6.2.

@mattleibow Thanks for your answer. But I still have some questions:

You told SkiaSharp is needed some features that came in net462. I tried to check these specific features building Windows managed part targeting net461. But on compile time I see no issues (but I can miss something and my experiment can be not fully correct). Could you specify at least several such features or short guide how can I check it on my side?
In our application we builds on net461. We use Avalonia which use ShiaSharp. Because minimum .NET Framework version supported is 4.6.2 we have to reference netstandard2.0 version. And it looks like there is no problem (both at compile time and at runtime). But at the same time ShiaSharp is using p/invokes for native API. Does it look like an issue on your side? Why lazy loaded delegates are not used in case of netstadard2.0?
In case of working on Linux there can be also a situation when the user application can be shipped both for x86 and x64. Why don`t you use lazy loading delegates for all platforms (As I see LibraryLoader is designed for all platforms)? Is there some benefits of using p/invokes in your case?

@mattleibow Thanks for your answer. But I still have some questions:

You told SkiaSharp is needed some features that came in net462. I tried to check these specific features building Windows managed part targeting net461. But on compile time I see no issues (but I can miss something and my experiment can be not fully correct). Could you specify at least several such features or short guide how can I check it on my side?
In our application we builds on net461. We use Avalonia which use ShiaSharp. Because minimum .NET Framework version supported is 4.6.2 we have to reference netstandard2.0 version. And it looks like there is no problem (both at compile time and at runtime). But at the same time ShiaSharp is using p/invokes for native API. Does it look like an issue on your side? Why lazy loaded delegates are not used in case of netstadard2.0?
In case of working on Linux there can be also a situation when the user application can be shipped both for x86 and x64. Why don`t you use lazy loading delegates for all platforms (As I see LibraryLoader is designed for all platforms)? Is there some benefits of using p/invokes in your case?

Technically, net461 can work, but to be consistent with everything, I set everyone to net462. This is also the latest version of net46.
Is there no way you can bump your app to use net462? P/invokes are actually better as there is less intermediate code, the reason for the delegates is, as I mentioned before, so that VS can load two versions of SkiaSharp. Unless you are supporting a plug-in architecture where two versions of skia are required to be in memory, either way will work fine.
Linux is also net462, so it also uses the delegates. Unless you are building a .NET Core app, then .NET core manages the native bits for you and you don't have to worry about which arch it is loading as the runtime does it for you.

Technically, net461 can work, but to be consistent with everything, I set everyone to net462. This is also the latest version of net46.
Is there no way you can bump your app to use net462? P/invokes are actually better as there is less intermediate code, the reason for the delegates is, as I mentioned before, so that VS can load two versions of SkiaSharp. Unless you are supporting a plug-in architecture where two versions of skia are required to be in memory, either way will work fine.
Linux is also net462, so it also uses the delegates. Unless you are building a .NET Core app, then .NET core manages the native bits for you and you don't have to worry about which arch it is loading as the runtime does it for you.

Hi @mattleibow,
I want to connect to the discussion because I see some technical troubles with using SkiaSharp under platform with different architectures. The library is using PInvoke as simple and fast method to call native libraries. However, there is set of problem with it:

the principle "write once, run anywhere" (WORA) doesn't work for SkiaSharp because for example I need four different .so for Linux x64 / arm64 / musl-x64 / musl-arm64 but SkiaSharp uses only one place for .so. Same bad situation with Windows x64 / x86 / arm64 / arm - only one place for all .dll.
PInvoke isn't a gold bullet. The main issue you can't control the library:

it is impossible to unload the native library
it will use already loaded library, but which of them if you have two in memory with different versions :-)
You can't simply specify different subfolders for you native library if you have different version for different architectures. Or, you should implement copy of the PInvoke interface for every combination of OS and architecture. It's a pain...
It is strongly required to @rpath/... for macOS because it some cases macOS processes will not find SkiaSharp library for loading.

On my opinion, using PInvoke works correctly only for system wide libraries such as dlopen / libc / libobjc / kernel32 / ... . I would recommend to use delegates in other cases.

Hi @mattleibow,
I want to connect to the discussion because I see some technical troubles with using SkiaSharp under platform with different architectures. The library is using PInvoke as simple and fast method to call native libraries. However, there is set of problem with it:

the principle "write once, run anywhere" (WORA) doesn't work for SkiaSharp because for example I need four different .so for Linux x64 / arm64 / musl-x64 / musl-arm64 but SkiaSharp uses only one place for .so. Same bad situation with Windows x64 / x86 / arm64 / arm - only one place for all .dll.
PInvoke isn't a gold bullet. The main issue you can't control the library:

it is impossible to unload the native library
it will use already loaded library, but which of them if you have two in memory with different versions :-)
You can't simply specify different subfolders for you native library if you have different version for different architectures. Or, you should implement copy of the PInvoke interface for every combination of OS and architecture. It's a pain...
It is strongly required to @rpath/... for macOS because it some cases macOS processes will not find SkiaSharp library for loading.

On my opinion, using PInvoke works correctly only for system wide libraries such as dlopen / libc / libobjc / kernel32 / ... . I would recommend to use delegates in other cases.


fix userguide typo

Summary of changes
Just some small typo fix :)

Thabk you very much @matjansen .


repository and tag it as part2

File: get-started/part2.md
should be:
repository and tags it as part2

@jimshowalter could you be more specific on what needs to be reworded?

It's currently tag, which isn't correct.
This puts the image in the get-started repository and tag it as part2.
should be:
This puts the image in the get-started repository and tags it as part2.

Thanks for sharing this issue. Closing this as the get started tutorial has been updated and this issue no longer exists.


[alert_handler] escalation pair issue tracking

In alert_handler tb, my regression includes an agent to drive escalation receiver pairs. I found the issue as following:
If escalation phase cycle is set to an odd number, my escalation receiver (resp signal) will drive one more cycle, which on the escalation sender side, was caught as a signal integrity error.
Tracking from the escalation receiver design side, I confirmed with Michael and found the same issue in his RTL code.
The side-effect of this issue is: if escalation phase cycle is set to an odd number, every time the alert_handler will detect an extra escalation response signal, and fire an integrity fail alert.
Since the escalation pair is planned to fully verify in FPV, we found following action items:

[x] For cindy (@cindychip) add back the assertion to check integrity fail in this scenario.

[x] For michael (@msfschaffner) once assertion checked in, please support the fix in RTL, and update the spec accordingly.

[ ] Future item: discuss if FPV fully verified the model. If needed, do we need to support the pairs in simulation, or is top-level sufficient.

@cindychip is this something we should keep open, or can we close this issue?

I think we are good to close this. I think current FPV and DV are fine.


nuxt generate folder can't find for non english params ( folder urlencode )

I have a problem when I use generate with Chinese params .
I define some params with Chinese language .
It work ok on node.js server , but when I generate static website with routeParams config in nuxt.config.js
generate: {
    routeParams: {
      '/post/:slug': [
        { slug: 'my-first-post' },
        { slug: '我的第一篇文章' }
      ]
    }
  },

static website will show 404 when I refresh at Chinese slug page
I open dist folder , I seen the Chinese params parse a url encode format
so I can't access that page  , so I manually modify that folder back to Chinese .
/post/%E6%88%91%E7%9A%84%E7%AC%AC%E4%B8%80%E7%AF%87%E6%96%87%E7%AB%A0/index.html
to
/post/我的第一篇文章/index.html
It works !
is should generate disabled url encode ? or need a option to fix this ?
now , we avoid use Chinese in params , but some customer need use Chinese url ...
hope can fix it .
thanks .
my test video
https://www.youtube.com/watch?v=n51sklBpFUw&feature=youtu.be
and online test link
[error 404]  url encoded folder
http://spurious-balls.surge.sh/
[ok 200] folder modified
http://remarkable-icicle.surge.sh/

It should be fixed in the next release.

The 0.10 release it out ✋
Take a look at https://nuxtjs.org/api/configuration-generate#routes


Get same value on several items in a v-for loop

Version
2.6.11
Reproduction link
https://codepen.io/lynn-chin/pen/xxEEZgR
Steps to reproduce
I have an object array like this: [ { name: '01.jpg', id: 1234, url: '/example/01.jpg' }, { name: '02.jpg', id: 2345, url: '/example/02.jpg' } ];
When I use v-for to render HTML structure, items in the object got same value for item.id:
My HTML structure is:

<input
type="checkbox"
@change="checkboxChange($event, item)"
ref="imgCheckBox"
/>
{{ item.name }}

The result of console.log(item.id, item.name) for each item:
12345678987654324  "02.jpg"    (wrong id)
12345678987654324  "03.jpg"    (wrong id)
12345678987654324  "04.jpg"
12345678987654326  "05.jpg"
12345678987654328  "06.jpg"    (wrong id)
12345678987654328  "07.jpg"    (wrong id)
If I change item.id's type from Number to String, this will not happen.
I wanna know what is happen and how can I avoid this situation.  Does that mean I cannot use Number values in a v-for loop?
What is expected?
I expect each item got its right id value.
What is actually happening?
Most values for item.id are wrong.

My Vue version is 2.6.12, but there's not such a choice.

https://codepen.io/lynn-chin/pen/xxEEZgR

This isn't a runnable reproduction. Please provide a valid one. Thank you.

https://codepen.io/lynn-chin/pen/xxEEZgR

This isn't a runnable reproduction. Please provide a valid one. Thank you.

Hi,  I rewrote my work, you can run it now: https://codepen.io/lynn-chin/pen/xxEEZgR

You need :key="item.id"
Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂


Helix support?

Support for the helix editor would be awesome! I can try my hand at making the theme if you'd like.
The theme configuration looks pretty straight forward as it's mean to use terminal colors by default and uses tree-sitter grammar for configuring syntax highlighting, so large parts of other editor themes might be able to be directly recycled if they also are configured through tree-sitter.

sure @johnbchron , it will be great you send a PR with this port. 💜

any updates regarding this?

I'm no longer using Aura, so I won't be making a PR. Feel free to do it in my place @diceeth, it's pretty simple.

If this issue is still up for grabs, I cant take it. I've got a large portion of it done.

Sure @elainabialkowski , you can take it! Thanks 💜

While following the publishing guide, I'm running into permission issues on push.

While following the publishing guide, I'm running into permission issues on push.

You must fork this repo first, then make your changes and push it to your fork so you will be able to make a pull request to this repo

Look so good! Cant wait! ✌


fix android compile on react-native 0.47

createJSModules is now not required on Android from RN 0.47 and breaks android compile, removing override fixes this

Thanks @brycepavey !


Update method in comment for getting the id token

Sources

https://github.com/firebase/firebase-js-sdk/blob/master/packages/auth/src/model/user.ts#L85
https://firebase.google.com/docs/reference/js/v8/firebase.User#getidtoken
https://firebase.google.com/docs/reference/js/auth.user.md#usergetidtoken
https://firebase.google.com/docs/auth/web/manage-users#get_a_users_profile

Looks like you'll need to run npm run snippets per the failing test


Implement Slash Command Groups in cogs

Newest pycord release @faeaa159d43cfec8ef4f21fd85183df820a9b42e supports slash groups in cogs, we can implement these now

will close because unecessary for now, bot works fine without groups


Added nodeSelectors for allocating GPU nodePools in the cloud and configured volumes for WebUI

Summary
Added GPU support (selectors) for Cloud environments and added persistent storage for WebUI.

WebUI Service Type Customisation: The service type for WebUI is now configurable, with NodePool as the default setting. This change provides more flexibility as it was previously hardcoded to NodePool.

NodeSelector Configurations: Added configurations for nodeSelector. This feature is essential for selecting GPU-backed node pools in the cloud.

Dynamic Resource Specification: The resources specification has been revised to be more dynamic, allowing for greater adaptability.

NVIDIA GPU Drivers for Ollama-statefulset: Introduced environment variables to enable NVIDIA GPU drivers for the ollama-statefulset.

VolumeSize Parameter Fix for Ollama-statefulset: Corrected the volumeSize parameter for ollama-statefulset, which was previously hardcoded (most likely a typo).

Image Parameter Fix for WebUI-Deployment: Corrected the image parameter for webui-deployment which was previously hardcoded (most likely a typo).

PersistentVolume/PersistentVolume Claim for WebUI: Added a persistentVolume/persistentVolumeClaim to WebUI to support the new authentication model.

Testing
The above changes have been tested on GKE (with NVIDIA GPU's) using the values.yaml provided below.

Persistence of Chat and User History: The chat and user history in WebUI persisted even after killing/restarting the pod and starting a new session in a different browser.

GPU Generation: The GPU generation worked as expected. The results were much quicker when tested with llava and codellama.

Custom ModelFiles: Custom ModelFiles were not tested (sorry I'm not familiar with model files).

Here is the values.yaml configuration used for testing:
namespace: ollama

ollama:
  gpu:
    enabled: "true"
  nodeSelector:
    cloud.google.com/gke-spot: "true"
    cloud.google.com/gke-accelerator: "nvidia-tesla-t4"
  resources:
    requests:
      memory: 8192Mi
      cpu: 4000m
    limits:
      memory: 8192Mi
      cpu: 4000m
      nvidia.com/gpu: "2"
  volumeSize: 40Gi

webui:
  service:
    type: ClusterIP #LoadBalancer
  nodeSelector:
    cloud.google.com/gke-spot: "true"
  ingress:
    enabled: true
    host: ollama.braveokafor.com
    annotations:
      kubernetes.io/ingress.global-static-ip-name: ollama
      kubernetes.io/ingress.class: gce
  volumeSize: 2Gi

Many thanks for the fixes, yes, hardcoded values were typos.
I haven't the ability to test on a gpu-tier cloud right now, i read files and they are correct imho.
I'll merge right away!


Make secure_filename() escape reserved Windows filenames

@CaselIT noticed that we didn't hold Windows hand regarding device file names, like
https://github.com/pallets/werkzeug/blob/7868bef5d978093a8baa0784464ebe5d775ae92a/src/werkzeug/utils.py#L229-L237
Originally posted by @CaselIT in https://github.com/falconry/falcon/pull/2421#discussion_r1887617832

I was reading a bit about this, and it is actually possible to both create and delete such files on Windows by using proper escaping. Maybe just a documentation note would be enough? I don't expect many to deploy Falcon on a Windows server in production, but of course you never know.
If we do decide to implement this check, maybe we could only do this if we detect the Windows platform?

just documenting that special file names in windows are not handled is likely fine

This is what is defined in the stdlib's (3.13) ntpath.py:
_reserved_chars = frozenset(
    {chr(i) for i in range(32)} |
    {'"', '*', ':', '<', '>', '?', '|', '/', '\\'}
)

_reserved_names = frozenset(
    {'CON', 'PRN', 'AUX', 'NUL', 'CONIN$', 'CONOUT$'} |
    {f'COM{c}' for c in '123456789\xb9\xb2\xb3'} |
    {f'LPT{c}' for c in '123456789\xb9\xb2\xb3'}
)

def isreserved(path):
    """Return true if the pathname is reserved by the system."""
    # Refer to "Naming Files, Paths, and Namespaces":
    # https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file
    path = os.fsdecode(splitroot(path)[2]).replace(altsep, sep)
    return any(_isreservedname(name) for name in reversed(path.split(sep)))

def _isreservedname(name):
    """Return true if the filename is reserved by the system."""
    # Trailing dots and spaces are reserved.
    if name[-1:] in ('.', ' '):
        return name not in ('.', '..')
    # Wildcards, separators, colon, and pipe (*?"<>/\:|) are reserved.
    # ASCII control characters (0-31) are reserved.
    # Colon is reserved for file streams (e.g. "name:stream[:type]").
    if _reserved_chars.intersection(name):
        return True
    # DOS device names are reserved (e.g. "nul" or "nul .txt"). The rules
    # are complex and vary across Windows versions. On the side of
    # caution, return True for names that may not be reserved.
    return name.partition('.')[0].rstrip(' ').upper() in _reserved_names

Most of the things char-related are irrelevant, so we could just check for these reserved names if we detect the Windows platform.


Auto switch keyboard Japanese to QWERTY

When i use Japanese keyboard and click to TextView with BetterLinkMovementMethod. Keyboard auto switch to QWERTY

That's a weird error. Does this not happen with the platform LinkMovementMethod?

Closing due to inactivity.


Feat(preview-middleware) add config for qunit/opa5 and custom oninit module

Solves https://github.com/SAP/open-ux-tools/issues/1706
Add yaml config options for

flp.scenario can be "OPA5" or "QUNIT" -> respective script and link tags will be added to sandbox.html
flp.customInit can contain path to custom module to be called after the sap-ui-bootstrap (as part of data-sap-ui-oninit), e.g. "my/app/id/test/integration/opaTest.qunit"
flp.fioriSandboxConfig -> if true the sandbox.html will not include additional sap-ushell-config in favour of a user provided webapp/appconfig/fioriSandboxConfig.json

open

renderer.placeAt('content') not needed in case of QUNIT
use flp.test.framework = QUNIT || OPA5 instead of flp.scenario?
flp.path filenames containing dots (e.g. opaTests.qunit.html) seem to cause issues in preview middleware 0.12.3

@heimwege we have some issues with our pipeline and merging a forked branch to main. Could you instead create a PR merging to feat/1706/opa?
I would then take it from there, finish it up and let you do the final merge.

@heimwege we have some issues with our pipeline and merging a forked branch to main. Could you instead create a PR merging to feat/1706/opa? I would then take it from there, finish it up and let you do the final merge.

Here you go: https://github.com/SAP/open-ux-tools/pull/1723

Closing this one in favour of https://github.com/SAP/open-ux-tools/pull/1723


SimpleEmailServiceJavaMailSender lacks features compared to JavaMailSenderImpl

SimpleEmailServiceJavaMailSender is lacking features for managing the Session that the default Spring JavaMailSenderImpl provides. In particular

Reusing the Session for all messages
Being able to configure session properties like mail.from
Support for default encoding etc via SmartMimeMessage

Ideally sprint-context-support would provide those base features in an abstract JavaMailSender base class, but since that's not the case the easiest approach might be to copy the corresponding code.

In particular I am finding that if mail.from is not set sending mail will hang / take a long time in InetAddress.getLocalHostName() to determine the default enveloper sender (which ends up being ignored by SES anyway as far as I can tell)


Bug 1826183: Sync proxy CA to openshift-controller-manager

Previously, builds mounted the global CA trust bundle as the PEM-encoded TLS
trust bundle. This trust bundle is generated by the Network Operator, which
validates any user-provided CA trust bundle and merges it with the default trus
bundle provided by RHCOS. Using the global CA is problematic because maven and
other JVM-based processes establish trust using keytool formatted trust
bundles.
To generate trust bundles in the keytool format (as well as other formats used
by RHEL), builds will run update-ca-trust extract on startup. To merge the
trust bundle correctly, the build controller needs to mount any user-provided CA
in a well-known location. The openshift-builder process is then responsible for
copying the CA to /etc/ca-trust/source/anchors prior to running
update-ca-trust extract.
To achieve this, the operator is being enhanced with the following:

Added a separate controller for observing the user CA config.
Added a ResourceSync controller to copy the user CA to the
openshift-controller-manager namespace.
Updated starter to launch the new controllers.

The operator will continue to create the openshift-global-ca ConfigMap to
ensure that the openshift controller manager does not have an outage during
upgrades. This can be removed in a subsequent release.
See also openshift/builder#153, openshift/builder#158, openshift/openshift-controller-manager#119

/assign @coreydaley
/retest

/lgtm


sortText of ItemCompletion are being ignored when comparing to ItemCompletion that doesn't specify the sortText field

Issue Type: Bug

Create a new Typescript extension with yo code.

In package.json, replace the actionEvents field with
  "activationEvents": [
  	"*"
  ],

Replace extension.ts with the following code:
  import * as vscode from 'vscode';

  export function activate(context: vscode.ExtensionContext) {

  	let provider = vscode.languages.registerCompletionItemProvider("plaintext", {
  	provideCompletionItems(document: vscode.TextDocument, position: vscode.Position, token: vscode.CancellationToken, context: vscode.CompletionContext){
  		return [
  			{
  				label:"C",
  				detail:"Should show above the B",
  				sortText :"A"
  			},
  			{
  				label:"B",
  				detail:"Should show below the C",

  			}
  		]
  	}
  	});

  	context.subscriptions.push(provider);
  }

  export function deactivate() {}

Run the extension and create a new txt file.

Press ctrl+space to show completion options.

What I expected:
The 'C' option will be sorted to be shown above the 'B' option, because it has a sortText of 'A'.
What actually happened:
The 'C' option will be sorted to be shown below the 'B' option, because its sortText is being ignored and the label is used for sorting instead.
You can see that if you just add a sortText of 'B' to 'B' it works as expected.
{
	label:"C",
	detail:"Should show above the B",
	sortText :"A"
},
{
	label:"B",
	detail:"Should show below the C",
	sortText:"B"

}

VS Code version: Code - Insiders 1.31.0-insider (bae6c84d46cd85c911db7e166a74e698a54c8644, 2019-01-04T06:17:20.719Z)
OS version: Windows_NT x64 10.0.17134

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-4700HQ CPU @ 2.40GHz (8 x 2394)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: enabledsurface_synchronization: enabled_onvideo_decode: enabledwebgl: enabledwebgl2: enabled

Memory (System)
15.91GB (10.39GB free)

Process Argv

Screen Reader
no

VM
50%

Extensions: none

@jrieken Does that mean, that the documentation is currently outdated?

A string that should be used when comparing this item with other items. When falsy the label is used.

https://code.visualstudio.com/api/references/vscode-api#CompletionItem.sortText

Another way this can surface is if you have multiple extensions contributing to the same completion list, with one using sortText and another not.
IntelliCode uses sortText to bring our recommendations to the top of the list. If another extension is providing completion items which omit sortText, those can appear above the recommendations. This isn't a great experience since we are also applying editor.suggestSelection: first to focus that first item, which we expect to be a recommendation.
@jrieken did you end up trying what you mentioned above?

@jrieken did you end up trying what you mentioned above?

No, but we should. I will push a change today and then we (that includes your and IntelliCode) need to observe how https://code.visualstudio.com/insiders/ behaves.

@mjbvz Just a heads up that this changed - I believe the original (questionable) behaviour was introduced for TS, or TS as it was years back, and I wonder if you have observed any difference since the last week?

@jrieken Sorry for the delay, I just had a chance to try this and it looks good to me.

Yeah, we haven't seen issues (yet) and I am all in for shipping like this in September.


Support remaining primary data types as part of entity creation

String, Text, Number, Boolean, Datetime, Object, Array, Geographic point, File.

Assigned to @rka12


fix(tools): npm -> yarn in deploy script

Hopefully closes #70

P.S: I have also thrown in a update to yarn in the mix. Lets get this in and keep working, while I figure on how to get a version no out of the config,

Nice work guys 😄


Implement valuable-serde

Closes #17
Examples
use valuable::Valuable;
use valuable_serde::Serializable;

#[derive(Valuable)]
struct Point {
    x: i32,
    y: i32,
}

let point = Point { x: 1, y: 2 };

let value = Serializable::new(&point);

assert_eq!(
    serde_json::to_string(&value).unwrap(),
    r#"{"x":1,"y":2}"#,
);

This is now ready for review.
Currently, I'm aware of two differences in behavior from serde. See https://github.com/tokio-rs/valuable/pull/23#discussion_r632580027 and https://github.com/tokio-rs/valuable/pull/23#discussion_r634326038 for more.

filed https://github.com/tokio-rs/valuable/issues/42 to track remaining todos.


docs(CONTRIBUTING): Switch ENABLE_VIRTUAL_SMOOTHIE examples to match actual behavior

Thanks for taking the time to make this contribution! Sorry we missed this error in the first place

cheers! :-D
Happy Hacking!


Workaround for Monterey random crash

CGSInvalidateWindowShadow causes some random crashes, temporarily disable it on Monterey.

I've had multiple crashes in the last few hours, all crash logs reference InvalidateWindowShadow. I'll give this workaround a go. I've included a crash log for reference
log.txt

For what it's worth this work around has been great for me. No crashes over the last couple of days since applying it.

Does this break yabai -m config window_shadow off functionality?

My experience has also been that this call is where WindowServer crashes come from (at least with borders off),
but my (somewhat intuitive and non-followed-up) impression is that its only a problem when the call is attempted on short-lived windows that are gone already (making it a ~NPE) – in which case I'd prefer a filter to that effect versus a full disable

Does this break yabai -m config window_shadow off functionality?

If so (and indeed leaving shadows on is also a workaround) and no one is down to ~fix it yet, I'd suggest its better to add some kind of warning when using a shadows off config

Does this break yabai -m config window_shadow off functionality?

If so (and indeed leaving shadows on is also a workaround) and no one is down to ~fix it yet, I'd suggest its better to add some kind of warning when using a shadows off config

Not affected. As my experience, even disable window_shadow, this function CGSInvalidateWindowShadow  still be called and causes crashes and what described in #4.


[FEATURE] Migrate media to html utility methods to v2 sdk

Is your feature request related to a problem? Please describe.

To annotate media other than text, users need to represent the media as HTML. In the legacy SDK, this was supported by a set of utility methods, which can still be tunneled to via the new SDK:
from argilla_v1.client.feedback.utils import audio_to_html, image_to_html, video_to_html, pdf_to_html

Describe the solution you'd like

This utility methods should be migrated and addressed within the v2 SDK.

Conversation template for HTML


Server side localization

Any suggestion for server side localization? Currently I am simply loading the content for each request and passing it down to view as props. Any better suggestion?

@zer0Id0l what are the downsides to your current approach? we've been loading content in middleware after locales are resolved and following the same pattern. btw, are you using react-intl?


secrets_generator block not replacing base file sources

I am trying to install Wazuh using wazuh-kubernetes which uses kustomize.
As part of this install, the base kustomiztion.yaml contains two secretGenerator blocks, which each reference some local files.
In a manual install one would create these files and then apply -k the applicable overlay.
Using the kustomization provider, I'm attempting to create a new wrapper overlay that replaces these secretGenerator blocks:
data "kustomization_overlay" "wazuh" {
  secret_generator {
    name     = "indexer-certs"
    behavior = "replace"
    files = [
      "${path.module}/certs/indexer_cluster/root-ca.pem",
      "${path.module}/certs/indexer_cluster/node.pem",
      "${path.module}/certs/indexer_cluster/node-key.pem",
      "${path.module}/certs/indexer_cluster/dashboard.pem",
      "${path.module}/certs/indexer_cluster/dashboard-key.pem",
      "${path.module}/certs/indexer_cluster/admin.pem",
      "${path.module}/certs/indexer_cluster/admin-key.pem",
      "${path.module}/certs/indexer_cluster/filebeat.pem",
      "${path.module}/certs/indexer_cluster/filebeat-key.pem",
    ]
  }

  secret_generator {
    name     = "dashboard-certs"
    behavior = "replace"
    files = [
      "${path.module}/certs/dashboard_http/cert.pem",
      "${path.module}/certs/dashboard_http/key.pem",
      "${path.module}/certs/indexer_cluster/root-ca.pem",
    ]
  }

  resources = [
    "https://github.com/wazuh/wazuh-kubernetes/wazuh?ref=v${local.wazuh_release}",
    "https://github.com/wazuh/wazuh-kubernetes/envs/eks?ref=v${local.wazuh_release}",
  ]

  kustomize_options {
    load_restrictor = "none"
  }
}

Using behavior = replace, I would expect the secretGenerator blocks to be overwritten, but running a plan produces an error as if the replacements do not happen:
╷
│ Error: buildKustomizeOverlay: Kustomizer Run for path '.' failed: accumulating resources: accumulation err='accumulating resources from 'https://github.com/wazuh/wazuh-kubernetes/wazuh?ref=v4.3.6': URL is a git repository': recursed accumulation of path '/private/var/folders/7k/ny4bb5qs2v57nn_fyd110hg00000gq/T/kustomize-835630976/wazuh': loading KV pairs: file sources: [certs/indexer_cluster/root-ca.pem certs/indexer_cluster/node.pem certs/indexer_cluster/node-key.pem certs/indexer_cluster/dashboard.pem certs/indexer_cluster/dashboard-key.pem certs/indexer_cluster/admin.pem certs/indexer_cluster/admin-key.pem certs/indexer_cluster/filebeat.pem certs/indexer_cluster/filebeat-key.pem]: evalsymlink failure on '/private/var/folders/7k/ny4bb5qs2v57nn_fyd110hg00000gq/T/kustomize-835630976/wazuh/certs/indexer_cluster/root-ca.pem' : lstat /private/var/folders/7k/ny4bb5qs2v57nn_fyd110hg00000gq/T/kustomize-835630976/wazuh/certs/indexer_cluster/root-ca.pem: no such file or directory
│
│   with data.kustomization_overlay.wazuh,
│   on wazuh.tf line 5, in data "kustomization_overlay" "wazuh":
│    5: data "kustomization_overlay" "wazuh" {
│
╵

Is this an issue, a known limitation, or am I just misinterpreting what is happening during the overlay creation?
Edit: Based on this, I tried setting the namespace explicitly in my secret_generator blocks in the HCL above, but it did not change the behaviour.

Try two things:

use resources on disk, not a remote URL, you reference resources under path.module but the path on disk is seems to be some temp checkout
try without the provider using kustomize build and a kustomization.yaml

Trying outside of the provider as you suggest results in the same. Here is my kustomization.yaml:
bases:
  - ../eks

secretGenerator:
  - name: indexer-certs
    namespace: wazuh
    behavior: replace
    files:
      - certs/indexer_cluster/root-ca.pem
      - certs/indexer_cluster/node.pem
      - certs/indexer_cluster/node-key.pem
      - certs/indexer_cluster/dashboard.pem
      - certs/indexer_cluster/dashboard-key.pem
      - certs/indexer_cluster/admin.pem
      - certs/indexer_cluster/admin-key.pem
      - certs/indexer_cluster/filebeat.pem
      - certs/indexer_cluster/filebeat-key.pem
  - name: dashboard-certs
    namespace: wazuh
    behavior: replace
    files:
      - certs/dashboard_http/cert.pem
      - certs/dashboard_http/key.pem
      - certs/indexer_cluster/root-ca.pem

$ kustomize build --load-restrictor LoadRestrictionsNone
Error: accumulating resources: accumulation err='accumulating resources from '../eks': read /Users/rob.westbrook/src/testing/wazuh/wazuh-kubernetes/envs/eks: is a directory': recursed accumulation of path '/Users/rob.westbrook/src/testing/wazuh/wazuh-kubernetes/envs/eks': accumulating resources: accumulation err='accumulating resources from '../../wazuh': read /Users/rob.westbrook/src/testing/wazuh/wazuh-kubernetes/wazuh: is a directory': recursed accumulation of path '/Users/rob.westbrook/src/testing/wazuh/wazuh-kubernetes/wazuh': loading KV pairs: file sources: [certs/indexer_cluster/root-ca.pem certs/indexer_cluster/node.pem certs/indexer_cluster/node-key.pem certs/indexer_cluster/dashboard.pem certs/indexer_cluster/dashboard-key.pem certs/indexer_cluster/admin.pem certs/indexer_cluster/admin-key.pem certs/indexer_cluster/filebeat.pem certs/indexer_cluster/filebeat-key.pem]: open /Users/rob.westbrook/src/testing/wazuh/wazuh-kubernetes/wazuh/certs/indexer_cluster/root-ca.pem: no such file or directory

I'm not sure if this is just how kustomize works, or if it's a PEBKAC error, but regardless I think it proves that this is outside the remit of the provider to fix.

Yeah the provider really only calls kustomize and pulls the resources into Terraform with the data sources. So if it also fails with plain kustomize, it's more likely an upstream issue.
You tried with and without namespace specified already. That's a common thing but obviously not the case here.
I have a hunch it's about the paths. But it's just a hunch. Good luck figuring it out, I'll close the issue here. I don't think there's anything else I can do.


improve offline mapping experience

Ideally, you should be able to run all mapping tasks while offline after downloading all required files once. This includes minecraft's files and the spelling dictionary.
tentative plan:
Save two values in a json file in the cache: minecraft version and most recent update. Consider cache update task up to date if the minecraft version matches the current constant and it's been less than a day since the last update. If it's been more than a day but the user is offline, warn and allow running anyway. Do not allow run if minecraft version does not match constant.
On run:

validate json file
if success, continue, otherwise redownload all files
check all necessary files are present
if success, continue, otherwise redownload all files

Most of this can already be done with what we have. The version manifest file contains the latest minecraft versions, and I think gradle can keep track of the time since the file was updated. Usually this file isn't updated more than once a week, so a single day of cache validity would be far too short.
On the other hand, I think we shouldn't block the user from mapping a version other than the latest one, since sometimes its useful to backport mappings from newer Minecraft versions, or even just compare mappings or code between them.

thanks for the information!
I think I'm going to look at tackling this myself


Idea: distribute buildstream as a flatpak

See original issue on GitLab
In GitLab by [Gitlab user @jjardon] on Aug 2, 2018, 18:57
I think it would be a good idea to offer a buildstream flatpak (build it as part of the CI, for example)

we will solve the distribution problem in several package formats
we will use the flatpak plugin we want to improve

As a reference, a flatpak of flatpak-builder exist

In GitLab by [Gitlab user @juergbi] on Aug 5, 2018, 17:15
As far as I know, this is not possible (in a straight forward way) with Linux < 4.18 because Linux 4.17 and older kernels do not allow FUSE mounts in unprivileged user namespaces.

In GitLab by [Gitlab user @tristanvb] on Aug 5, 2018, 20:29
I thought the FUSE availability in namespaces is rather orthogonal, we dont use that (but might be interested in that).
Rather, the fact that Flatpak will create a user namespece already and seccomp alot of privileges away, prevents us from escalating priviledges enough to create a new user namespace, especially where the active UID might not be 0.

In GitLab by [Gitlab user @juergbi] on Aug 6, 2018, 02:42

I thought the FUSE availability in namespaces is rather orthogonal, we dont use that (but might be interested in that).

We use FUSE outside the sandbox that BuildStream creates (SafeHardlinks). However, if bst itself is already in a user namespace, we'd need to support FUSE in user namespaces.

Rather, the fact that Flatpak will create a user namespece already and seccomp alot of privileges away, prevents us from escalating priviledges enough to create a new user namespace, especially where the active UID might not be 0.

You're right that Flatpak's seccomp rules block the creation of nested user namespaces (the UID is irrelevant here, as far as I can tell).
flatpak-builder gets around both of these limitations by using the HostCommand method in the Flatpak portal (also available via flatpak-spawn --host), which allows spawning arbitrary host commands. This is enabled via --talk-name=org.freedesktop.Flatpak. I.e., the flatpak-builder flatpak is (intentionally) not securely sandboxed, but it can obviously still be convenient.
We may be able to do something similar, i.e., redirect fusermount and bwrap to the host via flatpak-spawn --host.

In GitLab by [Gitlab user @tristanvb] on Aug 6, 2018, 05:36

We use FUSE outside the sandbox that BuildStream creates (SafeHardlinks). However, if bst itself is already in a user namespace, we'd need to support FUSE in user namespaces.

Right, I must have misplaced my mind :)

You're right that Flatpak's seccomp rules block the creation of nested user namespaces (the UID is irrelevant here, as far as I can tell).

I was rather thinking that since flatpak is already creating the user namespace, we might be able to use the one it creates; but that could never work for BuildStream elements which request to be a UID that is not 0.
However, the insecure flatpak approach you describe might be useful, of course it doesn't buy us much if a lot of BuildStream's dependencies need to be on the host, and it doesn't really buy us anything at all if BuildStream itself has to be installed on the host... Unless maybe if we had something like a bundled AppImage of BuildStream; installed via flatpak... and launched with a host command ?

In GitLab by [Gitlab user @jjardon] on Aug 8, 2018, 16:35
marked this issue as related to #410

In GitLab by [Gitlab user @nanonyme] on Apr 25, 2020, 13:36
It seems this is hitting exact same issues with bwrap as this new Steam pressure-vessel approach: while nested sandboxing to some extent is possible, flatpak by design bans certain things that could confuse eg portals. As a result arbitrary filesystem mangling in sub-sandboxes is not allowed.


add spidertron extended support

Updated to sort the inventories of the SpidertronMK2 and SpidertronMK3 created by the spidertron-extended mod.

I fixed your main branch, it works with the original spider now. I see no reason why it shouldn't work with the extended spiders, but please test it and let me know how it turns out.

Thank you, I will check it out.
On Wed, Mar 9, 2022 at 2:55 PM Tomeamis @.***> wrote:

I fixed your main branch, it works with the original spider now. I see no
reason why it shouldn't work with the extended spiders, but please test it
and let me know how it turns out.
—
Reply to this email directly, view it on GitHub
https://github.com/Tomeamis/FactorioSpidertronInventory/pull/1#issuecomment-1063362179,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABZFHXUXXRTI4EIRB2UK6I3U7EF3FANCNFSM5QKCXZ5A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

Doesn't appear to work still. Guessing it might have something to do with
how the other mod builds the entity but I'm pretty new to digging into
factorio mods. It seems like it should work. I've gone back to the v0.1.0
and changed the SpiderName to "spidertronmk2" and that doesn't work either.
On Wed, Mar 9, 2022 at 3:02 PM Marshall C @.***>
wrote:

Thank you, I will check it out.
On Wed, Mar 9, 2022 at 2:55 PM Tomeamis @.***> wrote:

I fixed your main branch, it works with the original spider now. I see no
reason why it shouldn't work with the extended spiders, but please test it
and let me know how it turns out.
—
Reply to this email directly, view it on GitHub
https://github.com/Tomeamis/FactorioSpidertronInventory/pull/1#issuecomment-1063362179,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABZFHXUXXRTI4EIRB2UK6I3U7EF3FANCNFSM5QKCXZ5A
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>


wrong link in docs

This docs has link to material type system but link has unnecessary parenthesis at the end:
https://material.io/design/typography)

I would like to work on it!


Remove "routing_table" and "routing_key" concepts for the user

This PR makes several core changes to the developer experience surrounding Llama Stack.
Background: PR https://github.com/meta-llama/llama-stack/pull/92 introduced the notion of "routing" to the Llama Stack. It introduces three object types: (1) models, (2) shields and (3) memory banks. Each of these objects can be associated with a distinct provider. So you can get model A to be inferenced locally while model B, C can be inference remotely (e.g.)
However, this had a few drawbacks:

you could not address the provider instances -- i.e., if you configured "meta-reference" with a given model, you could not assign an identifier to this instance which you could re-use later.
the above meant that you could not register a "routing_key" (e.g. model) dynamically and say "please use this existing provider I have already configured" for a new model.
the terms "routing_table" and "routing_key" were exposed directly to the user. in my view, this is way too much overhead for a new user (which almost everyone is.) people come to the stack wanting to do ML and encounter a completely unexpected term.

What this PR does: This PR structures the run config with four top-level keys:
- providers
- models
- shields
- memory_banks

Providers are instances of configured provider types. Here's an example which shows two instances of the remote::tgi provider which are serving two different models.
providers:
  inference:
  - provider_id: foo
    provider_type: remote::tgi
    config: { ... }
  - provider_id: bar
    provider_type: remote::tgi
    config: { ... }

You can point to these providers using their IDs. For example, these providers will be used by the models registry entry:
models:
  - identifier: Llama3.2-1B-Instruct
    llama_model: Llama3.2-1B-Instruct
    provider_id: foo
  - identifier: Llama3.2-3B-Instruct
    llama_model: Llama3.2-3B-Instruct
    provider_id: bar

The above examples shows the correspondence between inference providers and models registry items. Things work similarly for the safety <=> shields and memory <=> memory_banks pairs.

Registry: This PR also adds a register_model method to Inference (and similar register_shield and register_memory_bank methods to Safety and Memory.) The goal is to inform the provider that a certain model needs to be supported so the provider can make any relevant backend changes if needed (or throw an error if the model cannot be supported.)
Metadata about the registered models, shields and memory banks is maintained by the Llama Stack distribution itself. As of this PR, this is in-memory (since we really aren't advertising dynamic model registration, etc. yet) but it will be persisted soon.
There are other small cleanups included.

Note that the memory bank API has slightly changed which means llama-stack-apps will need concurrent changes.

This PR is taking the form of api_updates_4 -- a lot of changes here in addition to what the title and summary says. Predominantly the following things:

Adds some testing infra for testing providers "quickly" and flexibly
Simplifies the inference providers a lot; adds a openai_compat.py utility -- thanks @russellb and @terrytangyuan for prodding here, but we use it via the raw completions API. This makes prompt conversion (applying llama-specific tweaks) under our control and results in much more reliable tool calling behavior.
Fixes the fact that non-streaming didn't quite work on chat_completion() and other methods due to various hacks everywhere.
Makes the Weaviate memory provider work.

This PR has changed its form again, another rev at the design. It is significantly simpler. The most valuable part: we have what I'd call a basic test infrastructure for "easily" testing lots of providers and provider combos quickly.


hipcc issue with HIP_PLATFORM_NVCC

Hi again,
when I compile example from HIP-Examples/cuda-stream as
hipcc stream.cpp
or
hipcc stream.cpp -D__HIP_PLATFORM_HCC__
everything works well. But when I change it to
hipcc stream.cpp -D__HIP_PLATFORM_NVCC__
I get error message
In file included from stream.cpp:22:
/opt/rocm-3.5.0/hip/include/hip/hip_runtime.h:60:2: error: ("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
#error("Must define exactly one of __HIP_PLATFORM_HCC__ or __HIP_PLATFORM_NVCC__");
My hipcc version is:
HIP version: 3.5.20232-4de4d935
clang version 11.0.0 (/src/external/llvm-project/clang 6c08b900599eee52e12bce1e76b20dc413ce30e7)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm-3.5.0/llvm/bin

Use HIP_PLATFORM=nvcc with hipcc.

Could not get it to compile with HIP_PLATFORM=nvcc had to use HIP_PLATFORM=hcc.

@TomasOberhuber , Sorry for the lack of response. Please try latest ROCm 6.0.2 (HIP 6.0.32831) to see if your issue still exists? If resolved, please close the ticket. Thanks.


Istio 100.0.0 v2 : book demo app deployment fails on SELinux RHEL 8.4 enabled on the clusters

What kind of request is this (question/bug/enhancement/feature request):
Bug
Steps to reproduce (least amount of steps as possible):
SELinux RHEL 8.4 docker-20.10.7, 0.2.rc1-RPM

Create a custom rke1 SELinux RHEL enabled cluster from the dashboard with 3 worker nodes, 1 etcd and 1 cp
Once the clusters are up and active
deploy istio v2 from the dashboard UI -->apps & Marketplace--> istio. Version: 100.0.0
Istio deploys successfully
create a namespace with istio sidecar injection enabled.
create the book demo app. The pods of the app are seen stuck in Updating.

Result:
istio-init container is in crashloopBackoff with the following error:
iptables-restore --noflush /tmp/iptables-rules-1624044808704787141.txt290487748
iptables-save
iptables-restore v1.6.1: iptables-restore: unable to initialize table 'nat'
Error occurred at line: 1
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
panic: exit status 2
goroutine 1 [running]:
istio.io/istio/tools/istio-iptables/pkg/dependencies.(*RealDependencies).RunOrFail(0xd819c0, 0x9739cb, 0x10, 0xc00000cba0, 0x2, 0x2)
	istio.io/istio@/tools/istio-iptables/pkg/dependencies/implementation.go:44 +0x96
istio.io/istio/tools/istio-iptables/pkg/cmd.(*IptablesConfigurator).executeIptablesRestoreCommand(0xc0000efd30, 0x7f31b4f63001, 0x0, 0x0)
	istio.io/istio@/tools/istio-iptables/pkg/cmd/run.go:484 +0x3aa
istio.io/istio/tools/istio-iptables/pkg/cmd.(*IptablesConfigurator).executeCommands(0xc0000efd30)
	istio.io/istio@/tools/istio-iptables/pkg/cmd/run.go:491 +0x45
istio.io/istio/tools/istio-iptables/pkg/cmd.(*IptablesConfigurator).run(0xc0000efd30)
	istio.io/istio@/tools/istio-iptables/pkg/cmd/run.go:438 +0x2507
istio.io/istio/tools/istio-iptables/pkg/cmd.glob..func1(0xd5c740, 0xc0000d2700, 0x0, 0x10)
	istio.io/istio@/tools/istio-iptables/pkg/cmd/root.go:56 +0x14e
github.com/spf13/cobra.(*Command).execute(0xd5c740, 0xc00001e130, 0x10, 0x11, 0xd5c740, 0xc00001e130)
	github.com/spf13/cobra@v0.0.5/command.go:830 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0xd5c740, 0x40574f, 0xc000080058, 0x0)
	github.com/spf13/cobra@v0.0.5/command.go:914 +0x2fb
github.com/spf13/cobra.(*Command).Execute(...)
	github.com/spf13/cobra@v0.0.5/command.go:864
istio.io/istio/tools/istio-iptables/pkg/cmd.Execute()
	istio.io/istio@/tools/istio-iptables/pkg/cmd/root.go:284 +0x2d
main.main()
	istio.io/istio@/tools/istio-iptables/main.go:22 +0x20

Expected Result:
The istio-init container should come up active and the errors should not be seen
Other details that may be helpful:
If we set PSP to unrestricted for SELinux RHEL 8.4 hardened clusters and deploy the book demo app, the app deploys successfully without any errors.
Environment information

Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI):

master-2ca2ad9c602f1d64e30a9ccfe093c6c39aefc728-head

Installation option (single install/HA): Single

Cluster information

Cluster type (Hosted/Infrastructure Provider/Custom/Imported): Node driver
Kubernetes version (use kubectl version):

v1.20.7

Docker version (use docker version):

docker-20.10.7

https://github.com/rancher/rancher/issues/33285

I tested this with v2.6.2, a single all role node custom cluster running RHEL 8.4 (ami-0277fbe7afa8a33a6) and Kubernetes v1.21.6-rancher1-1 and it worked as expected with rancher-istio:100.0.2+up1.10.4 and SELinux enforcing, my steps:
Without PSP:

Provision a Rancher v2.6.2 instance and a single all role node customer cluster running RHEL 8.4, with PSP enabled and set to restricted by default (be sure to run systemctl disable nm-cloud-setup.service nm-cloud-setup.timer on the RHEL host before adding it to the cluster per https://github.com/rancher/rke2/issues/1053#issuecomment-848061376).
Set PSP on default Project to unrestricted
Install rancher-istio:100.0.2+up1.10.4 with Pilot and Ingress Gateway
Deploy bookinfo app successfully https://istio.io/v1.10/docs/examples/bookinfo/#start-the-application-services

With PSP:

Remove bookinfo app deployed above
Upgrade rancher-istio chart to add CNI component
Set PSP on default Project to restricted
Deploy bookinfo app successfully https://istio.io/v1.10/docs/examples/bookinfo/#start-the-application-services

@samkulkarni20 Can we have the QA team help validate if this is still an issue esp based on Alex's feedback?

With reference to the steps mentioned by @axeal, the issue is working as expected on rancher 2.6.2 and 2.6-head.
Setup Configuration:
Rancher server:

Installation option : Docker
Provider: ec2 single node.

Information about the Cluster:

Kubernetes version: v1.21.6-rancher-1-2
Cluster Type : Single node Custom Cluster with 1 etcd, 1cp, 1 worker nodes. OS: RHEL-8.4 SElinux on, dockerversion: 20.10.7

Steps to reproduce without PSP :

Create rancher server
Create a single node custom cluster with all the roles running RHEL-8.4 with PSP enabled and set to restricted by default (Run systemctl disable nm-cloud-setup.service nm-cloud-setup.timer on the RHEL host before adding it to the cluster).
Set PSP on default project to unrestricted.
Install istio version 100.0.2+up1.10.4,
Create a namespace in default project and enable istio auto injection.
Deploy demo book app

Result:

The book demo app is deployed successfully.

Steps to reproduce with PSP :

Create rancher server
Create a single node custom cluster with all the roles running RHEL-8.4 with PSP enabled and set to restricted by default. (Run systemctl disable nm-cloud-setup.service nm-cloud-setup.timer on the RHEL host before adding it to the cluster).
Set PSP on default project to restricted.
Install istio version 100.0.2+up1.10.4,
Create a namespace in default project and enable istio auto injection.
Deploy demo book app

Result:

The book demo app is deployed.

The app is also getting deployed successfully on rancher 2.6-head with istio 100.1.0+up1.11.4 following the same steps mentioned above.
cc: @samkulkarni20

Validated the issue again. Validation indicates the results are inconsistent.
Setup Configuration:
Rancher server: v2.6.2

Installation option : Docker
Provider: ec2 single node.

Information about the Cluster:

Kubernetes version: v1.21.7-rancher-1-1
Cluster Type : Single node Custom Cluster with etcd, cp, and worker nodes.
OS: RHEL-8.4 SElinux on, dockerversion: 20.10.7

Steps to reproduce without PSP :

Create rancher server
Create a single node custom cluster with all the roles running RHEL-8.4 with PSP enabled and set to restricted by default (Run systemctl disable nm-cloud-setup.service nm-cloud-setup.timer on the RHEL host before adding it to the cluster).
Set PSP on default project to unrestricted.
Install istio version 100.0.2+up1.10.4,
Create a namespace in default project and enable istio auto injection.
Deploy demo book app

Result:
istio-init container is in crashloopBackoff with the same error as Anupama observed.

Validated this issue on SELinux RHEL 8.4 docker-20.10.7
Steps followed to validate the issue
On rancher v2.6-head

Create a custom rke1 SELinux RHEL enabled cluster from the dashboard with 2 worker nodes, 1 etcd and 1 cp. with PSP enabled and set to restricted by default.
Once the clusters are up and active
Set PSP on default project to unrestricted.
Deploy monitoring and Istio v2 from the dashboard UI --> Apps & Marketplace--> Istio. Version: 100.1.0+up1.11.4
Istio deploys successfully
Create a namespace with Istio sidecar injection enabled.
Deploy the book demo app. Demo book app deploys successfully.

However, the app was not accessible on worker-node-ip:31380/productpage
For validation with PSP on.

Remove bookinfo app deployed above
Upgrade rancher-istio chart to add CNI component.

Istio upgrade failed with following errors.
Back-off restarting failed container
Container image "rancher/mirrored-istio-install-cni:1.11.4" already present on machine
Could not proceed to deploy demo book app.

I tested this with v2.6.2, a single all role node custom cluster running RHEL 8.4 (ami-0277fbe7afa8a33a6) and Kubernetes v1.21.6-rancher1-1 and it worked as expected with rancher-istio:100.0.2+up1.10.4 and SELinux enforcing, my steps:
Without PSP:

Provision a Rancher v2.6.2 instance and a single all role node customer cluster running RHEL 8.4, with PSP enabled and set to restricted by default (be sure to run systemctl disable nm-cloud-setup.service nm-cloud-setup.timer on the RHEL host before adding it to the cluster per Pod communication not working on RHEL 8.4 on cloud providers rke2#1053 (comment)).
Set PSP on default Project to unrestricted
Install rancher-istio:100.0.2+up1.10.4 with Pilot and Ingress Gateway
Deploy bookinfo app successfully https://istio.io/v1.10/docs/examples/bookinfo/#start-the-application-services

With PSP:

Remove bookinfo app deployed above
Upgrade rancher-istio chart to add CNI component
Set PSP on default Project to restricted
Deploy bookinfo app successfully https://istio.io/v1.10/docs/examples/bookinfo/#start-the-application-services

For the 1st scenario above, Istio installation works consistently using the latest Rancher-Istio chart (upstream v1.11.4).
The 2nd scenario fails though, since istio install/upgrade with CNI enabled fails with below error:
Error: failed to create UDS listener: failed to listen on unix socket "/var/run/istio-cni/log.sock": listen unix /var/run/istio-cni/log.sock: bind: permission denied

The above issue is caused due to the hostPath volume mounted on the CNI daemonset at location /var/run/istio-cni. This hostPath directory is not having the correct SELinux context type set on it (container_var_run_t) during it's creation.
[root@ip-172-31-47-40 ec2-user]# ls -Z /host/var/run/
system_u:object_r:container_var_run_t:s0 istio-cni

The required context type is container_file_t for CNI pod to be able to write to it.
A possible solution is to run below command on each cluster node before creating the cluster.
mkdir -p /var/run/istio-cni && semanage fcontext -a -t container_file_t /var/run/istio-cni && restorecon -v /var/run/istio-cni

Note: Istio has a change in their master branch which enables setting env variable LOG_UDS_ADDRESS to emptyString. With that the UDS logging feature is disabled. Although the change isn't released in any of the release versions yet. Without this fix, CNI installer ignores the empty env vars.
CC: @axeal @brendarearden @doflamingo721

@samkulkarni20 we could add the temporary work around to https://github.com/rancher/charts/blob/dev-v2.6/packages/rancher-istio/rancher-istio/charts/app-readme.md in the Known Issues section.

Setup Configuration:
Rancher server v2.6-head:

Installation option : Docker
Provider: ec2 single node.

Information about the Cluster:

Kubernetes version: v1.21.9-rancher-1-1
Cluster Type : Single node Custom Cluster with 1 etcd, 1cp, 1 worker nodes. OS: RHEL-8.4 SElinux on, dockerversion: 20.10.7

Steps to reproduce without PSP :

Create rancher server
Create a single node custom cluster with all the roles running RHEL-8.4 with PSP enabled and set to restricted by default
Run following commands on the instance before adding it to the cluster

systemctl disable nm-cloud-setup.service nm-cloud-setup.timer

mkdir -p /var/run/istio-cni && semanage fcontext -a -t container_file_t /var/run/istio-cni && restorecon -v /var/run/istio-cni

Set PSP on default project to unrestricted.
Install istio version 100.1.1+up1.11.4
Create a namespace in default project and enable istio auto injection.
Deploy demo book app

Result:

The book demo app is deployed successfully.

Steps to reproduce with PSP :

Create rancher server
Create a single node custom cluster with all the roles running RHEL-8.4 with PSP enabled and set to restricted by default. (Run systemctl disable nm-cloud-setup.service nm-cloud-setup.timer on the RHEL host before adding it to the cluster).
Set PSP on default project to restricted.
Install istio version 100.1.1+up1.11.4
Create a namespace in default project and enable istio auto injection.
Deploy demo book app

Result:
- The book demo app is deployed and accessible.
The app is also getting deployed successfully on rancher 2.6-head with istio 100.1.1+up1.11.4 following the same steps mentioned above.

Our team encountered a similar issue that had the same core error message -- iptables-restore v1.6.1: iptables-restore: unable to initialize table 'nat'.  Posting some info here in case anyone finds this issue while searching for this error message.
We encountered the error message when deploying Kubeflow v1.3.1 and v1.4.1 through its manifests deployment method, which injects Istio sidecars. Our target environment is a downstream Kubernetes v1.21.9-rancher1-1 cluster that is deployed by Rancher v2.6.3-patch1. Each node in our cluster has AlmaLinux 8.5 (one of the CentOS 8 derivatives) as its OS. SELinux and firewalld are both disabled on our nodes.
We found a solution in the comments on related issue https://github.com/istio/istio/issues/23009. The answer was to ensure that a set of specific kernel modules is loaded. For more details, see my reply on the other issue: https://github.com/istio/istio/issues/23009#issuecomment-1049166026


mongoKeys can also used in before update/patch/remove

Glad to see the new mongoKeys hook. That is what I always need since I transfered from mongoose to vanilla mongodb.
I will try using it to see if it can be improved. But at the first glance I can figure out that this hook can also be used before update/patch/remove. These three methods can also have context.params.query when context.id === null, and they do the exactly same thing as find does.

Good point. Thank you.


attempt to make external parameter types optional

PR #379 merged in support for civil time types. This added a dependency.
To try to make dependencies optional, try to remove tdsBuffer from the param type. This would allow importing optional packages to register these external types.

Is there an update on this? I'm having issues with the civil package that is a major blocker for me.


Try to improve resolution by adding a bit context

This is an attempt to improve on #670. However, there are some trade-offs as can be seen in the modified test.
Another thing is that the error messages are really bad now if something cannot be found.

Currently, there is an issue where in bytearray we have
def resize(source: ByteArray, size: Int): ByteArray = {
  val target = allocate(size)
  val n = min(source.size, target.size)
  def go(i: Int): ByteArray =
    if (i < n) {
      target.unsafeSet(i, source.unsafeGet(i))
      go(i + 1)
    } else {
      target
    }
  go(0)
}

There the parameter size (a value) shadows the selector .size.

Would specialising on arity help there? If there's something like foo.bar, then perhaps it's more likely to be field access than a method/UFCS'd function?

In 4982b9c, I was able to improve the precision a bit further and revert some changes to tests.
The strategy is now to first try the respective function / operation lookup and if this fails completely then also try the other... you never know ;)

Maybe the special casing of error messages is useless, but I'll merge this so that we can have this in the next release.


TS-5067 Fix required action for http2.enabled config

I know this config is dead in 7.0.x and master already. It could be a nice-to-have fix for 6.2.x LTS.

[approve ci]

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/Github-FreeBSD/1230/ for details.

Linux build successful! See https://ci.trafficserver.apache.org/job/Github-Linux/1124/ for details.


Sugestion for RPi Mongo users

Is it possible to integrate Firebase or mlab for the bot database?
i use an Raspbery Pi for the bot and mongo is not very Pi friendly. I understand that a cloud db can slow down but maybe it would eliminate the connection errors from using mongo on the pi. the implementation seems pretty straightforward:
// Set the configuration for your app
  // TODO: Replace with your project's config object
  var config = {
    apiKey: "apiKey",
    authDomain: "projectId.firebaseapp.com",
    databaseURL: "https://databaseName.firebaseio.com",
    storageBucket: "bucket.appspot.com"
  };
  firebase.initializeApp(config);

  // Get a reference to the database service
  var database = firebase.database();

for mlab they provide the mongodb:// URI to connect, it's even simpler, just some minor changes in boot.js... one more if?!

this duplicates #234 somewhat


[17.03] Patch go connections

This is a cherry pick of the following 2 PRs:

https://github.com/moby/moby/pull/33182
https://github.com/moby/moby/pull/31977 (picked from the 17.04 one because the diff was smaller)

Cherry picks were not clean, but was a pretty easy resolution.

We'll be ignoring multi-arch failures since the Debian Jessie repositories for extended architectures has been deprecated.

LGTM

CI failures are related to this branch being super old, manually verified that this branch can build.


Laravel test DI issue

Hi. When I'm trying to do same DI as described in documentation for Laravel testing.$bot = app(Nutgram::class); I'm getting this error.

What could be the reason of it?

Please reopen the issue following the issue template. If you are using Laravel, make sure to read the laravel package documentation first https://nutgram.dev/docs/configuration/laravel


[SPARK-11453][SQL][follow-up] remove DecimalLit

A cleanup for https://github.com/apache/spark/pull/9085.
The DecimalLit is very similar to FloatLit, we can just keep one of them.
Also added low level unit test at SqlParserSuite

cc @adrian-wang @liancheng

Merged build triggered.

Merged build started.

Test build #45081 has started for PR 9482 at commit 4b75c3e.

Test build #45081 has finished for PR 9482 at commit 4b75c3e.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

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

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #45088 has started for PR 9482 at commit 683c522.

maybe it would be better to keep DecimalLit, rather than FloatLit.

Test build #45088 has finished for PR 9482 at commit 683c522.

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

Merged build finished. Test PASSed.

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

I don't  have a strong preference here, @yhuai  what do you think?

DecimalLit sounds better to keep than FloatLit.

Merged build triggered.

Merged build started.

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

Merged build finished. Test FAILed.

Test build #1995 has started for PR 9482 at commit ed981d2.

Test build #1995 has finished for PR 9482 at commit ed981d2.

This patch fails Scala style tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build triggered.

Merged build started.

Test build #45196 has started for PR 9482 at commit 3d583cd.

Test build #45196 has finished for PR 9482 at commit 3d583cd.

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

Merged build finished. Test PASSed.

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

Thanks - I've merged this.

Did you have the wrong jira ticket?

ah sorry, I was working on multiple PRs and messed up the jira number...


Creating ** method in BigDecimal and BigRational

Resolves #7680
Adds ** method to BigRational and BigDecimal

Tests please :)

Doc comments would be nice as well.

Thanks @ananagame for implementing this. The current implementation creates an Array, potentially a big one. An iterative implementation would be faster and stress less the GC. If you are able to implement it that way it would be great. Thanks!

Sure @bcardiff

require "big"
include Math

LN2 = Math.log(2)

def xx(n)
     puts 2 * LN2.to_big_d  ** (n + 1)     # new implementation of ** method
     puts 2 * LN2.to_big_f  ** (n + 1)     # not as much precision with BigFloat
end

xx(2)

And here are the results:
0.666049303977858932290481832092188441370295065354 # BigDecimal
0.666049303977858892586                            # BigFloat

Implementation in this PR is too naive, please look for instance how's Int#** implemented.

Sure, I'll work on it. Sorry for that!

Maybe I'm just not understanding something, but I was looking at the code for implementing ** and I don't see how it's correct. This is the code from https://en.wikipedia.org/wiki/Exponentiation_by_squaring
Modified to mimic committed code variables names. (Tested all versions in Ruby)
def power(x, exponent)
  result = 1
  while exponent > 0
    (result *= x; exponent -= 1) if exponent.odd?
    x *= x
    exponent >>= 1
  end
  result
end

I ran the committed code and it doesn't produce expected results.
How is that version correct?

You're right I forgot a condition in the code

Tests please! :)

Here are the tests
require "big"
include Math

LN2 = Math.log(2)

def xx(n)
  puts 2 * LN2.to_big_d ** (n + 1) # new implementation of ** method
  puts 2 * LN2.to_big_f ** (n + 1) # not as much precision with BigFloat

  puts 2.to_big_d ** 10 # 2 to the power 10 using big decimal method
  puts 2 ** 10 # 2 to the power 10 using int method
end

xx(2)

Result
0.666049303977858932290481832092188441370295065354
0.666049303977858892586
1024
1024

I meant unit tests.

This is for my enlightenment.
Is there a performance reason for writing the code like this
result *= x if exponent & 0b1 != 0
exponent = exponent >> 1

versus
result *= x if exponent.odd?
exponent >>= 1

since the later is more concise and, IMHO, more idiomatic and human understandable?

@ananagame What's the reason for closing?

I don't think that I have the skills to complete a good PR


chore!: adjust privacy

A collection of small changes that generally fall into "remove x from the public API":

Remove the with_can_connect, with_leadership, and with_unit_status convenience methods from State.
Make next_action_id, next_storage_index, and next_notice_id private.
Removes Context.output_state.
Makes all the *_SUFFIX constants private.
Makes all the *_EVENTS constants private, except META_EVENTS, which is removed.
Moves DEFAULT_JUJU_DATABAG to be a class attribute of RelationBase.
Makes capture_events private (and consolidates capture_events.py into runtime.py).
Makes both hook_tool_output_fmt methods private.
Makes normalize_name private.

To resolve:

[ ] Custom exceptions
[ ] Best way to hide consistency_checker
[ ] DEFAULT_JUJU_VERSION - just get rid of it?
[ ] scenario.types?
[ ] DEFAULT_JUJU_DATABAG private or not?

Fixes #175.

Talked in person about these:

[ ]  Custom exceptions

Keep them, move them to scenario.errors.

[ ]  Best way to hide consistency_checker

Make the module name _consistency_checker.py, leave the privacy of the methods inside of it alone.

[ ]  DEFAULT_JUJU_VERSION - just get rid of it?

Or make it _DEFAULT_JUJU_VERSION.

[ ]  scenario.types?

Avoid this, try to minimise the number but put them at the top so that we don't repeat the from typing import pattern, which we don't like.

[ ]  DEFAULT_JUJU_DATABAG private or not?

Yes, make it private (maybe move it back where it was to minimise churn). The use-case I had in mind was someone wanting to say "use this different databag as the default" but you can just have a constant in your own charm test code and pass it in each time, and if we do want to let people set the default, it would be better if we designed a proper API around that.
Also discussed next_relation_id. We'd like to remove this - there are some use cases, but it's currently only used in 2.5 charms that I can find (mysql-router, mysql-router-k8s, spark-history-server-k8s), and at the end of the day it's just a convenience - there are other ways to do it.
(The simplest way is next_relation_id = Relation("name of some relation that exists in meta but doesn't matter which one").id - but there are other Pythonic ways to do this too).

@PietroPasotti are you good with the changes here?


queue_schema.rb dissapears after rails db:migrate:reset

Hi, I added solid queue configuration for my development environment and after running rails db:migrate:reset command (or manually running db:drop db:create db:migrate) file queue_schema.rb is empty.
I have following configurations:

database.yml:

development:
  primary:
    <<: *default
    database: app_development
  queue:
    <<: *default
    database: app_development_queue
    migrations_paths: db/queue_migrate

development.rb:

  config.active_job.queue_adapter = :solid_queue
  config.solid_queue.connects_to = { database: { writing: :queue } }

When I run db:drop and then db:prepare it works fine.

Hey @konradperlowski, I think it might be due to this bug in Rails https://github.com/rails/rails/issues/52829. It's already been fixed, but perhaps you're on a previous version.

I tried this on rails 7.2.1 and 8.0.0.beta1 and it cleared queue_schema.rb file

I think that change might not have been released in any of those. Could you try Rails edge instead?

It still happens on edge, but it works correctly with sqllite (not sure about previous rails versions) - it does not work with psql

Huh, that's really strange. This shouldn't depend on the DBMS you're using. Maybe add a comment to that original Rails issue?

No, my bad - it does not work with sqlite :sweat_smile:

Hey @konradperlowski, do you still have solid_queue migrations in db/migrate?
I had the same. Deleted all the solid_queue migrations and then run the commands and now i only get some formatting but the content stays in queue_schema.rb

Hey @konradperlowski, do you still have solid_queue migrations in db/migrate?
I had the same. Deleted all the solid_queue migrations and then run the commands and now i only get some formatting but the content stays in queue_schema.rb

No, I don't have any solid queue related migrations in db/migrate. I believe this pr will fix this issue, so I wait for this to be merged into rails main, then I will test this again and hopefully close this issue

FYI this still problem still exists on Rails 8.0.0@fa35b70a5f6863104856f25641026fc4d449b449

Using current rails main (after merging this pr) I cannot reproduce this issue anymore

Problem still exists on Ruby 3.3.4, Rails 8.0.0 and solid_queue 1.0.1.
After command bin/rails db:migrate:reset.
Maybe I am wrong, and it should work like that?


porb does not affect SoC

The "porb" signal from the power-on-reset circuit is input to housekeeping only;  it does not affect operation of the SoC or any other circuit on the chip at all.  This is caused by the direct derivation of the architecture from the sky130 version, where all pads have a power-on-reset input and this gates the operation of the reset pin which in turn gates operation of the SoC.  The GF version has no power-on-reset input to the pads, so the SoC needs to be gated by "porb" directly.
Solution is in pull request #78, which is to make "porb" an input to the SoC, specifically to the caravel_clocking block, which combines it with the reset pin and the manual reset signal from the housekeeping SPI.

This is a duplicate of #76.


Add slice feature to select_columns

Brief Description
I love the select_columns method. It is powerful, especially the glob style name selection (beautiful!). I wonder if it is possible to add slice option, or if it is just unnecessary.
Example API
Currently, you pass the selection to a list:

# current implementation
df = pd.DataFrame(...).select_columns(['a', 'b',  'c', 'col_*'], invert=True)

I think it would be nice if we could do this:
# proposed addition
df = pd.DataFrame(...).select_columns(['a': 'c', 'col_*'], invert=True)

Probably similar to what you do with np.r_  (which is only for indices)

Mmmm this is a neat idea! What might the implementation look like, @samukweku?

@ericmjl ; apologies; wanted to see how pandas implements the slice feature for loc; waded through the indexing.py file to see if i could decipher it; no luck. Exciting that I still have lots to learn about deciphering code and how some things work in Pandas.
Below is something that could work; I guess the actual implementation will have some more checks and also ensuring order of selection is respected (if  slice comes before single columns, then values in the slice should come first):
from fnmatch import translate
import re
from itertools import chain

def select_columns(df, search_column_names, invert=False):
    """Method-chainable selection of columns.

    This method does not mutate the original DataFrame.

    Optional ability to invert selection of columns available as well.

    Method-chaining example:

    .. code-block:: python

        df = pd.DataFrame(...).select_columns(['a', 'b', 'col_*'], invert=True)

    :param df: A pandas DataFrame.
    :param search_column_names: A list of column names or search strings to be
        used to select. Valid inputs include:
        1) an exact column name to look for
        2) a shell-style glob string (e.g., `*_thing_*`)
    :param invert: Whether or not to invert the selection.
        This will result in selection of the complement of the columns
        provided.
    :returns: A pandas DataFrame with the specified columns selected.
    :raises TypeError: if input is not passed as a list.
    :raises NameError: if one or more of the specified column names or
        search strings are not found in DataFrame columns.
    """
    if not isinstance(search_column_names, list):
        raise TypeError("Column name(s) or search string(s) must be passed as list")

   # section for slice feature
    vals = [
        df.columns[range(*df.columns.slice_locs(*entry.split(":")))]
        for entry in search_column_names
        if ":" in entry
    ]
    search_column_names = [entry for entry in search_column_names if ":" not in entry]
    vals = chain.from_iterable(vals)
    search_column_names.extend(vals)    # slice feature ends here

    wildcards = {col for col in search_column_names if "*" in col}
    non_wildcards = set(search_column_names) - wildcards

    if not non_wildcards.issubset(df.columns):
        nonexistent_column_names = non_wildcards.difference(df.columns)
        raise NameError(f"{list(nonexistent_column_names)} missing from DataFrame")

    missing_wildcards = []
    full_column_list = []

    for col in search_column_names:
        search_string = translate(col)
        columns = [col for col in df if re.match(search_string, col)]
        if len(columns) == 0:
            missing_wildcards.append(col)
        else:
            full_column_list.extend(columns)

    if len(missing_wildcards) > 0:
        raise NameError(f"Search string(s) {missing_wildcards} not found in DataFrame")

    return df.drop(columns=full_column_list) if invert else df[full_column_list]

example data:

starwars:
name	height	mass	hair_color	skin_color	eye_color	birth_year	gender	homeworld	species
0	Luke Skywalker	172.0	77	blond	fair	blue	19BBY	male	Tatooine	Human
1	C-3PO	167.0	75	NaN	gold	yellow	112BBY	NaN	Tatooine	Droid
2	R2-D2	96.0	32	NaN	white, blue	red	33BBY	NaN	Naboo	Droid
3	Darth Vader	202.0	136	none	white	yellow	41.9BBY	male	Tatooine	Human
4	Leia Organa	150.0	49	brown	light	brown	19BBY	female	Alderaan	Human
5	Owen Lars	178.0	120	brown, grey	light	blue	52BBY	male	Tatooine	Human
6	Beru Whitesun lars	165.0	75	brown	light	blue	47BBY	female	Tatooine	Human
7	R5-D4	97.0	32	NaN	white, red	red	NaN	NaN	Tatooine	Droid
8	Biggs Darklighter	183.0	84	black	light	brown	24BBY	male	Tatooine	Human
9	Obi-Wan Kenobi	182.0	77	auburn, white	fair	blue-gray	57BBY	male	Stewjon	Human

result with a slice inserted
select_columns(starwars, ["height:skin_color", "name", "b*"])

name	birth_year	height	mass	hair_color	skin_color
0	Luke Skywalker	19BBY	172.0	77	blond	fair
1	C-3PO	112BBY	167.0	75	NaN	gold
2	R2-D2	33BBY	96.0	32	NaN	white, blue
3	Darth Vader	41.9BBY	202.0	136	none	white
4	Leia Organa	19BBY	150.0	49	brown	light
5	Owen Lars	52BBY	178.0	120	brown, grey	light
6	Beru Whitesun lars	47BBY	165.0	75	brown	light
7	R5-D4	NaN	97.0	32	NaN	white, red
8	Biggs Darklighter	24BBY	183.0	84	black	light
9	Obi-Wan Kenobi	57BBY	182.0	77	auburn, white	fair

As a side note, is it possible to maybe allow a string or a string slice without using a list?


command traefik error: failed to download plugin github.com/BetterCorp/cloudflarewarp: error: 500

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?
Other Refs:  https://github.com/traefik/traefik/issues/7358 - https://github.com/darkweak/souin/issues/209 - https://community.traefik.io/t/downloading-plugins-fails-with-client-timeout/8896
Spinning up an instance of traefik, with config and all defined as would be production:
https://github.com/BetterCorp/cloudflarewarp/actions/runs/2782040700
https://github.com/BetterCorp/cloudflarewarp/actions/runs/2783000196
What did you see instead?
command traefik error: failed to download plugin github.com/BetterCorp/cloudflarewarp: error: 500
Ref:  https://github.com/BetterCorp/cloudflarewarp/issues/12
What version of Traefik are you using?
2.8 - traefik:latest
What is your environment & configuration?
https://github.com/BetterCorp/cloudflarewarp/blob/master/test/traefik-prod.toml
https://github.com/BetterCorp/cloudflarewarp/blob/master/test/traefik-compose-prod.toml
If applicable, please paste the log output in DEBUG level
No response

I need to specifically note the following:
github connection works from the containers (local and on github)
git clone from inside the container works no issues.
Specifically referencing v1.0.0 of the related plugin : works
But the latest 2.1.0 fails.
This seems to be a caching/storage issue on traefiks repo store/proxy.
If the connection to github.com was direct, then the plugin store should be working fine.
However, if it goes through a proxy hosted/managed by Traefik, that proxy could be erroring out.
I am not sure where the specific code is for pulling down plugins, so was unable to further debug.

Hello,

This seems to be a caching/storage issue on traefiks repo store/proxy.

The plugins service doesn't cache or store data, we just download sources from the release section of GitHub

Some plugins work, some plugins don't, I am not specifically sure the details for the why.
To replicate (as mentioned in a few related that this was an issue): have docker on your machine, and pull down the https://github.com/BetterCorp/cloudflarewarp repo.
cd test/
And run test-prod.sh.
This should allow you to replicate any or specific issues/plugins.

@ldez Hey again haha

The plugins service doesn't cache or store data, we just download sources from the release section of GitHub

Mmmm, I wonder what could cause it then.
Might be some sillyness on github then.
Will do a bit of research with this info and comment if I get anywhere :)

[stderr] {"level":"error","module_name":"github.com/BetterCorp/cloudflarewarp","module_version":"v2.1.0","error":"error: 404: 404 Not Found: not found<EMAIL_ADDRESS>invalid version: module contains a go.mod file, so module path must match major version (\"github.com/BetterCorp/cloudflarewarp/v2\")","message":"Failed to get module file"}

What I recommend:

remove v2.0.0 and v2.1.0 tags
creates something like v1.1.0 and v1.2.0

If you agree I will clean our database.

Oooooooh interesting!
Learn't something new about go versioning today
Roger, think this is the best path to take :)
Releases and tags nuked, will just clear and refresh the project
Thanks!

Shot! Starting from v1.3.0 which hasn't existed.... thought would be better anyway

In theory, you also have to add the retracted tags to the go.mod file:
https://go.dev/ref/mod#go-mod-file-retract
It's just informative but it can be useful.

{
  "level": "error",
  "module_name": "github.com/BetterCorp/cloudflarewarp",
  "module_version": "v2.1.0",
  "error": "error: 404: 404 Not Found: not found<EMAIL_ADDRESS>invalid version: module contains a go.mod file, so module path must match major version (\"github.com/BetterCorp/cloudflarewarp/v2\")",
  "message": "Failed to get module file"
}

basically, our service is a custom Go proxy, so you have to follow the same rules

Just to confirm, this error is just adding the project as a go module reference and trying to import it?

In theory, you also have to add the retracted tags to the go.mod file: https://go.dev/ref/mod#go-mod-file-retract
It's just informative but it can be useful.

Awesome shot!
Added as well for the versions that existed.

I cleaned our database, the scan will happen around 4:00pm (UTC)

I will preshot the problem: yes your plugin is not detected, I will investigate.

I found the problem: we filter the repository on language (go) but you put too many scripts in your repository so now the main language of your plugin is bash.

Whaaaa oh good lord that is funny!
... I have written a ton of tests ....
Let me see what I can do to minimize the amount of bash scripts :)

Okay,  updated now and hid the bash code from the linguistic stats

Thanks again @ldez !
We're all good this side :)


Add @glint-nocheck directive.

This adds a @glint-nocheck directive, similar to @ts-nocheck in .ts files, that will cause Glint to ignore a template completely and not transform it to TypeScript (or even add the boilerplate). While include already provides a way to only check specified templates, workflows like lint-to-the-future use file-based ignores. This provides a quick way to opt-out individual templates from type-checking that is easily discoverable by readers of the template.

@dfreeman that's a really good point! I've change it to basically be a global @glint-ignore.

We should also add docs for all of the @glint-* directives

That's the next thing I was planning to work on! 🙂


RATIS-1274. Close DataStreamClient when close RaftClient

What changes were proposed in this pull request?
When create dataStreamApi in RaftClientImpl, we need to create DataStreamClient, so we need to  close DataStreamClient when close RaftClient.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/RATIS-1274
How was this patch tested?
no need new ut

@szetszwo Thanks for review. Because CI passed, so I merge the patch.


Maintainers needed!

Looks like the community likes this project. I switched to Linux about a year ago, so I can't really work on this project anymore since I don't have a windows machine.
I'm looking for maintainers for this project who use windows and know python. You can also improve the readme and the docs, since the ones I made are terrible.
Thanks,
N3RDIUM.

Not sure if this issue is still monitored but I've made a PR if that helps. It's quite small and should yield very minor performance gains. Not looking to be a maintainer but that was what I was able to contribute.

Thank you for your interest in my little project. Since I see that some people are using it, I will start working on it soon. I'll have to get a Windows VM workflow going, as I switched to endeavouros (it's simply too good). I will start maintaining after 13th March.
Thanks again,
N3RDIUM.

I'll be.


Documentation for 1.0

Upon release of a stable version of Machine, we will add some docs to https://docs.docker.com/.
This should be things like:

Installation
Getting started
Documentation for specific drivers
CLI documentation

Closing as we have the docs in the repo now and are being generated / updated.


pluginlib: 1.10.3-0 in 'indigo/distribution.yaml' [bloom]

Increasing version of package(s) in repository pluginlib to 1.10.3-0:

upstream repository: https://github.com/ros/pluginlib
release repository: https://github.com/ros-gbp/pluginlib-release.git
distro file: indigo/distribution.yaml
bloom version: 0.5.21
previous version for package: 1.10.2-0

pluginlib
* Merge pull request #40 <https://github.com/ros/pluginlib/issues/40> from ros/fix_warnings
  fix deprecated warnings in unit tests
* fix deprecated warnings in unit tests
* removed merge messages and redundant commits
* Contributors: Mikael Arguedas

Please wait for synchronized release.


MUI's Select component's label has some alignment issues when used statically

Describe the issue:

Oxygen UI doesn't use MUI's default animated label styles, rather prefers static labels.
However, there seems to be an issue when wrapping the Select component.

How to reproduce:

Use the Select component with a label.

Expected behavior:

Static label should appear on top of the Select dropdon.
Environment information (Please complete the following information; remove  any unnecessary fields) :

Affected Package: @oxygen-ui/react
Library Version: 1.5.1
OS: Mac
Browser: Google Chrome

Temp Workaround: https://github.com/wso2/oxygen-ui/pull/172


Unable to authenticate

I run Silverbullet behind a NGINX reverse proxy that provides SSL + authentication.  I use firefox on all my systems (latest release, 123.0.1 )

Open firefox and open "notes.mydomain.com", enter authentication in pop-up browser window
use Sulverbullet just fine
Close browser (which will clear authentication)
Open browser again and open "notes.mydomain.com" again, authentication popup doesn't appear
In dev console i see all referenced files are 401 unauthorized (which is correct since i didn't authorized...)

Works fine in Chrome, but that's not the point. In my experience this issue could be caused by cached files on the client, which seems to be the issue. Usually tough, at the first request the browser auth windows is displayed, not in this case.
I can provide access to my server if needed to repeat the issue (but in private, ofc).

As an added note, this happens also from Firefox mobile sometimes.
(i please ask not to reply "just use chrome" :) )

It's the same issue reported here:
Firefox bug report

More info: i totaly deleted my firefox session and started from a fresh one and the issue persist

So without trying to replicate your setup, in the referenced commit I'm now checking for the 401 status and reloading the page as a result. I'm not sure this will actually help, but I'm not sure what else to do. Many auth layers will send a redirect header to the auth page, which SB will follow (SB's native authentication does this as well as authelia). But in case of a 401... not sure what it should do. I could show an alert, but... what then?
You can try this out on the edge builds: https://community.silverbullet.md/t/living-on-the-edge-builds/27

That might work i guess, but since i am on bare metal i cannot test a docker build right away, maybe you can share a ubild or i will wait until the commit makes to releases

AFAIK you can use: zefhemel/silverbullet:edge (https://community.silverbullet.md/t/living-on-the-edge-builds/27)

I've just updated the linked instructions for edge (https://community.silverbullet.md/t/living-on-the-edge-builds/27) to also include how to run this with straight Deno without using Docker.

things have improved, it might be fixed but i need some more time to test.


add operation id to documentation

I added this field to be able to personalized methods of the sdks generated with swagger-codegen and zf-apigility-documentation-swagger.

Note: depends on zfcampus/zf-apigility-admin#393

This repository has been closed and moved to laminas-api-tools/api-tools-documentation; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-documentation/issues/1.

This repository has been moved to laminas-api-tools/api-tools-documentation. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:

Squash all commits in your branch (git rebase -i origin/{branch})
Make a note of all changed files (`git diff --name-only origin/{branch}...HEAD
Run the laminas/laminas-migration tool on the code.
Clone laminas-api-tools/api-tools-documentation to another directory.
Copy the files from the second bullet point to the clone of laminas-api-tools/api-tools-documentation.
In your clone of laminas-api-tools/api-tools-documentation, commit the files, push to your fork, and open the new PR.
We will be providing tooling via laminas/laminas-migration soon to help  automate the process.


Register package

@JuliaRegistrator register()

Registration pull request created: JuliaRegistries/General/86146
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:
git tag -a v0.1.0 -m "<description of version>" 169bd1b4af4bd45ec60240e3f5ef44004ed2dd87
git push origin v0.1.0


Added test case demonstrating how to get term positions out of the index

Helping @cmacdonald on this...

hey @zeynepakkalyoncu I've merged, but you should still take a look - we might want to expose this from Python.


Incorrect datetime format during bulk insert

Laravel Version: 9.14.1
PHP Version: 8.1.2
Database Driver & Version: 8.0.26 - MySQL Community Server - GPL

Description:
When doing bulk insert through Model::insert($array), the timestamps are formatted incorrectly and I'm getting this error:
'SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2022-05-30T05:39:13.573151Z' for column 'created_at' at row 1 (SQL: insert into payment_items (name, created_at, updated_at) values (First item, 2022-05-30T05:39:13.573151Z, 2022-05-30T05:39:24.084337Z))'
I feel like it also ignores protected $dateFormat = 'Y-m-d H:i:s.u'; property, what's set in my model.
I think the problem occured in later updates of Laravel 9, because I don't think I had issues with it when Laravel 9 came out. Unless there's other problem what causes it and I missed it.
Steps To Reproduce:
Because I've tried this in fresh installation of Laravel to make sure it's not issue in my application, you can reproduce it pretty easily in any model what contains any timestamp column:
$items = collect();

$pi = new PaymentItem;
$pi->name = "First item";
$pi->created_at = \Carbon\Carbon::now();
$pi->updated_at = \Carbon\Carbon::now();

PaymentItem::insert($items->toArray());

8.0.26 - MySQL Community Server - GPL

We don't support this database driver, sorry. Please try one which we do: https://laravel.com/docs/9.x/database#introduction

MySQL is supported, so you mean like version 8? Because in the docs is 5.7+.

Ah sorry, I misread this. Y-m-d H:i:s.u isn't a valid timestamp value in MySQL. Y-m-d H:i:s is.

Interesting, because I'm using that timestamp value without any issues. Anyway still getting the same error:

That's interesting, because I'm using that timestamp value without any issues. Anyway even after the change, I'm still getting the same error:

I've found the issue. So after converting the collection into array with $items->toArray() it also converted the timestamp into the ISO-8601 format which is not supported by MySQL. I added this into my model: https://laravel.com/docs/7.x/upgrade#date-serialization and now it works without any issues.
I'm not sure why it worked half year ago when I wrote the script. I thought the issue was somewhere during executing the insert method. That's my bad I didn't check it, but I spent so much time on solving that issue yesterday, that I absolutely forgot it.