Issue: RetrievalQA response incomplete

Issue you'd like to raise.
Problem descriptions
I've used retrievalQA.from_chain_type() with refine type to design a chatPDF.
But the response often incomplete, see the following result, the Answer is not complete which will let the json.loads not work.
Futhermore, I've used get_openai_callback to check if the token exceeds the limit.
Howerver, the callback show the total token is 3432 which didn't exceeds the limit.
Questions

Why the response incomplete?
How can I let the response complete then I can do json.loads

Code
from datetime import datetime
from typing import List

import langchain
from langchain.callbacks import get_openai_callback
from langchain.chains import RetrievalQA
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.llms import OpenAI
from langchain.output_parsers import PydanticOutputParser
from langchain.prompts import PromptTemplate
from langchain.vectorstores import Chroma
from langchain.document_loaders import PyMuPDFLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter
from pydantic import BaseModel

docs = PyMuPDFLoader('file.pdf').load()
splitter = RecursiveCharacterTextSplitter(docs, chunk_size=1000, chunk_overlap=300)
docs = splitter.split_documents(docs)

class Specification(BaseModel):
    product_name: str
    manufactured_date: datetime
    size_inch: str
    resolution: str
    contrast: str
    operation_temperature: str
    power_supply: str
    sunlight_readable: bool
    antiglare: bool
    low_power_consumption: bool
    high_brightness: bool
    wide_temperature: bool
    fast_response: bool
    screen_features: List[str]

parser = PydanticOutputParser(pydantic_object=Specification)

prompt_template = """
Use the following pieces of context to answer the question, if you don't know the answer, leave it blank('') don't try to make up an answer.

{context_str}

Question: {question}
{format_instructions}
"""

prompt = PromptTemplate(
    template=prompt_template,
    input_variables=['context_str', 'question'],
    partial_variables={'format_instructions': parser.get_format_instructions()}
)

chain_type_kwargs = {
    'question_prompt': prompt,
    'verbose': True
}

llm = OpenAI(temperature=0)

embeddings = OpenAIEmbeddings()

db = Chroma.from_documents(
    documents=docs,
    embedding= embeddings
)
qa_chain = RetrievalQA.from_chain_type(
    llm=llm,
    chain_type = 'refine',
    retriever= db.as_retriever(),
    chain_type_kwargs=chain_type_kwargs
)

query = f"""What's the display specifications?"""

with get_openai_callback() as cb:
    res = qa_chain.run(query)
    print(cb, '\n')
    print(res)

Process of Chain
> Entering new  chain...

> Entering new  chain...
Prompt after formatting:

Use the following pieces of context to answer the question, if you don't know the answer, leave it blank('') don't try to make up an answer.
Dimensions (W × H × D)
Touch screen: 7.0" × 5.1" × 0.75" (178 × 130 × 19 mm)
Dock: 4.2" × 2.3" × 3.1" (106 × 57 × 78 mm)
Weight
Touch screen: 0.7 lbs. (0.32 kg)
Dock: 0.8 lbs (0.36 kg)
Planning the installation
• Make sure the dock can be located near a power outlet and a strong WiFi signal.
• For the most reliable connection, we recommend running Ethernet to the dock.
• Make sure the touch screen's WiFi or Ethernet connection is on the same network as your controller and that the signal is strong.
• Communication agent is required for intercom use.
• Charge the touch screen for at least six hours before use.
For more product information
Visit ctrl4.co/t3series
Control4® T3-7 7" Tabletop Touch Screen
DOC-00148-C
2015-10-09 MSC
Copyright ©2015, Control4 Corporation. All rights reserved. Control4, the Control4 logo, the 4-ball logo, 4Store,
4Sight, Control My Home, Everyday Easy, and Mockupancy are registered trademarks or trademarks of Control4
Question: What's the display specifications?
The output should be formatted as a JSON instance that conforms to the JSON schema below.

As an example, for the schema {"properties": {"foo": {"title": "Foo", "description": "a list of strings", "type": "array", "items": {"type": "string"}}}, "required": ["foo"]}}
the object {"foo": ["bar", "baz"]} is a well-formatted instance of the schema. The object {"properties": {"foo": ["bar", "baz"]}} is not well-formatted.

Here is the output schema:
{"properties": {"product_name": {"title": "Product Name", "type": "string"}, "manufactured_date": {"title": "Manufactured Date", "type": "string", "format": "date-time"}, "size_inch": {"title": "Size Inch", "type": "string"}, "resolution": {"title": "Resolution", "type": "string"}, "contrast": {"title": "Contrast", "type": "string"}, "operation_temperature": {"title": "Operation Temperature", "type": "string"}, "power_supply": {"title": "Power Supply", "type": "string"}, "sunlight_readable": {"title": "Sunlight Readable", "type": "boolean"}, "antiglare": {"title": "Antiglare", "type": "boolean"}, "low_power_consumption": {"title": "Low Power Consumption", "type": "boolean"}, "high_brightness": {"title": "High Brightness", "type": "boolean"}, "wide_temperature": {"title": "Wide Temperature", "type": "boolean"}, "fast_response": {"title": "Fast Response", "type": "boolean"}, "screen_features": {"title": "Screen Features", "type": "array", "items": {"type": "string"}}}, "required": ["product_name", "manufactured_date", "size_inch", "resolution", "contrast", "operation_temperature", "power_supply", "sunlight_readable", "antiglare", "low_power_consumption", "high_brightness", "wide_temperature", "fast_response", "screen_features"]}

> Finished chain.

> Entering new  chain...
Prompt after formatting:
The original question is as follows: What's the display specifications?
We have provided an existing answer:
Answer: {
  "product_name": "Control4® T3-7 7\" Tabletop Touch Screen",
  "manufactured_date": "2015-10-09",
  "size_inch": "7.0\" × 5.1\" × 0.75\"",
  "resolution": "N/A",
  "contrast": "N/A",
  "operation_temperature": "N/A",
  "power_supply": "N/A",
  "sunlight_readable": "N/A",
  "antiglare": "N/A",
  "low_power_consumption": "N/A",
  "high_brightness": "N/A",
  "wide_temperature": "N/A",
  "fast_response": "N/A",
  "screen_features": []
}
We have the opportunity to refine the existing answer(only if needed) with some more context below.
------------
Model numbers
C4-TT7-1-BL, C4-TT7-1-WH, C4-TT7-1-RD
Features
Screen
Resolution: 1280 × 800
Capacitive touch
Camera: 720p
Network
Ethernet or WiFi (802.11 g/n [2.4 GHz])
Notes:
(1) 802.11b is not supported for Video Intercom.
(2) Wireless-N is recommended for Video Intercom. The more devices that Video Intercom is broadcast to, the
more response time and images are degraded.
Battery
3100 mAh Li-ion
Power supply
PoE (IEEE802.3af)
100VAC ~ 240VAC, 50-60 Hz
International power supply adapters included
Dock connections
•
Ethernet
•
PoE
•
DC power
Mounting
Tabletop or portable
Environmental
Operating temperature
32 ~ 104˚F (0˚ ~ 40˚C)
Storage temperature
32 ~ 104˚F (0˚ ~ 40˚C)
Dimensions (W × H × D)
Touch screen: 7.0" × 5.1" × 0.75" (178 × 130 × 19 mm)
Dock: 4.2" × 2.3" × 3.1" (106 × 57 × 78 mm)
Weight
Touch screen: 0.7 lbs. (0.32 kg)
Dock: 0.8 lbs (0.36 kg)
Planning the installation
• Make sure the dock can be located near a power outlet and a strong WiFi signal.
------------
Given the new context, refine the original answer to better answer the question. If the context isn't useful, return the original answer.

> Finished chain.

> Entering new  chain...
Prompt after formatting:
The original question is as follows: What's the display specifications?
We have provided an existing answer:

Answer: {
  "product_name": "Control4® T3-7 7\" Tabletop Touch Screen",
  "manufactured_date": "2015-10-09",
  "model_numbers": ["C4-TT7-1-BL", "C4-TT7-1-WH", "C4-TT7-1-RD"],
  "size_inch": "7.0\" × 5.1\" × 0.75\"",
  "resolution": "1280 × 800",
  "contrast": "N/A",
  "operation_temperature": "32 ~ 104˚F (0˚ ~ 40˚C)",
  "storage_temperature": "32 ~ 104˚F (0˚ ~ 40˚C)",
  "power_supply": "PoE (IEEE802.3af) 100VAC ~ 240VAC, 50-60 Hz",
  "sunlight_readable": "N/A",
  "antiglare": "N/A",
  "low_power_consumption": "N/A",
  "high_bright
We have the opportunity to refine the existing answer(only if needed) with some more context below.
------------
Control4® T3-7 7" Tabletop Touch Screen
DOC-00148-C
2015-10-09 MSC
Copyright ©2015, Control4 Corporation. All rights reserved. Control4, the Control4 logo, the 4-ball logo, 4Store,
4Sight, Control My Home, Everyday Easy, and Mockupancy are registered trademarks or trademarks of Control4
Corporation in the United States and/or other countries. All other names and brands may be claimed as the
property of their respective owners. All specifications subject to change without notice.
------------
Given the new context, refine the original answer to better answer the question. If the context isn't useful, return the original answer.

> Finished chain.

> Entering new  chain...
Prompt after formatting:
The original question is as follows: What's the display specifications?
We have provided an existing answer:

Answer: {
  "product_name": "Control4® T3-7 7\" Tabletop Touch Screen",
  "manufactured_date": "2015-10-09",
  "model_numbers": ["C4-TT7-1-BL", "C4-TT7-1-WH", "C4-TT7-1-RD"],
  "size_inch": "7.0\" × 5.1\" × 0.75\"",
  "resolution": "1280 × 800",
  "contrast": "N/A",
  "operation_temperature": "32 ~ 104˚F (0˚ ~ 40˚C)",
  "storage_temperature": "32 ~ 104˚F (0˚ ~ 40˚C)",
  "power_supply": "PoE (IEEE802.3af) 100VAC ~ 240VAC, 50-60 Hz",
  "sunlight_readable": "N/A",
  "antiglare": "N/A",
  "low_power_consumption": "N/A",
  "high_bright
We have the opportunity to refine the existing answer(only if needed) with some more context below.
------------
Control4® T3 Series 7" Tabletop Touch Screen
The Control4® T3 Series Tabletop Touch Screen delivers always-on, dedicated, and mobile control over all the technology in your home
or business. Featuring a gorgeous new tablet design and stunning high-resolution graphics, this portable screen looks beautiful whether
on a kitchen countertop or in the theater on your lap. This model includes HD video intercom and crystal-clear audio intercom for
convenient communications from room to room or with visitors at the door.
• Available in a 7" model, the T3 Series Portable Touch Screen provides dedicated, elegant, and mobile control of your home.
• HD camera, combined with speakers and microphone, provides the best video intercom experience yet.
• Crisp picture with two and a half times the resolution of previous models.
• Extremely fast and responsive—up to 16 times faster than our previous touch screens.
------------
Given the new context, refine the original answer to better answer the question. If the context isn't useful, return the original answer.

> Finished chain.

> Finished chain.
Tokens Used: 3432
	Prompt Tokens: 2465
	Completion Tokens: 967
Successful Requests: 4
Total Cost (USD): $0.06864

Result
Tokens Used: 3432
	Prompt Tokens: 2465
	Completion Tokens: 967
Successful Requests: 4
Total Cost (USD): $0.06864

Answer: {
  "product_name": "Control4® T3 Series 7\" Tabletop Touch Screen",
  "manufactured_date": "2015-10-09",
  "model_numbers": ["C4-TT7-1-BL", "C4-TT7-1-WH", "C4-TT7-1-RD"],
  "size_inch": "7.0\" × 5.1\" × 0.75\"",
  "resolution": "1280 × 800",
  "contrast": "N/A",
  "operation_temperature": "32 ~ 104˚F (0˚ ~ 40˚C)",
  "storage_temperature": "32 ~ 104˚F (0˚ ~ 40˚C)",
  "power_supply": "PoE (IEEE802.3af) 100VAC ~ 240VAC, 50-60 Hz",
  "sunlight_readable": "N/A",
  "antiglare": "N/A",
  "low_power_consumption": "N/A",
  "high_brightness

Suggestion:
No response

llm=OpenAI(max_token=-1) can solved this problem.


IOS Bug: onDetection methods not called on IOS, this is still issue #10

Please see issue https://github.com/NativeScript/mlkit/issues/10 . It is not solved yet. The context which is bound to the callback function is still wrong. Please look into referenced issue for screenshots of the debugger.
I see two problems in line:
https://github.com/NativeScript/mlkit/blob/353ede150655e33b36fb020be320653240dad285/packages/mlkit-core/index.ios.ts#L209
I assume the context of the callback function is TNSMLKitHelper instead of MLKitView. Therefore the first condition of the if statement fails.
This could be resolved by binding the callback to the MLKitView explicitly. Hence replace
https://github.com/NativeScript/mlkit/blob/353ede150655e33b36fb020be320653240dad285/packages/mlkit-core/index.ios.ts#L45
with
 this.#mlkitHelper.onScanCallback = this._onScanCallback.bind(this);
However, then the second problem arises with the second condition in the if statement
this.hasListeners?
is unfortunately null.  I unfortunately do not understand the logic behind this piece of code and therefore have no idea how to resolve the second part of the problem.

hasListeners was checking if there is an event registered but I might as well remove that check


Update intro.md

Codecov Report

Merging #60 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff          @@
##           master    #60   +/-   ##
=====================================
  Coverage     100%   100%
=====================================
  Files          19     19
  Lines         214    214
  Branches       57     57
=====================================
  Hits          214    214

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 c7a24be...ee5c603. Read the comment docs.

Thank you, @Thebigbignooby. 😊


The Problems with Exclusive Fullscreen and Borderless Mode

Exclusive Fullscreen
There will be a 500ms lag spike that will always happen when switching to exclusive fullscreen mode for the first time but after that switch to exclusive fullscreen as many times as you want and it will not lag spike anymore. However there is always a first time lag spike every time the game is started and you switch to exclusive fullscreen.
I have yet to test to see if I can reproduce this issue in a minimal reproduction project (MRP).
Borderless Mode
The game continues to lag horribly forever. This happens randomly. But when it does happen, it never goes away, even after restarting the game. Maybe a computer restart would maybe fix it.
Which to use?
While both have drawbacks and benefits, clearly the exclusive fullscreen is the winner here.
Lets improve the UX
So exclusive fullscreen should be what gets used when pressing F11 which is what is happening at the time of writing this. Or even better F11 switches to whatever was set in the options. This is not a feature as of writing this.
Tooltips should be added to the options explaining the benefits and drawbacks of each option.

Tooltips have been added explaining this to the user.


Bump JupyterLab support for 3.0 now that it is released

Does this mean that it will take a while till this package works in JupyterLab3 ? I upgraded to JupyterLab3 today and found that it was hard to get the jupyterlab_templates to work again.

Does this mean that it will take a while till this package works in JupyterLab3 ? I upgraded to JupyterLab3 today and found that it was hard to get the jupyterlab_templates to work again.

The server-side pieces should work out-of-the-box, even though jupyterlab 3.x switched to jupyter_server; however, it's recommended to use jupyter_server's API moving forward.
Here's a guide to help with making the switch: https://jupyter-server.readthedocs.io/en/latest/developers/extensions.html
Feel free to ping me if any questions come up.

The server-side pieces should work out-of-the-box, even though jupyterlab 3.x switched to jupyter_server; however, it's recommended to use jupyter_server's API moving forward.
Here's a guide to help with making the switch: https://jupyter-server.readthedocs.io/en/latest/developers/extensions.html
Feel free to ping me if any questions come up.

this was fixed in #102

this was fixed in #102


BDD example implementation

It would be a great help for me to have a few reference examples to work with.
The feature file I reference is here: _https://github.com/Humans-of-Julia/GraknClient.jl/blob/BDD--steps/test/behaviour/features/concept/thing/attribute.feature_

Connection example

Gherkin

Feature: Concept Attribute

  Background:
    Given connection does not have any database

Python

@step("connection does not have any database")
def step_impl(context: Context):
    assert len(context.client.databases().all()) == 0

Java

 @Given("connection does not have any database")
    public void connection_does_not_have_any_database() {
        super.connection_does_not_have_any_database();
    }

Julia # this should be correct perhaps

@given("connection does not have any database") do context
    @expect length(get_all(databases(context[:client]))) == 0
end

Put attribute example

Gherkin

  Background:
    # Write schema for the test scenarios
    Given put attribute type: is-alive, with value type: boolean

Java

  @When("{var} = attribute\\( ?{type_label} ?) as\\( ?boolean ?) put: {bool}")
    public void attribute_type_as_boolean_put(String var, String typeLabel, boolean value) {
        put(var, tx().concepts().getAttributeType(typeLabel).asBoolean().asRemote(tx()).put(value));
    }

Julia

@when("{var:Var} = attribute({type_label}) as(boolean) put: {value:Bool}") do context
    context[Symbol(var)] = [:tx(), :concepts(), get_attribute_type(:type_label::String), :as_remote(context[:tx()]), :as_boolean(), :put(value::bool)]
end

especially this is pretty surely wrong:
[:tx(), :concepts(), get_attribute_type(:type_label::String), :as_remote(context[:tx()]), :as_boolean(), :put(value::bool)]

entity Set owns attribute example

Gherkin

Feature: Concept Attribute

  Background:
    Given put entity type: person
    Given entity(person) set owns attribute type: is-alive

Java

    @When("{root_label}\\( ?{type_label} ?) set owns attribute type: {type_label}")
    public void thing_type_set_has_attribute_type(RootLabel rootLabel, String typeLabel, String attributeLabel) {
        AttributeType attributeType = tx().concepts().getAttributeType(attributeLabel);
        get_thing_type(rootLabel, typeLabel).asRemote(tx()).setOwns(attributeType);
    }

Julia suggestion from suggestmissingsteps

@given("entity(person) set owns attribute type: is-alive") do context
    @fail "Implement me"
end

Julia

@given("{root_label}({type_label}) set owns attribute type: {type_label}") do context
    @expect "Implement me"
end

These examples are pretty good.
Reviewing the source code, there are several static variables that are being mutated by steps.

For example, the sessions variable is being set by some steps:

So if we want to run them, we will probably need to do something similar. I'm unsure if it has to be global though (static in Java would be the same thing as global in Julia) unless the variables are needed across BDD test cases. On the safe side we can do that for now.
Finally, you can't possibly run these tests yet until the "concepts" work is done. I just reviewed those code today and I have some ideas. I may not get to them today but I hope to have something more concrete by next week.

yes, it's just the Julia syntax I'm not sure about how to approach in the cases I mentioned, that's why it would be great to see them translated, so I can orientate here.

I think we can close this issue. We have now a part of fully implemented BDD tests within the connection section of BDD tests of the client.


Post error message

We probably want autotest to postback something even if the message field is missing. Otherwise, it seems to the user that their commit is queued indefinitely.
Example:
https://github.com/SECapstone/secap_TQgit/commit/887a0a1ab9cf0f2deef74b8e8dfe7b46644c441e#commitcomment-30006065
Code:
https://github.com/ubccpsc/classy/blob/473ce7eaa161761b2a4c7c2207d7743f6c5d1429/packages/autotest/src/github/GitHubService.ts#L43-L46

This has actually already been reported in #3. I have seen this behaviour in the new SDMM deploy.

This code has all changed; let us hope this is resolved.


"Error : java.lang.Long cannot be cast to [B" when trying evalsha command with Pipeline

I know there are several "similar" issues, but none of the errors reported earlier (#663, for example) is the same as the one I am getting.
Versions: Jedis 2.6.2
Maven dependency :
<dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>2.6.2</version>
</dependency>

Redis Versions: Tested with both current unstable branch (3.1.999) and official release 2.8.13.
Code :
public List<Object> wowDude(int db, int choice) throws Exception {
        Jedis jedis = null;
        jedis = getJedis(db, choice, jedis);
        Pipeline pipeline = jedis.pipelined();
        pipeline.del("ping");
        pipeline.evalsha("4685a09f15d2b2532b034d340b80004349e4462b", 1, "lol", "omg245324", "___");
        pipeline.del("omg2");
        List<Object> list = pipeline.syncAndReturnAll();
        returnJedis(choice, jedis);
        return list;
}

where getJedis and returnJedis are simple methods that call getResourse() and returnResource() from / to the JedisPool, a static variable.
The lua script code is
-- first ensure number of keys to be 1 and number of arguments to be 2
-- first key - hash's name
-- first argument - key value
-- second argument - value to append
if ((table.getn(ARGV) == 2) and (table.getn(KEYS) == 1)) then
    if redis.call("HEXISTS", KEYS[1], ARGV[1]) == 1 then
        local val = redis.call("HGET", KEYS[1], ARGV[1])
        return redis.call("HSET", KEYS[1], ARGV[1], val..","..ARGV[2])
    else
        return redis.call("HSET", KEYS[1], ARGV[1], ARGV[2])
    end
end

and the sha1being passed through jedis is the same as the script load redis command and the sha1sum linux command of the above lua script.
The stack trace is:
ERROR com.testSuite.servlets.TestServlet3 [] -java.lang.Long cannot be cast to [B
" java.lang.ClassCastException: java.lang.Long cannot be cast to [B
    at redis.clients.jedis.BuilderFactory$5.build(BuilderFactory.java:56) ~[jedis-2.6.2.jar:?]
    at redis.clients.jedis.BuilderFactory$5.build(BuilderFactory.java:54) ~[jedis-2.6.2.jar:?]
    at redis.clients.jedis.Response.build(Response.java:50) ~[jedis-2.6.2.jar:?]
    at redis.clients.jedis.Response.get(Response.java:35) ~[jedis-2.6.2.jar:?]
    at redis.clients.jedis.Pipeline.syncAndReturnAll(Pipeline.java:105) ~[jedis-2.6.2.jar:?]
    at com.testSuite.utils.JedisClient.wowDude(JedisClient.java:317) ~[JedisClient.class:?]
    at com.testSuite.servlets.TestServlet3.doGet(TestServlet3.java:51) [TestServlet3.class:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) [servlet-api.jar:?]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) [servlet-api.jar:?]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) [catalina.jar:7.0.47]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.47]
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) [tomcat7-websocket.jar:7.0.47]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) [catalina.jar:7.0.47]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) [catalina.jar:7.0.47]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) [catalina.jar:7.0.47]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) [catalina.jar:7.0.47]
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:7.0.47]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) [catalina.jar:7.0.47]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.47]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) [catalina.jar:7.0.47]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) [catalina.jar:7.0.47]
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) [tomcat-coyote.jar:7.0.47]
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) [tomcat-coyote.jar:7.0.47]
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) [tomcat-coyote.jar:7.0.47]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [?:1.7.0_25]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [?:1.7.0_25]
    at java.lang.Thread.run(Thread.java:724) [?:1.7.0_25]

PS. The call succeeds (the value gets appended to the value of the key in the hash specified, but I get the error, while the list is being returned to me by syncAndReturnAll() function.
PPS. The error is not received if I call sync() instead of syncAndReturnAll() of Pipeline.java.
Also,
The error doesn't come if the lua script is modified to:
if ((table.getn(ARGV) == 2) and (table.getn(KEYS) == 1)) then
    if redis.call("HEXISTS", KEYS[1], ARGV[1]) == 1 then
        local val = redis.call("HGET", KEYS[1], ARGV[1])
        redis.call("HSET", KEYS[1], ARGV[1], val..","..ARGV[2])
    else
        redis.call("HSET", KEYS[1], ARGV[1], ARGV[2])
    end
end
return "str"  -- any constant string

Also, this has nothing to do with multi threading, as I have read in some previous issues, since this is a single get servlet call, that gets a resource from the pool, makes an evalsha call via pipeline, and returns the resource from the pool.
Moreover, the call succeeds (the value gets appended to the value of the key in the hash specified), but I get this error, which doesn't come up during the call to sync() .

It's known bug and already fixed by #607.
But it requires change of method signature, so with semver we're planning to apply fix to 3.0.0.
@xetorthio @marcosnils @nykolaslima
Maybe we should release 3.0.0 earlier cause it fixes some method signature issues which shows strange behavior.

@mayankdang You're encouraged to use eval without Pipeline. Sorry for inconvenience. ;(

huum...I'm not sure about it. Because if we release the 3.0.0, after it we will change the entire structure and will need to name it 4.0.
Since it's a bug fix, shouldn't be better to apply it to 2.7 even knowing it will change the method signature?
I believe it's better than let a known bug opened.

@nykolaslima
We will try our best to apply any breaking changes before releasing 3.0.0. So don't worry about 4.0 yet.
Btw, keeping compatibility between minor releases is very important.
I don't like such libraries which often break compatibility so I need to rewrite code when I update the library because of bugfix.
But it's important to let users know we're not recommended to use these methods now.
So how about this approach?
We can deprecate methods at 2.x with enough description, and restore methods at 3.0.0.
@xetorthio @marcosnils

But will we release 3.0.0 before other changes?

@nykolaslima
We're having issues or PRs with 3.0.0 milestone.
We will check milestone again when we feel it's time to release.

Hi @HeartSaVioR ,
I am presently using version 2.9.0 with the issue "java.lang.Long cannot be cast to [B".
Would like to the plan of releasing the fix.

Hello, all! I am using 2.8.1 and recently started to get ClassCastExceptions both ways:
java.lang.ClassCastException: [B cannot be cast to java.lang.Long
at redis.clients.jedis.Connection.getIntegerReply(Connection.java:222)
at redis.clients.jedis.Jedis.ttl(Jedis.java:308)
java.lang.ClassCastException: java.lang.Long cannot be cast to [B
at redis.clients.jedis.Connection.getBinaryBulkReply(Connection.java:216)
at redis.clients.jedis.Connection.getBulkReply(Connection.java:205)
at redis.clients.jedis.Jedis.hget(Jedis.java:622)
Everything worked fine until recent. Could you suggest what's happening?

@inponomarev this has been discussed extensively in the mailing lists and GH issues. Please refer to those sources to better diagnose your problem and find possible fixes

@marcosnils, thanks for your answer, I ran through all the web pages with 'cannot be cast to [B' phrase. I updated to 2.9.0. I use JedisPool and .close() in 'finally' block to return connections. I use setTestOnBorrow(true) in JedisPool configuration. Still the problem occurs from time to time.
I do admit it might be my fault, but the problem is that 'something cannot be cast to [B' message is not informative and it does not help to diagnose the issue. And as far as we can see from Google search, the same message puzzles many people. Maybe something could be done with this? Can it be more informative?

pom.xml
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>

When extracting from the LIST type, it is trying to convert it to the LONG side why.
Jedis jedis = // get Jedis instance
String cacheKey = "key";
Long len = jedis.llen(cacheKey);
if (len == null || len < 1) List<String> list = jedis.lrange(cacheKey, 0, len);

due to exception [java.lang.Long cannot be cast to java.util.List]
java.lang.ClassCastException: java.lang.Long cannot be cast to java.util.List
	at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:276) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.Connection.getMultiBulkReply(Connection.java:269) ~[jedis-2.9.0.jar:?]
	at redis.clients.jedis.Jedis.lrange(Jedis.java:935) ~[jedis-2.9.0.jar:?]

I do not know if it relates to this issue, if you know who caused the problem, would you please teach me?

Does anyone know about the above matter?

I had to investigate the issue myself debugging through Jedis code.
This issue occurs when Jedis receives an unexpected answer from Redis server, e. g.: Jedis tries to GET a value and expects binary answer, but instead it receives an integer from TTL call made by someone else.
The most probable cause is that one Jedis object is shared between multiple threads. Check your code thoroughly for this. But from time to time these problems occur with no visible cause. I use
poolConfig.setTestOnBorrow(true);
poolConfig.setTestOnCreate(true);

This forces Jedis to call PING every time the connection is requested from pool and in case this exception occurs, just reconnect. This seems to me like suppressing the real problem. There is a problem with Jedis. At least something can be done to make 'Foo cannot be cast to Bar' exception more informative.

I saw https://github.com/xetorthio/jedis/wiki/Getting-started#using-jedis-in-a-multithreaded-environment and wrote below code.
try (Jedis jedis = pool.getResource()) {
// jedis actions
}

Facing same issue as @inponomarev.  Version 2.9.0. Happens with certain level of concurrency. It happens very intermittently and I couldn't replicate


The app crashes due to NullPointerException

Describe the bug
After integrating the AppsFlyer SDK into our Flutter app, some Android users experience crashes. No special actions are required from the user to reproduce the bug. This issue is similar to #322 but our app doesn't use deeplinks and has a different call stack.
Callstack:
Exception java.lang.NullPointerException:
  at com.appsflyer.appsflyersdk.AppsflyerSdkPlugin$5$1.run (AppsflyerSdkPlugin.java:384)
  at android.os.Handler.handleCallback (Handler.java:914)
  at android.os.Handler.dispatchMessage (Handler.java:100)
  at android.os.Looper.loop (Looper.java:224)
  at android.app.ActivityThread.main (ActivityThread.java:7551)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:539)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:995)

To Reproduce
We cannot identify specific reproducible steps; the issue occurs unexpectedly.
Expected behavior
The app should work without crashes.
Screenshots
Callstack from Sentry:

Smartphone:

Device: Redmi begonia (Redmi Note 8 Pro)
OS: Android 11 (SDK 30)

Additional context
AppsFlyer SDK version: 6.13.2+1
Flutter version: 3.13.9 (stable)
Engine revision 0545f8705d
Dart version: 3.1.5
DevTools version: 2.25.0
IDE: VS Code (version 1.90.2)

the same problem.

We are facing the same problem too and we are using appsflyer_sdk (6.14.3).

As a quick fix we reverted our AppsFlyer version update back to 6.13.0+1.
We never had those crashes with that version but keep in mind that deferred deep links won't work for you on iOS with that version of AppsFlyer. They will on Android though.

I conacted with support. Their response:
"I discussed this issue the mobile team and based on the error trace and shared code snippet It seems like we have an issue with the new startSDK method with onSuccess and onError callbacks here. As a workaround, we can suggest removing the callbacks on the Flutter side if they are not in use in your app logic and using startSDK without the callback."
I'll try this workaround. Maybe it will help someone too.

Release of new package version should resolve this problem https://github.com/AppsFlyerSDK/appsflyer-flutter-plugin/releases/tag/v6.15.2


Fix coding style of phpcas

Running phpcs on phpcas has show a lot of coding style deficiencies. They should be corrected so that we can work on becoming a PEAR package at some point.

I have added the first few commits of style fixes and will go through all files over the next few days.  The changes are all just documentation, naming standards and indentation.

Looking good.

I did a lot more refactoring and style correction. I have also tried to fix the @author tags for all major contributors. Any comments or suggestions are welcome.
The only outstanding errors are in the Client.php class and /test. They will be fixed in the next few days.
I have not yet bothered to fix warning on a global level. Maybe later ;)

I think i'm pretty much done with most of the changes
There is only one outstanding error: The naming of the main class "phpCAS" does not conform to the PEAR naming standard but that would be a heavy api change and can't be part of 1.3 anyway.
So we are down to 1 ERROR and ~400 Warning due to being over 85 chars in a single. Nothing major bot very tedious manual work which i will continue to work on over the next few days and weeks.

Closing this issue and i'm opening an new issue for the warnings.


Document enhancement request

Disable shadow copying
does not mention changing properties to enable copying xunit.runner.json to the bin folder where xUnit.net runners can find it.
cref:
Configuring xUnit.net with JSON
Step 2. change setting for Copy to Output directory to Copy if newer

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

ID: 77889d43-fedb-f8b4-8fea-379ec946555c
Version Independent ID: f499b131-8b14-7e10-1728-543fdd5a5656
Content: Integration tests in ASP.NET Core
Content Source: aspnetcore/test/integration-tests.md
Product: aspnet-core
Technology: aspnetcore-test
GitHub Login: @guardrex
Microsoft Alias: riande

Thanks @RandyDaddis ... It's in the sample app but not in the topic, so I'll add a bit on that.
<ItemGroup>
  <Content Update="xunit.runner.json">
    <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  </Content>
</ItemGroup>


Cannot create a list of Picker.items using Array.from() but it works when hardcoding the Array

[X] I have reviewed the documentation
[X] I have searched existing issues
[X] I am using the latest React Native version

I have a Picker component that does not seem to allow creation of Picker.item using Array.from()
Here is the code:
  renderHourPicker = () => {
    return (
      <Picker
        enabled
        testID="hourPicker"
        style={this.inputStyles()}
        selectedValue={this.state.currentHour}
        onValueChange={text => this.handleHourChange(text)}
      >
        {Array.from(Array(12).keys()).map(item => (
          <Picker.Item key={item + 1} label={`${item + 1}`} value={item + 1} />
        ))}
        {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(item => (
          <Picker.Item key={item + 1} label={`${item + 1}`} value={item + 1} />
        ))}

      </Picker>
    )
  }

The first one does not work, but the second one does. I have tried several combinations that all output an Array, but it only seems to work with an Array literal.
In my testing in REPL.it, both seem to output the same thing:
const doesntWork = Array.from(Array(12).keys())

const works = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]

console.log(doesntWork)

console.log(works)

It's not a big problem for me, but I figured I should report it since it is likely not intended.
Environment

Environment:
OS: Windows 10
Node: 8.6.0
Yarn: 0.21.3
npm: 5.6.0
Watchman: Not Found
Xcode: N/A
Android Studio: Version  <IP_ADDRESS> AI-162.4069837
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: ~0.55.2 => 0.55.4
Steps to Reproduce

It should be reproducible in a greenfield app.
import { Picker } from 'react-native'

      <Picker
        enabled
        testID="hourPicker"
        style={{ width: 50, height: 50 }}
        selectedValue={this.state.currentHour}
        onValueChange={text => this.setState({ currentHour: +text })}
      >
        {Array.from(Array(12).keys()).map(item => (
          <Picker.Item key={item + 1} label={`${item + 1}`} value={item + 1} />
        ))}
        {[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11].map(item => (
          <Picker.Item key={item + 1} label={`${item + 1}`} value={item + 1} />
        ))}

      </Picker>

I am using Android emulator through Android Studio, so be aware of the Android distinction. Good luck to you on this task.
This also didnt work:
        [...Array(10).keys()].map(item => (
          <Picker.Item key={item + 1} label={`${item + 1}`} value={item + 1} />
        ))}

This here actually looks like it could be related: https://stackoverflow.com/questions/39924644/es6-generate-an-array-of-numbers
Quote:

It seems the problem is that codepen precompiles your code using babel es2015-loose.
In that mode, your
[...Array(10).keys()];
becomes
[].concat(Array(10).keys());
And that's why you see an array containing an iterator.

AHA, this worked:
        Array.from(Array(12), (_,x) => x).map(item => (
          <Picker.Item key={item + 1} label={`${item + 1}`} value={item + 1} />
        ))}

Expected Behavior

Array.from(Array(12).keys()) should produce an Array that can be mapped over to create 12 Picker entries.
Actual Behavior

Array.from(Array(12).keys()) causes a Picker with zero entries to be rendered.
I added more info into the Steps to Reproduce section. Please let me know some informed reasoning about why this doesn't work. I think that:

Array.from(Array(12).keys())
[...Array(10).keys()]

should work because you can chain map onto them. As such, them not working in react-native through create-react-native-app is unexpected.


uniform json function call and fix jit-uuid no call seed

case 1
submit a5449f0e82258cac5bd812c0edf3bd243a862ded and 1e576b0b6a305ed8eda224bfdee6a4e04f498b48  for json function call uniform
I added support for lua-resty-json, and it does not matter if there is no dylibs
case 2 (I tested no problem in centos)
submit ba682c8fad7f1eec08e135f86e81b93591e44ee3  to solve the primary key duplication systems appear on mac
error msg:
Duplicate entry '2e41eb51-145a-4b06-adbe-8d1e22087fb0' for key 'unique_key

source by lua-resty-jit-uuid
http {
    init_worker_by_lua_block {
        local uuid = require 'resty.jit-uuid'
        uuid.seed() -- very important!
    }

    server {
        location / {
            content_by_lua_block {
                local uuid = require 'resty.jit-uuid'
                ngx.say(uuid())
            }
        }
    }
}

although not solve any problems, but I think this is good .. 😄

for your case 2
if you set lua_code_cache on, no duplicate IDs will be generated. if not, uuid.seed() should be invoked explicitly every times. so your commit about this point would be ok because there is no performance issue about new_id() for Orange now.
for you case 1
what's the difference between cjson and the new orange/lib/json_decoder.lua? is there any performance or installation issue about this library?
this pr should be considered carefully for it's a big change for JSON decoder/encoder.

@sumory  okay, I'll test it first. thank you


(FACT-1123) Adding acceptance test for facter with invalid locale

This commit adds an acceptance test to make sure facter is not crashing
when locale is set to an invalid value

You could use [skip ci] on this.

@MikaelSmith Restricted the acceptable exit code to 0.
The warning message is actually printed out to stderr, not stdout and I added a check for text "WARN" in the stderr.
There is not anything specific that we can check for in stdout.

Opened a new PR against stable with @branan's concerns addressed: https://github.com/puppetlabs/facter/pull/1088


added mraa_strresult function

https://github.com/eclipse/mraa/issues/1027

Do I need to do anything else? One travis says that build failed and the other one says success

The CI system can stuck on pulling the build containers at time, but this is looking good and ready to go now for the next release.


app does not tell you your channel is not ready for published claims

Currently, You can create a channel and attempt to publish a claim in that channel, but it fails.
Dropzone or other publish tools should notify you that publishing is disabled until channel is confirmed.
Later publishes can be put into a queue.

The channel doesn't need to be confirmed, but it does take a couple seconds (in my experience up to 3/5) to be able to publish after creation. I wonder if this can be improved with a --blocking flag on more calls... @eukreign?
See also https://github.com/lbryio/lbry/issues/1394


Teensyduino package contains broken teensy-loader

Describe the bug
The Teensyduino package contains a broken "teensy" binary (i.e. the Teensy Loader.)
It looks like there are libs missing from the resulting binary meaning code cannot be uploaded to the Teensy device.
$ ./teensy
./teensy: error while loading shared libraries: libcairo.so.2: cannot open shared object file: No such file or directory

To Reproduce
Steps to reproduce the behavior:

Install Teensyduino
Navigate to package directory
Try to launch ./share/arduino/hardware/tools/teensy

Expected behavior
The binary should launch properly and without errors.
Metadata

system: "x86_64-linux"
host os: Linux 5.4.1, NixOS, 20.03pre204199.3140fa89c51 (Markhor)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.1
channels(root): "nixos-20.03pre204199.3140fa89c51, nixos-small-20.03pre202450.96c374f3bd1"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Ostensibly fixed by #81156, though bumping teensyduino to 1.51 or later may also be necessary to fix additional issues


add howto on signing ssh keys for temporary access

Disclaimer: I am not the author of the linked post, but stumbled upon it a few days ago and thought it might be a nice fit.

Nice, thank you


Fixed issues when copying sheets

Sheet name length could exceed 31 char
Sheet name could take into account another sheet name that contains but not starts with the name (sheets: ABCD(Copy), BCD; copying BCD results in BCD(Copy2))

Thanks


Bug: Importing a drawing from browser causes console error/blank popup

Describe the bug
Running v0.29.3 ... Trying to import from the browser in the drawing editor doesn't work. You get a blank popup and a console error.
Steps To Reproduce
Steps to reproduce the behavior:

Start editing a wiki page
Click on the drawing editor icon in the WYSIWYG editor
When the editor loads, select FILE, IMPORT FROM BROWSER
See error

Expected behavior
Not sure, as it never gets that far :)
Screenshots

Your Configuration (please complete the following information):

v0.29.3
PHP Version: 7.3.18
Apache

Additional context
None

Have given this a test on Firefox and Chrome, Looks like it may have been an issue on the diagrams.net side which has since been resolved; The popup now displays (Albeit without any files). Will therefore close this off.


Merge refs/heads/update-dependencies into alpha

Merge refs/heads/update-dependencies into alpha

This PR has been merged into alpha and tagged as 2.0.0-alpha-202308291236. Thanks for your contribution!


Support Document and Image as parameter

Is your feature request related to a problem? Please describe.
It would be nice to be able to attach an image and ask the LLM to describe it
Describe the feature you'd like
More and more LLM has vision feature, it would be nice to leverage this capabilities directly in the chat
Additional context
Add any other context or screenshots about the feature request here.

It is possible already, the only fix I needed to do for images is here: https://github.com/aws-samples/bedrock-access-gateway/pull/80


Support Occlusion Image in AvsCamera

Add support for 3rd Party Image Occlusion for an example for how to add an Image file to the system

Updating AvsCamera to include support for Driver based Image Occlusion for Rear camera, and Platform based Image Occlusion for Front Camera

HKR,,EnableImageReplacement,%REG_DWORD%,1

Should the sample have the optional CameraImageBackgroundColor as well?

Refers to: avstream/avscamera/sys/avscamera.inx:71 in 67aa1d4. [](commit_id = 67aa1d400af6f7666d6823103150b734379f6d31, deletion_comment = False)

Btw. Sample changes would go to develop branch normally.  Right now is a special situation where main and develop happens to be identical, so no big deal.


day 22

did anyone face an issue while associating iam -oidc ?
eksctl utils associate-iam-oidc-provider --cluster demo-cluster --approve
Error: unable to describe cluster control plane: operation error EKS: DescribeCluster, https response error StatusCode: 404, RequestID: a363bb46-4db6-49e2-a810-b8af86d3f65c, ResourceNotFoundException: No cluster found for name: demo-cluster.

.Try solving the issue by providing the --region parameter. I faced the same problem and this worked for me..


New notification state

IMPORTANT: Before you create an issue, please take a look at our Issue Reporting Guide.
Briefly summarize your issue:
The AVS SDK declared that it has passed the AVS certification. But how does it pass the new notification test?
The Certification requires there is a LED display for new notification, but actually there is only a Notification queued state in the SDK right now.
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
[ ] Other - tell us more:

Tell us about your OS (Type & version):

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

Hi @subjectxbj,
The UIManager implements the NotificationsObserverInterface and is subscribed to onSetIndicator() updates. I tested with a sample notification, and the Notifications Capability Agent is correctly notifying it's observers. The following mimicking an "LED on" state was printed by the UIManager:
################################################
NOTIFICATION INDICATOR STATE: ON
################################################
Can you elaborate what you mean by "there is only a Notification queued state in the SDK right now." ?

Thanks for raising this!
The understanding is that you may optionally display a different "notifications arrived" visual indicator than the persisted visual indicator when you first receive a notification. However, having the same cue for both states is still acceptable. There would be little purpose for the SDK to have a separate logical state for this (something like IndicatorState::INITIAL), as the state transition is not in the control of the Notifications capability agent. It is entirely dependent on when the visual indicator renderer has rendered the initial "notification arrived" indicator, and will now need to render the persisted "notification queued" indicator.
Are you having troubles with the certification process due to this? If so, there appears to be some ambiguity around the expectations, and we can investigate and clarify.

The certification team first raised this as a Blocker Issue. After we told them that SDK does not support this, then they are ok with it now. Thanks.


Updates to avatar appearance

some minor UI tweaks to the avatar views:

Lighter contributor font, let's do a font-weight of 300
"Release Maintainers & Contributors" is too wordy. Open to suggestions...
Remove the green from the new contributors, make it like a regular contributor, and change it to  "Contributor - New" as the text.
Have the maintainers first, but in the same row as the contributors, but the author should be on a seperate row
Even if there is no release update the Author and maintainer should still be displayed if available. let's make the font-weight 400

Maybe just "Release Contributors" instead of "Maintainers & Contributors"?


TPI: Test Debug Python File in Editor Menu

Refs: https://github.com/microsoft/vscode-python-debugger/issues/137

[x] macOS @sandy081
[x] linux @roblourens
[x] windows @minsa110

Complexity: 3
Create Issue

Prerequisites:

Install the debugpy extension.
Install Python

Part 1: Test  Debug Python File

Open a python file that you want to debug.
On the top right you will see a play button with an arrow, click the arrow and then click: Python Debugger: Debug Python File
You can add breakpoints and make sure that the debug works properly.

Part 2: Test  Debug Python File with launch.json(no config set)

Open a python file that you want to debug. (Make sure that you don't have a launch.json config already set)
On the top right you will see a play button with an arrow, click the arrow and then click: Python Debugger: Debug using launch.json
Make sure a prompt is displayed to create a launch.json. Follow the steps.
Make sure that a launch.json is created and the debugger runs properly.

Part 3: Test  Debug Python File with launch.json (config already set)

Open a python file that you want to debug. (Make sure that you have a launch.json config already set)
On the top right you will see a play button with an arrow, click the arrow and then click: Python Debugger: Debug using launch.json
Make sure a prompt is displayed that shows all the configurations that you already have. Choose the one that you want to run.
Make sure that the debugger runs properly.

added notes on #137 that this has a bug

I am running into this issue still using VSCode 1.89.0 and Pythong Debugger v2024.4.0. When specifying a venv path in launch.json using the python key, I get this error:
Couldn't spawn debuggee: [Errno 13] Permission denied: '/Users/username/dev/path/to/venv/.venv'

Command line:['/Users/username/dev/path/to/venv/.venv', '/Users/username/.vscode/extensions/ms-python.debugpy-2024.4.0-darwin-arm64/bundled/libs/debugpy/adapter/../../debugpy/launcher/../../debugpy', '--connect', '<IP_ADDRESS>:65413', '--configure-qt', 'none', '--adapter-access-token', '05382419ede9abcc4130840e65382fc18a1a4ada562a15a13131d3c56c4607be', '/Users/username/dev/path/to/venv/manage.py', 'runserver']


Crash in SoftDeletableListener

The call to class_uses_recursive here is blowing up for me when using orphan removal:
https://github.com/mitchellvanw/laravel-doctrine/blob/develop/src/EventListeners/SoftDeletableListener.php#L30
class_uses_recursive is expecting a fully qualified class name as a string, but an actual entity is being passed in, which blows up when Laravel is trying to use it as a key here:
https://github.com/laravel/framework/blob/master/src/Illuminate/Support/helpers.php#L352

Closing because project is no longer maintained. Thanks.


Outdated property names

Outdated property names?

Thanks @cxmcc, can you fill out http://druid.io/community/cla.html?

Done


Segmentation fault in XIFreeDeviceInfo

This was posted on jwilm/alacritty#895:

Version: master branch, revision f68558e9dcce97e0d4d842a2d5b62e31e4124210
I ran it with rust-gdb ./target/debug/alacritty, waited for the crash, and got this backtrace:

Thread 1 "alacritty" received signal SIGSEGV, Segmentation fault.
0x00007ffff363b9fc in XIFreeDeviceInfo () from /usr/lib/libXi.so.6
(gdb) bt
#0  0x00007ffff363b9fc in XIFreeDeviceInfo () from /usr/lib/libXi.so.6
#1  0x0000555555d86967 in winit::platform::platform::x11::{{impl}}::drop (self=0x7fffffff5070)
    at /home/mrmetric/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/platform/linux/x11/mod.rs:641
#2  0x0000555555d54395 in core::ptr::drop_in_place<winit::platform::platform::x11::DeviceInfo> () at /checkout/src/libcore/ptr.rs:60
#3  0x0000555555d86353 in winit::platform::platform::x11::EventsLoop::init_device (self=0x7fffffff8768, device=17)
    at /home/mrmetric/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/platform/linux/x11/mod.rs:575
#4  0x0000555555745c9a in winit::platform::platform::x11::EventsLoop::process_event<&mut closure> (self=0x7fffffff8768, xev=0x7fffffff7818, callback=0x7fffffff78e0)
    at /home/mrmetric/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/platform/linux/x11/mod.rs:553
#5  0x0000555555742313 in winit::platform::platform::x11::EventsLoop::run_forever<closure> (self=0x7fffffff8768, callback=closure = {...})
    at /home/mrmetric/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/platform/linux/x11/mod.rs:174
#6  0x000055555574201a in winit::platform::platform::EventsLoop::run_forever<closure> (self=0x7fffffff8760, callback=closure = {...})
    at /home/mrmetric/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/platform/linux/mod.rs:387
#7  0x0000555555741e5d in winit::EventsLoop::run_forever<closure> (self=0x7fffffff8760, callback=closure = {...})
    at /home/mrmetric/.cargo/registry/src/github.com-1ecc6299db9ec823/winit-0.7.6/src/lib.rs:219
#8  0x000055555579d7ed in alacritty::window::Window::wait_events<closure> (self=0x7fffffff8760, func=closure = {...}) at /home/mrmetric/Downloads/source/alacritty/src/window.rs:274
#9  0x00005555556b0101 in alacritty::event::Processor<alacritty::event_loop::Notifier>::process_events<alacritty::event_loop::Notifier> (self=0x7fffffffc178, term=0x7fffef8d5e10,
    window=0x7fffffff8760) at /home/mrmetric/Downloads/source/alacritty/src/event.rs:375
#10 0x00005555557a0f52 in alacritty::run (config=Config = {...}, options=Options = {...}) at src/main.rs:170
#11 0x000055555579faac in alacritty::main () at src/main.rs:45

I haven't had a chance to look at it myself yet.

Hm, we don't check that XIQueryDevice succeeds, so we could easily be calling XIFreeDeviceInfo on a null pointer. I'll fix that, and hopefully that will help.

Does this still happen using the latest Alacritty?

I just updated. One week from now, I will tell you whether or not it has crashed.

Alacritty has been open since I posted that message (and still is). No crashes.

Awesome! Can we consider this resolved?

I believe so


Only include the bits of lodash that are actually needed

I made the change you suggested to use parts of lodash from the main lodash package instead of requiring separate packages for each function.

Re-reading it now my first commit message was a little aggressive. I think "just to get some icons" wasn't exactly that best way to end it. Sorry, not meant that way, thanks for writing the releasing this package!

Made some tests and this saves about 34K from the generated bundle size if lodash isn't used anywhere else :+1:
I'd wish for uglify to get better at detecting dead code :-)


stockfish.online - free api in FEN notation

          stockfish.online - free api in FEN notation

Originally posted by @miroslavkadidlo in https://github.com/miroslavkadidlo/chess-bot/issues/6#issuecomment-1786208904

FEN notation function needed for request to stockfish.online

REST api controller


Tailwind Flex Box Responsive Grid with Cards issue

Hey I'm having issues with tailwind and responsive cards inside flex/flex-wrap
cant seem to get it to work
i put up a question on stackoverflow as well but didnt get any answers yet : https://stackoverflow.com/questions/56226109/tailwind-flex-box-responsive-grid-with-cards-issue
code+images there
can someone help me understand?

Have you tried recreating it without tailwind, just using flexbox css? You may realize you just have a flexbox question and not a tailwindcss question.

It's because of the extra margins, w-1/3 means ~ width: 33.3333% If you add a margin on top of it, three can't fit in one line.
There are alternative ways (widths taking into account the gutter or gap), but in exactly this case you could just use padding instead of margins, because you already have a presentational wrapping element around your cards.
Example: https://codepen.io/tlgreg/pen/RmLMOx
Not related, but few notes looking at your code:

Unless you use the old color palette in the config, grey-darker will not work.
img is block by default in v1.
invisible and lg:visible changes visibility, the header will take up space, if that not what you want, it should be hidden and lg:flex.

This is the nature of any grid layout in css. Check out Adam's examples in the documentation. Scroll down to the "column spacing" section.


rework Table e2e tests to remove flakiness

There were two e2e tests that were flaky in
test/e2e/tests/test_table.py.
The flakiest test was test_enable_ttl, which often would result in the following:
>       assert ttl["TimeToLiveDescription"]["AttributeName"] == "ForumName"
E       KeyError: 'AttributeName'

tests/test_table.py:158: KeyError

This was caused by the dynamodb client describe_time_to_live returning a ResourceNotFoundException when the Table was not in ACTIVE status. I updated the test to first wait until the Table became ACTIVE before attempting to read the TTL information.
The second flaky test was the test_table_update_tags. The sleep after calling the kubectl patch with the updated tags was too short at 5 seconds since it sometimes takes a little while for the tags to appear in the Tagris APIs. Increasing this sleep to 10 fixes this flakiness.
Issue aws-controllers-k8s/community#1561
Signed-off-by: Jay Pipes<EMAIL_ADDRESS>By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/test dynamodb-kind-e2e

/test dynamodb-kind-e2e

/test dynamodb-kind-e2e

/test dynamodb-kind-e2e

/retest

/lgtm


incremental analysis doesn't show warnings after deleting a quotation mark

To reproduce in Atom, paste this into a file:
class Problem {
  final Map location;
  final String message;

  Problem(Map json)
      : location = json["location"],
        message = json["message"];
}

Delete the last quotation mark surrounding "location"
Since the file does not parse, it will show several errors, starting with "Unterminated string literal".
However, if you now reanalyze sources, it will show an additional error:
Undefined name 'json' - test.dart, line 6
So, incremental analysis and full analysis don't agree.
The original example was with a larger file where many more warnings show up after a full analysis.
(Found via stress test.)

https://codereview.chromium.org/1605263002

https://github.com/dart-lang/sdk/commit/23e9fbcf3041d2b0a089f128b2841750c3020786


Convention for lens declarations

Is there any convention for declaring lenses?
Considering the following example:
type Foo =
    { aValue : int
      bValue : int }

[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Foo =
    module Lens =
        let aValue:Lens<_,_> =  (fun foo -> foo.aValue), (fun aValue x -> { x with aValue = aValue })
        let bValue:Lens<_,_> =  (fun foo -> foo.bValue), (fun bValue x -> { x with bValue = bValue })

Several questions arise:

Do we want to put the lenses into a Lens submodule?
Do we suffix them with 'Lens'? (I've seen aValue_ in the Foo module before, but that seems a bit opaque.)
Do we use the shorthand v and x ? (The names are hidden as they're lambdas anyway the Lens<_,_>)

Having some conventions here might make these more discoverable, at least until they're introduced as a first class language feature.

@kolektiv Any feedback on this?

I've tended, when implementing lenses on types, to add them as static members of that type. That's not totally satisfying though, as lenses that you then compose live as simple let bindings, and so you have two different places. It's tricky with F# naming standards/conventions to provide the right choice.
I've tended to settle on static type members for the lens components, which are as accessible as the type, and the composed lenses as let declarations as they tend to be local and private or internal.
The Haskell convention of underscores I actually like, but it's not very F# like (I've reluctantly tried to be fairly mainstream!)
I've also always just used x as a variable in the lenses, and the first letter of the field for the value, in the case of records.
The only convention i've also got is suffixing the lenses (whether static type members or let declarations) with Lens or PLens. It's a bit verbose, but seemed sensible enough.
There is an argument that the few existing lenses provided (mapPLens etc.) should probably be renamed to something like Map.keyPLens or something similar. Opinions welcome!

Perhaps @dsyme might have some input here?

http://suave.io has conventions for declaring functional properties as first class values which I'd encourage you to follow.  See
https://github.com/SuaveIO/suave/blob/cc8ea78df964d10c6d2820ae6074a9432283a7d9/src/Suave/Utils/Collections.fs#L37
https://github.com/SuaveIO/suave/blob/cc8ea78df964d10c6d2820ae6074a9432283a7d9/src/Suave/Sockets/SocketBinding.fs#L23

That's interesting, the underscore suffix seems counter to expectation!
Having an underscore suffixed property for a lens may be worthwhile.
I think the difficult one is the composition of multiple lenses, where the
resultant composition isn't specific to a single type. That can only really
be a let decl, but whether it should perhaps be placed in a suitably named
module with [] is open to debate. Possibly yes, if
they're not private or otherwise locally scoped.
On 10 July 2015 at 12:25, Don Syme<EMAIL_ADDRESS>wrote:

http://suave.io has conventions for declaring functional properties as
first class values which I'd encourage you to follow. See
https://github.com/SuaveIO/suave/blob/cc8ea78df964d10c6d2820ae6074a9432283a7d9/src/Suave/Utils/Collections.fs#L37
https://github.com/SuaveIO/suave/blob/cc8ea78df964d10c6d2820ae6074a9432283a7d9/src/Suave/Sockets/SocketBinding.fs#L23
—
Reply to this email directly or view it on GitHub
https://github.com/xyncro/aether/issues/15#issuecomment-120388781.

@kolektiv - Correct, I don't have any specific guidelines about where to locate compositions - my main first concern is to get some regularity with nominal type design.

I think we're roughly OK with the basics there, so we have type definitions
in a similar sense to Suave:
https://github.com/xyncro/aether/blob/master/src/Aether/Aether.fs#L11-L22
However, there's an argument that we should move these lenses in to a set
of suitable namespaces:
https://github.com/xyncro/aether/blob/master/src/Aether/Aether.fs#L119-L147
In terms of the lenses as part of types themselves, our current approach is
static members, so a record with field MyField will have a lens something
like static member MyFieldLens =... (Or MyFieldPLens for a partial
lens). Does that seem sane, or would a convention with different
casing/underscores/other be better?
Compositions are just tricky, I'm not sure there's a solution to that which
will fit with common F# convention right now, as we don't tend to use
"naked" declarations as much as e.g. Haskell...
On 10 July 2015 at 12:40, Don Syme<EMAIL_ADDRESS>wrote:

@kolektiv https://github.com/kolektiv - Correct, I don't have any
specific guidelines about where to locate compositions - my main first
concern is to get some regularity with nominal type design.
—
Reply to this email directly or view it on GitHub
https://github.com/xyncro/aether/issues/15#issuecomment-120392347.

The underscore is certainly much terser; even if it's not immediately obvious, I'd prefer that as it will cut down on boilerplate.
I've noticed that you're referring to lenses as functional properties.
Is this a term you want to standardize in F#? To what extent would you be behind renaming Aether's Lenses to Properties?
I do greatly prefer the name Lens for two reasons:

It differentiates significantly from traditional properties which do actually exist in F# as well.
It has a clear meaning in the context of functional programming.

I suspect if we called them Lenses, all we'd really need would be an article on http://fsharpforfunandprofit.com/ or similar to get the community familiar with the naming of the concept.
They're incredibly powerful, and I'd like eventually like to see them as a first class language feature.

Yes, I'm not 100% committed to the "Lens" terminology - I don't mind it but for Suave I think it would have been a needles conceptual barrier of entry.  I do feel that the terminology "functional property" is entirely natural and needs no explanation.
I don't mind it if beginners later discover a Lens framework and the first thing they read is "functional properties are just very simple lenses, now lets compose them".
So my preference for an F# property P is to use P_ with type Property<'T,'P>, using a type equivalence to a tuple of functions precisely as in Suave.  The use of a type equivalence means that they will be compatible with a Lens framework and terminology.

Thanks for the clear explanation, Don.
If we define Functional Property as a special kind of lens it's going to be pretty easy to tell people new to Aether that "functional properties = total lenses".
I'll try to draft up some documentation on standards for lens functional property declarations as a PR, based on your guidelines.

I have to admit to some level of nervousness about that, as I'm not totally sure it covers all the cases. In terms of syntax, a property P having a lens P_ where P_ is a total lens is ok, but do we have an equivalent for a partial lens? Can we cater for that in conventions?
Saying that all lenses are properties might be pushing it as well - lenses for head and tail of a list for example might stretch that definition (although I suppose List does have Head and Tail instance properties - the lenses would be partial however). Lenses as a family of topics would also cover morphisms and partial morphisms (prisms) which we have, but wouldn't have a syntactical convention for.
I wonder whether calling a specific subset of a thing "functional properties" might cause more confusion in the long run? Just thinking out loud, and am certainly capable of seeing other viewpoints!

I think it's good that you're concerned with terminological accuracy, @kolektiv. However, I do think we need to consider the typical users of Aether versus F# as a whole.
Don is trying to make things simple and clear to beginner F# programmers.The idea of 'functional properties' is readily understandable to anyone who knows C# properties or traditional getter/setter method pairs.
I could be overestimating the complexity, but it strikes me that Aether is probably not a library that's going to be used beginners in F#.
Given that Aether is aimed at more advanced FP users, it seems perfectly fine for Aether to define itself as a lens library. We can get the best of both worlds by clearly indicating in the documentation the relation between functional properties and the more general concept of lenses.
I don't think we need to be overly concerned with syntactic conventions for partial lenses and isomorphisms. While I'm open to proposals on that, I suspect their usage will be vastly less common than functional properties.

I've spotted a potential problem with the static member approach as outlined:
open System
open System.Diagnostics

type Foo =
    { someField : string }
    static member someField_ = (fun x -> x.someField), (fun v x -> { x with someField = v })

module FooModule =
    let someField_ = (fun x -> x.someField), (fun v x -> { x with someField = v })

let benchmark msg f =
    let sw = Stopwatch()
    sw.Start()
    for i = 0 to 10000000 do
        f()
    sw.Stop()
    printfn "%s took: %d" msg sw.ElapsedMilliseconds

[<EntryPoint>]
let main _ =
    let foo = { someField = "value" }
    let useModule() = fst FooModule.someField_ foo |> ignore
    benchmark "module function" useModule
    let useMember() = fst Foo.someField_ foo |> ignore
    benchmark "static member" useMember
    Console.Read() |> ignore
    0

On Windows using .net 4.5.1, I get the following output:
module function took: 237
static member took: 488

As you can see, there's a not-insignificant performance difference between these.
The reason this occurs is because static members are evaluated each time, while module let bindings are not.
Factoring in GC in addition to the overhead, it seems like it's going to be quite a bit less efficient compared to the module-level let bindings.

I don't mind the use of a Foo module, it's more the naming I'm interested in.  Ideally the performance would be just as good in either case though, it would be nice to see an F# compiler optimization to make that so.

Based on what we've discussed so far, I'd like to propose the following as conventions for Aether, and beyond that, for a possible PR to the component design guidelines:
Normal F# code:
// These should probably be included in F# core.
type Property<'T, 'P> = ('T -> 'P) * ('P -> 'T -> 'T)
let Property<'T, 'P> getter setter : Property<'T, 'P> = (getter, setter)

type Foo =
    { someField : string
      anotherField : string }

[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Foo =
    let someField_ = Property (fun x -> x.someField) (fun v x -> { x with someField = v })
    let anotherField_ = Property (fun x -> x.anotherField) (fun v x -> { x with anotherField = v })

In this case, someField_ will have the type Property<Foo,string>.
This is type equivalent to (Foo -> string) * (string -> Foo -> Foo)

And if you're using Aether:
// These should be included in the Aether namespace.
type Lens<'T, 'P> = Property<'T, 'P>
let Lens<'T, 'P> getter setter : Lens<'T, 'P> = (getter, setter)

type Foo' =
    { someField : string
      anotherField : string }

[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module Foo' =
    let someField_ = Lens (fun x -> x.someField) (fun v x -> { x with someField = v })
    let anotherField_ = Lens (fun x -> x.anotherField) (fun v x -> { x with anotherField = v })

In this case, someField_ will have the type Lens<Foo,string>.
This is type equivalent to (Foo -> string) * (string -> Foo -> Foo)

Doing it this way should give us the best of both worlds - we have a simple way way to declare functional properties which actual Aether lens declarations would match in both name and type (through type equivalence).

In terms of the broader picture, I can see the sense in defining a Property<'a,'b> type (I don't know what the criteria for getting something like that in to FSharp.Core is though).
The convention in terms of a module seems reasonable, although I would like to suggest that in the Aether case it's considered equally valid to have a static type member despite the performance. This is because lenses are most useful in cases with a complex type hierarchy, each of which exposes lenses. If we're saying that each type would need an equivalent module, that would be extremely verbose. Making it so that both approaches are valid seems reasonable given that (opinions welcome). A Property always being <Type Name/Matching Module Name>.<Property Name>_ seems ok to me, I think.
However, it leaves a few questions around Aether, as we obviously have more than just properties, and it would be nice to have conventions which could cope with that. Partial lenses (or partial properties), in many cases, actually turn out to be far more common than total ones in many of the cases I've been working with, so covering that case seems sensible.
About all I can think of is the following options for partials:
a) No difference. They also have a trailing underscore. Problematic if you want to provide both a partial and total lens though.
b) Double underscore. Haven't actually tested if that's valid! Might work? Maybe a bit of a slippery slope...
Also there's Isomorphisms (total and partial). Not sure about these. We don't really have enough special chars to play with! Any thoughts?
Underscore and double underscore may work for total and partial lenses/properties though.

Incidentally, type equivalence was always the point. The lenses defined in Suave are that way so they are the same as Aether, as Aether was always about being able to use things via type equivalence, so that library authors could avoid dependencies.

As an example, incidentally, of where "module per type" for lenses would be awkward, consider the Arachne URI type, which will be gaining lenses to enable lens based functionality right down in to the depths of the type.
https://github.com/freya-fs/arachne/blob/master/src/Arachne.Uri/Uri.fs#L614-L615

The name based approach is probably best. Allowing static members or module types would allow greater flexibility. I'll factor that in when I do the documentation updates.
I think the applicability of Total vs Partial lenses depends heavily on the domain.
In my case, I have zero usages of partial lenses because I'm working with extremely reliable and well constructed data. Either way, we definitely want to handle both cases.
I think the double underscore approach isn't great - it's not easily distinguishable from normal lenses, nor is it clear to someone new how the two are different.
I'd suggest something like someValue_p or someValue_par for partial lenses. This approach should be extensible to other types of lenses, too.

@varon Yes, the guidelines can allow either a static member or module.
Is there any specific reason that partial lenses would need to have a _p suffix - could they just use _ as well, with a different type?

My motivation for the _p suffix was fairly simple - I had anticipated very opaque type errors due to the tuple-based types, which the suffix might have helped demystify. I was wrong here - as long as we declare our lenses with the proper types, we get very readable type errors.
For instance, if we try to compose a partial lens of Bar -> Foo option and a Foo -> string, we receive the following error:
Error	1	Type mismatch. Expecting a
    Lens<Bar,Foo option>
but given a
    PLens<Bar,Foo>
The type 'Foo option' does not match the type 'Foo'

However, to get these clear types, I did have to declare lenses using the following helper functions:
let Lens<'T, 'P> getter setter : Lens<'T, 'P> = (getter, setter)
let PLens<'T, 'P> getter setter : PLens<'T, 'P> = (getter, setter)

With the actual declarations as:
// partial lens from Bar -> Foo option
let foo_ = PLens (fun x -> x.foo) (fun v x -> {x with foo = Some v})
// total lens from Foo -> string
let someField_ = Lens (fun x -> x.someField) (fun v x -> { x with someField = v })

if we don't have the helper functions, things become a bit less clear:
let foo_ = (fun x -> x.foo), (fun v x -> {x with foo = Some v})

Error	1	Type mismatch. Expecting a
    Lens<Bar,Foo option>
but given a
    (Bar -> Foo option) * (Foo -> Bar -> Bar)

You can view the full example here: https://gist.github.com/varon/59dba8cd9a554cccbd49
If we can exclusively use the helper functions for declaring lenses, I think the single underscore works fine for both types of lenses.
How do you suggest we resolve the naming for isomorphisms?

The error messages are certainly clearer when it can be inferred that your lenses or partial lenses are a particular type, rather than simply a coincidental tuple. However, that then requires a particular dependency on a common type, thus losing some of the benefit of relying on type equivalence. You can avoid the helper functions by simply declaring your lenses to be of type lens (i.e. static member Property_ : Lens<Ty,Prop> = ...) but again, you've now got a concrete dependency on some Lens<'a,'b> type.
The other aspect to distinguishing partial and total comes from the fact that I've sometimes wished to declare both. For example, I have lenses mapKeyLens k and mapKeyPLens k which are both lenses to a particular key in a map. The first will throw if the key is not present (equiv to find), the second is partial (equiv to tryFind). Without something to distinguish, these would be the same name, obviously not possible.
Isomorphisms (/prisms) could again do with something. Currently they have the suffix Iso or PIso, but this doesn't quite fit if lenses use underscore suffixing.
I have to admit I haven't come up with anything better, which is why the convention has been as it is, in my own code! But definitely happy to hear a better suggestion.

@kolektiv What percentage of lens declarations do you estimate would have conflicting total/partial lenses on the same type?
I don't anticipate it to be incredibly common, so how do you feel about going with _ unless there's a conflict, then go with _p, _i and _pi ?
I've also noticed another issue with the Lens<'T, 'P> getter setter : Lens<'T, 'P> = (getter, setter) helper function - it seems to prevent calling Lens.Map, as the Lens part resolves to the helper function, rather than the Lens module itself. Perhaps lower-casing it as lens would be better, if we're going to use such as thing.

My recommendation is to just use an underscore for both partial and total properties-as-first-class values.
|  but again, you've now got a concrete dependency on some  Lens<'a,'b>  type.
It's not a binary/concrete dependency If the type definition is a type abbreviation, though each library defining the Lens/Property and PLens/PartialProprerty abreviations much agree on shape of the definitions.

So, having slept on this (10 times, to be fair) I'm inclined to go with the underscore convention for now. It seems reasonable, and we'll address the error checking aspects down the line if they prove problematic. I'm still not sure quite how to address that while still being able to rely on type equivalence for implementation, but let's see how it works in practice.

This has now been implemented pretty much everywhere I'm aware of, so closing as done!


Exclude TestAESCipher tests that modify security permissions specific to hotspot

Excludes problem hotspot tests from: https://github.com/eclipse/openj9/issues/11614
Signed-off-by: Andrew Leonard<EMAIL_ADDRESS>

Test job: https://ci.adoptopenjdk.net/view/Test_openjdk/job/Test_openjdk8_j9_extended.openjdk_x86-64_linux/17/console

Test job: https://ci.adoptopenjdk.net/view/Test_openjdk/job/Test_openjdk8_j9_extended.openjdk_x86-64_linux/17/console

Thanks @andrew-m-leonard - Is the plan to make the fix in the extensions repo (as openj9/11614 suggests) or permanently exclude?  If permanently exclude, we will use a openjdk-tests/1297 issue in the PR, if will fix under 11614 then can leave as is).
Is this also needed in later jdk versions, or just jdk8?

Thanks @andrew-m-leonard - Is the plan to make the fix in the extensions repo (as openj9/11614 suggests) or permanently exclude?  If permanently exclude, we will use a openjdk-tests/1297 issue in the PR, if will fix under 11614 then can leave as is).
Is this also needed in later jdk versions, or just jdk8?

Looks like it's jdk8 only. And test need to be updated to work for openj9 or need to be excluded permanently.

Looks like it's jdk8 only. And test need to be updated to work for openj9 or need to be excluded permanently.

@smlambert I think Peter's view is to permanently exclude, so i'll update to point at https://github.com/AdoptOpenJDK/openjdk-tests/issues/1297

@smlambert I think Peter's view is to permanently exclude, so i'll update to point at https://github.com/AdoptOpenJDK/openjdk-tests/issues/1297

@smlambert updated... and yes jdk8 only

@smlambert updated... and yes jdk8 only


Very long macOS build times

See the build times on GitHub actions:

It looks like the build step gets stuck between downloading dependencies and compiling them. The compile times themselves look normal.
2021-04-01T16:12:25.0569480Z   Downloaded ahash v0.7.2
2021-04-01T16:12:25.0672550Z   Downloaded cc v1.0.67
2021-04-01T16:12:25.0760620Z   Downloaded Inflector v0.11.4
2021-04-01T16:12:25.0898820Z   Downloaded async-executor v1.4.0
2021-04-01T18:31:08.0192370Z    Compiling libc v0.2.91
2021-04-01T18:31:08.0199130Z    Compiling proc-macro2 v1.0.24
2021-04-01T18:31:08.0200050Z    Compiling unicode-xid v0.2.1
2021-04-01T18:31:08.8948470Z    Completed unicode-xid v0.2.1 in 0.9s
2021-04-01T18:31:08.8949060Z    Compiling syn v1.0.65
2021-04-01T18:31:17.0937290Z    Completed libc v0.2.91 custom-build in 9.1s
2021-04-01T18:31:17.0947910Z    Completed syn v1.0.65 custom-build in 8.2s
2021-04-01T18:31:17.0956210Z    Compiling bitflags v1.2.1

The long macOS build times seem to be caused by the fact that I have a build script. The build finishes in ~10min without build.rs but takes up to several hours with an empty build script. Since there doesn't seem to be a way of defining a build script only for specific targets jet (https://github.com/rust-lang/cargo/issues/4932), I'm kind of stuck with this issue.

To finally have reasonable macOS build times I am now deleting build.rs in a pre-build step of the macOS job (see 6ad9e818e8fec5ccd2be6bc8793f7b194222fcb8). Thanks, @mockersf for the idea.


add kind e2e setup

This PR adds a kind setup to deploy the charts. This will be used to test the deployment of the stack along with the scaffold jobs. It can also test that tuf.localhost, rekor.localhost are accessible. It will not be suitable for testing the signing & verifying functionality.
TODO: Add the tests for pod health, job completion, connectivity
/cc @Gregory-Pereira
/cc @sabre1041

@sallyom thanks for doing this! Can you look into this linting error?
 ✖ trusted-artifact-signer => (version: "0.1.1", path: "charts/trusted-artifact-signer") > chart version not ok. Needs a version bump!

Encountering other errors as well:

running the kind setup script: ./kind/kind-up-testing.sh
error logs:

error: error reading ./kind/test-keys-cert/file_ca_key.pem: no such file or directory
error: no objects passed to apply
error: error reading ./kind/test-keys-cert/rekor_key.pem: no such file or directory
error: no objects passed to apply

Actual chart installation:

$ OPENSHIFT_APPS_SUBDOMAIN=localhost envsubst <  ./examples/values-kind-sigstore.yaml | helm upgrade -i trusted-artifact-signer --debug ./charts/trusted-artifact-signer -n sigstore --create-namespace --values -

Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "fulcio-system" namespace: "fulcio-system" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first, resource mapping not found for name: "rekor-system" namespace: "rekor-system" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first]
[resource mapping not found for name: "fulcio-system" namespace: "fulcio-system" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first, resource mapping not found for name: "rekor-system" namespace: "rekor-system" from "": no matches for kind "ServiceMonitor" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first]
unable to build kubernetes objects from release manifest
```. At the end of this last error message it produced a stacktrace which I didnt find relevant. Looking into this more.

@lance  @Gregory-Pereira
This should be working now.
@JasonPowr I added a commit to update the cosign deployment & I added a cosign SA for the rolebinding - I was seeing a configCreate error because of the runAsNonRoot without a runAsUser :woman_shrugging:  & also I modified docs and env to be more generic/less dependent on Keycloak - ptal!

@JasonPowr I updated the cosign deployment and added a helm test check it out!! Look at the output, it's beautiful:
$ helm test -n sigstore trusted-artifact-signer
NAME: trusted-artifact-signer
LAST DEPLOYED: Tue Oct  3 09:56:37 2023
NAMESPACE: sigstore
STATUS: deployed
REVISION: 1
TEST SUITE:     trusted-artifact-signer-test-connection
Last Started:   Tue Oct  3 10:00:34 2023
Last Completed: Tue Oct  3 10:00:37 2023
Phase:          Succeeded

/lgtm


Trait bounds with lifetimes and E0392 "lifetime parameter never used"

First of all thank you for this wonderful library!
Version
> cargo tree | grep bon
├── bon v3.0.0
│   ├── bon-macros v3.0.0 (proc-macro)

Description
The following doesn't compile:
pub trait SomeTrait<'a> {
    fn borrow_stuff(stuff: &'a str) -> Self;
}

#[bon::builder]
pub fn some_func<'a, T: SomeTrait<'a>>(arg1: T) -> T { arg1 }

error[E0392]: lifetime parameter `'a` is never used
 --> src/lib.rs:6:18
  |
6 | pub fn some_func<'a, T: SomeTrait<'a>>(arg1: T) -> T {
  |                  ^^ unused lifetime parameter
  |
  = help: consider removing `'a`, referring to it in a field, or using a marker such as `std::marker::PhantomData`

As suggested by rustc, this could be worked around using PhantomData:
#[bon::builder]
pub fn some_func<'a, T: SomeTrait<'a>>(
    arg1: T,
    #[builder(default)] _lifetime: PhantomData<&'a ()>,
) -> T {
    arg1
}

Looking at the macro expansion:
pub struct SomeFuncBuilder<
    'a,
    T: SomeTrait<'a>,
    S: some_func_builder::State = some_func_builder::Empty,
> {
    __private_vinyl_phantom: ::core::marker::PhantomData<
        (fn() -> S, fn() -> ::core::marker::PhantomData<T>),
    >,
    __private_vinyl_named_members: (::core::option::Option<T>,),
}

The error (credit to this SO answer which explains it nicely) is expected: the borrow checker can't find anything in SomeFuncBuilder that is borrowing data for 'a, but it's confusing when appearing on function-like syntax (it certainly was for me!)
It'd be great if bon can detect such "unused" lifetimes and put them somewhere in the builder struct.

A note for the community from the maintainers
Please vote on this issue by adding a 👍 reaction to help the maintainers with prioritizing it. You may add a comment describing your real use case related to this issue for us to better understand the problem domain.

Thank you for reporting this!
I didn't think of this edge case. The builder's internal phantom data needs to capture all lifetime parameters as &'a (), &'b (), ... to make sure they all are used even when no function's parameter references it.
The quick is that it's possible for functions and impl blocks in Rust to have unused lifetimes, while it's not possible to have unused lifetimes in structs.
For example this compiles albeit with an unused_lifetimes warning:
fn sut<'a, 'b>() {}

struct Sut;
impl<'a, 'b> Sut {}

The fix was released in 3.0.1 patch.


How to use to results generated by the transition model.

Hi,
We need video datasets and the log datasets to train the steering model.
And I am confused that how to use the result images generated by the transition model to train the steering model since we do not have the log dataset such as steering angles for those generated images.
THX

the generative model is not used to train the steering model


remove swagger-annotations in DAO module

Codecov Report

Merging #1643 into dev will increase coverage by 5.28%.
The diff coverage is 0%.

@@           Coverage Diff            @@
##             dev   #1643      +/-   ##
========================================
+ Coverage   8.12%   13.4%   +5.28%
========================================
  Files        282     282
  Lines      13910   13915       +5
  Branches    2250    2250
========================================
+ Hits        1130    1866     +736
+ Misses     12662   11843     -819
- Partials     118     206      +88

Impacted Files
Coverage Δ

...a/org/apache/dolphinscheduler/dao/entity/User.java
0% <ø> (ø)
:arrow_up:

...inscheduler/alert/utils/EnterpriseWeChatUtils.java
0% <0%> (ø)
:arrow_up:

...org/apache/dolphinscheduler/alert/AlertServer.java
0% <0%> (ø)
:arrow_up:

...lphinscheduler/api/service/WorkerGroupService.java
78.33% <0%> (+78.33%)
:arrow_up:

...e/dolphinscheduler/common/utils/PropertyUtils.java
32.14% <0%> (ø)
:arrow_up:

.../org/apache/dolphinscheduler/common/Constants.java
0% <0%> (ø)
:arrow_up:

...olphinscheduler/api/controller/BaseController.java
3.65% <0%> (+3.65%)
:arrow_up:

.../apache/dolphinscheduler/api/utils/CheckUtils.java
45.83% <0%> (+8.33%)
:arrow_up:

...e/dolphinscheduler/api/service/MonitorService.java
16.12% <0%> (+16.12%)
:arrow_up:

...rg/apache/dolphinscheduler/api/utils/PageInfo.java
37.5% <0%> (+37.5%)
:arrow_up:

... and 10 more

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 b053322...cc786e6. Read the comment docs.


Default resource performance could be improved

This is probably because we use a singleton.

No it is because calls to the system allocate and deallocate are expensive

That's irrelevant, RapidJSON outperforms us anyways and they use malloc (which has identical performance)

Addressed by da65b25f4df7d3e090e4a700cdf14df026062c3c


when protocol :ws no path of config

when protocol :ws no path of config

Thanks for the feedback. This is now fixed with the new version


getUserByAccount is not a function

Description 🐜
I am sure the following is bug:
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error getUserByAccount is not a function {
  message: 'getUserByAccount is not a function',
  stack: 'TypeError: getUserByAccount is not a function\n' +
    '    at Object.callback (webpack-internal:///./node_modules/next-auth/server/routes/callback.js:71:39)\n' +
    '    at runMicrotasks (<anonymous>)\n' +
    '    at processTicksAndRejections (internal/process/task_queues.js:93:5)\n' +
    '    at async NextAuthHandler (webpack-internal:///./node_modules/next-auth/server/index.js:169:18)\n' +
    '    at async apiResolver (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/api-utils.js:8:1)\n' +
    '    at async DevServer.handleApiRequest (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:66:462)\n' +
    '    at async Object.fn (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:58:580)\n' +
    '    at async Router.execute (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/router.js:25:67)\n' +
    '    at async DevServer.run (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:68:1042)\n' +
    '    at async DevServer.handleRequest (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:32:504)',
  name: 'TypeError'
}

Is this a bug in your own project?
No
How to reproduce ☕
Signin with google account and error occurred right after user google acceptance.
Screenshots / Logs 📽
[next-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error getUserByAccount is not a function {
  message: 'getUserByAccount is not a function',
  stack: 'TypeError: getUserByAccount is not a function\n' +
    '    at Object.callback (webpack-internal:///./node_modules/next-auth/server/routes/callback.js:71:39)\n' +
    '    at runMicrotasks (<anonymous>)\n' +
    '    at processTicksAndRejections (internal/process/task_queues.js:93:5)\n' +
    '    at async NextAuthHandler (webpack-internal:///./node_modules/next-auth/server/index.js:169:18)\n' +
    '    at async apiResolver (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/api-utils.js:8:1)\n' +
    '    at async DevServer.handleApiRequest (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:66:462)\n' +
    '    at async Object.fn (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:58:580)\n' +
    '    at async Router.execute (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/router.js:25:67)\n' +
    '    at async DevServer.run (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:68:1042)\n' +
    '    at async DevServer.handleRequest (/Users/allealdine/ReactJS/mymedi/web/node_modules/next/dist/next-server/server/next-server.js:32:504)',
  name: 'TypeError'
}

Environment 🖥
System:
OS: macOS 11.5.2
CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz
Memory: 1.08 GB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.4 - ~/.nvm/versions/node/v14.15.4/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.20.2 - ~/.nvm/versions/node/v14.15.4/bin/npm
Browsers:
Chrome: 92.0.4515.159
Safari: 14.1.2
npmPackages:
next: ^11.0.1 => 11.0.1
next-auth: 4.0.0-beta.1 => 4.0.0-beta.1
react: ^17.0.2 => 17.0.2
Contributing 🙌🏽
No, I am afraid I cannot help regarding this

Which adapter are you using? Make sure it is also upgraded https://next-auth.js.org/getting-started/upgrade-v4#adapters

Hi balaz, I followed the upgrade (see below), but may be I took wrong version: "@next-auth/typeorm-legacy-adapter": "^0.1.4". However, I could not find any suitable version of @next-auth/typeorm-legacy-adapter yet to connect to postgresql.
`
import NextAuth from "next-auth";
import { TypeORMLegacyAdapter } from "@next-auth/typeorm-legacy-adapter";
import EmailProvider from "next-auth/providers/email";
import GoogleProvider from "next-auth/providers/google";
const options = {
providers: [
EmailProvider({
server: process.env.EMAIL_SERVER,
from: process.env.EMAIL_FROM,
}),
GoogleProvider({
clientId: process.env.GOOGLE_ID,
clientSecret: process.env.GOOGLE_SECRET,
}),
],
adapter: TypeORMLegacyAdapter(process.env.NEXT_PUBLIC_DATABASE_URL),
...
}
`
Here is the .env:
NEXT_PUBLIC_DATABASE_URL=postgres://strapi_pgdb:strapi_pgdb@localhost:5432/strapi_pgdb?synchronize=true

As stated in the migration docs above, you should be using the next channel when upgrading your adapter. Currently that means this version for  typeorm<EMAIL_ADDRESS>

I got the same issue with the Prisma adapter. I'm using the 4.0.0-beta.1 version of next-auth and the latest 0.5.4 version of @next-auth/prisma-adapter.
I believe the required method for adapters has changed, according to this document, but the adapter not updated yet.
ext-auth][error][OAUTH_CALLBACK_HANDLER_ERROR]
https://next-auth.js.org/errors#oauth_callback_handler_error getUserByAccount is not a function {
  message: 'getUserByAccount is not a function',
  stack: 'TypeError: getUserByAccount is not a function\n' +
    '    at Object.callback (webpack-internal:///./node_modules/next-auth/server/routes/callback.js:71:39)\n' +
    '    at runMicrotasks (<anonymous>)\n' +
    '    at processTicksAndRejections (internal/process/task_queues.js:97:5)\n' +
    '    at async NextAuthHandler (webpack-internal:///./node_modules/next-auth/server/index.js:171:18)\n' +
    '    at async eval (webpack-internal:///./node_modules/next-auth/server/index.js:251:32)\n' +
    '    at async Object.apiResolver (/Users/duyet/project/cit-feedback/node_modules/next/dist/server/api-utils.js:101:9)\n' +
    '    at async DevServer.handleApiRequest (/Users/duyet/project/cit-feedback/node_modules/next/dist/server/next-server.js:760:9)\n' +
    '    at async Object.fn (/Users/duyet/project/cit-feedback/node_modules/next/dist/server/next-server.js:651:37)\n' +
    '    at async Router.execute (/Users/duyet/project/cit-feedback/node_modules/next/dist/server/router.js:205:32)\n' +
    '    at async DevServer.run (/Users/duyet/project/cit-feedback/node_modules/next/dist/server/next-server.js:825:29)',
  name: 'TypeError'
}

Again, please read the documentation I linked to!
https://next-auth.js.org/getting-started/upgrade-v4#adapters


fix: ignore stale keystore lockfiles

Motivation
Current keystore lockfile handling is not ideal as any unclean shutdown (e.g. due to power loss) will prevent the validator client from starting as .lock files are not cleaned up.
The lockfile package we currently use is also already deprecated since Aug 11, 2021
Description

Replaces lockfile with proper-lockfile package, as the name implies, it's done properly now :)
The notable difference is that lockfiles will be considered stale after 10 seconds if process is not running
More user friendly message if lockfile for  keystore (or other file) already exists

:tada: This PR is included in v1.16.0 :tada:


doc: add comment, refs: #89

Backend coverage reportCoverage after merging fix/email-update into dev will be3.61%
Coverage ReportFileStmtsBranchesFuncsLinesUncovered Linessrc   app.controller.ts100%100%100%100%   app.module.ts0%0%100%0%1, 14, 14, 16, 16–17, 17, 2, 28, 3–7   app.service.ts100%100%100%100%   main.ts0%0%0%0%1, 11–12, 14, 14, 14, 14–15, 2, 23, 25, 3, 31, 33, 33, 33–34, 36, 4, 43, 45, 5, 8src/email   email.module.ts0%100%100%0%1, 12, 2–4src/email/controllers   email.controller.ts0%100%0%0%1, 11, 13, 2–4, 8–9src/email/model   email.entity.ts0%100%100%0%1, 10, 16, 22, 28, 3, 34, 4src/email/services   email.service.ts0%0%0%0%1, 10, 102, 108, 13, 2, 20, 22, 22, 22, 22, 22–23, 26, 3, 34–35, 35, 35–36, 36, 36–37, 37, 37–38, 38, 38–39, 39, 39, 41, 41–42, 42, 42, 46, 53, 53–54, 6, 60, 62, 62–63, 63, 63–64, 87, 9, 90, 96src/form   form.module.ts0%100%100%0%1, 18, 2–7src/form/controllers   form.controller.ts0%100%0%0%1, 10–11, 2, 23, 25, 28, 30, 33, 37, 4, 44, 46, 6src/form/entities   emailSubmissionLog.entity.ts0%100%100%0%1, 16, 2, 23, 30, 33, 36, 39, 47, 5–6, 9src/form/services   form.service.ts0%0%0%0%1, 10, 100–101, 101–102, 102, 102–103, 106, 106, 106, 106, 106–107, 114, 117, 117, 117, 117–118, 12, 125, 125–126, 128, 132, 132–133, 133, 133, 137, 146, 15, 150–152, 16, 162–163, 163–164, 169, 174–176, 187–188, 190, 192–194, 2, 20, 202, 205, 205–206, 206, 206, 206, 206, 206, 206, 21, 214–215, 223, 227, 227–228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 228, 240–242, 247, 249, 25, 255–256, 26, 265, 276, 276, 276, 276, 276–278, 281–282, 284, 292, 298, 3, 31, 311, 317, 317, 317–318, 318, 318–319, 32, 324–325, 327, 33, 330, 330, 330–332, 332–333, 333, 336, 338–339, 34, 347, 35, 351–352, 361–362, 368, 377–378, 38, 381, 388, 390, 393, 4, 40, 400, 403, 41, 411–412, 419, 42, 420–421, 423, 428–429, 43, 434–435, 437, 44, 48, 5, 57, 6, 63, 71, 8, 80, 92–98

DEV deployments have completed successfully!
Backend: https://nrog-97-backend.apps.silver.devops.gov.bc.ca/

Your Pull Request code is being promoted!  Please follow the link below.
Main Merge Workflow


Adjust RAM slider range to 512-8192 MB

Opening this PR to increase the minimum RAM size from 256 MB to 512 MB, per a Slack discussion.

:+1: