Use dotnet JSON in .NET Core 3.0

Is your feature request related to a problem? Please describe.
dotnet FX is shipping JSON serializer, ref: https://github.com/dotnet/announcements/issues/90
Describe the solution you'd like
Leverage dotnet FX JSON serializer instead of JSON.net
Describe alternatives you've considered
Extend CosmosJsonSerializer with new serializer and leverage it.
Additional context

Do we have any requirements to support .NET Framework? Even if we target .NET standard 2.1 there is no support for .NET Framework.

if you want to serialize through the Utf8JsonWriter then you can implement your own CosmosJsonSerializer.
JsonDocument supports parsing a stream and you can wrap an IBufferWriter<byte> into a Stream so you can write to it like follows.
The downside is the data is copied out of the stream rather than written directly to the output.
    class MemoryBufferWriter : Stream, IBufferWriter<byte>
    {
        private readonly byte[] _buffer = new byte[0xFFFF];
        private int _written = 0;
        private int _read = 0;

        public override bool CanRead => true;
        public override bool CanSeek => false;
        public override bool CanWrite => false;
        public override long Length => _written;
        public override long Position { get => _written; set => throw new NotImplementedException(); }
        public void Advance(int bytes) => _written += bytes;
        public override void Flush() => throw new NotImplementedException();
        public Memory<byte> GetMemory(int sizeHint = 0) => _buffer.AsMemory().Slice(_written);
        public Span<byte> GetSpan(int sizeHint) => _buffer.AsSpan().Slice(_written);
        public override int Read(byte[] buffer, int offset, int count)
        {
            Array.Copy(_buffer, _read, buffer, offset, count);
            _read += count;
            return count;
        }
        public override long Seek(long offset, SeekOrigin origin) => throw new NotImplementedException();
        public override void SetLength(long value) => throw new NotImplementedException();
        public override string ToString() => Encoding.UTF8.GetString(_buffer.AsSpan(0, _written).ToArray());
        public override void Write(byte[] buffer, int offset, int count) => throw new NotImplementedException();
    }

the latest drop of the dotnet FX JSON serializer is netstandard2.0 compliant as well as supporting streams in the writer

I did an analysis of the impact to remove Json.Net from the core libraries while continuing to provide backward compatibility.
The approach I would consider is removing all the strongly typed classes and methods from the core functionality and replace Stream with Memory.
From there is would use dependency injection in the client builder to layer in the typed classes and methods. This way System.Text.Json or Json.Net can be used.
From performance it will allow direct access to the raw data in a response without serialization overhead.
Extension methods can be used to pull the data into typed instances, and interfaces or abstract classes can be used to enforce the contract for the internal types.

Closing as duplicate of #2533


getCookie return undefined only on ssr

Environment

Operating System: Darwin
Node Version:     v16.18.1
Nuxt Version:     3.5.1
Nitro Version:    2.4.1
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      runtimeConfig, devServer, vite, typescript, css, modules, tailwindcss
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
https://stackblitz.com/edit/nuxt-starter-ugzbfq
Describe the bug
I premise that I don't know if it makes more sense to put this issue here, or on h3. I am trying to read a cookie in a nuxt server api. As written in the documentation, I am using the getCookie() fuction to which I pass event and the name of the cookie, but when I resfresh the page it always returns undefined. On the client side, everything works correctly.
This is the code of my server api:
import validator from "validator"

export default defineEventHandler(event => {
  const authorization = getHeader(event, "Authorization")
  const token = authorization?.split(" ")[1] || ""
  const isValid = validator.isUUID(token)
  const validToken = getCookie(event, "validToken")
  const validTokenExistAndIsNotEqualToToken = validToken && validToken !== token

  console.log("validToken", validToken) // undefined on server side

  if (!token || !isValid || validTokenExistAndIsNotEqualToToken) {
    throw createError({
      statusCode: 401,
      statusMessage: "Unauthorized"
    })
  }

  if (!validToken) {
    throw createError({
      statusCode: 403,
      statusMessage: "Forbidden"
    })
  }

  return {
    stringMessage: "This is a secret message from the server"
  }
})

Additional context
No response
Logs
No response

It works fine for me. Are you sure the cookie is being sent to the server?
Would you provide a reproduction? 🙏

Environment

Operating System: Darwin
Node Version:     v16.18.1
Nuxt Version:     3.5.1
Nitro Version:    2.4.1
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      runtimeConfig, devServer, vite, typescript, css, modules, tailwindcss
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
...
Describe the bug
I am trying to read a cookie in a nuxt server api. As written in the documentation, I am using the getCookie() fuction to which I pass event and the name of the cookie, but when I resfresh the page it always returns undefined. On the client side, everything works correctly. This is the code of my server api:
import validator from "validator"

export default defineEventHandler(event => {
  const authorization = getHeader(event, "Authorization")
  const token = authorization?.split(" ")[1] || ""
  const isValid = validator.isUUID(token)
  const validToken = getCookie(event, "validToken")
  const validTokenExistAndIsNotEqualToToken = validToken && validToken !== token

  console.log("validToken", validToken) // undefined on server side

  if (!token || !isValid || validTokenExistAndIsNotEqualToToken) {
    throw createError({
      statusCode: 401,
      statusMessage: "Unauthorized"
    })
  }

  if (!validToken) {
    throw createError({
      statusCode: 403,
      statusMessage: "Forbidden"
    })
  }

  return {
    stringMessage: "This is a secret message from the server"
  }
})

Additional context
No response
Logs
No response

It works fine for me. Are you sure the cookie is being sent to the server?
Would you provide a reproduction? 🙏

I've attached a reproduction on stackblitz! But I'm not sure it's faithful because I noticed that it doesn't save my cookies.

Unfortunately stackblitz doesn't work with cookies correctly, but I can download and test locally - thanks!

Seems to be working fine for me.

Can you check the headers in your network panel?

How can i check a network request in chrome on server side?

Check the request to your server API from your browser. That's where the cookie is being passed.

Ahh, I see. In that case, rather than using $fetch, you can use useRequestFetch() which will automatically proxy cookies to the endpoint. (Internally, that's what useFetch does.)

I solved the problem by usingFetch instead of useAsyncData


Some sidebars don't display properly

For some reason St-Gall 390 (https://cantusdatabase.org/source/123717) has the sidebar at the bottom of the page in italics, like so:

Many other manuscripts I tried display the sidebar correctly, so I don't know what's wrong with this one.

see also https://cantusdatabase.org/source/123672

see also related issues #849, #472

I don't notice a problem on https://cantusdatabase.org/source/123672 --am I crazy?

BUT I just noticed that the same problem source from earlier (St-Gall 390, https://cantusdatabase.org/source/123717) puts not only the sidebar, but in fact the whole footer in italics:

I don't notice a problem on https://cantusdatabase.org/source/123672 --am I crazy?

So interesting! I definitely get it on that source...across multiple browsers

...puts not only the sidebar, but in fact the whole footer in italics:

To the extent that there exist charming bugs-- this is a charming bug :) 🐛

I think we can consider this closed. I don't get this issue on any of the aforementioned sources anymore, and I suspect that it was solved in the course of our templating changes in #1488 (and maybe #1537?)


DTPORTAL-16509 attempt to fix race to stop_by_redirect

please let me know if i should be targeting a different branch

Eek, not sure why build is now failing to bundle install on JRuby 9.2.
This isn't a problem you introduced, but if can you see if it's a problem on upstream adhearsion as well?  If it's happening in both places, see if it's possible to resolve.
FYI, there are 2 packaging related specs that do fail in adhearsion. Those are a bit trickier... So don't expect up get a green build. But if you can get past bundle install, then that's a good win.

And target branch looks great, ty man

seems the build failure was momentary - rebuild came back green

Looks like build soft-failed on JRuby 9.2 with an unfun issue about not being able to install nio4r:

checking for unistd.h... RuntimeError: The compiler failed to generate an executable file.
You have to install development tools first.

...A good to know issue, but completely unrelated to this PR.  Just good to know, we'll knock the nio4r issue out separately later.

@mattcar Can you go ahead and merge this for us?  FYI: @rkodali2
@gfaza After this is merged, please create another PR on the apptastic repo associated with the same JIRA ticket which updates to point to the lastest version of adhearsion @ cloudvox:dialogtech/support/3.0.0.rc1.

@sfgeorge, the apptastic PR to point at this new version: https://github.com/cloudvox/apptastic/pull/653


Thermo schedule

Hi,
Any chance you’re able to decode the thermo schedule format? I’ve included the data from your example and it show nice schedules for regular, bathroom and basement. It would be nice to add honeywell evohome’s schedule in there.
Thx!

Unfortunately I’ve not spent too much of my (limited) time on that. It seems that there is a fixed number of possible schedule change per day, those not used are set to 0xFF, and then this pattern is repeated for the 7 days. You may try changing the data that I passed you and see what happens. This is apparently to read schedule from the accessory. It is completely unclear how to write it, tough.

Evo app writes the schedule, the thermo is supposed to implement and respond with the same data if successful.
I'm not into it a lot because the app won't let you program individual days, anyway Evo app sends "ff04f6" for schedule off and "001301f4241a24fc360e1f0112fa2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff2472ffffffffffff1a2472ffffffffffff" for "basement" setting.
Consider that bytes 8-13 are T&D so they change at each request.

so Eve writes on 12C and the Accessory answers with the current schedule on 12F (i.e. that in its memory if Eve sent OFF schedule, or the one Eve's just sent for an active schedule)?

Yes

Some information about the Thermo schedule:
Custom characteristics E863F12F (ProgramData), E863F12C (ProgramCommand) are used to handle data transfer between Eve App and the accessory. The App writes to E863F12C (ProgramCommand) and the accessory answers with E863F12F (ProgramData).
A typical command for setting up the default bathroom schedule is:
001301f426262efc370b1b0b131a2a426c84fffffffffa1e336c7effffffff1e336c7effffffff1e336c7effffffff1e336c7effffffff1e336c7effffffff2a426c84ffffffff2a426c84ffffffff06
This command is divided into several single commands, starting with an OpCode and followed by some bytes (length depends on the OpCode).
In this case:

00: Maybe indication that this is a set command? (In other cases there is also FF as start byte)
13 01: Enable schedule (01: enable, 00: disable)
f4 26262e: Temperature levels (NOW,LOW,HIGH) in 0.5°C steps (0x26=38, 380.5=19°C, 0x2e=46, 460.5=23°C), (0x80 for invalid, e.g. for NOW-temp when schedule is disabled)
fc 370b1b0b13: Date and Time (mmhhDDMMYY: 55 11 27 11 19 = "27.11.20 11:55")
1a 2a426c84ffffffff: Program for free day
fa 1e336c7effffffff 1e336c7effffffff 1e336c7effffffff 1e336c7effffffff 1e336c7effffffff 2a426c84ffffffff 2a426c84ffffffff: Program for week (MO, TU, WE, DO, FR, SA, SU)
06: Maybe indication for end of command?

Each program (8 byte section) contains the individual switching times in 10-minute steps. For example 1e336c7effffffff means:

1e: 0x1e=30, 30*10min = 300min = 05:00 Start
33: 0x33=51, 51*10min = 510min = 08:00 End
6c: 0x6c=108, 108*10min = 1080min = 18:00 Start
7e: 0x7e=126, 126*10min = 1260min = 21:00 End
ff: no value

Other commands:

just enable/disable: 00 1301 06/00 1300 06
often ff04 f6 is triggered (maybe an announcement for following get-request?)
ff00 f22076 ?
valve protection triggers 00 11 ff00 f22076 (11 is the relevant byte)
temperature offset (in settings): 00 12e7 f480262e

12 e7: 0xe7 = -25 (Two's complement), -25*0.1 = -2.5°C
f4 80262e: Temperature levels (see above)

vacation mode (via scene): 00 190122 06 7f / 00 1900ff 06 7f

19 XX TT: XX=01(enable), XX=00(disable), TT=vacationTemperature (0x22=34, 34*0.5 = 17°C)

installation (remove command): 00 10 ???

Status value in ProgramData:
The current status must be reflected in E863F12F (ProgramData), but without the leading 00 (!) and some small discrepancies.
A typical status value for for a disabled default schedule could be:
12e7130014c01900fffc2c0c1b0b13f41010222af60000001a24366684fffffffffa24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff24366684ffffffff
In this case:

12e7: Temp Offset: -25*0.1 = -2.5°C
13 00: 00 = Schedule disabled
14 c0: OpCode 14 has anything to do with the installation page (value c0 results in a green checkmark, c1-c7 for other steps)
19 00ff: vacation mode (00=disabled, ff=invalid(temperature))
fc 2c0c1b0b13: Date and Time (see above)
f4 2222222a: Temperature levels (Attention: In status we need 4(!) data bytes. First 2 bytes unclear (no effect?), last 2 bytes: low and high temperature)
f6 000000: Open Window detection (00????: ok, 10????: open Window detected)
1a 24366684ffffffff: Program for free day
fa 24366684ffffffff 24366684ffffffff 24366684ffffffff 24366684ffffffff 24366684ffffffff 24366684ffffffff 24366684ffffffff: Program for week

Other status values:

17 040a: ??? (seen in someones dumps?)
F3 XXXXXXXX: ???

I added a Pull Request: #80

@tobekas did you get anywhere with finding how to set the valve protection from Status value in ProgramData?? Seems just returning "1101" doesn't show an enabled setting for it and invalidates the remaining entires in the string

Hm, it was a while ago… but no. Sorry. Could not find out what to return for valve protection etc.


Add plugin zip as an archive, fix lombok in compile

I'm playing around with Twirp/Flit and found a few minor things while setting up a consuming gradle build.
I'm not an expert on jitpack, but these changes let me pull in the plugin zip file automatically:
https://github.com/stephenh/twirp-flit-sandbox/blob/master/build.gradle#L21
Seems pretty neat.

Thanks Stephen! Apologies I hadn't picked this up before.


Yeelight strip unavailable(YLDD04YL)/Cannot determine device type

Last working Home Assistant release (if known):
0.94.2
Operating environment (Hass.io/Docker/Windows/etc.):
Hassio on Raspberry pi 3
Component/platform:
https://www.home-assistant.io/components/yeelight/
Description of problem:
Since the update my yeelight strip is always unavailable, but it works on the yeelight app and the developer mode/lan control is active, nothing has change, the firmware is 1.4.2_0049
I have no specific configurations for yeelight and all my bulbs and strip v1 (YLDD01YL) are working
In the log i have this
Cannot determine device type for 192.**********, yeelight_strip2_*********

2019-06-29 13:48:57 INFO (MainThread) [homeassistant.components.discovery] Found new service: yeelight {'host': '<IP_ADDRESS>', 'port': 54321, 'hostname': 'yeelink-light-strip2_miio133179264.local.', 'properties': {'epoch': '1', 'mac': '04cf8ca396ae'}, 'mac_address': '04cf8ca396ae', 'device_type': 'strip2'}
Did you changed your config:
discovery:
ssdp:
zeroconf:

No nothing changed, i just updated my hassio

No nothing changed, i just updated my hassio

This is with 0.95.3 with Docker. So you've the configuration as above? Since there was a change recently and I missed it also in the first place. If you've then I don't know...

Everything ok in the configuration, try multiple reboot of the light, of hassio but still this error Cannot determine device type for 192

Have you tried to update to 0.94.4? This yeelight related fix was included in the latest release: #24671

thanks @posavasos it works great after the update, i'll close it


Bug Description
I keep getting this error despite installing the latest version of langchain-community.
Version
0.10.14
Steps to Reproduce
First bug-report so unsure if it's correct:
But I'm using AzureOpenAI + OpenAI Pydantic Program + OpenAI for embedding + Cohere for reranking.
Relevant Logs/Tracbacks
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/chat_models/__init__.py:31: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.chat_models import ChatAnyscale`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/chat_models/__init__.py:31: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.chat_models import ChatOpenAI`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/embeddings/__init__.py:29: LangChainDeprecationWarning: Importing embeddings from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.embeddings import HuggingFaceBgeEmbeddings`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/embeddings/__init__.py:29: LangChainDeprecationWarning: Importing embeddings from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.embeddings import HuggingFaceEmbeddings`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/llms/__init__.py:548: LangChainDeprecationWarning: Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.llms import AI21`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/llms/__init__.py:548: LangChainDeprecationWarning: Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.llms import Cohere`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/llms/__init__.py:548: LangChainDeprecationWarning: Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.llms import FakeListLLM`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/langchain/llms/__init__.py:548: LangChainDeprecationWarning: Importing LLMs from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

`from langchain_community.llms import OpenAI`.

To install langchain-community run `pip install -U langchain-community`.
  warnings.warn(
Traceback (most recent call last):
  File "/home/runner/OS-AI/main.py", line 1, in <module>
    from util.ai.azure import init_azure, init_openai_embed, init_openai
  File "/home/runner/OS-AI/util/ai/azure.py", line 2, in <module>
    from llama_index.llms.azure_openai import AzureOpenAI
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/__init__.py", line 17, in <module>
    from llama_index.embeddings.langchain import LangchainEmbedding
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/embeddings/__init__.py", line 11, in <module>
    from llama_index.embeddings.huggingface import HuggingFaceEmbedding
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/embeddings/huggingface/__init__.py", line 1, in <module>
    from llama_index.embeddings.huggingface.base import (
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/embeddings/huggingface/base.py", line 11, in <module>
    from llama_index.core.base.embeddings.base import (
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/__init__.py", line 19, in <module>
    from llama_index.core.indices import (
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/indices/__init__.py", line 4, in <module>
    from llama_index.core.indices.composability.graph import ComposableGraph
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/indices/composability/__init__.py", line 4, in <module>
    from llama_index.core.indices.composability.graph import ComposableGraph
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/indices/composability/graph.py", line 7, in <module>
    from llama_index.core.indices.base import BaseIndex
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/indices/base.py", line 12, in <module>
    from llama_index.core.ingestion import run_transformations
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/ingestion/__init__.py", line 2, in <module>
    from llama_index.core.ingestion.pipeline import (
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/ingestion/pipeline.py", line 31, in <module>
    from llama_index.core.ingestion.api_utils import get_client
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/ingestion/api_utils.py", line 20, in <module>
    from llama_index.core.ingestion.data_sources import (
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/ingestion/data_sources.py", line 340, in <module>
    ConfigurableDataSources = build_conifurable_data_source_enum()
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/llama_index/core/ingestion/data_sources.py", line 117, in build_conifurable_data_source_enum
    DataSource(
  File "/home/runner/OS-AI/.pythonlibs/lib/python3.10/site-packages/pydantic/v1/main.py", line 341, in __init__
    raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for DataSource
component_type
  subclass of BaseComponent expected (type=type_error.subclass; expected_class=BaseComponent)

Do you need langchain? I would just uninstall it if you aren't using it.
Also, the error at the end of all that tells me you need to either install in a fresh venv, or you are mixing legacy imports with non-legacy imports

I am getting the same error but while using llama_index.embeddings.azure_openai. I am using 10.14 version of llama-index. Has there been known issues with azure openai embeddings?

No known issues. Maybe try with a fresh venv?

@jyo64 please start with a fresh venv
In a new terminal
pip uninstall llama-index  # remove any global install
python -m venv venv
source venv/bin/activate
pip install llama-index llama-index-llms-azure-openai llama-index-embeddings-azure-openai

@jyo64 are you sure you followed exactly?
Instead, you could try uninstalling everything then and reinstalling
pip freeze | grep llama | xargs pip uninstall -y
pip install -U llama-index llama-index-llms-azure-openai llama-index-embeddings-azure-openai --force-reinstall --no-cache-dir


dhcpcd-master : no ipv4 addr

Hi,
OS : Slackware
DHCPCD Version : dhcpcd-ce13b79
Kernel : 5.19.6
I recently compiled dhcpcd-master
And with that release, I don't get any ipv4 address
ditto for the route:
blackstar :: ~ » route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
<IP_ADDRESS>       <IP_ADDRESS>         <IP_ADDRESS>       U     0      0        0 lo

Attached file : /var/log/messages after restarting NetworkManger
dhcpcd_after_NM_restart.txt

Note: it works fine when compiled with : -disable-privsep

I also noticed this warning during compilation ( with --enable-privsep --privsep-user=dhcpcd )
cc -O2 -fPIC -std=c99 -DHAVE_CONFIG_H -DNDEBUG -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DINET -DARP -DARPING -DIPV4LL -DINET6 -DDHCP6 -DAUTH -DPRIVSEP -DPLUGIN_DEV -I.. -I../src -I./crypt -c bpf.c -o bpf.o
bpf.c: In function 'bpf_bootp':
bpf.c:708:2: warning: #warning A compromised PF_PACKET socket can be used as a raw socket [-Wcpp]
  708 | #warning A compromised PF_PACKET socket can be used as a raw socket

Linux kernel only supports BPF read filter, not a write filter.
The warning is to prompt someone knowledgable about the linux kernel to do something about that.

So with the commit prior to ce13b79 NM works fine with dhcpcd and privsep?

I tried some commit behind this one with the same result
But
I have a snapshot of my system from 2022-08-26, and if I use /sbin/dhcpcd from that date, it works fine
The things that have changed are mostly kernel update and NetworkManager 1.40

revert to NM 1.38.4 : not better
I also noticed this error :
NetworkManager[921]:   [1662325284.8630] dhcp4 (wlan0): client pid 2276 killed by signal 31

If I kill the dhcpcd process et restart it manually, it works :
# dhcpcd -d -t 30 -L wlan0
dhcpcd-9.99.0 starting
chrooting as dhcpcd to /var/lib/dhcpcd
sandbox: seccomp
spawned manager process on PID 6729
spawned privileged proxy on PID 6730
spawned network proxy on PID 6731
spawned controller proxy on PID 6732
DUID 00:01:00:01:2a:8e:4e:23:20:1e:88:51:f7:11
wlan0: spawned DHCP6 proxy 2a01:e0a:5b:dae0:4918:6473:bf6d:d976 on PID 6733
wlan0: spawned DHCP6 proxy fe80::c01f:2a9c:3dbd:7c4c on PID 6734
wlan0: executing: /lib/dhcpcd/dhcpcd-run-hooks PREINIT
wlan0: connected to Access Point: 01_marav_05
wlan0: executing: /lib/dhcpcd/dhcpcd-run-hooks CARRIER
wlan0: IAID 88:51:f7:11
wlan0: delaying IPv6 router solicitation for 0.2 seconds
wlan0: delaying IPv4 for 0.1 seconds
wlan0: reading lease: /var/lib/dhcpcd/wlan0-01_marav_05.lease
wlan0: rebinding lease of <IP_ADDRESS>
wlan0: spawned BPF ARP <IP_ADDRESS> on PID 6737
wlan0: sending REQUEST (xid 0xa5afd0f6), next in 3.8 seconds
wlan0: spawned BPF BOOTP on PID 6738
wlan0: acknowledged <IP_ADDRESS> from <IP_ADDRESS>
wlan0: probing address <IP_ADDRESS>/24
wlan0: probing for <IP_ADDRESS>
wlan0: ARP probing <IP_ADDRESS> (1 of 3), next in 2.0 seconds
wlan0: soliciting an IPv6 router
wlan0: sending Router Solicitation
wlan0: Router Advertisement from fe80::e69e:12ff:fe1e:cdcd
wlan0: adding address 2a01:e0a:5b:dae0:cd6:dba2:b413:9ddd/64
wlan0: pltime 86400 seconds, vltime 86400 seconds
wlan0: adding route to 2a01:e0a:5b:dae0::/64
wlan0: adding default route via fe80::e69e:12ff:fe1e:cdcd
wlan0: waiting for Router Advertisement DAD to complete
wlan0: No DHCPv6 instruction in RA
wlan0: process DHCP6 proxy 2a01:e0a:5b:dae0:4918:6473:bf6d:d976 already started on pid 6733
wlan0: Router Advertisement DAD completed
wlan0: executing: /lib/dhcpcd/dhcpcd-run-hooks ROUTERADVERT
forked to background, child pid 6729

root      8241  0.6  0.1<PHONE_NUMBER>2 ?        Ssl  23:35   0:00 /usr/sbin/NetworkManager
dhcpcd    8267  0.0  0.0   5024  3492 ?        S    23:35   0:00  \_ dhcpcd: wlan0 [ip4]
root      8268  0.0  0.0   5028  2168 ?        S    23:35   0:00      \_ dhcpcd: [privileged proxy] wlan0 [ip4]
dhcpcd    8270  0.0  0.0   5028   472 ?        S    23:35   0:00      |   \_ dhcpcd: [BPF ARP] wlan0 <IP_ADDRESS>
dhcpcd    8271  0.0  0.0   5028   472 ?        S    23:35   0:00      |   \_ dhcpcd: [BPF BOOTP] wlan0
dhcpcd    8269  0.0  0.0   5020   460 ?        S    23:35   0:00      \_ dhcpcd: [control proxy] wlan0 [ip4]

# ifconfig wlan0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 2a01:e0a:5b:dae0:4918:6473:bf6d:d976  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::c01f:2a9c:3dbd:7c4c  prefixlen 64  scopeid 0x20<link>
        ether 20:1e:88:51:f7:11  txqueuelen 1000  (Ethernet)
        RX packets 7168  bytes 8696070 (8.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2256  bytes 374876 (366.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

I noticed this in /var/log/syslog :
NetworkManager[8241]:  [1662327346.3464] keyfile: ipv6.addr-gen-mode: invalid option "default"; use one of [eui64,stable-privacy]

ok
So, it works fine now if I disable "privacy" in the settings for ipv6
If it sets to "default", dhcpcd won't get ipv4 addr.

SIGSYS is what intrests me. It's likely another SECCOMP issue.
Can you compile dhcpcd with -DSECCOMP_FILTER_DEBUG in your CPPFLAGS please?

Done
Same in /var/log/messages
In /var/log/syslog,  I noticed this on NM stop:

Sep  5 12:19:11 blackstar dhcpcd[6712]: ps_seccomp_violation: unexpected syscall 230 (arch=0xc000003e)
Sep  5 12:19:11 blackstar dhcpcd[6712]: ps_root_recvmsg: Connection reset by peer

Closed by mistake - wups. But can you test the above patch please? I'm hopeful that it might fix it, or at least the SIGSYS error.

With the patch, it is much better
no more issue with ipv4
only this in the syslog:
Sep  5 19:54:47 blackstar dhcpcd[2834]: ps_bpf_recvbpf: unexpected event 0x0100

No more SIGSYS error with your latest commit 8c54cd6, but I still have the ipv4 issue

I've pushed another patch, but mainly for process management.
I don't think it will fix anything but it's worth a shout.
I think I'll have to try and get a NM development environment working which means a new VM to spin up. Maybe I'll look into Slackware for the first time.

Indeed, still have the issue with commit 4627c5d

FYI
I'm able to reproduce the same issue with Slackware 15.0 with:
glibc 2.33
NetworkManager 1.32.12
and your latest commit of dhcpcd
However, if you want to test with glibc 2.36, you can grab the latest iso of the dev branch (-current) here:
https://slackware.nl/slackware/slackware64-current-iso/slackware64-current-install-dvd.iso

Hi Roy,
Any news on that one ?
Cheers

Some updates here, hope this help
I put the log in /var/log/dhcpcd.log
And here is the output of 9.4.1 and your master branch
9.4.1
Nov 28 00:49:28 [19371]: dhcpcd-9.4.1 starting
Nov 28 00:49:28 [19371]: spawned privileged proxy on PID 19372
Nov 28 00:49:28 [19371]: spawned controller proxy on PID 19373
Nov 28 00:49:28 [19371]: DUID 00:01:00:01:2a:8e:4e:23:20:1e:88:51:f7:11
Nov 28 00:49:28 [19371]: wlan0: executing: /usr/libexec/nm-dhcp-helper PREINIT
Nov 28 00:49:28 [19371]: wlan0: connected to Access Point: 01_marav_05
Nov 28 00:49:28 [19371]: wlan0: IAID 88:51:f7:11
Nov 28 00:49:28 [19371]: wlan0: delaying IPv4 for 0.1 seconds
Nov 28 00:49:28 [19371]: wlan0: reading lease: /var/lib/dhcpcd/wlan0-01_marav_05.lease
Nov 28 00:49:28 [19371]: wlan0: rebinding lease of <IP_ADDRESS>
Nov 28 00:49:28 [19372]: wlan0: spawned BPF ARP on PID 19381
Nov 28 00:49:28 [19371]: wlan0: sending REQUEST (xid 0x78a6c742), next in 3.6 seconds
Nov 28 00:49:28 [19372]: wlan0: spawned BPF BOOTP on PID 19382
Nov 28 00:49:28 [19371]: wlan0: acknowledged <IP_ADDRESS> from <IP_ADDRESS>
Nov 28 00:49:28 [19371]: wlan0: leased <IP_ADDRESS> for 43200 seconds
Nov 28 00:49:28 [19371]: wlan0: renew in 21600 seconds, rebind in 37800 seconds
Nov 28 00:49:28 [19371]: wlan0: writing lease: /var/lib/dhcpcd/wlan0-01_marav_05.lease
Nov 28 00:49:28 [19371]: wlan0: executing: /usr/libexec/nm-dhcp-helper REBOOT
Nov 28 00:49:28 [19392]: spawned listener <IP_ADDRESS> on PID 19392
Nov 28 00:50:10 [19371]: received SIGTERM, stopping
Nov 28 00:50:10 [19371]: wlan0: removing interface
Nov 28 00:50:10 [19371]: wlan0: executing: /usr/libexec/nm-dhcp-helper STOP
Nov 28 00:50:10 [19372]: ps_root_recvmsg: Connection refused
Nov 28 00:50:10 [19373]: ps_ctl_listen: read: Success
Nov 28 00:50:10 [19373]: ps_ctl_recv: read: Success

Master:
Nov 28 00:50:20 [22208]: dhcpcd-9.99.0 starting
Nov 28 00:50:20 [22208]: spawned privileged proxy on PID 22209
Nov 28 00:50:20 [22208]: spawned controller proxy on PID 22210
Nov 28 00:50:20 [22208]: DUID 00:01:00:01:2a:8e:4e:23:20:1e:88:51:f7:11
Nov 28 00:50:20 [22208]: wlan0: connected to Access Point: 01_marav_05
Nov 28 00:50:20 [22208]: wlan0: IAID 88:51:f7:11
Nov 28 00:50:20 [22208]: wlan0: delaying IPv4 for 1.6 seconds
Nov 28 00:50:22 [22208]: wlan0: reading lease: /var/lib/dhcpcd/wlan0-01_marav_05.lease
Nov 28 00:50:22 [22208]: wlan0: rebinding lease of <IP_ADDRESS>
Nov 28 00:50:22 [22209]: wlan0: spawned BPF ARP <IP_ADDRESS> on PID 22241
Nov 28 00:50:22 [22208]: wlan0: sending REQUEST (xid 0x4dd77d5), next in 5.0 seconds
Nov 28 00:50:22 [22209]: wlan0: spawned BPF BOOTP on PID 22242
Nov 28 00:50:22 [22208]: wlan0: acknowledged <IP_ADDRESS> from <IP_ADDRESS>
Nov 28 00:50:22 [22208]: wlan0: leased <IP_ADDRESS> for 43200 seconds
Nov 28 00:50:22 [22208]: wlan0: renew in 21600 seconds, rebind in 37800 seconds
Nov 28 00:50:22 [22208]: wlan0: writing lease: /var/lib/dhcpcd/wlan0-01_marav_05.lease

... and it stay like that

Hi Roy,
Good news
The problem seems to be solved with dhcpcd from commit 6797c08


Use FF_FS_TINY in FatFS

Each file object (FFOBJID, FIL, DIR) contains a 512 byte buffer cache for file operations. By setting FF_FS_TINY to 1 in ffconf.h this buffer is removed and a global buffer is used. This will make the FatFS file IO a bit easier on memory for user apps.
Acceptance Criteria:

The code is not significantly slower after the change
No other issues are reported

Benchmarking:
The BASIC file benchm9,bas will run a read/write operation. Base timings before the mod are:

Write: 29.85s
Read: 14.2s

Time after applying FF_FS_TINY = 1

Write: 31.13s (1.28s difference)
Read: 15.5s (1.3s difference)

This is over 5000 iterations, so IMHO is an acceptable performance hit.


commercial controller fails Device Info mesage with Bad Request: ntp sources info is nil for dev

Please provide information requested in the template below as much as possible.
Describe the bug
Device running today's master not successfully send a DeviceInfo message to the commercial controller. It appears to rejected due to Bad Request: ntp sources info is nil for dev
This prevents the device state to be updated etc.
{"file":"/pillar/zedcloud/send.go:1122","func":"github.com/lf-edge/eve/pkg/pillar/zedcloud.SendOnIntf","level":"error","msg":"SendOnIntf to https://zedcloud.alpha.zededa.net/api/v2/edgedevice/id/0ba325bd-e0f8-4d90-9125-62386982a6cc/info reqlen 163 statuscode 400 Bad Request body:\n00000000  6e 74 70 20 73 6f 75 72  63 65 73 20 69 6e 66 6f  |ntp sources info|\n00000010  20 69 73 20 6e 69 6c 20  66 6f 72 20 64 65 76 20  | is nil for dev |\n00000020  30 62 61 33 32 35 62 64  2d 65 30 66 38 2d 34 64  |0ba325bd-e0f8-4d|\n00000030  39 30 2d 39 31 32 35 2d  36 32 33 38 36 39 38 32  |90-9125-62386982|\n00000040  61 36 63 63                                       |a6cc|","pid":1586,"source":"zedagent","time":"2024-06-25T22:16:33.965855682Z"}
{"file":"/pillar/zedcloud/send.go:1123","func":"github.com/lf-edge/eve/pkg/pillar/zedcloud.SendOnIntf","level":"error","msg":"Got payload for status Bad Request: ntp sources info is nil for dev 0ba325bd-e0f8-4d90-9125-62386982a6cc\n","pid":1586,"source":"zedagent","time":"2024-06-25T22:16:33.966024035Z"}
{"file":"/pillar/zedcloud/send.go:266","func":"github.com/lf-edge/eve/pkg/pillar/zedcloud.SendOnAllIntf","level":"error","msg":"All attempts to connect to zedcloud.alpha.zededa.net/api/v2/edgedevice/id/0ba325bd-e0f8-4d90-9125-62386982a6cc/info failed: send via eth0: SendOnIntf to https://zedcloud.alpha.zededa.net/api/v2/edgedevice/id/0ba325bd-e0f8-4d90-9125-62386982a6cc/info reqlen 163 statuscode 400 Bad Request body:\n00000000  6e 74 70 20 73 6f 75 72  63 65 73 20 69 6e 66 6f  |ntp sources info|\n00000010  20 69 73 20 6e 69 6c 20  66 6f 72 20 64 65 76 20  | is nil for dev |\n00000020  30 62 61 33 32 35 62 64  2d 65 30 66 38 2d 34 64  |0ba325bd-e0f8-4d|\n00000030  39 30 2d 39 31 32 35 2d  36 32 33 38 36 39 38 32  |90-9125-62386982|\n00000040  61 36 63 63                                       |a6cc|","pid":1586,"source":"zedagent","time":"2024-06-25T22:16:33.966127362Z"}
Recent release
Is it reproducible on a recent release? (See the list of releases)
Duplicate
If you are reporting a new issue, make sure that we do not have any duplicates
already open. You can ensure this by searching the issue list for this
repository. If there is a duplicate, please close your issue and add a comment
pointing to the existing issue instead.
How to reproduce
Include a list of steps showing how to reproduce the bug. Also include:

EVE-OS version [e.g., 6.6.3]
EVE-OS hardware architecture [e.g., arm64, amd64]

Expected behavior
A clear and concise description of what you expected to happen.
Error message
If applicable, add screenshots to help explain your problem.
Additional context
Add any other information about the problem here.

Not clear to me whether the commercial controller needs to be fixed to accept the empty list.
If not, this makes EVE be able to successfully send Device Info messages to the commercial controller:
diff --git a/pkg/pillar/cmd/zedagent/handlentp.go b/pkg/pillar/cmd/zedagent/handlentp.go
index bef483924..df3b9798b 100644
--- a/pkg/pillar/cmd/zedagent/handlentp.go
+++ b/pkg/pillar/cmd/zedagent/handlentp.go
@@ -130,6 +130,11 @@ func publishNTPSourcesToDest(ctx *zedagentContext,
                // so just return
                return
        }
+       if len(infoNTPSources.Sources) == 0 {
+               log.Noticef("XXX no NTP sources")
+               // XXX controller will reject
+               return
+       }
        infoMsg := &info.ZInfoMsg{
                Ztype: info.ZInfoTypes_ZiNTPSources,
                DevId: devUUID.String(),

Fixed on the controller side.


which id_rsa file to use when ssh to an aks node?

Hi,
I tried to follow the steps but was stuck on the id_rsa ssh key part. If I use the default ~/.ssh/id_rsa, it is my personal ssh key and when running the command ssh -i id_rsa<EMAIL_ADDRESS>I was prompted for passphrase which always gives permission denied if I enter my personal passphrase. I don't have a separate ssh key generated when creating this cluster since it was created by my coworker. How can I locate the ssh key to use either on azure portal or maybe ~/.kube?
Thanks!
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 3b81a147-db1c-b92f-88d1-6dd0991a72fe
Version Independent ID: f5a2c949-498f-5848-d89c-031d1a757120
Content: SSH into Azure Container Service (AKS) cluster nodes
Content Source: articles/aks/aks-ssh.md
Service: container-service
GitHub Login: @neilpeterson
Microsoft Alias: nepeters

@unacao Thanks for the feedback! We are currently investigating and will update you shortly.

@unacao I believe you can go about this two ways. One you can find in this article
https://stackoverflow.com/questions/49577539/az-aks-get-credentials-with-custom-ssh-key
The other is to reset the key via the portal
If you made a mistake while provisioning the cluster or you want to reset the SSH key, you don’t have to delete the cluster and provision it again. It’s possible to reset the SSH key.

In the Azure Portal navigate to the cluster and select the master virtual machine.

In the menu click on Reset password

You have the option here to Reset the SSH public key. You can use one of the public keys; or the pempublickey or the singlelinepublickey

Hi Micah,
I am a little bit confused about the resetting ssh public key method. When copying the ssh key to the aks-ssh pod, we are required to copy the private key id_rsa. How does resetting the ssh public key in the portal associate with that?

@unacao Ah you're right sorry about that. I am taking another look now.

@neilpeterson do you have any input on this?

I've just tested this out, and it works. I am not positive on the mechanics (like is a new private key being generated on the VM), but will track these down and update this issue.

regenerate SSH keys
In the portal, select an AKS node VM and reset password
Select Reset SSH public key, enter the username azureuser by default, and paste in the new public key id_rsa.pub
Create SSH connection as described in the doc

@MicahMcKittrick-MSFT - if you want to assign this to me, I will take over.
Thanks

Thanks for the update @neilpeterson !
Two questions to clarify:

do I need to reset the ssh public key for every VM in the AKS cluster?
shall I wait for more updates or just follow the solution you provided above?

@unacao - for #1, if you need to SS?H into each node, then yes. Feel free to proceed, I just want to make sure we provided the proper under the cover technical details.
Also, if you do not mind me asking, what do you need SSH access for?
Thanks

@neilpeterson Recently we encountered a few cases where AKS pods are evicted due to disk pressure. We would like to investigate the disk usage of our VM to get a better understanding of the cause.

@unacao - wrapping this up. When resetting the public key on the VM, you will need to:

Create a key pair on your dev system / management system / where ever.
When running the portal reset, you are basically copying the public key to the VM.
At that point, you've got the corresponding private key and are able to make the connection.

I will add a bit of clarification to the doc.
#please-close


Problem understanding how to submit a task

Once i submit a task, an exception appear.
I noticed you init m_NumPartitions at 0 here.
https://github.com/dougbinks/enkiTS/blob/13aa878813ab3e1254eb9cfacd7af1bdcbcc18eb/src/TaskScheduler.cpp#L522
The problem then is basically here
https://github.com/dougbinks/enkiTS/blob/13aa878813ab3e1254eb9cfacd7af1bdcbcc18eb/src/TaskScheduler.cpp#L407
because there's a division by zero
I'm creating the scheduler just doing
g_TS.Initialize();

And then i submit a task to it doing
g_TS.AddTaskSetToPipe(&task)

So why that value is 0? Do i did something wrong?


Uses HTTP, not HTTPS

Client uses http://bucket.s3.amazonaws.com/ instead of https://s3.amazonaws.com/bucket/ :-(

I am using 0.0.9, which as the port and the vhost hardcoded. Trunk version is much better since it uses the s3.amazon.com host name and "port" can be specified in the options, but Client.request always calls http.request, not https.request when e.g. port 443 is requested.


Create Slides for DCM Presentation

We are presenting a one hour workshop at the Dataverse Community Meeting, providing an overview of the SPA/Dataverse Rearchitecture project, and a guide for developers to use the new library and design system in their own Dataverse application.

Completed


Disable screen dimming when video is paused.

Thanks for the great plugin!
I often take screenshots of an area of the screen using a third-party program.
Most of my pictures are black and white. Thanks to the Minimal theme setting "Blend images in light mode", my images blend into the background and it looks very aesthetically pleasing.
When I watch a video through your plugin and press pause to take a screenshot, the picture is slightly darker.
I didn't notice it at first because it's not a big difference, but eventually all the screenshots I take while paused are darker and don't blend into the background like they would if I took a screenshot while the video was playing.
Now I can see a darker background in the pictures and also on this darkening sometimes you can see some details of the picture worse.
This darkening also generally degrades the image quality.
I attach a picture of how it looks like. I have the same 2 pictures here. The first one was taken after pressing pause and the second one was taken while playing a video.
Could you add an option to disable this effect?

it may be theme issue, could you create a new vault with your theme config to reproduce this issue? (or you can just copy .obsidian folder of your current vault to new vault)

it may be theme issue, could you create a new vault with your theme config to reproduce this issue? (or you can just copy .obsidian folder of your current vault to new vault)

Checked on another storage with my configuration. Also tried to reproduce it in the default theme.
Same effect everywhere.
It doesn't seem to be a problem in the theme.
It's just that when I hit pause or hover over the window where the video is playing, it darkens slightly and a play bar appears at the bottom.
I think this is a standard effect. There is a similar effect in YouTube, when watching a video in the browser, you also point your mouse at the video while it is playing. But in YouTube only the bottom part of the video is darkened at that moment.

Could you test which kind of media is affected? provide a new vault with media file or url that could reproduce the issue could be very helpful.

Could you test which kind of media is affected? For example, only YouTube is affected, or local file/vimeo is affected as well. provide a new vault with media file or url that could reproduce the issue could be very helpful.

Of course!
This problem is visible on both local video files and YouTube. It is especially visible on videos with white backgrounds.
For example, this video from the 8th minute has a white background and you can see this darkening better on it.
Maybe even on some monitors it is less noticeable. But anyway the difference in the screenshots is obvious.
I attach one more frame, where the screenshot that was made during playback is on top and the one that was made during pause is on the bottom.

You can see even on this video what part of the screen I captured.


forupstream

I'm sorry for the delay.
You have panic when calling "Finish" twice.
I think it's not good... maybe giving error, but not a panic.

I can submit another pull request with just the Units commit if you dont like the others

Was merged two commits. Thankyou!

Oops i missed your fixes)
Merged!


New version: zeankundev.suside version <IP_ADDRESS>

Pull request has been created with WinGet Automation :rocket:
Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-pkgs/pull/116869&drop=dogfoodAlpha

Reset PR


Add logic to renew sdk client instance

Problem
The relay utilizes the js SDK client in a  long lived manner submitting multiple queries and transactions over time.
This has performance consideration over time
Solution
Add logic to renew the instance of the client every so often to ensure freshness.
Consider both timed options e.g. every 2hrs or a counter of transactions e.g. every 100k.
Both if considered separately or combined should be dynamic configurations that can be set
Notably this may require some coordination between relay.ts (where it's created), eth.ts (where it's used) and sdkClient.ts (where it's exposed)
Alternatives
No response

Or it could just be done brute-force by rolling over relay instances behind a load balancer ...

This sounds like functionality that should be made available directly by the js SDK for all dApps to configure and take advantage of.
Btw how does not renewing the client adversely affect performance?


optimize/concurrency: pubsub concurrency map writes in runtime unit test.

LGTM

/ok-to-test

/ok-to-test

/ok-to-test

/ok-to-test


test: fix rest and bot e2e test

Codecov Report

Merging #2762 (4c95888) into node-migration-clean (4d0b7b2) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 4c95888 differs from pull request most recent head 2b39848. Consider uploading reports for the commit 2b39848 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@                  Coverage Diff                  @@
##           node-migration-clean    #2762   +/-   ##
=====================================================
  Coverage                 25.42%   25.42%
=====================================================
  Files                        74       74
  Lines                     23845    23845
  Branches                    187      187
=====================================================
  Hits                       6063     6063
  Misses                    17777    17777
  Partials                      5        5

Flag
Coverage Δ

*Carryforward flag

bot-unit
0.00% <ø> (ø)

client-unit
0.00% <ø> (ø)

discordeno-unit
0.00% <ø> (ø)

gateway-unit
0.00% <ø> (ø)

rest-e2e
84.68% <ø> (ø)

Carriedforward from 4d0b7b2

rest-unit
78.41% <ø> (ø)

utils-unit
29.12% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


No module named 'fcntl'

When trying to import earth-engine into Python (jupyter notebook), I'm getting several errors. Firstly I get error: 'No module named curses'. I can tackle this one by installing windows-curses.
The one I'm stuck on is 'No module named 'fcntl''. I can't see anybody else with this issue in the ee community. It happens every time I create a new environment and install earth engine.
I have somehow managed to bypass this in the past but through sheer luck.
If you can help me I'd really appreciate it as I feel like I'm going insane.
import sys print(sys.executable)

Python version: 3.11.10 | packaged by conda-forge | (main, Sep 10 2024, 10:53:25) [MSC v.1940 64 bit (AMD64)]

!conda info

active environment : gee_sat
active env location : [C:\Users\bd167.conda\envs\gee_sat](file:///C:/Users/bd167/.conda/envs/gee_sat)
shell level : 1
user config file : [C:\Users\bd167.condarc](file:///C:/Users/bd167/.condarc)
populated config files : [C:\Users\bd167.condarc](file:///C:/Users/bd167/.condarc)
conda version : 24.5.0
conda-build version : not installed
python version : 3.12.4.final.0
solver : libmamba (default)
virtual packages : __archspec=1=icelake
__conda=24.5.0=0
__cuda=12.5=0
__win=0=0
base environment : [C:\Miniconda3](file:///C:/Miniconda3)  (read only)
conda av data dir : [C:\Miniconda3\etc\conda](file:///C:/Miniconda3/etc/conda)
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : [C:\Miniconda3\pkgs](file:///C:/Miniconda3/pkgs)
[C:\Users\bd167.conda\pkgs](file:///C:/Users/bd167/.conda/pkgs)
...
netrc file : None
offline mode : False

Created new environment and installed ee before any other package. Solved.


Add Sparse24Compressor

Adds a new Sparse24 compression format for 2:4 sparsity with unquantized weights i.e. float32/float16/bfloat16

Noting changes have been added to #167

Given changes have been added in @rahul-tuli 's #167, I'm closing this out to keep he PR list clean


DLS-9855: [SDIL] Ensure adequate test coverage exists for SDIL Variations Repos - Non Controller

Currently up to 91.61%

Up to 91.78%

Need to add/improve tests for all Site summary files (as mentioned in TODOs)

Also move summary test (+ app?) files to consistent folder structure

Up to 92.60%

TODO:

Rebase,
Add final case for NavigatiorForCorrectReturn,
Add tests for UKSitesSummary (Correct Return)

Up to 93.05%

Up to 93.67%


Refresh the view

How can I enforce the refresh of the view ?
api.rows.refresh() does not work.

try with api.columns.refresh(), or even harder api.columns.generate().


pull request for e2e test at 11/14/2016 07:45:06

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

optest/docs/updated_at.md
:white_check_mark:Succeeded

Details

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Android Release Build NoSuchMethodError

Occurs only on release build, right at the app's startup time

Flutter Doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel dev, v0.9.2, on Microsoft Windows [Version 10.0.17134.285], locale en-US)
[!] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    X Android license status unknown.
[√] Android Studio (version 3.1)
[√] VS Code, 64-bit edition (version 1.24.0)
[√] Connected devices (1 available)

! Doctor found issues in 1 category.

adb logcat
09-22 10:05:59.249 12713 12713 I zygote  : android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
09-22 10:05:59.371 12713 12748 I flutter : ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
09-22 10:05:59.372 12713 12748 I flutter : The following NoSuchMethodError was thrown building Application(dirty):
09-22 10:05:59.372 12713 12748 I flutter : The method '&' was called on null.
09-22 10:05:59.372 12713 12748 I flutter : Receiver: null
09-22 10:05:59.372 12713 12748 I flutter : Tried calling: &()
09-22 10:05:59.373 12713 12748 I flutter :
09-22 10:05:59.373 12713 12748 I flutter : When the exception was thrown, this was the stack:
09-22 10:05:59.374 12713 12748 I flutter : #0      _HashBase._hashPattern (dart:collection/runtime/libcompact_hash.dart:98)
09-22 10:05:59.374 12713 12748 I flutter : #1      __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin._getValueOrData (dart:collection/runtime/libcompact_hash.dart:329)
09-22 10:05:59.374 12713 12748 I flutter : #2      __InternalLinkedHashMap&_HashVMBase&MapMixin&_LinkedHashMapMixin.[] (dart:collection/runtime/libcompact_hash.dart:351)
09-22 10:05:59.374 12713 12748 I flutter : #3      ColorSwatch.[] (package:flutter/src/painting/colors.dart:550)
09-22 10:05:59.374 12713 12748 I flutter : #4      new ThemeData. (package:flutter/src/material/theme_data.dart:160)
09-22 10:05:59.374 12713 12748 I flutter : #5      Application.build (package:shenanny/main.dart:33)
09-22 10:05:59.374 12713 12748 I flutter : #6      StatelessElement.build (package:flutter/src/widgets/framework.dart:3731)
09-22 10:05:59.374 12713 12748 I flutter : #7      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3678)
09-22 10:05:59.374 12713 12748 I flutter : #8      Element.rebuild (package:flutter/src/widgets/framework.dart:3531)
09-22 10:05:59.375 12713 12748 I flutter : #9      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3658)
09-22 10:05:59.375 12713 12748 I flutter : #10     ComponentElement.mount (package:flutter/src/widgets/framework.dart:3653)
09-22 10:05:59.375 12713 12748 I flutter : #11     Element.inflateWidget (package:flutter/src/widgets/framework.dart:2937)
09-22 10:05:59.375 12713 12748 I flutter : #12     Element.updateChild (package:flutter/src/widgets/framework.dart:2740)
09-22 10:05:59.375 12713 12748 I flutter : #13     RenderObjectToWidgetElement._rebuild (package:flutter/src/widgets/binding.dart:881)
09-22 10:05:59.375 12713 12748 I flutter : #14     RenderObjectToWidgetElement.mount (package:flutter/src/widgets/binding.dart:852)
09-22 10:05:59.375 12713 12748 I flutter : #15     RenderObjectToWidgetAdapter.attachToRenderTree.<anonymous closure> (package:flutter/src/widgets/binding.dart:798)
09-22 10:05:59.375 12713 12748 I flutter : #16     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2253)
09-22 10:05:59.375 12713 12748 I flutter : #17     RenderObjectToWidgetAdapter.attachToRenderTree (package:flutter/src/widgets/binding.dart:797)
09-22 10:05:59.375 12713 12748 I flutter : #18     _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding.attachRootWidget (package:flutter/src/widgets/binding.dart:689)
09-22 10:05:59.375 12713 12748 I flutter : #19     runApp (package:flutter/src/widgets/binding.dart:728)
09-22 10:05:59.375 12713 12748 I flutter : #20     main (package:shenanny/main.dart:13)
09-22 10:05:59.375 12713 12748 I flutter : #21     _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:289)
09-22 10:05:59.375 12713 12748 I flutter : #22     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171)
09-22 10:05:59.375 12713 12748 I flutter : ════════════════════════════════════════════════════════════════════════════════════════════════════
09-22 10:05:59.447 12713 12730 I FA      : Tag Manager is not found and thus will not be used
09-22 10:05:59.465 12713 12756 D OpenGLRenderer: HWUI GL Pipeline
09-22 10:05:59.524 12713 12756 I OpenGLRenderer: Initialized EGL, version 1.4
09-22 10:05:59.524 12713 12756 D OpenGLRenderer: Swap behavior 2
09-22 10:05:59.591   367   367 W /system/bin/hwservicemanager: getTransport: Cannot find entry android.hardware.graphics.mapper@2.0::IMapper/default in either framework or device manifest.

P.S. Works fine on v0.9.1

Do you have any detailed stack trace (e.g. try looking into adb logcat)?

@mraleph Added

After adding const in the declaration it started working just fine. Strange that it occurred only on release builds.

Whatever we are seeing this is totally not an expected effect from omitting the const keyword - the null pointer exception occurs in the location where it should be impossible.
Thanks to your pointer I was able to reproduce this error now and I am looking into this.

Reduction:
class X {
  final Map<int, String> data;
  const X(this.data);
}

const f = X({ 1: "ok-f" });
final g = X({ 2: "ok-g" });

void main() {
  print(f.data[1]);
  print(g.data[1]);
}

The bug is in the interaction between TFA and backend field type inference, that does not take constants into account. TFA provides inferred type for data parameter of the constructor X which says that data is always an normal map. Backend field type inference then infers from that that X.data is always a normal map - which is incorrect because there is a constant in the heap that has an immutable map as a field.
assigning to @alexmarkov

Constant objects are evaluated and boiled down to a list of field-value pairs, so there are no more constructor invocations involved. For the remaining constructor invocations TFA yields correct results here. So the problem is in the incorrect type inference of final field types in backend, which doesn't account for already evaluated constant objects.
Maybe instead of fixing that limited type inference in the backend we should replace it with results from TFA.

The fix landed in Dart SDK (https://github.com/dart-lang/sdk/commit/f81709c3e34438201682237e4faf6cb886094129). Incorrect analysis is removed and replaced with results of TFA. Keeping the issue open until the fix is rolled into Flutter.

The fix was rolled to Flutter in https://github.com/flutter/flutter/commit/aef9804784ee5d6ea3e9b6fd9af2d363083dfdca.


NPM task 'build' is passed a non-Buffer / String variable.

The method 'glslToJavaScript' is sometimes passed a Boolean.
Type conversions are not forced in Node 14.x and an exception is thrown.  Recommend testing for Boolean and handling accordingly.

@TJKoury do you reproduce this just by running npm run build with Node 14.x ?

Tried it in Node 12.16.3, works (type coerced), behavior changed sometime between then and latest.

Can confirm this bug, running npm run build on v14.2.0 gives the error:
[14:42:18] TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type boolean (false)
    at Object.writeFileSync (fs.js:1380:5)
    at glslToJavaScript (D:\Projects\Cesium\cesium\gulpfile.cjs:1331:6)
    at D:\Projects\Cesium\cesium\gulpfile.cjs:186:3
    at build (D:\Projects\Cesium\cesium\node_modules\undertaker\lib\set-task.js:13:15)
    at bound (domain.js:429:14)
    at runBound (domain.js:442:12)
    at asyncRunner (D:\Projects\Cesium\cesium\node_modules\async-done\index.js:55:18)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)

seems like the only thing requiring minify to be anything other than a boolean type is the fs.writeFileSync here
it's a simple fix to change this to fs.writeFileSync(minifyStateFilePath, minify.toString());

I'd recommend changing it to if(typeof minify !=="boolean")

We're happy to look at a PR if someone wants to open one. It doesn't really matter that much what gets written out, as long as functionality remains unchanged and it fixes the Node 14 issue.


does helm handle RBAC objects by kubectl auth reconcile?

This is just a question regarding Helm's handling of RBAC object manifests.
As pointed out by kubernetes RBAC doc and kubectl auth reconcile -h, kubectl auth reconcile -f is a better way to create RBAC objects such as Role, RoleBinding, etc.
So I'd like to know how helm handles RBAC objects? Does it use something equivalent to kubectl apply -f or better kubectl auth reconcile -f?
Output of helm version:
version.BuildInfo{Version:"v3.0.0", GitCommit:"e29ce2a54e96cd02ccfce88bee4f58bb6e2a28b6", GitTreeState:"clean", GoVersion:"go1.13.4"}

Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:13:49Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): bare metal

Per the source it appears to do creation with the equivalent of kubectl create, and updates with the equivalent of kubectl patch unless specifically told to kubectl replace.

@TBBle's assumption is correct. We handle all objects the same.
Is there a difference in the way kubectl auth reconcile works compared to kubectl patch? Let us know what you find out @Naitreey. Thanks.

@bacongobbler according to the official documentation the reconcile has a couple of flags that make handling changes to the RBAC easier

Reconciles rules for RBAC Role, RoleBinding, ClusterRole, and ClusterRole binding objects.
Missing objects are created, and the containing namespace is created for namespaced objects, if required.
Existing roles are updated to include the permissions in the input objects, and remove extra permissions if --remove-extra-permissions is specified.
Existing bindings are updated to include the subjects in the input objects, and remove extra subjects if --remove-extra-subjects is specified.
This is preferred to 'apply' for RBAC resources so that semantically-aware merging of rules and subjects is done.


Add list like validation to Imaging Object Class

Will fix HMS issue where multiple masks are provided

See discussion on slack here: https://sagebionetworks.slack.com/archives/C01ANC02U59/p1689080166109589


Overwriting existing save file removes items and spawns the player underneath terrain

Wanted to add a prayerbook that I forgot to collect before starting NG+.
Added the prayerbook using the editor, then saved as ER0000.sl2, using Windows Explorer to directly overwrite the existing save file.
Upon the next load, I was spawned underneath terrain before falling to my death. Many items were missing from inventory, but I could not discern a pattern to it.
Luckily had a backup of the original save.
Thought it might have been an issue with adding the prayerbook, but further testing reveals that it works fine as long as the modified save is saved under a new filename, then deleting the old save and renaming the newly generated modified save to ER0000.sl2

I have the same issue. It seems to appear when i add items using the bulk function.

Upon the next load, I was spawned underneath terrain before falling to my death. Many items were missing from inventory, but I could not discern a pattern to it.

This always happens to me, replacing the file or not doesn't matter, though I've not noticed any missing items.


Tensorflow Lite GPU Delegate - Argmax Op Request

Tensorflow Lite GPU Delegate - Argmax Op Request
System information

TensorFlow version (you are using): Tensorflow 1.13
Tensorflow Lite GPU Delegate 0.0.0-nightly
Are you willing to contribute it (Yes/No): Yes

Describe the feature and the current behavior/state.
The current GPU delegate does not support Argmax op to run on the mobile GPU. It is one of the major stuff needed to be done for effective deeplab processing on the GPU, which could also be helpful in running the entire model on the GPU in the later stage. So, it would be useful if you could provide support for Argmax functionality on TFLite-GPU Delegate. In the current context, deeplab execution falls back from GPU to CPU on introduction of Argmax op. If that could not be done, can there be any other alternative to Argmax that can be used to effect a 2 class segmentation, or can a combination of ops can be added unto the base Model to effect a complete TFLite GPU Delegate model. If so, what has to be done?
Will this change the current api? How?
No. It is one more tflite op request. So, it must not affect other ops and functionality
Who will benefit with this feature?
Edge learning and Deeplab developers

Are there any chances that Argmax GPU Delegate op will be introduced in the near future??

@SanthoshRajendiran
Given how resource constraint we are, we probably can't accommodate these individual requests =/
We have max pooling with indices.  Could you use that, or customize with that as a basis?  After all, we opensourced the GPU backend so you can customize it for your needs ;)

@impjdi  Thank you.. Will look into customizing the GPU Backend code.


Always allow option to create "X" when "X" already exists.

I would like to allow users to create a new option even if an option with the exact same label already exists.
Right now, when the user input matches exactly one of the options, the 'Create X' option does not appear.
My abridged code looks like this:
       $("#select-session").select2({
            tags: true,
            data: sessionList,
            insertTag: function(data, tag){
                tag.isNew = true;
                data.push(tag);
            },
            escapeMarkup: function (markup) { return markup; },
            templateResult: (session)=> {

                if (session.loading) return "Loading...";

                return session.isNew
                    ? `<i class="fa fa-plus mx-2"></i> Create ${session.text}`
                    : `

${session.text}

${session.start ? moment(new Date(session.start)).format('MM/DD/YY h:mm a') : ''}

`;

            },
            templateSelection: (session) => {
                if (!session.id) {
                    return session.text;
                }
                return `${session.text || ''}`;
            },
        })

Any help would be greatly appreciated. Thanks in advance.

This can be accomplished by overriding createTag and returning a unique id for it, since that is how we de-duplicate.

This appears to be more of a usage question than a bug report or common feature request.  As we continue to keep the Select2 issue tracker geared towards these two areas, bug reports and common feature requests, we are redirecting usage questions to other communities such as the mailing list, IRC, or Stack Overflow.

This can be accomplished by overriding createTag and returning a unique id for it, since that is how we de-duplicate.

This appears to be more of a usage question than a bug report or common feature request.  As we continue to keep the Select2 issue tracker geared towards these two areas, bug reports and common feature requests, we are redirecting usage questions to other communities such as the mailing list, IRC, or Stack Overflow.

I had the same problem, if someone else needs, this solution works as @kevin-brown explained with "createTag":
select2({
  selectionCssClass: 'test',
  tags: true,
  tokenSeparators: [','],
  createTag: function(params){
      var term = $.trim(params.term);

      if (term === '') {
          return null;
      }

      return {
        id: Date.now(), // <<-- HERE
        text: term,
        newTag: true // add additional parameters
      }
  },
})

I am not sure if "Date.now()" is a good idea for a unique ID, but it works.
More information: https://select2.org/tagging#tag-properties


Remove unnecessary DisplayVersion from CrystalDewWorld.CrystalDiskMark version 8.0.5

Issue https://www.github.com/microsoft/winget-pkgs/issues/138520 describes scenarios where DisplayVersion should not be used. This PR removes unnecessary DisplayVersion from the manifest file.
Microsoft Reviewers: Open in CodeFlow

URL:
Invalid URI: The hostname could not be parsed.
(Automated message - build 897)


[BEIT3] How to export GradCam image of the beit3 models?

I am using the beit3 model. I want to know what the model is focusing on, it's called gradcam. Is there any way to export the gradcam image of beit3 model. Thanks.

@TheNha Could you provide the specific command to run GradCam?

I don't have a command how to run it, so i am asking. But i have a link about run gradcam for another models. https://medium.com/mlearning-ai/introduce-model-explainability-to-computer-vision-models-with-grad-cam-cf33b405d45b

I don't have a command how to run it, so i am asking. But i have a link about run gradcam for another models. https://medium.com/mlearning-ai/introduce-model-explainability-to-computer-vision-models-with-grad-cam-cf33b405d45b

The GradCam code was taken from https://keras.io/examples/vision/grad_cam/ . You could adapt the code to BEiT-3 by replacing the architecture code and reloading the B-3 weights.

Yepp. I see the input of gradcam is conv layer, But I show all layer of B-3 models. I only see the first conv layer, then the whole fullyconnected neural network layer.


fd_posix.c:219 assertion failed: !fd->closed

Using release-0_11.
The assertion occurs when running some of our own go tests with a sufficiently large go test -count number.  I can't provide any code to reproduce it unfortunately, but be aware that this assertion can fail.

No repro: closing.


Simplify NoteRequest and NoteRequestWithRetry.

These functions are nearly identical to NoteRequestResponse and NoteRequestResponseWithRetry, respectively. The only difference is that they delete the Notecard's response and return a bool. This commit modifies NoteRequest to use NoteRequestResponse internally. Same thing for the retry version.

Looks good.  Hope you don't screw it up :-)
btw Zak, did you ever get arduino Uno working well? Challenging.


Rename all references of "update" to "edit" regarding emails

All instances of "update" have been renamed to "edit" with regards to emails across files and their contents:

EmailUpdateGuard -> EmailEditGuard
email-update-* signature prefix for updating emails -> email-edit-*
updateEmail in EmailController -> editEmail
UpdateEmailDto -> EditEmailDto
updateEmail in EmailRepository and relevant interface-> editEmail
EmailUpdateMatchesError -> EmailEditMatchesError
EmailUpdateMatchesExceptionFilter -> EmailEditMatchesExceptionFilter

Note: the data source was not changed as it fits the database changes.

I would also update the controller function:
https://github.com/safe-global/safe-client-gateway/blob/21ee629079e22d9054493bc48a9500173aa3ca95/src/routes/email/email.controller.ts#L124
I would not however change the datasource API i.e.: IEmailDataSource.updateEmail seems to be a better fit for updating the database entries.

Good point. The relevant changes to the controller and repository were included in 4086df70d010d068649c0dca613fc1560e30160b.


Toward a stable filesystem api

Second Draft
We need to adapt to Nix now being a language with a proper module system, considering flakes to be essentially equivalent to a module in other languages. This should help create clear and distinct lines between different elements of the system, and keeps private code from leaking. For example, profiles could be it's own subflake of DevOS, which exports all profiles as nixosModules to then be consumed by the parent flake. Not every directory need be a flake, and many of the existing directory folders could be grouped together in a shared flake to reduce the complexity of the filesystem layout, without sacrificing any of the already established conveniences of DevOS. This has the added benefit of allowing users to pull only relevant pieces of devos, such as it's lib, in a flake ref: "github:divnix/devos?dir=lib".
Impetus
From the very first moment of deploying DevOS to the world, I knew the fs hierarchy had to change. I was hoping to illicit feedback from the community, and indeed one of the complaints I hear echoed is the default imports. This issue will remain open until a solid layout has been decided on, so we don't have to continue changing it out from under users. I want a flake centric approach, and internal flakes seem like the right way to manage access, at least from a high level.
For example, with this approach we should be able to maintain the convenience of the current doc setup, i.e a README.md in every directory explaining it's use, without actually needing the book.toml and SUMMARY.md in the root. We can just pull in the src flake to the doc flake, and overlay the book.toml onto it to generate the book.
Once a demo is achieved that maintains all the established conveniences of current DevOS, and a proof-of-concept for #127, I will open a PR that we can then scrutinize.
Changes
We would turn off the github template, and generate the template as a derivation, mostly likely from the source, with the docs optionally included for users. This will eliminate one level of nesting for users.
Goal
This won't change once 1.0 is reached, so we need to get it right, aiming at convenience for users without restricting what they can do.

Can you explain what you mean by out? And why things like overlays and pkgs go there?
And I'm not sure how to fix this or if it should be changed, but its pretty annoying that to edit a profile you now have to go three directories down(including profile folder). I feel like profiles are the most used folder.
But overall I do like the separation of different folders.

@Pacman99, I agree, profiles are only two levels deep if you look carefully, but this still may not be optimal. Might have gone overboard with nesting, and still not sure exactly how many internal flakes we should have. Just wanted to brainstorm here. We can take as long as we need to get it right, but I do want to get a PR open fairly soon, so we can start scrutinizing actual code.
out is short for flake outputs. Essentially each output would have it's own folder, and for that output, the flake would do an import, e.g. nixosConfigurations = import out/nixos. A big complain we have had is complexity, and I was trying to make it for obvious for users. We could match the folder names exactly, i.e. outputs/nixosConfigurations as well.

I'm going to pack top level with other things:
./Mgt # docbook for startup project management, like operating manual, strategy, etc.
./Accounting # beancount subfolder to keep a bencount accounting up and going
./Receipes # for recie collection, maybe dokbook (it's a restaurant)
...

So keeping top level clean(er) is indeed a thing that would be useful for my use case.

Indeed, the nesting can be mitigated mostly by generating the template from the src dir, so when users go to pull the template, they only have the contents of src, and maybe the docs.

Yeah, to include docs would be good, since it is a very handy trampoline for extending on all sorts of documentation.

We should be able to actually let users decide if they want docs or not. A naive implementation is one template with, one without the docs.

Since this is 1.0, and nickel seems like a big part of the "nix" future, I would really like a contract to guarantee the spec. This should technically be possible already.

ping: update proposal to second draft, accentuating thesis.

https://github.com/divnix/devos/blob/core/pkgs/flake.nix I dont understand the idea of subflakes, can you explain your reasoning? Or is there an old topic I can look at about it?
This flake seems like a lot of code to just parsing version/rev numbers from pkgs, and I don't see the gain. Before I was able to just as easily nix run '.#<pkg>' and items in the pkgs/ directory would match what could potentially go upstream to nixpkgs. And now they wont.  Plus, arent you doing flake tasks in multiple places now? At first usage it seems to add complexity for no gain.

The main advantage is that nix flake update does dealing with the hashes, which I'd consider is not very elegantly solved in nix proper, from the perspective of a +- newcomer.
The main disadvantage is that it introduces a new specialArgs srcs from which to pull sources. Hence any package declaration would need a tiny transformation before being upstream-able, but at the gain of easier package updates.
{
  src = srcs.mypackage-flake-input;
}
# vs
{
  src = fetchurl ( ... );
}

Other than that, the behavior, especially nix run '.#<pkg>' should be exactly the same, otherwise it's a bug.

I go back and forth on this. On the one hand, modifying the hash to upstream really isn't so much work. On the other, it kinda makes the source opaque, and the interface for subflakes isn't the best atm. I'm hoping there will be some usability improvements for internal flakes at some point that decide the issue in my mind.
The good news is, you can use not specify your source in pkgs/flake.nix if you'd rather do it the old way, that's a perfectly acceptable option.

Yeah I just think its a lot of complexity just to deal with some hashes that will need to be undone anyways before being added to nixpkgs.
And yes, i already had that exact issue with it-- updating the 'subflake' leads to a bad NAR hash to your main flake.
Also the way its called is done by relative path at the moment.  Which when I need to act on my flake repository locally i have to be within the exact root directory where the flake is located.
I think it's not a directory where you'd want to mass update the hashes/commits of repos either, because you're in the progress of getting them upstreamed to nixpkgs individually and not all at once.  So I don't see the utility but I do see a lot of added complexity.
Just my feedback after having updated from a state before "suites", which ive come to like!

Also, I might add, that it sometimes becomes a little redundant to re-declare a ref, usually a version tag that represents the version derivation argument.
Maybe ther would be a way to revert this and rather think of how to otherwise helpmpeople withbupdating their hashes (it's not too bad, but it is annoying).
I'm thinking along the lines of builtins.unsafeGetAttrsPos + some ast parser / modifier.

With the recent changes in 0.9 and the dropping of extern in #264, are there still any problems with the filesystem api?
I really file structure as it is right now, every folder and file has a clear purpose, there aren't too many folders. And with the switch to devos as a library, you can really easily change it.

Closable via #293

should this issue be unpinned as it is closed?


Adding support for shortcut files in files app

What's the Problem?
Currently files cant doesn't has support for windows shortcut files

Solution/Idea
The shortcuts to a specific route or file to be found in one place
Example: Arranging games[EXE] file shortcuts in a folder
Alternatives
Posting a .txt will will also be considerable but the shortcut feature is must
Priorities

Capability
Priority

This proposal will allow end users to accomplish the shortcut of a specific folder or file in a more convenient file location
Should

Files Version
Version: <IP_ADDRESS>
Windows Version
OS Version: 10.0.19044.1766
Comments
Shoutout to Niivu for providing free windows theme skin [Gruvbox]
https://www.deviantart.com/niivu/art/Gruvbox-for-Windows-913766735
No response

I don't know whether I got error that time or it got just fixed


Looking forward to the code release

Nice to see this great work! Hope the code will be released soon.

HI, @ronghanghu
Thank you for your interest in our project.
The code has now been released. Please check it out and let us know if you have any questions or feedback!


[Community][minor]: Fetch loader_source of GoogleDriveLoader.

Description: enhanced get_loader_source for GoogleDriveLoader.
Documentation:NA
Unit tests: NA

seems like a duplicate of other pr?


The instanceof operator in the dev mode does not work.

Version
v2.5.1
Reproduction link
https://github.com/archieDeveloper/nuxt-bug
Steps to reproduce
npm install
npm run dev
go to main page to website.
check the console.
What is expected ?
in the console inscription [object Error] true Request failed with status code 404
What is actually happening?
in the console inscription [object Error] false Request failed with status code 404
Additional comments?
Environment
Linux Ubuntu 18.04
npm version 6.7.0
node version v11.12.0
Dependencies package.json
"@nuxtjs/axios": "^5.4.1"
"nuxt": "^2.5.1"
Code in the page component
async asyncData ({ $axios }) {
    const toString = {}.toString;
    try {
        await $axios.get('https://google.com/test'); // should return 404 error
    } catch (error) {
        // expected - [object Error] true Request failed with status code 404
        // we get - [object Error] false Request failed with status code 404
        console.log(toString.call(error), error instanceof Error, error);
    }
}

When an http error occurs, the $axios module throws an exception and translates the code into the catch branch. An object of type Error falls into the error variable, but the instanceof operator shows the opposite. Also error instanceof Object returns false in the result.
This behavior is observed only when the npm run dev application is running. When running npm run build npm run start works correctly.

This bug report is available on Nuxt community (#c9081)

I also encountered the same problem，when i use code:
new Date() instanceof Date
In the dev mode:
It return false
in the prod mode:
It return true

Apparently nothing has been done on this so.. just bumping this to show it's still an issue

Confirmed this is still an issue... in dev mode, any prop with type: Date will throw console warnings in dev mode. Because new Date() instance of Date returns false.
eg. using Buefy DatePicker, I see this:
core_1           | [Vue warn]: Invalid prop: type check failed for prop "selectedDate". Expected Date, Array, got Date
core_1           |
core_1           | found in
core_1           |
core_1           | ---> <BDatepickerTableRow>
core_1           |        <BDatepickerTable>
core_1           |          <BDropdownItem>
core_1           |            <BDropdown>
core_1           |              <BDatepicker>

My workaround is to only populate the value after the component is mounted, which is a pain.


Adding Striver 180 top DSA Questions along with solutions

For the occasion of Hacktoberfest 2021, I am willing to contribute to this repo, I found it very helpful and willing to improve it further.

hey @aniruddha-5, I don't think this repo is participating in hacktoberfest...since the label is not there..

Oh. But still if required I can add it. @DarshGupta1910

@DarshGupta1910 But the repo shows the tag  hacktoberfest


🐛 Bug Report: updating name of a related collection doesn't update in the other one

👟 Reproduction steps

create two collections, leaderbaord and participant
create a relation between two of them
rename one of them leaderbaord -> leaderboard
check the related attribute in the other one, participant

👍 Expected behavior
the name should've been updated in the other collection
👎 Actual Behavior

The name doesn't update
Also, the bold link to the renamed related collection leaderboard in the attributes tab returns links back to the participant collection
🎲 Appwrite version
Version 1.3.x
💻 Operating system
Linux
🧱 Your Environment
No response
👀 Have you spent some time to check if this issue has been raised before?

[X] I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

[X] I have read the Code of Conduct

Thank you for submitting this bug @probablyArth :pray:

No worries, can I work on this?

@probablyArth assigned to you :+1:

@probablyArth any progress on this?

@probablyArth any progress on this? smile

I've been very busy preparing for an exam. Will get on it after this week if that's alright 😅

So I played around a bit, and to me it seems like this is something that  should be implemented in the backend, the updation of the relation if the related collection is updated rather than just in the console @ArmanNik

@probablyArth you might be right :thinking:
@abnegate can you take a look at it?


Working with lamda layers

Hi friends,
I use the serverless framework and the typescript template which uses serverless-esbuild.
I am wondering if serverless-esbuild works with layers?
Layers are important when working with prisma and serverless functions. However ive found that the .esbuild folder is largly empty of anything ive packaged in the prisma layer.
    functions: {
        main: {
            handler: "handler.MainHandler",
            timeout: 300,
            layers: [{ Ref: "PrismaLambdaLayer" }],
        },
    },
    layers: {
        prisma: {
            path: ".prisma-layer",
            description: "Layer for prisma clients",
            package: {
                patterns: [
                    "!nodejs/node_modules/@prisma/engines/*",
                    "!nodejs/node_modules/.prisma/**/libquery_engine-*",
                    "nodejs/node_modules/.prisma/**/libquery_engine-rhel-openssl-1.0.x.so.node",
                    "!nodejs/prisma/**",
                    "nodejs/prisma/*.db",
                    "nodejs/node_modules/.prisma/client/schema.prisma",
                ],
            },
        },
    },

This is ofourse an issue for me as i end up with the following error when i try to run locally. sls invoke local -f main

✖ Error: ENOENT: no such file or directory, open '/home/app1/.esbuild/.build/schema.prisma'

Running into the same issue with ffmpeg
I've been using serverless-webpack together with a lambda layer for ffmpeg and its been working.
Now I'm trying to make the move to esbuild and getting this from my lambda:
{
    "errorType": "Runtime.ImportModuleError",
    "errorMessage": "Error: Cannot find module './lib/fluent-ffmpeg'\nRequire stack:\n- /var/task/src/functions/api/lambda.js\n- /var/runtime/UserFunction.js\n- /var/runtime/Runtime.js\n- /var/runtime/index.js",
    "stack": [
        "Runtime.ImportModuleError: Error: Cannot find module './lib/fluent-ffmpeg'",
        "Require stack:",
        "- /var/task/src/functions/api/lambda.js",
        "- /var/runtime/UserFunction.js",
        "- /var/runtime/Runtime.js",
        "- /var/runtime/index.js",
        "    at _loadUserApp (/var/runtime/UserFunction.js:221:13)",
        "    at Object.module.exports.load (/var/runtime/UserFunction.js:279:17)",
        "    at Object.<anonymous> (/var/runtime/index.js:43:34)",
        "    at Module._compile (internal/modules/cjs/loader.js:1085:14)",
        "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)",
        "    at Module.load (internal/modules/cjs/loader.js:950:32)",
        "    at Function.Module._load (internal/modules/cjs/loader.js:790:12)",
        "    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)",
        "    at internal/main/run_main_module.js:17:47"
    ]
}

My configuration (which works fine with webpack)
 api:
    name: ${self:custom.api.talk.lambda.name}
    handler: src/functions/api/lambda.handler
    layers:
      - arn:aws:lambda:us-west-2:899016509520:layer:ffmpeg:1

Hi, is there any update on how to get Lambda layers working with Node 18 (since it has ES6 support?)

Hi, is there any update on how to get Lambda layers working with Node 18 (since it has ES6 support?)

I got lambda layers working by setting the relevant dependencies to external in custom esbuild config:
layers:
  dependencies:
    path: ./path/to/<your-layer-name>/
    description: Dependencies layer for service
    # Optional
    compatibleRuntimes:
      - 'nodejs18.x'

custom:
  esbuild:
    # Dependencies to be retrieved from lambda layer
    exclude: ['aws-sdk', 'aws-serverless-express', 'cors', 'express', ... ]

Then wherever in your serverless project you want, create <your-layer-name>/nodejs/, then within that directory create a new npm project with npm init (or yarn) with the dependencies to be stored in the layer. I believe using pnpm causes some issues due to symbolic linking but there are workarounds.
The node_modules should end up at <your-layer-name>/nodejs/node_modules or they won't be automatically included in the PATH.

I am currently facing the same issue. As a workaround i have decided to compile it and bundle it before packaging and setting the paths in serverless.yml to build folder


Decouple root dependencies by using uproot and scipy stats

https://github.com/cranmer/fast-asimov-utils
https://gitlab.cern.ch/lgagnon/mbj_nn/blob/master/python/mbj_nn/utils.py#L165

def significance(signalExp, backgroundExp, relativeBkgUncert):
    """ Numpy/Scipy port of the RooStats function `BinomialExpZ'

    See: https://root.cern.ch/doc/master/NumberCountingUtils_8cxx_source.html
    """
    # pylint: disable=invalid-name
    mainInf = signalExp + backgroundExp
    tau = 1.0 / backgroundExp / (relativeBkgUncert * relativeBkgUncert)
    auxiliaryInf = backgroundExp * tau
    P_Bi = scipy.special.betainc(mainInf, auxiliaryInf + 1, 1.0 / (1.0 + tau))
    return - scipy.special.ndtri(P_Bi)

I've decoupled RooStats with 3acfd8b4b5cd744755a0821914f44401bcf94d0a.

I've decoupled most of ROOT (except for plotting) from 3acfd8b4b5cd744755a0821914f44401bcf94d0a to e1c37a826bd1696f00a61a5a21ce0548a16bf34b.
e1c37a...3acfd8

Closing this for now as most of it is decoupled except for plotting which isn't under the scope of this issue.


Defibrillator and its environment

Icon Request
AED

Icon name: aed (Category: Health & Medical)
Tags of this icon: defibrillator, aed
Use case: In a medical equipment display frame, in the same idea as the icon of the stethoscope, thermometer or infrared thermometer
Screenshots of similar icons:

AED Electrodes

Icon name: aed-electrodes (Category: Health & Medical)
Tags of this icon: defibrillator, aed, electrodes
Use case: In a medical equipment display frame, in the same idea as the icon of the stethoscope, thermometer or infrared thermometer
Screenshots of similar icons:

https://remixicon.com/icon/aed-line
https://remixicon.com/icon/aed-electrodes-line


Config Import Error

Complete novice here. I'm at the "Test your bot" section and when I try to start the dispatch_bot.py code I'm getting an Import error on the config file. I have a hunch this is something simple, but I tried adding a new environment variable to where that config.py file lives and that didn't work.

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

ID: f68e3448-ea66-7aab-26d2-37de5f44527c
Version Independent ID: 30c9096c-926c-3b92-6ab0-cc49edf63842
Content: Use multiple LUIS and QnA models - Bot Service
Content Source: articles/v4sdk/bot-builder-tutorial-dispatch.md
Service: bot-service
GitHub Login: @diberry
Microsoft Alias: kamrani

Can you post the full error and any changes you might have made to the bot?

When I step through the code it I get the below error when I try to import DefaultConfig. Again I may be making a really easy mistake. No other changes have been made to the bot.
`Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name 'DefaultConfig' from 'config' (C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python37_64\lib\site-packages\config_init_.py)

`

Where are you importing DefaultConfig? The example used in the doc doesn't show it, but in your import statements in your dispatch_bot.py (this step: https://docs.microsoft.com/en-us/azure/bot-service/bot-builder-deploy-az-cli?view=azure-bot-service-4.0&tabs=python), you should have the following import statement:

from config import DefaultConfig

if that line is not there, please put it in  and rerun the  bot.

Additionally, there is this sample here: https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/python/14.nlp-with-dispatch
This is a full example of the bot in the doc. You can compare the code in it to your code, to see if you're missing any lines.

(sorry, had mouse issues)

When I execute the app.py script from the command line the bot works fine. My error was happening when I was stepping through the code (because I was trying to understand it) but I suppose because the app.py runs just fine then we're all good?

It sounds like it's timing out because of the step debugging. I've never heard it giving an import error when timing out, but given your description of the issue, it seems like it's trying to initialize the project when you start it, but the step debugger is blocking a constructor somewhere from firing. I'm glad to hear that the bot works as expected when run without debugging. I'm going to close this issue here, as it isn't a bot-docs issue. Thank you for bringing it to our attention. I'll  run this problem past the python team, check if it's normal behavior. If it is not, I'll reopen this issue in the python repo.


Lowercases incorrect function names and uses new DOM adaptors in main.js

Thanks for the fixes.  I missed these during the update of the examples (I guess I don't use main.js myself anymore).


[docs] improve charts' docs

The docs can be confusing, stuff like additionalProperties or the examples in the ci folder
The docs should be updated to include info about this

base-cluster;

[ ] rbac rules verlinken

Maybe also add a diagram to show the use of base-cluster visually?


Add scope in model ability to RBAC

created for @skateman 🎁
he wanted to restrict visibility of CustomButtonEvents for non super-admin.
NOTE: admin user has been removed by @kbrock's recent work(probably last PR  ot the work https://github.com/ManageIQ/manageiq/pull/17850) in order to have just specialized admin users.   -  So this PR is allowing visibility just for super_admins.
Implementation
I decided to add to RBAC a other concept(scope_for_model?) - it will allow to define scope in models to reach required behaviour. (maybe similar to scope_for_user_role_group)
Example of future usage( for other models)
This will be also usable for MiqSchedule, when you look in UI you will see  on couple places:
if User.super_admin?
                # Super admins see all report schedules
                MiqSchedule.where(:towhat => 'MiqReport')
              else
                MiqSchedule.where(:towhat => 'MiqReport', :userid => User.current_user.userid)
              end

@miq-bot assign @gtanzillo

@miq-bot add_label rbac, enhancement
@skateman please add release labels or BZs, PRs, ...  thanks!

btw @lpichler you can't guess what's happening in this PR from the PR's title :wink:

@lpichler this works in the classic ui, but in the API I am able to access the custom button events on a given user with the same user's credentials.

@skateman @lpichler the filtering logic for the APIs is embedded in the controllers
@kbrock Should not we put these this to RBAC - to make sure that behaviour is same in all places ?

@lpichler Please apply the same change to GenericObject.

Done, (aslo added :dependent => :destroy)

@lpichler works in the UI, however, in the API I'm still getting some data with a non super-admin user:
User.last.name
=> "test"
User.last.super_admin_user?
=> false
User.last.id
=> 15

If I request the data for the user itself:
$ curl --user test:test -i -X GET -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:3000/api/users/15/custom_button_events

{
  "name": "custom_button_events",
  "count": 1,
  "subcount": 0,
  "pages": 1,
  "resources": [],
  "links": {
    "self": "http://localhost:3000/api/users/15/custom_button_events?offset=0",
    "first": "http://localhost:3000/api/users/15/custom_button_events?offset=0",
    "last": "http://localhost:3000/api/users/15/custom_button_events?offset=0"
  }
}

If I request the data for any other user:
$ curl --user test:test -i -X GET -H "Accept: application/json" -H "Content-Type: application/json" http://localhost:3000/api/users/1/custom_button_events

{
  "error": {
    "kind": "forbidden",
    "message": "Access to the resource users/1 is forbidden",
    "klass": "Api::ForbiddenError"
  }
}

@gtanzillo https://bugzilla.redhat.com/show_bug.cgi?id=1511126


checkpoints: listing and reverting a file

@diocas  I have added a configuration option so there will be a way to replace the checkpoints if necessary. It works just as authentication.

I imagine that most actions that would be required (like renaming the checkpoints if a file is renamed) are done automatically by Reva, right?
That is why we only need to list and restore, right?
Yes, exactly, most actions are done by Reva, we need to list and call restore if necessary.

I have checked the standard jupyter settings to replace checkpoints_class but unfortunately, it does not work.

CI is broken due to changes to the REVA examples. Will merge and fix it later.


Fail to fit encoding. when change it manually, fail to match even after open a new file.

Auto match encoding fail
When I open several GB2312 C files,it's in UTF-8 mode.
Manually change encoding, doesn't remember encoding when I open another file

You can configure a global encoding in workspace settings or global settings (File | Preferences).