[Bug]: Error using Azure opeani

Bug Description
When I use azure openai, index = GPTVectorStoreIndex.from_documents(documents) always returns with "INFO:openai:error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False"
I guess it's because the engine parameter for azure openai is not set properly.
import logging
import sys
import requests
import openai
import os
API_KEY = os.getenv("AZURE_OPENAI_API_KEY")
RESOURCE_ENDPOINT = os.getenv("AZURE_OPENAI_APIBASE")
openai.api_type = "azure"
openai.api_key = API_KEY
openai.api_base = RESOURCE_ENDPOINT
openai.api_version = "2022-12-01"
openai.Engine = "td3"
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
from llama_index import GPTVectorStoreIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader('data').load_data()
index = GPTVectorStoreIndex.from_documents(documents)
Version
0.6.10.post1
Steps to Reproduce
import logging
import sys
import requests
import openai
import os
API_KEY = os.getenv("AZURE_OPENAI_API_KEY")
RESOURCE_ENDPOINT = os.getenv("AZURE_OPENAI_APIBASE")
openai.api_type = "azure"
openai.api_key = API_KEY
openai.api_base = RESOURCE_ENDPOINT
openai.api_version = "2022-12-01"
openai.Engine = "td3"
logging.basicConfig(stream=sys.stdout, level=logging.INFO)
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout))
from llama_index import GPTVectorStoreIndex, SimpleDirectoryReader
documents = SimpleDirectoryReader('data').load_data()
index = GPTVectorStoreIndex.from_documents(documents)
Relevant Logs/Tracbacks
INFO:openai:error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
INFO:openai:error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
INFO:openai:error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
INFO:openai:error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
INFO:openai:error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
INFO:openai:error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
error_code=OperationNotSupported error_message='The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.' error_param=None error_type=None message='OpenAI API error received' stream_error=False
---------------------------------------------------------------------------
InvalidRequestError                       Traceback (most recent call last)
File ~\miniconda3\envs\py310\lib\site-packages\tenacity\__init__.py:382, in Retrying.__call__(self, fn, *args, **kwargs)
    381 try:
--> 382     result = fn(*args, **kwargs)
    383 except BaseException:  # noqa: B902

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\embeddings\openai.py:150, in get_embeddings(list_of_text, engine, **kwargs)
    148 list_of_text = [text.replace("\n", " ") for text in list_of_text]
--> 150 data = openai.Embedding.create(input=list_of_text, model=engine, **kwargs).data
    151 return [d["embedding"] for d in data]

File ~\miniconda3\envs\py310\lib\site-packages\openai\api_resources\embedding.py:33, in Embedding.create(cls, *args, **kwargs)
     32 try:
---> 33     response = super().create(*args, **kwargs)
     35     # If a user specifies base64, we'll just return the encoded string.
     36     # This is only for the default case.

File ~\miniconda3\envs\py310\lib\site-packages\openai\api_resources\abstract\engine_api_resource.py:155, in EngineAPIResource.create(cls, api_key, api_base, api_type, request_id, api_version, organization, **params)
    140 (
    141     deployment_id,
    142     engine,
   (...)
    152     api_key, api_base, api_type, api_version, organization, **params
    153 )
--> 155 response, _, api_key = requestor.request(
    156     "post",
    157     url,
    158     params=params,
    159     headers=headers,
    160     stream=stream,
    161     request_id=request_id,
    162     request_timeout=request_timeout,
    163 )
    165 if stream:
    166     # must be an iterator

File ~\miniconda3\envs\py310\lib\site-packages\openai\api_requestor.py:226, in APIRequestor.request(self, method, url, params, headers, files, stream, request_id, request_timeout)
    216 result = self.request_raw(
    217     method.lower(),
    218     url,
   (...)
    224     request_timeout=request_timeout,
    225 )
--> 226 resp, got_stream = self._interpret_response(result, stream)
    227 return resp, got_stream, self.api_key

File ~\miniconda3\envs\py310\lib\site-packages\openai\api_requestor.py:619, in APIRequestor._interpret_response(self, result, stream)
    617 else:
    618     return (
--> 619         self._interpret_response_line(
    620             result.content.decode("utf-8"),
    621             result.status_code,
    622             result.headers,
    623             stream=False,
    624         ),
    625         False,
    626     )

File ~\miniconda3\envs\py310\lib\site-packages\openai\api_requestor.py:682, in APIRequestor._interpret_response_line(self, rbody, rcode, rheaders, stream)
    681 if stream_error or not 200 <= rcode < 300:
--> 682     raise self.handle_error_response(
    683         rbody, rcode, resp.data, rheaders, stream_error=stream_error
    684     )
    685 return resp

InvalidRequestError: The embeddings operation does not work with the specified model, gpt-35-turbo. Please choose different model and try again. You can learn more about which models can be used with each operation here: https://go.microsoft.com/fwlink/?linkid=2197993.

The above exception was the direct cause of the following exception:

RetryError                                Traceback (most recent call last)
Cell In[12], line 26
     22 from llama_index import GPTVectorStoreIndex, SimpleDirectoryReader
     24 documents = SimpleDirectoryReader('data').load_data()
---> 26 index = GPTVectorStoreIndex.from_documents(documents)

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\indices\base.py:93, in BaseGPTIndex.from_documents(cls, documents, storage_context, service_context, **kwargs)
     89     docstore.set_document_hash(doc.get_doc_id(), doc.get_doc_hash())
     91 nodes = service_context.node_parser.get_nodes_from_documents(documents)
---> 93 return cls(
     94     nodes=nodes,
     95     storage_context=storage_context,
     96     service_context=service_context,
     97     **kwargs,
     98 )

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\indices\vector_store\base.py:44, in GPTVectorStoreIndex.__init__(self, nodes, index_struct, service_context, storage_context, use_async, store_nodes_override, **kwargs)
     42 self._use_async = use_async
     43 self._store_nodes_override = store_nodes_override
---> 44 super().__init__(
     45     nodes=nodes,
     46     index_struct=index_struct,
     47     service_context=service_context,
     48     storage_context=storage_context,
     49     **kwargs,
     50 )

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\indices\base.py:65, in BaseGPTIndex.__init__(self, nodes, index_struct, storage_context, service_context, **kwargs)
     63 if index_struct is None:
     64     assert nodes is not None
---> 65     index_struct = self.build_index_from_nodes(nodes)
     66 self._index_struct = index_struct
     67 self._storage_context.index_store.add_index_struct(self._index_struct)

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\token_counter\token_counter.py:78, in llm_token_counter.<locals>.wrap.<locals>.wrapped_llm_predict(_self, *args, **kwargs)
     76 def wrapped_llm_predict(_self: Any, *args: Any, **kwargs: Any) -> Any:
     77     with wrapper_logic(_self):
---> 78         f_return_val = f(_self, *args, **kwargs)
     80     return f_return_val

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\indices\vector_store\base.py:203, in GPTVectorStoreIndex.build_index_from_nodes(self, nodes)
    195 @llm_token_counter("build_index_from_nodes")
    196 def build_index_from_nodes(self, nodes: Sequence[Node]) -> IndexDict:
    197     """Build the index from nodes.
    198
    199     NOTE: Overrides BaseGPTIndex.build_index_from_nodes.
    200         GPTVectorStoreIndex only stores nodes in document store
    201         if vector store does not store text
    202     """
--> 203     return self._build_index_from_nodes(nodes)

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\indices\vector_store\base.py:192, in GPTVectorStoreIndex._build_index_from_nodes(self, nodes)
    190     run_async_tasks(tasks)
    191 else:
--> 192     self._add_nodes_to_index(index_struct, nodes)
    193 return index_struct

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\indices\vector_store\base.py:168, in GPTVectorStoreIndex._add_nodes_to_index(self, index_struct, nodes)
    165 if not nodes:
    166     return
--> 168 embedding_results = self._get_node_embedding_results(nodes)
    169 new_ids = self._vector_store.add(embedding_results)
    171 if not self._vector_store.stores_text or self._store_nodes_override:
    172     # NOTE: if the vector store doesn't store text,
    173     # we need to add the nodes to the index struct and document store

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\indices\vector_store\base.py:87, in GPTVectorStoreIndex._get_node_embedding_results(self, nodes)
     81         id_to_embed_map[n.get_doc_id()] = n.embedding
     83 # call embedding model to get embeddings
     84 (
     85     result_ids,
     86     result_embeddings,
---> 87 ) = self._service_context.embed_model.get_queued_text_embeddings()
     88 for new_id, text_embedding in zip(result_ids, result_embeddings):
     89     id_to_embed_map[new_id] = text_embedding

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\embeddings\base.py:167, in BaseEmbedding.get_queued_text_embeddings(self)
    165 cur_batch_ids = [text_id for text_id, _ in cur_batch]
    166 cur_batch_texts = [text for _, text in cur_batch]
--> 167 embeddings = self._get_text_embeddings(cur_batch_texts)
    168 result_ids.extend(cur_batch_ids)
    169 result_embeddings.extend(embeddings)

File ~\miniconda3\envs\py310\lib\site-packages\llama_index\embeddings\openai.py:267, in OpenAIEmbedding._get_text_embeddings(self, texts)
    260 def _get_text_embeddings(self, texts: List[str]) -> List[List[float]]:
    261     """Get text embeddings.
    262
    263     By default, this is a wrapper around _get_text_embedding.
    264     Can be overriden for batch queries.
    265
    266     """
--> 267     return get_embeddings(
    268         texts,
    269         engine=self.text_engine,
    270         deployment_id=self.deployment_name,
    271         **self.openai_kwargs,
    272     )

File ~\miniconda3\envs\py310\lib\site-packages\tenacity\__init__.py:289, in BaseRetrying.wraps.<locals>.wrapped_f(*args, **kw)
    287 @functools.wraps(f)
    288 def wrapped_f(*args: t.Any, **kw: t.Any) -> t.Any:
--> 289     return self(f, *args, **kw)

File ~\miniconda3\envs\py310\lib\site-packages\tenacity\__init__.py:379, in Retrying.__call__(self, fn, *args, **kwargs)
    377 retry_state = RetryCallState(retry_object=self, fn=fn, args=args, kwargs=kwargs)
    378 while True:
--> 379     do = self.iter(retry_state=retry_state)
    380     if isinstance(do, DoAttempt):
    381         try:

File ~\miniconda3\envs\py310\lib\site-packages\tenacity\__init__.py:326, in BaseRetrying.iter(self, retry_state)
    324     if self.reraise:
    325         raise retry_exc.reraise()
--> 326     raise retry_exc from fut.exception()
    328 if self.wait:
    329     sleep = self.wait(retry_state)

RetryError: RetryError[<Future at 0x21376f0b2e0 state=finished raised InvalidRequestError>]

I am facing the same issue. Any workaround or solution for this?

Looks like you are using incorrect model. See azure document, you need to deploy one of these models: https://learn.microsoft.com/en-us/azure/cognitive-services/openai/concepts/models#embeddings-models

Does this guide help? https://gpt-index.readthedocs.io/en/latest/examples/customization/llms/AzureOpenAI.html

Going to close this issue, the link @Disiok shared should help


87 feature request automatic reduction of batch size

This PR introduces:

In case of OOM or RuntimeError during model inference the batch_size is halved to the next 2^n.
A minor refactor of _evaluate_single_iteration as flake was complaining about to high complexity.

Closing due to inactivity. Feel free to re-open.


Add kwargs to NamedTermManager.new_named_terminal

Hi, I am trying to fix this issue jupyterlab/jupyterlab#1366 in jupyterlab so that terminals open in the current working directory.
In order to do this, we need to be able to pass key word arguments to the new_terminal call in new_named_terminal so that the jupyter server can create terminals with different working directories.
https://github.com/jupyter/terminado/blob/b0b32f3efdde4252466f4e57b98773d9e86951ec/terminado/management.py#L317-L324

Thanks!  I tracked down the build failure to an implicit reliance on Ubuntu 14.04 in our tests.  Can you please add dist: trusty to the top of .travis.yml to get us un-stuck?

@blink1073 thanks for the help! the build seems all good now

LGTM, thanks!

@blink1073 is there a process for getting the version number bumped so that this can go into jupyter?

Already done!  Released as 0.8.3.

ty!


text-2-sql-agent

Agent was not able to answer correctly the question : "In what year did Hank Aaron hit the most home runs?"
Trace : "The query failed, so the batting table does not exist or does not contain home run data. Looking at the schema again, there is no batting table. I will try querying the player table instead which contains basic player information."
So the agent answer : "Based on the available data, Hank Aaron was born in the year 1934. The SQL query used was: SELECT p.name_first, p.name_last, p.birth_year AS yearid, 0 AS hr FROM player p WHERE p.name_first = 'Hank' AND p.name_last = 'Aaron' ORDER BY yearid DESC LIMIT 1;"
Root cause : the provided TheHistoryofBaseball.zip contains :

hall_of_fame.csv, player.csv,
player_award_csv,
salary.csv
but it seems that batting table is missing.

the build_infrastructure.py is generating the following error:
TheHistoryOfBaseball
Traceback (most recent call last):
File "/root/amazon-bedrock-samples/agents-for-bedrock/use-case-examples/text-2-sql-agent/./dependencies/build_infrastructure.py", line 11, in
s3bucket = s3_client.create_bucket(
File "/opt/conda/lib/python3.10/site-packages/botocore/client.py", line 565, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/opt/conda/lib/python3.10/site-packages/botocore/client.py", line 1017, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (IllegalLocationConstraintException) when calling the CreateBucket operation: The unspecified location constraint is incompatible for the region specific endpoint this request was sent to.
This workshop was deployed on the us-west-2 region


feat(v2): headings anchors

Motivation
An option to quickly copy a section link is essential!
Have you read the Contributing Guidelines on pull requests?
Yes.
Test Plan
Check if headings have # anchors with correct id set. Check if clicking right side TOC redirects correctly. Check if navbar is not covering the section after redirection from TOC.

@radekmie I made some changes, hope you don't mind:

Appear only on hover
Change unit values to rem (our practice moving forwards)


If a HTTP sender receives a 400 response, Ladybug does not give the output a red cross

When a HTTP sender gives a 400 response code, the end checkpoint does not have a red cross. See picture:

Expected behavior is that the highlighted node should have a red cross. And also the end nodes of enclosing scopes. When an adapter calls another adapter and when that other adapter throws a Java exception, there are red crosses as shown below:

Hoeft niet gefixed voor de 9.0 release, schrijft Jaco op Teams.

This is a backend issue, as the frontend just shows an icon based on the type of checkpoint


Can we setup avs-device-sdk for QNX?

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.
Briefly summarize your issue:

What is the expected behavior?

What behavior are you observing?

Provide the steps to reproduce the issue, if applicable:

Tell us about your environment:

What version of the AVS Device SDK are you using?
  <x.y.z>

Tell us what hardware you're using:

[ ] Desktop / Laptop
[ ] Raspberry Pi
[x] Other - tell us more:

Tell us about your OS (Type & version):

[ ] Linux
[ ] MacOS
[ ] Raspbian Stretch
[ ] Raspbian Jessy
[x] Other - tell us more:

Hi @anu-mathur ,

closing issue as solution is not present currently.


Changing month or day in text input from two digits to only one yields undefined on bound scope property

I'm facing an issue where after editing a datepicker text field with ng-model="someDateObject",  someDateObject` becomes undefined. This happens specifically when I change a date such as 12/07/2016 to 12/7/2016 or from 01/07/2016 to 1/07/2016, i.e. when I remove one zero from the month or from the day.
Don't know if it's relevant, but I'm on a pt-BR locale, which is DD/MM/YYYY, on version 0.14.3.

Removing a 0 will cause it to be an invalid date given that format.
If you are looking for a looser format, there is currently support for d! and M! flags for optional leading zeroes. If you are looking for invalid dates still being set, keep an eye out for #4837.


'Your local changes would be overwritten by checkout' but I don't have local changes

Here's what happened:

I had some local changes
I checked out out a PR through the extension
It was a shallow clone (so I saw a single commit with no history), and I saw this error in the log which is probably from that:

[Debug<PHONE_NUMBER>.693s] Unshallowing failed: Failed to execute git {
  "exitCode": 128,
  "gitErrorCode": "DirtyWorkTree",
  "gitCommand": "pull",
  "stdout": "",
  "stderr": "error: Cannot pull with rebase, you have unstaged changes.\nerror: please commit or stash them.\n"
}. Falling back to git pull

Opened another PR and saw the same
Stashed the changes, so now there are no local changes
Trying to open another PR, but I get the warning

I see https://github.com/microsoft/vscode-pull-request-github/issues/2529 but looks like there was no resolution
Full log:
7-GitHub Pull Request.log.zip
After reloading the window, I was able to checkout a PR with no problem.

For some reason the built in git extension sometimes has slightly (~a few minutes) stale information about the repo, which is what I think causes this. The git extension API does have a way to force an update, so I could try using that.

I just hit this, so doing a status didn't fix it.

git extension logs:
[2022-09-23T12:54:17.721Z] > git config --local -l [67ms]
[2022-09-23T12:54:17.806Z] > git status -z -uall [77ms]
[2022-09-23T12:54:17.878Z] > git symbolic-ref --short HEAD [64ms]
[2022-09-23T12:54:17.952Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-4 refs/remotes/pr/Thomas1664/3904-4 [67ms]
[2022-09-23T12:54:18.027Z] > git remote --verbose [61ms]
[2022-09-23T12:54:18.029Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [70ms]
[2022-09-23T12:54:18.100Z] > git config --get commit.template [62ms]
[2022-09-23T12:54:18.167Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904 refs/remotes/pr/Thomas1664/3904 [60ms]
[2022-09-23T12:54:18.236Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-1 refs/remotes/pr/Thomas1664/3904-1 [62ms]
[2022-09-23T12:54:18.309Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-2 refs/remotes/pr/Thomas1664/3904-2 [65ms]
[2022-09-23T12:54:18.387Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-3 refs/remotes/pr/Thomas1664/3904-3 [66ms]
[2022-09-23T12:54:18.458Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-4 refs/remotes/pr/Thomas1664/3904-4 [64ms]
[2022-09-23T12:54:18.525Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-5 refs/remotes/pr/Thomas1664/3904-5 [59ms]
[2022-09-23T12:54:18.701Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\FETCH_HEAD
[2022-09-23T12:54:18.701Z] [debug] [.git] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\FETCH_HEAD
[2022-09-23T12:54:19.416Z] > git fetch Thomas1664 uitk:pr/Thomas1664/3904-5 --depth=1 [884ms]
[2022-09-23T12:54:19.416Z] From https://github.com/thomas1664/vscode-pull-request-github
 * [new branch]        uitk       -> pr/Thomas1664/3904-5
[2022-09-23T12:54:19.475Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\logs\refs\heads\pr\Thomas1664\3904-5
[2022-09-23T12:54:19.475Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\refs\heads\pr\Thomas1664\3904-5
[2022-09-23T12:54:19.475Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\FETCH_HEAD
[2022-09-23T12:54:19.476Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\shallow
[2022-09-23T12:54:19.476Z] [debug] [.git] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\FETCH_HEAD
[2022-09-23T12:54:19.476Z] [debug] [.git] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\shallow
[2022-09-23T12:54:19.498Z] > git status -z -uall [73ms]
[2022-09-23T12:54:19.581Z] > git symbolic-ref --short HEAD [74ms]
[2022-09-23T12:54:19.662Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-4 refs/remotes/pr/Thomas1664/3904-4 [73ms]
[2022-09-23T12:54:19.741Z] > git remote --verbose [63ms]
[2022-09-23T12:54:19.741Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [71ms]
[2022-09-23T12:54:19.833Z] > git config --get commit.template [79ms]
[2022-09-23T12:54:19.920Z] > git checkout -q pr/Thomas1664/3904-5 [78ms]
[2022-09-23T12:54:19.972Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\HEAD
[2022-09-23T12:54:19.972Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\index
[2022-09-23T12:54:19.972Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\logs\HEAD
[2022-09-23T12:54:19.972Z] [debug] [.git] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\HEAD
[2022-09-23T12:54:19.973Z] [debug] [.git] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\index
[2022-09-23T12:54:19.997Z] > git status -z -uall [70ms]
[2022-09-23T12:54:20.059Z] > git symbolic-ref --short HEAD [56ms]
[2022-09-23T12:54:20.123Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-5 refs/remotes/pr/Thomas1664/3904-5 [56ms]
[2022-09-23T12:54:20.194Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [66ms]
[2022-09-23T12:54:20.200Z] > git remote --verbose [66ms]
[2022-09-23T12:54:20.280Z] > git config --get commit.template [66ms]
[2022-09-23T12:54:20.353Z] > git branch --set-upstream-to refs/remotes/Thomas1664/uitk pr/Thomas1664/3904-5 [66ms]
[2022-09-23T12:54:20.404Z] [debug] [wt] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\config
[2022-09-23T12:54:20.404Z] [debug] [.git] Change: d:\repos\alexr00\vscode-pull-request-github-1\.git\config
[2022-09-23T12:54:20.429Z] > git status -z -uall [69ms]
[2022-09-23T12:54:20.502Z] > git symbolic-ref --short HEAD [66ms]
[2022-09-23T12:54:20.566Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-5 refs/remotes/pr/Thomas1664/3904-5 [58ms]
[2022-09-23T12:54:20.638Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [65ms]
[2022-09-23T12:54:20.643Z] > git remote --verbose [64ms]
[2022-09-23T12:54:20.715Z] > git config --get commit.template [56ms]
[2022-09-23T12:54:20.794Z] > git status -z -uall [71ms]
[2022-09-23T12:54:20.871Z] > git symbolic-ref --short HEAD [69ms]
[2022-09-23T12:54:20.948Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/pr/Thomas1664/3904-5 refs/remotes/pr/Thomas1664/3904-5 [69ms]
[2022-09-23T12:54:21.016Z] > git remote --verbose [56ms]
[2022-09-23T12:54:21.017Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [63ms]
[2022-09-23T12:54:21.078Z] > git config --get commit.template [52ms]
[2022-09-23T12:54:21.577Z] > git config --local branch.pr/Thomas1664/3904-5.github-pr-owner-number [134ms]
[2022-09-23T12:54:23.783Z] > git config --local branch.pr/Thomas1664/3904-5.github-pr-owner-number [141ms]
[2022-09-23T12:56:02.271Z] > git config --local branch.alexr00/prCreate2.github-pr-owner-number [117ms]
[2022-09-23T12:56:02.397Z] > git status -z -uall [119ms]
[2022-09-23T12:56:02.468Z] > git symbolic-ref --short HEAD [65ms]
[2022-09-23T12:56:02.563Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/alexr00/prCreate2 refs/remotes/alexr00/prCreate2 [87ms]
[2022-09-23T12:56:02.638Z] > git remote --verbose [62ms]
[2022-09-23T12:56:02.705Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [135ms]
[2022-09-23T12:56:02.775Z] > git config --get commit.template [60ms]
[2022-09-23T12:56:03.635Z] [debug] [wt] Change: d:\repos\alexr00\playground\.git\FETCH_HEAD
[2022-09-23T12:56:03.636Z] [debug] [.git] Change: d:\repos\alexr00\playground\.git\FETCH_HEAD
[2022-09-23T12:56:05.555Z] > git fetch origin alexr00/prCreate2 [2068ms]
[2022-09-23T12:56:05.555Z] From https://github.com/alexr00/playground
 * branch            alexr00/prCreate2 -> FETCH_HEAD
[2022-09-23T12:56:05.607Z] [debug] [wt] Change: d:\repos\alexr00\playground\.git\FETCH_HEAD
[2022-09-23T12:56:05.607Z] [debug] [.git] Change: d:\repos\alexr00\playground\.git\FETCH_HEAD
[2022-09-23T12:56:05.684Z] > git status -z -uall [120ms]
[2022-09-23T12:56:05.757Z] > git symbolic-ref --short HEAD [66ms]
[2022-09-23T12:56:05.850Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/alexr00/prCreate2 refs/remotes/alexr00/prCreate2 [85ms]
[2022-09-23T12:56:05.939Z] > git remote --verbose [76ms]
[2022-09-23T12:56:05.995Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [139ms]
[2022-09-23T12:56:06.136Z] > git config --get commit.template [126ms]


Hyperscale grid files are difficult to run (mpirun)

My device has about 128GB of RAM. Can MFEM support models with nearly one million element numbers, more than 100,000 boundaries, and more than 100,000 vertices?
Can someone briefly say a reasonable estimate of the memory required? Thanks for any replies.

Yes, definitely. I can run a simple Poisson problem on a mesh with 1e6 elements on my laptop. I used 8 MPI ranks, and each process used about 150 MB of RAM, so 1.2 GB total. The time to solution was < 4 seconds.

I use 4 mpi ranks, and the program quits after the memory is full. It took up about 64GB at the time, and it kept rising. My element is tetrahedron and boundary is triangles. Does the difference in element significantly affect memory usage?

What problem/equations are you solving? What order (polynomial degree) finite elements are you using?

/miniapps/electromagnetic/maxwell.cpp. Only the mesh file was replaced. First order equation.
Run the command as:
mpirun -np 4 ./maxwell -m ../../data/mymesh.mesh -rs 2 -abcs '-1' -dp '-0.3 0.0 0.0 0.3 0.0 0.0 0.1 1 .5 .5'

The flag -rs 2 will perform two additional levels of uniform refinement, so if mymesh.mesh has 1e6 elements, the mesh used for your computations will have 64x as many elements (perhaps also explaining your 64 GB of memory usage).

You are absolutely right. Thank you very much


allow echo to take a vargs instead of a single expression

So, something like:
echo 1, 2, 3   # 1, 2, 3

And also support this for function calls, ..., etc

Fixed in v0.12.0


Add flexVolume to list and add anchor.

@tengqm any updates here? Anything I need to do?

@Zefool Thanks for the fix.
/lgtm
/approve


Core 2.2 - Integration tests -  Bearer Token length restriction (756 chars)

Integration test fails when I have to supply a bearer token and the token length is greater that 756 characters.
_client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer",
        _token.Text));

results in
System.FormatException : The format of value 'Bearer S0.....  is invalid exception.
However, the below works (but the token is invalid at this point)
_client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer",
        _token.Text.Substring(0,756));

Is there anything extra that needs to be done in regards to token length for integration tests?

@Tratcher - is this Security, HttpClientFactory, or something in CoreFX?

Can you give the full stack trace?

Are you sure it's a length issue and not a format issue? E.g. is the character at index 756 invalid? It's pretty strange a truncated token would be considered valid. Can you give a sample token without any personal information? Or send it to the e-mail in my profile?
AuthenticationHeaderValue doesn't verify the length or format of the token.
https://github.com/dotnet/corefx/blob/86ef1c507faa24ca4406b9e8ebfede2a2ae52100/src/System.Net.Http/src/System/Net/Http/Headers/AuthenticationHeaderValue.cs#L63
Servers care about header lengths, but their limits are much higher and you'd get a different error.
JwtBearer doesn't care.
https://github.com/aspnet/AspNetCore/blob/8a7508d8183968d1b96d259cf8bcc5bbb85981b5/src/Security/Authentication/JwtBearer/src/JwtBearerHandler.cs#L74
There could be some limit in IdentityModel, but we don't pass them the "Bearer " piece of the header.

The 756th character is  "," and hence the error and not due to the length of the token.
@Tratcher, thanks for your comment in regards to 756th character that made me look into it.
Is there a way  to have this command ignored while running the integration test server WebApplicationFactory ignore the comma?
Below is the stack trace
----- Inner Stack Trace -----
at System.Net.Http.Headers.HttpHeaderParser.ParseValue(String value, Object storeValue, Int32& index)
at System.Net.Http.Headers.HttpHeaders.ParseAndAddValue(HeaderDescriptor descriptor, HeaderStoreItemInfo info, String value)
at System.Net.Http.Headers.HttpHeaders.Add(HeaderDescriptor descriptor, IEnumerable1 values)    at System.Net.Http.Headers.HttpHeaders.Add(String name, IEnumerable1 values)
at Microsoft.AspNetCore.Mvc.Testing.Handlers.RedirectHandler.CopyRequestHeaders(HttpRequestHeaders originalRequestHeaders, HttpRequestHeaders newRequestHeaders)
at Microsoft.AspNetCore.Mvc.Testing.Handlers.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task`1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts)

This is unrelated to WebApplicationFactory, it's an HttpClient error. Are you sure that token is valid?
You can bypass that check by calling TryAddWithoutValidation
https://docs.microsoft.com/en-us/dotnet/api/system.net.http.headers.httpheaders.tryaddwithoutvalidation?view=netframework-4.8#System_Net_Http_Headers_HttpHeaders_TryAddWithoutValidation_System_String_System_String_

The token is valid because it's a customized token as per our internal requirements.  I tried "TryAddWithoutValidation" but it does not seem to make the call to the controller and fails.
Strange part is, when the request is made via POSTMAN or Swagger, the token works.  I suppose Integration test Http Client has extra checks for the token format.

Nevermind, I didn't read that stack trace correctly. Microsoft.AspNetCore.Mvc.Testing.Handlers.RedirectHandler.CopyRequestHeaders should not be calling Add, it should be calling TryAddWithoutValidation. That's an MVC bug we'll need to address.
The trouble with comma is that it's the reserved separator between header values. Many header parsing libraries will split your token into two headers. You should re-think using comma.
https://tools.ietf.org/html/rfc2616#section-4.2
"   It MUST be possible to combine the multiple header fields into one
"field-name: field-value" pair, without changing the semantics of the
message, by appending each subsequent field-value to the first, each
separated by a comma."
And the Authorization header only allows commas in a specific format:
https://tools.ietf.org/html/rfc7235#appendix-C
"   credentials = auth-scheme [ 1*SP ( token68 / [ ( "," / auth-param )
*( OWS "," [ OWS auth-param ] ) ] ) ]"
(I'd have to stare at that BNF for a while to work out exactly where they're allowed...)


Not working with private repo

I have a private repo in Bitbucket which I can clone locally due to having a ssh key. Doesn't seem to work with this module though. No errors are shown, it simply hangs forever when I call it with my private git url.
const tags = await remoteGitTags(privateRepositoryPath);
console.log(tags);

v3 now uses the git binary instead, so this should no longer be an issue: https://github.com/sindresorhus/remote-git-tags/releases/tag/v3.0.0


Add reschedule functionality

pressing reschedule will navigate to a component which display two fields i.e., transaction ID and date

It should require the user to log in first in order to manage the service for better authentication.


Tooltip for my charts

Hi, i'm a novice in Chart.js i want to add tooltips to my charts. I have tested more issues.
Actually :
http://img4.hostingpics.net/pics/880703tooltip.png
My config :
<canvas id="canvas1" width="980" height="630"></canvas>
<script>
var lineChartData = {
        labels : [<?php echo $date_save_list; ?>],
        "datasets" : [
            {
                fillColor : "#F7E269",
                pointColor : "#B3A34C",
                pointStrokeColor : "#fff",
                pointHighlightFill : "#fff",
                pointHighlightStroke : "rgba(220,220,220,1)",
                data : [<?php echo $temperature_in_list; ?>]
            },
            {
                fillColor : "#77B5FE",
                pointColor : "#5785BA",
                pointStrokeColor : "#fff",
                pointHighlightFill : "#fff",
                pointHighlightStroke : "rgba(220,220,220,1)",
                data : [<?php echo $temperature_out_list; ?>]
            },
        ]
    };

var func1 = function() {
    var ctx = document.getElementById("canvas1").getContext("2d");
    window.myLine = new Chart(ctx).Line(lineChartData, {
        scaleOverride : true,
        scaleSteps : 4,
        scaleStepWidth : 10,
        scaleStartValue : -10,
        scaleFontSize: 8,

    });
}

window.onload = function() {
    func1();
};

</script>

Thank you for you help

It appears that you are using version 1 of the library. Please update to version 2 and refer to http://www.chartjs.org/docs/ for documentation on v2 as v1 is no longer supported. Creating a chart in v2 will enable tooltips by default.

Closing as answered


remove mongodb related code

Related Issue(s): n/a
Description:
Remove mongodb related code.

@philvarner Looks good I think. It should pass if you run pre-commit run --all-fiiles We might want to remove the push to pypi and test-pypi github actions too

We could probably rename the dockerfile to just 'dockerfile' and the same with 'docker-compose.yml' as well


Documentation Does Not Match QuickBooksOnline\API\DataService\Batch::AddQuery() signature

https://developer.intuit.com/app/developer/qbo/docs/develop/sdks-and-samples-collections/php/synchronous-calls#batch-process
The following example code from the above link is incorrect:
$batch->AddQuery("select * from Customer startPosition 0 maxResults 20", "queryCustomer",       "uniqueQuery");
AddQuery takes 2 parameters:
    /**
     * Adds the specified query.
     * @param string $query IDS query.
     * @param string $id unique batchitem id.
     */
    public function AddQuery($query, $id)

Submitted PR only fixes examples in this repo. It doesn't look like the linked documentation is generated from those files, so at the moment I believe this is all I can do.


Some API not working well in taiko v1.0.16

I tried the new taiko version 1.0.16, but found there are some taiko API not working so well,
e.g, for clear api, when use code like this:
await write(process_name, into(textBox({class: "ant-input ant-input-lg"}, below("Enter process name"))));
this line of code is not working using the latest version.
So i need to change it like
await write(process_name, into($(".ant-input.ant-input-lg", below("Enter process name"))));,
seems the textBox api cannot identify element when using class name.
Also for the radioButton API, it's able to identify the label with Yes, but cannot identify the label with No.
These 2 issues I see in latest taiko version.
Versions
node: 10.16.3
Taiko: 1.0.16

class selector is fixed by #1406.. please do create separate issues for others with example.


migrate to JUnit5

fixes #795

Coverage remained the same at 91.008% when pulling b90ef5bf256214f46510647e57d7cc5efca895c2 on junit5-795 into 868c0d8d669d6926c832267d41a439f8121ada59 on master.

Hi @yusuke, thank you very much for the valuable contribution as always! LTGM 🎉


in Hugo v0.65.3 broken logic range  .Pages.ByWeight

What version of Hugo are you using (hugo version)?

$ hugo version  v0.65.3

Does this issue reproduce with the latest release?
yes
pages no longer rank by weight. Weight has no effect on ranking. In version v0.62.2 and v0.64.1 everything worked correctly.

This isn't a statement that can be true in general (we have millions of tests depending on this sort working as it should), so it must be something "else" in your site, which is hard to tell without seeing the source.

This isn't a statement that can be true in general (we have millions of tests depending on this sort working as it should), so it must be something "else" in your site, which is hard to tell without seeing the source.

I think you're right. The problem was in my system. I could not reproduce the bug after reboot.


Contoso University Blazor server, no WebAssembly, with Entity Framework and ASP.NET

I have a Contoso University example server that demonstrates how to use the Entity Framework Core in an ASP.NET Core Blazor server, no WebAssembly (WASM).  This Blazor Contoso University server is an example derived from the Razor Pages Contoso University tutorials.  I created it after studying the MVC, Razor Pages and Blazor WebAssembly examples.  I wished to compare and contrast the different techniques but I could not find a simple and straightforward  Blazor Contoso University server example, so I created it.
Is yet another tutorial or example of interest?  If so, where would I place it in the code tree so that I can make a pull request allowing everyone to review the example?
Cheers,

Marcus GABRIEl

I misworte.  The project is on GitHub at https://github.com/marcusdeangabriel/ContosoUniversity-blazor-server and therefore I wish to know where to place it in the README.md file.


New package: AutoDarkMode.AutoDarkMode version <IP_ADDRESS>

Pull request has been created with komac v2.0.2 :rocket:

Resolve: #137261

Microsoft Reviewers: Open in CodeFlow

For moderators
This account is automated by Github Actions and the source code was created by CoolPlayLin. If you have any questions about any pull request, don't hesitate to ping @Exorcism0666, I'll get a notification.

[!important]
Please carefully review these Pull Request before merging. If it is a Pull Request for removing incorrect content and the URLs are issue, free upon manual checking, please close this Pull Request directly. (It is best to inform Exorcism0666 of the closure.)

良い一日をお過ごしください！


#493 Include context in slack extra info.

Adds the context items to Slack attachments.
$handler->addError('Foo', array('foo' => 'bar'));

+1

That's been adjusted so that both extra and context are consistent depending on useShortAttachment and are only added if the fields are present and not empty.
To be honest, it's still not perfect as you should be able to choose one or the other and short attachment shouldn't be used to decide whether to stringify the the object or not as Slack's intended use is just whether the fields can be stacked next to each other not in two columns.

Thanks! That sounds like good progress already so I'll merge, but if you feel like this can be improved upon please send another PR. I'd just like to see before/after screenshots because I don't really have the time or ability to test with slack to see how it comes out.


Update to LiveView 1.0 🎉

Closes #825

@whatyouhide what's the reasoning behind having mix.lock files in git?

In general is so that you get reproducible mix deps.get every time instead of making it depend on what versions are up on Hex. For libraries like this one, dependants don't read mix.lock, it's only for local use when developing the library. Does it make sense?

@whatyouhide yeah it does but the downside is that we're locking ourselves to specific versions, and then people release new versions of stuff we depend on and we're missing running our test suite against these updated versions. My approach for years was to always let the CI install whatever is the latest. This also helps catch installation issues early on. There are of course special cases like explicitly testing against a very specific set of versions for some crucial deps. In our case that would be of course Phoenix and LiveView.
I'm not saying we should remove the locks though, just raising this as a concern. We could solve this in various ways - like having dependabot configured for our needs, or a separate CI run that does mix deps.update --all.

Yeah we shouldn't remove the locks. Dependabot is probably what we want here.

👋 👋 👋
Not sure if it was on your radar but we built blend to solve this issue. You can test an hex package against different version of its dependencies.
This is an example of surface-ui testing against phoenix_live_view 0.20.x and 0.19.x

@solnic it's best practice not just with elixir but in pretty much every language that supports it to commit your lockfiles. that's the whole point of the lockfile concept, for reproducibility. note this is not the same as vendoring your dependencies.

@whatyouhide I'm not sure how to make this work with 1.13 and locks checked in. Any ideas? Do we need a separate lock for 1.13? When installing deps on CI we can't have locks that point to LV 1.0 because that will make 1.13 install it and crash. Having "~> 0.20 or ~> 1.0" doesn't make 1.13 install older LV (unsurprisingly).
...unless I'm missing something obvious?

For now patch CI so that you run mix deps.unlock phoenix_live_view if the Elixir version is older. This is temporary anyway since it'll go away once we drop support for older Elixir versions.

@solnic it's best practice not just with elixir but in pretty much every language that supports it to commit your lockfiles. that's the whole point of the lockfile concept, for reproducibility. note this is not the same as vendoring your dependencies.

In my experience, it is FAR simpler to not have them checked in for OSS projects when you care about staying on top of the deps (as in, test against latest versions). Locks checked in make perfect sense for apps, but not for OSS libs. The whole point of running CI for OSS libs is to ensure that things don't break and your lib can be installed, it is so easy to get behind by an accident. I understand that you can have locks checked in and use other tools to inform you about outdated deps, but from a pragmatic/time-saver POV it is just extra work. I've found it to be just simpler and less time consuming to not have locks in OSS lib repos.
This is my personal opinion and experience - our situation here is different :)

Peter, I have never experienced issues with checked-in lockfiles or had my time consumed 🙃 We have a path forward here, so let's just take that and merge this PR 💯

@whatyouhide I'm not trying to argue or hold anything up, just for my own curiosity -- what's the problem with using >= 20.0? It seems like it would allow consumers to use either 1.0 or 0.20 unlike ~> 0.20 is equivalent to >= 0.20 and < 0.21.

@phinnaeus: I'm pretty sure Mix supports or clauses in the version requirements. Perhaps "~> 0.20 or ~> 1.0" is more reasonable?

With "or" it still installs the latest version because that's what we have in the lock, unless I'm doing something wrong here :(

@whatyouhide I'm not trying to argue or hold anything up, just for my own curiosity -- what's the problem with using >= 20.0?

Open-ended dep requirements are problematic because 2.0.0 may no longer be compatible, we could have ">= 1.0 and < 2.0" though.

@whatyouhide @phinnaeus looks like I've made it 🙃 the trick was to skip doing deps.get in test/integrations since we don't even run these tests under 1.13, and also skip doing --check-locked under 1.13


Send PR to PostCSS README

“Fun” section will be OK

Created! https://github.com/postcss/postcss/pull/388

Now merged, closing.


Adds SymbolToken and SymbolTable APIs.

Removes non-used symbols.go module which had a preliminary symbol
table implementation.
Adds SymbolToken as a pure data structure.
Adds SymbolTable as an abstract data type for
system/shared/local symbol tables.
None of the APIs are currently exported for making symbol tables.
Resolves #11
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

What does desc stand for? I can't find a reference within this codebase for the expanded form.

This was a fat fingering of a refactor for a field in a test case from name to desc using Goland...


Can governance documents and COC also be brought to github?

I believe the topic was discussed before but seeing the link from the README.md reminded me that it would be great to keep the documents under https://www.cloudfoundry.org/governance/ in Github as well, especially to have a clear version history (for me, it's less about the format PDF vs. markdown but more on traceability).

Same goes for Code of Conduct

Yes. I will handle that, and ensure that the code ownership is indicated correctly.


Google Play Games no achievement popup

Achievement popups are not shown. It may be related to this

It worked in the past, I'll check if the behaviour was changed.

I haven't managed to fix this even with tips I have found on the internet (adding parameters to Builder).
        gdxVersion = '1.9.10'   gamesvcsVersion = '1.0.1'

Tested, popup still comes up for me

I have tried to build demo app but I cannot sign in ( even though I have changed package name and replaced all of the ids). If build that demo app for test, did you build it using the latest version of this lib? I am asking because your demo app uses 0.2.5 SNAPSHOT. It is really a strange issue :(

Yes, I used the latest version.
You won't be able to sign in with the demo app, you need to create your own gpgs project and link it to your signing signature.

I have actually used my games project from another game and signed it with the same certificate

Still no luck, replicated manifest and other relevant things from demo app to my game. I wonder if it isn't phone related. Is it possible to upload your release signed demo app so I can try? Thanks for this lib btw, helped me a lot but this doesn't work for some reason.

You can use my release signed game for testing: https://github.com/MrStahlfelge/gdx-gamesvcs#working-demos

I have mannaged to fix it! The problem was that the achievements didn't have any icons!! Even google tells us that it is ok to not have icons if it is in testing stage 😠😠😠. What about adding some warning somewhere (wiki?) ? It could save me 2 days of work and searching

That's great news. You should add an answer to the #1 question on SO: https://stackoverflow.com/questions/26474718/google-play-games-achievement-unlocked-popup-not-showing


Update travis config

to only test on 1.8.x, and ensure we route to Ubuntu Trusty and a recent macOS image.

:+1: :+1:


Building?

I am following your instructions to build but to no avail:

C:\Users\elias\Projects\github\ttddbg>cd build

C:\Users\elias\Projects\github\ttddbg\build>cmake ..\ttddbg -DIDA_SDK_SOURCE_DIR=%IDASDK%  -DBUILD_TESTS=ON
-- Building for: Visual Studio 17 2022
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) in CMakeLists.txt:
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
-- The C compiler identification is MSVC 19.38.33133.0
-- The CXX compiler identification is MSVC 19.38.33133.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:5 (find_package):
  By not providing "FindIdaSdk.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "IdaSdk", but
  CMake did not find one.

  Could not find a package configuration file provided by "IdaSdk" with any
  of the following names:

    IdaSdkConfig.cmake
    idasdk-config.cmake

  Add the installation prefix of "IdaSdk" to CMAKE_PREFIX_PATH or set
  "IdaSdk_DIR" to a directory containing one of the above files.  If "IdaSdk"
  provides a separate development package or SDK, be sure it has been
  installed.

CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.28)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Configuring done (3.8s)
-- Generating done (0.1s)
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_TESTS
    IDA_SDK_SOURCE_DIR

-- Build files have been written to: C:/Users/elias/Projects/github/ttddbg/build

C:\Users\elias\Projects\github\ttddbg\build>

THIS ISSUE IS PROBABLY NOT VALID ANY LONGER AND SOLVED
Dear Elias,
please create the build directory outside of the git-repo and change to the build directory:
$ git clone git@github.com:airbus-cert/ttddbg.git --recursive
$ mkdir build
$ cd build
$ cmake ..\ttddbg -DIDA_SDK_SOURCE_DIR=[PATH_TO_IDA_SDK_ROOT_FOLDER] -DBUILD_TESTS=ON

there is no step: cd ttdbg before mkdir build.
Best wishes! And awesome training :)
Kind regards,
Richard

As you described. build should be outside the source tree. Now it works, thanks!


Improve local build experience with regards to versioning

Git Changed Files
Currently the following files are changed whenever the version of the solution is updated during build: *.dnn, package.json (in various React projects) and solutioninfo.cs. This amounts to 40 odd files that may show up as changed as you're working on a change in the DNN code. Not only is it annoying to the developer as he/she needs to wade through these files to find the ones that contain the "real" changed code, it also poses a risk of accidentally committing some of these files while preparing a PR for the project.
It is an ongoing effort by the build team to improve the experience for developers and ultimately we'd like to have no files pollute your git experience.
Product versioning on Github
It is imperative that a user who checks out the code tagged version X.Y.Z gets the code that corresponds exactly as to how it was when that version was released. Currently this is not yet the case. If you check out v9.5.0 the SolutionInfo.cs and other versioned files point to 9.4.4. For v9.4.4 it is even 9.4.2. Source code packages were deprecated a long time ago in favor of using Git and tags. It is upon us to make this work.
Presumptions

Developers will be unaware of our versioning mechanism (and will have various degrees of knowledge of Git) and need a simple way to control the version they are building.
People make mistakes and that's OK. We just need to limit the amount of damage these mistakes can make.

Potential interventions that could help the above situation

Create a new CI task that runs after build which commits all changes and tags this commit with the version nr. This would eliminate the situation we have now where the version in code is not what it is on the tag.
For json and dnn files only inject a version on build and rip those out after build. The downside with this approach (as we've learned from the past) is that if anything goes wrong during build, you are still stuck with all these changed files.
Build dnn (manifests) dynamically (i.e. upon build) so the version never gets written to disk. This could be done using the mechanism leveraged in the Dnn.CakeUtils project which generates manifests on the basis of a json file. The downside is that this requires quite a bit of work as we need to rewrite the packaging logic as well.

Create a new CI task that runs after build which commits all changes and tags this commit with the version nr. This would eliminate the situation we have now where the version in code is not what it is on the tag.

Yep, we just need to make sure this only runs manually, we could call this a post-release task and I would also like that it updated our issue templates. As discussed we can do some automation to automatically get the latest released version.

For json and dnn files only inject a version on build and rip those out after build. The downside with this approach (as we've learned from the past) is that if anything goes wrong during build, you are still stuck with all these changed files.

I created backup and restore steps that should run each time the build script is called and the restore runs even if the build fails. The problem is that this is voluntarily skipped if the versioning is done by the settings file. By removing that condition in the setup and teardown steps, it should resolve this. My last PR about it was an issue when a build was done without any changes. It should now work fine no matter what except for that skip condition.
Basically this creates a local commit with the current state called 'backup' and then reverts that commit. It is local only so does not even need an active network connection. It is safer and faster than our previous zip process and covers absolutely all grounds no matter the nature of build scripts changes to bring the user back exactly at the state he was before the build, even if the build fails.

Build dnn (manifests) dynamically (i.e. upon build) so the version never gets written to disk. This could be done using the mechanism leveraged in the Dnn.CakeUtils project which generates manifests on the basis of a json file. The downside is that this requires quite a bit of work as we need to rewrite the packaging logic as well.

Well, with earlier build scripts we had a process in which if the manifests had versions, they would be locked at that version, if they did not have a version they would get it from the build scripts. Now thanks to @donker we have a list of manifests that should not be auto-versioned vs the others that do get automatically versioned, which means we no longer have to (or not have to) have a version number in the manifests. I think we should just commit the version in that post-build task so that if a developer just builds one module or package or project (ie: not using the build scripts), he gets a proper usable package out of the box.


Add nltk download in langcheck.augment.synonym

Resolves #153
In [2]: langcheck.augment.synonym('aaaa')
[nltk_data] Downloading package averaged_perceptron_tagger_eng to
[nltk_data]     /Users/taniokay/nltk_data...
[nltk_data]   Unzipping taggers/averaged_perceptron_tagger_eng.zip.
Out[2]: ['aaaa']

Thanks for quickly fixing the problem written in the very undescriptive issue!!
Actually nltk.data.find and nltk.download should specify different paths (See the line below, I didn't remember that but this uses the same package as langcheck.augment.synonym). In the current implementation the nltk.data.find always fails and nltk.download is also always called.
https://github.com/citadel-ai/langcheck/blob/16aa088cec46e4435a254d3c71a9c9d8e87f75e9/src/langcheck/augment/en/_gender/_gender.py#L79
Could you fix the path  specified in nltk.data.find to a proper one?

Fixed the path and confirmed that synonym() works even after removing the nltk data!


I tried to modify http request method from HEAD to PROPFIND so that I can mock the PROPFIND request. As follows:
func ServeHTTP(w http.ResponseWriter, r *http.Request) {
	if r.Method == "HEAD" {
		r.Method = "PROPFIND"
		if r.Header.Get("Depth") == "" {
			r.Header.Add("Depth", "0")
		}
	}
	handler := &webdav.Handler{
		FileSystem:  myFileSystem,
                 LockSystem: webdav.NewMemLS(),
	}
	handler.ServeHTTP(w, r)
}

I realize that it is not a right approach after testing.
But I got a confusing error message http: superfluous response.WriteHeader call from github.com/hacdias/webdav/v4/lib.responseWriterNoBody.WriteHeader (webdav.go:222):

And my webdav client received a 207 response:

What did you see happen?
I got a confusing error message http: superfluous response.WriteHeader call from github.com/hacdias/webdav/v4/lib.responseWriterNoBody.WriteHeader (webdav.go:222) and 207 response.
I tried to debug the code, I found that I would get an short write error in this handlePropfind function

But before triggering this error, the status code of 207 had already been written into the response header:

So in the outermost function used to handle PROPFIND or PROPPATCH methods, when a status with err was returned, the WriteHeader was called again, resulting in the client receive a 207 response and the server side get an superfluous response.WriteHeader call error.

What did you expect to see?
I have given up using head to simulate propfind, but I hope that when processing the PROPFIND or PROPPATCH methods, if the server side encounters an error, it can return 500 instead of 207

@y805939188 In the future, please post text instead of images.
Also, I'm just triaging and not an expert here, but it seems like this might be a bug in github.com/hacdias/webdav? What makes you think this is a bug in the Go standard library? Or is it the error message that's the problem?
Thanks.
CC @neild

@y805939188 In the future, please post text instead of images.
Also, I'm just triaging and not an expert here, but it seems like this might be a bug in github.com/hacdias/webdav? What makes you think this is a bug in the Go standard library? Or is it the error message that's the problem?
Thanks.
CC @neild

Hello! I will try to use detailed text and images to describe the problem. I think it may be an issue in Go's net/webdav package. There is a function named ServeHTTP in net/webdav/webdav.go that handles the methods PROPFIND and PROPPATCH with the functions status, err = h.handlePropfind(w, r) and status, err = h.handleProppatch(w, r):

There is a code path of ServerHTTP -> handlePropfind -> walkFn -> mw.write, the function mw.write calls the w.writeHeader to write the 207 response code and returns w.enc.Encode(r) in x/net/webdav/xml.go, the w.enc.Encoder(r) function returns an error type:

And the error from w.enc.Encoder(r) will be returned to the ServerHTTP function from h.handlePropfind(w, r)
But in the ServeHTTP function, if an error type is returned from handlePropfind, ServeHTTP will call WriteHeader to write a 500 code into response header:

But in the mw.write function, the HTTP status code 207 has been written into the response header. As a result, the WebDAV client will receive a response with the 207 status code, even though an error related to a superfluous response.WriteHeader call occurred on the server side.
In summary, when the x/net/webdav/webdav.go file is handling PROPFIND or PROPPATCH methods, if an error occurs on the server side, w.WriteHeader may be triggered twice.


config.json returns incorrect port while behind a proxy

I'm trying to deploy a kellnr instance behind a proxy that forces https traffic.
My current configuration is:
KELLNR_API_ADDRESS=example.com
KELLNR_API_PROTOCOL=https
KELLNR_API_PORT=8000
KELLNR_API_PORT_PROXY=443

My assumption here is that the kellnr instance behind the proxy would communicate with the proxy on port 8000 and users would go through the proxy and requests would be done to https://example.com:443/api/v1/crates. The issue is that when building the ConfigJson object only the api_port setting is used.
Am I correct in assuming that it should check if api_port != api_port_proxy and use the latter instead?
This is the current response of /api/v1/crates/config.json with the configuration above:
{
  "dl": "https://example.com:8000/api/v1/crates",
  "api": "https://example.com:8000",
  "auth-required": false
}

I'd expect it to be:
{
  "dl": "https://example.com:443/api/v1/crates",
  "api": "https://example.com:443",
  "auth-required": false
}

Hi,
I'll look into that. I'm running Kellnr behind a https proxy, but you are right that the config.json does not reflect the correct value. I'll fix that asap.

I released Kellnr 4.0.3-pre1
Can you check if the issue is fixed for you?

It did work! Thanks for the quick fix! 😄

Fixed in Kellnr 4.0.3


Add package-lock.json to allow project dependency audits and reproducible builds

This PR adds package-lock.json to the project, which is a conventional practice for reproducible builds. This was prompted by a security advisory raised in issue #496. Adding the package-lock.json allows the project dependencies to be audited with npm audit and automatically resolved the security vulnerability.
Closes #496
Changes:

add package-lock.json
add --harmony flag to node ... command to enable ES6 features (namely the spread operator)
update the Docker image to circleci/python:3.6
remove Python 3.6.5 build step
install the serverless package in user scope, instead of globally

Hei, could someone help me determine why the tests are failing? I can't see the reason for the errors based on the changes I made here.

@brylie CircleCI stuff is pretty much abandonware at this point, we're all waiting for the Github Actions stuff to be completed over at #482 .  This project has gotten a bit stagnant I think many/most of the supporters/contributors have gotten extremely busy with work and life and such.  If you want to help out, that PR for Github Actions could use some review/love/support to push it to the finish line, then we can get a few more of these PRs that are laying around merged in.

OK, well the crux of this PR is to add package-lock.json to this project to fix issue #496. Would you recommend I open a new PR with just the package-lock.json changes and ignore the Circle CI failures?


[Sentry] Disable ingress by default

According to Sentry's parameter table in documentation, it says that ingress is disabled by default but actually it's not.
Let's update values.yaml to make it coherent.

/ok-to-test

cc @rothgar

I had probably saved it with ingress enabled for my own usage.
I guess the alternative would be to enable ingress by default. It looks like Kubernetes may want to ship an ingress controller by default in the future but for now we can leave ingress disabled by default and just make sure it's documented.

The readme already specifies false as default.

/lgtm