[Slider] Add marks on a slider at specific points and allow only those to be selected

Feature request
Provide a way to add points on the slider.
Overview

Examples in other libraries
https://mui.com/components/slider/#discrete-sliders

Who does this impact? Who is this for?

Additional context

Hey @raviteja83,
I believe this was a feature on our list for Slider when we were building it, but we dropped it so we could release a simple version first. I am sure we will get back to that at some point though.
✌

We probably won't do this anytime soon and would rather focus on producing more primitives.
This is also probably possible in user-land.

@benoitgrelard just a heads up that i don't think this is possible user-land because we have offset calculations on the thumb to stop it from overflowing the edges of the range. the offset makes it difficult for people to add their own points accurately.

That's a great point @jjenzz, this might need to be offered as part of the component for that reason then.

I hope marks will be added soon, I had a hard time making them myself

But no, I was joking, I didn’t manage to do it myself until the end, only if the number of marks is equal to the maximum value

Any updates on that? 👀

In case this is slated for (Far in the Future) -- a blog post/stackoverflow post about how this was made would definitely be enough for most people (in React/NextJS hopefully)!
Here's a working example that the Radix team might have access to?

https://workos.com/pricing
(Workos.com is the maintainer of RadixUI in case anybody is wondering.)
One very small point of feedback on this implementation ^ there is a tiny bit of jitter on cursor turning from arrow/hand when using the slider -- perhaps, adding hover:cursor-pointer in a more parent element will address issue.

Hey @ChungMasterFlex, I think we're clear on what the issue is about.
Regarding the example above from the WorkOS pricing page, that doesn't use Radix and is actually all done in Webflow for the marketing pages.

For those looking for a temporary workaround, you can just mimic Radix' calculation to get the same positions as those the thumb can be at.
// Positioned mark without anything displayed, you can add classes, children etc.
// I'm using Tailwind here, but replace with X
// maxIndex should be 9 if you have 10 steps
// stepIndex controls the position you want to display the mark at.

// Then you need these 4 functions I copied almost 1-1 from Radix

// Assuming you know thumb size at coding-time or have a way to measure it.
const THUMB_SIZE = 32;

function calcStepMarkOffset(index: number, maxIndex: number) {
  const percent = convertValueToPercentage(index, 0, maxIndex);
  const thumbInBoundsOffset = getThumbInBoundsOffset(THUMB_SIZE, percent, 1);
  return `calc(${percent}% + ${thumbInBoundsOffset}px)`;
}

function convertValueToPercentage(value: number, min: number, max: number) {
  const maxSteps = max - min;
  const percentPerStep = 100 / maxSteps;
  const percentage = percentPerStep * (value - min);
  return clamp(percentage, { max: 100, min: 0 });
}

function getThumbInBoundsOffset(width: number, left: number, direction: number) {
  const halfWidth = width / 2;
  const halfPercent = 50;
  const offset = linearScale([0, halfPercent], [0, halfWidth]);
  return (halfWidth - offset(left) * direction) * direction;
}

function linearScale(input: readonly [number, number], output: readonly [number, number]) {
  return (value: number) => {
    if (input[0] === input[1] || output[0] === output[1]) return output[0];
    const ratio = (output[1] - output[0]) / (input[1] - input[0]);
    return output[0] + ratio * (value - input[0]);
  };
}

A real implementation might then look similar to this workaround:
// direction, max etc. need to be passed in the workaround,
// but a real implementation would inherit them from Slider.Root
<Slider.Mark step={step}>
  {someText}
</Slider.Mark>

Need one these man

Here's also another solution that I came up with: https://codesandbox.io/p/sandbox/divine-http-93zqyd
My use case was that I needed those specific points be equal to specific values (e.g. 18, 25, 35, 45, 55, 65) and wanted user to able to smoothly drag the thumb while only allowing those specific values to be selected.
I mapped those values to integers 0... and set up a onValueChange handler to update state whenever value is updated by rounding the current value to nearest integer and update state (mappedValue).
(Same works for two thumbs, which was my actual use case)

considering using this slider but missing this feature.
is it possible in 2023?

2024 need this feature

Could definitely use this - I think it's universal enough need (that benefits from access to internals) to be considered part of the primitive itself rather than a user-land implementation

Up

up

Up

Up

Up

Up

Up

Up

UPPPP !

UUUPPPP!! 💯

Up

Up

Up

Up 🔝

Up 0_o

upppp!!!!

upppppppppp 🆙🆙🆙🆙

Just for your information: Subscribed people receive an email, every time you spam this thread. I'd rather not unsubscribe, because I'd like to be informed, when somebody posts anything valuable - for example another workaround or a suggestion for a PR. Beyond that, I assume, aggressively shouting upppp multiple times won't premove contributers to act, neither.

Definitely looking forward to this being part of the primitive itself, but for now I've rolled-in a pretty simple workaround to my project and figured I'd share:
I'm using shadcn-ui which uses Radix under the hood, and added this snippet underneath my local Slider component which is a wrapper around the shadcn-ui and radix components.
{Array.from({ length: max + 1 }).map((_, i) => (
  <span
    key={`${name}-${i}`}
    className={clsx('text-sm font-light', { 'text-10 opacity-40': i > 0 && i < max })}
    role='presentation'
  >
    {i === 0 || i === max ? i : '|'}

))}

The output looks like this

The 'stops' are pretty accurate to the step size without having to hardcode all those values, and this seems to work well so far. Happy to share more if anyone needs/has questions, but hopefully the snippet above is enough to get your slider going in the right direction.

Up

Good call on sharing David. Here's an implementation I did with react-hook-form and shadcn styled with tailwind

Implementation:
export default function Slider<T extends FieldValues>({ min, max, control, disabled, isRequired, step, label, format, name, value }: SliderProps<T>) {
  return (

        {label}

        <Controller<T>
          defaultValue={value}
          rules={{ required: isRequired }}
          control={control}
          render={({ field: { value, onChange } }) => (

              <Range
                disabled={disabled}
                values={value}
                step={step}
                min={min}
                max={max}
                rtl={false}
                onChange={values => onChange(values as [number, number])}
                renderMark={({ props }) => <div {...props} className={`h-4 w-1 rounded-full bg-[#ceff00]`} style={{ ...props.style }} />}
                renderTrack={({ props, children }) => (

                      {children}

                )}
                renderThumb={({ index, props, isDragged }) => {
                  return (

                      {/*Value labels. Only shows values on drag*/}
                      {isDragged && (

                          {format ? format(value[index]) : value[index]}

                      )}

                  )
                }}
              />

                From: {format ? format(value[0]) : value[0]} to {format ? format(value[1]) : value[1]}

          )}
          name={name}
        />

  )
}

Types:
import type { FieldPathValue, RegisterOptions, FieldError, FieldPath, Path } from 'react-hook-form'

interface SliderProps<T extends FieldValues> extends Omit<InputProps<T>, 'registerOptions'> {
  min: number
  max: number
  step: number
  format?: (value: number) => string
  control: Control<T>
}

export interface InputProps<T, U extends FieldPath<T> = Path<T>> {
  // Form control name - not visible to user - the convoluted generic is to enable typing for this
  name: U
  // User visible label
  label: string
  // Triggers error message if defined
  error?: FieldError<T>
  // Makes this input mandatory
  isRequired?: boolean
  // CSS classes to pass through
  className?: string
  // Value to initialize the input with
  value?: FieldPathValue<T, U>
  // Validation and other options to pass to input registration
  registerOptions?: RegisterOptions<T, U>
  // Placeholder text
  placeholder?: string
  // Disables any changes to the input
  disabled?: boolean
  // Not implemented everywhere
  loading?: boolean
}

Usage (example is lower and upper bounds for age)
            <Slider step={2} min={0} max={70} label='Role Age' value={[18, 40]} control={control} name='age' isRequired error={errors.age} />

Definitely looking forward to this being part of the primitive itself, but for now I've rolled-in a pretty simple workaround to my project and figured I'd share:
I'm using shadcn-ui which usesradix under the hood, and added this snippet underneath my local Slider component which is a wrapper around the shadcn-ui and radix components.

  {Array.from({ length: max + 1 }).map((_, i) => (
    <span
      key={`${name}-${i}`}
      className={clsx('text-sm font-light', { 'text-10 opacity-40': i > 0 && i < max })}
      role='presentation'
    >
      {i === 0 || i === max ? i : '|'}

  ))}

The output looks like this
The 'stops' are pretty accurate to the step size without having to hardcode all those values, and this seems to work well so far. Happy to share more if anyone needs/has questions, but hopefully the snippet above is enough to get your slider going in the right direction.

Could you please share a full example ?

I'm trying to create the following example and it's kinda tricky.

Definitely looking forward to this being part of the primitive itself, but for now I've rolled-in a pretty simple workaround to my project and figured I'd share:
I'm using shadcn-ui which usesradix under the hood, and added this snippet underneath my local Slider component which is a wrapper around the shadcn-ui and radix components.

  {Array.from({ length: max + 1 }).map((_, i) => (
    <span
      key={`${name}-${i}`}
      className={clsx('text-sm font-light', { 'text-10 opacity-40': i > 0 && i < max })}
      role='presentation'
    >
      {i === 0 || i === max ? i : '|'}

  ))}

The output looks like this
The 'stops' are pretty accurate to the step size without having to hardcode all those values, and this seems to work well so far. Happy to share more if anyone needs/has questions, but hopefully the snippet above is enough to get your slider going in the right direction.

Please , could you share the full code?

here is a working solution for any one that needs it
`"use client";
import * as React from "react";
import * as SliderPrimitive from "@radix-ui/react-slider";
import { cn } from "@/lib/utils";
import {
Tooltip,
TooltipContent,
TooltipProvider,
TooltipTrigger,
} from "@/components/ui/tooltip";
interface SliderProps
extends React.ComponentPropsWithoutRef {
showTooltip?: boolean;
}
const Slider = React.forwardRef<HTMLElement, SliderProps>(
({ className, showTooltip = false, ...props }, ref) => {
const [value, setValue] = React.useState<number[]>(
(props.defaultValue as number[]) ?? [0],
);
const [showTooltipState, setShowTooltipState] = React.useState(false);
const handlePointerDown = () => {
  setShowTooltipState(true);
};

const handlePointerUp = () => {
  setShowTooltipState(false);
};

React.useEffect(() => {
  document.addEventListener("pointerup", handlePointerUp);
  return () => {
    document.removeEventListener("pointerup", handlePointerUp);
  };
}, []);

return (
  <SliderPrimitive.Root
    ref={ref}
    className={cn(
      "relative flex w-full touch-none select-none items-center",
      className,
    )}
    onValueChange={setValue}
    onPointerDown={handlePointerDown}
    {...props}
  >
    <SliderPrimitive.Track className="relative h-2 w-full grow overflow-hidden rounded-full bg-secondary">
      <SliderPrimitive.Range className="absolute h-full bg-primary" />
    </SliderPrimitive.Track>
    <TooltipProvider>
      <Tooltip open={showTooltip && showTooltipState}>
        <TooltipTrigger asChild>
          <SliderPrimitive.Thumb
            className="block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
            onMouseEnter={() => setShowTooltipState(true)}
            onMouseLeave={() => setShowTooltipState(false)}
          />
        </TooltipTrigger>
        <TooltipContent>

{value[0]}

        </TooltipContent>
      </Tooltip>
    </TooltipProvider>
  </SliderPrimitive.Root>
);

},
);
Slider.displayName = SliderPrimitive.Root.displayName as string;
export { Slider };
`

@Ghost-hk any chance you could post a screenshot / screencast with your code example? I'm intrigued by the tooltip usage, but would like to see how it behaves before jumping into implementing it locally.

@willdavidow
https://github.com/user-attachments/assets/78c40beb-3627-42d7-a247-0427210b6ad1

@Ghost-hk looks awesome - thanks for sharing!

i am using shadcn, and here is my solution for the circular marks, it can modified for custom use.
i extended the interface to look like:
interface SliderProps
	extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
	showTooltip?: boolean;
	interval?: number;
}

this part is for calculating the position from left:
const Slider = React.forwardRef<
	React.ElementRef<typeof SliderPrimitive.Root>,
	SliderProps
>(({ className, onValueChange, showTooltip = true, ...props }, ref) => {
	const [value, setValue] = React.useState<number[]>(
		(props.defaultValue as number[]) ?? (props.value as number[]) ?? [0]
	);
	const [innerInterval] = React.useState<number>(props.interval ?? props.step ?? 25);
	const numberOfMarks = Math.floor(props.max ?? 100 / innerInterval) + 1;
	const marks = Array.from({ length: numberOfMarks }, (_, i) => i * innerInterval);

	function tickIndex(value: number): number {
		// Calculate the index based on the value
		return Math.floor(value / innerInterval);
	}

	function calculateTickPercent(index: number, max: number): number {
		// Calculate the percentage from left of the slider's width
		const percent = ((index * innerInterval) / max) * 100;
		return percent;
	}

function handleValueChange(v: number[]) {
		setValue(v);
		if (onValueChange) onValueChange(v);
	}

and this part is for the tool tip by @Ghost-hk :
const [showTooltipState, setShowTooltipState] = React.useState(false);
	const handlePointerDown = () => {
		setShowTooltipState(true);
	};

	const handlePointerUp = () => {
		setShowTooltipState(false);
	};

	React.useEffect(() => {
		document.addEventListener("pointerup", handlePointerUp);
		return () => {
			document.removeEventListener("pointerup", handlePointerUp);
		};
	}, []);

and here is the component jsx:
return (
		<SliderPrimitive.Root
			ref={ref}
			className={cn(
				"relative flex w-full touch-none select-none items-center",
				className
			)}
			onValueChange={handleValueChange}
			onPointerDown={handlePointerDown}
			{...props}>
			<SliderPrimitive.Track className="relative h-1 w-full grow rounded-full bg-secondary">
				<SliderPrimitive.Range className="absolute h-full bg-primary" />
				{marks.map((_, i) => (
					<Circle
						id={`${i}`}
						key={`${i}`}
						role="presentation"
						className={cn(
							"text-sm h-2.5 w-2.5 -z-10 rounded-full absolute -top-1",
							{
								" text-secondary bg-secondary": i > tickIndex(value[0]!),
								"text-primary bg-primary": i <= tickIndex(value[0]!),
							}
						)}
						style={{
							left: `${calculateTickPercent(i, props.max ?? 100)}%`,
							translate: `-${calculateTickPercent(i, props.max ?? 100)}%`,
						}}
						strokeWidth="3px"
					/>
				))}
			</SliderPrimitive.Track>

			<TooltipProvider>
				<Tooltip open={showTooltip && showTooltipState}>
					<TooltipTrigger asChild>
						<SliderPrimitive.Thumb
							className="block h-2.5 w-2.5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50"
							onMouseEnter={() => setShowTooltipState(true)}
							onMouseLeave={() => setShowTooltipState(false)}
						/>
					</TooltipTrigger>
					<TooltipContent className="w-auto p-2 mb-1">

{value[0]}%

					</TooltipContent>
				</Tooltip>
			</TooltipProvider>
		</SliderPrimitive.Root>
	);

i am using shadcn, and here is my solution for the circular marks, it can be modified for custom use.
i extended the interface to look like:
interface SliderProps
	extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
	showTooltip?: boolean;
	interval?: number;
}

this part is for calculating the position from left:
const Slider = React.forwardRef<
	React.ElementRef<typeof SliderPrimitive.Root>,
	SliderProps
>(({ className, onValueChange, showTooltip = true, ...props }, ref) => {
	const [value, setValue] = React.useState<number[]>(
		(props.defaultValue as number[]) ?? (props.value as number[]) ?? [0]
	);
	const [innerInterval] = React.useState<number>(props.interval ?? props.step ?? 25);
	const numberOfMarks = Math.floor(props.max ?? 100 / innerInterval) + 1;
	const marks = Array.from({ length: numberOfMarks }, (_, i) => i * innerInterval);

	function tickIndex(value: number): number {
		// Calculate the index based on the value
		return Math.floor(value / innerInterval);
	}

	function calculateTickPercent(index: number, max: number): number {
		// Calculate the percentage from left of the slider's width
		const percent = ((index * innerInterval) / max) * 100;
		return percent;
	}

function handleValueChange(v: number[]) {
		setValue(v);
		if (onValueChange) onValueChange(v);
	}

and this part is for the tool tip by @Ghost-hk :
const [showTooltipState, setShowTooltipState] = React.useState(false);
	const handlePointerDown = () => {
		setShowTooltipState(true);
	};

	const handlePointerUp = () => {
		setShowTooltipState(false);
	};

	React.useEffect(() => {
		document.addEventListener("pointerup", handlePointerUp);
		return () => {
			document.removeEventListener("pointerup", handlePointerUp);
		};
	}, []);

and here is the component jsx:
return (
		<SliderPrimitive.Root
			ref={ref}
			className={cn(
				"relative flex w-full touch-none select-none items-center",
				className
			)}
			onValueChange={handleValueChange}
			onPointerDown={handlePointerDown}
			{...props}>
			<SliderPrimitive.Track className="relative h-1 w-full grow rounded-full bg-secondary">
				<SliderPrimitive.Range className="absolute h-full bg-primary" />
				{marks.map((_, i) => (
					<Circle
						id={`${i}`}
						key={`${i}`}
						role="presentation"
						className={cn(
							"text-sm h-2.5 w-2.5 -z-10 rounded-full absolute -top-1",
							{
								" text-secondary bg-secondary": i > tickIndex(value[0]!),
								"text-primary bg-primary": i <= tickIndex(value[0]!),
							}
						)}
						style={{
							left: `${calculateTickPercent(i, props.max ?? 100)}%`,
							translate: `-${calculateTickPercent(i, props.max ?? 100)}%`,
						}}
						strokeWidth="3px"
					/>
				))}
			</SliderPrimitive.Track>

			<TooltipProvider>
				<Tooltip open={showTooltip && showTooltipState}>
					<TooltipTrigger asChild>
						<SliderPrimitive.Thumb
							className="block h-2.5 w-2.5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50"
							onMouseEnter={() => setShowTooltipState(true)}
							onMouseLeave={() => setShowTooltipState(false)}
						/>
					</TooltipTrigger>
					<TooltipContent className="w-auto p-2 mb-1">

{value[0]}%

					</TooltipContent>
				</Tooltip>
			</TooltipProvider>
		</SliderPrimitive.Root>
	);

Hi @youssefwt, I tried your solution, and it's almost working as expected, but the marks are not showing, even the svg's being there, as you can see in my code inspector below. Would you know what can be wrong?
I've already tried to remove tailwind parameter -z-10, change absolute to relative, increase the size, but keeps not appearing on screen.

Oct 4, up

up

i am using shadcn, and here is my solution for the circular marks, it can be modified for custom use.
i extended the interface to look like:
interface SliderProps
	extends React.ComponentPropsWithoutRef<typeof SliderPrimitive.Root> {
	showTooltip?: boolean;
	interval?: number;
}

this part is for calculating the position from left:
const Slider = React.forwardRef<
	React.ElementRef<typeof SliderPrimitive.Root>,
	SliderProps
>(({ className, onValueChange, showTooltip = true, ...props }, ref) => {
	const [value, setValue] = React.useState<number[]>(
		(props.defaultValue as number[]) ?? (props.value as number[]) ?? [0]
	);
	const [innerInterval] = React.useState<number>(props.interval ?? props.step ?? 25);
	const numberOfMarks = Math.floor(props.max ?? 100 / innerInterval) + 1;
	const marks = Array.from({ length: numberOfMarks }, (_, i) => i * innerInterval);

	function tickIndex(value: number): number {
		// Calculate the index based on the value
		return Math.floor(value / innerInterval);
	}

	function calculateTickPercent(index: number, max: number): number {
		// Calculate the percentage from left of the slider's width
		const percent = ((index * innerInterval) / max) * 100;
		return percent;
	}

function handleValueChange(v: number[]) {
		setValue(v);
		if (onValueChange) onValueChange(v);
	}

and this part is for the tool tip by @Ghost-hk :
const [showTooltipState, setShowTooltipState] = React.useState(false);
	const handlePointerDown = () => {
		setShowTooltipState(true);
	};

	const handlePointerUp = () => {
		setShowTooltipState(false);
	};

	React.useEffect(() => {
		document.addEventListener("pointerup", handlePointerUp);
		return () => {
			document.removeEventListener("pointerup", handlePointerUp);
		};
	}, []);

and here is the component jsx:
return (
		<SliderPrimitive.Root
			ref={ref}
			className={cn(
				"relative flex w-full touch-none select-none items-center",
				className
			)}
			onValueChange={handleValueChange}
			onPointerDown={handlePointerDown}
			{...props}>
			<SliderPrimitive.Track className="relative h-1 w-full grow rounded-full bg-secondary">
				<SliderPrimitive.Range className="absolute h-full bg-primary" />
				{marks.map((_, i) => (
					<Circle
						id={`${i}`}
						key={`${i}`}
						role="presentation"
						className={cn(
							"text-sm h-2.5 w-2.5 -z-10 rounded-full absolute -top-1",
							{
								" text-secondary bg-secondary": i > tickIndex(value[0]!),
								"text-primary bg-primary": i <= tickIndex(value[0]!),
							}
						)}
						style={{
							left: `${calculateTickPercent(i, props.max ?? 100)}%`,
							translate: `-${calculateTickPercent(i, props.max ?? 100)}%`,
						}}
						strokeWidth="3px"
					/>
				))}
			</SliderPrimitive.Track>

			<TooltipProvider>
				<Tooltip open={showTooltip && showTooltipState}>
					<TooltipTrigger asChild>
						<SliderPrimitive.Thumb
							className="block h-2.5 w-2.5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50"
							onMouseEnter={() => setShowTooltipState(true)}
							onMouseLeave={() => setShowTooltipState(false)}
						/>
					</TooltipTrigger>
					<TooltipContent className="w-auto p-2 mb-1">

{value[0]}%

					</TooltipContent>
				</Tooltip>
			</TooltipProvider>
		</SliderPrimitive.Root>
	);

Hi I can't see the marks

I would like to see this feature implemented.

upppppp plz

If anyone is looking for an alternative solution, MUI can be used.

NEXTJS code example using tailwind:

'use client'
import { formatTime } from "@/utils/formatTime";
import { Slider } from "@mui/material";

interface SliderTimeComponentProps {
  value: number;
  onChange: (value: number) => void;
}

export default function SliderTimeComponent ({ value, onChange }: SliderTimeComponentProps){
  const handleChange = (event: Event, newValue: number | number[]) => {
    if (typeof newValue === 'number') {
      onChange(newValue);
    }
  };

  return (

        <Slider
          className="col-span-3"
          value={value}
          min={30}
          step={30}
          max={14 * 60}
          defaultValue={value}
          onChange={handleChange}
          id="slider-time"
          valueLabelDisplay="auto"
          getAriaValueText={formatTime}
          valueLabelFormat={formatTime}
          aria-labelledby="slider-time"
          marks
        />
        {formatTime(value)}

  )
}

up


Revert "Install gomockhandler (#1351)"

This reverts commit 3043bae0b64c456128da8c6d79f4bd6bb730fec5.

If we want gomockhandler to be present, we should add it to the toolchain, see draft PR #1362


ChatVectorDBChain does not support async

ChatVectorDBChain does not support async

same to me

in query_data.py change this:
from langchain.chains import ChatVectorDBChain
with
from langchain.chains import ConversationalRetrievalChain
and this:
qa = ChatVectorDBChain(
vectorstore=vectorstore,
combine_docs_chain=doc_chain,
question_generator=question_generator,
callback_manager=manager,
)
with:
qa = ConversationalRetrievalChain(
retriever=vectorstore.as_retriever(),
combine_docs_chain=doc_chain,
question_generator=question_generator,
callback_manager=manager,
)
works for me

Hmm but streaming with ConversationalRetrievalChain outputs gibberish compared to streaming with VectorDBChain. Any fix for this?


Allow labels to be added to workloads natively

For organizing and finding specific tests, we need to be able to the specific labels which identify them, both in workload templates, or on the command line, or both.
The metrics labeling system that is new to main should allow for arbitrary workload, activity, and/or op-level labels to be added. These labels should propagate to any downstream sources, like metrics collection, annotations, etc.
Since these need to be added at different levels, and we already have support for a hierarchic labeling system within NB, all we should have to do is add some additional ways of affixing labels at each level. This should also include adding global labels on the CLI or scenario level.
At different levels, the labels could be used for different things:

Auxiliary op template labels can be used to make it easy to aggregate views of operations in dashboards. For example reads vs writes, vector ops vs non-vector ops, etc.
Auxiliary activity labels can be used to distinguish between different phases or concurrent channels of a test across some useful logical boundary, such as consumer vs producer, etc.
Auxiliary scenario labels can be used to categorize and recall performance studies according to  testing parameters. For example, whether encryption or compression is enabled or not.

These labels are used in two places primarily, and should be documented as such:

In metrics labels as sent to any downstream system which supports labeled metrics
In annotation updates which are sent to grafana or any other downstream annotation collector

[x] allow labels on the command line
[x] allow labels on activities via activity params
[x] allow labels for op templates

Are we searching for a general solution when a more specific one might make more sense? It seems that for this use case we want to enable adding a set of labels at the topmost level (and later in subtrees). Why not have a simple "test set" yaml and then intake that file at the start of a Session and then output those labels automatically?

Why not have a simple "test set" yaml and then intake that file at the start of a Session and then output those labels automatically?
It's best if we can keep the workload descriptions contained to a single file as they are now. Even though users will sometimes accessorize with external files, the ability to hand some scenarios over to other engineers in a single file is quite valuable.

I have support for adding labels on the command line at the session level, to activities as activity parameters, and at the op template level in the workload. These will get pushed up to a PR soon.

This is supported at the op level as op fields, and at the activity level as an activity param.
The only layer missing now is in the workload spec in general. I'll make a separate issue for this.


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:16: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:21: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:28: missing_pip_check: For pypi packages, pip check should be present in the test commands
ERROR: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:28: missing_imports_or_run_test_py: Python packages require imports or a python test file in tests.
ERROR: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:34: missing_documentation: The recipe is missing a doc_url or doc_source_url
WARNING: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:34: missing_description: The recipe is missing a description
ERROR: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:34: missing_dev_url: The recipe is missing a dev_url
ERROR: /tmp/abs_b7u28rh3yc/clone/recipe/meta.yaml:34: missing_license_family: The recipe is missing the about/license_family key.
Errors were found


Possible to use in a shared environment?

I have a server with several different sites - I have set all vhost to a different value for the vhost, like:
php_admin_value skywalking.app_code MyFirstSite
and
php_admin_value skywalking.app_code MySecondSite
But only the first app_code that is collected by Skywalking will be the identfier - so traffic for both MyFirstSite and MySecondSite is identfied as the same site in Skywalking. Is this a bug, or expected behaviour? And if it is expected - could there be a feature for using the php agent in a shared environment?

Seems that it did sort of work in the end - I think it was just me.


Bake component

Hi
I add a component to bake the file to Rhino with all attributes and the original guid, the same as Rhino importer.

If you think this is useful i will try to upload the code to this repository

I think it's brilliant!
It's like Elefront in some way :) If you will create a Pull Request I will have a look :)

GitHub Desktop ask me to fork this repository, i don't know if this is the right way to create pull request ?
https://github.com/seghier/dotbimGH

Merged


"Dart_ServiceSendDataEvent expects there to be a current isolate" when trying to run LSP server with VM service enabled

When trying to run the analysis server in LSP mode with the VM service enabled (either from source or snapshot), this error is thrown:
Observatory listening on http://<IP_ADDRESS>:8223/eutPQg6C_v4=/
Content-Length: 1580
Content-Type: application/vscode-jsonrpc; charset=utf-8
../../runtime/vm/dart_api_impl.cc: 6253: error: Dart_ServiceSendDataEvent expects there to be a current isolate. Did you forget to call Dart_CreateIsolateGroup or Dart_EnterIsolate?
version=2.12.0-edge.073f792b599b00a088f640e5dfa658ab3f5c90e4 (be) (Tue Jan 19 16:47:32 2021 +0000) on "macos_x64"
pid=16297, thread=10499, isolate_group=(nil)(0x0), isolate=(nil)(0x0)
isolate_instructions=0, vm_instructions=10b7caee0
  pc 0x000000010ba3bec4 fp 0x000070000c4fe220 dart::Profiler::DumpStackTrace(void*)+0x64
  pc 0x000000010b7cb0b2 fp 0x000070000c4fe300 dart::Assert::Fail(char const*, ...)+0x82
  pc 0x000000010bf58ed8 fp 0x000070000c4fe380 Dart_ServiceSendDataEvent+0x208
  pc 0x000000010b8e6313 fp 0x000070000c4fe3d0 dart::bin::File::WriteFully(void const*, long long)+0xc3
  pc 0x000000010b8e35b5 fp 0x000070000c4fe420 dart::bin::File::WriteFromRequest(dart::bin::CObjectArray const&)+0x2a5
  pc 0x000000010b7b9c13 fp 0x000070000c4fe470 dart::bin::IOServiceCallback(long long, _Dart_CObject*)+0x333
  pc 0x000000010b9b170f fp 0x000070000c4fede0 dart::NativeMessageHandler::HandleMessage(std::__2::unique_ptr<dart::Message, std::__2::default_delete<dart::Message> >)+0xbf
  pc 0x000000010b9aef36 fp 0x000070000c4fee50 dart::MessageHandler::HandleMessages(dart::MonitorLocker*, bool, bool)+0x126
  pc 0x000000010b9af61a fp 0x000070000c4feeb0 dart::MessageHandler::TaskCallback()+0x1da
  pc 0x000000010bacd4ce fp 0x000070000c4fef30 dart::ThreadPool::WorkerLoop(dart::ThreadPool::Worker*)+0x14e
  pc 0x000000010bacd9cd fp 0x000070000c4fef60 dart::ThreadPool::Worker::Main(unsigned long)+0x5d
  pc 0x000000010ba37628 fp 0x000070000c4fefb0 dart::OSThread::GetMaxStackSize()+0xb8
  pc 0x00007fff693f1109 fp 0x000070000c4fefd0 _pthread_start+0x94
  pc 0x00007fff693ecb8b fp 0x000070000c4feff0 thread_start+0xf
-- End of DumpStackTrace

It only seems to happen after the initialize message is sent. I can't reproduce directly from the terminal (I suspect because the LSP headers need to have \r\n in them and Bash may be messing with it), but I can reproduce by using a Dart script to spawn the process and send the initialize packet. This behaves the same when Dart-Code tries to run the server with thsee args (from TypeScript).
import 'dart:convert';
import 'dart:io';

Future<void> main() async {
  const sdkPath = '/Users/danny/Dev/Dart SDKs/nightly-2021-01-19';
  final proc = await Process.start(
    '$sdkPath/bin/dart',
    [
      '--enable-vm-service=8223',
      // '/foo/dart-sdk/sdk/pkg/analysis_server/bin/server.dart',
      '$sdkPath/bin/snapshots/analysis_server.dart.snapshot',
      '--lsp',
    ],
  );
  proc.stdout.transform(utf8.decoder).listen((s) => print(s));
  proc.stderr.transform(utf8.decoder).listen((s) => print(s));
  void write(String s) {
    proc.stdin.write('Content-Length: ${s.length}\r\n\r\n');
    proc.stdin.write(s);
  }

  write('{"jsonrpc": "2.0","id": 0,"method": "initialize","params": {"processId": 16048,"rootUri": "file:///Users/danny/Desktop/dart_sample","capabilities": {}}}');

  await proc.exitCode;
}

/cc @bkonyi @rmacnak-google

/cc @bkonyi @rmacnak-google

This issues prevents me from being able to profile the LSP server (at least, the only way I know involves starting via the VM service), so if there's anything I can do to help narrow it down (or if there's a workaround), please let me know!


Using inspec-iggy with remote .tfstate

I'm really interested in using this but our state files are located remotely in s3 buckets.
Could this plugin have the ability to target the remote state when running:
inspec terraform generate --tfstate

Interested in this as well, but unsure whether this might already be fixed/handled within the inspec provisioner plugin for terraform.

Our state files are stored remotely in Consul.

@richjamesgreen Just out of interesst, how does terraform handle the case with a remote state file?

This is a core element of terraform.

This will be supported in the upcoming 0.5.0 release https://github.com/mattray/inspec-iggy/tree/0.5.0.
I'll go through the Terraform and CloudFormation docs and see what the formats they use are (http:, https:, s3:, anything else?). I'm planning on leaving the CLI alone (still -t) and parsing the string for remote sources.

Looking through the Terraform docs for remote state, there are quite a few supported options.
https://www.terraform.io/docs/backends/types/index.html
For the 0.5.0 release I'll probably only support http/https/s3 and see what sort of feedback I get. For the other backends of Terraform we'll probably need to either wrap the Terraform command or find an Terraform Ruby SDK we can reuse.

Yes we use S3 and the Azurerm types most frequently. But trialling in S3 would be really useful!

On 1 Apr 2019, at 06:24, Matt Ray<EMAIL_ADDRESS>wrote:
Looking through the Terraform docs for remote state, there are quite a few supported options.
https://www.terraform.io/docs/backends/types/index.html
For the 0.5.0 release I'll probably only support http/https/s3 and see what sort of feedback I get. For the other backends of Terraform we'll probably need to either wrap the Terraform command or find an Terraform Ruby SDK we can reuse.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I’d definitely like to see the S3 remote state file supported - that’d be great.

On 1 Apr 2019, at 08:11, richjamesgreen<EMAIL_ADDRESS>wrote:
Yes we use S3 and the Azurerm types most frequently. But trialling in S3 would be really useful!

On 1 Apr 2019, at 06:24, Matt Ray<EMAIL_ADDRESS>wrote:
Looking through the Terraform docs for remote state, there are quite a few supported options.
https://www.terraform.io/docs/backends/types/index.html
For the 0.5.0 release I'll probably only support http/https/s3 and see what sort of feedback I get. For the other backends of Terraform we'll probably need to either wrap the Terraform command or find an Terraform Ruby SDK we can reuse.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/mattray/inspec-iggy/issues/3#issuecomment-478462472, or mute the thread https://github.com/notifications/unsubscribe-auth/AbZUWZvdPGTLt7QqRXbjCiNKz7zWblUtks5vcbEkgaJpZM4UNihr.

Has this been resolved? is it possible to run
inspec terraform generate --tfstate s3://path/to/terraform.tfstate --name myprofile

We use CONSUL for storing the state.

I'm trying to finish 0.5.0, which will support http/https/s3 but not Consul. I'm open to suggestions for an easy way to support all the Terraform backends in the next release.

0.5.0 supports http/https/s3 but not Consul. I'm open to suggestions for an easy way to support all the Terraform backends in the next release.


Turning path! into its own crate

I was looking to implement Div for Path and came across: https://github.com/rust-lang/rust/pull/62989#issuecomment-515697585, which led me here. The path! macro (https://github.com/dtolnay/trybuild/blob/9b92eb13813a6da4c5b135626a52ff18d9d7ba26/src/path.rs) implemented here is really cool. Any chance you can publish that as its own crate?

It's not something that I am interested in maintaining myself as a crate, but the code is appropriately licensed so that someone else could maintain a fork.

Here it is: https://crates.io/crates/path_macro

Must it be a macro? Why not just path / "a" / "b" to become Path?


@craigspaeth => Use webfont URL in amp pages

Fixes an issue noted by Devang today -- AMP pages were not updated with the new WEBFONT_URL var when added a month or so ago.  This lets them access the artsy-icons font for logo and share icons.

LGTM!


Board LEDs are ON when pin is HIGH

ledOn(LED_BUILTIN) should turn the LED on.

Good find. I never use the ledOn() and ledOff functions that's why it was not detected.


Add support for validating EIP-4844 transactions

https://eips.ethereum.org/EIPS/eip-4844

Closed by: #73 as evm already performs validations before executing


Problems when integrating with strategy of 'passport-wechat'

Sorry, I have to open a new ticket, because the old one has been closed: https://github.com/feathersjs/authentication/issues/659
@daffl

What's wrong with https://github.com/liangyali/passport-wechat?

Promblem 1:
I found a problem on configuation.
In https://github.com/liangyali/passport-wechat, it uses 'appID' and 'appSecret' as below:
passport.use(new WechatStrategy({
        appID: {APPID},
        name:{默认为wechat,可以设置组件的名字}
        appSecret: {APPSECRET},
        client:{wechat|web},
        callbackURL: {CALLBACKURL},
        scope: {snsapi_userinfo|snsapi_base},
        state:{STATE},
        getToken: {getToken},
        saveToken: {saveToken}
      },
      function(accessToken, refreshToken, profile,expires_in, done) {
        return done(err,profile);
      }
));

But in @feathersjs/authentication-oauth2, it uses 'clientID' and 'clientSecret':
app.configure(oauth2({
  name: 'facebook',
  Strategy: FacebookStrategy,
  clientID: '<your client id>',
  clientSecret: '<your client secret>',
  scope: ['public_profile', 'email']
}));

This difference of naming may cause an error when you try to use authentication-oauth2 to initialize wechat strategy.

You should be able to just pass the same options:
app.configure(oauth2({
        name: 'wechat',
        Strategy: WechatStrategy,
        appID: {APPID},
        name:{默认为wechat,可以设置组件的名字}
        appSecret: {APPSECRET},
        client:{wechat|web},
        callbackURL: {CALLBACKURL},
        scope: {snsapi_userinfo|snsapi_base},
        state:{STATE},
        getToken: {getToken},
        saveToken: {saveToken}
}));

Problem 2:
In https://github.com/liangyali/passport-wechat/blob/48e3ea4706a9604fa13f91f0300767119080d32f/lib/strategy.js#L110
When it invoking 'verify' function, the 5th param is passed a time value, not a 'done' fuction.
But in @feathersjs/authentication-oauth2 the statement of 'verify' function is as this:
verify(req, accessToken, refreshToken, profile, done)

means the 5th param should be a 'done' function.
This difference of params defining may cause another running error: TypeError: done is not a function.

Can you try customizing the verifier and changing the signature accordingly?
class WechatVerifier extends Verifier {
  // The verify function has the exact same inputs and
  // return values as a vanilla passport strategy
  verify(req, accessToken, refreshToken, profile, expiresIn, done) {
    super.verify(req, accessToken, refreshToken, profile, done);
  }
}

@daffl

You should be able to just pass the same options:

app.configure(oauth2({
        name: 'wechat',
        Strategy: WechatStrategy,
        appID: {APPID},
        name:{默认为wechat,可以设置组件的名字}
        appSecret: {APPSECRET},
        client:{wechat|web},
        callbackURL: {CALLBACKURL},
        scope: {snsapi_userinfo|snsapi_base},
        state:{STATE},
        getToken: {getToken},
        saveToken: {saveToken}
}));

I tried, and got another err:
Error: You must provide a 'clientID' in your authentication configuration or pass one explicitly
at Function.oauth2Auth (D:\VueWork\feathers-chat2\node_modules\@feathersjs\authentication-oauth2\lib\index.js:59:13)

Hm, looks like those are currently still required. Since they are not used, we can maybe just pass whatever:
app.configure(oauth2({
        name: 'wechat',
        clientId: 'notused',
        clientSecret: 'notused',
        Strategy: WechatStrategy,
        appID: {APPID},
        name:{默认为wechat,可以设置组件的名字}
        appSecret: {APPSECRET},
        client:{wechat|web},
        callbackURL: {CALLBACKURL},
        scope: {snsapi_userinfo|snsapi_base},
        state:{STATE},
        getToken: {getToken},
        saveToken: {saveToken}
}));

Unfortunately I don't have a Wechat application set up I can try it out though 😞

Problem3:
Inside default verify function logic, if we can't file user, it will call default _createEntity(data) to create a new user entry.
But at that time, we dont know username(email), userpassword, so not enough info to create a entry, or the user may already have an account inside our system, we just need to bind the existing account with the user's OAuth profile.
Through createEntity(), how can I redirect current request to a signup/bind page and carrying the profile got from the provider to let current user to offer username/password then we can create a new account or bind an existing account with the profile?
editing...

So the signup itself is working now? You can redirect to the signup/bind page adding the oAuth access token to the query string (this will also allow you to get the profile again).

@daffl But how can I redirect inside verify() or _createEntity()? there is no Express 'res' I can use.

I'll provide my code later

I published the code I'm working on under https://github.com/flight9/feathers-chat2
(there is one config file of wechat appid/secret have been excluded, which I will send you via email later)

I was reminded of a question suddenly: it may be hard for you to run it, because of wechat's security policy.
The policy requires you to:

Map the server to a public domain(Can be accessed by the external network) first.
Set the domain in the security setting inside control panel of wechat account.
Visit the domain.com/auth/wechat only inside a wechat app client or a wechat simulator.
Without above, you will recieve some prompt and fail.

The 3nd is easy to achieve, but for the first 2 steps, it may need you to apply a new test account of your own, and my appid/secret will become useless.

I think you may want to know the Wechat OAuth profile info, it's like this:
{
"openid": "oW6aH0ditEHnptRI058xBw0pOBzg",
" nickname": "NICKNAME",
"sex":"1",
"province":"PROVINCE"
"city":"CITY",
"country":"COUNTRY",
"headimgurl":    "http://thirdwx.qlogo.cn/mmopen/g3MonUZtNHkdmzicIlibx6iaFqAc56vxLSUfpb6n5WKSYVY0ChQKkiaJSgQ1dZuTOgvLLrhJbERQQ4eMsv84eavHiaiceqxibJxCfHe/46",
"privilege":[ "PRIVILEGE1" "PRIVILEGE2"     ]
}

Feathers v4 authentication is now using grant instead of Passport for oAuth which has built-in Wechat support. Please see the migration guide for more information. Closing this issue in order to archive this repository. Related issues can be opened at the new code location in the Feathers main repository.


wiki/Development-Model is out of date

https://github.com/zephyrproject-rtos/zephyr/wiki/Development-Model references JIRA & gerrit which we clearly don't use anymore.

I updated to remove the subsystem stuff since we don't really have proper subsystem branches at this point.

@dbkinder can you look at the 'Flow3' link in Communication and Collaboration going nowhere.

Typo in the link to this image is fixed.


_list_oids_traverse is much slower than _list_oids.

I have no context behind the introduction of _list_oids_traverse but, on every scenario and remote size I have tested, it is slower than plain _list_oids.
This has a negative performance impact for many operations, I reported the dvc gc case in
I am guessing the idea of list traverse was introduced before the adoption of fsspec as backend.
The reality today is that the combination of ThreadPoolExecutor and the single fsspec async loop causes the operation to be significantly slower than a single _list_oids call.

@daavoo Do you have results to share for different scenarios?

for context on traverse/no-traverse:
https://iterative.ai/blog/dvc-vs-rclone
https://github.com/iterative/dvc/issues/3488
https://github.com/iterative/dvc/pull/3501

The main premise behind the optimization should still be valid even with fsspec/asyncio. For push/fetch/status it's better for us to estimate size of the remote based on the size of a single prefix, and then try and determine whether it's faster to finish listing the full remote or make individual exists calls.
For gc the size estimation isn't relevant since we have to list the full remote regardless, but the original implementation also included parallelizing the full listing by prefix which was a valid gc optimization. But this parallelization (via the threadpoolexecutor) is probably what is broken now, since with fsspec this all gets done in the single async thread instead.
Fixing this is really related to getting rid of our ThreadPoolExecutor usage in favor of letting fsspec handle the parallelization w/asyncio instead.

@daavoo Do you have those times and comparisons to AWS CLI? It would be helpful to get an idea if it's 1.5x slower vs 10x slower.


Support json files for bundling

Wam projects could import directly TD from json files. This could help developers to interact with TD editors.

v 0.3.0 supports TD json files.


Start by Wireless debugging on Android 11?

A few other apps (e.g. Shizuku that are also started using adb commands are exploring solutions to start themselves by utilizing the new wireless debugging feature in Android 11. Any plans for something like that? It will be a great feature to have such that we can finally ditch the cable + terminal! Thanks!

This already worked as it turned out. The script doesn't ask you to pair or connect, because it would really be no more helpful than simply doing it yourself. If you run adb pair and adb connect (on a Mac/Linux) or tools\adb pair and tools\adb connect (on Windows with the tools\adb binary up to date - which it now is in 1.1) it will connect and the script will then run fine with no changes.

As I mentioned that in Shizuku, once the device has been paired/connected via adb, it won't require re-pair or re-connect with the pc after reboot. I just launch shizuku and do "start via wireless debugging". I didn't mean to skip just the physical cable connection step (this is in fact easier and faster to do than connecting the device to pc via wireless debugging), but the actual "rundarq-windows.bat" script.


Document Unlicense compatibility issues?

There's previous discussion of this in #33, #38, #61, #126, #496, docopt/docopt.rs#1, project-open-data/project-open-data.github.io#135, etc., but a number of projects have issues with the Unlicense, and it can lead to Unlicense code being judged incompatible (e.g. here).  On the other hand, I expect there are also projects that would take issue with CC0's explicit lack of a patent grant (vs. the Unlicense's silence on patents).  Is it worth working up wording around these issues?  For example, pointing out concern about how the Unlicense's warrenty disclaimer interacts with its public-domain assertion?  Or are these concerns rare enough that it's not worth bothering to mention them?

I don't know of anything that can be stated clearly and non-judgmentally. If there's an unconditional option that's less unambiguously problematic for software than CC0-1.0 and causes people to throw fewer hypothetical fits than Unlicense, happy to add it and maybe make more prominent. Related: https://github.com/github/choosealicense.com/issues/464#issuecomment-260733246
Closing for now as I don't see any concrete action to take, though feel free to discuss or make a concrete suggestion.

I don't know of anything that can be stated clearly and non-judgmentally.

We can point out that some projects have rejected Unlicensed code, pointing to cases like this one.  That's doesn't mean we agree with those decisions, and we wouldn't be (directly) pointing out issues with the Unlicense.  We'd just pointing out that not everyone considers the Unlicense universally compatible (which may seem surprising to users interested in a public-domain dedication).  On the other hand, the Docker folks have some code here which appears to be under the CC0.  Wording could be a note addition along the lines of the first sentence in this paragraph, although more examples would be useful.


Use OS from capabilities?

Hi,
Can you please provide more info and a possible solution?

Sorry!
I've updated my report.hook.js (Have to lock wdio-cucumber... to 1.0.0 because later versions break scenario outlines):
      const valueOrUnknown = (value) => value ? value : 'unknown'
      let device = capabilities.device
      if (!capabilities.device) {
        device = `${capabilities.os} ${capabilities.os_version}`
      }

      jsonReport[0].metadata = {
        browser: {
          name: valueOrUnknown(capabilities.browserName),
          version: capabilities.device
            ? capabilities.os_version
            : capabilities.browser_version,
        },
        device: device,
        platform: {
          name: valueOrUnknown(capabilities.os),
          version: valueOrUnknown(capabilities.os_version),
        },
      }

Results in the below format when using browserstack

Hi @faceleg
Maybe I'm missing something, but is there an issue now?

Going to close this one due to inactivity


Deprecate callback hooks on_pretrain_routine_start and on_pretrain_routine_end

What does this PR do?

Fixes https://github.com/PyTorchLightning/pytorch-lightning/issues/10984
Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

[x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[ ] Did you make sure to update the documentation with your changes? (if necessary)
[ ] Did you write any new necessary tests? (not for typos and docs)
[ ] Did you verify new and existing tests pass locally with your changes?
[ ] Did you list all the breaking changes introduced by this pull request?
[ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

[ ] Is this pull request ready for review? (if not, please submit in draft mode)
[ ] Check that all items from Before submitting are resolved
[ ] Make sure the title is self-explanatory and the description concisely explains the PR
[ ] Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?
Make sure you had fun coding 🙃

hey @krishnakalyan3 !
the PR is already open for it here: https://github.com/PyTorchLightning/pytorch-lightning/pull/12122

Thanks for the heads up!


Investigate performance of CASE WHEN expression

What is the problem the feature request solves?
Given this SQL query:
select
    sum(case when ws_wholesale_cost > 10 then 1 else 0 end) as a,
    sum(case when ws_wholesale_cost > 20 then 1 else 0 end) as b,
    sum(case when ws_wholesale_cost > 30 then 1 else 0 end) as c
from web_sales;

The query time with Comet disabled is much better than when Comet is enabled.
Disabled:
[1.5233631134033203, 0.35130977630615234, 0.3343064785003662, 0.35425901412963867, 0.31323719024658203]

Enabled:
[2.219223737716675, 0.886965274810791, 0.8125569820404053, 0.8285551071166992, 0.7927875518798828]

28 of the 99 TPC-DS queries use CASE WHEN, so optimizing this could have a nice impact on overall performance of that benchmark.
Describe the potential solution
No response
Additional context
No response

I have already started experimenting with some optimizations for this

We can specialize for certain cases, such as https://github.com/apache/datafusion/issues/11484

Fixed in https://github.com/apache/datafusion/issues/11484 and https://github.com/apache/datafusion-comet/pull/672


Replica error if underlying storagepool fs is ZFS

We're running Kubernetes 1.9.7 on ubuntu 16.04 with ZFS.
If the storagepool is a zfs volume, e.g. root/ebs with the following definition in k8s
apiVersion: openebs.io/v1alpha1
kind: StoragePool
metadata:
  name: ebs
  type: hostdir
spec:
  path: "/ebs"

the replica containers running
launch replica --frontendIP x.x.x.x --size 1G /openebs
fail with

time="2018-05-25T09:35:16Z" level=info msg="Creating volume /openebs, size<PHONE_NUMBER>/512"
time="2018-05-25T09:35:16Z" level=fatal msg="Error running start replica command: open /openebs/revision.counter: invalid argument"

If we create an ext4 zvol based storagepool it works. Is this expected behaviour?

@jomar83 This sounds more like a permission issue. The replica container should be able to write into the /ebs folder.
Can you provide the details of:

kubectl get pod  -o yaml
permissions of the file (ls -lR /ebs) on the node where the replica pod is running
kubectl exec into the replica pod -- and probably check if you can touch a file into the /openebs folder (the mounted sub-directory from /ebs)

OK, this is going to be the most newbie question ever, but how can I exec into the replica pod if it keeps crashing on boot? :)
What should the permissions be? From execing into another pod (that's not on zfs) the permissions seem to be correct (the pod runs as root, the dir is 0755).
I also changed the permissions to the subdir from /openebs to 0777 and that didn't make a difference.

kubectl describe for which resource type?
For zfs list, it's nothing special:
# zfs list
NAME                                 USED  AVAIL  REFER  MOUNTPOINT
...
august-pool/openebs                      96K  1.13T    96K  /mnt/openebs

The rest are normal volumes as well. The pool for the server is quite simple.

Hey @stefanfritsch it seems like zfs doesn't support extent mapping. A PR has been pushed recently on this.
Ref1: https://github.com/zfsonlinux/zfs/issues/264
Ref2: https://github.com/zfsonlinux/zfs/pull/7545

Hi, @vishnuitta, @utkarshmani1997 , @stefanfritsch
Has this issue been solved?
My pod cannot mount the pvc:
Warning  FailedMount  102s (x3 over 6m48s)  kubelet  MountVolume.MountDevice failed for volume "pvc-70a0fed8-ca88-474e-ba3a-b258effbee22" : rpc error: code = DeadlineExceeded desc = context deadline exceeded

/mnt/cheetah is zfs volume mounted inside LXC container.
Inside the pvc folder /mnt/cheetah/pvc-6aa58b1b-7b41-4bba-9cf9-a2eb3fc377af/replica.log
level=info msg="Configured logging with retentionPeriod: 180, maxLogFileSize: 100, maxBackups: 5"
level=fatal msg="Error running start replica command: failed to find extents, error: invalid argument"


Quote exclamation marks in MyDiff()

There was a problem when directory starts with excalamation mark (!). The path separator (backslash) has been removed.
Try to install Vim into C:\!Tools directory and then try to diff files.

Codecov Report

Merging #2896 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2896      +/-   ##
==========================================
+ Coverage   75.57%   75.57%   +<.01%
==========================================
  Files          92       92
  Lines      134945   134946       +1
==========================================
+ Hits       101982   101986       +4
+ Misses      32963    32960       -3

Impacted Files
Coverage Δ

src/ex_cmds2.c
79.11% <0%> (-0.1%)
:arrow_down:

src/gui.c
49.04% <0%> (-0.06%)
:arrow_down:

src/channel.c
83.06% <0%> (-0.04%)
:arrow_down:

src/if_py_both.h
76.59% <0%> (ø)
:arrow_up:

src/eval.c
81.48% <0%> (+0.04%)
:arrow_up:

src/undo.c
82.57% <0%> (+0.06%)
:arrow_up:

src/ui.c
46.61% <0%> (+0.07%)
:arrow_up:

src/gui_gtk_x11.c
47.93% <0%> (+0.09%)
:arrow_up:

src/if_xcmdsrv.c
84.35% <0%> (+0.17%)
:arrow_up:

Continue to review full report at Codecov.

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

Hans Ginzel wrote:

There was a problem when directory starts with excalamation (!). The path separator (backslash) has been removed.
Try install Vim into C:\!Tools directory and then try to diff files.

I don't think the if/endif is needed, you can just use:
fprintf(fd, "  if arg1 =~ ' ' | let arg1 = '\"' . arg1 . '\"' | endif\n");
fprintf(fd, "  let arg1 = substitute(arg1, '!', '\\!', 'g')\n");
fprintf(fd, "  let arg2 = v:fname_new\n");

The two following substitute() calls are also using arg1, should be arg2
and arg3:
/* Use quotes only when needed, they may cause trouble.
 * Always escape "!". */
fprintf(fd, "  let arg1 = v:fname_in\n");
fprintf(fd, "  if arg1 =~ ' ' | let arg1 = '\"' . arg1 . '\"' | endif\n");
fprintf(fd, "  let arg1 = substitute(arg1, '!', '\\!', 'g')\n");
fprintf(fd, "  let arg2 = v:fname_new\n");
fprintf(fd, "  if arg2 =~ ' ' | let arg2 = '\"' . arg2 . '\"' | endif\n");
fprintf(fd, "  let arg2 = substitute(arg2, '!', '\\!', 'g')\n");
fprintf(fd, "  let arg3 = v:fname_out\n");
fprintf(fd, "  if arg3 =~ ' ' | let arg3 = '\"' . arg3 . '\"' | endif\n");
fprintf(fd, "  let arg3 = substitute(arg3, '!', '\\!', 'g')\n");

Please check if this works.
Having a ! in a path is really rare, but escaping won't hurt if they
aren't there.
--
The war between Emacs and Vi is over.  Vi has won with 3 to 1.
http://m.linuxjournal.com/files/linuxjournal.com/linuxjournal/articles/030/3044/3044s1.html
/// Bram Moolenaar --<EMAIL_ADDRESS>-- http://www.Moolenaar.net   \
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \
\\  an exciting new programming language -- http://www.Zimbu.org        ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///


git ship --green (more robust shipping process)

problem

nothing prevents me from accidentally shipping a broken feature branch and breaking main
we currently rely on devs running the specs manually before shipping

solution

a configuration setting that specifies the test command

this command is run during the shipping workflow
if it fails, the ship is aborted

a configuration setting to enforce only shipping up-to-date feature branches

if the master branch gets updated while my tests were running, it restarts the shipping process

advantages

main branch is never broken this way

side effects

shipping can take a much longer time now
this only works for smaller projects with short spec suites
that's why it should be configurable

A solution for this and #476 could be configuring what CI you're using and providing a token that can be used to get the build status.

Yeah, hooking into the CI system is another option that we should definitely implement as part of this. I think we still need the ability to run tests locally though. Not every GT user might use a CI system yet when using GT. I often start prototyping something locally, and do all the infrastructure setup later once things go into a promising direction.

This is implemented using protected branches on Github, and orthogonal to Git Town's mission of creating and updating branches. Closing.


chore: bdd-gh-1574359919 to 0.0.1

chore: Promote bdd-gh-1574359919 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


grubby: remove installkernel installation

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

[x] The toolchain has been rebuilt successfully (or no changes were made to it)
[x] The toolchain/worker package manifests are up-to-date
[x] Any updated packages successfully build (or no packages were changed)
[x] Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
[x] Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
[x] All package sources are available
[x] cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
[x] LICENSE-MAP files are up-to-date (./SPECS/LICENSES-AND-NOTICES/data/licenses.json, ./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md, ./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON)
[x] All source files have up-to-date hashes in the *.signatures.json files
[x] sudo make go-tidy-all and sudo make go-test-coverage pass
[x] Documentation has been updated to match any changes to the build system
[x] Ready to merge

Summary

There is a separate dedicated installkernel RPM package that supplies the proper installkernel script for our distribution.
Grubby also supplied a similar script, but it does not support our distribution's specific quirks. Yet because grubby supplies this script at the same location, there are package conflicts when one attempts to install both the grubby package and installkernel package together.
So remove the grubby package's version of the installkernel script and just rely on the dedicated package's version.
Fixes #5493
Change Log

Remove installkernel script and relevant components from grubby package

Does this affect the toolchain?

NO
Associated issues

https://microsoft.visualstudio.com/OS/_workitems/edit/44564856
#5493

Test Methodology

x86_64: 358966
ARM64: 358967
Tested the following:
Issue is resolved. Conflict with installkernel is resolved
Main grubby application can still update the grubenv
Package update from old grubby to new grubby package functions as expected

Changes look good to me, quick question what is the context/reason to remove install kernel?
in the comments it mentions: #.... Instead users should
install it from the dedicated installkernel package supplied by our distro.
but for my education I would like to understand why is this the case, other than that I have no problem with the changes here

I have opened a github issue to help describe this issue #5493


Allow to use UNSET everywhere

This PR allows to use UNSET everywhere without mypy complaining :)

Thanks for adding the RELEASE.md file!

Here's a preview of the changelog:

This releases allows UNSET to be used anywhere and prevents mypy to report an error.


Remove core conversion models

What type of PR is this? (check all applicable)

[ ] Refactor
[ ] Feature
[ ] Bug Fix
[X] Optimization
[ ] Documentation Update
[ ] Community Node Submission

Have you discussed this change with the InvokeAI team?

[X] Yes
[ ] No, because:

Have you updated all relevant documentation?

[X] Yes
[ ] No

Description
We've been using a forked copy of the diffusers safetensors->diffusers model conversion code, which was hacked to read CLIP and the other models needed for conversion from the local invokeai root models directory. This was getting unsustainable as the code bases diverged, and also required the installation and maintenance of the "core/convert" directory.
This PR gets rid of the hacked conversion code and reverts to using the native diffusers methods. Core convert models are no longer installed at root configure time. Instead we rely on the HuggingFace hub system to download the conversion models if and when they are needed. They are relatively small and the initial delay seems minor.
Conversion of SD-1, SD-2 (both epsilon and v-prediction), SDXL, VAE and ControlNet SD-1/2 models has been tested. ControlNet SDXL models are still a WIP due to the need for some work on the prober.
The main implication of this change is that InvokeAI is no longer internet-independent and will need an internet connection at least the first time a safetensors file needs to be converted. However, there are several other places where the "no internet" rule is already violated, and I suggest that we abandon this principle.
Related Tickets & Documents

Related Issue #
Closes #5964

QA Instructions, Screenshots, Recordings

Remove or move $INVOKEAI_ROOT/models/.cache
Move $INVOKEAI/models/core/convert
Try generating with an unconverted .safetensors model.

Merge Plan
Merge when approved.

Added/updated tests?

[ ] Yes
[ ] No : please replace this line with details on why tests
have not been included

[optional] Are there any post deployment tasks we need to perform?

Makes sense to me


The profile.html template has a misplaced loop that creates invalid html

In ./templates/profile.html, the loop that iterates over the items in the table is off by one line creating invalid html.

 is inside the loop while

 is outside the loop. I don't believe you meant to define a new table body for every row and not terminate any but the last so you want tr inside the loop and tbody outside of it.
Current code:
  {% for item in items %}

      {{ item.name }}
      {{ item.email }}
    {% endfor %}

Corrected code:

    {% for item in items %}

      {{ item.name }}
      {{ item.email }}

    {% endfor %}

I can fork the repo and submit a pull request if you don't have time to fix it.

Thanks @rofrano. I have fixed it here.


UpdateRequestBadMsgType fault injection added

Fault injection added that allows forcing cloud to respond with faulty status code.

I signed it!


vector=true maps broken

I guess mostly related to show/hide layer changes.

Yes. We'll need to do someting like this.

Closed via https://github.com/CartoDB/cartodb.js/pull/1400


/dev/ttyS1 does not exist under HypriotOS

I am trying to run CCU2 under HypriotOS, amongst other (fixable) things this error occurs when running build.sh:
build.sh terminates w/ error
docker: Error response from daemon: linux runtime spec devices: error gathering device information while adding custom device "/dev/ttyS1": lstat /dev/ttyS1: no such file or directory.
$ uname -a

Linux black-pearl 4.4.50-hypriotos-v7+ #1 SMP PREEMPT Sun Mar 19 14:11:54 UTC 2017 armv7l GNU/Linux

I have to add I could not yet get the HM-MOD-RPI-PCB radio to run within this container. The HW itself does work, I cannot get them to communicate.
Whatfor is /dev_org/ttyS1 used anyway?

I split the build script to not require any serial port. The new deploy.sh will also only pass those devices available and not assume any particular platform.
With this the container should build and deploy in any ARM platform. Please give it a try.

Wow, quick reaction! That's commitment! Unfortunately, I can't get RFD/BidCos to run outside the container either. I did all the necessary changes in /boot/cmdline.txt,  /boot/config.txt, disabled hciuart.service. I am out of ideas of how I can further debug. What does bug me is that /dev/serial0 still links to ttyS0, I was expecting ttyAMA0 here. Not sure if this is relevant or not. Any idea what I could check? Thanks a lot!

@TomTom101 my proposal would be to wait for the homematic IP USB adapter that ELV announced for their next issue. Then we do not have to worry about the PI serial port and the special device driver. I am myself using a LAN gateway as antenna so now I can start the CCU2 docker container in any of my Raspis/OrangePIs.
Each Linux distro uses a different dev file for the serial port. I am using an Orange PI and there it is /dev/ttyS0. If this would be the problem a fix in the entrypoint.sh would address it.
How did you check that the adapter is not working outside the docker? Did you try to run rfd manually on the host?

I have a Raspbian installation on a different cart where I used the RFD https://github.com/eq-3/occu to see whether the antenna is good to begin with. It does connect there. I did the same on the Hypriot distro (host) without avail. Hence I cannot expect it to work in the docker container either.
One difference I found between my Raspian install, where I can connect to the antenna and Hypriot. I cannot set GPIO18 low on the latter:
cat /sys/class/gpio/gpio18/direction
out
cat /sys/class/gpio/gpio18/value
1
cat /sys/class/gpio/gpio18/value```
_1_

Wouldn't that be important? I have no clue whatsoever what I could do to fix this.

You say the HM adapter is not yet available but announced in their journal? The "HmIP-RF USB"? I'd hope that it should make things easier.

Yep, exactly that. Then sharing USB devices with docker containers is a more frequent use case that gpios and "special" serial ports. They also explicitly mention that want to support docker with it.


Issue with custom dev client expo

I am getting this issue on custom dev client on iphone xs ios 16 ( NOT happening on iphone 14 max)
{
"name": "sohati-doc",
"version": "1.0.0",
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"test": "jest"
},
"jest": {
"preset": "jest-expo",
"transformIgnorePatterns": [
"node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.|@expo-google-fonts/.|react-navigation|@react-navigation/.|@unimodules/.|unimodules|sentry-expo|native-base|react-native-svg|@react-native-community/datetimepicker|@react-native-picker/picker|@react-navigation/bottom-tabs|@react-navigation/native|@react-navigation/native-stack|@reduxjs/toolkit|axios|card-validator|formik|lodash|moment|opentok-react-native|react-native-animatable|react-native-calendars|react-native-collapsible|react-native-confirmation-code-field|shorthash)"
]
},
"dependencies": {
"@react-native-community/datetimepicker": "6.5.2",
"@react-native-picker/picker": "2.4.8",
"@react-navigation/bottom-tabs": "^6.4.0",
"@react-navigation/native": "^6.0.13",
"@react-navigation/native-stack": "^6.9.1",
"@reduxjs/toolkit": "^1.8.6",
"@types/react-native": "~0.70.6",
"axios": "^1.1.3",
"card-validator": "^8.1.1",
"expo": "^47.0.0",
"expo-app-loading": "~2.1.1",
"expo-asset": "~8.7.0",
"expo-build-properties": "~0.4.1",
"expo-constants": "~14.0.2",
"expo-crypto": "~12.0.0",
"expo-dev-client": "~2.0.1",
"expo-device": "~5.0.0",
"expo-file-system": "~15.1.1",
"expo-font": "~11.0.1",
"expo-linear-gradient": "~12.0.1",
"expo-notifications": "~0.17.0",
"expo-secure-store": "~12.0.0",
"expo-splash-screen": "~0.17.5",
"expo-status-bar": "~1.4.2",
"formik": "^2.2.9",
"jest": "^29.4.1",
"jest-expo": "^47.0.1",
"lodash": "^4.17.21",
"moment": "^2.29.4",
"opentok-react-native": "^0.21.1",
"react": "18.1.0",
"react-native": "0.70.5",
"react-native-animatable": "^1.3.3",
"react-native-calendars": "^1.1293.0",
"react-native-collapsible": "^1.6.0",
"react-native-confirmation-code-field": "^7.3.1",
"react-native-dotenv": "^3.4.2",
"react-native-gesture-handler": "~2.5.0",
"react-native-gifted-chat": "^1.0.4",
"react-native-image-viewing": "^0.2.2",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-modal": "^13.0.1",
"react-native-modal-datetime-picker": "^14.0.0",
"react-native-modalize": "^2.1.1",
"react-native-pager-view": "6.0.1",
"react-native-phone-number-input": "^2.1.0",
"react-native-portalize": "^1.0.7",
"react-native-reanimated": "~2.12.0",
"react-native-render-html": "^6.3.4",
"react-native-root-toast": "^3.3.1",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-stopwatch-timer": "^0.0.21",
"react-native-svg": "13.4.0",
"react-native-swipe-calendar": "^0.0.20",
"react-native-tab-view": "^3.3.0",
"react-native-webview": "11.23.1",
"react-redux": "^8.0.4",
"react-test-renderer": "18.1.0",
"redux-thunk": "^2.4.1",
"shorthash": "^0.0.2",
"typescript": "^4.6.3",
"yup": "^0.32.11"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@testing-library/react-native": "^11.5.1",
"@types/jest": "^29.4.0",
"@types/react-native-dotenv": "^0.2.0",
"babel-plugin-module-resolver": "^4.1.0",
"eslint": "^8.26.0",
"eslint-config-universe": "^11.1.0",
"msw": "^1.0.0",
"prettier": "^2.7.1",
"react-native-svg-transformer": "^1.0.0"
},
"eslintConfig": {
"extends": "universe/native"
},
"private": true
}

metro config:
const { getDefaultConfig } = require('expo/metro-config');
module.exports = (async () => {
const config = await getDefaultConfig(__dirname);
const { transformer, resolver } = config;
config.transformer = {
...transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer'),
getTransformOptions: () => {
return {
transform: { inlineRequires: true }
};
}
};
config.resolver = {
...resolver,
assetExts: resolver.assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...resolver.sourceExts, 'svg']
};
return config;
})();


[RFC] Solutions should state and refer to "prerequisite" concept.

Why?
Level 1 tasks reader should be familiar with a general concept from level 0. This will make the solution from level 1 onward more concise. However, it should not be taken for granted that everyone who did the level 1+ question knows the prerequisite. Someone who skips the previous level should still be able to see the list of the concepts they need to grasp in order to understand the solution.
How?
Add a list of required concepts at the top of every solution. Also, add a link to the tutorial section for the content. This will only be implemented after the tutorial section for TOI and below are finished.
Request for comment
@pongsaphol @JodsintZ

@Phluenam Your comment and guidance on this matter would be greatly appreciated.

I agree it makes sense to list out the concepts used and add a link to the tutorial section for each so it's immediately clear what topics are needed.
I think one question is whether a topic should be listed if it's implied by other prereqs. It might not be as necessary to list sorting for example if the solution is only using it as a subroutine in a convex hull algorithm and convex hull is already listed as a prereq.
Perhaps in the the tutorial section, concepts should also list and link their own prereqs. Then each solution would only need to mention the concepts mentioned directly in the explanation and could omit the implied prereqs as they could be traced through the tutorial link.
As a side note, it would be very helpful to have a tutorial to link to in some of existing solutions (e.g. https://programming.in.th/tasks/1138 could cite the tutorial for segment trees instead of linking to another solution like https://programming.in.th/tasks/1147 where the explanation is tied to the specifics of the problem)


feat(ts): Add types and TS documentation

As by title

can you add a test for the types using tsd?

Done and added tsd @mcollina  😉


[Bug]: Filtering plugins using includedTools breaks assistant tools.

What happened?
When using includedTools to filter the available Plugins only the calculator tool remains available for assistants, while plugins are filtered as expected.
The issue seems to be, that filtering in ToolService.loadAndFormatTools, contrary to its documentation, is done based on the file name instead of the pluginKey, as it is done in the PluginController.
Steps to Reproduce

Use a configuration with assistants + plugins enabled.
Set includedTools to ['calculator', 'azure-ai-search'] in librechat.yaml
Verify plugins are properly filtered in plugins.
Create/Update assistant try to add tool.
Observe the Azure AI Search tool being unavailable.

What browsers are you seeing the problem on?
Firefox, Chrome
Relevant log output
No response
Screenshots
No response
Code of Conduct

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

I confirm I experience the same issue. I already opened a discussion #3255  for that. I just didn't know it was a bug, I thought it was a misconfiguration on my side.


HDFS-17500: Add missing operation name while authorizing create and completeFile operations

Description of PR
Currently, operation name is set to null in the FSPermissionChecker when authorizing 'create' and 'completeFile' operations. It may help the authorizer to optimize the authorization processing if the operation names are set correctly.
How was this patch tested?

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

_ Prechecks _

+1 :green_heart:
dupname
0m 01s

No case conflicting files found.

+0 :ok:
spotbugs
0m 00s

spotbugs executables are not available.

+0 :ok:
codespell
0m 00s

codespell was not available.

+0 :ok:
detsecrets
0m 00s

detect-secrets was not available.

+1 :green_heart:
@author
0m 01s

The patch does not contain any @author tags.

-1 :x:
test4tests
0m 00s

The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
89m 24s

trunk passed

+1 :green_heart:
compile
6m 03s

trunk passed

+1 :green_heart:
checkstyle
4m 43s

trunk passed

+1 :green_heart:
mvnsite
6m 24s

trunk passed

+1 :green_heart:
javadoc
5m 59s

trunk passed

+1 :green_heart:
shadedclient
140m 20s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
4m 34s

the patch passed

+1 :green_heart:
compile
3m 21s

the patch passed

+1 :green_heart:
javac
3m 21s

the patch passed

+1 :green_heart:
blanks
0m 01s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
2m 17s

the patch passed

+1 :green_heart:
mvnsite
4m 00s

the patch passed

+1 :green_heart:
javadoc
3m 26s

the patch passed

+1 :green_heart:
shadedclient
153m 33s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
asflicense
5m 13s

The patch does not generate ASF License warnings.

410m 51s

Subsystem
Report/Notes

GITHUB PR
https://github.com/apache/hadoop/pull/6776

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets

uname
MINGW64_NT-10.0-17763 22b1a5d73eef 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys

Build tool
maven

Personality
/c/hadoop/dev-support/bin/hadoop.sh

git revision
trunk / f31a206648c99179c9df2df81653832d79a088be

Default Java
Azul Systems, Inc.-1.8.0_332-b09

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6776/1/testReport/

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6776/1/console

versions
git=2.44.0.windows.1

Powered by
Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

#1829

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

_ Prechecks _

+1 :green_heart:
dupname
0m 00s

No case conflicting files found.

+0 :ok:
spotbugs
0m 01s

spotbugs executables are not available.

+0 :ok:
codespell
0m 01s

codespell was not available.

+0 :ok:
detsecrets
0m 01s

detect-secrets was not available.

+1 :green_heart:
@author
0m 00s

The patch does not contain any @author tags.

-1 :x:
test4tests
0m 00s

The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
112m 01s

trunk passed

+1 :green_heart:
compile
7m 21s

trunk passed

+1 :green_heart:
checkstyle
5m 40s

trunk passed

+1 :green_heart:
mvnsite
8m 06s

trunk passed

+1 :green_heart:
javadoc
6m 58s

trunk passed

+1 :green_heart:
shadedclient
176m 16s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
5m 45s

the patch passed

+1 :green_heart:
compile
4m 11s

the patch passed

+1 :green_heart:
javac
4m 11s

the patch passed

+1 :green_heart:
blanks
0m 00s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
3m 02s

the patch passed

+1 :green_heart:
mvnsite
5m 08s

the patch passed

+1 :green_heart:
javadoc
4m 12s

the patch passed

+1 :green_heart:
shadedclient
192m 59s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

+1 :green_heart:
asflicense
6m 23s

The patch does not generate ASF License warnings.

513m 29s

Subsystem
Report/Notes

GITHUB PR
https://github.com/apache/hadoop/pull/6776

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell detsecrets

uname
MINGW64_NT-10.0-17763 36f45e04a6e8 3.4.10-87d57229.x86_64 2024-02-14 20:17 UTC x86_64 Msys

Build tool
maven

Personality
/c/hadoop/dev-support/bin/hadoop.sh

git revision
trunk / f31a206648c99179c9df2df81653832d79a088be

Default Java
Azul Systems, Inc.-1.8.0_332-b09

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6776/2/testReport/

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch-windows-10/job/PR-6776/2/console

versions
git=2.44.0.windows.1

Powered by
Apache Yetus 0.14.0 https://yetus.apache.org

This message was automatically generated.

@jojochuang Can you please review? Thanks!

Committed to trunk. Thanks @kulkabhay for your contributions!


Litmus Chaos 3.1.0 defaults k8s and litmus-checker images to docker.io and version 2.11.0

What happened: Whenever creating an experiment in the Chaos Studio it appears that the UI overrides the k8s and litmus-checker images to tag 2.11.0 and docker.io. I'm unable to discover how to override these. I have my own version of the chaoshub and everything is pointed to my own registry with version 3.1.0
What you expected to happen: image registry and tags honored.
Where can this issue be corrected? (optional)

How to reproduce it (as minimally and precisely as possible):
Override the k8s and litmus-checker tag in all faults/experiments to a different registry and tag 3.1.0.

Anything else we need to know?:
No.

Hello, I am experiencing the same problem with the same version 3.1.0.
I have even tried creating my own custom hub and modifying the templates of my experiments indicating my image registry, however when creating the experiment the same situation occurs.

PTAL @Saranya-jena


Move to OpenFaaS golang-http-template - part 2

Expected Behaviour

I would like to move Derek to the OpenFaaS golang-http-template so that the process can stay alive for longer without re-forking. This would allow access tokens etc to be cached in memory to reduce API requests and will increase memory under load.
It is also a step towards #62 (break out SDK) so that Derek can be run on other platforms or by other processes other than the OpenFaaS watchdog to enable wider use.
Current Behaviour

Each request runs in a new process meaning that panic and os.Exit() are fair-game to appear anywhere in the code. This prevents the above, so part of the work is refactoring any exiting and error handling.
Possible Solution

Template:
golang-http via: https://github.com/openfaas-incubator/golang-http-template
The initial work will be moving to the new template signature, this should be minimal, then from there testing that we never call panic/os.Exit.
The current Dockerfile is unnecessary at this point, since it could be replaced by the original Golang template. https://github.com/alexellis/derek/blob/master/Dockerfile

Would it be possible to keep panics and catch them by deferring a call to function recover?
I searched through the code, there are os.Exit invocations in vendor packages and 4 within Derek

It would be possible, but I think we could change the code as part of this instead. Can you link to the instances (with line number) please?

These are the calls to os.Exit within Derek, there are more from vendor packages :
./derek-master/main.go:
32  	if validateHmac && len(xHubSignature) == 0 {
33  		os.Stderr.Write([]byte("must provide X_Hub_Signature"))
34: 		os.Exit(1) <-- instance
35  	}
36
..
38  	if configErr != nil {
39  		os.Stderr.Write([]byte(configErr.Error()))
40: 		os.Exit(1)  <-- instance
41  	}
42
..
45  		if err != nil {
46  			os.Stderr.Write([]byte(err.Error()))
47: 			os.Exit(1)  <-- instance
48  		}
49  	}
..
53  	if err := handleEvent(eventType, requestRaw, config); err != nil {
54  		os.Stderr.Write([]byte(err.Error()))
55: 		os.Exit(1)  <-- instance
56  	}
57  }
Let me know if you need to references to panic calls as well.

Sure, I updated my previous comment with links to the corresponding line.

@cheikhshift are you still working on this? 😄

Of course, here is the OpenFaaS template I wrote a while back :
(if ti looks good we can proceed with it.  :D )
provider:
name: faas
gateway: http://<IP_ADDRESS>:80  # can be a remote server
functions:
derek:
handler: ./fn
image: alexellis/derek:0.6.4-rc2
lang: go
environment:
debug: true
customers_url:
https://raw.githubusercontent.com/alexellis/derek/master/.CUSTOMERS
validate_hmac: false
validate_customers: true
secret_path: /var/openfaas/secrets/ # use /run/secrets/ for older
OpenFaaS versions
environment_file:
- secrets.yml
# See secrets.example.yml
secrets:
- derek-secret-key
- derek-private-key
The contents in folder 'fn' has one file. (fn is an abbreviation of
function) The content of the file is a modified version of the current
main.go file. Let me know if the template looks Ok, I'll submit another
pull request.
On Mon, Jun 3, 2019 at 11:51 AM Alex Ellis<EMAIL_ADDRESS>wrote:

@cheikhshift https://github.com/cheikhshift are you still working on
this? 😄
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/alexellis/derek/issues/96?email_source=notifications&email_token=ABGGN3TVZP3LTK3QJPFK7LDPYUAUNA5CNFSM4F7VIYMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWZFA5Q#issuecomment-498225270,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABGGN3XBM6N4C2CUJTVOEPDPYUAUNANCNFSM4F7VIYMA
.

Sure.
Cheikh.

On Jun 3, 2019, at 2:46 PM, Alex Ellis<EMAIL_ADDRESS>wrote:
Can you propose a PR?
Alex
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I reviewed the PR, this is what I'm going to work on :

isolate most of the main.go file (in package root) in a new sub package called handler.
Modify the current OpenFaaS deployment file to use the Go template
We need to keep invocations to panic, as they can modify response code provided by OpenFaaS. Some dependencies make invocations to os.Exit, but as long as derek is not using any deprecated methods, things should be fine.

Thanks for your take on the changes. We have a REST-compatible template called golang-http and golang-middleware both are available via faas-cli template store list and would have the benefit of keeping Derek's process alive between requests.


Hard limit when searching documents

To avoid issues like this one: https://github.com/meilisearch/meilisearch/issues/1708, we need to fix an hard limit during the search.
WIP on the product side.

Pinging @meilisearch/docs-team since it's planned for v0.27.0. If I'm correct it will only involve a section in this page: https://docs.meilisearch.com/learn/advanced/known_limitations.html#known-limitations
Still a WIP on the @meilisearch/product-team side. You will have more details soon to help you document this.

Validated with @qdequele and @gmourier
@meilisearch/docs-team in v0.27.0, a non-customizable hard limit will be put to the search engine.
This limit will be 1000 and will only be applied to the GET/POST /indexes/:uid/search route. Calling the endpoint, Meilisearch will not return more than 1000 documents. This limit is a security fix to avoid the Meilisearch DB to be scrapped. If the Meilisearch users still want to scrap their own DB to retrieve all their documents, the GET /indexes/:uid/documents is still usable since the limit is not applied to this route.


Update MatchOperatorJudge judge method to matches

Update MatchOperatorJudge judge method to matches

IMO, We already have RegExOperatorJudge. This change is unnecessary.


Review network drivers parameters

Enhancement Request
Description
Check the main network drivers parameters (bridge, phydev, vlan_ids) and find the current mandatory/optional. The mandatory must be enforced by the core/UI, documentation needs to be updated.

Progress Status

[ ] Branch created
[ ] Code committed to development branch
[ ] Testing - QA
[ ] Documentation
[ ] Release notes - resolved issues, compatibility, known issues
[ ] Code committed to upstream release/hotfix branches
[ ] Documentation committed to upstream release/hotfix branches

I have walked through the parameters and identified few discrepancies. The items prefixed by ??? should be considered, but for compatibility reasons may be skipped.

802.1q

??? UI+core: Mandatory only PHY_DEV, not BRIDGE
UI: Remove option "No VLAN network"
UI: if "Manual VLAN ID" selected, value must be mandatory
core: require VLAN_ID or AUTOMATIC_VLAN_ID

vxlan

UI+core: Mandatory only PHY_DEV, not BRIDGE
UI: Remove option "No VLAN network"
UI: if "Manual VLAN ID" selected, value must be mandatory
core: require VLAN_ID or AUTOMATIC_VLAN_ID

ovswitch

UI: Add PHY_DEV input
??? UI+core: Mandatory only PHY_DEV, not BRIDGE
UI: if "Manual VLAN ID" selected, value must be mandatory

ovswitch_vxlan

UI+core: Mandatory only PHY_DEV, not BRIDGE
UI: if "Manual VLAN ID" or "Manual Outer VLAN ID" selected, values must be mandatory
UI+core: require OUTER_VLAN_ID or AUTOMATIC_OUTER_VLAN_ID


Limit PV length to search depth

Codecov Report

Merging #72 (8ad00bf) into main (afe1450) will increase coverage by 0.04%.
The diff coverage is 96.42%.

@@            Coverage Diff             @@
##             main      #72      +/-   ##
==========================================
+ Coverage   96.93%   96.98%   +0.04%
==========================================
  Files          58       58
  Lines        6135     6134       -1
==========================================
+ Hits         5947     5949       +2
+ Misses        188      185       -3

Impacted Files
Coverage Δ

engine/src/engine.rs
94.25% <80.00%> (ø)

engine/src/best_move_handler.rs
85.71% <100.00%> (+1.93%)
:arrow_up:

search/src/alpha_beta.rs
100.00% <100.00%> (ø)

search/src/negamax.rs
98.26% <100.00%> (-0.02%)
:arrow_down:

movegen/src/move.rs
97.94% <0.00%> (+0.68%)
:arrow_up:

Continue to review full report at Codecov.

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


Feature request - snippet mode

This is a great filter, thank you! I saw in the docs for the pandoc-include-code filter you've cited for inspiration that they have a snippet-mode feature, as well, so the line numbers in the referenced code can change without breaking the reference in the docs:
// start snippet wow
int main() {
    printf("such performance");
}
// end snippet wow

This would be a great feature to enable in this extension. I'd offer to develop it myself, but I have no experience with Lua whatsoever. Thanks again for this extension, it's very useful as is.

For prior art, see https://docs.asciidoctor.org/asciidoc/latest/directives/include-tagged-regions/

This would be great to have. In fact, it is not easy to maintain a significant portion of code outside of the notebook (which would have many upsides, such as code formatting that does not require searching for pieces within the quarto document, but that can instead be done on the source document as a whole).
So I might go even a step further and say this is a necessary feature. It does not look like PRs or issues are checked on this repository sadly, and it is a shame because this would be very useful to have.

It does not look like PRs or issues are checked on this repository sadly, and it is a shame because this would be very useful to have.

Just let me say that this is unpleasant assumption for the maintainers. We do watch the repo, as many others including main Quarto dev repo.
As any other project, Team is limited and for sure time is limited too. We do our best to do the best work, and this include priorisation.
Maintenance work does not mean adding new feature all the time. And Projects are Open Source - so we welcome any PR by community. If anyone wants to tackle this to add the feature, please do. We'll be happy to review a PR.

Just let me say that this is unpleasant assumption for the maintainers. We do watch the repo, as many others including main Quarto dev repo.

My apologizes, the efforts of the team are appreciated. This (and the rest of quarto) is great. I am running on the on the assumption that in any project some number of features/extensions will be abandoned since there is so much to maintain.
I will contribute per the other thread.

Addressed in #12


Enhance distance sampling for spectral volume scattering

Now we draw distance samples from the distribution that is based on a norm of extinction spectrum, and this leads to fireflies.
Instead, we need to choose a component of the extinction spectrum randomly, then sample distance for this component, and combine results via MIS.

Solved in #1518 .


ISPN-10484 Upgrade Protostream to 4.3.0.Alpha10

https://issues.jboss.org/browse/ISPN-10484
https://issues.jboss.org/browse/ISPN-10483

4 unrelated failures. re-triggering

1 failure, still unrelated. I'm going to merge this myself as it's very low risk and it only changes a version in pom.xml.

merged


macvtap: fix ownership change of the tap interface

What this PR does / why we need it:
Virt-handler needs to perform an extra step for non-root VMIs with
macvtap interfaces: it needs to set the owner of the device files as the
pod user. Thus, to identify the ifindex of a pod interface, it was
needed to update the algorithm to find the corresponding pod interface.
Before this patch we were attempting to change the ownership of the file
pointed to by the name of the multus network - i.e. the network
attachment definition name. This was wrong: we need to use the name of
the pod interface (macvlan side). This only worked in CI since the name
of the net-attach-def used is net1 - which matches the name of the pod
interface, since the algorithm requests for multus interfaces named
net<X> where X is the ordinal of the interface in the
vmi.Spec.Domain.Devices.Interfaces slice.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #9633
Special notes for your reviewer:
Release note:

Fix ownership of macvtap's char devices on non-root pods

/hold still have to validate this locally.

/cc @EdDev

/test pull-kubevirt-e2e-k8s-1.26-sig-compute

/retest-required

/hold cancel
:man_facepalming: forgot to remove the hold ...


Fixed issue with input view height after dismissing modally presented…

… view controller

Codecov Report

Merging #531 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #531      +/-   ##
==========================================
- Coverage   62.98%   62.94%   -0.05%
==========================================
  Files          77       77
  Lines        4034     4037       +3
==========================================
  Hits         2541     2541
- Misses       1493     1496       +3

Impacted Files
Coverage Δ

...Additions/Source/Input/ChatInputBarPresenter.swift
50.92% <0%> (-1.46%)
:arrow_down:

Continue to review full report at Codecov.

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


Add highlight in inventory for jugs of wine vs empty jugs

It's hard to tell the difference.

I'd agree with this, general items that are similar in this type of case should be more clearer.

Use inventory tags