text:
Change String.substring(start, end) to half-open

Currently String.substring is inclusive of both endpoints to allow negative indices to be included.  Other languages have differing patterns.  Inside Pony, Array.slice() uses half-open ranges.  We should probably decide on something and make everything consistent.
Pony:
 "asdf".substring(1,-1) == "sdf"`.
 "asdf".substring(1,3) == "sdf"`.

Python is exclusive:
"asdf"[1:-1] == "sd"
"asdf"[1:3] == "sd"

Java is exclusive:
"asdf".substring(1, -1) // illegal
"asdf".substring(1, 3) == "sd"

Ruby has both inclusive and exclusive options:
"asdf"[1..-1] == "sdf"
"asdf"[1..3] == "sdf"
"asdf"[1...-1] == "sd"
"asdf"[1...3] == "sd"

C++ uses offset, length pairs, so it is closer to exclusive, but not directly comparable.

Interestingly, R, Julia, and Lua have inclusive array slicing and inclusive string indexing.

I noticed this before as well - it would be best if String and Array had consistent slice indexing, whether that means always inclusive, always exclusive, or always offering both as API options somehow.

I just ran into an annoyance with this and expressing empty ranges.  For half open, [1, 1) is an empty range and for inclusive it is not.  This makes a bunch of string walking things more fiddly.  When combined with underflow of U64, it makes it very hard to express an empty range at the first character of a string.

+1 for String and Array consistency and overloading via a Sliceable interface like other builtin operators

E.W. Dijkstra on half-open (first three paragraphs).

Having both inclusive end and magic number (-1) indicating end-of-line prevents getting a zero length substring at the start:
actor Main
  fun first_word_in(text: String): String ? =>
    text.substring(0, text.find(" ") - 1)

  new create(env: Env) =>
    try
      env.out.print(first_word_in("foo bar")) // 'foo'
      env.out.print(first_word_in(" leading space")) // ' leading space'
    end

I am having trouble understanding which side you are arguing for with that example.  I would expect the implementation of first_word_in to return either "" when given " leading space" or "leading".  Under no circumstances would I expect it to return the entire string when the string contains multiple words.
Honestly, the half-open version seems much cleaner:
text.substring(0, text.find(" "))
handling the case of what find() returns on failure alters the implementation slightly.  I see three likely versions:

text.find returns -1 on failure
text.find raises an error on failure
text.find returns text.size on failure

1&3 both work with the naive version of exclusive substring
2 requires a try else

I've updated example to indicate that second behavior was definitely unexpected. I agree that half-open version would be better.
Also, I've checked languages that @sylvanc mentioned: all of them are one-indexed. Which makes decision to use close interval more reasonable (they can still use unsigned integers to represent indices and makes it possible to have zero-length substring/slice at the beginning of string/array).

I'm convinced. Between @fowles , @jonas-l , @jemc  and Dijkstra, I think it's clear I made the wrong call initially :) The point about 1-indexed vs 0-indexed is especially good.
Anybody want to volunteer to switch everything to half-open?

I can take this one.

I suggest making the api to this method:
substring(start: (I64|U64), end: (I64|U64|None) = None)
that way people with U64 can avoid annoying conversions and the default value for end can still be "everything".

Declaration
fun substring(start: (I64|U64), end: (I64|U64|None) = None)

would shift the burdens from having to convert variables (s.substring(value.i64())) to specifying type of literals (s.substring(I64(3))). It is due to the fact that I64 and U64 are not disjoint types and thus compiler is unable to infer it.
There are many ways to solve this problem but it has nothing to do with this half-open range.

Is this now done or is there more left?

Technically String methods are converted to half-closed, but to keep things consistent Array methods have to be converted as well. I'll look into this today.

Excellent, thanks.

It looks like there's only one method Array.slice() which takes a range. It's already half-open, thus the issue can be closed.

authors: andymcn darach fowles jemc jonas-l sylvanc

repo: CausalityLtd/ponyc


text:
🛑 Nextcloud is down

In 3052ffe, Nextcloud (https://nextcloud.hiripple.com) was down:

HTTP code: 530
Response time: 83 ms

Resolved: Nextcloud is back up in 5f71597 after 21 minutes.

source: gharchive/issue

repo: CelestialRipple/ripplelog

license: MIT

license_type: permissive

license_source: github-api


text:
KCM (deployment controller) on TP cluster failed to sync up deployment with its token

What happened:
KCM (deployment controller) on TP cluster failed to sync up deployment with its token.
I0321 00:18:52.347999       1 deployment_controller.go:563] Started syncing deployment "arktos/v8uy5l-testns/saturation-deployment-0" (2021-03-21 00:18:52.347985815 +0000 UTC m=+665.382452865)
I0321 00:18:52.348391       1 deployment_util.go:260] Updating replica set "saturation-deployment-0-c47675f5" revision to 1
I0321 00:18:52.352163       1 deployment_controller.go:565] Finished syncing deployment "arktos/v8uy5l-testns/saturation-deployment-0" (4.172689ms)
I0321 00:18:52.352185       1 deployment_controller.go:485] Error syncing deployment arktos/v8uy5l-testns/saturation-deployment-0: replicasets.apps is forbidden: User "system:kube-controller-manager" cannot create resource "replicasets" in API group "apps" in the
namespace "v8uy5l-testns"

append_or_replace_prefixed_line "${known_tokens_csv}" "${KUBE_CONTROLLER_MANAGER_TOKEN}," "system:kube-controller-manager,uid:system:kube-controller-manager"
What you expected to happen:
the controller should be permitted to perform the replication sets and create pods on the deployment
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:

Arktos version (use kubectl version):
Cloud provider or hardware configuration:
OS (e.g: cat /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Network plugin and version (if this is a network-related bug):
Others:

Needs to check with tenant RBAC model

fixed in PR 1040

repo: CentaurusInfra/arktos


text:
Add MEI support

Description of feature
This should be added after CNV analysis has been fully implemented

https://github.com/BilkentCompGen/tardis

https://github.com/tk2/RetroSeq


text:
[ENG-3736] Fix bugs: project link overflow text

Ticket: https://openscience.atlassian.net/browse/ENG-3649 , https://openscience.atlassian.net/browse/ENG-3736
Feature flag: n/a

Purpose
The purpose of this ticket is to fix the display of project link and file names which overflow to the next line.
Summary of Changes
The properties for ellipse text-overflow behavior were added to the CSS file. Additional properties that were added include its white-space set to not wrap, making the element display as an inline block, left aligning the text, and setting a width to ensure the ellipse displays regardless to communicate to the user that there is more text present in the project name.
Screenshot(s)

Side Effects
There is a concern that the side divs open oddly on the right when viewport width is added. The solution is not ideal, and should be seen as more of a hotfix until a more complete solution may be reached.
QA Notes
-Does the project link and file names appear properly?
-Does the text wrap to another line (should not) or appear ellipsed?
-Is the ellipse showing to indicate more text?
-How is the layout for the slide being affected?

Pull Request Test Coverage Report for Build 2203806029

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

Totals

Change from base Build 2173037074:
0.0%

Covered Lines:
4993

Relevant Lines:
6608

💛  - Coveralls

source: gharchive/pull-request

repo: CenterForOpenScience/ember-osf-web


text:
[WIP] Feature/Optimize Meetings Page Serialization with SQL [PLAT-657]

❗ WIP
Purpose
Will probably replace https://github.com/CenterForOpenScience/osf.io/pull/8195 since download count sorting and searching are too slow.
Changes

QA Notes

Documentation

Side Effects

Ticket
https://openscience.atlassian.net/browse/PLAT-657

I need to filter out bad nodes that don't have contributors ^ failing test.

Filtering out nodes that don't have any visible contributors which was added here https://openscience.atlassian.net/browse/OSF-8864.  Looks like a try/except was added to send a message to sentry if this occurs and maybe someone could fix in admin app.   Is this still needed @sloria ? If so I am not sure how to handle here.

Oh yes I definitely think we still need to filter it out, because it breaks the whole page otherwise. But the sentry message?

@pattisdr Don't worry about the sentry messages for invalid projects. That bad data isn't really related to the rendering of meeting submissions, so it doesn't necessarily belong there.

authors: pattisdr sloria


text:
CesiumCreditSystem.cpp crash during runtime

From https://community.cesium.com/t/crashes-possibly-due-to-plugin-tile-loading-ue5/19641, reported by 2 users
Users are experiencing a crash while in play mode that produces the following error log.
Unhandled Exception: EXCEPTION_ACCESS_VIOLATION 0x0000000000000000

UnrealEditor_CesiumRuntime!ACesiumCreditSystem::Tick() [D:\build\U5M-Marketplace\Sync\LocalBuilds\PluginTemp\HostProject\Plugins\CesiumForUnreal\Source\CesiumRuntime\Private\CesiumCreditSystem.cpp:210]
UnrealEditor_Engine

The crash doesn't seem to happen every time, but fairly regularly.

Changes were made to the credit system fairly recently (https://github.com/CesiumGS/cesium-unreal/pull/868). It might be worth looking at what changed to see if anything unwanted was introduced.

@joseph-kaile can you please take a look at this when you get a chance? If we need to fix something, it would be good to do that before the August release.

Yes, I will start working on that right away.

@argallegos This is most likely fixed now after #922 so I'm closing this, but if you or anyone on the community continues to experience the issue (after the August 1st release) feel free to reopen.

authors: argallegos joseph-kaile kring nithinp7

repo: CesiumGS/cesium-unreal


text:
Fix i3dm matrices in ModelExperimental

Fixes https://github.com/CesiumGS/cesium/issues/10255
This PR fixes two things about i3dm model matrices in ModelExperimental:

The matrix product was missing model.modelMatrix
The axis correction was applied on the right of the node hierarchy transform, when it should have been applied on the left.

I also refactored how axis correction is handled, now it's just a matrix sceneGraph.axisCorrectionMatrix.
Here's a diagram that shows the correct matrix product order and how it compares with the glTF EXT_mesh_gpu_instancing matrix product.

Thanks for the pull request @ptrgags!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.

@j9liu this is now ready for review when you get a chance.

@j9liu updated!

@ptrgags looks good, merging now. Thanks!

authors: cesium-concierge j9liu ptrgags

repo: CesiumGS/cesium

license_source: bigquery


text:
Update indent

My brain has not yet adapted to this new tab size... but here are a few more places where it's specified.

Thanks for the pull request @emackey!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

:grey_question: Unit tests were not updated.

Make sure you've updated tests to reflect your changes, added tests for any new code, and ran the code coverage tool.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

Thanks @emackey!

authors: cesium-concierge emackey mramato


text:
Snapshot service - remove fallback to FilOps

Issue summary
Given that FilOps snapshot service is going down, it makes sense to eliminate this path of code in Forest (and consider a new self-heal mechanism?).
It is a low priority, given it will fail quickly on a failed snapshot anyway.
Other information and links

See https://github.com/ChainSafe/forest/pull/3878

repo: ChainSafe/forest-iac


text:
Evaluate the status and usefulness of each RPC endpoint.

Issue summary

Some RPC endpoints are no longer used (maybe they never were). We should go through each endpoint and note whether it is used, whether it is functional, and whether it is something we want to support at all.
The RPC endpoints are here:
https://github.com/ChainSafe/forest/blob/8cfe596656f9c7ac255721cc6f0e18dafc0e882f/node/rpc/src/lib.rs#L58-L65
Other information and links

Done.

repo: ChainSafe/forest


text:
Use tracing instead of log

Summary of changes

Changes introduced in this pull request:

Removes the log crate and replaces with tracing which is already used.

Reference issue to close (if applicable)

Closes #3095
Other information and links

Change checklist

[ ] I have performed a self-review of my own code,
[ ] I have made corresponding changes to the documentation,
[ ] I have added tests that prove my fix is effective or that my feature works (if possible),
[ ] I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Love this 😍

authors: aatifsyed creativcoder


text:
Refactor to use Typescript

Refactored to use typescript with minimal changes to process and code.
Imo, using typescript in this project will pay dividends as the gossipsub feature-set grows. It becomes much easier to reason about this codebase which has many moving parts and datatypes when there's that minimal level of type/sanity checking.
That said, I attempted to do this update in a way that's minimally invasive to the standard libp2p workflow.

typescript code lives in ts/, gets transpiled to src/

prebuild and pretest scripts runs tsc
build step left untouched - aegir build
emits js code in strict mode
pubsub.js left untouched (expected to migrate to js-libp2p-pubsub repo eventually)
src/ not checked into git, like dist/

built dist/index.min.js is 2KB larger, from 468KB to 470KB
linting now performed by eslint (using standard and @typescript-eslint configs/plugins) instead of aegir, as the typescript files themselves are to be linted
tests left untouched
caught a few bugs

doc strings out of sync
no null checks for nullish values
improper use of functions due to misleading variable names

GossipSub => Gossipsub throughout (I can remove to future PR if desired)
types in ts/peer.ts should eventually go to js-libp2p-pubsub

Codecov Report

Merging #77 into master will decrease coverage by 5.68%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
- Coverage   85.68%   80.00%   -5.69%
==========================================
  Files          11        1      -10
  Lines         510       10     -500
==========================================
- Hits          437        8     -429
+ Misses         73        2      -71

Impacted Files
Coverage Δ

test/utils/index.js
80.00% <ø> (ø)

Continue to review full report at Codecov.

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

@vasco-santos Thanks for bringing up the larger issue of standardizing the tooling and strategy for supporting typescript across the js-libp2p/js-ipfs ecosystem.
I do think that using full typescript here will be beneficial, over, eg: autogen declarations. Imo it mainly boils down to improved dev tooling and type-checking sanity checks. I think the benefits outweigh the additional machinery and differences with other libp2p repos.
The current gossipsub codebase has many rough edges and using typescript here clears up many ambiguities. As part of this process, several bugs were found just from having type-checking. While these bugs were obvious in hindsight, those particular issues would have never passed the base level of scrutiny we get using typescript. I'd love to see this gossipsub implementation be polished and be easily shown to be correct, and I think type-checking plays a role here.
The dev tooling aspect is also useful to call out. I've been working on gossipsub v1.1 in a local branch, and having the full IDE type-checking/hinting and autocompletion significantly reduces the mental burden of eg: spelling out logic with app-specific datastructures. We're able to declare datastructures with interfaces (in the case of gossipsubv1.1, these interfaces can be fairly large and wordy) and seamlessly use these to aid development without having to navigate opaque objects by hand. Using vanilla js, I was struggling to have my IDE link JSDocs throughout the project, and having to manually check for typos and correct usage, so the experience was not nearly so pleasant.
Remaining thoughts are how to best do this PR w/o negatively impacting the js-libp2p ecosystem and with maximal standardization/collaboration with the js-libp2p ecosystem.
I would love to keep using aegir where possible, (using it for linting eventually, if/when supported), and the current structure is an attempt to simply extend the current processes to a typescript codebase. Ideally after ts => js transpilation/pre-processing, "things can be treated the same".
Perhaps this may be the only js-libp2p repo using typescript, but I would like to get this right to maximally align with the whole ecosystem so it doesn't have to be treated strangely and can benefit from standardization.

@wemeetagain thanks for exposing your thoughts. I agree with your thoughts and we should move on the way you are working on!

FYI, just released 0.4.3 with this PR and a custom aegir on my local machine to skip the dirty validation


text:
Error after updating from 0.6.2 to 0.6.3: "Unsupported role MessagesPlaceholder"

Description:
After updating from version 0.6.2 to 0.6.3, I encountered an error related to an "Unsupported role MessagesPlaceholder". The traceback provided below gives more details about the issue.
Error Traceback:
chainlit-demo_1  | > Entering new AgentExecutor chain...
chainlit-demo_1  | 2023-08-25 04:47:54 - Error in LangchainCallbackHandler.on_chain_start callback: Unsupported role MessagesPlaceholder
chainlit-demo_1  | 2023-08-25 04:47:54 - Unsupported role MessagesPlaceholder
chainlit-demo_1  | Traceback (most recent call last):
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/chainlit/utils.py", line 36, in wrapper
chainlit-demo_1  |     return await user_function(**params_values)
chainlit-demo_1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/demo_app/main.py", line 46, in main
chainlit-demo_1  |     res = llm_chain.run(message, callbacks=[cl.LangchainCallbackHandler()])
chainlit-demo_1  |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/chains/base.py", line 475, in run
chainlit-demo_1  |     return self(args[0], callbacks=callbacks, tags=tags, metadata=metadata)[
chainlit-demo_1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/chains/base.py", line 282, in __call__
chainlit-demo_1  |     raise e
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/chains/base.py", line 276, in __call__
chainlit-demo_1  |     self._call(inputs, run_manager=run_manager)
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/agents/agent.py", line 1036, in _call
chainlit-demo_1  |     next_step_output = self._take_next_step(
chainlit-demo_1  |                        ^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/agents/agent.py", line 833, in _take_next_step
chainlit-demo_1  |     output = self.agent.plan(
chainlit-demo_1  |              ^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/agents/agent.py", line 456, in plan
chainlit-demo_1  |     full_output = self.llm_chain.predict(callbacks=callbacks, **full_inputs)
chainlit-demo_1  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/chains/llm.py", line 255, in predict
chainlit-demo_1  |     return self(kwargs, callbacks=callbacks)[self.output_key]
chainlit-demo_1  |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/chains/base.py", line 270, in __call__
chainlit-demo_1  |     run_manager = callback_manager.on_chain_start(
chainlit-demo_1  |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/callbacks/manager.py", line 1166, in on_chain_start
chainlit-demo_1  |     _handle_event(
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/callbacks/manager.py", line 328, in _handle_event
chainlit-demo_1  |     raise e
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/langchain/callbacks/manager.py", line 304, in _handle_event
chainlit-demo_1  |     getattr(handler, event_name)(*args, **kwargs)
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/chainlit/langchain/callbacks.py", line 378, in on_chain_start
chainlit-demo_1  |     prompt = build_prompt(serialized, inputs)
chainlit-demo_1  |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/chainlit/langchain/callbacks.py", line 45, in build_prompt
chainlit-demo_1  |     role=convert_role(m["id"][-1]),
chainlit-demo_1  |          ^^^^^^^^^^^^^^^^^^^^^^^^^
chainlit-demo_1  |   File "/app/.venv/lib/python3.11/site-packages/chainlit/langchain/callbacks.py", line 74, in convert_role
chainlit-demo_1  |     raise ValueError(f"Unsupported role {role}")
chainlit-demo_1  | ValueError: Unsupported role MessagesPlaceholder

# main.py
from langchain.chat_models import ChatOpenAI
from langchain.agents import Tool
from langchain.chains.conversation.memory import ConversationBufferMemory
from langchain.agents import initialize_agent
from langchain.agents import AgentType
from langchain.utilities import BingSearchAPIWrapper
import chainlit as cl

search = BingSearchAPIWrapper()
tools = [
    Tool(
        name = "Current Search",
        func=search.run,
        description="useful for when you need to answer questions about current events or the current state of the world"
    ),
]

@cl.on_chat_start
def main():
    memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
    llm = ChatOpenAI(temperature=0)

    agent_chain = initialize_agent(
        tools,
        llm,
        agent=AgentType.CHAT_CONVERSATIONAL_REACT_DESCRIPTION,
        verbose=True,
        memory=memory
    )

    cl.user_session.set("llm_chain", agent_chain)

@cl.on_message
async def main(message: str):
    llm_chain = cl.user_session.get("llm_chain")

    res = llm_chain.run(message, callbacks=[cl.LangchainCallbackHandler()])

    await cl.Message(content=res).send()

Steps to Reproduce:

Update from version 0.6.2 to 0.6.3.
Run the main.py application.
Observe the error in the logs.

Expected Behavior:
The application should run without any errors after the update.
Actual Behavior:
Received an error related to "Unsupported role MessagesPlaceholder".
Environment:

python = "3.11.4"
openai = "0.27.9"
chainlit = "0.6.3"
langchain = "0.0.272"

This is a bug, nice catch!
Will be fixed in the next release.

Should be fixed with the 0.6.401 release!

authors: sammrai willydouhard

repo: Chainlit/chainlit


text:
Two interactive VLN papers

May I add to the list our two papers, which are the first on Matterport3D-VLN with language-based interaction :)

Of course! Thank you.

authors: ChanganVR khanhptnk

repo: ChanganVR/awesome-embodied-vision


text:
API 地址被墙了，可以在程序里面加一个 代理服务器 的选项吗

API 地址被墙了，https://github.com/transitive-bullshit/chatgpt-api/issues/419
由于服务端在国内， 能否在 .env 里面加上一个 proxy 的参数啊。 另外，可否支持自定义的 API 域名 （cloudflare 里面设置的 worker）啊

OPENAI_API_BASE_URL 不是有这个环境变量吗

SOCKS_PROXY_HOST 填写服务器ip试试，SOCKS_PROXY_PORT 为socks代理端口

fetch fail，

我同一个内网，上游路由器已经翻了过去， 电脑访问api啥问题没有，群晖里的chatgpt-web就不行 死活得再内网里弄个代理 相当于脱了裤子放屁的节奏

代理服务器得能访问api那样才能访问，127.0.0.1不就是本机吗？要是本机能翻过去那还本机代理本机有啥意义

fetch fail，

我同一个内网，上游路由器已经翻了过去， 电脑访问api啥问题没有，群晖里的chatgpt-web就不行 死活得再内网里弄个代理 相当于脱了裤子放屁的节奏
应是路由器fq设置问题。我一直这样用。没发现什么问题，一直正常。

fetch fail，

我同一个内网，上游路由器已经翻了过去， 电脑访问api啥问题没有，群晖里的chatgpt-web就不行 死活得再内网里弄个代理 相当于脱了裤子放屁的节奏
应是路由器fq设置问题。我一直这样用。没发现什么问题，一直正常。

重新拉取了2.9.3可以用了 不用再挂代理了 但是今早都403了 哈哈

同样是今天403，重新拉了2.9.3版本又正常了

最新的支持的

可以用cf_worker反代apenai api 替换掉https://api.openai.com/
自建教程

我尝试了 SOCKS_PROXY_HOST=127.0.0.1 SOCKS_PROXY_PORT=10808 ， 但是 没有用，依然 fetch fail， 至于OPENAI_API_BASE_URL ， 我再来试试，

你这issue的直接问题是docker如何访问宿主机网络，两者不是直接共享的。设置为host之类的都可以解决这个问题。

authors: BruceHan98 GrayXu cary-sas gygy kof8855 luuziiyoo ottocsb x-dr

repo: Chanzhaoyu/chatgpt-web


text:
Enable SSE api for text-stream

同官网接口一致，启用SSE请求协议
为了近一步减少流量，简化了stream相关的消息体，其他暂时用不到的字段先忽略不输出
同时提升参数csid（即conversionId）的位置

interface StreamMessage {
  id: string
  csid?: string
  pmid?: string
  delta: string
  text?: string
  finishReason?: string
}

相应的，添加服务接口 /api/chat-sse，用于实现 'text/event-stream' 输出

输出效果如图

修订了在接收消息的过程中只使用delta，如图

官方API和accessToken（通过代理）方式都已测试通过。
@Chanzhaoyu

应该不需要这么复杂
import { PassThrough } from "stream";
// 请求里
 const steamData = new PassThrough();
  ctx.body = steamData;
steamData.write(firstChunk ? JSON.stringify(chat) : `\n${JSON.stringify(chat)}`);

这样就可以了

应该不需要这么复杂
import { PassThrough } from "stream";
// 请求里
 const steamData = new PassThrough();
  ctx.body = steamData;
steamData.write(firstChunk ? JSON.stringify(chat) : `\n${JSON.stringify(chat)}`);

这样就可以了 拉了你的代码用vercel依旧没法实现打字机效果

我的这个版本在SG表现正常（一次一词）、HK表现不太正常（一次约5-20词），应该和网络速度有关。
另外，你这段代码加在哪里？可否方便提个PR看看。


text:
Document build infrastructure

I don't think I have seen proper documentation for how the two CI systems are being used and what triggers are supposed to launch e.g. merges from master to deploy and where this is supposed to happen.
Ref. also #1154 just now.

More importantly, I think instructions on how to fix master/deploy merge conflicts should be written down somewhere

I think we are good now; Angus and Art solved it.  Apparently the root cause was a stray commit on the deploy branch.

https://charcoal-se.org/smokey/Build-Infrastructure

authors: ArtOfCode- angussidney tripleee

repo: Charcoal-SE/SmokeDetector


text:
Cow: Watch orlandoblackcar.com

Cow requests the watch of the watch_keyword orlandoblackcar\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

orlandoblackcar\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ

authors: SmokeDetector metasmoke


text:
Cow: Watch wealthcarelawyer.com

Cow requests the watch of the watch_keyword wealthcarelawyer\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

wealthcarelawyer\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by tripleee in Charcoal HQ


text:
Yatin: Watch keto-bodytone-australia-44.webself.net

Yatin requests the watch of the watch_keyword keto-bodytone-australia-44\.webself\.net. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

keto-bodytone-australia-44\.webself\.net has been seen in 1 true positive, 0 false positives, and 0 NAAs.

keto-bodytone-australia-44\.webself\.net has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by cigien in Charcoal HQ

Approved by cigien in Charcoal HQ


text:
Victor VosMottor: Watch lakeviewloanllc(?:@hotmail.com)?

Victor VosMottor requests the watch of the watch_keyword lakeviewloanllc(?:@hotmail\.com)?. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

lakeviewloanllc(?:@hotmail\.com)? has been seen in 1 true positive, 0 false positives, and 0 NAAs.

lakeviewloanllc(?:@hotmail\.com)? has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ

Approved by Jeff Schaller in Charcoal HQ


text:
Yatin: Watch click2book.us

Yatin requests the watch of the watch_keyword click2book\.us. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

click2book\.us has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Spevacus in Charcoal HQ


text:
Nick: Watch tradersfind.com

Nick requests the watch of the watch_keyword tradersfind\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

tradersfind\.com has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by cigien in Charcoal HQ


text:
VLAZ: Watch techaid71.xyz

VLAZ requests the watch of the watch_keyword techaid71\.xyz. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

techaid71\.xyz has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


text:
Demo

Hi Charles,
I decided to try the grid with materialize as I have a note to wait for version .3x. At any rate when I test the demo I get the following
Unhandled promise rejection TypeError: Cannot read property 'use' of undefined
    at y.configure (http://localhost:9000/jspm_packages/github/charlespockert/aurelia-bs-grid@master/index.js:7:28)
    at http://localhost:9000/jspm_packages/github/aurelia/framework@0.14.0/aurelia-framework.js:25:34
    at run (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/es6.promise.js:91:43)
    at http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/es6.promise.js:105:11
    at module.exports (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.invoke.js:6:25)
    at queue.(anonymous function) (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.task.js:40:9)
    at Number.run (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.task.js:27:7)
    at listner (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.task.js:31:9)(anonymous function) @ :9000/jspm_packages/npm/core-js@0.9.18/modules/es6.promise.js:139

Thanks
John

Hi John, yeah I'm aware of this, there was a PR I merged to make it work with the new version of Aurelia but it turns out Rob did some work to get rid of one of the classes the compiler uses. I'm going to move the codebase to TypeScript and use the new @processContent decorator when I get the chance.
Just got a lot of projects on a the moment :( will get round to it as soon as I can!

No worries, just curious about the possible use of materializecss. Would also like to know if you have  select as a filter? I did see a previous ticket on this subject after Ii submitted. Have a nice weekend.
John
From: Charles Pockert [mailto:notifications@github.com]
Sent: Saturday, August 22, 2015 4:47 PM
To: CharlesPockert/aurelia-bs-grid
Cc: John R. Tomaselli
Subject: Re: [aurelia-bs-grid] Demo (#54)
Hi John, yeah I'm aware of this, there was a PR I merged to make it work with the new version of Aurelia but it turns out Rob did some work to get rid of one of the classes the compiler uses. I'm going to move the codebase to TypeScript and use the new @processContent decorator when I get the chance.
Just got a lot of projects on a the moment :( will get round to it as soon as I can!
—
Reply to this email directly or view it on GitHub https://github.com/CharlesPockert/aurelia-bs-grid/issues/54#issuecomment-133752815 . https://github.com/notifications/beacon/ABylgFMVXlY_B9nx8PHIP_tG4TlAt41Sks5oqNcugaJpZM4FwW3J.gif

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2015.0.6081 / Virus Database: 4401/10486 - Release Date: 08/22/15

Should be fixed now @johntom - just had to test to be sure, I'll close this issue unless you say otherwise :)

Hi,
I just re-installed the repo but get the following when loading in browser. No errors reported from gulp watch...
John
(index):23 GET http://localhost:9000/dist/app-bundle.html 404 (Not Found)
es6-module-loader.js:7 GET http://localhost:9000/dist/app-bundle.js 404 (Not Found)f @ es6-module-loader.js:7$__Object$defineProperty.value @ es6-module-loader.js:7c @ es6-module-loader.js:7b @ es6-module-loader.js:7$__Object$defineProperty.value @ es6-module-loader.js:7$__global.upgradeSystemLoader.e.fetch @ system.js:1$__global.upgradeSystemLoader.e.fetch @ system.js:1$__global.upgradeSystemLoader.e.fetch @ system.js:1(anonymous function) @ es6-module-loader.js:7O @ es6-module-loader.js:7K @ es6-module-loader.js:7h.7.y.when @ es6-module-loader.js:7h.7.v.run @ es6-module-loader.js:7h.3.a._drain @ es6-module-loader.js:7h.3.a.drain @ es6-module-loader.js:7b @ es6-module-loader.js:7
es6-module-loader.js:7 Potentially unhandled rejection [5] Error loading "github:aurelia/bootstrapper@0.16.0" at http://localhost:9000/jspm_packages/github/aurelia/bootstrapper@0.16.0.js
Error loading "app-bundle" at http://localhost:9000/dist/app-bundle.js
Not Found: http://localhost:9000/dist/app-bundle.js (WARNING: non-Error used)(anonymous function) @ es6-module-loader.js:7f @ es6-module-loader.js:7i @ es6-module-loader.js:7
browser-sync-client.1.9.2.js:2 GET http://localhost:9000/browser-sync/socket.io/?EIO=3&transport=polling&t=1441325362160-4 net::ERR_CONNECTION_REFUSEDu.16.Request.create @ browser-sync-client.1.9.2.js:2Request @ browser-sync-client.1.9.2.js:2u.16.XHR.request @ browser-sync-client.1.9.2.js:2u.16.XHR.doPoll @ browser-sync-client.1.9.2.js:2u.17.Polling.poll @ browser-sync-client.1.9.2.js:2u.17.Polling.doOpen @ browser-sync-client.1.9.2.js:2u.13.Transport.open @ browser-sync-client.1.9.2.js:1u.12.Socket.open @ browser-sync-client.1.9.2.js:1Socket @ browser-sync-client.1.9.2.js:1Socket @ browser-sync-client.1.9.2.js:1u.3.Manager.open.Manager.connect @ browser-sync-client.1.9.2.js:1(anonymous function) @ browser-sync-client.1.9.2.js:1
browser-sync-client.1.9.2.js:2 GET http://localhost:9000/browser-sync/socket.io/?EIO=3&transport=polling&t=1441325366166-5 net::ERR_CONNECTION_REFUSEDu.16.Request.create @ browser-sync-client.1.9.2.js:2Request @ browser-sync-client.1.9.2.js:2u.16.XHR.request @ browser-sync-client.1.9.2.js:2u.16.XHR.doPoll @ browser-sync-client.1.9.2.js:2u.17.Polling.poll @ browser-sync-client.1.9.2.js:2u.17.Polling.doOpen @ browser-sync-client.1.9.2.js:2u.13.Transport.open @ browser-sync-client.1.9.2.js:1u.12.Socket.open @ browser-sync-client.1.9.2.js:1Socket @ browser-sync-client.1.9.2.js:1Socket @ browser-sync-client.1.9.2.js:1u.3.Manager.open.Manager.connect @ browser-sync-client.1.9.2.js:1(anonymous function) @ browser-sync-client.1.9.2.js:1
browser-sync-client.1.9.2.js:2 GET http://localhost:9000/browser-sync/socket.io/?EIO=3&transport=polling&t=1441325371172-6 net::ERR_CONNECTION_REFUSEDu.16.Request.create @ browser-sync-client.1.9.2.js:2Request @ browser-sync-client.1.9.2.js:2u.16.XHR.request @ browser-sync-client.1.9.2.js:2u.16.XHR.doPoll @ browser-sync-client.1.9.2.js:2u.17.Polling.poll @ browser-sync-client.1.9.2.js:2u.17.Polling.doOpen @ browser-sync-client.1.9.2.js:2u.13.Transport.open @ browser-sync-client.1.9.2.js:1u.12.Socket.open @ browser-sync-client.1.9.2.js:1Socket @ browser-sync-client.1.9.2.js:1Socket @ browser-sync-client.1.9.2.js:1u.3.Manager.open.Manager.connect @ browser-sync-client.1.9.2.js:1(anonymous function) @ browser-sync-client.1.9.2.js:1

authors: CharlesPockert johntom

repo: CharlesPockert/aurelia-bs-grid

license: mit


text:
如何内置插件的应用程序令牌 （例如wolframalpha）

用docker-compose 部署，通过映射用自己的 plugins.json 覆盖
volumes:
- ./public:/app/public
目前只能内置不需要认证的插件，有没有办法内置令牌，从而让需要认证的插件也能跨设备使用

已经解决，是代理问题。
可以直接在plugin.json 里添加：
"authType":
"authLocation":
"authToken":

repo: ChatGPTNextWeb/NextChat-Awesome-Plugins


text:
不能通过群成员添加好友

const memberList = await room.memberList()
for (let i = 0; i < memberList.length; i++) {
  await bot.Friendship.add(member, 'Nice to meet you! I am wechaty bot!')
}

看到bot.Friendship.add方法是使用了searchContact函数，获取v1,v2进行好友添加。
但是获取的群成员的wxid是wxid_开头的都搜索不到好友，只有wxid非wxid_开头的才可以正常添加。
经过测试，多数成员的wxid虽然是wxid_开头，但是他们有微信号, 通过微信号使用searchContact就可以正常添加。不知道bot.Friendship.add时能不能获取微信号呢？

Yes, all contact begins with wxid_ cannot be added successfully, this is known.
In the future, we may add a function to get real wechat id. but not sure whether can be searched by searchContact
Please move this to https://github.com/lijiarui/wechaty-puppet-padchat because this is related to wechaty-puppet-padchat instead wechaty.

@bopro Do you have more question about this issue?

Close this issue due to long time no reply.

Web, PuppetPuppeteer,
bot.Friendship.add doesn't work.

lijiarui，你是女的吗？好美啊，可以认识下吗？

bot.Friendship.add doesn't work. And contact begins without wxid_.

authors: JarVZhao bopro cleverphp lijiarui zhouyu1993

repo: Chatie/wechaty


text:
Wechaty Version Numbering

Copy from Linux Kernel Version Numbering - http://www.linfo.org/kernel_version_numbering.html :

The second number denotes the major revision of the kernel version. It was formerly the case that even numbers indicated a stable release, that is, one that was deemed fit for production use (i.e., use in a non-experimental environment), such as 1.2, 2.4 or 2.6. Likewise, odd numbers, such as 1.1 or 2.5, have historically represented development releases. They were for testing new features and device drivers until they became sufficiently stable to be included in a stable release. However, this has changed starting with the Linux 2.6.x series, and new feature development now takes place in the same revision number.

Wechaty is following the Semantic Versioning 2.0 http://semver.org/, and will use the MINOR version to indicated the release is STABLE or NOT.
Numbering rule:

even numbers, such as 0.8, 0.12 indicated a stable release, which is fit for production use.
odd numbers, such as 0.11 or 0.13, represented as development releases.

Done. See: https://github.com/Chatie/wechaty/releases/tag/v0.12.0


text:
Update README.md

Closes #
Proposed Changes

Not relevant

Not relevant

repo: Checkmarx/kics


text:
fix: terraform/aws kinesis firehose ss3 rule issue #1858

When an encrypted Kinesis Data Stream is used as datasource to a Kinesis Firehose, then it can't and must not need to have sse enabled
cf AWS details: https://docs.aws.amazon.com/firehose/latest/dev/encryption.html
cf terraform details:
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/kinesis_firehose_delivery_stream
Closes #1858
Proposed Changes

Add policy check to allow server_side_encryption optionto be unset on aws_kinesis_firehose_delivery_stream when kinesis_source_configuration exists

@frediana We're looking into the PR to solve these issues regarding the CI failing. Once we have this fixed, we will review the PR. Thanks for contributing!

@frediana we have fixed our CI pipelines, can you please try to rebase your code to the updated master branch? Thanks!

@rogeriopeixotocx  Done, still CI still fails though...

@frediana yes the issue with sharing Sonarcloud token with forks is a known issue and therefore is not a required PR check, thank you for your contribution.

authors: frediana rogeriopeixotocx ruigomescx


text:
BUG: (Climate Wallet) Window does not close when reviewing the retirement details page

When performing any of the workflow actions in the wallet (send, retire, detokenize) - when the user enters details on the workflow screens, user cannot close the app without first cancelling the workflow.

From Brad: There appear to be some deep rooted issues with climate wallet's implementation of react, with a warning of a fairly basic misuse of react hooks showing up in the javascript console. It will be hard to diagnose and fix any other issues until this is resolved, which could take a few minutes to find and fix, or many hours of digging. I would suggest a time boxed investigation at solving the various errors that are showing up in the javascript console which may result in this issue being resolved or at the very least making it more clear what is going on. I would suggest starting with 2-4 hours and reevaluating.

repo: Chia-Network/Climate-Wallet


text:
WC notifications

refactored notifications
new offer provider
support for wallet connect notifications

@seeden The code-check failure is coming from a test failure in parseNotification.test.ts. Since parseNotification.ts is only used by NotificationsProviderOld.tsx, we can remove that file if you think that's best.

@seeden The code-check failure is coming from a test failure in parseNotification.test.ts. Since parseNotification.ts is only used by NotificationsProviderOld.tsx, we can remove that file if you think that's best.

I removed unused code and tests as well

authors: paninaro seeden

repo: Chia-Network/chia-blockchain-gui


text:
Optimizes SEO

This pr optimizes seo by making including the sitemap in the config for editability and updates the fee logic link to a permalink.
Additionally, some language has been updated in the docs to align with what the marketing/comms team is using.

To be cherry picked and resubmitted in a separate pr

repo: Chia-Network/chia-docs


text:
能不能把websocket模块提取出来

websocket模块是否能够提取出来，我的项目中需要自己打开websocket，然后处理每次接收到的数据后，才能得到真实的数据。

https://github.com/kinpol/singleWfsjs

websocket模块是否能够提取出来，我的项目中需要自己打开websocket，然后处理每次接收到的数据后，才能得到真实的数据。

当前的版本有些问题,我把编译好之前的版本放在目录下了.那个版本是ok的.https://github.com/kinpol/singleWfsjs/blob/master/wfs.js

我发现了一个新的repo jmuxer，感兴趣的小伙伴可以试一试

authors: chenchenwuai kinpol


text:
Optional fields js_after_vote

Перенесу обсуждение сюда, т.к. есть что обмыслить...
Идею с js_before_vote и js_afrter_vote я понял.
Но основной вопрос остается открытым - как тут перехватить сообщения
и вывести их в плагине (например - noty)
Загвоздка в том, что в зависимости от результата действия, должен выводится соответствующий тип сообщения

$message = "Ваш голос учтен";
$type = "success";

или

$message = "Вы не авторизированы";
$type = "error";

                <script type="text/javascript">
                    noty({
                        text: "' . $message . '",
                        type: "' . $type . '",
                        layout: "topRight",
                        timeout: 1500, // delay for closing event. Set false for sticky notifications
                        force: true
                    });
                </script>

У себя я решал через виджет, обрабатывающий Flash сессию
https://github.com/Chiliec/yii2-vote/issues/3#issuecomment-71834093

Действительно, про доступность результата я что-то не подумал... Но можно просто перенести js_after_vote (или создать ещё одно свойство) из события complete в событие success (после js_result), там будет доступна data.

На данном этапе в data нужны  message и type

Например, так:
    <?php echo \chiliec\vote\Display::widget([
        'model_name' => 'blog_post', // name of current model
        'target_id' => $model->id, // id of current element
        'js_after_vote' => "
            message = data.content;
            type = 'error';
            if(typeof(data.success)!=='undefined') { type = 'success'; }
            if(typeof(data.changed)!=='undefined') { type = 'information'; }
            noty({
                text: message,
                type: type,
                layout: 'topRight',
                timeout: 1500, // delay for closing event. Set false for sticky notifications
                force: true
            });
        ",
    ]); ?>

да. то что нужно !
сделал
'js_after_vote' => "voting (data)",

// а в своем js-файле написал соответсвующую функцию. Пока работает ).
Можно добавить в док, если что.

Изменил немного работу с событиями, теперь нужно писать
'js_show_message' => "voting (data)",

это перезапишет стандартное действие отображения сообщения.

authors: Chiliec loveorigami


text:
[question] How do I extend a base graph type

Hi
I have a situation where I would like to expose a clean graph for consumers (at /graphql) of my service and a bigger graph for my back-office system (at /private_graphql).
I am using the HotChocolate 10.1.0 package.
This is what I am trying to achieve
A shared base type for a User
User
  id
  name

A public version of User
User
  id (from base)
  name (from base)
  relationToMe (public only)

A private version of User
User
  id (from base)
  name (from base)
  forAdminEyesOnly (private only)

How do I do this? Is it even possible?
I have tried a bunch of different ways to achieve this, but have so far failed :(
I have tried using the .Extend() stuff, but I never seem to actually have anyting in the descriptor to work with.
I looked into using a Directive, but I failed to identify how to remove a field in the InvokeAsync implementation.
I am considering using stitching within my service, where I build a shared schema, a public schema and a private schema, and then serve a stiched schema with the shared and the public or private schema.
Also of note
I am using ServiceStack instead of AspNetCore MVC and building the schema using the following code:
var builder = SchemaBuilder
    .New()
    .AddServices(_container)
    .AddQueryType<TQuery>();

I am aware that this concept is being discussed in lots of different forums all over the internet and has been for years. I have already built other graphs where fields are simply nulled if the user does not have the proper permissions etc.
Please do not turn this question into a discussion of 1 vs n graphs. Thank you :)

Hi,
it is possible with extensions. You basically have to SchemaBuilder instances and add the extension types that are specific to a schema to the corresponding type.
var privateSchema = SchemaBuilder
    .New()
    .AddServices(_container)
    .AddQueryType<SharedQueryType>()
    .AddType<PrivateQueryTypeExtension>()
    .Build()

var publicSchema = SchemaBuilder
    .New()
    .AddServices(_container)
    .AddQueryType<SharedQueryType>()
    .AddType<PublicQueryTypeExtension>()
    .Build()

https://hotchocolate.io/docs/schema-object-type#extension
In the shared schema you can also use classes to import resolvers like the following:
public class PersonTypeExtension
    : ObjectTypeExtension
{
    protected override Configure(IObjectTypeDescriptor descriptor)
    {
        descriptor.Name("Person");
        descriptor.Field<FooClass>(t => t.Bar)
            .Type<NonNullType<StringType>>();
    }
}

It is important to know that the type is matched by its name. So, the type extension and its type has to have the same name.
This is also working with sdl-first approach, in the sdl-first approach you would do:
extend type Foo {
    custom: String
}

Please do not turn this question into a discussion of 1 vs n graphs. Thank you :)

We are not opinionated.
Does this help you?

I made a minimal-ish solution to show the full scope of everything: https://github.com/pingvinen/hotchocolate-issue-1120

Does this help you?

Yes. It pointed me in the right direction, but I think the documentation could use some examples like this. The current documentation on "extending types" does not contain any examples and pointed me in the direction of the descriptor.Name(..).Extend().On* methods. I used the debugger to look at the things available to me and everything was just empty.
I ended with something like this.
public class PrivateUserGraphTypeExtension : ObjectTypeExtension
{
  protected override void Configure(IObjectTypeDescriptor descriptor)
  {
    descriptor.Name(UserGraphType.GraphName);
    descriptor.Field<UserGqlOut>(t => t.ForAdminEyesOnly);
  }
}

...and...
schemaBuilder.AddType<PrivateUserGraphTypeExtension>();

Thank you very much for your extremely fast response @michaelstaib

Just as a side note:
https://github.com/pingvinen/hotchocolate-issue-1120/blob/e1f91d15a40cd3e9703bdd07cc7327b638f4e8a5/GraphStuff/Endpoint/GraphQlService.cs#L26
Building the schema is expensive ... so make sure that you store the schema somewhere and do not build it on every request.

descriptor.Name(..).Extend().On*

Extend() is meant for extensions like providing a entity framework extension or a paging extension etc.
I will add some more documentation.

Building the schema is expensive ... so make sure that you store the schema somewhere and do not build it on every request.

Thank you. This actual codebase is 2 days old at the moment, so it is still early days :)

authors: michaelstaib pingvinen

repo: ChilliCream/hotchocolate


text:
Filtering 2.0

Current Situation
We are currently working on the new extension API of filtering. The filter conventions will allow the user to extend the filters to their custom needs. This can either be a customer database provider or an extension to the existing API like spatial filtering.
While working on the extensions for spatial types, several issues came up. We realized that the current implementation of filtering has severe limitations in extensibility and also has an impact on the user experience of a consumer.
Issues 1: Inconsistent API design
The API  released with 10.X.X does not contain an object or array filters. The API works great for scalar filters.

A filter is always a bundle between filter kind (aka. what you want to filter) and a filter operation (aka. how to evaluate).
In the 11 previews we introduced object and array filters. Object filters look like this:

Array filters basically look like the object filters if they filter objects. If foo in the example above is a list, the filter looks like this:

So far so good. Everything looks consistent. The issue actually already came with the scalar filter: foo_contains. How would the API look like when we want to filter by the length of the string?

Inconsistency: This does not feel natural. We now have a field that represents two operations (or two properties, depending on how you want to put it)

alternatively we could also do something like this:

Inconsistency: With this approach we need a helper. “is” is not a property of length. We should just write “gt”. But this does not follow the pattern “kind_operation”. Look at Issue 2

Foo is a scalar but also an object. Length is a property of the string. So it should really be an object filter. If we treat foo like an object we suddenly have other issues.

Inconsistency: this would be the most natural approach. We want to filter by the operation gt of the property length of the filter foo. This obviously does not work. How would we express equality in this case? foo: “bar” does not longer exist.  Look at Issue 3

Conclusion:
With the current approach, it is not possible to write consistent APIs. The user has to learn the different syntax for different cases. What seems natural for one, might not feel natural for others. The developer or consumer should only really need to learn one style of filtering.
Issue 2: The need for helper properties
The inconsistency continues with scalar array filters. In the first place, this did not look like a hack. But we more and more realize that this was a mistake. In the example above we had a helper property for the distance filter: where: {foo_distance:{is_gt}}.
If foos is a list of strings the filter would look like this:

Conclusion:
Helper properties seem to occur too often. These helper properties seem only to exist because of bad API design in the first place.
Issue 3: Limitation in extensibility
The current implementation pretty much seals up property filters for an extension. We have already seen this issue with the scalar filters. We do face the same issue with the object and array filters as well.  How would the API design look like when we want to implement comparable on our object filters?
Spatial as an example:
The current API is not expressive enough. We have different valid API designs for spatial types but all of them have their very own issues:
The “shapes are scalars” approach:
{
  mapItems(
    where: {
      shape_area: { is_gt: 100 }
      shape_distance: { is_gt: 10, shape: { type: POINT, coordinates: [1, 1] } }
      shape_intersects: { shape: { type: POINT, coordinates: [1, 1] } }
      shape_length: { is_gt: 1000 }
      shape_within: { shape: { type: POINT, coordinates: [1, 1] } }
    }
  ) {
    shape {
      coordinates
    }
  }
}

Problems: Helper properties & shape is definitely more an object rather than a scalar
The “shapes are objects” approach:
{
  mapItems(
    where: {
       shape {
         area_gt: 100,
         distance: { is_gt: 10, shape: { type: POINT, coordinates: [1, 1] } }
         intersects: { shape: { type: POINT, coordinates: [1, 1] } }
         length_gt: 1000,
         within: { shape: { type: POINT, coordinates: [1, 1] } }
    }
  ) {
    shape {
      coordinates
    }
  }
}

Problems: Helper properties & how would you express shape equality?
The “lets mix both to see if the result is better” approach:
{
  mapItems(
    where: {
       shape_area_gt: 100,
       shape_distance: { is_gt: 10, shape: { type: POINT, coordinates: [1, 1] } }
       shape_intersects: { shape: { type: POINT, coordinates: [1, 1] } }
       shape_length_gt: 1000,
       shape_within: { shape: { type: POINT, coordinates: [1, 1] } }
    }
  ) {
    shape {
      coordinates
    }
  }
}

Problems: Helper properties & we got this weird kind_kind_operation / kind_operation_operation issue (e.g. shape_area_gt)

Proposed Solution
All of these issues could be solved with one additional layer of nesting.

This is also the solution that Hasura, PostGraphile, and Gatsby chose (we decided for the wrong one 🙃 )
With this approach object and array, filters can look the same to the end-user. A user does not have to consider anymore if it is kind_operation:1 or kind {helper_operation:1}. There is a nested object for each kind and each operation.

With this approach, there is also no need for helper fields.

With this approach, it is natural to have operation inside operations.
And last but not least, it is extendable.

Limitation: You can not have properties that are named like an operation

Spatial as an example:
The power of this design really becomes clear when you design an API. There are no longer different ways to design an API. There is only one:
{
  mapItems(
    where: {
       shape {
         area: {gt: 100}
         distance: { gt: 10, shape: { type: POINT, coordinates: [1, 1] } }
         intersects: { shape: { type: POINT, coordinates: [1, 1] }, buffer: 20 }
         length: {gt:1000}
         within: { shape: { type: POINT, coordinates: [1, 1] } }
    }
  ) {
    shape {
      coordinates
    }
  }
}

you could also let intersects and within directly consume a shape. But then you could not buffer. but this would impact extensibility ✨

Why we consider this change
We are working with filtering for over a year now. Filtering is one of the big features and we would like to push this feature further. We want to provide a seamless extension API for the user. At the moment different developers are working on extensions for spatial types, elastic search, MongoDB, and neo4j. There should be room for consideration about the initial API design because this is really the last time we can change something.
There are clear benefits to a different design. Apart from the ones listed above, there are also following to consider:
Understanding the Abstraction
One of the biggest benefits is the understanding of the abstraction. Looking at a combination of kind and operation (“kind_operation”, “foo_gt”) is mentally more challenging than having the operation separate from the kind. The additional complexity of “foo_gt” compared to “foo: {gt:12}” might not be clear when writing queries. But it really becomes challenging when writing extensions.
Visitation & Handlers
The visitor will become easier and the handlers make more sense. We already have filter kinds that do not follow the initial pattern. apart from “Array” there is also “ArrayAll”, “ArraySome” and “ArrayNone”. This really is bad and is already a hack that we use in v11.
A operation also needs a way to “enter” and “leave”.

Drawbacks

There will be significantly more types. (Field count stays more or less the same though.)
This cannot be released under HotChocolate.Types.Filters because this would break everything

How this could be released.
The title of this issue is filtering 2.0. As this would change the structure of all filters (including scalars deployed with 10.X.X), this would be a major breaking change. Furthermore, this would not break the backend, but it would also break all the consumers of filtering.
Just to make one thing clear:
Breaking the current implementation of filtering IS NOT AN OPTION and will not be considered
The only possible way to release a change like this is to copy the old implementation of filtering, deprecate it, and release a new package as an alternative.
This way people are not forced to upgrade to a new API with 11. Unfortunately, there is no “soft” migration path. These two filtering approaches cannot coexist on the same “where” argument.

Possible Next Steps:

We continue with the current implementation and work around all the issues listed above
We deprecate filtering and release a new package. The deprecated package would NOT include array and object filters. These have only been available in 11 previews
We deprecate filtering and release a new package. We release array and object filters with the old API as the last change

This is a very detailed description, thank you for putting it together.
I agree that v2 filters should not replace v1 in 11 as that would be far too disruptive for existing api clients. It would be great to see a lot of adoption of 11 since it is such a great improvement and doing that would be counter productive.
It will benefit everyone to make the API more consistent and while doing so more simple and extensible even if it takes more time and effort.
I vote for 2 as the next step. This would not cause code changes to filtering while upgrading to 11 and it would allow us to spend time on the required changes for v2.
We could punt object and array filters to the community for v1 filtering? Unless the finish line for those is close enough in the previews, then option 3 would not be out of the question.

I think I would prefer to freeze the V1 filters on the state of version 10.
Meaning we would have the V1 API with the feature set of V10. People have time to migrate or even use them in parallel. If people want more advanced filters, they have to move to version 2.
Why freeze them on the features of version 10?
I want to focus on our new approach and not waste any time fixing new issues that we might have introduced. The filters in version 10 are simple; this ultimately means they are simple to maintain.
Nevertheless, I would leave the code that we have in version 11 for filters in until we have the new API so that we give even people that are using the current preview bits time to migrate to the newer bits.
Good with the rehaul is that we can move all the APIs under one new package HotChocolate.Filters which will have all the code to integrate data sources like selections, filters, and sorting. On top of this base package, we can build extensions like the Mongo native integration or neo4j integration.

Also, with this change, we should fix our naming conventions. In GraphQL snail case is a good style for enums but not for field names. order_by should now, by default, become orderBy.

The only point I have (which might be moot) is how do you deal with OR? As far as I understand from this image:

this is foo: contains 'bar' AND .length gt 29, which I think is a fine default, but I also think being able to write OR filters somehow is worth considering (if it hasn't already).

@Alxandr
The OR support would be similar to what we already have in V10
There are two possible solutions I think
Solution 1
where : {
      or: [
         {
            foo: { lt: 2}
         },
         {
            foo: { lt: 3 }
         }]
}

Solution 2
where : {
      foo: {
        or: [
          {lt: 2 },
          {gt: 3 }
        ]
      }
}

What do you think?

I don't think you actually need or as a "property", given that GraphQL support type unions. You could do something like union Where = Filter | Filter[]

@Alxandr GraphQL does not. The union you posted is invalid. First GraphQL only supports output unions. second, you cannot create a union only on a set of object types.... so you cannot switch between single item an list of items. The or field is actually the only viable option.
Also even with the upcoming input union, this would not work.

@PascalSenn I would go for the first solution not the second ... the second adds complexity on implementation and user.

@PascalSenn, @michaelstaib, the new filtering approach looks solid and extensible enough. As long as it doesn't break existing filtering I do not foresee any problems with its adoption. Moreover, it seems that the filter generation on the client side will be much easier this way.

Personally, I'm not a big fan of such auto filters, because the idea of exposing dynamic filter engine to world via API is unsafe. But such a mechanism has the right to life for administration purposes (admin panel for example).
As for the proposed solution, it reminds me ElasticSearch filtering language. https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl.html. You can look at the documentation and get ideas from there.

@anadale  It would not break 10.4, it might break 11-previews. Adoption would be hard because they API changes when you decide to switch over :)
So yes it does not break the existing one, but to use new features (conventions and maybe list and object filters) , a switch is necessary

I like the proposed approach. However with regards to the OR, what I don't like is that both solution 1 and solution 2 (described above) are actually allowed by the syntax. So you get no errors if you do it like in the solution 2 but it will just have no effect. Do you guys plan to change this in scope of the new API design?

@vitmsrk
Do you mean?:
where : {
      foo: {
        or: {lt: 2 or: {gt: 3 }}
      }
}

@vitmsrk
Do you mean:
where : {
      foo: {
        or: {lt: 2 or: {gt: 3 }}
      }
}

@PascalSenn Yes. Maybe this also refers to AND. So it would be nice (if possible) to restrict such possibilities on syntax level. Although I understand this is easier to say than to do. It looks like in this case the OR/AND fields should be of different type than their parent.

And also, what does this mean:
where: {
  foo: { lt: 2 },
  or: [
    { foo: { lt: 1 } },
    { foo: { gt: 5 } }
  ]
}

@Alxandr How do you distinguish AND and OR then?

where: [
  // either
  { foo: 5, bar: true },
  // or
  { foo: { gt: 10 } }
]

@Alxandr  things get increasingly complicated with deeper filters
This:
where: {
  foo: { lt: 2 },
  or: [
    { foo: { lt: 1 } },
    { foo: { gt: 5 } }
  ]
}

would be .Where(x => (x.Foo  < 2) && (x.Foo <  || x.Foo > 5 ))
The good thing about this approach is that it's expressive and the API does not change when we go deep

API does not change when we go deep

Not sure what you mean here.
I would honestly expect the snipped above to result in an error, cause when using an "or" key, I would expect it to be completely exclusive. To me, it seems like a footgun.
Also, the point about making where an array is that you can't do or at any level of nesting. Only at the top. This makes things more verbose, sure, but it should also make things easier I would imagine.

I'm working on a similar filtering/conditional syntax for a thing.
I've been wondering if it's worth doing the actual filter statement in JSON... it has the benefit of being enforced by the JSON parser, but it quickly becomes very verbose and unwieldy to write complex statements.
Couldn't you do something like  JSONPath/XPath expressions, perhaps with extended syntax?
where:   "(x [Bar = true  and  Foo = 5]  or  x [Foo > 10]) or (x [someFunction()]"
Downside is that you have to make a separate expression parser for the filtering expressions, but it's much easier to author. I've seen standards, like XACML, where they go the route of having the expressions as actual XML/JSON tree's... and it's always seems to become a nightmare

@mhomde the issue with that is, that no GraphQL tooling wouldn't help you. The syntax would be parsable by our server and maybe our tooling, but any other tooling would just see it as a string. Also, it is not JSON :) there are distinct differences between JSON and GraphQL.
So, for us, we will use GraphQL and won't introduce any new syntax.

@mhomde the issue with that is, that no GraphQL tooling wouldn't help you. The syntax would be parsable by our server and maybe our tooling, but any other tooling would just see it as a string. Also, it is not JSON :) there are distinct differences between JSON and GraphQL.
So, for us, we will use GraphQL and won't introduce any new syntax.

Ah, that's a fair point  :)  Guess one could do some kind of expression tool anyway that converted between the two if one really wanted to

I think we can adopt the new approach which Hasura and postrGraphile has. I would go with number 3 as the possible next step

Kudos to you guys for taking the time to consider more advanced filtering scenarios out of the box.
I think the approach of introducing this a separate package would enable people to transition more easily and in an opt in fashion.
Now regarding the syntax, I propose we put this to a vote.
There are many alternatives to consider each with their pros and cons.
If anything we could consider prefixing operations like mongo does so it would be clear to the person writing the query what is what. ex.
{
  $and: [
        { $gte: [ count, 10 ] },
        { $lte: [ total, 100 ] }
      ]
 }

@fiakkasa that would not be valid GraphQL. http://spec.graphql.org/draft/#sec-Names
But with the filter-conventions, you can configure your name. You could, for instance, use an underscore as prefix _ which would be Hasura style. We will add two or three preconfigured conventions.

@michaelstaib prefixing operations with an underscore sounds like a great idea, plus it would make it easier for people coming from other GraphQL frameworks to use HotChocolate.
Now about the multiple preconfigured prefixes, we might be better off doing something similar to angular, where they offer a default set of tags, '{{' '}}', ex. {{ 'Interpolated Content' }}, and then it's up to the developer to configure whatever they want ex. StartTag  'Interpolated Content' EndTag (https://angular.io/api/core/Component#interpolation).
Wdyt?

Using some sort of convention like @fiakkasa is suggesting means we could remove the need to create any preconfigured conventions other than the one we planned to use. If it was as simple as the following adding a _ or $ before the field would be trivial.
ReadOnlySpan<char> FieldPrefix {}
ReadOnlySpan<char> FieldSuffix {}

You could combine the values to create the output field name. You would need a reverse lookup to get the real field name at projection time and you'd have to deal with computed properties or whatever they are called.
That is a neat idea and super flexible.

authors: Alxandr PascalSenn acelot anadale fiakkasa mhomde michaelstaib pmbanugo steveoh vitmsrk


text:
Separate schema and execution config

Right now the schema is also carry the execution config. For eg a schema is created as following:
var schema = Schema.Create(c =>{
    c.RegisterType(new QueryType());
    // TODO Register other types here

    // These configurations should be moved to another class for execution
    c.RegisterServiceProvider(new MyServiceProvider());
    c.Options.ExecutionTimeout = TimeSpan.FromSeconds(TIMEOUT);
    c.Options.DeveloperMode = DEVELOPMENT;
});

We should move the above config to another class, so the schema can be construct without the context (for eg ServiceProvider), and may be it can be stored statically as a singleton. Or we can modify the signature of Execute extension to take a service provider as a param.

The ISchema represents the executable schema. We might change the name an introduce something like a schema build from which the executable schema can be created. I have mot found an ideal solution but have targeted this under the label SchemaBuilder for version 0.11.0 in our roadmap.

The following options shall be moved:
int? MaxExecutionDepth { get; }
TimeSpan ExecutionTimeout { get; }
bool DeveloperMode { get; }

Do we still need developer mode. Since we now have the exception handler. The only thing developer mode does is writing fill exceptions into the query errors. We could instead add a developer error handler and let this guy do exactly that.

This one is now implemented with 0.7.0-preview.19

authors: michaelstaib namnm


text:
[Collection] New HTTP transport isues

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
I discovered some bugs when trying out the new HTTP transport. I'll list each problem I find as a separate comment.

[x] Validation errors produce wrong status code with Accept multipart/mixed
[x] Full deferred query result is returned for other request
[x] Deferred responses might not be correctly processed by the browser
[x] Full deferred query result is returned for other request
[x] Unsupported Accept header starting with application or multipart = 500

Steps to reproduce
Below.
Relevant log output
No response
Additional Context?
No response
Product
Hot Chocolate
Version
13.0.0-preview.48

No Accept Header + @defer leads to exception
Not specifying an Accept header when sending a request containing @defer in Chrome leads to HTTP 500 and the following exception:
System.InvalidOperationException: Invalid accept media types specified.
   at HotChocolate.AspNetCore.Serialization.DefaultHttpResponseFormatter.FormatAsync(HttpResponse response, IExecutionResult result, AcceptMediaType[] acceptMediaTypes, Nullable`1 proposedStatusCode, CancellationToken cancellationToken)
   at HotChocolate.AspNetCore.HttpPostMiddlewareBase.HandleRequestAsync(HttpContext context)
   at HotChocolate.AspNetCore.HttpPostMiddlewareBase.HandleRequestAsync(HttpContext context)
   at HotChocolate.AspNetCore.HttpPostMiddlewareBase.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.<>c__DisplayClass20_0.<<UseCancellation>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

HEADERS
=======
Accept: */*
Connection: keep-alive
Host: localhost:5000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Content-Type: application/json
Origin: http://127.0.0.1:5173
Referer: http://127.0.0.1:5173/
Content-Length: 125
sec-ch-ua: "Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty

The request is sent like this:
const body = JSON.stringify({
  query: `{
      field1
      ... @defer {
        field2
      }
    }
  `,
});

const response = await fetch("http://localhost:5000/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
  },
  body,
});

Validation errors produce wrong status code with Accept multipart/mixed
Sending an invalid GraphQL query in combination with the multipart/mixed Accept header yields a status code of 200, which should be 400 instead. For application/graphql-response+json 400 is correctly returned. For application/json 200 is also correctly returned.
Reproduction
// The closing } is deliberatly missing to cause validation error
const body = JSON.stringify({
  query: `{
      field1

  `,
});

const response = await fetch("http://localhost:5000/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Accept: "multipart/mixed",
  },
  body,
});

400 status code for validation error when Accept header is omitted
In this section the spec states:

Before 1st January 2025 (2025-01-01T00:00:00Z), if the client does not supply an Accept header, the server SHOULD treat the request as if it had Accept: application/json.

In this section the spec states that for Accept: application/json:

The server SHOULD use the 200 status code, independent of any GraphQL request error or GraphQL field error raised.

My understanding is that if no Accept header is specified the sever should respond with 200 for any GraphQL errors, including a validation error.
Reproduction
// The closing } is deliberatly missing to cause validation error
const body = JSON.stringify({
  query: `{
      field1

  `,
});

const response = await fetch("http://localhost:5000/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
    // The Accept header is omitted deliberately
  },
  body,
});

Deferred fields leak between requests if previous request throws exception
The following query
{
  field1
  ... @defer {
   field2
  }
}

can produce the following result

if a request before errored out with an exception.
Reproduction
First produce an exception as described here, by omitting the Accept header:
const body = JSON.stringify({
  query: `{
      field1
      ... @defer {
        field2
      }
    }
  `,
});

const response = await fetch("http://localhost:5000/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    // Accept: "multipart/mixed",
  },
  body,
});

Now just comment the Accept header back in and execute the request and you will see the duplicate defer messages.

Deferred responses might not be correctly processed by the browser
This could be an issue with the browser, meros or Hot Chocolate: I can't say with certainty yet.
Follow this GIST to setup a reproduction and observe how the GraphQL response sent by the server is handled as a single response.

Full deferred query result is returned for other request
Can't reproduce this reliably yet, but it happened twice already
I used the same server setup as I had in the GIST above and sent the same query with the deferred field
{
  field1
  ... @defer {
    field2
  }
}

I was playing around with different headers while sending the request. If you look at the server code you should see that field2 should take 5 seconds to compute, but I randomly had the case that the query succeeded immediately and it had the full response.
This makes me think that the response was incorrectly returned from some sort of "response cache" (which I don't think exists) or the response was "stuck" from a previously failed request. It could also be that the deferred tasks were still lingering and resolved immediately.
I sadly just returned constants from the fields, otherwise I might've been able to tell more clearly what has happened...

Unsupported Accept header starting with application or multipart = 500
No Accept header value or a value of this is not an accept header value is correctly treated as application/json.
A header like application/unsupported or multipart/unsupported will however yield a HTTP 500 with an exception (shown below).
The spec states:

In alignment with the HTTP 1.1 Accept specification, when a client does not include at least one supported media type in the Accept HTTP header, the server MUST either:
Disregard the Accept header and respond with the default media type of application/json, specifying this in the Content-Type header; OR
Respond with a 406 Not Acceptable status code and stop processing the request.

System.InvalidOperationException: Invalid accept media types specified.
   at HotChocolate.AspNetCore.Serialization.DefaultHttpResponseFormatter.FormatAsync(HttpResponse response, IExecutionResult result, AcceptMediaType[] acceptMediaTypes, Nullable`1 proposedStatusCode, CancellationToken cancellationToken)
   at HotChocolate.AspNetCore.HttpPostMiddlewareBase.HandleRequestAsync(HttpContext context)
   at HotChocolate.AspNetCore.HttpPostMiddlewareBase.HandleRequestAsync(HttpContext context)
   at HotChocolate.AspNetCore.HttpPostMiddlewareBase.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Builder.EndpointRouteBuilderExtensions.<>c__DisplayClass20_0.<<UseCancellation>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
   at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

HEADERS
=======
Accept: application/unsupported
Connection: keep-alive
Host: localhost:5000
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Content-Type: application/json
Origin: http://127.0.0.1:5173
Referer: http://127.0.0.1:5173/
Content-Length: 38
sec-ch-ua: "Google Chrome";v="105", "Not)A;Brand";v="8", "Chromium";v="105"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "Windows"
Sec-Fetch-Site: cross-site
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty

Reproduction
const body = JSON.stringify({
  query: `{
      field1
    }
  `,
});

const response = await fetch("http://localhost:5000/graphql", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Accept: "unsupported", // --> HTTP 200 with no exception
    // Accept: "application/unsupported", // --> HTTP 500 with exception
  },
  body,
});

We are opting for Respond with a 406 Not Acceptable status code and stop processing the request.
I will check what the issue is.

Thank you @tobias-tengler! We did not correctly fail on invalid headers ... I have implemented that now ... both cases work now.

I have just created https://github.com/graphql/graphql-over-http/issues/228 because I think it would make sense to have a shared collection of test cases that server maintainers can reference.

I am getting very skeptical on this. The spec allows a lot of variance. We for instance go for the 206 if we do not find any applicable accept header. Others could just return any response... they could choose the new one, multipart whatever :)
There are other issues I think that are really not good with the spec at the moment. Like, when handling BadRequests, I can do bad requests but I should not if legacy behavior is selected. The spec language is not precise enough on this at the moment.
Also, in our case above, where we send an invalid accept header in ... what is the expectation? is it legacy case or not since the request could really have occurred like this forever and worked. We handle it as 400 and switch to the GraphQL response type. But you could also deny that request much earlier.
I am at the moment collecting my issues with the spec text to have a more precise feedback.
In general I think it should be much stricter and predictable. And yes in essence we would need to have a small client or script that tests for compliance.
I have put our spec tests here:
https://github.com/ChilliCream/hotchocolate/blob/main/src/HotChocolate/AspNetCore/test/AspNetCore.Tests/GraphQLOverHttpSpecTests.cs
Another issue that we in particular have is that we have already a lot more transport features than what the spec covers and fitting that in is not so easy.

@tobias-tengler that does not mean its fruitless to attempt a common set of script. Its actually what everyone in the workgroup would like to have :)

@tobias-tengler apart from that ... I found the issue that we have at the moment with the multipart response.
The issue seems to be that with multipart we need to write the (CRLF, ---, CRLF) delimiter for the multipart reader to start reading the next section.
This is a bit problematic since we await on an async iterator which might not have another result. It gets even a bit more complex with the latest changes I need to incorporate in which case the response stream will change to a IAsyncEnumerable<IQueryResult|IQueryResult[]>.
Not sure how to model this in .NET yet.

OK, defer is now much better with the streams again ... we are still using the old payload ... thats the next thing I will start on tomorrow.
BTW ... this are the new responses:
{
  "incremental": [
    {
      "label": "homeWorldDefer",
      "path": ["person"],
      "data": { "homeWorld": { "name": "Tatooine" } }
    },
    {
      "label": "filmsStream",
      "path": ["person", "films", 1],
      "items": [{ "title": "The Empire Strikes Back" }]
    }
  ],
  "hasNext": true
}

@michaelstaib is it supposed to HTTP 400, if I send two supported Accept header values?
Accept: "application/graphql-response+json, mulitpart/mixed"

I want to signal to the server that I support both multipart and "regular" responses. If possible it should use "application/graphql-response+json" for regular queries and "multipart/mixed" only for deferred queries. Am I assuming something wrong?

Thats a bug that is fixed with preview 59

I think these have all been addressed, so I'm closing this.

authors: michaelstaib tobias-tengler


text:
SS0006 error when using StrawberryShake

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
I'm getting following error for each auto-generated client in VS2022:

Application builds and runs just fine, but error is always there. It doesn't show in which file, removing StrawberryShake.CodeGeneration.CSharp.Analyzers from the dependencies fixes the issue.
Steps to reproduce
Content of .graphqlrc.json:
  "schema": "schema.graphql",
  "documents": "**/*.graphql",
  "extensions": {
    "strawberryShake": {
      "name": "TestClient",
      "url": "http://localhost:5010/graphql",
      "dependencyInjection": true,
      "strictSchemaValidation": true,
      "hashAlgorithm": "md5",
      "useSingleFile": true,
      "requestStrategy": "Default",
      "outputDirectoryName": "Generated",
      "noStore": false,
      "emitGeneratedCode": true,
      "razorComponents": false,
      "records": {
        "inputs": false,
        "entities": false
      },
      "transportProfiles": [
        {
          "default": "Http",
          "subscription": "WebSocket"
        }
      ]
    }
  }
}```

### Relevant log output

_No response_

### Additional Context?

_No response_

### Product

Strawberry Shake

### Version

12.14.0

We have fixed these issues already in the newer version of StrawberryShake ...
Here is a video for getting started with Strawberry Shake in version 13 with Blazor:
https://www.youtube.com/watch?v=-oq7YEciouM
Or one to get started with Strawberry Shake in version 13 for server to server communication:
https://www.youtube.com/watch?v=I0ihOcBVu8c

authors: EvilVir michaelstaib


text:
Add PostAccountUpdateProfile

It is a pull request as only PostAccountUpdateProfile function at https://github.com/ChimeraCoder/anaconda/pull/138.

Thanks for the submission!

authors: ChimeraCoder cohalz

repo: ChimeraCoder/anaconda


text:
Update version in header.js

It can be very usefull to know the version of the lib by just looking at the header.

Oops. Thanks.

authors: ChiperSoft JelteF

repo: ChiperSoft/Kalendae


text:
[CU-86er1k715] Re-define the PR template to be more clear and simple

Target

Re-define the PR template to be more clear and simple.
Task ticket: CU-86er1k715

Effecting Scope

The PR template would be effected.

Description

Change the PR template to be more clear and simple.

Task linked: CU-86er1k715 [CI] Re-define the PR template to be more clear and simple


text:
IE11 detection is not working

Describe the bug
The library fails to detect that it is running on IE11.
To Reproduce
The check of running on IE11 is as follows:
const IS_IE11 =  '-ms-scroll-limit' in document.documentElement.style &&  '-ms-ime-align' in document.documentElement.style;
Test the first half of the condition in IE11's console:
'-ms-scroll-limit' in document.documentElement.style
returns false
'msScrollLimit' in document.documentElement.style
returns true
(similar for the other half of the condition: -ms-ime-align)
Expected behavior
Detect IE11 more reliably
Desktop (please complete the following information):

OS: Windows 7
Browser IE 11.0.170
Version 11.0.9600.19596CO

You can give v9.1.0 a try, a couple of IE11-related bug fixes were included.
Microsoft has announced that IE11 will be retired mid-2022. IE11 also now has well under 1% of browser usage. I don't plan to devote time to troubleshooting and resolving IE11-related issues.
Reasonable PRs will be accepted.

authors: mtriff nmutsanas

repo: Choices-js/Choices


text:
Possible incompatibility with sprintf

Hello! Thank you for your excellent library!
I slightly modified your example to highlight this strange behaviour:
sprintf( tmpString, "foo.a=%02d" , foo.a ); prints 26350 instead of 45
meanwhile
sprintf( tmpString, "foo.a=%02d" , uint8_t(foo.a) ); works well
=============================================
#include <EEPROM.h>
#include <EEWrap.h>
//Use the xxx_e types rather than the standard types like uint8_t
struct Foo{
uint8_e a;
int16_e b;
float_e c;
};
Foo foo EEMEM; //EEMEM tells the compiler that the object resides in the EEPROM
void setup(){
//Write to values stored in EEPROM
foo.a = 45;
foo.b = 12345;
foo.c = 3.1415;
//Print values from EEPROM
Serial.begin(9600);
Serial.println(foo.a);
Serial.println(foo.b);
Serial.println(foo.c);
char tmpString[20] = {0};
sprintf( tmpString, "foo.a=%02d" , foo.a );
Serial.println( tmpString ); // it prints " foo.a=26350 "
}
void loop() {}

Just do a cast to the variable, like this:
sprintf( tmpString, "foo.a=%02d" , (uint8_t) foo.a );

authors: AlexanderKokushkin txroot

repo: Chris--A/EEWrap


text:
🛑 Vaultwarden is down

In 0c7a62e, Vaultwarden (https://vaultwarden.underthere.xyz) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Vaultwarden is back up in 176dddd after .

repo: ChrisMoriarty/upptime


text:
MicroWin: Cannot use Windows 11 Pro SKU

Describe the bug
Choosing Windows 11 Pro in MicroWin always results in this error.
To Reproduce
Steps to reproduce the behavior:

Launch Powershell via Windows Terminal as Admin on Windows 11 23H2
Use irm command to launch winutil 23.11.28
Click MicroWin
Select Windows 11 23H2 iso, which is placed in C:\
After the initial processing, pick Windows 11 Pro SKU
The following error occurs

====Chris Titus Tech=====                                                                                =====Windows Toolbox=====
Checking if Chocolatey is Installed...
Chocolatey Already Installed
File already exists at: C:\Users\user\AppData\Local\Temp\cttlogo.png
Invoking WPFGetIso
         _                     __    __  _
  /\/\  (_)  ___  _ __   ___  / / /\ \ \(_) _ __
 /    \ | | / __|| '__| / _ \ \ \/  \/ /| || '_ \
/ /\/\ \| || (__ | |   | (_) | \  /\  / | || | | |
\/    \/|_| \___||_|    \___/   \/  \/  |_||_| |_|
oscdimge.exe on system: True
File path C:\Win11_23H2_English_x64.iso
Mounting Iso. Please wait.
Done mounting Iso MSFT_DiskImage (ImagePath = "C:\Win11_23H2_English_x64.iso", StorageType = 1)
Iso mounted to 'D'
Setting up mount dir and scratch dirs
Done setting up mount dir and scratch dirs
Copying Windows image. This will take awhile, please don't use UI or cancel this step!
Copy 1031(s) from D: to c:\microwin
Copy complete! Total Time: 0m20s
Getting image information c:\microwin\sources\install.wim
Selected value '1 : Windows 11 Home'.....
Done reading and unpacking ISO

*********************************
Check the UI for further steps!!!
Index chosen: '6' from 6 : Windows 11 Pro
Mounting Windows image. This may take a while.
Mounting complete! Performing removal of applications...
Remove Features from the image
Removing features complete!
Removing Appx Bloat
Invoke-WPFMicrowin : An unexpected error occurred: The specified image is invalid.
Unmount the image or clean up the Wim and then try again.
At line:1940 char:24
+         "WPFMicrowin" {Invoke-WPFMicrowin}
+                        ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Invoke-WPFMicrowin

Unmounting Registry...
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
Cleaning up image...
Cleanup complete.
Unmounting image...
Exporting image into c:\microwin\sources\install2.wim
Remove old 'c:\microwin\sources\install.wim' and rename c:\microwin\sources\install2.wim
Windows image completed. Continuing with boot.wim.
Mounting boot image c:\microwin\sources\boot.wim into c:\microwinscratch
Loading registry...
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
ERROR: The system was unable to find the specified registry key or value.
Bypassing system requirements on the setup image
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
Unmounting Registry...
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
ERROR: The parameter is incorrect.
Unmounting image...
Creating ISO image

OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2012. All rights reserved.
Licensed only for producing Microsoft authorized content.

Scanning source tree (500 files in 43 directories)
Scanning source tree complete (946 files in 86 directories)

Computing directory information complete

Image file is 6210781184 bytes (before optimization)

Writing 946 files in 86 directories to C:\Users\user\AppData\Local\Temp\microwin.iso

100% complete

Storage optimization saved 4 files, 24576 bytes (0% of image)

After optimization, image file is 6212876288 bytes
Space saved because of embedding, sparseness or optimization = 24576

Done.
 _____
(____ \
 _   \ \ ___  ____   ____
| |   | / _ \|  _ \ / _  )
| |__/ / |_| | | | ( (/ /
|_____/ \___/|_| |_|\____)
ISO creation failed. The  c:\microwin  directory has not been removed.

Note I've also deleted the C:\microwin and C:\microwinscratch folders completely each attempt, though I had to use linux to delete these folders for some reason, despite being admin.
Additionally, in the logs it mentions Windows 11 Home for some reason during ISO read.
Expected behavior
MicroWin should be able to succeed with Windows 11 Pro SKU

Try it again I was able to create ISO Successfully Just Make sure u backup your drivers cause sometimes u will experience that issue with no hard drive

@dreamsyntax Grab Your ISO from Rufus 4.3 https://github.com/pbatard/rufus/releases/download/v4.3/rufus-4.3.exe
And Restest
As you can see here it works perfectly with no issues  Ran in terminal as admin on Windows 11 23h2
see screenshots

Can you post the SHA1 of your ISO? The filesize seems the same.
Can you also try the feature flags all disabled? (edge, defender, etc)

SHA1

Get-FileHash "C:\Win11_23H2_English_x64.iso" -Algorithm SHA1 | Format-List
Algorithm : SHA1
Hash      : 9D18F7814564421381C94E13C09A9C427BAF8018
Path      : C:\Win11_23H2_English_x64.iso

Check the UI for further steps!!!
Index chosen: '6' from 6 : Windows 11 Pro
Mounting Windows image. This may take a while.
Mounting complete! Performing removal of applications...
Remove Features from the image
Removing features complete!
Removing Appx Bloat
Removing Defender
Removing Edge
Removal complete!
Create unattend.xml
Done Create unattend.xml
Copy unattend.xml file into the ISO
Done Copy unattend.xml
Create FirstRun
Done create FirstRun
Copy FirstRun.ps1 into the ISO
Done copy FirstRun.ps1
Copy link to winutil.ps1 into the ISO
ICO file created at: C:\Users\DHL\AppData\Local\Temp\cttlogo.ico
Shortcut to winutil created at: c:\microwinscratch\Windows\Users\Default\Desktop\WinUtil.lnk
Copy checkinstall.cmd into the ISO
Done copy checkinstall.cmd
Creating a directory that allows to bypass Wifi setup
Loading registry
Disabling Teams
Done disabling Teams
Bypassing system requirements (system image)
Removing Edge icon from taskbar
Edge icon removed from taskbar
Setting all services to start manually
Enabling Local Accounts on OOBE
Disabling Sponsored Apps
Done removing Sponsored Apps
Disabling Reserved Storage
Changing theme to dark. This only works on Activated Windows
Unmounting Registry...
Cleaning up image...
Cleanup complete.
Unmounting image...
Exporting image into c:\microwin\sources\install2.wim
Remove old 'c:\microwin\sources\install.wim' and rename c:\microwin\sources\install2.wim
Windows image completed. Continuing with boot.wim.
Mounting boot image c:\microwin\sources\boot.wim into c:\microwinscratch
Loading registry...
Bypassing system requirements on the setup image
Unmounting Registry...
Unmounting image...
Creating ISO image
OSCDIMG 2.56 CD-ROM and DVD-ROM Premastering Utility
Copyright (C) Microsoft, 1993-2012. All rights reserved.
Licensed only for producing Microsoft authorized content.
Scanning source tree (500 files in 43 directories)
Scanning source tree complete (946 files in 86 directories)
Computing directory information complete
Image file is 5698584576 bytes (before optimization)
Writing 946 files in 86 directories to C:\Users\DHL\AppData\Local\Temp\microwin.iso
100% complete
Storage optimization saved 4 files, 24576 bytes (0% of image)
After optimization, image file is 5700669440 bytes
Space saved because of embedding, sparseness or optimization = 24576
Done.

(____
_   \ \ ___  ____   ____
| |   | / _ |  _ \ / _  )
| |/ / |_| | | | ( (/ /
|/ _/|| ||___)
Done. ISO image is located here: C:\Users\DHL\AppData\Local\Temp\microwin.iso
Performing Cleanup

And Again A Successful MicroWin.iso
So The Issue Is on your PC or ISO u are using

@dreamsyntax I would suggest try it on a vm on ur latpop
Because that is strange as it should work with no issues even with those settings applied I tested it out and still successful

@dreamsyntax Glad it worked for you and yes no update is needed but it’s good to have
and Thank U I’ll keep that in Mind

I've just had the same issue.

authors: KALIXHOSTING dreamsyntax simonboet

repo: ChrisTitusTech/winutil


text:
Purging applications

Removed the following applications that I think are bloating the app list:
WinDirStat - WinDirStat is outdated. WizTree should be used instead
BitComet - BitComet is adware and has a history of unethical practices. VirusTotal, I don't know if these are false positives or not but there are so many better options
BlueStacks - BlueStack 5's installation process forcibly install BlueStacks X and a crypto wallet alongside it
Additionally I have removed a duplicate entry of Ditto and changed the link on the entry remaining

Thanks for helping prune the old packages @Owen-3456


text:
请问最近搜狗返回的Html内容是改了吗？最近抓内容出错。

Traceback (most recent call last):
File "wechat_crawling.py", line 98, in
messages = wechat_api.get_gzh_message(wechatid=wid)
File "./sogouapi/wechatsogou\api.py", line 203, in get_gzh_message
gzh_info = self.get_gzh_info(wechatid)
File "./sogouapi/wechatsogou\api.py", line 111, in get_gzh_info
info = self.search_gzh_info(wechatid, 1)
File "./sogouapi/wechatsogou\api.py", line 67, in search_gzh_info
wechatid.append(cache_re[1])
IndexError: list index out of range
===============分割线==========================
如上是错误内容。我看了一下，api.py的search_gzh_info开始试图获取内容，其中
cache_re = re.split(u'微信号：|功能介绍：|认证：|最近文章：', cache_list[0])
这边拿到的split内容最后的结果（包括一开始的cache变量读到的内容）只有如下这样：
“安信电力设备新能源微信号:anxin_new_energy月发文1篇    平均阅读88”
不知道是什么原因导致的。。。求看看！谢谢

@william2177 你更新下，已经修复了

这个问题解决了，但是出现了类似的如下错误：
Traceback (most recent call last):
File "wechat_crawling.py", line 98, in
messages = wechat_api.get_gzh_message(wechatid=wid)
File "./WechatSogou/wechatsogou\api.py", line 188, in get_gzh_message
gzh_info = self.get_gzh_info(wechatid)
File "./WechatSogou/wechatsogou\api.py", line 96, in get_gzh_info
info = self.search_gzh_info(wechatid, 1)
File "./WechatSogou/wechatsogou\api.py", line 74, in search_gzh_info
'renzhen': renzhen[0]
IndexError: list index out of range

@william2177 已修复

repo: Chyroc/WechatSogou


text:
Review

Sviluppo

[x] server
[ ] client

Ho sviluppato

Invio messaggi e salvataggio su Firebase;

Devo ancora sviluppare

Chat di gruppo;
Invio e ricezione messaggi in tempo reale;

Problemi incontrati

Cerca di ultimare quanto prima il lavoro perchè abbiamo bisogno di risorse sulle altre gestioni

repo: CiccioTecchio/SharErasmus


text:
🛑 Claims is down

In dcd2132, Claims ($SITE_A) was down:

HTTP code: 403
Response time: 58 ms

Resolved: Claims is back up in b77eb30.

repo: Ciffone-Digital/lmp-upptime-monitor


text:
Adding border to text box

Is your feature request related to a problem? Please describe.
Yes , this would enhance the visibility of the text box
Describe the solution you'd like
This can be done by adding a border to the text boxes.
Additional context
before :

after:

Are you working on this? (Yes/No)
Yes, I am working on this issue. I will send a pr soon

Is this issue still open, can I work on it.

I have already opened a pull request

@Shilpashreemr can I work on this issue if it is still open ?

authors: Shilpashreemr me-aashish metakunal

repo: CircuitVerse/CircuitVerse


text:
New Feature buzzer

Fixes #
Describe the changes you have made in this PR -
Created a new feature of buzzer -
Inputs are frequency of the sound , duration upto which sound is played , and a play button .
eg . input of 426 as frequency and 2 as duration and 1 as play will produce a C chord(426 Hz) for 2sec if play input is 1.
In properties its volume can be adjusted .
Also whether we want that frequency (eg. C chord) to be sharp or flat (i.e. C# or C') can be controlled by a checkbox .
Screenshots of the changes (If any) -

Note: Please check Allow edits from maintainers. if you would like us to assist in the PR.

Coverage remained the same at 84.66% when pulling 0cff936ff228f0b0fc5d88e785ba7c46ca8416ee on mayank-kabra2001:new-feature-buzzer into 129182c0f422c9482abe149f730e03292ec1a7ef on CircuitVerse:master.

This PR still needs work. A bunch of bugs with this one

Closing due to inactivity, feel free to re-open once the issues are addressed