proxy: prevent connection leakage

Signed-off-by: Tw<EMAIL_ADDRESS>

Hold on, test may failed sometimes, because it closes the connection before writing the data...
Need work out a better solution.

Not sure if there is an actual connection leak here, or if capturing the error actually fixes that leak.

Maybe the error could be logged?
But good point, .Close() does seem to be called either way, I think, although I haven't confirmed there isn't a leak.

@weingart @mholt @nemothekid  Yes, we should log the error here and there is also another problem here: A websocket client connects to our proxy and our proxy makes another connection to the real server. If client close its connection, we will leave a connection(proxy -> server) unclosed and goroutine
running. This is the leakage what I mean and I want to fix it. Any ideas?

You are writing to the channel 2 times, and reading once.

@tw4452852 Do you see this problem in practice? I can't see how this happens in practice. There are two things that happens

The client closes cleanly and sends a CLOSE frame. The backend server receives this CLOSE and should close the connection. From the Websocket RFC 6455 After both sending and receiving a Close message, an endpoint considers the WebSocket connection closed and MUST close the underlying TCP connection.
If your server isn't doing this, and leaving that connection open, I would check the implementation. In any case, this will lead to 2.

The client doesn't close cleanly (it dies) or the server ignores it's close request. In this case, the backend server should try to send PING requests/PONG requests (or any data really). Because the client is dead, the io.Copy on line 234 will end, and the function will return. When this function returns, both conn and backendConn are closed and so shouldn't be leaked. When this function returns, and the connections are closed, the Copy should error out and the goroutine should end.

@nemothekid Yes, here is my environment:
Client:
package main

import (
        "log"
        "time"

        "github.com/gorilla/websocket"
)

func main() {
        c, _, err := websocket.DefaultDialer.Dial("ws://<IP_ADDRESS>:2020/echo", nil)
        if err != nil {
                log.Fatal("dial:", err)
        }
        defer c.Close()

        go func() {
                defer c.Close()
                for {
                        _, message, err := c.ReadMessage()
                        if err != nil {
                                log.Println("read:", err)
                                break
                        }
                        log.Printf("recv: %s", message)
                }
        }()

        ticker := time.NewTicker(time.Second)
        defer ticker.Stop()

        for t := range ticker.C {
                log.Printf("send: %s\n", t)
                err := c.WriteMessage(websocket.TextMessage, []byte(t.String()))
                if err != nil {
                        log.Println("write:", err)
                        break
                }
        }
}

Server:
package main

import (
        "flag"
        "log"
        "net/http"

        "github.com/gorilla/websocket"
)

var addr = flag.String("addr", "<IP_ADDRESS>:2021", "http service address")

var upgrader = websocket.Upgrader{} // use default options

func echo(w http.ResponseWriter, r *http.Request) {

        c, err := upgrader.Upgrade(w, r, nil)
        if err != nil {
                log.Print("upgrade:", err)
                return
        }
        defer c.Close()
        for {
                mt, message, err := c.ReadMessage()
                if err != nil {
                        log.Println("read:", err)
                        break
                }
                log.Printf("recv: %s", message)
                err = c.WriteMessage(mt, message)
                if err != nil {
                        log.Println("write:", err)
                        break
                }
        }
}

func main() {
        flag.Parse()
        http.HandleFunc("/echo", echo)
        log.Fatal(http.ListenAndServe(*addr, nil))
}

Caddyfile
<IP_ADDRESS>:2020 {
  log proxy.log
   proxy / <IP_ADDRESS>:2021 {
        proxy_header Host {host}
        proxy_header X-Real-IP {remote}
        proxy_header X-Forwarded-For {remote}
        websocket
    }
}

Start them all and then press ctrl-c to stop the client, you will see a goroutine wait on the connection:
goroutine 8 [IO wait]:
net.runtime_pollWait(0x7fbc01c2cda8, 0x72, 0xc8201ba000)
        /home/tw/goroot/src/runtime/netpoll.go:160 +0x4f
net.(*pollDesc).wait(0xc820122fb0, 0x72, 0xc8200d90b8, 0xc82000c0f8)
        /home/tw/goroot/src/net/fd_poll_runtime.go:73 +0x2e
net.(*pollDesc).waitRead(0xc820122fb0, 0xbce6c0, 0xc82000c0f8)
        /home/tw/goroot/src/net/fd_poll_runtime.go:78 +0x2a
net.(*netFD).Read(0xc820122f50, 0xc8201ba000, 0x8000, 0x8000, 0x0, 0xbce6c0, 0xc82000c0f8)
        /home/tw/goroot/src/net/fd_unix.go:214 +0x183
net.(*conn).Read(0xc8200300c8, 0xc8201ba000, 0x8000, 0x8000, 0x0, 0x0, 0x0)
        /home/tw/goroot/src/net/net.go:172 +0x63
io.copyBuffer(0x7fbc01c31160, 0xc8201321a0, 0xbcbfc0, 0xc8200300c8, 0xc8201ba000, 0x8000, 0x8000, 0x9303e0, 0xc8200d9200, 0xbcbfc0)
        /home/tw/goroot/src/io/io.go:397 +0x13a
io.Copy(0x7fbc01c31160, 0xc8201321a0, 0xbcbfc0, 0xc8200300c8, 0xc8200300c8, 0xc8201321a0, 0x0)
        /home/tw/goroot/src/io/io.go:367 +0x5a
github.com/mholt/caddy/middleware/proxy.(*ReverseProxy).ServeHTTP(0xc8201703c0, 0xbd0f40, 0xc82001ecd0, 0xc8201aa000, 0xc8200d94b0, 0x0, 0x0)
        /home/tw/golib/src/github.com/mholt/caddy/middleware/proxy/reverseproxy.go:234 +0x837
github.com/mholt/caddy/middleware/proxy.Proxy.ServeHTTP(0xbcb380, 0xc820164600, 0xc82016e820, 0x1, 0x1, 0xbd0f40, 0xc82001ecd0, 0xc8201aa000, 0x8000104, 0x0, ...)
        /home/tw/golib/src/github.com/mholt/caddy/middleware/proxy/proxy.go:125 +0x40c
github.com/mholt/caddy/middleware/proxy.(*Proxy).ServeHTTP(0xc820164630, 0xbd0f40, 0xc82001ecd0, 0xc8201aa000, 0xbcf3c0, 0xc82011ac60, 0x9bb448)
        <autogenerated>:5 +0x7a
github.com/mholt/caddy/middleware/log.Logger.ServeHTTP(0xbcd880, 0xc820164630, 0xc820166780, 0x1, 0x1, 0x9bdd50, 0xbd1200, 0xc8200cadd0, 0xc8201aa000, 0xc820168750, ...)
        /home/tw/golib/src/github.com/mholt/caddy/middleware/log/log.go:31 +0x232
github.com/mholt/caddy/middleware/log.(*Logger).ServeHTTP(0xc820164660, 0xbd1200, 0xc8200cadd0, 0xc8201aa000, 0xc82000de01, 0x4, 0x0)
        <autogenerated>:1 +0x6f
github.com/mholt/caddy/server.(*Server).ServeHTTP(0xc82016c070, 0xbd1200, 0xc8200cadd0, 0xc8201aa000)
        /home/tw/golib/src/github.com/mholt/caddy/server/server.go:341 +0x260
net/http.serverHandler.ServeHTTP(0xc820182200, 0xbd1200, 0xc8200cadd0, 0xc8201aa000)
        /home/tw/goroot/src/net/http/server.go:2117 +0x73
net/http.(*conn).serve(0xc82008e580)
        /home/tw/goroot/src/net/http/server.go:1502 +0x491
created by net/http.(*Server).Serve
        /home/tw/goroot/src/net/http/server.go:2173 +0x351

Has the goroutine on reverseproxy:234, ended? I assume because you ctrl+c the client, that Copy won't end until the underlying connection closes (via timeout). Because that connection isn't closed, the backendConn never closes and that goroutine is still active.

You have a race on "defer c.Close()" in the client.

@nemothekid Yes, it is, the goroutine never ended.

Weird, I haven't tested it myself, but I assumed that a close on both sides of the Copy should interrupt the copy.
Looking at the latest reverseproxy.go, it looks like the official code, that the code is based off of, is now using a CloseNotifier to detect when the client goes away.

Or try uncommenting these lines
https://github.com/mholt/caddy/blob/0890e330e2c07a1661ff6c4a7a08cdea478a2081/server/server.go#L84
s := &Server{
		Server: &http.Server{
			Addr:      addr,
			TLSConfig: new(tls.Config),
			// TODO: Make these values configurable?
			 ReadTimeout:    30 * time.Second,
			 WriteTimeout:    30 * time.Second,
			// MaxHeaderBytes: 1 << 16,
		},
		tls:         useTLS,
		OnDemandTLS: useOnDemandTLS,
		vhosts:      make(map[string]virtualHost),
		startChan:   make(chan struct{}),
		connTimeout: gracefulTimeout,
	}

And see if the goroutine ends after 30 seconds.

@nemothekid Ah, I know the reason. Because the server never write any data any more, so the goroutine waits forever. Once there are some data to forward to client, it will return error in io.Copy and the goroutine will exit.
So I think this is a invalid case and a standard websocket server will ping/pong periodically.

In that case, I will close the pull request. Thank you for considering these things and looking into it! :+1:


How can i add ad-sense to my next js website

Hi,
How can I add google ad-sense to my website?
I am trying to implement to script tags from google scanning.
TNX all

"Questions should be posted on https://spectrum.chat/next-js"


Allow TypeAdapter.validate_python to get a generic model as plain

Initial Checks

[X] I have searched Google & GitHub for similar requests and couldn't find anything
[X] I have read and followed the docs and still think this feature is missing

Description
There seem to be a difference between validation model without generics vs one with -
Currently using TypeAdapter to validate a model with generics requires specifying the generic twice - it will be very nice to be able to reduce this requirement when possible.
Here is an example -
from typing import Generic, TypeVar

from pydantic import BaseModel

T = TypeVar('T')

class M(BaseModel, Generic[T]):
    foo: T

# Ok (passing a dict is always fine)
TypeAdapter(M[list]).validate_python(dict(foo=[1, 2, 3]))
# Also ok (repeating the generic)
TypeAdapter(M[list]).validate_python(M[list](foo=[1, 2, 3]))

# Error (though the dict form of it is fine)
TypeAdapter(M[list]).validate_python(M(foo=[1, 2, 3]))
# pydantic_core._pydantic_core.ValidationError: 1 validation error for M[list]
#    Input should be a valid dictionary [type=dict_type, input_value=M(foo=[1, 2, 3]), input_type=M]
#    For further information visit https://errors.pydantic.dev/0.30.0/v/dict_type

Affected Components

[ ] Compatibility between releases
[ ] Data validation/parsing
[ ] Data serialization - .model_dump() and .model_dump_json()
[ ] JSON Schema
[ ] Dataclasses
[ ] Model Config
[ ] Field Types - adding or changing a particular data type
[ ] Function validation decorator
[X] Generic Models
[ ] Other Model behaviour - model_construct(), pickling, private attributes, ORM mode
[ ] Plugins and integration with other tools - mypy, FastAPI, python-devtools, Hypothesis, VS Code, PyCharm, etc.

Selected Assignee: @lig

Relevant discussion: https://github.com/pydantic/pydantic/discussions/6090
In particular, taken from one of my comments:

Yeah, we talked about making it so that if models have the same generic origin that they are allowed for validation by pydantic core. Or at least dump it to a dict in that case prior to parsing. That would resolve this issue, and I think is preferable in general, but I'm not sure how much work it would be in pydantic-core.
In the meantime, you can do:
from typing import Generic, TypeVar, Annotated

from pydantic import BaseModel, TypeAdapter, WrapValidator

T = TypeVar('T')

class M(BaseModel, Generic[T]):
    foo: T

def dump_matching_generic(v, h):
    if isinstance(v, M):
        v = v.model_dump()
    return h(v)

ta = TypeAdapter(Annotated[M[list[int]], WrapValidator(dump_matching_generic)])

v = ta.validate_python(M(foo=[1, 2]))
print(v)
# > foo=[1, 2]

I would like to make this work better. @davidhewitt does this issue make sense to you? Any suggestions about the most performant way that we could loosen the check in pydantic-core when there is a generic parent class would be appreciated. I could imagine modifying the ModelSchema to track whether a model is generic might be more performant than introspecting the class for a non-empty __pydantic_generic_metadata__ (or, in the future, hopefully just __origin__), but maybe there's another way to do this that adds minimal/zero overhead for non-generic models.
(CC @adriangb and @samuelcolvin as well)

I'll also note that another thing we've discussed is making it so that parametrizing generic types doesn't actually create a subclass, but I think that poses a number of challenges that @adriangb and I wrestled with a while ago and never fully resolved. (And would likely break some not-even-particularly-obscure form of observable behavior today..)

I can confirm that the behavior is the same in Pydantic 2.3.0.

Still seeing this on Pydantic 2.8, minimal test case that we're observing:
from typing import Generic, TypeVar
from pydantic import BaseModel, TypeAdapter

T = TypeVar("T")

class GenericModel(BaseModel, Generic[T]):
    t: T

g = GenericModel[int](t=1)
h = GenericModel(t=2)

ta = TypeAdapter(GenericModel)
ta2 = TypeAdapter(GenericModel[int])

ta.validate_python(g)
ta.validate_python(h)
ta2.validate_python(g)
# fails
ta2.validate_python(h)


Run error, can't generate anything.

Hi, this is a great project, but when I try in my enviroment as below:
Ubuntu 22.04, conda Python 3.11.9 torch 2.3.0 cuda 12.4 and other as same as requirement.txt
I try cli input prompt, but can't run rightly as below:
0it [00:49, ?it/s]Please input English text (Ctrl-D quit): A digital painting of a young goddess with flower and fruit adornments evoking symbolic metaphors.
[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/tkadmin/InfDiT/generate_t2i_sr.py", line 210, in
[rank0]:     main(args)
[rank0]:   File "/home/tkadmin/InfDiT/generate_t2i_sr.py", line 130, in main
[rank0]:     for index, [lr_image, image_name] in tqdm(enumerate(data_iter)):
[rank0]:   File "/home/tkadmin/miniconda3/envs/thudit/lib/python3.11/site-packages/tqdm/std.py", line 1181, in iter
[rank0]:     for obj in iterable:
[rank0]:   File "/home/tkadmin/InfDiT/generate_t2i_sr.py", line 35, in read_from_cli
[rank0]:     image = Image.open(x).convert('RGB')
[rank0]:             ^^^^^^^^^^^^^
[rank0]:   File "/home/tkadmin/miniconda3/envs/thudit/lib/python3.11/site-packages/PIL/Image.py", line 3247, in open
[rank0]:     fp = builtins.open(filename, "rb")
[rank0]:          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: FileNotFoundError: [Errno 2] No such file or directory: 'A digital painting of a young goddess with flower and fruit adornments evoking symbolic metaphors'
DONE on ubu
and then I put above prompt to input01.txt and modify generate_sr_big_cli.sh fir txt input_type, but also error as below:
(thudit) tkadmin@ubu:~/InfDiT$ bash generate_sr_big_cli.sh
RUN on ubu, CUDA_VISIBLE_DEVICES=0
WORLD_SIZE=1 RANK=0 MASTER_ADDR=localhost MASTER_PORT=23301 LOCAL_RANK=0 python generate_t2i_sr.py --input-type txt --input-path input01.txt --inference_type full --block_batch 4 --experiment-name generate --mode inference --inference-batch-size 1 --image-size 512 --input-time adaln --nogate --no-crossmask --bf16 --num-layers 28 --vocab-size 1 --hidden-size 1280 --num-attention-heads 16 --hidden-dropout 0. --attention-dropout 0. --in-channels 6 --out-channels 3 --cross-attn-hidden-size 640 --patch-size 4 --config-path configs/text2image-sr.yaml --max-sequence-length 256 --layernorm-epsilon 1e-6 --layernorm-order 'pre' --model-parallel-size 1 --tokenizer-type 'fake' --random-position --qk-ln --out-dir output --network ckpt/mp_rank_00_model_states.pt --round 32 --init_noise --image-condition --vector-dim 768 --re-position --cross-lr --seed 22611 --infer_sr_scale 4
[2024-06-14 14:23:49,098] [INFO] [real_accelerator.py:203:get_accelerator] Setting ds_accelerator to cuda (auto detect)
[WARNING]  async_io requires the dev libaio .so object and headers but these were not found.
[WARNING]  async_io: please install the libaio-dev package with apt
[WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
[WARNING]  Please specify the CUTLASS repo directory as environment variable $CUTLASS_PATH
[WARNING]  sparse_attn requires a torch version >= 1.5 and < 2.0 but detected 2.3
[WARNING]  using untested triton version (2.3.0), only 1.0.0 is known to be compatible
[2024-06-14 14:23:50,203] [WARNING] No training data specified
[2024-06-14 14:23:50,203] [WARNING] No train_iters (recommended) or epochs specified, use default 10k iters.
[2024-06-14 14:23:50,203] [INFO] using world size: 1 and model-parallel size: 1
[2024-06-14 14:23:50,203] [INFO] > padded vocab (size: 1) with 127 dummy tokens (new size: 128)
[2024-06-14 14:23:50,206] [INFO] [RANK 0] > initializing model parallel with size 1
[2024-06-14 14:23:50,206] [INFO] [RANK 0] You didn't pass in LOCAL_WORLD_SIZE environment variable. We use the guessed LOCAL_WORLD_SIZE=1. If this is wrong, please pass the LOCAL_WORLD_SIZE manually.
Loading network from "ckpt/mp_rank_00_model_states.pt"...
[2024-06-14 14:23:50,207] [INFO] [RANK 0] building DiffusionEngine model ...
--------use random position--------
warning: cross_attn_hidden_size is set but is_decoder is False
--------use qk_ln--------
[2024-06-14 14:24:12,221] [INFO] [RANK 0]  > number of parameters on model parallel rank 0:<PHONE_NUMBER>
INFO:sat:[RANK 0]  > number of parameters on model parallel rank 0:<PHONE_NUMBER>
Loading Fished!
rank: 0 world_size: 1
0it [00:00, ?it/s]
[rank0]: Traceback (most recent call last):
[rank0]:   File "/home/tkadmin/InfDiT/generate_t2i_sr.py", line 210, in
[rank0]:     main(args)
[rank0]:   File "/home/tkadmin/InfDiT/generate_t2i_sr.py", line 130, in main
[rank0]:     for index, [lr_image, image_name] in tqdm(enumerate(data_iter)):
[rank0]:   File "/home/tkadmin/miniconda3/envs/thudit/lib/python3.11/site-packages/tqdm/std.py", line 1181, in iter
[rank0]:     for obj in iterable:
[rank0]:   File "/home/tkadmin/InfDiT/generate_t2i_sr.py", line 58, in read_from_file
[rank0]:     image = Image.open(line).convert('RGB')
[rank0]:             ^^^^^^^^^^^^^^^^
[rank0]:   File "/home/tkadmin/miniconda3/envs/thudit/lib/python3.11/site-packages/PIL/Image.py", line 3247, in open
[rank0]:     fp = builtins.open(filename, "rb")
[rank0]:          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: FileNotFoundError: [Errno 2] No such file or directory: 'A'
DONE on ubu
please help me to analyze what cause of the error, thanks a lot!

OK, Thanks for the reply rapidly, I will try again...


Make validation conditional

Hi, I really like your library but I would really like to be able to dynamically enable/disable the validation based upon some other model value. e.g.
<div valdr-form-group valdr-enabled="vm.isLive === true">
  <input id="onlyValidateWhenLive" name="onlyValidateWhenLive" type="text" />
</div>
I couldn't find a way of passing model values to a custom validator which would be my preferred method.

@bonce164 it's now released in 1.1.1


Minor change to doc updating trail to trial. Closes #6040

Minor change to doc updating trail to trial

Linked Issue

Closes #6040

Good catch @reshmee011, thanks for the fix!

ready to merge 🚀

merged manually 👏
You Rock 🤩


cache .env parsing result

See https://github.com/vlucas/phpdotenv/issues/207#issuecomment-260116783
Main motivation is performance.

may i suggest to 'compile' .env into a .env.php and let the php's opcache do the caching and/or preloading


Multiple issues with replotting, renderer and order of notebook_extensions

This notebook illustrates issues like:

Order of multiple hv.notebook_extension matters
Loosing style, size and other information during switching backends
Replotting the same figure within the notebook causes HoverTool error with failure of the figure display
Cannot export holomap as GIF file.

Point number 2 is expected I guess.
Could you please advise?

This is something to look into but my first comment is that you can do:
hv.notebook_extension('matplotlib', 'bokeh')

Which I would highly recommend over using hv.notebook_extension('matplotlib') and hv.notebook_extension('bokeh') in separate calls to notebook_extension.
Hopefully that helps and if it does, we need to add a section about this to the user guide.

Cannot export holomap as GIF file.

I believe you need imagemagick to do this - GIFs are only supported by the matplotlib backend and that in turn relies on ImageMagick to generate gifs. Matplotlib uses this animation writer when generating GIF and it won't work unless imagemagick is available on your system.

Lastly I should note that hv.notebook_extension('matplotlib', 'bokeh') will activate matplotlib and enable bokeh (so you can switch to it) whereas hv.notebook_extension( 'bokeh', 'matplotlib') activates bokeh and enables matplotlib (so you can switch to it using %output or %%output). The order used is supposed to matter in this case.
If you are on master/a recent dev release you can also use hv.extension which is just the same thing as hv.notebook_extension (but shorter).

Thanks, @jlstevens .
This call doesn't work right:
hv.notebook_extension('matplotlib','bokeh')
But this call does the right thing with the plot:
hv.notebook_extension('bokeh','matplotlib')
So I think that the bug is still there.
I also installed imagemagic:
convert --version
Version: ImageMagick 7.0.3-6 Q16 x86_64 2017-01-11 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2016 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI
Delegates (built-in): x

But still don't get any GIF files generated.
Any more advises?

Does this do the right thing?
hv.notebook_extension('matplotlib','bokeh')
%output backend='bokeh'

No - it doesn't. If you'll look at the notebook - this is exactly what I'm doing.

The  notebook you linked to above still doesn't combine the strings 'matplotlib' and 'bokeh' into a single hv.notebook_extension call. Perhaps you have a more recent version and need to update the online one?

As I commented above - combining doesn't change things, that's why I never pushed it out.

As I commented above - combining doesn't change things, that's why I never pushed it out.

That isn't what I observe after running it. It works correctly when combined but not when run multiple times (which isn't recommended).

I probably wasn't clear enough.
Combining doesn't remove the issue of the order.
As I wrote here above:

This call doesn't work right:
hv.notebook_extension('matplotlib','bokeh')

But this call does the right thing with the plot:
hv.notebook_extension('bokeh','matplotlib')

So the order still matters - and that's what I believe is real issue.
To me - order of the extensions should not matter if you do
%%output backend='bokeh'

explicitly.

It would be very helpful if you could include your holoviews version with every issue.

@philippjfr I think the version is shown in the notebook link above.

Oops my apologies @thoth291, I had looked at that earlier but it somehow slipped my mind.

Yes. The version is this one: 1.7.0-x-g0c9133718
I'm always trying to get the latest master from the github repo.
Essentially issues 1) and 3) are weird. And the issue 4) is suspicious a bit, cause it might be something to do with dependencies, but I reinstalled everything relevant twice and still getting the same issue of GIF not being created.
Thank you!

Sorry looking back at this I think I was just confused. The order of hv.extension does matter, deliberately so since first extension provided will be set as active and if you call hv.extension a second time it will switch. We also can't auto-translate options between backends atm, and discussion on that would have to be it's own issue. The gif issue is also separate but the answer is that you need to specify gif as the format.
The HoverTool issue I'm going to be dealing with shortly.

Actually that last issue is a duplicate of https://github.com/ioam/holoviews/issues/1851 so I'll close this.

@philippjfr, thank you for your reply! Could you please point to the issues you are mentioned here:

auto-translate options between backends

and

The gif issue is also separate but the answer is that you need to specify gif as the format.

auto-translate options between backends

If you want you can open a separate issue for this, but we have in the past very deliberately decided this is not feasible.

The gif issue is also separate but the answer is that you need to specify gif as the format.

In your example simply specify the format like this:
hmap=hv.HoloMap({k:show_peaks(data,xs,[k],extents) for k in range(75,86)})
rendererDynamicMpl.save(hmap,'hmapDynamicMpl', 'gif')

In future it would be great if you could separate issues into atomic chunks that can be dealt with separately with a code sample to isolate just the particular issue that is described. Issues that describe a bunch of different issues cannot be appropriately prioritized and I'll end up closing them.


Error: package section not provided

I want verify program on devnet: anchor verify 2bDKfMiA1ECJRPPMvEgvJtGHHreEswTD168NAqQgRqyN
Execute in the root directory of the project.
Writing the IDL file
Writing the .ts file
Build success
Error: package section not provided

Version
solana-cli 1.18.17
rustc 1.82.0
anchor-cli 0.30.1

Writing the IDL file
Writing the .ts file
Build success
Error: Binaries don't match

execute inside a program subdirectory, but still fail.


Mmansurova/abc 338

Code was not tested. It doesn't work.

The functionality is incorrect. The code was modified only on the front-end to hide the rows that do not belong to the logged-in PI. As a result, pagination is inconsistent, with some pages displaying 10 entries and others showing only 3 rows where records for different PIs were hidden. This creates an odd appearance overall.

The ticket requirements were not taken into account and implemented.

The entire implementation is incorrect. Records need to be filtered on the backend rather than merely hiding their visibility on the front end.

The entire implementation is incorrect. Records need to be filtered on the backend rather than merely hiding their visibility on the front end.

Ok, thank you for letting me know. I thought that this ticket was only about the FE changes only
I'll fix it ASAP
Regarding the pagination - I'm going to update it in another PR as we have a separate task for it (abc-341)

Before code review, could I ask you to resolve all conflicts above please

Existing functionality is broken

When creating a new tna project, we get a permission error when fetching additional participant details after selecting an existing participant

When editing entries, records are sometimes duplicated with the same ID

If user goes on edit mode for a TNA project and enters a non-existent id in the URL, they should be directed to a forbidden page. At the moment the form is still displayed

The Edit button should be hidden when the entry is marked as submitted. Currently, this is not the case as demonstrated to you.

Please try to ensure PRs focus on your actual work, rather than automatic IDE changes. It can be confusing to review your code otherwise.


Remove commented UIWebView reference

It just removes a commented line so Apple doesn't reject builds for finding "UIWebView"
Solves #1106

Even using this version, Apple App Store still throws warnings on my app :( I have no idea why.

@EddyVerbruggen I think it will be good if this PR can be merged. I had 9 plugins including this. The app was getting rejected. It was accepted on removing this plugin.

Nice cleanup 👍


Create the Academic and Career Programs page

Recreate the Academic and Career Programs page as per the Figma design.

Grab the existing year filter implementation (from the projects page) and place it here
Create a schema for a program and fill it with information present in the figma
Use the same logic in the individual project section to create custom-rendered markdown to achieve the YAML to stylized HTML parsing

include information such as the program title, description (includes the location and instructor), and the timeline (including the tabular format and href)

Keep in mind the mobile implementation of the page.

#55


Make it easier for users to navigate to the repository from the docs webpage

It would be nice to only link to the documentation webpage when sharing this tool, rather than the docs+repository, but there is no clear way for users to navigate to the code repository from the docs. Create an easier way for users to navigate to the repo from the docs.

There's currently a link to the repo on the main landing page (as an aside, been using KDE for years and just today learned that the screenshot tool has a way to add annotations...)

There is also an issue https://github.com/Qiskit/qiskit_sphinx_theme/issues/568 which is intended to add some kind of a visible link on top/side/bottom of a page for easier navigation

P.S
Yellow arrows are fire!

Given that there's an upstream issue for this and we have a link on the main page, are we good to close this one @caleb-johnson ?

Fixed by #481


Provide actionable error message

curl give actionable message like this:
$> curl "https://api.phrase.com/v2/projects/PROJECT_ID/locales/LOCALE_ID/download" -u "TOKEN"
{"message":"Invalid Download Options. Parameter file_format Please fill out this field. Parameter file_format is not included in the list","documentation_url":"https://developers.phrase.com/api/#get-/projects/{project_id}/locales/{id}/download"}%

In the above example, user can understand file_format is not included.
However, cli give only HTTP response code like below:
$> phrase locales download \
  --access_token TOKEN \
  --project_id PROJECT_ID \
  --id LOCALE_ID
Error: 400 Bad Request

even with --verbose flag.
It would be helpful if CLI gives actionable error message.

Hi @exoego, that is a really good point. The error messages are not really helpful. We'll have a closer look at this and I'll post the updates here

Hi @exoego
This is now the output in <IP_ADDRESS>.
 $> phrase locales download --access_token TOKEN --project_id PROJECT_ID --id LOCALE_ID

{"message":"Invalid Download Options. Parameter file_format Please fill out this field. Parameter file_format is not included in the list","documentation_url":"https://developers.phrase.com/api/#get-/projects/{project_id}/locales/{id}/download"}

Error: 400 Bad Request

Great, thanks !!
Closing as resolved


Include Reminder command

The following changes were made:

Addition of Reminder command to list out applications with application dates or interviews dates due in 7 days (in order of urgency)

Do help me review the changes I made too so that this pull request can be merged.

Good job


[Feature]: I want to use chunk-rename-webpack-plugin, which relies on optimizeChunks that is not supported

What problem does this feature solve?
I want to use chunk-rename-webpack-plugin, which relies on optimizeChunks that is not supported. Are there any other hooks that can be used as a replacement
https://github.com/sueddeutsche/chunk-rename-webpack-plugin/blob/master/lib/index.js#L38C35-L38C49
What does the proposed API of configuration look like?
optimizeChunks
https://github.com/sueddeutsche/chunk-rename-webpack-plugin/blob/master/lib/index.js#L38C35-L38C49   or any other alternative APIs?

OptimizeChunks hook in webpack allows modification of chunk graph, which is not supposed to work in Rspack at present, so any modification to chunk is not allowed.
But you can tell me your needs, maybe there is another way like changing the output.filename or splitChunks configuration ?


docs: fix windows download link

Versioned docs at 1.6 and 1.7 contain a wrong Windows Okteto CLI
download link.
Related to:

https://github.com/okteto/docs/pull/371

I'm supportive of your suggestion @rberrelleza.
I've seen the release in the filename, e.g. okteto-stable.exe or something (usually for *nix distributions), but I agree having the release be part of the URL seems unnecessary.
The exception I could see is if in some scenarios users wanted to get an older/specific version and placing that in .com/cli/v2.10/okteto.exe but even then it seems cleaner to name the file itself (okteto-cli-2-10.exe) potentially.


Not working witth bro version 2.6.4

I follow the mentioned steps in INSTALL.md, then added the API Key, URL but No Luck
Am using bro version 2.6.4
please update the tool to work with zkg install instead of broctl.
Thanks

Updated to support latest Zeek 3.1.1 and zkg


Error with windows version

Checklist

[ ] I'm reporting a broken site support issue
[x] I've verified that I'm running youtube-dl version 2020.07.28
[x] I've checked that all provided URLs are alive and playable in a browser
[x] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[x] I've searched the bugtracker for similar bug reports including closed ones
[x] I've read bugs section in FAQ

Verbose log

[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-f', "'best[protocol=http]'", 'https://vimeo.com/manage/folders/2338347', '--verbose']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2020.07.28
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: none
[debug] Proxy map: {}
[vimeo] 2338347: Downloading webpage
[vimeo] 2338347: Extracting information
ERROR: Unable to extract info section (caused by RegexNotFoundError('Unable to extract info section; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\vimeo.py", line 637, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 1005, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract page config; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\vimeo.py", line 657, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 1005, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract info section; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\vimeo.py", line 637, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 1005, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract page config; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\vimeo.py", line 657, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 1005, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract info section; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\YoutubeDL.py", line 797, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\common.py", line 530, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpq2whuxta\build\youtube_dl\extractor\vimeo.py", line 671, in _real_extract
youtube_dl.utils.ExtractorError: Unable to extract info section (caused by RegexNotFoundError('Unable to extract info section; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.',)); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Description

just trying your app for the first time and getting regexnotfound issue, i confirmed it is the latest version

Issues with opening the windows version

I have a slightly different error on Windows as well:
PS C:\Users\HD\Downloads> ./youtube-dl.exe https://www.youtube.com/watch?v=CZ8pabrvlvQ
[youtube] CZ8pabrvlvQ: Downloading webpage
[youtube] CZ8pabrvlvQ: Downloading player cfa9e7cb
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
PS C:\Users\HD\Downloads> ./youtube-dl.exe --verbose https://www.youtube.com/watch?v=CZ8pabrvlvQ
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=CZ8pabrvlvQ']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2021.12.17
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.22621
[debug] exe versions: none
[debug] Proxy map: {}
[youtube] CZ8pabrvlvQ: Downloading webpage
ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 815, in wrapper
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\YoutubeDL.py", line 836, in __extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\common.py", line 534, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\youtube.py", line 1794, in _real_extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\ytdl-org\tmpupik7c6w\build\youtube_dl\extractor\common.py", line 1012, in _search_regex
youtube_dl.utils.RegexNotFoundError: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


Updates for Gurobi 11

Mainly use the new FuncNonLinear attribute for logistic regressions. Update the code to add logistic regression, documentation and examples.
Also has to limit the number of students in the admission example to the new limited license limit.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: pobonomo:x: Thomas BraamThomas Braam seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Twitter display name override

Ability to override the display name of a twitter handle for display names that mess up the view.

@ramonsmits can you give an example?


Add check for stale terminal price

Currently set for five hours

Currently set for five hours

Why that much? That could introduce considerable uncertainty for arbitrageurs as they aren't sure which price will actually be used, what would be the downsides of getting it down to say 1 hour?

No particular reason, I'll make it into one hour, but i guess we need to have a plan in case we have no price

I'll set it to two hours, since that's when the keeper bots(our and Pragmas) start to set checkpoints

Good to merge?

Yes


Remove "extra" features

Generally keep package.json as lightweight as possible - this means don't add dependency unless it is absolutely necessary.
For example LESS, SASS and Redux are nice to have, but not essential. Having them enabled by default means more work to support them when not everyone would use/need them. A simple recipe on how to add them would suffice.

I definitely think SASS/LESS support should be optional. That's actually an item being tracked on the roadmap in #10. Since the CLI dropped in 2.0, there's a templating engine in place that will make it easier to dynamically add loaders and package.json for things like this. It's next on my list.
Redux is a little trickier, and something I'd like to remain core. Apollo uses Redux, and there's a big benefit to separating the instantiation code of Redux out from the 'implicit' handling via Apollo, into a more explicit version in the starter kit IMO.
Part of the way SSR works is that it dehydrates the state from the server, and allows the client to continue where the server finishes. If Redux is pulled from core, we're not actually killing Redux (which, again, is a buy-in of Apollo); we're just dropping custom store state in favour of Apollo's own handlers, which only really answers the 'GraphQL' part of the stack.
Instead, having Redux a permanent fixture means it's super easy (and far more obvious) how a developer can 'extend' beyond GraphQL into store management across the entire app - inside and out of GraphQL. The vast majority of apps will have state concerns outside of pure GraphQL, and keeping it in is a very low-cost addition given that Apollo bundles it anyway.
At the same time, if you don't need or use Redux beyond Apollo, the set-up code isn't doing anything to 'break' Apollo's instantiation-- it's purely additive. So I don't think this is too problematic. You can still use Mobx or some other Flux implementation, or none at all, and things will continue on fine with very little overhead to the resulting bundle.
I'll close this issue, since SASS/LESS is being tracked in #10, as mentioned.


Fail on unresolved ip adresses

When creating docker nodes we lookup the hostname for one of the free ip adresses on the parent. If this fails, there is probably something wrong and we want to abort.
One complication is that for testing we are using IP adresses that are not present in DNS so this check invalidates many tests. To circumvent this without sending a mock name resolver very deep in the code, I created a public static variable that we set in test. This seems a little hackish but is a pragmatic solution that I can live with.

This is terrible, but if you can provide an affidavit guaranteeing that you will replace it with the proper solution later, I'll merge it  :-)

To circumvent this without sending a mock name resolver very deep in the code, I created a public static variable that we set in test.

Seems to be me the actual problem is that too many things are static. Should be easy enough to add a accessor for nameResolver in NodeRepository and pass that when creating the NodePrioritizer instance. You then can pass in a MockNameResolver to the NodePrioritizer instance in your test.

Yup.. going for your suggestion @mpolden

@mpolden What about something like this?

@bratseth hopefully no longer any reason to make an affidavit? Such a posh word... affidavit.

Yes, isn't it? I think this this is good now, merging.


configmap not correctly updated via helm command

Is this a request for help?: Yes
Is this a BUG REPORT or FEATURE REQUEST? Issue
Version of Helm and Kubernetes:
helm version 2.6.1
kubernetes version 1.7.7
Which chart:
nginx-ingress
What happened:
I cannot update the config correctly via de command line.
What you expected to happen:
A correctly updated configmap
How to reproduce it (as minimally and precisely as possible):
I installed the controller with all default settings and want to set hsts to false temporarely.
I tried that via the command helm upgrade nginx-ingress-controller stable/nginx-ingress --set controller.config.hsts="true" but then under data hsts has the value '"false"' (so single quote and double quote) instead of "false".
I tried escaping the quotes with \ but doesn't help either.
For now I manually updated the configmap for the controller by adding hsts: "false" under data.
Does anyone know the correct helm command to update the hsts setting in the configmap of the nginx ingress controller?

/close


Introducing SwiftText: Enhancing Efficiency and Consistency in Text Editing with PowerToys!

Description of the new feature / enhancement
Quick text editing tools universally available

allow users to quickly edit selected text with various transformations.
options include converting text to uppercase, lowercase, capitalizing, and more.
users can specify transformations for specific elements like names, extensions, and characters.
Streamline the text editing process, ensuring consistent formatting and saving time.

Scenario when this would be used?

swift converting selected texts to uppercase for constants or capitalization of names for proper nouns.
handling large datasets or tackling coding tasks that demand consistent text formatting.
copying, pasting and organizing content using web browsers for archiving, annotating, or saving purposes. Ensures a consistent writing style when naming items, streamlining the process effectively.
in automation scripts and batch processing tasks.
replacing spaces with underscores in variable names, improving coding practices universally, beyond just the IDE.

Supporting information
Simplifies the text editing process and caters to diverse user demands.

Enhances PowerToys versatility, making it indispensable for efficient text editing.
Greatly enhances productivity for developers, data analysts, content creators and just about anyone who uses it
Crucial for users who require consistent and flexible text formatting capabilities.
Could also work as presets for the PowerRename

The tools could be something like this:
Uppercase (AA AAAAAA)
Uppercase name (AA AAA.*)
Uppercase ext (*AAA)
Lowercase (aa aaa.aaa)
Lowercase name (aa aaa.*)
Lowercase ext (* .aaa)
Capitalize (Aa Aaa.aaa)
_ to Spaces
. to Spaces
- to Spaces
Spaces to _
Spaces to .
Spaces to -
_ to.
. to

Seems like the Edit Text Window from my app Text Grab. Is that the kind of thing you were thinking? /needinfo
https://github.com/TheJoeFin/Text-Grab


3.5.0

cc @macqueen @mattrobenolt @dcramer

This change is

Reviewed 27 of 27 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Support for Stream API

Please consider supporting Stream API
https://api.cloudflare.com/#stream-videos-properties

I can work on this. Lmk, if anyone has any thought/feedback on this. (looks like https://github.com/tus/tusd is available).

Will send a PR by tomorrow.


Fix git_repo.py bug

Running the tests from a freshly cloned repo result in an error in TestGit at line 24:
repo = repo_loader.get_repo("https://github.com/sbenthall/bigbang.git", in_type = "remote")
The error is cause by:
time_index = pd.DatetimeIndex(raw["Time"], periods = 24)
The error message is:
TypeError: __new__() got an unexpected keyword argument 'periods'
My setup in short is the following:
platform linux -- Python 3.9.1, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
pandas-1.2.1
I fixed it by changing the line 122f in git_repo.py to:
time_index = pd.DatetimeIndex(raw["Time"]).to_period("H")
time_index = utils.add_freq(time_index, freq=None)

Note: as my editor automatically removes unnecessary white spaces, more lines were changed besides the two that are crucial.

Thanks for this. Merging


Language Translation to Igbo

[x] Have you followed the contributing guidelines?
[x] Have you explained what your changes do, and why they add value to the Guides?

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.

The open-source community in Nigeria has been rapidly expanding, with a remarkable 60% growth in contributors since 2020. This surge reflects the increasing interest and participation in collaborative software development. This will enable them to learn in their own native language, making the learning process smoother and more accessible. By offering resources in familiar languages, it ensures that more individuals can fully engage and benefit from the platform.

Its good

Codmora

„Cosmora“❤

😊

@cosmorama

"Cosmora"

@Tesla_CEOElonMUSK

@Sahar21170

"Cosmora"

😄

✌

@Cosmorama @.***> 于 2024年10月14日周一 01:33写道：

"Cosmora"
—
Reply to this email directly, view it on GitHub
https://github.com/github/opensource.guide/pull/3312#issuecomment-2409061027,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BLQYPX2VNHJFF73MNRN2RDLZ3KVGFAVCNFSM6AAAAABPVCRATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBZGA3DCMBSG4
.
You are receiving this because you commented.Message ID:
@.***>

@cosmorama

Hey what's up?
@Cosmorama @.***> 于 2024年10月14日周一 01:51写道：

@Cosmorama https://github.com/Cosmorama
—
Reply to this email directly, view it on GitHub
https://github.com/github/opensource.guide/pull/3312#issuecomment-2409066529,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BLQYPX5WFDTBQAWTC6THFGLZ3KXLZAVCNFSM6AAAAABPVCRATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBZGA3DMNJSHE
.
You are receiving this because you commented.Message ID:
@.***>

Locking to stop the spam, I will look at this PR during the upcoming week.

@ahpook  I have made the required changes as mentioned by you.

There are dozens of technical errors in here causing CI failures along with the language problems. All of the internal heading links are failures, all of the apostrophes were replaced with "smart" apostrophes - probably from translation software. I'm going to close this as it has already taken a lot of time and would introduce a lot of debt to include. Sorry.

退订
Eric Sorenson @.***> 于 2024年11月13日周三 上午1:59写道：

There are dozens of technical errors in here causing CI failures along
with the language problems. All of the internal heading links are failures,
all of the apostrophes were replaced with "smart" apostrophes - probably
from translation software. I'm going to close this as it has already taken
a lot of time and would introduce a lot of debt to include. Sorry.
—
Reply to this email directly, view it on GitHub
https://github.com/github/opensource.guide/pull/3312#issuecomment-2471211168,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BLQYPX4WC5O46GDOYSQHOUD2AI6ZHAVCNFSM6AAAAABPVCRATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZRGIYTCMJWHA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>


Solved typo in Creating Steps page causing 404

Describe the bug
triggers-and-payload page causing 404 on the Creating Steps page
To Reproduce
Steps to reproduce the behavior:

Go to https://dev.trywilco.com/docs/building-your-quest/creating-steps.html
Click Triggers and Payload link
It causes a 404 because a simple typo in the link
triggers-and-payload.html should be ---> triggers-and-payloads.html

@AssafKr @darmalovan can you please review my pr

Sorry I didn't  get what I was supposed to do. The live site is still causing a 404 because of the incorrect link. I just changed the broken link to the correct url.  🤔

Thanks a lot for bringing this up! I've opened #29 to address this using {% link %} to prevent broken links in the future. Closing this one.


Support raw html input for bootpopup.prompt

just like we do for custom dialogs

Sorry for the long time to respond.
What is your use case to propose this feature? I cannot find it very useful... 🤔

@rigon Thanks for looking into this. :)
For prompt, I needed html select support, for which either we can accept object representation or we can accept raw html.
I opted for the later implementation, to be able have support for any other html that might fit.

For this specific case, I prefer add support for selects.
Btw, I think this feature is useful, like adding a separator in between.
Stay tuned for the new release ;)

I just released version 1.5.1 with support for selects(including with multiple attribute), groups of radios inputs and raw HTML in prompt.
Check it out and update :D


chore: update dependency

Releated Issue https://github.com/meilisearch/MeiliSearch/issues/1888
Hi! meilisearch, I'm currently interested in meilisearch. :)
So I'd like to start contributing from something very simple.

tokenizer version from 0.2.5 to 0.2.6

Please let me know if something is wrong 😄

The tokenizer dependency is also present in http-ui:
https://github.com/meilisearch/milli/blob/2c14efa8a2ce059a12f246fac0f5b34c26153f7a/http-ui/Cargo.toml#L13

@Samyak2 Thanks for letting me know what I missed.

Hey @jaeheonji,
I am sad about what happened, we didn't see your pull request and we should have answered it before you close it. I hope it will never happen again and I hope next time we will notice your work!
Have a great day,
kero

@Kerollmops Thank you for your kindness 😄


OCPVE-187: Add Chad, Jeremy, and Suleyman to the OWNERS

As a part of ownership transitioning efforts, this PR adds @brandisher, @jerpeter1, and @suleymanakbas91 to the OWNERS.

@suleymanakbas91 , please include a  Signed-off-by line in the commit msg.
Suggested commit msg:
chore: add additional owners
Add Chad, Jeremy, and Suleyman to OWNERS
Signed-off-by :

@suleymanakbas91 , please include a Signed-off-by line in the commit msg. Suggested commit msg:
chore: add additional owners
Add Chad, Jeremy, and Suleyman to OWNERS
Signed-off-by :

Sure, I've done it. Is there any particular reason why you're signing off all the commits or is it just for keeping a consistent record of commits?

/verify-owners

@nbalacha could you please re-approve? :)

/approve /lgtm


Nginx with OpenSSL 1.1.0f

I am compiling NGINX with OpenSSL 1.1.0f and want to disable NPN. I use --with-openssl-opt=no-nextprotoneg but it seems that it doesn't work. SSLLabs report show that NPN is supported together with ALPN. Any ideas how to disable NPN ?

I've just tested OpenSSL 1.1.0f with NGINX 1.12.0 using the following configuration:
./configure --prefix=/path/to/nginx/installdir \
    --with-http_ssl_module \
    --with-openssl=/home/paul/openssl-1.1.0f \
    --with-openssl-opt=no-nextprotoneg

And then I used openssl s_client to test NGINX for NPN capability:
openssl s_client -nextprotoneg http/1.1 -connect <IP_ADDRESS>:443 -debug

I didn't find any string like Protocols advertised by server: http/1.1 in the output.
But if I re-configured NGINX without the above --with-openssl-opt=no-nextprotoneg option, the same openssl command resulted to something like Protocols advertised by server: http/1.1
So I am pretty sure the no-nextprotoneg option works just fine in OpenSSL 1.1.0f

Hmm, maybe it's SSLLabs problem. I used this stack - NGINX 1.13.0 and OpenSSL 1.1.0f with the same flags that you specified plus --with-http_v2_module. SSLLabs reports that NPN is supported, but I expect it to not be.

NGINX uses SSL_CTX_set_next_protos_advertised_cb function to set a callback which will be called when OpenSSL needs the supported protocol list of the server, you can grep that symbol in NGINX binary as:
readelf -sW /path/to/nginx/binary | grep SSL_CTX_set_next_protos_advertised_cb

If NPN is turned off in OpenSSL, you can get nothing.

@richsalz I think this Issue should be closed : )
For further issues of NGINX using OpenSSL 1.1.0f, I think the mailing list of NGINX (http://nginx.org/en/support.html) is a good place to fire a post, @blagoeres


NOT NULL statement is missing in DDL for newly created SQLite tables

Description
I try to create a SQLite db with tables that have "NOT NULL" constrains. During table creation I check-mark the NOT NULL choice and it gets reflected in the "Columns" section of the "Properties" window (also check-marked).
The DDL has no "NOT NULL" in it though, so once I persist the table my columns can be NULL.
DBeaver Version
Community Edition, Version <IP_ADDRESS>310081633 (Flatpak)
Operating System
Linux Ubuntu 22.04.3 LTS (Kubuntu)
Database and driver
SQLite
Steps to reproduce

Start DBeaver and open "New Database Connection"
Choose "SQLite"
Choose "Connect by: Host"
Go to "Create..." and create new db file "test.db"
Leave everything as is and hit "Finish"
In "test.db" go to Tables, right click "Create New Table"
In Properties tab choose "Columns" and on lower right part click "Create New Column"
Leave everything as is BUT toggle value of "Not Null" [x]
Observe newly created column in the "Columns" tab and the "Not Null" is set
Go to "DDL" tab and see that no SQL "NOT NULL" is generated, as well as when clicking on "Save..."

Additional context
I tried to use the created database for pre-populating an android room database, but the compiler complained my that my schemas differed (as room needs NOT NULL columns but my tables created with DBeaver kept having NOT NULL = false).
The same steps on a local postgres do generate correct (i.e. "NOT NULL") columns.

Thank you for bug report.


Only deploy on dev branch

On dev: build +deploy
On master: don't do anything
On every other branch: build

Fixed in https://github.com/Team488/team488.github.io/commit/7d38d65e5219855d0a19cbc926fa354d6b346362
@WasabiFan


Show global alert for getLedgerAccountIds action

I tried signing in with a clean (no accounts) Ledger using the betanet link, and for some reason I'm not able to trigger the error. It just keeps 'processing...'

I tried signing in with a clean (no accounts) Ledger using the betanet link, and for some reason I'm not able to trigger the error. It just keeps 'processing...'


generate command yields "error generating the SDK: Object reference not set to an instance of an object"

Using kiota 0.6.0 on macos (installed via the Releases download here on GitHub):
curl -q https://gist.githubusercontent.com/DavidBiesack/cf30605f50d328aee36c9b5854859684/raw/9ca9d18ffe90128f2209a14b45f32930fdf3f2e5/banking-api-openapi-3.0.yaml > openapi.yaml
kiota generate --openapi openapi.yaml --language TypeScript --namespace-name Apiture.BankingClient --class-name BankingClient --clean-output --output ./gen/sdk/client --log-level Error

I get a cryptic error and the process fails:
crit: Kiota.Builder.KiotaBuilder[0]
      error generating the SDK: Object reference not set to an instance of an object.

Thanks for the bug report.  Unfortunately, the OpenAPI.NET library that does the parsing for Kiota doesn't support internal $refs to something that is not a component.

You would need to point the schema to #/components/schemas/problemResponse to resolve the issue.
I'll open an issue on https://github.com/microsoft/openapi.net to try and get a more clear error reported for that scenario.

alternatively, you can edit out the following to paths as they are the ones bringing the references the OpenAPI.net lib is not able to resolve:

/accounts/{accountId}/transactions
/accountBalances

Thanks @darrelmiller .
I'll adjust our tooling to simplify the $ref and keep schema references in #/components/schemas
Can kiota yield a better error message if the lib can't parse/resolve the input?

right now the parsing lib just throws a null reference exception without any additional context. Assuming the OpenAPI.net lib threw something with more information, kiota could provide more actionable feedback to the user.
@darrelmiller can you take that aspect into account when you log an issue over there please?


Incorrect API Version

Under the Modify your JSON deployment template section, you have incorrectly stated that the API version should be set to 2012-12-01 when it should be 2019-12-01.

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

ID: a757e5ad-ef01-afeb-4128-c296a616ec00
Version Independent ID: 05176b46-62e9-895a-b9fa-98d2a998ccd0
Content: Deploy on dedicated host - Azure Container Instances
Content Source: articles/container-instances/container-instances-dedicated-hosts.md
Service: container-instances
GitHub Login: @dkkapur
Microsoft Alias: dekapur

@Vegas588 Thanks for pointing this out.
The doc is now updated and changes will go live soon.


Set a fixed ephemeral port range to avoid bing errors.

Summary:
We would sometimes see binding errors for the forwarder test services or the
health check endpoint. Mesos launches executor with port 0 thus an executor
could block the port for the mentioned services.
This change will set the port range for port 0 outside of the ports assigned to
our test services.
Note that set_port_range.sh as to be added to any loop.
Test Plan: loop
Reviewers: unterstein, zen-dog, ichernetsky, timcharper, kensipe, meln1k, jenkins
Reviewed By: zen-dog, timcharper, meln1k, jenkins
Subscribers: marathon-team, marathon-dev, jenkins
Differential Revision: https://phabricator.mesosphere.com/D1058

This PR depends on #5509 and should only be merged or rather rebased with
git rebase karsten/1.4/backport/D1058 karsten/1.4/fix-provisioning master

after karsten/1.4/fix-provisioning master has been merged into master.


Add coredns image v1.9.4-hotfix.20240520

What type of PR is this?
/kind feature
What this PR does / why we need it:
To add coreDNS hotfix image (coredns:v1.9.4-hotfix.20240520) to cache that contains fix for CVE - CVE-2023-45288, CVE-2024-24788.
Requirements:
uses conventional commit messages
includes documentation
adds unit tests
tested upgrade from previous version
Special notes for your reviewer:
https://mcr.microsoft.com/en-us/product/oss/kubernetes/coredns/tags
docker pull mcr.microsoft.com/oss/kubernetes/coredns:v1.9.4-hotfix.20240520
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 76.661%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
3035

Relevant Lines:
3959

💛  - Coveralls


Error thrown inside an async rule are not sent to the fallbackError function

Describe the bug
If an async rule throws inside a chain, the error is not sent to the fallbackError function. The value is null.
Example
const editorIsEventOwner= chain(
  isPromoterStaff,
  rule({ cache: PermissionCache.STRICT })(
    async (_parent: {}, args: { id: string }, ctx: Context) => {
      const { id } = args;
      const event = await findEvent(toInt(id), ctx); // This can throw an Error
      if (!event) return false;
      return event.ownerId === ctx.user?.id;
    }
  )
);

This will correctly not allow the user to proceed if the findEvent fails, but it will not put the Error in the first parameter of the the function.

I created a work around in the mean time:
type AsyncIRuleFunction = (
  parent: any,
  args: any,
  ctx: any,
  info: any
) => Promise<IRuleResult>;

export const safe = (func: AsyncIRuleFunction): IRuleFunction => {
  return (parent: any, args: any, ctx: any, info: any) => {
    return func(parent, args, ctx, info).catch(
      (_) => new InternalServerError() // This inherits from ApolloError
    );
  };
};

Could you create a reproduction CodeSandbox?

@marktani here it is: https://codesandbox.io/s/example-graphl-shield-throw-x5g0h?file=/index.js

Ok tracked down the issue. Basically here https://github.com/maticzav/graphql-shield/blob/master/src/rules.ts#L74 we return false for any error thrown so there is no way for the generator calling it to have this error. I will send a proposal that is not a breaking change (was hard to find, but I got one).

The workaround for us is to set debug to true in development. This way we can find out errors that are thrown instead of returned.
https://codesandbox.io/s/example-graphl-shield-throw-mfgle?file=/index.js

I created a wrapper for the rule function. I would be willing to rewrite part of the lib to support more native feature if @maticzav let me. I basically did it with nexus-shield. I think the shift to throw would be better.

do you really need the error to be send to fallbackError? if not, you could make like:
const editorIsEventOwner = chain(
  isPromoterStaff,
  rule({ cache: PermissionCache.STRICT })(async (_parent: {}, args: { id: string }, ctx: Context) => {
    try {
      const { id } = args;
      const event = await findEvent(toInt(id), ctx); // This can throw an Error
      if (!event) return false;
      return event.ownerId === ctx.user?.id;
    } catch (error) {
      Sentry....
      return false
    }
  })
);

That would be awesome @Sytten

@maticzav I currently do not have a lot of time, but I would be happy to hop on a call so we can design the API and prepare for this v2 interface. Ping me on the prisma slack maybe?

Any update on this issue?

options.fallbackError is never executed with the thrown error, there isn't a code flow that reaches that statement.
if debug = false && allowExternalRules = false, rule returns false and fallbackError is called with null
if debug = true, rule re-throws and then generator re-throws again, never calling fallbackError with the error.
we need a different flag to support fallbackError with error as an argument, which is a use case I was in need for logging purposes while having custom errors in shield configuration
in rules.ts
`
async resolve(
parent: object,
args: object,
ctx: IShieldContext,
info: GraphQLResolveInfo,
options: IOptions,
): Promise {
try {
/* Resolve */
const res = await this.executeRule(parent, args, ctx, info, options)
  if (res instanceof Error) {
    return res
  } else if (typeof res === 'string') {
    return new Error(res)
  } else if (res === true) {
    return true
  } else {
    return false
  }
} catch (err) {
  if (options.debug) {
    throw err
  } else {
    return false
  }
}

}
`
in generator.ts
`
// Execution
try {
const res = await rule.resolve(parent, args, ctx, info, options)
  if (res === true) {
    return await resolve(parent, args, ctx, info)
  } else if (res === false) {
    if (typeof options.fallbackError === 'function') {
      return await options.fallbackError(null, parent, args, ctx, info)
    }
    return options.fallbackError
  } else {
    return res
  }
} catch (err) {
  if (options.debug) {
    throw err
  } else if (options.allowExternalErrors) {
    return err
  } else {
    if (typeof options.fallbackError === 'function') {
      return await options.fallbackError(err, parent, args, ctx, info)
    }
    return options.fallbackError
  }
}

}
`

in generator.ts, the following else if is never reached as well in any case
else if (options.allowExternalErrors) {
        return err

Note that would require a major version IMO since I rely on the current behaviour, see my comment above https://github.com/maticzav/graphql-shield/issues/739#issuecomment-616843767

@Sytten not entirely sure we would need a major version, it can be an addition instead of a rewrite
to reach the last 2 elses on the generator catch, we can just add a new flag, that throws on rules.ts, but skips the if(debug) on the generator.ts
this could be fixed in 2 phases

1 minor version adding a new flag
1 major version in the future rewriting this logic and re-thinking the flags themselves

Hello guys. Any plan to solve this? or a workaround example?


Display connection errors to the daemon in the UI

Periodically send a keepalive message; if the daemon does not come back with a
response, display a persistent toast notification (at the top of the screen, so
it's harder to miss or confuse).
Notification goes away when the connection to the daemon is re-established.
Fixes #460

This is a nice workaround, but I think the more proper solution would be a keep-alive on the event stream. Technically the http backend's presence is independent of the stream connection...
Here is the solution that I had in my mind:
1. Add `keep-alive` event to the event stream that includes the current timestamp

2. Store the `keep-alive` in the frontend (always overwrite with latest)

3. Add `useInterval` to periodically check if the stored `keep-alive` is up to date.

If it is not up to date:
1. try to reconnect to the stream

2. If that fails the backend must be gone, error.

I think this way is more resilient, and does not require requests from client to server, but just depends on the stream. Most public event streams have such kind of keep alive events for exactly that purpose. Let me know what you think

would you mind explaining why it would be more resilient this way? We already expose the '/alive call anyway. IMHO it's simpler and works just as good (not to mention that we can use it anywhere, not just in this UI).

This is a nice workaround, but I think the more proper solution would be a keep-alive on the event stream. Technically the http backend's presence is independent of the stream connection...
Here is the solution that I had in my mind:
1. Add `keep-alive` event to the event stream that includes the current timestamp

2. Store the `keep-alive` in the frontend (always overwrite with latest)

3. Add `useInterval` to periodically check if the stored `keep-alive` is up to date.

If it is not up to date:
1. try to reconnect to the stream

2. If that fails the backend must be gone, error.

I think this way is more resilient, and does not require requests from client to server, but just depends on the stream. Most public event streams have such kind of keep alive events for exactly that purpose. Let me know what you think

would you mind explaining why it would be more resilient this way? We already expose the '/alive call anyway. IMHO it's simpler and works just as good (not to mention that we can use it anywhere, not just in this UI).

Note sure how much I can argue for resilience. It is mostly a concern issue - the stream should make sure that the consumer of the stream can be sure the stream still works. The keep alive endpoints are used for a different purpose.
I think ensuring the keep-alive on the stream is less invasive - not in the sense of "what already exists", but who's concern it is to deal with this. The stream becomes a more complete, independent component then.
We already have the stream, with your solution we send unnecessary requests from frontend to backend.
To come back to the resilience: I think it can theoretically happen that you still reach the keep alive andpoint, but are disconnected from the event stream. So, the keep alive endpoint might just not always solve the problem you are trying to solve.

I agree that the solution would be nicer as it removes the need for the requests. I'm happy to come back and optimize it as a separate PR when I finish all my tasks scheduled for the current iteration ;)
For now, it's an improvement, as we don't detect lack of connectivity at all (not to mention that the component would be readily useful in any project that does not use SSE events).
I think with public endpoints/streams the biggest problem is scalability - it's not an issue here, as we have exactly 1 backend and 1 frontend.

I agree that the solution would be nicer as it removes the need for the requests. I'm happy to come back and optimize it as a separate PR when I finish all my tasks scheduled for the current iteration ;)
For now, it's an improvement, as we don't detect lack of connectivity at all (not to mention that the component would be readily useful in any project that does not use SSE events).
I think with public endpoints/streams the biggest problem is scalability - it's not an issue here, as we have exactly 1 backend and 1 frontend.

I see the argument of this already being an improvement and the possibility to put it on the stream later.
Could we go one step further in this PR and add re-trying to connect to the stream in case we detect that the keep-alive endpoint is not available? Can this easily be triggered with the infrastructure we have currently in place?

I agree that the solution would be nicer as it removes the need for the requests. I'm happy to come back and optimize it as a separate PR when I finish all my tasks scheduled for the current iteration ;)
For now, it's an improvement, as we don't detect lack of connectivity at all (not to mention that the component would be readily useful in any project that does not use SSE events).
I think with public endpoints/streams the biggest problem is scalability - it's not an issue here, as we have exactly 1 backend and 1 frontend.

I see the argument of this already being an improvement and the possibility to put it on the stream later.
Could we go one step further in this PR and add re-trying to connect to the stream in case we detect that the keep-alive endpoint is not available? Can this easily be triggered with the infrastructure we have currently in place?

That's not easy :( it will require more invasive change into the frontend, whilst I tried to keep this BackendCheck as a standalone component that can be used in any prototype we create.
Moving forward, I believe we don't even need to define any custom keepalive message, SSE events should be able to handle sending a heartbeat message and detecting the loss. I will raise a ticket to cover this improvement.

I agree that the solution would be nicer as it removes the need for the requests. I'm happy to come back and optimize it as a separate PR when I finish all my tasks scheduled for the current iteration ;)
For now, it's an improvement, as we don't detect lack of connectivity at all (not to mention that the component would be readily useful in any project that does not use SSE events).
I think with public endpoints/streams the biggest problem is scalability - it's not an issue here, as we have exactly 1 backend and 1 frontend.

I see the argument of this already being an improvement and the possibility to put it on the stream later.
Could we go one step further in this PR and add re-trying to connect to the stream in case we detect that the keep-alive endpoint is not available? Can this easily be triggered with the infrastructure we have currently in place?

That's not easy :( it will require more invasive change into the frontend, whilst I tried to keep this BackendCheck as a standalone component that can be used in any prototype we create.
Moving forward, I believe we don't even need to define any custom keepalive message, SSE events should be able to handle sending a heartbeat message and detecting the loss. I will raise a ticket to cover this improvement.

Probably my wording was not correct, a heartbeat is what I meant all along. But maybe that does not even need a specific message then and can be handled in an even simpler way. I have not looked into heartbeat implementations for sse in detail.

I agree that the solution would be nicer as it removes the need for the requests. I'm happy to come back and optimize it as a separate PR when I finish all my tasks scheduled for the current iteration ;)
For now, it's an improvement, as we don't detect lack of connectivity at all (not to mention that the component would be readily useful in any project that does not use SSE events).
I think with public endpoints/streams the biggest problem is scalability - it's not an issue here, as we have exactly 1 backend and 1 frontend.

I see the argument of this already being an improvement and the possibility to put it on the stream later.
Could we go one step further in this PR and add re-trying to connect to the stream in case we detect that the keep-alive endpoint is not available? Can this easily be triggered with the infrastructure we have currently in place?

That's not easy :( it will require more invasive change into the frontend, whilst I tried to keep this BackendCheck as a standalone component that can be used in any prototype we create.
Moving forward, I believe we don't even need to define any custom keepalive message, SSE events should be able to handle sending a heartbeat message and detecting the loss. I will raise a ticket to cover this improvement.

Probably my wording was not correct, a heartbeat is what I meant all along. But maybe that does not even need a specific message then and can be handled in an even simpler way. I have not looked into heartbeat implementations for sse in detail.

It's not about wording, I tried to say that it seems like we do not need to add any custom events, they might even already be there (depends on Rocket defaults, would need to check, and enable the heartbeat if it isn't). The trick will be to detect it appropriately on the client side, I'll look into that next week.

Go for it then, I don't see blockers, just future improvements :)

cool, I'll capture the thoughts from here in a separate ticket to address soon!

bors r+

bors r+


xRDSessionDeployment, xRDServer: Fixes for #47 and #50

Pull Request (PR) description
This PR contains the changes from PR #55 from @peppekerstens merged with dev. It fixes some typo's in parameters and a case where, when the RDMS service does not exist, the resource would throw an error.
This Pull Request (PR) fixes the following issues

Fixes #47
Fixes #50

Task list

[X] Added an entry under the Unreleased section of the change log in the README.md.
Entry should say what was changed, and how that affects users (if applicable).
[ ] Resource documentation added/updated in README.md.
[ ] Resource parameter descriptions added/updated in README.md, schema.mof
and comment-based help.
[ ] Comment-based help added/updated.
[ ] Localization strings added/updated in all localization files as appropriate.
[ ] Examples appropriately added/updated.
[X] Unit tests added/updated. See DSC Resource Testing Guidelines.
[ ] Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
[ ] New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

This change is

Codecov Report

Merging #58 into dev will increase coverage by 2.36%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##              dev     #58      +/-   ##
=========================================
+ Coverage   85.03%   87.4%   +2.36%
=========================================
  Files           8       8
  Lines         381     381
  Branches        9       9
=========================================
+ Hits          324     333       +9
+ Misses         48      39       -9
  Partials        9       9

Impacted Files
Coverage Δ

DSCResources/MSFT_xRDServer/MSFT_xRDServer.psm1
66.12% <100%> (+14.51%)
:arrow_up:

...RDSessionDeployment/MSFT_xRDSessionDeployment.psm1
94.73% <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 b2d1035...1c3ac8a. Read the comment docs.

Hi @gaelcolas, mind helping us out merging this one as well?

More than a month ago. @ld0614 any chance you can look into this?

Tagging @johlju for a review. Thanks in advance!

@danielboth or @gaelcolas could either of you add Closes #55 to the PR description so we close the other PR as well when this merges?
@gaelcolas can you please merge this PR.

Thanks @danielboth 	& @johlju
I'm just hilighting the Codecoverage diff hit in case you haven't seen it, but will merge anyway.

I ignored it since sometimes it gives false negatives. Code coverage report looked okay, and thought the changes made should be covered by existing tests.
Sure, we could have done TDD and make a (regression) test that fails before making the change, so it shows the change works. :)

After looking at the tests again it looks like there were tests made to cover this change. That’s why I ignored the code coverage status check (as it can give false negatives in some scenarios).


Extend the documentFormattingProvider and documentRangeFormattingProvider interface with document selectors

Feature Request:
Extend the interface: documentFormattingProvider, documentRangeFormattingProvider with a document selector.
I'm currently developing a vscode plugin that uses a language server to support a new programming language. However, it is dependent on the content of JSON files. so in the clientoptions I had to define that it supports JSON files.
  let clientOptions: LanguageClientOptions = {
    // Register the server for plain text documents
    documentSelector: [
      { scheme: "file", language: McFunctionIdentifier },
      { scheme: "file", language: McLanguageIdentifier },
      { scheme: "file", language: "json" },
      { scheme: "file", language: "jsonc" },
    ],
}

I recently added a code formatter for the first two custom languages, but vscode now also tries to format json files using my language server.
Therefor, if we can configure on what language these features can be used. would resolve this issue.

@DaanV2 dynamic registration (if support by the client which is the case or VS Code) is your friend here. See https://microsoft.github.io/language-server-protocol/specifications/specification-current/#client_registerCapability and https://github.com/microsoft/vscode-eslint/blob/master/server/src/eslintServer.ts#L887 as an example.


SimpleTemplate and long i18n strings

If I have the following in a template:
{{_('This is a really long string that '
    'I want to split across multiple lines in the source')}}

What I get in the output is the exact same thing, including the {{ and }}.  I may be missing the "proper" way to make {{ and }} span multiple lines.  However, if I use the mako_view and do about the same thing:
${_('This is a really long string that '
    'I want to split across multiple lines in the source')}

It works fine.

Using 0.10 stable.

Documented known issue, sorry.


Example demo don't work

demo error：
fatal error: unexpected signal during runtime execution
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x55adf2]
runtime stack:
invalid spdelta 0x55add0 0x55adf2 0x150f3b -1
runtime.gothrow(0x6e4ed0, 0x2a)
c:/go/src/runtime/panic.go:503 +0x8e
runtime.sigpanic()
c:/go/src/runtime/os_windows.go:36 +0x65
invalid spdelta 0x55add0 0x55adf2 0x150f3b -1
_cgo_73cb713ea330_Cfunc__g_signal_connect()
?:0 +0x22
goroutine 1 [syscall, locked to thread]:
runtime.cgocall_errno(0x55add0, 0xc082021a70, 0x0)
c:/go/src/runtime/cgocall.go:130 +0xdb fp=0xc082021a50 sp=0xc082021a28
github.com/mattn/go-gtk/glib._Cfunc__g_signal_connect(0x0, 0x3d3bef0, 0x6, 0x0)
E:/go/project/src/github.com/mattn/go-gtk/glib/:80 +0x4b fp=0xc082021a70 sp=0xc082021a50
github.com/mattn/go-gtk/glib.(*GObject).Connect(0xc08204a130, 0x683470, 0x7, 0x588320, 0xc082006400, 0x0, 0x0, 0x0, 0x0)
E:/go/project/src/github.com/mattn/go-gtk/glib/glib.go:725 +0x2d7 fp=0xc082021b68 sp=0xc082021a70
github.com/mattn/go-gtk/gtk.(*Widget).Connect(0xc08204a128, 0x683470, 0x7, 0x588320, 0xc082006400, 0x0, 0x0, 0x0, 0x5)
E:/go/project/src/github.com/mattn/go-gtk/gtk/gtk.go:9298 +0xc6 fp=0xc082021bc8 sp=0xc082021b68
main.main()
E:/go/project/src/github.com/mattn/go-gtk/example/demo/demo.go:234 +0x1598 fp=0xc082021f98 sp=0xc082021bc8
runtime.main()
c:/go/src/runtime/proc.go:63 +0xfa fp=0xc082021fe0 sp=0xc082021f98
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:2232 +0x1 fp=0xc082021fe8 sp=0xc082021fe0
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
c:/go/src/runtime/asm_amd64.s:2232 +0x1
my os is win7 64bit ,cpu:core i7

Just run go run demo.go ?

Mine doesn't work either. It tells me that gdk_pixbuf_get_pixels with length can't be found in the dynamic links library .

@Eiwhaz What version of gtk do you use?

I'm using the 2.22-64bits version, the all-in-one bundle. I tried the 3.X before I saw that you asked for the 2.X for Linux, thus I thought we were needing it as well for Windows (I maybe should have said first that I was trying to get it work on Windows indeed). The 3.X didn't work either, though I don't recall the error messages.

2.22 doesn't have gdk_pixbuf_get_pixels
https://developer.gnome.org/gdk-pixbuf/stable/gdk-pixbuf-The-GdkPixbuf-Structure.html#gdk-pixbuf-get-pixels-with-length

Since 2.26

Same problem here. I first installed using "make example", then tried "go run demo.go", but I get a fatal error:
fatal error: unexpected signal during runtime execution
[signal 0xb code=0x80 addr=0x0 pc=0x7fb8ec16d950]

runtime stack:
runtime.throw(0x76cde0, 0x2a)
	/usr/lib/go-1.6/src/runtime/panic.go:547 +0x90
runtime.sigpanic()
	/usr/lib/go-1.6/src/runtime/sigpanic_unix.go:12 +0x5a

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x5dc030, 0xc82004fb68, 0x100000000000000)
	/usr/lib/go-1.6/src/runtime/cgocall.go:123 +0x11b fp=0xc82004fb30 sp=0xc82004fb00
github.com/mattn/go-gtk/gtk._Cfunc_gtk_init(0xc82000a2c4, 0xc82000a2c8)
	??:0 +0x36 fp=0xc82004fb68 sp=0xc82004fb30
github.com/mattn/go-gtk/gtk.Init(0xb17070)
	/home/foo/rdata/pdata/go-projects/src/github.com/mattn/go-gtk/gtk/gtk.go:230 +0x1ff fp=0xc82004fc40 sp=0xc82004fb68
main.main()
	/home/foo/rdata/pdata/go-projects/src/github.com/mattn/go-gtk/example/demo/demo.go:49 +0x32 fp=0xc82004ff50 sp=0xc82004fc40
runtime.main()
	/usr/lib/go-1.6/src/runtime/proc.go:188 +0x2b0 fp=0xc82004ffa0 sp=0xc82004ff50
runtime.goexit()
	/usr/lib/go-1.6/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc82004ffa8 sp=0xc82004ffa0

goroutine 17 [syscall, locked to thread]:
runtime.goexit()
	/usr/lib/go-1.6/src/runtime/asm_amd64.s:1998 +0x1
exit status 2

I have tried some of the other examples, but I get fatal errors on all of them.
Running Linux 4.6.0-0.bpo.1-amd64 #1 SMP Debian 4.6.4-1~bpo8+1 (2016-08-11) x86_64 GNU/Linux


fix(validators): check if viewValue is empty for maxlength

@petebacondarwin This is the bug you found where $isEmpty is called with the modelValue. To make this consistent, we should also add this test to all other validators. Does this make sense to you?

LGTM - feel free to merge. You can add the extra tests if you like.


Azure PowerShell - Service Principal Secret can be exposed

Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: AzurePowerShell
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/AzurePosweShell
Environment

Server - Azure Pipelines
Agent - Private (Windows Server 2016)

Issue Description
I have found that I can obtain all the authentication information for the Service Principal configured to run the task.  It takes a couple of lines of PowerShell code and reveals this information:

Is this supposed to be so easy?

Yes. It's still encrypted at rest, and if you specify it as a secret variable, Pipelines will attempt to mask it in output if possible.
You very specifically made an action to get at it. It doesn't show by default.
https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch

This is related to secrets in job/agent - passing onto core team.

Please can you say how to do this, I am unable to find a passed variable and need to actually debug how to find that variable and having a list of them would be great

@craigmpeters
Just somewhere in your script do:
Get-Variable | ft | out-string
or
$env | ft | out-string
To get a summary of related variables. If you're debugging though, you really should read the section about debugging powershell using the azure functions core tools, you can set breakpoints and all taht fun stuff.

Cheers - Managed to work it out using Parameters into the script itself but might use this to see if it is there and I can streamline things a bit

Sorry for the delay, I have included a sample script below that gets the secrets and writes them out so you can see them in the task log.
$m = Get-Module 'VstsTaskSdk'
$stuff= $m.SessionState.PSVariable.Get("vault").Value

$taskVariables=@{}

$stuff.GetEnumerator() | % {
        $info =$_.Value.GetNetworkCredential()
        $taskVariables.Add($info.UserName, $info.Password)
    }
$taskVariables | Out-Host

One solution would be to add the code below in to the task however I am not really sure this is the "Right" way to address the problem (Mainly because it assumes something about the internal implementation of the SDK)
Perhaps the SDK should be updated so that it has public function that can be called to clear all stored secrets?  This will address the issue for any DevOps takss that use the updated SDK code, not sure about tasks that don't use the updatd SDK.  Might need a little thought and ideas from a few people however my initial sense is that it won't be an issue.
    # Clear values from VstsTaskSdk variable vault before invoking the script to prevent
    # people fishing for credentials
    Get-Module 'VstsTaskSdk' | ForEach-Object {
        $sdkVariableVault = $_.SessionState.PSVariable.GetValue('vault') -as [System.Collections.IDictionary]
        if ($sdkVariableVault) {
           $sdkVariableVault.Clear()
        }
    }

Task
File
Line

AzurePowerShellV2
AzurePowerShell.ps1
102

AzurePowerShellV3
AzurePowerShell.ps1
105

AzurePowerShellV3
AzurePowerShell.ps1
84

ServiceFabricPowerShellV1
ServiceFabricPowerShell.ps1
71

This is working as designed. Secrets are meant only to mask exact matches - e.g. if you mask abc, the following output:
abc
helloabcworld
a
bc
adbc

should result in:
*****
hello*****world
a
bc
adbc

If people are able to arbitrarily run a script, they can just arbitrarily manibulate/send the secret anyways, at that point our security boundary has already been crossed. Closing since I don't think this is an issue, please comment if you think it should be reopened.


check if workflow is closed when processing sticky timeout timer

when processing sticky decision timeout, we need to check if the workflow is already closed.

Coverage decreased (-0.04%) to 66.46% when pulling a0cae6a305fe2b7edaa299ceb2fbf3c1b6b6a1d4 on yiminc:fix_sticky_timeout into 9314ff5b5d1a1966b13ce0d7caa75be446d5b5bb on uber:master.


Incorrect abbreviation for the category of "Object Name."

Thank you for openly sharing the relevant data. Your work is excellent.! In the README file, it seems that "Object Name" should not belong to the same category as "Object Amount" under "OBA." According to your paper, "Object Name" should be categorized under "OBN."

Thank you for the correction, it was a typo in the readme file. We have corrected it : )


Compile error in oref0-setup.sh when choosing to compile go code from source

Started interactive setup with g4-go, not explorer, not edison, not head and decide to compile from source. Setup fails with following error:
Fetching https://golang.org/x/sys/unix?go-get=1
Parsing meta tags from https://golang.org/x/sys/unix?go-get=1 (status code 200)
get "golang.org/x/sys/unix": found meta tag get.metaImport{Prefix:"golang.org/x/                                                              sys", VCS:"git", RepoRoot:"https://go.googlesource.com/sys"} at https://golang.o                                                              rg/x/sys/unix?go-get=1
get "golang.org/x/sys/unix": verifying non-authoritative meta tag
Fetching https://golang.org/x/sys?go-get=1
Parsing meta tags from https://golang.org/x/sys?go-get=1 (status code 200)
golang.org/x/sys (download)
github.com/ecc1/radio (download)
github.com/ecc1/spi (download)
github.com/ecc1/nightscout (download)
github.com/ecc1/papertrail (download)
runtime
# runtime
/usr/local/go/src/runtime/mwbbuf.go:162:19: getg().m.p.ptr().wbBuf undefined (ty                                                              pe *p has no field or method wbBuf)
/usr/local/go/src/runtime/mwbbuf.go:172:20: getg().m.p.ptr().wbBuf undefined (ty                                                              pe *p has no field or method wbBuf)
/usr/local/go/src/runtime/mwbbuf.go:196:38: _p_.wbBuf undefined (type *p has no                                                               field or method wbBuf)
/usr/local/go/src/runtime/mwbbuf.go:197:11: _p_.wbBuf undefined (type *p has no                                                               field or method wbBuf)
/usr/local/go/src/runtime/mwbbuf.go:197:47: invalid expression unsafe.Sizeof(_p_                                                              .wbBuf.buf[0])
/usr/local/go/src/runtime/mwbbuf.go:198:13: _p_.wbBuf undefined (type *p has no                                                               field or method wbBuf)
/usr/local/go/src/runtime/mwbbuf.go:201:5: _p_.wbBuf undefined (type *p has no f                                                              ield or method wbBuf)
/usr/local/go/src/runtime/mwbbuf.go:254:5: gcw.putBatch undefined (type *gcWork                                                               has no field or method putBatch)
Couldn't go get medtronic

As a side note: I used the dev branch...

I also had this problem. After uninstalling golang v1.10.3 and installing v1.9.7 everything works.

Interesting...
But when I compile by hand, it works just fine !

Can you check your GOROOT in $HOME/.bash_profile ?
Maybe you should change to empty

I can try, but I think that's a task for the setup script to make sure the environment is right set up...

I am having v1.9.7 of go but I still have same problem.
`/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:162:19: getg().m.p.ptr().wbBuf undefined (type *p has no field or method wbBuf)
/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:172:20: getg().m.p.ptr().wbBuf undefined (type *p has no field or method wbBuf)
/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:196:38: p.wbBuf undefined (type *p has no field or method wbBuf)
/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:197:11: p.wbBuf undefined (type *p has no field or method wbBuf)
/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:197:47: invalid expression unsafe.Sizeof(p.wbBuf.buf[0])
/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:198:13: p.wbBuf undefined (type *p has no field or method wbBuf)
/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:201:5: p.wbBuf undefined (type *p has no field or method wbBuf)
/Users/jprince/golang/go/src/github.com/grpc-ecosystem/grpc-gateway/runtime/mwbbuf.go:254:5: gcw.putBatch undefined (type *gcWork has no field or method putBatch)`

I'm guessing this has been resolved since then in 0.7.0-dev, but please open a new issue for any related errors with the current dev branch.


Implement global table and table scan functionality

This PR implements both serial scans and parallel scans for Dynamo tables.

@jonathn-al Think I've implemented all of your suggestions.

👍


Phoenix aja/species assignment

PR includes:

species_assignment.ipynb: code used for clustering/generating clustermap and hierarchical clustering figures.

ksize_15.distances.tsv: distance matrix produced from SKA

visual_vs_corrected_species.csv: final table of visual vs. corrected species. (code to generate in species_assignment.ipynb)

species_assignment_clustermap.png final clustermap image

In jupyter notebook, name of distance matrix should be updated.
t_raw = pd.read_csv("ksize_15_11_25_19.distances.tsv", sep="\t") > t_raw = pd.read_csv("ksize_15.distances.tsv", sep="\t")
Incorrect genus names for particeps (should be Culiseta particeps) and dorsalis (should be Aedes dorsalis).
Order of legend is arbitrary when I run locally, though somehow not in the data @phoenixAja shared in Slack. Ordered by genus is desired.
Color bar for scale of SNP distance. (With values of 0 and 0.05 labeled).
Names 'Corrected' and 'Original' should be same size as legend names in Figure, though we can also change that in Illustrator in post. For that, we should have an svg output in addition to the png.


vSphere CPI Chart: Add Dualstack support

Is your feature request related to a problem? Please describe.
Upstream vSphere CSI has just added docs for guidance and how to enable dual stack support for the cloud provider.

https://github.com/kubernetes/cloud-provider-vsphere/pull/595

Describe the solution you'd like
Expose this functionality in future chart versions.

There is not much activity/context left here, so closing this issue. If such a need arises in future, this issue can be reopened.