Allow to call internal handlers within withHandlers

I like the idea described here #333
BTW seems like author don't want to finish it.
The idea is to allow to call internal handlers within withHandlers, as for now it's not a rare case for me to create a chain of withHandlers just to allow reuse some handlers.
Usage example
withHandlers({
    selfHandler: props => val => {
      selfHandlerCallSpy({ props, val })
    },
    handler: (_, { selfHandler }) => val => {
      selfHandler(val) // it works
    },
})

Before to do that I did:
withHandlers({
    selfHandler: props => val => {
      selfHandlerCallSpy({ props, val })
    },
}),
withHandlers({
    handler: ({ selfHandler }) => val => {
      selfHandler(val) // it works
    },
})

BTW I'm not sure do we need this or not, as even I like the idea I'm pretty happy with withHandlers chain

Codecov Report

Merging #401 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master    #401   +/-   ##
======================================
  Coverage    88.8%   88.8%
======================================
  Files          50      50
  Lines         375     375
======================================
  Hits          333     333
  Misses         42      42

Impacted Files
Coverage Δ

src/packages/recompose/withHandlers.js
95.45% <100%> (ø)
: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 bdf81f4...c384ddf. Read the comment docs.

🎉
Awesome!!

+1

Why not just
withHandlers(() => {
  const selfHandler = props => val => {
    selfHandlerCallSpy({ props, val })
  }

  return {
    selfHandler,
    handler: (props) => val => {
      selfHandler(props, val)
    },
  }
})

this can break code like this:
compose(
  withState('email', 'changeEmail', ''),
  withHandlers({
    changeEmail: props => e => {
      props.changeEmail(e.target.value)
    },
    onSubmit: props => e => {
      e.preventDefault()

      props.changeEmail('')
      props.submit()
    }
  })
)(Component)

It cant, self handlers are passed not via props

in the example changeEmail and onSubmit are using the changeEmail function from withState, with this pr onSubmit will use the changeEmail inside withHandlers and it will not work.

It will not, as your code is wrong. self changeEmail is not passed via props

To be clear current PR does not change previous behaviour. It just add additional argument alongside with props

oh... if it's with an additional parameter the code will not broke :+1:
in any case, the code work, the changeEmail that the handlers are using is the one from withState

In my opinion this should be transparent to be able to call other handlers from handlers, no need to pass selfHandler or self .

We also need to update the type def.

Im not sure we need this :-) So not sure we need typedefs

IMO we don't need this. Just assign the reused handler to a variable inside
the closure is good enough to me.
Ivan Starkov<EMAIL_ADDRESS>2017年8月15日 週二，下午5:21寫道：

Im not sure we need this :-) So not sure we need typedefs
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/acdlite/recompose/pull/401#issuecomment-322421399,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABng1oIAx9MhunjkE3aJEjrKvVxkgxEmks5sYWM3gaJpZM4NzK1P
.

Having to double invoke every wrapped handler like that seems unnecessarily annoying.  There's already a convention like this is many other library where they access ownProps in some way.  This really does seem like it would be very helpful

Imo it depends. We are always have some edge cases. Every simple library after some time becomes not so simple because of that. For now I think that its not the reason to change the simple implementation.
For now for me simplicity matters more than ability to support every user case.
I commercial world this isnt true, but this is opensource

To access a handler from inside another one, currently I do something like:
```

withHandlers(() => {
const self = {
handlerX: (props) => (e) => {
console.log(e)
},
handlerY: () => (e) => {
self.handlerX(e)
}
}
return self
})

Was confusing to work this out the first time though, it would be nice if they were just in props.

@rek The problem with your code, if I'm not wrong, is that you are passing e as your handlerX´s props. The correct way would be:
withHandlers(() => {
		const self = {
			handlerX: (props) => (e) => {
				console.log(e)
			},
			handlerY: (props) => (e) => {
				self.handlerX(props)(e)
			}
		}
		return self
	})

The problem then would be that your handlerX would get a not-up-to-date props (it would consider the props sent - in the moment - to handlerY). Which would force you to do something like:
withHandlers({
  getProps: props => () => props,
}),
withHandlers(() => {
		const self = {
			handlerX: (props) => (e) => {
				console.log(e)
			},
			handlerY: (props) => (e) => {
				self.handlerX(props.getProps())(e)
			}
		}
		return self
	})

I would love to have this feature too.
Modern Javascript is using arrow functions instead of closures. When writing a React component, without recompose, you expect methods to be able to reference each other.
If withHandlers is meant to replace the methods you would add in a React component, then it seems natural to add the support. Or maybe withHandlers is not meant to be so?

Modern Javascript is using arrow functions instead of closures.
@vampolo Recompose does use arrow functions and closures a lot internally. Recompose is more about functional programming instead of OOP which is the reason I expect to refer to other functions via closures instead of self-reference.

For now, this quick hack lets me call handlers inside withHandlers. Inspired by @istarkov solution and other answers:
compose(
    withHandlers({
        foo: props => () => {
           //Make magic
        }
    }),
    withHandlers({
        bar: ({foo}) => () => {
            foo()
        }
    })
)(Component)

props.foo() is accessible on the second withHandlers.
For simple use cases, it works fantastically, no need to create a clojure or do scope wizardry.

hope this feature will come true

@WreewanMorhee better to use Hooks now instead of this :)


The script call result does not contain a 'returnReceipt' on v0.71.1

What version of fuels-ts are you using?
0.71.1
Steps to Reproduce
Follow the the quickstart guide for frontend but install latest version of fuels
Expected Behavior
Run the frontend without The script call result does not contain a 'returnReceipt'. error to be able to interact with the contract.
Actual Behavior
Running the frontend from quickstart guide throw error on v0.71.1. Only versions up to v0.69.1 works without error:
ERROR
The script call result does not contain a 'returnReceipt'.

Receipts:
[
  {
    "type": "Panic",
    "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "reason": "0x2724028a0000000",
    "pc": "0x2868",
    "is": "0x2868",
    "contractId": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  {
    "type": "ScriptResult",
    "result": "0x2",
    "gasUsed": "0x0"
  }
]
Error: The script call result does not contain a 'returnReceipt'.

Receipts:
[
  {
    "type": "Panic",
    "id": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "reason": "0x2724028a0000000",
    "pc": "0x2868",
    "is": "0x2868",
    "contractId": "0x0000000000000000000000000000000000000000000000000000000000000000"
  },
  {
    "type": "ScriptResult",
    "result": "0x2",
    "gasUsed": "0x0"
  }
]
    at decodeCallResult (http://localhost:3000/static/js/bundle.js:61269:11)
    at decodeContractCallScriptResult (http://localhost:3000/static/js/bundle.js:61452:95)
    at InvocationCallResult.getDecodedValue (http://localhost:3000/static/js/bundle.js:61581:28)
    at new InvocationResult (http://localhost:3000/static/js/bundle.js:61555:23)
    at new InvocationCallResult (http://localhost:3000/static/js/bundle.js:61655:5)
    at InvocationCallResult.build (http://localhost:3000/static/js/bundle.js:61667:28)
    at FunctionInvocationScope.dryRun (http://localhost:3000/static/js/bundle.js:61936:47)
    at async getCount (http://localhost:3000/static/js/bundle.js:76:11)

You may have a version mismatch of some sort.
Please try using the suggested 0.60.0 version and let me know how it goes.

Which network are you trying to connect to? Beta-4? Beta-4 is supported until v0.69.1, whereas everything above is targeting the upcoming beta-5 network.

Yes, I'm connecting to Beta-4. Thanks, that clears it up!


Added tests for definitions of gates ccx and crz

Summary
Partially fixes #2964
Updated CHANGELOG
Details and comments
Done as part of #2964
Future PRs will aim at the other standard gates

Thank you for approving it!


Suggestion for embedding Click inside asyncio-based apps

#2033 and #85 addresses how to run "self-contained" async functions inside Click commands and it is easily achievable by using asyncio.run().  Here "self-contained" means that each function runs to the completion of the entire event loop's lifecycle (i.e., when Click serves a CLI app).
Though, I feel there is lack of support from Click when I try to embed Click inside an asyncio event loop that is already established and invoke coroutines inside the synchronous command functions (e.g., in a telnet server handler of prompt_toolkit), because asyncio.run() and loop.run_until_complete() cannot be executed inside an already-running event loop started by another asyncio.run() and its coroutines/callbacks.
My current solution is:
import asyncio
import functools
import shlex
import traceback
from contextvars import ContextVar, copy_context

import click
from prompt_toolkit import PromptSession

command_done: ContextVar[asyncio.Event] = ContextVar("command_done")

@click.group(add_help_options=False)
def monitor_cli():
    pass

async def cli_loop():
    ...
    prompt_session: PromptSession[str] = PromptSession()
    while True:
        try:
            user_input = (
                await prompt_session.prompt_async("command> ")
            ).strip()
            args = shlex.split(user_input)
        except (EOFError, KeyboardInterrupt, asyncio.CancelledError):
            return
        except Exception:
            _print_error(traceback.format_exc())
        else:
            command_done_event = asyncio.Event()
            command_done_token = command_done.set(command_done_event)
            try:
                ctx = copy_context()
                ctx.run(
                    monitor_cli.main,
                    args,
                    prog_name="",
                    standalone_mode=False,  # type: ignore
                )
                # Before displaying a new prompt, we need to wait until the command is done.
                await command_done_event.wait()
            finally:
                command_done.reset(command_done_token)

if __name__ == "__main__":
    asyncio.run(cli_loop())

...

def custom_help_option(cmdfunc):
    """
    A custom help option to ensure setting `command_done_event`.
    If we just rely on the Click's vanilla help option,
    `await command_done_event.wait()` inside `cli_loop()` will never return.
    """

    @auto_command_done  # <-- this is what we need to extend here
    def show_help(ctx: click.Context, param: click.Parameter, value: bool) -> None:
        if not value:
            return
        click.echo(ctx.get_help(), color=ctx.color)
        ctx.exit()

    return click.option(
        "--help",
        is_flag=True,
        expose_value=False,
        is_eager=True,
        callback=show_help,
        help="Show the help message",
    )(cmdfunc)

def auto_command_done(cmdfunc):
    @functools.wraps(cmdfunc)
    def _inner(ctx: click.Context, *args, **kwargs):
        command_done_event = command_done.get()
        try:
            return cmdfunc(ctx, *args, **kwargs)
        finally:
            command_done_event.set()

    return _inner

def auto_async_command_done(cmdfunc):
    @functools.wraps(cmdfunc)
    async def _inner(ctx: click.Context, *args, **kwargs):
        command_done_event = command_done.get()
        try:
            return await cmdfunc(ctx, *args, **kwargs)
        finally:
            command_done_event.set()

    return _inner

@monitor_cli.command()
@custom_help_option
@auto_command_done  # shortcut for normal sync command functions
def do_sync_work():
    ...

@monitor_cli.command()
@custom_help_option
def do_async_work():

    @auto_async_command_done  # shortcut for async command functions
    async def _do_async_work():
        await asyncio.sleep(1)
        ...

    asyncio.create_task(_do_async_work())

The above snippet works as expected, but it brings a quite much amount of boilerplates.
My suggestions are to:

Allow adding decorators to the intrinsic help option's callback
Add intrinsic decorators like auto_async_command_done and auto_async_command_done with a wrapper API of command_done_event.wait()

Probably we could write an AsyncCommand class (exposed as click.async_command()) and BaseCommand.async_main() to handle these seamlessly.

The easy way out is to Install asyncclick. Just import asyncclick as click and you can use async commands, callbacks and so on as you please.
Async coverage should be reasonably complete; if you hit a callback that you need to be async which isn't, please file a bug.


Wrong marshalling for pszVerb in Shell32.IFolderView2.InvokeVerbOnSelection()

Describe the bug and how to reproduce
Call Shell32.IFolderView2.InvokeVerbOnSelection() with non-empty verb.
On such call nothing happens, no error is reported.
The issue is with current declaration of this method
		/// <summary>Invokes the given verb on the current selection.</summary>
		/// <param name="pszVerb">
		/// <para>Type: <c>LPCSTR</c></para>
		/// <para>A pointer to a Unicode string containing a verb.</para>
		/// </param>
		/// <remarks>If pszVerb is <c>NULL</c>, then the default verb is invoked on the selection.</remarks>
		// https://docs.microsoft.com/en-us/windows/desktop/api/shobjidl_core/nf-shobjidl_core-ifolderview2-invokeverbonselection
		// HRESULT InvokeVerbOnSelection( LPCSTR pszVerb );
		void InvokeVerbOnSelection([In, MarshalAs(UnmanagedType.LPWStr)] string? pszVerb);

As it said in comment, pszVerb should be LPCSTR, so proper marshalling should be MarshalAs(UnmanagedType.LPStr)] not UnmanagedType.LPWStr
With UnmanagedType.LPStr everything works as expected.
text in MSDN help is also misleading, stating that Unicode string is expected, while they clearly have it defined as ANSI string.

Fixed for 4.0.1


Split PCs/GRM script into compononents

I'm still working on a working example, but wanted to start the review. @smgogarten I'll tag you in a few spots that I'm not 100% sure on

@smgogarten I incorporated most of the changes that we talk about. I think it's ready for review, but I haven't tested it on real data yet. I'll let you know when I get that done

I've incorporated @smgogarten's edits. @HanleyKingston, this included the edits you made. I'm going to test this now, but I have some setup to do. Hanley, if you end up wanting to use this and get a chance to test it before I do, let me know. You should check the diff in the last commit since there are some changes to argument names

I completed a test of each of these scripts on the Caribbean Hispanics data. Also closes #5


SSLError in task collection

ERROR: Exception:
Traceback (most recent call last):
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
    yield
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 561, in read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 527, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/usr/lib/python3.10/http/client.py", line 466, in read
    s = self.fp.read(amt)
  File "/usr/lib/python3.10/socket.py", line 705, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib/python3.10/ssl.py", line 1303, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib/python3.10/ssl.py", line 1159, in read
    return self._sslobj.read(len, buffer)
ssl.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2578)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
    return func(self, options, args)
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 377, in run
    requirement_set = resolver.resolve(
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 179, in resolve
    self.factory.preparer.prepare_linked_requirements_more(reqs)
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 552, in prepare_linked_requirements_more
    self._complete_partial_requirements(
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 467, in _complete_partial_requirements
    for link, (filepath, _) in batch_download:
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/network/download.py", line 183, in __call__
    for chunk in chunks:
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/cli/progress_bars.py", line 53, in _rich_progress_bar
    for chunk in iterable:
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks
    for chunk in response.raw.stream(
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 622, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 560, in read
    with self._error_catcher():
  File "/usr/lib/python3.10/contextlib.py", line 153, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/lib/python3.10/site-packages/pip/_vendor/urllib3/response.py", line 449, in _error_catcher
    raise SSLError(e)
pip._vendor.urllib3.exceptions.SSLError: [SSL: DECRYPTION_FAILED_OR_BAD_RECORD_MAC] decryption failed or bad record mac (_ssl.c:2578)

[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: /data/app/Tasks/1/fractal-tasks-core/1.3.2/venv/bin/python -m pip install --upgrade pip

Maybe it's a one-off on my side or something to do with an older version of docker running.
I've updated the docker version and tried again. Now it worked as expected. Not sure what caused it, but closing for now


Point to version 2.0.0 of phantomjs

Not sure what's the deal with the windows version. I don't have access to anything running windows so debugging is going to be difficult.

@tmcgilchrist I took a quick look inside phantomjs-2.0.0-windows.zip and it seems they moved phantomjs.exe into the bin folder, as per other platforms. Adding 'bin' to the path at line 152 of platform.rb should fix it:
File.expand_path File.join(Phantomjs.base_dir, platform, 'bin', 'phantomjs.exe')

then updating platform_spec.rb at line 166:
Phantomjs.path.should =~ /win32\/bin\/phantomjs.exe$/

I too lack access to a Windows installation with working Ruby, so haven't tested this...
(I can submit as a separate PR if you like but seems easier to update this one)

I'd love to see this pull go through. We've been seeing issues with older versions of PhantomJS that we believe 2.0 could resolve. Any update on this?

Can we re-open any version that pulls in the latest 2.0? We are stuck on that version.


Produce consistent error message format

add RestExceptionHandler and support types
add handling for error types when they occur:

JSON not readable
data validation errors (TBD)
Transaction service failures
internal server error
other errors (catch-all)

increase unit and integration test coverage

Resolves:
DACT-129

I'll fix the Sonar security hotspot and minor issues.


Error of bert

@iyuge2 @Columbine21
Hi, have a problem when I run run.py file.
Hope to get your help
The error is located in BertTextEncoder.py :

text:torch.Size([64, 39, 768])
input_ids:torch.Size([64, 768]) | input_mask:torch.Size([64, 768]) | segment_ids: torch.Size([64, 768])

https://github.com/thuiar/MMSA/blob/b2e70bbd198ba8e8dc041f5e059c3baa2027b34a/models/subNets/BertTextEncoder.py#L62-L64
Error in line 62, I still don't know how to solve this problem.
Detailed error message:
opt/conda/conda-bld/pytorch/work/aten/src/THC/THCTensorIndex.cu:361: void indexSelectLargeIndex(TensorInfo<T, IndexType>, TensorInfo<T, IndexType>, TensorInfo<long, IndexType>, int, int, IndexType, IndexType, long) [with T = float, IndexType = unsigned int, DstDim = 2, SrcDim = 2, IdxDim = -2, IndexIsMajor = true]: block: [79,0,0], thread: [0,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
Traceback (most recent call last):
  File "/media/yiwei/yiwei-01/project/Emotion/MMSA/MMSA-old/trains/singleTask/MISA.py", line 66, in do_train
    outputs = model(text, audio, vision)
  File "/media/yiwei/yiwei-01/project/Emotion/MMSA/MMSA-old/models/singleTask/MISA.py", line 281, in forward
    output = self.alignment(text, audio, video)
  File "/media/yiwei/yiwei-01/project/Emotion/MMSA/MMSA-old/models/singleTask/MISA.py", line 195, in alignment
    bert_output = self.bertmodel(text) # [batch_size, seq_len, 768]
  File "/media/yiwei/600G/anaconda3/envs/MMSA/lib/python3.6/site-packages/torch/nn/modules/module.py", line 547, in __call__
  File "/media/yiwei/yiwei-01/project/Emotion/MMSA/MMSA-old/models/subNets/BertTextEncoder.py", line 68, in forward
    token_type_ids=segment_ids.to('cuda'))[0]  # Models outputs are now tuples
ib/python3.6/site-packages/torch/nn/functional.py", line 1371, in linear
    output = input.matmul(weight.t())
RuntimeError: cublas runtime error : resource allocation failed at /opt/conda/conda-bld/pytorch/work/aten/src/THC/THCGeneral.cpp:216

I know the further reason, the problem still lies in data processing.
In here:
https://github.com/thuiar/MMSA/blob/b2e70bbd198ba8e8dc041f5e059c3baa2027b34a/models/subNets/BertTextEncoder.py#L47-L55

In the latest version:

The pkl your provide shape of text is torch.Size([32, 3, 39]).
The pkl generated by DataPre.py, the text shape is torch.Size([32, 39, 3])

In the previous version:
The data's text shape is torch.Size([64, 39, 768])


[Feature request] Support silent mode

If I started listening server always show log in command line. That would not be a problem. But if I use part of a system then it is a problem! If I set the log option to null or false, I get error.
I would like to have a 'slient' option.

If you initialize a new bunyan instance, you can set the level to fatal and it won't output any errors since fatal is never used.
const quietLog = bunyan.createLogger({
  name: 'quiet-logger',
  level: 60
});

const ftp = new FtpServer({
  log: quietLog
  ...
});


Could not load content for org-dartlang-sdk:///lib/_internal/js_runtime/lib/js_primitives.dart (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
multi Stack layer
Could not load content for org-dartlang-sdk:///lib/_internal/js_runtime/lib/js_primitives.dart (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)
Expected results
show correct
Actual results
Could not load content for org-dartlang-sdk:///lib/_internal/js_runtime/lib/js_primitives.dart (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME)
Code sample
Code sample
[Paste your code here]

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.3, on Arch Linux 6.1.54-1-lts, locale zh_CN.UTF-8)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2)
[!] Proxy Configuration
    ! NO_PROXY is not set
[✓] Connected device (2 available)
[✓] Network resources

! Doctor found issues in 3 categories.

Hi @Silentdoer,
Please provide a minimal complete reproducible code sample along with steps to reproduce so that we can investigate this issue.
Thank you


[feature request] - Alerta - Allow service to be a template and allow timeouts

Hi,
it would be very helpful, if the service field of an Alerta event would be a template in Kapacitor, so it can be assigned with a user defined value. Usecase is a microservice architecture, where we would be able to set the service in the alert to the actual service that caused it.
Second nice to have feature would be alert timeouts. Alerta lets you define a timeout in seconds for every alert event after which it will be deleted.
Regards
hrzbrg

Is this the same as #1543 and thus fixed now by #1545?

@evaryont Yes, I'll close this issue, thanks for updating.


chore: update publishing to show steps to run the translations workflow

Description
Publishing should contain a guide for how new strings are pushed to Locize for translations through the workflow

Why github action is updated?


How do i uninstall yakyak from my machine?

Please reply

@deepanshu-nickelfox delete the binary and it will be uninstalled.

Actually, @jeffbyrnes
Sudo snap remove yakyak, worked for me
Thanks btw ☺


Add single-machine deployment example cfgs and scripts

This PR adds a new set of reference configurations and launch scripts for single-machine deployments:

micro-quickstart
small
medium
large
xlarge

The micro-quickstart is sized for small machines like laptops and is intended for quick evaluation use-cases.
The other configurations are intended for general use single-machine deployments. They are sized for hardware roughly based on Amazon's i3 series of EC2 instances.
The old tutorial cluster configuration has been replaced with micro-quickstart, with the tutorials also pointing users to the other single-server examples if they wish to use a bigger machine.
This PR also adds example configurations for a clustered deployment based on the master/data/query organization, along with associated launch scripts.

I think there are still a small set of things missing:

Some transition docs describing how Druid should be evaluated (when to use single server, when to use clustered mode)
In clustered mode docs, talk about master/query/data servers
In clustered docs, master/query/data servers should be started via scripts

Some transition docs describing how Druid should be evaluated (when to use single server, when to use clustered mode)

In clustered docs, master/query/data servers should be started via scripts instead of two separate command lines

I'm working on another doc update PR that will provide guidance on important performance tuning properties, which will also adjust the current cluster.md docs and address these points.

Some transition docs describing how Druid should be evaluated (when to use single server, when to use clustered mode)

In clustered docs, master/query/data servers should be started via scripts instead of two separate command lines

I'm working on another doc-only update PR that will provide guidance on important performance tuning properties, which will also adjust the current cluster.md docs and address these points.

Cool. Maybe the ToC should reflect the path to production. Laptop --> Single Server --> Clustering (non-HA) --> Clustering (HA)

Cool. Maybe the ToC should reflect the path to production. Laptop --> Single Server --> Clustering (non-HA) --> Clustering (HA)

Sounds good, I'll add that structure in the follow-on PR

Cool. Maybe the ToC should reflect the path to production. Laptop --> Single Server --> Clustering (non-HA) --> Clustering (HA)

By the way, I don't think there's a need to separate 'laptop' and 'single server' (people can treat their laptop as a single server if they want to - there is really no meaningful difference). I also don't think there's a need to separate 'Clustering (non HA)' from 'Clustering (HA)' (HA should just be a section at the end of the clustering docs).


Fix some issues with golangci-lint, urllint, imagelint, and misspell

What this PR does / why we need it

This fixes a number of issues with urllint, imagelint, golangci-lint and misspell. They include:

relocates golangci-lint, urllint and imagelint into subdirectories of check to help try to clean up and keep "like" things together (aka linting/checks)
removes the need to build binaries for urrlint and imagelint which would leave things on these binaries on the filesystem to clean up
removes the generic bin directory (technically any path with the substring bin in it) from the .gitignore which was probably used to prevent the golangci-lint, misspell, urllint and imagelint binaries from being checked in on accident
fixed an issue with urllint which would error out on directories with an extension of .yaml:

[vonthd@rocky8 community-edition]$ make urllint
cd ./hack/check/urllinter && \
go run main.go -path=/home/vonthd/go/src/github.com/vmware-tanzu/community-edition -config=.urllintconfig.yaml -summary=true -details=Fail
2022/03/21 13:47:03 read /home/vonthd/go/src/github.com/vmware-tanzu/community-edition/addons/packages/local-path-storage/0.0.19/bundle/config/upstream/local-path-storage.yaml: is a directory

added functionality needed for the relocation of the imagelint utility which now allows the utility to take in fully qualified paths to the addons folder
fixed an issue in which the misspell and golangci-lint utilities would only ever be downloaded once because it was hidden behind the bin in .gitignore. Moved the download (and subsequent clean up) of the utility into individual respective /tmp folders. This would effectively mirror what a build system does anyways which is always download the latest utilities. The options are to: 1) download a static version of the utility through the ensure-deps mechanism, or 2) always download the utilities so we catch a build failure early since a build node always downloads them

Which issue(s) this PR fixes

Verified:

make urllint checks urls
make imagelint checked images
make misspell caught at least one spelling error
make check which runs everything

Special notes for your reviewer

NA

Ok, I think this is ready now

helloworld-go.example.svc.cluster.local

I know what happens... the urllint also can't take in a fully qualified path which is why it isn't filtering based on the exclude list. Will fix that right now.


[BUG] Pandas FutureWarning thrown when getting dataframes from a function

Describe the bug
When using pandas dataframes df["col"] = df["col"].apply(foo) should pass, regardless of how df is created
In the examples below, test_1 runs as expected, while test_2 fails with
FutureWarning: ChainedAssignmentError: behaviour will change in pandas 3.0!

Note this warning only occurs after cythonising.
Using Pandas 2.2.2 & Cython 3.0.10
Code to reproduce the behaviour:

import pandas as pd

class MyTestClass:

    def __init__(self):
        self.df = pd.DataFrame({"c1": ["a", "b", "c"], "c2": ["d", "e", "f"]})

    def get_df(self):
        return pd.DataFrame({"c1": ["a", "b", "c"], "c2": ["d", "e", "f"]})

    def _foo(self, _):
        return "foo"

    def test_1(self):
        df = self.df
        df["c1"] = df["c1"].apply(self._foo)

    def test_2(self):
        df = self.get_df()
        df["c1"] = df["c1"].apply(self._foo)

# Tests

def test_1():
    df = MyTestClass().test_1()

def test_2():
    df = MyTestClass().test_2()

Expected behaviour
No response
OS
Windows 10
Python version
3.11
Cython version
3.0.10
Additional context
No response

Duplicate #6013

Thanks for the report. I don't think this is something that Cython can realistically fix. Pandas have chosen a very implementation-dependent way to try to detect this warning that Cython can't (and shouldn't) really emulate.


Added raylib math functions to vector types

Added all raylib vector math functions to the vector types as well as overloaded arithmetic operators where it made sense. Did not add Vector3ToFloat as c++ as far as I can tell does not trivially support returning created arrays.

This is great! I've added an initial Matrix one too. Thanks so much.


040_backup.rst line 228 - #4280 --exclude-caches

Proposal for issue #4280
What does this PR change? What problem does it solve?
The documentation of Excluding Files is not correct. The behavior of the software very good and should be described he way it works. Correct is: Files other than CACHEDIR.TAG and all subfolders are excluded.
Was the change previously discussed in an issue or on the forum?
Closes #4280
Checklist

[ ] I have read the contribution guidelines.
[ ] I have enabled maintainer edits.
[ ] I have added tests for all code changes.
[ ] I have added documentation for relevant changes (in the manual).
[ ] There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
[ ] I have run gofmt on the code in all commits.
[ ] All commit messages are formatted in the same style as the other commits in the repo.
[x] I'm done! This pull request is ready for review.

This is the first merge commit request in my life.
@Maintainers:
Please add new commits to my patch-1 branch and/or implement the change.


Add cake-contrib user

First of all, I wanted to thank you for adding to the Cake community by adding this addin.
I was just wondering if you had seen this blog post:
http://cakebuild.net/blog/2016/08/cake-contribution-organization
We are currently going through a process of increasing the visibility of addins, and also trying to ensure their long term maintainability.
To that end, we are asking addin creators to add the cake-contrib user on NuGet as a co-owner (this can be done through the NuGet website by clicking on Manage Owners on the package page).
Would you be interested in doing this? If you have any questions about this, please let me know. There was some initial concern that the Cake Team were trying to "take over" packages, and that couldn't be further from the truth, and if you have this concern, or others, I would like to address them.
Thanks!

I added the user @cake-contrib pending approval

@Meir017 that is great, thank you very much.  I have accepted the invite 😄

@Meir017 related to this, let me know if you are interested in moving this project under the Cake-Contrib Organisation on GitHub.  You would have the same access rights to the repository as you do now, it is just that it would live under the Cake-Contrib Organisation.

@gep13 Yup!

@Meir017 The process for adding to the Cake-Contrib Organisation is documented here: https://github.com/cake-contrib/Home#how-do-i-as-an-addin-author-transfer-a-repository-to-the-organisation

@gep13 Can I make you the owner of the repository so you can move it into the cake-contrib org?

@Meir017 unfortunately not, no.  I have tried various different combinations, and the only one that seems to work reliably is to do an individual to individual transfer, and then I can move it into the Cake-Contrib Organisation.

@Meir017 the steps needed to transfer the repository into the Organisation are just about complete.
I am currently running a script to synchronise GitHub permissions over to AppVeyor.  Once that work is complete, you should have all the access that you need.
Please let me know if you have any questions.

I noticed that the cake main repo creates the releases automatically when the current milestone is completed, how is that done?
I saw the GitReleaseManager tool being used in the .cake scripts but I couldn't put it all together

@Meir017 most of the addins that are in the Cake-Contrib Organisation now make use of the Cake.Recipe set of re-usable scripts.  This takes care of most things, like compilation, style checking, publishing to MyGet, publishing to NuGet, generating release notes, etc.
You can find the repo here:
https://github.com/cake-contrib/Cake.Recipe
And some documentation here:
https://cake-contrib.github.io/Cake.Recipe/docs/
If you are interested, we can switch this repository to use Cake.Recipe and to start taking advantage of that.

I would like to do that

Sweet!  Are you happy to have a read through the documentation and compare to other repos that are using it, or how would you like to get started?

found this while trying to use Cake.Recipe https://github.com/cake-build/bakery/issues/77

Ouch! That is definitely an issue 😢

#9


Explorer showing washed colors on first run only

[ ] I've read FAQ.
[ ] I've restarted the affected app after adding rule for it.
[ ] I've checked other issues and this is not a duplicate.
Describe the bug
I have washed colors when starting any file explorer
Rule
The rule used for the target application
Target Application

Application Name Explorer
Application Version Explorer windows 11 22h2 build 22621.1265

To Reproduce
Steps to reproduce the behavior:

Go toexplorer
open first time
see washed colors
reopen the explroer
colors back to normal

Expected behavior
A clear and concise description of what you expected to happen.
normal colors
Screenshots
If applicable, add screenshots to help explain your problem.

Windows Version
E.g. Windows 10 build 19042, Windows 11 Build 22000, Windows 11 Build 25217 Insider Dev Channel, ...
windows 11 22h2 build 22621.1265
Additional context
Add any other context about the problem here.

I encountered the same problem as you.
#260 marked.

          Try disabling it on #32770 (Dialog) class.

Originally posted by @dongle-the-gadget in https://github.com/MicaForEveryone/MicaForEveryone/issues/253#issuecomment-1434546978


extensions to compat.go

Hey Garrett! tcell is awesome, of course. You've heard me sing its praises. And I'm still loving it!
The backstory to this PR is that I ported an emacs-ish editor written in Go that was using termbox-go over to use tcell. That's here https://github.com/glycerine/gemacs for reference.  I used the compat.go mode, which is lovely.
In that process, there were a handful of things that I found that were useful/needed/more backwards compatible with termbox-go.
a) Its nice to be able to get at the screen that compat is using. So I added a set/get pair.
b) I needed a way to generate tcell compatible styles from an importing package. Thus MakeStyle().
c) The EventType iota/enum had been re-ordered compared to termbox-go; for backwards compatibility purposes, I made the order match what termbox-go is doing.
d) In order to poll, since makeEvent isn't exported, I added a method to directly poll a given screen.
e) Lastly, some constants weren't defined that the editor was using, so I filled those in.

Too busy at the moment to do more on this--and no incentive since my fork works fine for me. I can close it, but it might be nice to leave this open for anyone else who needs a solution in the meantime. Reopen it if you like.


Added Typed.js Animation

Probably not the most efficient implementation but oh well

Seems awesome, but can you make a preview with Github pages? Currently http://magicp.github.io/afullstop is inaccessible.

Oh right, sorry
Should be up now although I think there's now an issue with the name showing up.

Can you unchange the edits you have done to 404.html? Also, is there something you could do to differentiate your version with the main page? For example, make it a terminal styled page.

Okay, all sorted now. Page has been given a terminal like feel and some interactivity.
https://magicp.github.io/afullstop/pages/typedText.html
Sorry for all the commits - I'm still fairly new to Git.

Before I merge this can you also add your name to README.md contributors?

Done

Merged.


Fix admin ajax upload url regex.

at some point previous regex with \dwas broken for subfolders, something escaped the backslash...

are you sure it should be a * and not a +? is it ok to not have any digits following?

I agree with @intellectronica, perhaps this should be \d+?


Add Faker to tests

I think it would be great if we added Faker to the test workspace.

Fixed https://github.com/hyperoslo/Wall/pull/40


OKD Version 4.8.0-0.okd-2021-10-24-061736 - Operator degraded continously

Describe the bug
I'm having problems with cluster operators. at first I often get notifications etcdHighCommitDurations and etcdNumberOfLeaderChanges continuously but after that it has an impact on several cluster operators the status becomes DEGRADED TRUE alternately
Version
4.8.0-0.okd-2021-10-24-061736
vsphere 6.7
3 master 4 worker each has a size RAM 16GB, 8 Core and 250GB
How reproducible
i dont know
Log bundle
https://drive.google.com/file/d/12Qdf229x24NJ9-O-8Hw1mfE2OwnnbKDu/view?usp=sharing

I often get notifications etcdHighCommitDurations and etcdNumberOfLeaderChanges continuously

See https://itnext.io/etcd-performance-consideration-43d98a1525a3 and IOPS minimum requirement in https://docs.okd.io/4.8/installing/installing_platform_agnostic/installing-platform-agnostic.html#minimum-resource-requirements_installing-platform-agnostic


wip: Add support for mapping all nullable types as pointers

This is a bare minimum implementation of the approach suggested in https://github.com/Khan/genqlient/issues/178#issuecomment-1077559343, which I figured I'd open sooner than later for early feedback!
Per the new detail in the sample docs/genqlient.yaml:
# Customize how optional fields are handled.
optional:
  # Customize how models are generated for optional fields. This can currently
  # be set to one of the following values:
  # - value (default): optional fields are generated as values, the same as
  #   non-optional fields. E.g. fields with GraphQL types `String` or `String!`
  #   will both map to the Go type `string`. When values are absent in
  #   responses the zero value will be used.
  # - pointer: optional fields are generated as pointers. E.g. fields with
  #   GraphQL type `String` will map to the Go type `*string`. When values are
  #   absent in responses `nil` will be used.
  output: value

The documentation is slightly misleading atm as there's actually no validation of the values, and only pointer will have any effect (anything else has the default behaviour). It also affects arguments, no just fields, which is desirable imo. There are also no tests, as I'm not quite sure where best to put them 😅 Any pointers (pun intended?) would be great.
I've tested this out with a small local setup, which isn't fully integrated yet, so I'm not at all confident that it fully works. It does generate what I'd expect for a simple schema, e.g. given:
# schema.graphql
scalar DateTime

type Query {
  user(id: ID!): User
}

type User {
  avatarUrl: String
  brandID: ID
  brandVisible: Boolean
  createdAt: DateTime
  firstName: String
  id: ID!
  lastName: String
  name: String
  primaryEmail: String
}

And:
# operations.graphql
query userGetByID($id: ID!) {
  user(id: $id) {
    avatarUrl
    brandID
    brandVisible
    createdAt
    firstName
    id
    lastName
    name
    primaryEmail
  }
}

It will generate:
func userGetByID(
	ctx context.Context,
	client graphql.Client,
	id string,
) (*userGetByIDResponse, error) {
	/* ... */
}

type userGetByIDResponse struct {
	User *userGetByIDUser `json:"user"`
}

type userGetByIDUser struct {
	AvatarUrl *string `json:"avatarUrl"`
	BrandID *string `json:"brandID"`
	BrandVisible *bool `json:"brandVisible"`
	CreatedAt *time.Time `json:"createdAt"`
	FirstName *string `json:"firstName"`
	Id string `json:"id"`
	LastName *string `json:"lastName"`
	Name *string `json:"name"`
	PrimaryEmail *string `json:"primaryEmail"`
}

// ...

I have:

[x] Written a clear PR title and description (above)
[ ] Signed the Khan Academy CLA
[ ] Added tests covering my changes, if applicable
[x] Included a link to the issue fixed, if applicable
[x] Included documentation, for new features
[ ] Added an entry to the changelog

Hi! The majority of gqlgen users are using versions where resolvers return pointers, so I think that should be the default now and people can opt-in to the value behavior.
Otherwise, it's kind of a jarring change.

This seems like a great start, thank you!  Fingers crossed that the tests don't find any place it needs to be more complicated.

It also affects arguments, no just fields, which is desirable imo.

If that's simpler, and seems to work for you, I think it's fine!  Only thing is to rename the option to match.  Maybe just optional: pointer and later if we add more knobs that can be a shorthand for something else.

There are also no tests, as I'm not quite sure where best to put them

Hmm, slightly awkward actually.  In general this sort of thing goes in TestGenerateWithConfig, but you'll definitely need to test it on a more complex query than it currently uses to get any interesting behavior.  (Currently it uses generate/testdata/queries/SimpleQuery.graphql, the schema it uses is in generate/testdata/queries/schema.graphql.  This writes out to various snapshots in generate/testdata/snapshots, as well as checking the snapshots compile.)  Probably the easiest thing is just to add the query to use as a parameter to the table-driven test (currently it's just a constant sourceFilename), so you can add a few tests using more complicated queries (or use some of the existing ones in the same directory, which are probably plenty complex).
Then the other thing is whether we need an integration test.  If we do, it will be a bit annoying, since this is a global config option and those all share one config.  But if we are able to stick to doing exactly the same thing as the pointer: true option, that may not be necessary.

Thanks for the fast feedback! I'll reconsider the naming and investigate and adding a test, though it will likely be a couple of days before I get to it.

I've added a couple of tests, one that has a few nullable outputs (including lists) and one with some nullable inputs. The result is what I expect.

Neat, thanks for putting this together!
Only thing I notice is that a value of type [String] becomes []*string, not *[]*string, which in theory might be what one would expect.  But I think that's probably fine, since slices already have distinct nil vs. empty slices, and it's more consistent with how the pointer option already works.  Which is for the best because it might be quite annoying to implement (would require redoing the handling of such types in marshalers, which is necessarily very tricky code to work with).  I'm gonna add a few words to the documentation to mention that, and then merge.

Awesome! I did think about [String] and *[]*string. I could have gone either way but as you say []T can already distinguish between nil and empty. I think this matches what gqlgen does by default as well.


New-NavContainer output has a few times the wrong hostname

Describe the issue
In the output of New-NavContainer the hostname is in a few case wrong (https://dockerhub.dockerhub.mycompany.com instead of https://dockerhub.mycompany.com).
Scripts used to create container and cause the issue
New-NavContainer -accept_eula -containername mydocker -artifactUrl "https://bcpublicpreview.azureedge.net/sandbox/18.0.23013.23434/de" -PublicDnsName dockerhub.mycompany.com -useSSL -useTraefik -shortcuts None -auth NavUserPassword -Credential $credential -assignPremiumPlan -licenseFile "C:\dockerFiles\dev.flf" -sqlMemoryLimit "1G"

Full output of scripts
BcContainerHelper version 2.0.2
BcContainerHelper is version 2.0.2
BcContainerHelper is running as administrator
Host is Microsoft Windows Server 2019 Standard - ltsc2019
Docker Client Version is 19.03.14
Docker Server Version is 19.03.14
Fetching all docker images
Enabling SSL as otherwise all clients will see mixed HTTP / HTTPS request, which will cause problems e.g. on the mobile and modern windows clients
Using image mcr.microsoft.com/businesscentral:10.0.17763.1817
PublicDnsName is dockerhub.mycompany.com
Creating Container mydocker
Version: 18.0.23013.23434-DE
Style: sandbox
Multitenant: Yes
Platform: 18.0.22893.23390
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.17763.1817 (ltsc2019)
Host OS Version: 10.0.17763.1817 (ltsc2019)
Using process isolation
Using locale de-DE
Adding special CheckHealth.ps1 to enable Traefik support
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\dockerFiles\dev.flf
--hostname dockerhub
-e webserverinstance=mydocker
-e publicdnsname=dockerhub.mycompany.com
-l "traefik.protocol=https"
-l "traefik.web.frontend.rule=PathPrefix:/mydocker"
-l "traefik.web.port=443"
-l "traefik.soap.frontend.rule=PathPrefix:/mydockersoap;ReplacePathRegex: ^/mydockersoap(.*) /BC$1"
-l "traefik.soap.port=7047"
-l "traefik.rest.frontend.rule=PathPrefix:/mydockerrest;ReplacePathRegex: ^/mydockerrest(.*) /BC$1"
-l "traefik.rest.port=7048"
-l "traefik.dev.frontend.rule=PathPrefix:/mydockerdev;ReplacePathRegex: ^/mydockerdev(.*) /BC$1"
-l "traefik.dev.port=7049"
-l "traefik.dl.frontend.rule=PathPrefixStrip:/mydockerdl"
-l "traefik.dl.port=8080"
-l "traefik.dl.protocol=http"
-l "traefik.enable=true"
-l "traefik.frontend.entryPoints=https"
--env customNavSettings=PublicODataBaseUrl=https://dockerhub.mycompany.com/mydockerrest/odata,PublicSOAPBaseUrl=https://dockerhub.mycompany.com/mydockersoap/ws,PublicWebBaseUrl=https://dockerhub.mycompany.com/mydocker
Files in C:\ProgramData\BcContainerHelper\Extensions\mydocker\my:
- AdditionalOutput.ps1
- CheckHealth.ps1
- license.flf
- MainLoop.ps1
- prismaSSL2020.PFX
- SetupCertificate.ps1
- SetupNavUsers.ps1
- SetupVariables.ps1
- updatecontainerhosts.ps1
Creating container mydocker from image mcr.microsoft.com/businesscentral:10.0.17763.1817
87e5ef8165cc7fb40fde351ebf7ce3d9118ff73ca639342d4bee32b2fe870be5
Waiting for container mydocker to be ready
Using artifactUrl https://bcpublicpreview.azureedge.net/sandbox/18.0.23013.23434/de
Using installer from C:\Run\150-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server

Starting Internet Information Server

Copying Service Tier Files

Copying PowerShell Scripts
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules

Determining Database Collation from c:\dl\sandbox\18.0.23013.23434\de\BusinessCentral-DE.bak
Restoring CRONUS Demo Database

Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS

Exporting Application to CRONUS

Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Copying Web Client Files
Copying Client Files
Copying ModernDev Files
Copying additional files
Copying ConfigurationPackages
Copying Test Assemblies
Copying Extensions
Copying Applications
Copying Applications.DE
Starting Business Central Service Tier

Importing license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files

Attaching files as new Database default

Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False

Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 370 seconds
Installation complete
Initializing...
Setting host.containerhelper.internal to <IP_ADDRESS> in container hosts file
Starting Container
Hostname is dockerhub
PublicDnsName is dockerhub.mycompany.com
Using NavUserPassword Authentication
Certificate File Thumbprint 6ACA6C1529F27493A8915CD0215D9DA9339EB27E
Import Certificate to LocalMachine\my
Modifying Service Tier Config File with Instance Specific Settings
Modifying Service Tier Config File with settings from environment variable
Setting PublicODataBaseUrl to https://dockerhub.mycompany.com/mydockerrest/odata
Setting PublicSOAPBaseUrl to https://dockerhub.mycompany.com/mydockersoap/ws
Setting PublicWebBaseUrl to https://dockerhub.mycompany.com/mydocker

Starting Service Tier

Registering event sources
Creating DotNetCore Web Server Instance
Enabling Financials User Experience
Enabling rewrite rule: Don't rewrite system files
Enabling rewrite rule: Already have tenant specified
Enabling rewrite rule: Hostname (without port) to tenant
Using license file 'c:\run\my\license.flf'
Import License

Dismounting Tenant

Mounting Tenant
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False

Sync'ing Tenant
Tenant is Operational
Creating http download site

Setting SA Password and enabling SA
Creating admin as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.

Creating SUPER user
WARNING: This license is not compatible with this version of Business Central.

WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Assign Premium plan for ADMIN
Container IP Address: <IP_ADDRESS>
Container Hostname  : dockerhub
Container Dns Name  : dockerhub.dockerhub.mycompany.com
Web Client          : https://dockerhub.dockerhub.mycompany.com/mydocker/?tenant=default
Dev. Server         : https://dockerhub.dockerhub.mycompany.com
Dev. ServerInstance : BC
Dev. Server Tenant  : default

Files:
http://dockerhub.dockerhub.mycompany.com:8080/ALLanguage.vsix

Container Total Physical Memory is 16.0Gb
Container Free Physical Memory is 9.4Gb

Initialization took 77 seconds
Ready for connections!

Reading CustomSettings.config from mydocker
Set SQL Server memory limit to 1024 MB
Container mydocker successfully created
Because of Traefik, the following URLs need to be used when accessing the container from outside your Docker host:
Web Client:        https://dockerhub.mycompany.com/mydocker
SOAP WebServices:  https://dockerhub.mycompany.com/mydockersoap
OData WebServices: https://dockerhub.mycompany.com/mydockerrest
Dev Service:       https://dockerhub.mycompany.com/mydockerdev
File downloads:    https://dockerhub.mycompany.com/mydockerdl

Use:
Get-BcContainerEventLog -containerName mydocker
 to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName mydocker
 to get debug information about the container
Enter-BcContainer -containerName mydocker
 to open a PowerShell prompt inside the container
Remove-BcContainer -containerName mydocker
 to remove the container again
docker logs mydocker
 to retrieve information about URL's again
...

Screenshots
If applicable, add screenshots to help explain your problem.
Additional context

does it happen all the time?
did it use to work?

Normally when using traefik you do not need to specify publicdnsname and usessl - containerhelper takes these things from traefik. ContainerHelper also automatically detects traefik - meaning that you do not need to change your new-bccontainer script at all if you are running traefik.
But,... the sample you provide doesn't seem to match the output.
I cannot repro this and I think this has something to do with your script overrides.

AdditionalOutput.ps1
CheckHealth.ps1
license.flf
MainLoop.ps1
SetupCertificate.ps1
SetupNavUsers.ps1
SetupVariables.ps1
updatecontainerhosts.ps1

Does any of these scripts update the publicdnsname variable?

You are right, SetupCertificate.ps1 changes publicdnsname. Thanks man!
I tested usessl and publicdnsname: usessl is not necessary. If I don't provide publicdnsname I get an error message:

Using Traefik only makes sense if you allow external access, so you have to provide the public DNS name (param -PublicDnsName)

Scripts used to create container and cause the issue
New-NavContainer -accept_eula -containername mydocker -artifactUrl "https://bcpublicpreview.azureedge.net/sandbox/18.0.23013.23434/de" -shortcuts None -auth NavUserPassword -Credential $credential -assignPremiumPlan -licenseFile "C:\dockerFiles\dev.flf" -sqlMemoryLimit "1G"

Full output of scripts
BcContainerHelper is version 2.0.7
BcContainerHelper is running as administrator
Host is Microsoft Windows Server 2019 Standard - ltsc2019
Docker Client Version is 19.03.5
Docker Server Version is 19.03.5
Fetching all docker images
Fetching all docker volumes
Enabling SSL as otherwise all clients will see mixed HTTP / HTTPS request, which will cause problems e.g. on the mobile and modern windows clients
Using Traefik only makes sense if you allow external access, so you have to provide the public DNS name (param -PublicDnsName)
In C:\Program Files\WindowsPowerShell\Modules\BcContainerHelper\2.0.7\ContainerHandling\New-NavContainer.ps1:631 Zeichen:13
+             throw "Using Traefik only makes sense if you allow extern ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Using Traefik o...-PublicDnsName):String) [], RuntimeException
    + FullyQualifiedErrorId : Using Traefik only makes sense if you allow external access, so you have to provide the public DNS name (param -PublicDnsName)

On the Azure VMs (created by http://aka.ms/getbc) I create a file called hostname.txt in the www root containing the public dnsname
New-BcContainer checks this:
        $wwwRootPath = Get-WWWRootPath
        if ($wwwRootPath) {
            $hostNameTxtFile = Join-Path $wwwRootPath "hostname.txt"
            if ((Test-Path $hostNameTxtFile) -and -not $PublicDnsName) {
                $PublicDnsName = Get-Content -Path $hostNameTxtFile
            }
        }

But you are right - if this doesn't exist, you need to provide it.
Totally forgot about this.


Testing server side es5 code with substance test runner

It's not possible as I understand currently because of mix of import with require.
As a workaround we could copy own version of run-tests.js which is requiring file with actual tests. Would love to do it other way ;)

Using a build step for server side is the way to go for now. We should not start mixing imports and requires in the source files.
See here: https://github.com/substance/simple-writer/blob/collab/make.js


Issue #8

Linked Issue
Closes: issue #8
Added a function visualize confusion matrix
Describe the changes you've made
I have added a function to visualize confusion matrix in a heatmap form with coolwarm colors. Additionally, accuracy, precision, recall and f1 score has also been added to the heatmap.
Also, I imported f1 score which fixed a bug for metrics function.
Type of change
What sort of change have you made:

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Code style update (formatting, local variables)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update

How Has This Been Tested?
Describe how have you verified the changes made
I ran some cells to show the confusion matrix and it worked perfectly without giving any error in whole notebook.
Checklist:

[x] My code follows the guidelines of this project.
[x] I have performed a self-review of my own code.
[ ] I have commented my code, particularly wherever it was hard to understand.
[ ] I have made corresponding changes to the documentation.
[x] My changes generate no new warnings.
[ ] I have added tests that prove my fix is effective or that my feature works.
[ ] Any dependent changes have been merged and published in downstream modules.

Screenshots
Original           | Updated
:: |:
:
Original Screenshot | Updated Screenshot |

@RohanHBTU can you comment the output(screenshot) for this function(test on naive Bayes)

@RohanHBTU your PR has merge conflicts, before making changes to a live code base, make sure to fetch all the recent changes in the repo. Please use git pull to get all the changes and then make a PR.

@RohanHBTU your PR has merge conflicts, before making changes to a live code base, make sure to fetch all the recent changes in the repo. Please use git pull to get all the changes and then make a PR.

ok... I will make a new PR


take another look at starting the philos

have all the even philos wait first.. ?
Have the even philos pick first ?


crypto: rollback BoringCrypto fips-20220613 update

Following the discussion at #62372, we decided to upgrade to the fips-20220613 module, weighting the compliance risk of an In Review module against the NIST SP 800-52 Rev. 2 TLS 1.3 requirement. The change was applied in #64717.
Since then, it was pointed out that NIST SP 800-52 is only intended for US government users, so it only affects a small subset of FIPS 140 users, if any.

these guidelines are primarily designed for federal users and system administrators to adequately protect sensitive but unclassified U.S. Federal Government data against serious threats on the Internet

Agencies shall support TLS 1.3 by January 1, 2024. After this date, servers shall support TLS 1.3 for both government-only and citizen or business-facing applications.

Also considering that, it was decided to wait until the fips-20220613 certificate is available to update.
As a reminder, Go+BoringCrypto (GOEXPERIMENT=boringcrypto) is not officially supported and users should independently assess its suitability for any compliance goal. The reasoning shared above is informational.
/cc @golang/release for the late change. Note that the rollback only affects GOEXPERIMENT=boringcrypto files or code paths.
/cc @golang/security

@gopherbot please open backport issues for Go 1.20, Go 1.21, and Go 1.22 (if that works).
This is rolling back the #64717 cherry-picks.

@FiloSottile are there any plans for the reintroduction of this change in the foreseeable future?

@FiloSottile are there any plans for the reintroduction of this change in the foreseeable future?

That depends on when NIST CMVP approves the new BoringCrypto module, which is outside the hands of the Go team.
You can follow along here (search for "BoringCrypto"). Once it disappears from that list and shows up here, then the change can be re-introduced.

@FiloSottile are there any plans for the reintroduction of this change in the foreseeable future?

That depends on when NIST CMVP approves the new BoringCrypto module, which is outside the hands of the Go team.
You can follow along here (search for "BoringCrypto"). Once it disappears from that list and shows up here, then the change can be re-introduced.

@reedloden, @FiloSottile if I am not mistaken, the certificate has been issued very recently 🎉
https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/4735

@FiloSottile is there any plan to bring this back now that the cert has been issued?  Or is the current plan to have 140-3 compliance only for 1.24+?

This change was re-submitted in August once the cert was finalized (https://go.dev/cl/603375), it should land in Go 1.24, scheduled for ~Feb 2025. We've not thought much about backporting it.

Is there any specific way to express interest in having it backported (filing an issue/PR) or is this something the team would decide on internally?

The backporting guidelines are at https://go.dev/wiki/MinorReleases.

Note that this is a bigger change than we would normally backport, so there would need to be a very compelling reason. (See also #69536 for the general direction we're hoping to take with regards to FIPS compliance.)


Theme download cannot download live settings_data.json

when i run theme download config/settings_data.json --live --no-ignore -v on a theme with an outdated settings_data.json file it returns:
[development] Skipped config/settings_data.json (Checksum: 09f9535a9b6a64892140d5fb41a6447a)
[development] 1 files, No Change: 1

Implying that the settings_data.json files are the same, when they are not
To Reproduce
Steps to reproduce the behavior:

run command 'theme download config/settings_data.json --live --no-ignore -v' on theme_id which has an outdated settings_data.json file

Expected behavior
settings_data.json would download from live theme, this would be really useful in theme development to quickly have section settings match that of live site, rather than having to do it manually
Environment (please complete the following information):

OS : macOS 11.1
Themekit version: ThemeKit 1.1.6 darwin/amd64
Editor: Vim (Iterm2)

I cannot reproduce it with the following commands:

theme download config/settings_data.json --live --no-ignore -v
theme download config/settings_data.json --no-ignore -v
theme download config/settings_data.json -v

Every time my outdated settings_data.json is overwritten with the latest version from Shopify.
Environment:

OS: Windows 10
ThemeKit version: ThemeKit 1.1.6 windows/amd64
Editor: Visual Studio Code

So there is probably an issue with the macOS version of ThemeKit. Maybe someone with a mac can verify.


Provide a mechanism for using the legacy merge conflict view

After the June (or July) 2022 update, the merge conflict view no longer looks like the one in the documentation: https://code.visualstudio.com/Docs/editor/versioncontrol#_merge-conflicts
I do not like the new 3-way view at all. Is there any way to go back to the previous merge conflict view (as it appears in the above documentation link)?
I tried adding the following to settings.json, but the result was no diff decoration at all:
"git.mergeEditor": false,

Maybe you also need "diffEditor.codeLens": true

@gjsjohnmurray Sadly, that does not seem to work.

@kboucher I managed to rollback to the previous merge conflict view by setting git.mergeEditor to false. It looks like it's necessary to restart the app after updating settings.json

This should be noted in the release blog article, I generally enjoy new features being introduced but this is a relatively strong UI change and will trip up many, this should've been opt-in.

/duplicate #156608


Closes: #1

Updated calidations.py python script.
Fixed behavior of validate_user function in
validations.py
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it


Improvement? using react-app-rewired to avoid Eject in demo

Description
To avoid ejecting create react app use rect-app-rewired.
Steps to reproduce
I created a simple config-overrides.js file for react-app-rewire to be able to run the
https://github.com/collab-project/videojs-record/wiki/React and get the changes required
into the wepback config without ejecting.
You will need to do the installs steps of https://github.com/timarney/react-app-rewired as well.
I attach my config-overrides.js used by react-app-rewired to avoid ejecting create react app.
It was created with

"videojs-record": "^3.5.1"
"react-scripts": "2.1.8"
"react-app-rewired": "^2.1.1"

Inline copy of config-overrides.s
const webpack = require("webpack");

module.exports = function override(config, env) {
  // Extend the config to work with the videojs-record project without ejecting create react app.
  // Reference: https://github.com/collab-project/videojs-record/wiki/React
  // Instead of ejecting apply webpack config changes here.
  const videojsPlugin = new webpack.ProvidePlugin({
    videojs: "video.js/dist/video.cjs.js",
    RecordRTC: "recordrtc",
    MediaStreamRecorder: ["recordrtc", "MediaStreamRecorder"]
  });
  const videojsAlias = {
    videojs: "video.js",
    WaveSurfer: "wavesurfer.js",
    RecordRTC: "recordrtc"
  };
  config.resolve.alias = { ...config.resolve.alias, ...videojsAlias };
  config.plugins.push(videojsPlugin);
  return config;
};

config-overrides.txt

sounds good, I'll take a look at some point.

Updated the wiki, thanks for the suggestion.


Open in float window

Thank you  for creating such a great plugin.
I have a question: Is there any method to operate in a floating window, like floatterm

@shalei6698 Hey, well for single one off questions, there is a :GpPopup, which answers your prompt into a fresh floating window, but after you close it, it's gone.
For persistence and more complex interactions with gpt models there is a :GpChatNew (or :GpChatFinder to find and open older exchanges), both open in a normal non floating buffer.
If you describe your expectation/needs in more detail, I'll try to accommodate you. Putting a chat session into a floating window which you could hide by a command/shortcut toggling it on and off would be easy.

@Robitx Thank you, I often need to switch between code and gp buffer, such as copying text. :GpPopup is a good way to handle a single question, but I often need to continue asking questions from the previous one. Below is a simple wrapper using nui to describe my need,
M._popup_win = nil

-- leader + gp
M.toggle_float_gp = function()
  if M._popup_win ~= nil then
    if M._popup_win.winid == nil then
      M._popup_win:show()
      M._popup_win:map("n", "<C-q>", M.toggle_float_gp, { noremap = true })
    else
      M._popup_win:hide()
    end
    return
  end

  local Popup = require "nui.popup"

  M._popup_win = Popup {
    position = "50%",
    size = { width = "60%", height = "60%" },
    enter = true,
    focusable = true,
    relative = "editor",
    border = { style = "rounded" },
    buf_options = { modifiable = true, readonly = false },
  }
  M._popup_win:map("n", "<C-q>", M.toggle_float_gp, { noremap = true })
  M._popup_win:mount()
  vim.cmd "GpChatNew"
end

@shalei6698 Try out the latest version with :GpChatToggle if it's to your liking.

@shalei6698 Try out the latest version with :GpChatToggle if it's to your liking.

thank you, exact what i need, event restart nvim, session allways there

Is it possible to toggle the chat window while the answer is being generated? For me the generation stops as soon as I close the popup with GpChatToggle

@skylite21 Please try the latest version if it working as you expect.

It is working flawlessly now with the float window! Thanks!


chore: update pictograms to 96px and columns

Updates icon size to 96px and uses fewer columns to accommodate.

the download card should live in usage not library

@mjabbink I was thinking about having a download icon on each card, did you mean for the master ai file?

@vpicone @laurenmrice The usage page gallery needs attention. There seems to be a margin applied to several images.

@mjabbink might want to open a seperate issue for that since it's broken in idl and carbon either spot works.

@vpicone @laurenmrice

[ ] Mobile needs larger pictograms.


Is there any way to get the history information?

It would be nice if RockPlayer class included cards that were used and cards that were discarded for both self and opponent. Yes, you can track your own history with a little bit of work but you cannot track opponent history at least not completely.

Currently, this project does not supply history information.
But it is possible and not hard to do that.
However, the history information complex, so far I cannot find an easy way to represent them.
I will leave this as an open issue.

I would love to try but I don't know from where to start, maybe you could point me to a direction? I think you should open gitter chat room and we could discuss this there.

You can start with analyzing the hearthstone code by using ILSpy.
Unity3D programming knowledge is also necessary for understanding the code.
The key things you understand are GameState, Card, Entity (and also how to use them).
You can evaluate yourself by reading this:
https://github.com/yangyuan/hearthrock/tree/master/src/Hearthrock/Pegasus/Internal/RockPegasus.cs
You will be ready if you have no problem in understanding this file.

I did some basic analysis, it seems that the client can retrieve very limited history. In that case, I don't see much value of providing history data from hearthrock.


Versioned Transaction

I just want to say thank you for sharing your code.
It's been very difficult trying to figure out how to deserialize, sign and serialize the Versioned Transactions.
1 million thank yous.

Hello, I'm glad that you achieve to do it. Wish you the best! Have a good day 🫡


Prisma fails for deck v1.22.0

Prisma scan failed with security vulnerability for deck version 1.22.0 (current latest version). It says the go version used to build the deck is golang version 1.20.4 (attached screenshot). As per the release notes of v1.22.0, it states that the golang has been updated to 1.20.5.

Noticed that in the git actions (workflow), it is picking go version as 1.20.4. Can this be the reason why it is being built using golang 1.20.4 even thou it is mentioned in the Dockerfile as 1.20.5 (https://github.com/Kong/deck/blob/v1.22.0/Dockerfile#L1)?

Hi @Niranjan-K ,
We just released v1.22.1 which is now using Go v1.20.5:
$ strings /opt/homebrew/bin/deck | grep 'go1\.'
go1.20.5
vendor/gol


Support validation errors on checkboxes and radio buttons

Bug, feature request, or proposal:
Support validation errors in checkboxes and radio buttons. For instance, displaying radio button labels in red when required mat-radio-group was not filled-in.
What is the expected behavior?
This stackblitz should display red label on the radio buttons when clicking on "Submit".
It contains one required mat-radio-group (with multiple mat-radio-buttons in it) and one required input.
What is the current behavior?
Currently, only the text input in the mat-form-field is correctly displayed in red when clicking on Submit.
What are the steps to reproduce?
Providing a StackBlitz reproduction is the best way to share your issue.
StackBlitz starter: https://goo.gl/wwnhMV
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 5.2.0 as well as 6.0.0

Duplicate of #7891

#7891 was about using checkbox and radio inside a form-field. This issue is about supporting error highlighting in checkboxes and radio buttons not necessarily by using checkbox and radio inside a form-field, so even though they are related I don't think this is a duplicate. And I also think that it would be awesome to have the required radio buttons get red when trying to submit them empty.


Validate redirects

How does this get run?

At the moment, manually.
Regards,
Andrew Garner
Guidance Guarantee Programme
HM Treasury
+44 7971 232 140
On Mon, Feb 16, 2015 at 2:51 PM, Gareth Visagie<EMAIL_ADDRESS>wrote:

How does this get run?
Reply to this email directly or view it on GitHub:
https://github.com/guidance-guarantee-programme/smoke_tests/pull/1#issuecomment-74519077

Are we abandoning this?

I think we should yeh. We're monitoring this elsewhere now.


Added functionality to allow custom S3 endpoints

Proposed changes:

#444

Status:

[x] ready for code review
[ ] there are tests for the functionality
[x] documentation updated
[ ] changelog updated

All good now

@tmbo is this one ready to go?

Yes. @jinhong- Thanks a lot for your contribution 🎉


playbackResumesWhenEnteringForeground resumes all players when foreground

When playbackResumesWhenEnteringForeground is true.
Once application goes to background then foreground; UIApplicationWillEnterForeground is received, player doesn't check if it is visible or not, therefore it resumes all player instances.

same issue here

Is there any solution for this .?

Hi @piemonte  are there any updates for this bug or any suggested fix?

Is there any solution for this now?

did you found any fix around?

i set playbackResumesWhenBecameActive = false instead, it's useful

i also set playbackResumesWhenBecameActive = false instead, it's useful

Thank you!!


Keyboard shortcuts

Would be great if you could use the filters or the scopes via keyboard shortcut, maybe even navigate through the main tabs or cycle through rows of the table.

i don't know if this should be enabled by default, you can do it by using
http://www.webresourcesdepot.com/handle-keyboard-events-with-javascript-jwerty/


Iteration #1 for Project API endpoints

Incorporated @MichaelDeng03 's project/orchestration separation work.
Check the docstrings on the endpoints
Endpoints not tested, very very alpha!
run make local-api to build locally.

Is your male local-api working? I suspect it doesn't. I have changes in michael/client_server but I'll have to change them build from source instead of installing from pypi. I can branch off your work if you'd like to make those fixes.

it builds; i haven't hit any of the endpoints though

Ohhhh, wait I mixed up make local-api, and the dockerized version make run-webapp-api

The dockerized one is still using poetry

Before you merge into deps 2, could you merge in michael/client_server and test out the docker build

yer

just make build-api right

make run-webapp-api should build too

running make run-webapp-api now

do i need to pass in a .env? getting
2024-11-06 14:56:24   File "/app/webapp/api/server.py", line 37, in <module>

2024-11-06 14:56:24     secret_key=os.environ["HTTP_SESSION_SECRET"],
2024-11-06 14:56:24                ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
2024-11-06 14:56:24   File "<frozen os>", line 679, in __getitem__

2024-11-06 14:56:24 KeyError: 'HTTP_SESSION_SECRET'

nvm i see the note in makefile

wait no that's just for pg

Oooh I forgot about that

You should throw a COPY .env into the dockerfile

kk

i also deleted uv.lock in mine because i set api as a workspace in concrete

Sure that sounds okay

ok

it's running

Sick

how do i access it lol

localhost:8000?

"The connection was reset"

I have no clue what means, check the docker logs maybe?

only ts-oauth-api has ports, was that intentional

Yes

netstack: could not connect to local backend server at <IP_ADDRESS>:443: dial tcp <IP_ADDRESS>:443: connect: connection refused
have you ever seen this before

Nope never

:man-shrugging: well looks like it's running according the the docker logs

hrm

Oh

I have an instance of api running locally

Maybe tailscale is complaining about that


[Bug] Front-end code style check has warning:Unexpected console statement

Search before asking

[X] I searched the issues and found no similar issues.

Linkis Component
web
What happened + What you expected to happen
Front-end code style check has warning:Unexpected console statement

Relevent platform
none
Reproduction script
none
Anything else
No response
Are you willing to submit a PR?

[ ] Yes I am willing to submit a PR!

you can assign it to me.


Add list of agents as a possible result of speaker selection method

Why are these changes needed?
This change adds a new returnable type as part of the speaker_selection_method Callable. Currently, that callable allows the following returnables:

an Agent class, it must be one of the agents in the group chat.
a string from ['auto', 'manual', 'random', 'round_robin'] to select a default method to use.
None, which would terminate the conversation gracefully.

In this PR, we add a list[Agent] as a returnable type. This allows the speaker selection to use a list of agent as candidate agents for the group manager to select from. The associated issue describes this issue, but I'll paste the scenario here:

In my use-case, we have an Agent (agent_a) that can speak to (agent_b, agent_c, and agent_d). It should only talk to agent_d under certain specific circumstances. Otherwise, it should pick between agent_b and agent_c, without me having to make that decision (i.e. I would like the group manager to pick between the two).

Related issue number
Closes #3215

Checks

[x] I've included any doc changes needed for https://microsoft.github.io/autogen/. See https://microsoft.github.io/autogen/docs/Contribute#documentation to build and test documentation locally. (I
[x] I've added tests (if relevant) corresponding to the changes introduced in this PR.
[x] I've made sure all auto checks have passed.

return a list of agents from custom_speaker_selection_func feel not right to me..
In your custom_speaker_selection_func, which already returns a list of candidates, is it possible to make a further step and choose the right next speaker from these candidates?

return a list of agents from custom_speaker_selection_func feel not right to me..
Since you already return a list of candiates from custom_speaker_selection_func, is it possible to make a further step and choose the right next speaker from these candidates?

custom_speaker_selection_func as is doesn't allow sending a list of candidates. If I want to choose the next speaker, I need to explicitly choose an agent. But in my use case, I want to basically have the group manager choose between a more controlled set of candidates.
Is there a different way to go about accomplishing what my use case currently states?

Codecov Report
Attention: Patch coverage is 0% with 10 lines in your changes missing coverage. Please review.

Project coverage is 14.41%. Comparing base (6279247) to head (2f73276).
Report is 49 commits behind head on main.

Files
Patch %
Lines

autogen/agentchat/groupchat.py
0.00%
10 Missing :warning:

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3224       +/-   ##
===========================================
- Coverage   32.90%   14.41%   -18.50%
===========================================
  Files          94       97        +3
  Lines       10235    10822      +587
  Branches     2193     2485      +292
===========================================
- Hits         3368     1560     -1808
- Misses       6580     9208     +2628
+ Partials      287       54      -233

Flag
Coverage Δ

unittests
14.37% <0.00%> (-18.53%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

@yiranwu0 this is an extension of StateFlow. What do you think?

@sonichi , @heyitsaamir Is the basic issue that the list of agents to consider for group chat depends on the state of current conversation.  In group chat manager there isn't a way to filter the list of candidate agents that will go next.

@sonichi , @heyitsaamir Is the basic issue that the list of agents to consider for group chat depends on the state of current conversation? In group chat manager there isn't a way to filter the list of candidate agents that will go next.

So the group chat manager can receive a allowed_or_disallowed_speaker_transitions parameter where I can say what transitions are allowed. (i.e. agent_a can transition to agent_b, agent_c and agent_d). We also have a speaker_selection_method which gives me finer control to say after agent_a speaks, either let the group manager decide based on the selection strategies (auto, roundrobin etc), or specifically choose a particular agent, or end the conversation. However, in my use case, I want to basically say after agent_a speaks, I definitely do not want agent_d to talk, but I want the group manager to decide between agent_b and agent_c.  OR I can modify speaker_selection_method to return a list of agents and the framework knows that when a list of agents is returned, the group manager can decide between those returned agents.

ping @yiranwu0 @sonichi

So the group chat manager can receive a allowed_or_disallowed_speaker_transitions parameter where I can say what transitions are allowed. (i.e. agent_a can transition to agent_b, agent_c and agent_d). We also have a speaker_selection_method which gives me finer control to say after agent_a speaks, either let the group manager decide based on the selection strategies (auto, roundrobin etc), or specifically choose a particular agent, or end the conversation. However, in my use case, I want to basically say after agent_a speaks, I definitely do not want agent_d to talk, but I want the group manager to decide between agent_b and agent_c.

Hey @heyitsaamir, wouldn't that be achieved by setting the following?
allowed_or_disallowed_speaker_transitions = agent_a can transition to agent_b, agent_c (Notice A -> A and A -> D is missing)
speaker_selection_method = 'auto'
speaker_transitions_type = 'allowed'

So the group chat manager can receive a allowed_or_disallowed_speaker_transitions parameter where I can say what transitions are allowed. (i.e. agent_a can transition to agent_b, agent_c and agent_d). We also have a speaker_selection_method which gives me finer control to say after agent_a speaks, either let the group manager decide based on the selection strategies (auto, roundrobin etc), or specifically choose a particular agent, or end the conversation. However, in my use case, I want to basically say after agent_a speaks, I definitely do not want agent_d to talk, but I want the group manager to decide between agent_b and agent_c.

Hey @heyitsaamir, wouldn't that be achieved by setting the following? allowed_or_disallowed_speaker_transitions = agent_a can transition to agent_b, agent_c (Notice A -> A and A -> D is missing) speaker_selection_method = 'auto' speaker_transitions_type = 'allowed'

But I do want to allow agent_a to agent_d under certain specific circumstances. Are you saying that the speaker_selection_method can send agent_d under those conditions? And by default agent_a -> agent_b, agent_c?

So the group chat manager can receive a allowed_or_disallowed_speaker_transitions parameter where I can say what transitions are allowed. (i.e. agent_a can transition to agent_b, agent_c and agent_d). We also have a speaker_selection_method which gives me finer control to say after agent_a speaks, either let the group manager decide based on the selection strategies (auto, roundrobin etc), or specifically choose a particular agent, or end the conversation. However, in my use case, I want to basically say after agent_a speaks, I definitely do not want agent_d to talk, but I want the group manager to decide between agent_b and agent_c.

Hey @heyitsaamir, wouldn't that be achieved by setting the following? allowed_or_disallowed_speaker_transitions = agent_a can transition to agent_b, agent_c (Notice A -> A and A -> D is missing) speaker_selection_method = 'auto' speaker_transitions_type = 'allowed'

But I do want to allow agent_a to agent_d under certain specific circumstances. Are you saying that the speaker_selection_method can send agent_d under those conditions? And by default agent_a -> agent_b, agent_c?

This does work and gets me past my particular issue. So this update isn't completely necessary (for my use-case).
The benefit of this that if your agent needs to choose between two agents (agent_b, agent_c) for some cases and (agent_d, agent_e) for others. I guess then a different strategy needs to be adopted? If that is the case, then we can close this out. Otherwise, I would advocate for merging this in :).


allowing for multiple prefixes and/or suffixes in rules

If I understand the docs correctly, this allows for the following configuration:
          rules:
            - prefix: low-res/
            - prefix: high-res/
            - suffix: .jpg
            - suffix: .jpeg

such that all *.jpg and *.jpeg images in both directories will trigger an event.
from https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html#notification-how-to-filtering-example-valid
@ar90n please review, thanks!

Hi @anaerobic .
Thanks for your PR. I merged and published. Please check the latest version.


[build_your_own_voice] AssertionError: check train, valid, test file number

I'm trying to build and run build_your_own_voice egs
It's failed on step 5:
./05_train_duration_model.sh conf/duration_slt_arctic.conf
error output:
Traceback (most recent call last):
  File "/media/psf/Home/Workspaces/python_workspace/merlin/src/run_merlin.py", line 1229, in <module>
    main_function(cfg)
  File "/media/psf/Home/Workspaces/python_workspace/merlin/src/run_merlin.py", line 516, in main_function
    assert cfg.train_file_number+cfg.valid_file_number+cfg.test_file_number == total_file_number, 'check train, valid, test file number'
AssertionError: check train, valid, test file number

Then I tried to print out values: run_merlin.py#516
cfg.train_file_number: 50
cfg.valid_file_number: 5
cfg.test_file_number: 5
total_file_number: 53

I think cause is from: file_id_list.scp
$cat experiments/slt_arctic/duration_model/data/file_id_list.scp
arctic_a0003
arctic_a0004
arctic_a0005
arctic_a0006
arctic_a0007
arctic_a0008
arctic_a0009
arctic_a0010
arctic_a0011
arctic_a0012
arctic_a0013
arctic_a0014
arctic_a0015
arctic_a0019
arctic_a0020
arctic_a0021
arctic_a0022
arctic_a0024
arctic_a0026
arctic_a0027
arctic_a0028
arctic_a0029
arctic_a0030
arctic_a0031
arctic_a0032
arctic_a0033
arctic_a0034
arctic_a0035
arctic_a0036
arctic_a0037
arctic_a0038
arctic_a0039
arctic_a0040
arctic_a0041
arctic_a0042
arctic_a0043
arctic_a0044
arctic_a0045
arctic_a0046
arctic_a0047
arctic_a0048
arctic_a0049
arctic_a0050
arctic_a0051
arctic_a0052
arctic_a0053
arctic_a0054
arctic_a0055
arctic_a0056
arctic_a0057
arctic_a0058
arctic_a0059
arctic_a0060

there are only 53 files, I don't know why but it makes assertion failed.
Anyone could help me where's my wrong? or same problem with me?

You should check your config file. As I see, you have wrong configuration, you have 53 files but you config 50 file to train, 5 file to test and 5 file to valid ==> 50 + 5 + 5 > 53, it make this error. So change your config same like below:
cfg.train_file_number: 47
cfg.valid_file_number: 3
cfg.test_file_number: 3

Thanks @chazo1994 , It worked!


LUCENE-10399: Handle large boolean expressions better in flexible query parser

This isn't a safe optimization though, it changes ranking.

Right - TermInSet is a constant score one... I wonder how significant scores are if somebody generates hundreds of these terms for a disjunction boolean query.

Maybe an alternative would be to just explicitly expose TermInSetQuery via an operator? Sorry, I don't have suggested syntax: can't remember what symbols are already used :) But you could imagine something like field:[dogs,cats,birds,squirrels,....] or operator such as IN. Sorry i'm just thinking out loud and don't have a great suggestion.

Any change to jflex parser will cause backward compatibility issues. I'll take a look though.

I don't think any more abstractions are needed if you want to do the rewrite. You can do it in ConstantScoreQuery.rewrite().

I admit I'm looking at this from an user-endpoint where the distinction between constant and regular scoring is not visible... All people see is a hard constraint once they hit the exception on max clauses, which I wanted to soften a bit (even if this means sacrificing document order/ scores).

Any change to jflex parser will cause backward compatibility issues. I'll take a look though.

LOL, but breaking scoring isn't?!

I originally planned for this patch to kick in only when the number of clauses exceeds the threshold that would otherwise throw an exception - so better something that has no scores than nothing at all. This was brought to my attention because folks used those long lists of terms as exclusions/ inclusion filters in addition to more sane query criteria, something like:
foo bar -(long OR long OR list OR of OR excluded OR terms)

So it's in effect a filtering sub-clause that doesn't really need scores. I'm not saying it's the best way to solve the problem but it worked for the above. :)

The problem is there is no intent telling you where scores are wanted and where they aren't. Specifying this intent (e.g. syntax) is a necessary prerequisite to doing this optimization for SHOULD clauses!
In your example above, where it's entirely MUST_NOT clauses, the optimization is actually safe, because MUST_NOT clauses don't impact scoring, since they only restrict matches. So it is fine to optimize this specific case right now.

Specifying this intent (e.g. syntax) is a necessary prerequisite to doing this optimization for SHOULD clauses!

I agree with you but I can't convince myself to add yet another syntax extension to that query parser, it is already pretty complex.
I looked at optimizing just the filtering expressions but this would have to be done at the graph level (not query builder level) because by the time the node builder tries to optimize the subclause, it's already thrown an exception (boolean query builder is eager).
Finally I've just modified the code so that this is an optional feature which has to be explicitly turned on. This really works fine in practice (based on what I've seen) because if the number of boolean clauses is in hundreds then scores from these filtering subexpressions are typically secondary - not too important given the goal of the entire query.
Let me know if this optional feature is acceptable for you. If not, I'll just leave it as a patch for anybody who wants to reuse it - the query parser's default boolean node builder can be replaced in custom applications so this is not a problem.

Ping, @rmuir - WDYT? Should I merge this in or leave as a convenience patch in jira?

sorry @dweiss for the delay. I'm not properly getting email notifications from GH: I dont know why. I randomly looked in the github UI and saw this one right now.
Maybe get a second opinion, I think I am too biased against it. I really feel that people doing JOIN shouldn't be doing it with enormous boolean expressions of AND's and OR's. And that if they really should be doing stuff thru thee parsers, it'd be better to add support for things like BooleanClause.Occur.FILTER, TermInSetQuery, and maybe even ConstantScoreQuery to these parsers if we want things like this to be more efficient for them.
I get that nobody wants to have to deal with javacc to change the syntax, but to some people, it would probably be less complicated than that massive stream expression, magical options that impact scoring and performance in confusing ways, etc.
There's a reason why these kinds of issues turn into bikesheds, and its because hacky solutions / option explosion doesn't scale long-term for the project, the code just becomes insane.
I also resent the implication that i don't live in the "real world", that my world is somehow fake, because I push back on such things. I just want code to be clean.

also, just think about the technical benefits if "filtering" (non-scoring) is exposed properly in the parsers. Long term, users adding these kinds of structured clauses today could get much improved performance for many situations, thanks to query caching and other optimizations that will suddenly work for them.

I get that nobody wants to have to deal with javacc to change the syntax

Sure, no worries - I don't have to commit it to Lucene and can apply it externally.
Let me explain my motivation of why I thought it'd be useful though - it's not about changing javacc - I can change the syntax with no problem - it's that a great many folks I deal with who use Lucene search systems never look (deeply) at the documentation. They don't get the difference or need for things things that are more obvious to programmers. For these users foo:[5 TO 6], foo:{5 TO 6], foo:(5 TO 6) and foo:(5 to 6) is the same even if all of these are different queries in the flexible query parser... My experience is that even the sophisticated search-interface users rarely go beyond boolean queries (maybe sprinkled with fuzzy or wildcards). These can be large queries, but structurally they're simple.
I'll just leave this as a PR/ patch, perhaps an idea for a better general solution will come to me in the future.