text:
Langchain Expression Language (LCEL) pass through does not work with two consecutive chain

Checked other resources

[X] I added a very descriptive title to this issue.
[X] I searched the LangChain documentation with the integrated search.
[X] I used the GitHub search to find a similar question and didn't find it.
[X] I am sure that this is a bug in LangChain rather than my code.

Example Code
There are cases where user needs to pass through variables for more than one chains for later use, but current implementation doesnt support this.
Reproducible example following on RAG langchain expression language example from https://python.langchain.com/docs/expression_language/cookbook/retrieval
`from operator import itemgetter
from langchain_community.vectorstores import FAISS
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnableLambda, RunnablePassthrough
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
vectorstore = FAISS.from_texts(
["harrison worked at kensho"], embedding=OpenAIEmbeddings()
)
retriever = vectorstore.as_retriever()
template = """Answer the question based only on the following context:
{context}
Question: {question}
"""
prompt = ChatPromptTemplate.from_template(template)
model = ChatOpenAI()
chain = (
{"context": retriever, "question": RunnablePassthrough()}
### Only line added to the example
| {'context': itemgetter('context'), "question": itemgetter('question')}
| prompt
| model
| StrOutputParser()
)
chain.invoke("where did harrison work?")
'
Error Message and Stack Trace (if applicable)
Traceback (most recent call last):
File "/Users/zhengisamazing/1.python_dir/vigyan-llm-api/dev/langchain_playground.py", line 110, in
chain.invoke("where did harrison work?")
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2056, in invoke
input = step.invoke(
^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2693, in invoke
output = {key: future.result() for key, future in zip(steps, futures)}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2693, in
output = {key: future.result() for key, future in zip(steps, futures)}
^^^^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/concurrent/futures/_base.py", line 456, in result
return self.__get_result()
^^^^^^^^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
raise self._exception
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 3504, in invoke
return self._call_with_config(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 1243, in _call_with_config
context.run(
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 326, in call_func_with_variable_args
return func(input, **kwargs)  # type: ignore[call-arg]
^^^^^^^^^^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 3378, in _invoke
output = call_func_with_variable_args(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/zhengisamazing/opt/anaconda3/envs/vigyan-llm-api/lib/python3.11/site-packages/langchain_core/runnables/config.py", line 326, in call_func_with_variable_args
return func(input, **kwargs)  # type: ignore[call-arg]
^^^^^^^^^^^^^^^^^^^^^
TypeError: string indices must be integers, not 'str'
Description
There are cases where user needs to pass through variables for more than one chains for later use, but current implementation doesnt support this.
Provided reproducible example following on RAG langchain expression language example from https://python.langchain.com/docs/expression_language/cookbook/retrieval
System Info
langchain==0.1.7
langchain-cli==0.0.21
langchain-community==0.0.20
langchain-core==0.1.27
langchain-google-genai==0.0.9
langchain-openai==0.0.6
platform: mac
python version:3.11.7

The reason this doesn't work is because python parses the AST in left to right order. You are piping two stdlib python dicts together before it touches any langchain code, which implicitly deletes the first dict.
See for yourself:
{"context": retriever, "question": RunnablePassthrough()} | {
    "context": itemgetter("context"),
    "question": itemgetter("question"),
}

Results in output:
{'context': operator.itemgetter('context'),
 'question': operator.itemgetter('question')}

To fix, explicitly create the langchain object using  RunnableParallel:
RunnableParallel({"context": retriever, "question": RunnablePassthrough()})
### Only line added to the example
| {'context': itemgetter('context'), "question": itemgetter('question')}
| prompt
| model
| StrOutputParser()
)

Then the first function in the sequence is a langchain object, which can be composed with dicts, runnables, etc. as intended.

I ran into a similar issue, and it took me a while to figure out that I needed to replace dicts with RunnableParallel.
I would suggest either:

Updating the docs and examples to make this behavior clear and explicit (particularly the "TIP" section on https://python.langchain.com/docs/expression_language/primitives/parallel/, which states that a dict and a RunnableParallel are equivalent. In this case they aren't.)
Finding a way to make this syntax work. It is easy to run into this as soon as you want to implement a somewhat complex chain, and it's not intuitive for a non-Python expert that a dict would work for one step but not for a second one.

authors: SoulEvill hinthornw yfontana


text:
DOC: No example of usage implementation is provided for the langchain.chains.query_constructor.base.load_query_constructor_runnable function

Checklist

[X] I added a very descriptive title to this issue.
[X] I included a link to the documentation page I am referring to (if applicable).

Issue with current documentation:
Description:
Currently, the load_query_constructor_runnable function documentation lacks doesn't have usage examples or scenarios, making it challenging for developers to understand.
URL to the documentation: https://api.python.langchain.com/en/latest/chains/langchain.chains.query_constructor.base.load_query_constructor_runnable.html#langchain.chains.query_constructor.base.load_query_constructor_runnable
Idea or request for content:
I tried running the function and below is the complete code and output:
from langchain.chains.query_constructor.base import load_query_constructor_runnable
from langchain.chains.query_constructor.schema import AttributeInfo
from langchain_openai import ChatOpenAI
from langchain.chains.query_constructor.ir import (
    Comparator,
    Comparison,
    Operation,
    Operator,
    StructuredQuery,
)

# Define your document contents and attribute information
document_contents = """
product_name: Widget, price: $20
product_name: Gadget, price: $35
product_name: Gizmo, price: $50
"""

attribute_info: AttributeInfo = [
    {"name": "product_name", "type": "string"},
    {"name": "price", "type": "number"},
]

model = ChatOpenAI(model="gpt-3.5-turbo", temperature=0.5)

# Create a runnable for constructing queries
runnable = load_query_constructor_runnable(
    llm=model,
    document_contents=document_contents,
    attribute_info=attribute_info,
    allowed_comparators=[Comparator.EQ, Comparator.LT, Comparator.GT],
    allowed_operators=[Operator.AND, Operator.NOT, Operator.OR],
    enable_limit=True,
    schema_prompt="Describe the query schema using allowed comparators and operators.",
    fix_invalid=True,
)

# Now you can use the runnable to construct queries based on user input
user_input = "Show me products with price less than 30"
query = runnable.middle[0].invoke(user_input).content
print(f"Constructed query: {query}")

Output:
Constructed query: 1. Wireless Bluetooth Earbuds - $29.99
2. Portable Phone Charger - $24.99
3. Travel Makeup Bag - $19.99
4. Insulated Water Bottle - $15.99
5. LED Desk Lamp - $27.99
6. Resistance Bands Set - $12.99
7. Stainless Steel Mixing Bowls - $19.99
8. Yoga Mat - $24.99
9. Essential Oil Diffuser - $28.99
10. Electric Handheld Milk Frother - $14.99

However the output is wrong and is not providing the references to the original documents provided. Needed usage implementation.

run you code, and client will send prompt as following:
Your goal is to structure the user\'s query to match the request schema provided below.

Describe the query schema using allowed comparators and operators.

<< Example 1. >>
Data Source:
'''json
{
    "content": "Lyrics of a song",
    "attributes": {
        "artist": {
            "type": "string",
            "description": "Name of the song artist"
        },
        "length": {

        "type": "integer",
            "description": "Length of the song in seconds"
        },
        "genre": {
            "type": "string",
            "description": "The song genre, one of "pop", "rock" or "rap""
        }
    }
}
'''

User Query:
What are songs by Taylor Swift or Katy Perry about teenage romance under 3 minutes long in the dance pop genre

Structured Request:
'''json
{
    "query": "teenager love",
    "filter": "and(or(eq(\\"artist\\", \\"Taylor Swift\\"), eq(\\"artist\\", \\"Katy Perry\\")), lt(\\"length\\", 180), eq(\\"genre\\", \\"pop\\"))"
}
'''

<< Example 2. >>
Data Source:
'''json
{
    "content": "Lyrics of a song",
    "attributes": {
        "artist": {
            "type": "string",
            "description": "Name of the song artist"
        },
        "length": {
            "type": "integer",
            "description": "Length of the song in seconds"
        },
        "genre": {
            "type": "string",
            "description": "The song genre, one of "pop", "rock" or "rap""
        }
    }
}
'''

User Query:
What are songs that were not published on Spotify

Structured Request:
'''json
{
    "query": "",
    "filter": "NO_FILTER"
}
'''

<< Example 3. >>
Data Source:
'''json
{
    "content": "Lyrics of a song",
    "attributes": {
        "artist": {
            "type": "string",
            "description": "Name of the song artist"
        },
        "length": {
            "type": "integer",
            "description": "Length of the song in seconds"
        },
        "genre": {
            "type": "string",
            "description": "The song genre, one of "pop", "rock" or "rap""
        }
    }
}
'''

User Query:
What are three songs about love

Structured Request:
'''json
{
    "query": "love",
    "filter": "NO_FILTER",
    "limit": 2
}
'''

<< Example 4. >>
Data Source:
'''json
{
    "content": "Hardware Products Price List",
    "attributes": {
    "product_name": {
        "type": "string"
    },
    "price": {
        "type": "number"
    }
}
}
'''

User Query:
Show me products with price less than 30

Structured Request:

so I change the document_contents content, and get the correct answer.
# Define your document contents and attribute information
document_contents = "Hardware Products Price List"

attribute_info: AttributeInfo = [
    {"name": "product_name", "type": "string"},
    {"name": "price", "type": "number"},
]

# Create a runnable for constructing queries
runnable = load_query_constructor_runnable(
    llm=llm,
    document_contents=document_contents,
    attribute_info=attribute_info,
    allowed_comparators=[Comparator.EQ, Comparator.LT, Comparator.GT],
    allowed_operators=[Operator.AND, Operator.NOT, Operator.OR],
    enable_limit=True,
    schema_prompt="Describe the query schema using allowed comparators and operators.",
    fix_invalid=True,
)

# Now you can use the runnable to construct queries based on user input
user_input = "What are products that price less than 30"
query = runnable.invoke(user_input)
print(f"Constructed query: {query}")

you can try, query will been one StructuredQuery object.

source: gharchive/issue

repo: langchain-ai/langchain

license: MIT

license_type: permissive

license_source: github-api


text:
updated integrations/providers/microsoft

Added several missed tools, utilities, toolkits to the Microsoft page.

amazing, thanks @leo-gan!

source: gharchive/pull-request

authors: baskaryan leo-gan


text:
docs: added region parameter for awsBedrockParamsOrDefault in ChatModelTabs.js

Thank you for contributing to LangChain!

[X] PR title: "package: description"

Where "package" is whichever of langchain, community, core, etc. is being modified. Use "docs: ..." for purely docs changes, "infra: ..." for CI changes.
Example: "community: add foobar LLM"

[X] PR message:

**Description:**This PR contains the change in docs for in chatModelTabs.js In default parameters of awsBedrockParamsOrDefault, region should be mandatory for ChatBedRock
without region getting this validation error, so region should be there

Twitter handle: https://twitter.com/BhargavPrince18

Additional guidelines:

Make sure optional dependencies are imported within a function.
Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
Most PRs should not touch more than one package.
Changes should be backwards compatible.
If you are adding something to community, do not re-import it in langchain.

If no one reviews your PR within a few days, please @-mention one of baskaryan, efriis, eyurtsev, ccurme, vbarda, hwchase17.

in general the docs recommend setting this in an environment variable (similar to access creds), so will close this instead of adding to that block!

Everyone do that only, but people need to know right they have to use region parameter inside ChatBedRock. I am following the docs and I got the error, It took almost 20 min for me to understand that I have to give region parameter inside AwsBedrockParams. Let's give atleast region parameter remove us-east-1 value and users will give whatever they want

Got it. We can consider linking the api ref for the overall classes in the tabs, but in general these tabs aren't for documenting the end-to-end use of the provider - they're just showing how the chat mdoels are used in each

so can i link api references to the model classes in each tab


text:
Retry logic for OpenAI timeouts

I'm seeing the following error in prod:
Error [TimeoutError]: Request timed out.
    at wrapOpenAIClientError (file:///app/node_modules/langchain/dist/util/openai.js:6:17)
    at file:///app/node_modules/langchain/dist/chat_models/openai.js:518:31
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async RetryOperation._fn (/app/node_modules/p-retry/index.js:50:12) {
  attemptNumber: 1,
  retriesLeft: 6
}

It's getting captured in my catch block, so I'm fairly sure the retries aren't happening, unless the first attempt is the one that gets re-thrown or something confusing like that. Is it possible this doesn't meet the criteria for retryable? Could this be addressed using the FailedAttemptHandler interface?
I've not set a timeout for the LLM. I'm having a hard time figuring out the default value.
  /**
   * Custom handler to handle failed attempts. Takes the originally thrown
   * error object as input, and should itself throw an error if the input
   * error is not retryable.
   */
  onFailedAttempt?: FailedAttemptHandler;

The default failure handler looks like the culprit:
const STATUS_NO_RETRY = [
  400, // Bad Request
  401, // Unauthorized
  402, // Payment Required
  403, // Forbidden
  404, // Not Found
  405, // Method Not Allowed
  406, // Not Acceptable
  407, // Proxy Authentication Required
  408, // Request Timeout // <<<<<<<<<<<<<<<<<<<<
  409, // Conflict
];

const defaultFailedAttemptHandler = (error: any) => {
  if (
    error.message.startsWith("Cancel") ||
    error.message.startsWith("TimeoutError") || // <<<<<<<<<<
    error.name === "TimeoutError" ||
    error.message.startsWith("AbortError") ||
    error.name === "AbortError"
  ) {
    throw error;
  }
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  if ((error as any)?.code === "ECONNABORTED") {
    throw error;
  }
  const status =
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    (error as any)?.response?.status ?? (error as any)?.status;
  if (status && STATUS_NO_RETRY.includes(+status)) {
    throw error;
  }
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
  if ((error as any)?.error?.code === "insufficient_quota") {
    const err = new Error(error?.message);
    err.name = "InsufficientQuotaError";
    throw err;
  }
};

However, reviewing OpenAI's documentation:
A `Timeout` error indicates that your request took too long to complete and our server closed the connection. This could be due to a network issue, a heavy load on our services, or a complex request that requires more processing time.
If you encounter a Timeout error, please try the following steps:

**Wait a few seconds and retry your request.** Sometimes, the network congestion or the load on our services may be reduced and your request may succeed on the second attempt.
Check your network settings and make sure you have a stable and fast internet connection. You may need to switch to a different network, use a wired connection, or reduce the number of devices or applications using your bandwidth.
If the issue persists, check out our persistent errors next steps section.

It sounds like this should be retryable to me.

Going to try this out in my service, will make a PR if it solves my problem ^

Some more details here: https://github.com/openai/openai-node/blob/master/README.md#retries
Certain errors will be automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors will all be retried by default.

You can use the maxRetries option to configure or disable this:

Maybe this is all we need, to increase maxRetries on the OAI client?

@wcummings Thanks for hunting this down. Did that change solve the problem? If so, will you submit a PR?

I just found out that retries are not happening at all, despite setting maxRetries to a valid value in the langchain ChatOpenAI object.
This sort of bug remaining unsolved for so long makes me doubt whether anyone uses langchainjs at all.
Can the maintainers fix this?

+1 would like to see this implemented

I can confirm I am seeing this same issue where no retry is happening even when I pass a maxRetries param.  Will have to switch to openAI's native lib which has this working until it is fixed.

For anyone else following this issue, the change made in https://github.com/langchain-ai/langchainjs/issues/2706#issuecomment-1734422202 was to remove "TimeoutError" from the list of things not to retry.  I can confirm that does fix the issue.  That said, we can't just make that change to fix this because this handler is used for more than just openai.
I notice there are many places where we explicitly set maxRetries to 0 in calls to the native openai lib.  Perhaps the best route would be to change that to use the maxRetries value for the langchain openai model?

@codenameakshay what is the status of this PR that is supposed to fix maxRetries param not working?

@codenameakshay what is the status of this PR that is supposed to fix maxRetries param not working?

The PR doesn't actually fix the bug as I discussed with @jacoblee93. It is still an open issue.
See https://github.com/langchain-ai/langchainjs/pull/3370#discussion_r1402660699

I do still really want to get to the bottom of it 😕 but yeah we need to differentiate between user defined timeouts, which probably shouldn't be retried as the user expects some resolution in a timeframe, vs OpenAI default timeouts.

I am not following.  Why would the timeouts be different?  Seems like we are just dealing with a timeout value that has a default if the user doesn’t supply one.  Since OpenAI already handles retrying timeouts why do we need langchain to try and handle retries on timeouts as well? Couldn’t we just pass the user timeout value to OpenAI?

Or maybe it is less about timeouts and more about retries.  Since OpenAI now handles retries in the library natively, seems like we should just let it do its thing rather than use a separate mechanism outside the library.

If that was their desire won't they just setup retries to 0?

Yeah but now maxRetries param is not working as expected so I think this is necessary change.

I'm surprised to see that the bot's suggestion above (https://github.com/langchain-ai/langchainjs/issues/2706#issuecomment-1732617130) was disliked that much.
It actually inspired us to come up with a working solution: extend LangchainLLMChain into a class that calls withRetry() (owned by one of its ancestor class: Runnable) every time we call invoke.
class LLMChainWithRetry extends LangchainLLMChain {
    async call(values, config = undefined) {
        const runnableChain = super.withRetry({
            stopAfterAttempt: 3,
            onFailedAttempt: (error) => {
                if (error.name === 'TimeoutError') {
                    console.log(`[LLMChainWithRetry] Attempt ${error.attemptNumber} failed. There are ${error.retriesLeft} retries left.`);
                } else {
                    throw error;
                }
            }
        });
        return await runnableChain.invoke(values, config);
    }
}

Oh, you should also just pass onFailedAttempt where you'd be able to pass maxRetries and it would work as well. I don't think you'd need to subclass.

Closing for now given the above.

I don't understand why this is being closed.  Seems to me that there is still a clear bug here even if there is a workaround.

Because it's not clear what should be happening IMO

Does anyone know how this is handled in the python version?  Could that perhaps guide us to a solution?

IMHO it is fine to make a breaking change and make this retryable. The timeout is not the same as a deadline, and if a request is retried for any other reason the total request time will exceed the timeout anyway.

Here's a draft of what I did in my codebase: https://github.com/langchain-ai/langchainjs/pull/4633

Thanks for all your patience and especially @wcummings for the PR! New behavior will be live in the next core release (probably today).

authors: SagefulAI adrienjoly codenameakshay dhruv-anand-aintech drewB getcreatr icelic jacoblee93 stevenmilstein wcummings

repo: langchain-ai/langchainjs


text:
”自主拦截域名“能否添加”高级搜索模式“

在搜索一些技术类文章时，需要屏蔽百度文库和csdn，但拦截完之后，通常网页上就只剩下一两个结果甚至一个结果都没有了（全被拦截了）。
本质上，还是因为自主拦截域名，会把符合规则的搜索结果的元素直接删除（或屏蔽），下一页不在黑名单的结果不会挤到上一页。
那能不能实现这样的功能，就是给一个选项，不再拦截符合规则的搜索结果，而是通过高级搜索功能，把屏蔽网站自动附加到搜索关键词中。这样就可以使用搜索引擎的原生功能屏蔽不想要的结果，也避免了静态屏蔽导致页面空白

考虑过，做出来之后的效果不佳，实现起来必要性不大，并且容易导致很多小白误操作，各种问题
感谢反馈


text:
Bing搜索在单列情况下部分按键错位严重且自己设置的背景图片不会正常显示

Bing搜索在单列情况下错位严重而且自己设置的背景图片不会正常显示，百度则正常。

背景图设置连接
https://i0.hdslb.com/bfs/new_dyn/602a9994ec3ce962f9eb0cf5a75be0e2233114659.jpg

错位问题另说
图片不可见，换图床，例如：https://imgur.la/


text:
[trivial][bugfix] add include guard

PR Summary
In PR #330 I missed an include guard in the new tests. Here the guard is added. Resolves #405 .

PR Checklist

[ ] Adds a test for any bugs fixed. Adds tests for new features.
[x] Format your changes by using the make format command after configuring with cmake.
[ ] Document any new features, update documentation for changes made.
[ ] Make sure the copyright notice on any files you modified is up to date.
[ ] After creating a pull request, note it in the CHANGELOG.md file.
[ ] LANL employees: make sure tests pass both on the github CI and on the Darwin CI

If preparing for a new release, in addition please check the following:

[ ] Update the version in cmake.
[ ] Move the changes in the CHANGELOG.md file under a new header for the new release, and reset the categories.
[ ] Ensure that any when='@main' dependencies are updated to the release version in the package.py

As a note for the future (or an additional one line change to add to this MR) would we maybe want to consider removing the spiner build from the minimal tests on github?
https://github.com/lanl/singularity-eos/blob/09cf65cd06eb249ed6f7de736f8c1f4165020a78/.github/workflows/tests_minimal.yml#L31

As a note for the future (or an additional one line change to add to this MR) would we maybe want to consider removing the spiner build from the minimal tests on github?
https://github.com/lanl/singularity-eos/blob/09cf65cd06eb249ed6f7de736f8c1f4165020a78/.github/workflows/tests_minimal.yml#L31

Good suggestion. :+1: Done.

authors: Yurlungur jhp-lanl

repo: lanl/singularity-eos


text:
cannot resolve 3jehr.log.xxx.online: Unknown host

ping log.xxx.online可以解析，ping 3jehr.log.xxx.online则提示未知主机
另外，readme中dns方面的配置，太粗略了，而且有点乱，初次配置的人看的很迷糊。。

参照其他教程解决了

如何解决的呢，我也遇到了这个问题


text:
Added 500ms debounce to key value field inputs

@danharrin As we discussed in the discord channel key value field is now pretty hard to type when used with ->reactive(). Until we can debounce $entangle statement this should do the trick.

Thanks

authors: alperenersoy danharrin

repo: laravel-filament/filament


text:
Artisan commands will not show line numbers of errors on php7+

Laravel Version: 5.4.16 (and previous)
PHP Version: 7+, 7.1+

Description:
When running an artisan command on Windows that contains an error the error message is shown without a line-number on php 7+.
On php 5.6 the error is shown with the line number.
This does not happen on all files, for instance adding an error to the actual artisan file will show the line number but adding an error to MigrateCommand.php will not.
Steps To Reproduce:

Windows with php 7+
Create a fresh install of Laravel.
Add an error to \artisan and run php artisan - the line number will be shown with the error
Remove above error and add one to \vendor\laravel\framework\src\Illuminate\Database\Console\Migrations\MigrateCommand.php - the error will be shown without the line number

PHP 5.6

PHP 7

@SirriC can you try running PHP script that throws an error? do you see line numbers?

@Dylan-DPC Yes, if I have a simple php file with an error it’ll show the line number.
I also get line numbers up to a point in Laravel, so I can edit some files and see them but then they stop showing. I think it might be when the errors are handled by Symfony - see the bottom screenshot in my original post. The first time I run artisan it files the error on line 16. On the second run the error is much deeper into the application and no line number is shown.

It turns out this is not just on Windows. My colleague was actually running php 5.6. I have also tried php 7.1 on two linux machines and neither show line numbers for errors.

Try running with the -v option

Use --verbose to get more information about the error if you want.

This is still a serious issue, and -v or --verbose has no effect in my Install. Why is this closed?

Agreed, having same issue here....

I'm having the same issue. Using Windows 10, PHP 5.6, Laravel 5.4. --verbose flag doesn't work:

For those experiencing a similar issue, I found that's it's more verbosely logging the error in storage/logs/laravel.log

Seems to be an issue with the php.ini being shipped with PHP >= 7.0. Since Xdebug 2.4 there's a new option available xdebug.show_error_trace, this should be set to 1 in your xdebug-configuration (or just your php.ini), note that this should be the php.ini for CLI, not FPM.
I.e, if using Homestead just put:
xdebug.show_error_trace=1 somewhere in /etc/php/7.1/cli/php.ini and it should work.
Discussion on Twitter about this: https://twitter.com/mattiasgeniar/status/905450118152953857

authors: Dylan-DPC SirriC austinjherman marathonstudios ntzm olssonm themsaid websanova

repo: laravel/framework


text:
Translator case insensitivity on Windows

Laravel Version: 5.5.21
PHP Version: 7.0.10
Database Driver & Version: Irrelevant

Description:
The translator class looks for the translation file in a case insensitive matter on Windows. Causing it to look up a PHP translation file instead of looking for a string in the JSON file.

Expected result:* a string from the JSON translation file (e.g. resources/lang/en.json)
Actual result:* the content from a PHP translation file (e.g. resources/lang/en/faq.php)

__('faq') should return the contents of the file resources/lang/en/faq.php.
__('FAQ') (or any other non-lowercase variant) should return a string from resources/lang/en.json.
Steps To Reproduce:

Create a file named faq.php in resources/lang/en and make it return an array:

<?php
return [
  'key' => 'value',
];

Make sure resources/lang/en.json does not exist or does not contain the key FAQ.
Call __('FAQ') or app('translator')->getFromJson('FAQ') from a controller.

The quick fix for this issue to add the keys causing problems to resources/lang/en.json.

Yeah you need to watch out from this edge case if you're using both translation methods in your project.

@themsaid This is not very clear from reading the documentation page.
Also, I assume this is not an issue on Unix-like systems where file names are case-sensitive. I haven't tested it, yet.

Laravel will first check for a JSON translation string before trying to find a PHP file, so yes including a JSON translation line for that key would fix the issue.

authors: royvanv themsaid


text:
Comma at the end on the method is invalid

https://github.com/laravel/framework/blob/a4c365f9a964f1d9346a662b426476dc1bffc660/src/Illuminate/Bus/BusServiceProvider.php#L50

Error is thrown when booting app
require '/vendor/autoload.php';
$app = require('/bootstrap/app.php');
$app->make(\Illuminate\Contracts\Console\Kernel::class)->bootstrap();

ParseError
syntax error, unexpected ')'
at /vendor/laravel/framework/src/Illuminate/Bus/BusServiceProvider.php:51
47▕             return new DatabaseBatchRepository(
48▕                 $app->make(BatchFactory::class),
49▕                 $app->make('db')->connection(config('queue.batching.database')),
50▕                 config('queue.batching.table', 'job_batches'),
➜  51▕             );
52▕         });
53▕     }
54▕
55▕     /**

This is valid syntax in PHP 7.3 which is the minimum supported version for Laravel 8.
https://wiki.php.net/rfc/trailing-comma-function-calls
Make sure that your PHP-FPM is running PHP 7.3+.

Thanks @X-Coder264 i'm dumb...was running my test in 7.2


text:
routes with 'group' as binding does not work

Laravel Version: 8.20.1
PHP Version: 7.4
Database Driver & Version:

Description:
After upgrade from version 6 to latest, all routes having 'group' binding failing to work. Changing it to anything else works perfectly. Behavior reproducible with and without using explicit binding. All other 100+ bindings are totally fine
Steps To Reproduce:

create route in following format
Route::get('groups/{group}',  'GroupsController@show');

1.1 update RouteServiceProvider to use default namespace for above to work

create controller and model
php artisan make:controller --api --model=Group GroupsController

create new table and fill with few rows or set any existing table to be used with model

make a call to route above with id existing in table above

exception "Target class [Group] does not exist." thrown even with explicit binging being set like that
Route::model('group', \App\Models\Group::class);

Unable to recreate. Works for me.

Unable to recreate. Works for me.

authors: danikp taylorotwell


text:
Deprecated warning

Laravel Version: 8.75.0
PHP Version: 8.1.0

Description:
I'm getting several depreciation alerts when running tests in phpunit, for example:
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php on line 276 ..... Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php on line 276 . Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php on line 276 . Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php on line 276 . Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php on line 276

Try adding this line to your logging.php file: https://github.com/laravel/laravel/pull/5711/files#diff-9ba917899def7f26cdd2c34da749863fbb2797a40aed5e41a1166a022b10d7dfR33


text:
Registering middleware conditionally

In L4, we used to be able to load service providers based on the environment using append_config.
The recommended way now in L5 is to instead load it conditionally in AppServiceProvidor:
if ($this->app->environment('local'))
{
    $this->app->register('LocalOnlyServiceProvider');
}

The same can't be said for middleware. There seems to currently be no way to do the same for middleware. The only way I was able to accomplish conditional middleare loading was by extending the app kernel's constructor and load it there. Ugh :cry:
Another possible solution might be to create my own ConditionalMiddleware that always runs, and then pass the request through to various additional middleare conditionally. Again, ugh!
For reference: slack discussion

I think there should be a built-in way to do this, but I'm not sure the exact approach to take.
Ideas?

Perhaps add the middleware option back to App, like before? That was also proposed to simplify middleware in packages..
$this->app->middleware('MyConditionalMiddleware');

Doesn't the order of middlewares matter?

This partially duplicates https://github.com/laravel/framework/issues/6211.

Closing this.
Taylor says to just do it in the kernel's handle method, like this.

authors: Arrilot GrahamCampbell JosephSilber barryvdh


text:
[5.6] Allow different collection classes to be returned

Just an idea -- this PR would allow different collection classes to be returned by setting a property instead of the newCollection method.

Would rather people just override the method.

authors: mateusjatenee taylorotwell


text:
[8.x] Allow dynamic factory methods to obey newFactory method on model

PR is for issue #34490
Benefit is that models that have to define a factory via the newFactory method can utilise the magic factory methods for has and for.

What if the class isn't using that trait?

authors: btaskew taylorotwell


text:
[9.x] Add to_action helper

After replacing the route redirects with the to_route helper, it makes sense to use the same naming for action redirects.

I appreciate the consistency, but I'm not a huge fan of action based routing. Controllers can be moved / renamed, etc. which makes action routing a bit brittle compared to named routes.

authors: taylorotwell usernotnull


text:
[10.x] ExpectsTable fails if new table prompt method is used

This PR tries to fix the following bug:
<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;
use function Laravel\Prompts\table;

class DemoCommand extends Command
{
    protected $signature = 'run-demo-command';

    protected $description = 'Command description';

    public function handle(): void
    {
        table(['name', 'email'], [['joe doe', 'joe.doe@example.com']]);
    }
}

// test file
namespace Tests\Feature;

use Tests\TestCase;

class ExampleTest extends TestCase
{
    /**
     * A basic test example.
     */
    public function test_demo_command(): void
    {
        $this->artisan('run-demo-command')
            ->expectsTable(['name', 'email'], [['joe doe', 'joe.doe@example.com']]);
    }
}

// There was 1 failure:

// 1) Tests\Feature\ExampleTest::test_demo_command
// Output "+---------+---------------------+" was not printed

Based on my understanding, when a table is rendered, the method  'write' from the OutputStyle class is called and not 'doWrite' from BufferedOutput. That's why the expectation fails.
I tried to fix it, but I don't know what to pass to the mock here for the $table variable:
$mock->shouldReceive('write')
    ->once()
    ->ordered()
    ->with($table, Mockery::any())
    ->andReturnUsing(function () use ($i) {
        unset($this->test->expectedTables[$i]);
    });

Feel free to resend this once you have time.

authors: driesvints jcergolj


text:
Unable to install new dependencies when using Sail

Laravel Version: 10.5.1
PHP Version: 8.2.4
Database Driver & Version: mysql 8.0
OS: Ubuntu 20.04, 22.04

Description:
I installed Laravel with Sail using WSL2 and whenever I tried to install new packages, it gave the following error from ZipDownloader.php:
The archive may contain identical file names with different capitalization (which fails on case insensitive filesys   tems): ZipArchive::extractTo(/var/www/html/vendor/composer/e0174f41/symfony-psr-http-message-bridge-a125b93/Argumen   tValueResolver/PsrServerRequestResolver.php): Operation failed: Operation not permitted
 ZipArchive::extractTo(/var/www/html/vendor/composer/e0174f41/symfony-psr-http-message-bridge-a125b93/ArgumentValueR   esolver/PsrServerRequestResolver.php): Operation failed: Operation not permitted

Steps To Reproduce:

Download Ubuntu (any version, I used 20.04, 22.04) from Microsoft Store.
Open Ubuntu and start a fresh installation of Laravel Sail.
Execute up command with: sail up.
Install specific package like laravel/passport: sail composer require laravel/passport.
Observe the error as per screenshot.

I've made a search in Laracasts, a few people reporting this issue ran "composer clearcache" to address this issue. Can you try it, and let me know how it goes? No worries, if the issue persist, I will re-open this issue.

I think this can be closed @nunomaduro since I have found the issue. It is probably related to the mounting operation between Windows and WSL2 not relating to Laravel sail itself. I added a wsl.conf like this and my problem is solved
`[boot]
systemd=true
[automount]
enabled = true
options = "metadata"
mountFsTab = false
[user]
default=tuannpa`
I found some helpful info with below links:

https://stackoverflow.com/questions/66620301/laravel-sail-on-wsl2-wrong-permissions
Fstab: https://superuser.com/questions/1710001/how-do-you-configure-windows-subsystem-for-linux-2-wsl2-to-use-fstab-to-automa

authors: nunomaduro tuannpa

repo: laravel/sail


text:
how to use tree_templates? is there a more clear document?

I want to convert a grammar to another grammar, and I can't understand the example in the document(py3 to py2) beacaue I don't know about tree_templates, so how can I learn to use tree_templates?
Thank you!

try this https://lark-parser.readthedocs.io/en/latest/examples/advanced/py3to2.html

authors: HendricksRichard notghettolenny

repo: lark-parser/lark


text:
lex - When an error happens, how can I display all tokens matched so far?

When an error happens (lark.exceptions.UnexpectedCharacters), there is usually some "Previous tokens" information such as this:
Previous tokens: Token('__ANON_0', 'CL79')`

That only seems to contain the token immediately preceding the error, but not the ones before.
Am I doing something wrong, or is there a way to display all tokens matched so far?

It's possible to collect all the tokens by writing a postlexer.
Another way is to parse using the interactive parser.
Mind if I ask what you need it for?

@erezsh I was trying to see what tokens were being matched so I could debug the lexer rules

Can I still use the postlexer in my case, where an exception is thrown (so the lexing process isn't yet complete)?

Yes, the postlexer gets the tokens one by one, so if you save them somewhere (like in a global list, or inside the postlexer instance), you will have the latest list.
Lark doesn't save those tokens, because we want to support memory-efficient streaming. But perhaps we could do it when debug=True.

Lark doesn't save those tokens, because we want to support memory-efficient streaming. But perhaps we could do it when debug=True.

That would be wonderful for ease of development

authors: erezsh mbBRCM


text:
question: is incremental parsing possible?

I have the use case where I need to parse a text line by line. At the first line, the parser can start at its start position. At the end of the line, the parser should store its state (e.g. in which context is is) in a hashable object. When parsing any line that is not the first line, the state of the end of the previous line is restored and the current line is parsed.
(This is how QSyntaxHighlighter (from Qt) is organized. When the user types in a certain line, that line is re-highlighted. And when its state at the end is different than it was beforehand, the next line is also re-highlighted, and so on.)
Would this be possible using the lark parser? From my own experimentation and docs reading I can only parse a full text (or file) in one go.

(I wrote the simple module slexer.py that can do this years ago, but maintaining large grammars with that module is becoming quite tedious, and I would really like to use lark instead of my own module.)

Lark currently doesn't support such a feature.
But, it shouldn't be too hard to implement, at least for the LALR algorithm.

Thanks for your quick reply :-)
I was already trying to use the serialize() method but that complained about a missing '__serialize_fields__' attribute.

Serialize would work, but it would be very inefficient, because it would reconstruct all the instances.
Still, if you want to use it, see the correct usage here: https://github.com/lark-parser/lark/blob/master/lark/tools/standalone.py#L105

@erezsh This is an interesting use case for everything we are currently talking about.

Yes, I agree. It should be possible to let the parser save its state at certain points, using a "puppet" (or a capsule, or however we name it), and then allow the user to resume from either one of the save points.
It will affect performance, but it might be good enough for the purpose of an IDE.
I'm still not sure what's the best interface to specify these save-points.

:+1: for this issue.
I could use a much simpler API even - example:
with open(my_file) as lines:
    parser = Lark(...)
    for data in parser.parse_incrementally(lines):
        my_process(data)

Give it an iterator of lines - result is an iterator of data.
The typical example is reading a long file containing a large number of small JSON or JSON-like data.  I want to feed in each line and have the results come out as they are finished, not have to read the whole file into memory before the first one comes out!
Or it might be a long-running socket connection....

The problem is what is data?, e.g. which element of the grammar is it?

@rec I think you misunderstood what incremental parsing means.
This issue is about storing "savepoints" while parsing, and being able to restart the run from these savepoints, for example if the input has changed.
What I think you're asking for, which is to parse a large file without having to load all of into memory, is something that Lark already does.

Python automatically buffers files as they are being read

Lark supports the transformer=... option, which applies a transformer as the text is being parsed, rule by rule, instead of building a whole tree first. You don't have to create a tree, or store the parsed data, if you choose to.

All you have to do is something like this:
parser = Lark.open("my_grammar.lark", parser="lalr", transformer=MyTransformer())
with open("my_input.json") as f:
    result = parser.parse(f)

If for some reason that doesn't work, open a new issue and we'll fix it.

Gosh, you guys are responsive.  :-)  Thanks!
Megalng: The "data" is the top-level terminal in the grammar.
erezsh: Brilliant answer!
I was somewhat aware that my "incremental" parsing wasn't what was described here.  The literature doesn't really have any consistent name for what I was describing and some people call it incremental parsing.
The solution you present seems good except that the code has to re-read my_grammar.lark for each transaction.
If I knew that the previous parser had just successfully parsed a top-level terminal, then I could just re-use the previous parser, but it might have failed, or I might be reading two separate streams in parallel.
I need to deliver a proof-of-concept, though, so this is just not a big deal!
Another hit, another home run(*) from the lark team. Thanks again!

(* - or insert favorite sport here!)

And we will be even more responsive :-P.

The "data" is the top-level terminal in the grammar.
Although erezsh did correctly spot the misunderstanding, this might not work since the top-level structure is not completly finished after one line. And if we parse multiple lines we have no benefits over just parsing everything in one action.

The solution you present seems good except that the code has to re-read my_grammar.lark for each transaction.

No. The Lark object should be completely save to reuse, even in a multi-threaded environment. Contradictory behavior is a bug.

@rec I don't think I fully understood your use-case. But please, let's move this to a new issue (feel free to open one, and express exactly what you're after), or continue on gitter.

I think I understand what he wants. (and I feel like I want the same thing).
I think the example would be that ... if you had a 60gb json file, which is just a list of requests (each being very small); Is there a way to iterate over the file and have the parser return one request at a time, without parsing/lexing all of them at once.
In other words, if the text being parsed is just repetitions of a single element type, is there a way to have the parser work as a generator for such elements? Do you have any idea on how this could be done?
It would be great to have something like ...
parser = Lark(grammar, transformer=MyTransformer(), iter='dict') # Specify what rules should be yielded

with open('massive_file.json', 'r') as f:
    for my_entry in parser.iter_parse():
        some_random_process(my_entry)

I am so far loving the package and I can see how this could be handy.
Thank you so much for the hard work!

Sorry for not replying before, I suddenly started a new job.
Yes, you have exactly my use case - a large file with a large number of small items.
By the way, we are now using Lark in that new job, and like always, it worked flawlessly and I didn't even have to get involved to help!

The existing iterative parser can be used to create a small wrapper that does this.
from queue import Queue

from lark import Discard, Lark

json_grammar = r"""
    ?start: "[" [command ("," command)*] "]"
    command: value

    ?value: object
          | array
          | string
          | SIGNED_NUMBER      -> number
          | "true"             -> true
          | "false"            -> false
          | "null"             -> null

    array  : "[" [value ("," value)*] "]"
    object : "{" [pair ("," pair)*] "}"
    pair   : string ":" value

    string : ESCAPED_STRING

    %import common.ESCAPED_STRING
    %import common.SIGNED_NUMBER
    %import common.WS

    %ignore WS
"""

class Transformer:
    def __init__(self, callback):
        self.callback = callback

    def command(self, children):
        self.callback(children[0])
        return Discard

def iter_parser(*args, transformer, **kwargs):
    queue = Queue()
    if not kwargs.setdefault("parser", "lalr") == "lalr":
        raise ValueError("The lalr parser is required")
    kwargs['transformer'] = transformer(queue.put)
    parser = Lark(*args, **kwargs)

    def parse(text, start=None):
        interactive = parser.parse_interactive(text, start)
        token = None
        for token in interactive.iter_parse():
            while not queue.empty():
                yield queue.get()
        interactive.feed_eof(token)
        while not queue.empty():
            yield queue.get()
    return parse

p = iter_parser(json_grammar, parser="lalr", transformer=Transformer)

test_text = """
[
 {"command": "print", "args": ["argument", 0, {"some": "object"}]},
 {"command": "input", "args": ["some prompt"]}
]
"""

for c in p(test_text):
    print("got", c)

Super, mega-cool!

Im not sure if I am more impressed by the response time or the actual solution ...
This is amazing! I definitely feel like this could be part of the tutorials.
Right now I do not have time to write it myself and submit a PR, but if there is interest I can give it a go at a later time point.

authors: MegaIng erezsh jspaezp rec wbsoft


text:
Testfix/webdriverio v8 upgrade

Hi!,
Now, this is the equivalent code for the Husky implementation in Klassi JS.
IMPORTANT: the need to use yarn install --network-concurrency 1 in projects using Klassi JS as a dependency if they have CI runs might prove a breaking change, so maybe we wouldn't want to do this.
Cheers!

closing as no longer needed


text:
Update cats-effect to 3.3.10

Updates org.typelevel:cats-effect from 3.3.9 to 3.3.10.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.typelevel", artifactId = "cats-effect" } ]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Codecov Report

Merging #634 (287a342) into master (21be08f) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #634   +/-   ##
=======================================
  Coverage   62.54%   62.54%
=======================================
  Files          39       39
  Lines        1303     1303
  Branches        7        7
=======================================
  Hits          815      815
  Misses        488      488

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 21be08f...287a342. Read the comment docs.

authors: codecov-commenter scala-steward

repo: laserdisc-io/laserdisc


text:
Should fontspec support square brackets?

Should this work?
\documentclass{article}
\usepackage{unicode-math}
\setmainfont{[texgyrepagella-regular]}
\begin{document}
hello \emph{hello}
\end{document}

It currently does but only by coincidence (without the square brackets it doesn't work, but with a literal .otf appended fontspec parses that out and does the right thing).
I should decide whether this should (continue to) work or not and include it in the docs.
I guess for backwards compatibility I should keep it working, but parse out the [ and ] chars from the name and then automatically call the Path feature.

Let's not promulgate shorthand syntax where it doesn't belong. I'll close this and assume any accidental support for [] doesn't catch on…


text:
[Postgres] Add support for INTERVAL

[ ] Encode support for std::time::Duration, chrono::Duration, and time::Duration ( the second and third under chrono and time features )

[ ] Encode and Decode support for https://crates.io/crates/pg_interval ( under an interval feature )

Thank you for this project.
Is there a way to go around this issue using the query macro (like falling back to a String while type checking the INTERVAL type)?
Other than that I would be willing to help on this issue. However I'm not very familliar with sqlx currently.

authors: dimtion mehcode

repo: launchbadge/sqlx


text:
Fix: Cannot query Postgres INTERVAL[]

    error: unsupported type INTERVAL[] of column #2 ("event_offsets")

Hello, I'm querying array of intervals, but sqlx give that error.
That PR fixes it

@abonander hello, can you review please?


text:
Add filter to show only public commits

A lot of the top users have many commits in private repos, some with suspiciously many counts. In general, it is hard to verify private commits, which may allow people to "game" the top list.
Please consider adding a filter to show top users with most public, verifiable commits.

I’ll need to check the APIs but this may be impossible, as the current contributions counts don’t differentiate between public or private. This thing started as a fun little hobby project so it’s interesting to see that people would actually start to sacrifice their profiles in order to get to the top. 🤔

This would definitely be a really nice feature. Some people (myself included) use Github for work, so naturally I have a lot of commits. What would be interesting to see it how I rank up to others on my open-source contributions (public).

Good news! This'll soon be possible. There is indeed a big difference between public and public+private lists. My current plan is to make public contributions the default and showing private contributions an option.

This is now in production

authors: MatissJanis brylie lauripiispanen


text:
How to get the canvas element?

Hey, I need a reference to the canvas element or at least its container. I need to call getClientBuondingRect upon it.
How do you do it?
ref.stage.getStage() returns the javascript konva object, how do I get the dom node?

Sorry, was in the konva docs, it's ref.stage.getStage().container()

repo: lavrton/react-konva


text:
Missing that last release.

Since we missed the last release for the new websockets version (which pushed the next release until February). Is it possible to publish the websockets version to HACS so that we can have a larger beta adoption to test things out? I would like to see how things are operating so I can begin working on adding in additional devices (locks, and sensors) which may also need a larger discussion.
Thanks again for providing the time and energy to the library, I know more than anyone else that it can be really tough to keep up.

Is it ready at all? Seems to still be in PR https://github.com/home-assistant/core/pull/60465
Looks to have been idle for a while, I assume they have been busy.

Hi everyone! Thanks for your continued interest in this project!
I have been testing the code in https://github.com/home-assistant/core/pull/60465 for a week now, but there's still one big thing that needs to be fixed:

The director auth token doesn't get updated once it expires every 24h, since it used to be refreshed when we would poll the Control4 system. Since we are using WebSockets instead of polling, we need to find some other way to refresh the token every 24h/if it gets revoked for some other reason.
When the director auth token expires, commands cannot be sent to the Control4 system, but the Websockets updates keep coming.

Does anyone have an idea as to how we can get Home Assistant to update our token every 24h (like on a schedule/before a certain expiry date)?

Hi @mellis @Xorso,
Please try adding this repo https://github.com/lawtancool/hass-control4 to your HACS as a custom repository.
See https://hacs.xyz/docs/faq/custom_repositories for instructions on how to do that.
I have added code to automatically update the director token before it expires, please test and let me know if you can still turn on/off lights 24h after restarting Home Assistant.

@lawtancool Thank you! I thought I had that worked that out on a websocket disconnect to retrieve the director token. I will definitely get this installed and start testing. I would love to see it be a part of the core. Thanks again for the time and effort.

I installed HACS and the integration from the repository. Now all of the devices from the Control4 integration have the status  "The device is disabled by Config entry.". Am I missing some necessary yaml configuration?

@Xorso @mellis Could you both update the integration through HACS? I just pushed a fix for the token refresh, as it wasn't properly implemented earlier.

@lawtancool downloaded the update 👍. Should I disable the option to poll devices now as well?

@lawtancool downloaded the update 👍. Should I disable the option to poll devices now as well?

There's no need to change that setting - I honestly don't even know what that would do, since we don't use polling at all anymore. 😅

Just updated. Yeah polling will need to be stripped out (unless we want to use it as a fallback at some point). I am hoping this is going to make it easier to get other entities in places as well (real time sensor data, motion detection, and maybe even some energy usage from the newer switches)

Should this method also expose non-light relays that are part of the EA3, for example garage door switch, and reed switches?

@Xesyliad I hope to be able to work on this now that we have it running out of HACS. It should allow for better testing and additional entity types.
@lawtancool I have been running past 24 hours and things are running smooth. I need to kick up my logging into debug but I feel like the tokens are refreshing. Are you still seeing issues?

I also haven’t seen any token issues here.

After a few more days of continuous testing, I have discovered that Home Assistant stops receiving WebSockets updates after around 48 hours since the last restart. This is because, while we are refreshing the tokens every 24h, we aren't restarting the WebSocket connection to use the new tokens, and eventually the Control4 Director sends a BadToken error to us over WebSocket.
I'll have to find some time to figure out how to restart the WebSocket connection when the tokens are refreshed. It might not be easy/elegant, since the current code design would require the callbacks for each entity to be re-registered, essentially forcing a full re-setup of the Home Assistant integration and entities every 24h.

@mellis @Xorso I've updated the HACS integration to fix the Websockets token refresh, please update and let me know if Home Assistant continues to receive state updates without logging errors after 24-48hours.

@lawtancool i updated yesterday, will let you know if I notice anything.

So far things have been running smooth. I am past the 48 hour mark. Are you guys seeing anything?

Things are all fine here, I also don't see any errors related to the c4 integration in the log.

Not experiencing any issues so far.

Hi everyone!
I've updated the HACS integration again. Please update and let me know how it goes!
It will take a while for the Home Assistant maintainers to merge my code into the core, but I think the HACS integration is pretty much feature complete now.
Changes:

The integration will now automatically recover if the network connection is temporarily dropped and reconnected. Entities will become unavailable when the connection is lost, and will become available again with correct states once the connection is restored.
The integration will now automatically create a Home Assistant notification if the Control4 login credentials become invalid, allowing the user to re-enter their information.

Does this mean that development may soon begin on adding features, for example relay support?

@lawtancool Thanks so much for all the work! Maybe we should chat in another thread to see what integration to tackle next?

@Xorso Yes, let's create another issue to discuss further integration work with different devices.
@Xesyliad The problem with relay support is that my Control4 system doesn't have any relays in it, making it impossible for me to test a relay integration. If you/someone else has a relay and is willing to develop and test the integration, they can always open a PR with the Home Assistant core directly. I would be glad to review such a PR, but I wouldn't be able to verify the actual functionality.

authors: Xesyliad Xorso lawtancool mellis


text:
[Build] Warning shown during site build: WARN  found no layout file for "sitemap" for kind "home"

Current Behavior
When executing make site, the following log is shown in terminal output.
Expected Behavior
No build warnings.
Screenshots/Logs
WARN  found no layout file for "sitemap" for kind "home": You should create a template file which matches Hugo Layouts Lookup Rules for this combination.

Environment

Host OS: Mac

Contributor Guide and Resources

📚 Instructions for contributing to documentation

Layer5 documentation site and source

🎨 Wireframes and designs for Layer5 site in Figma (open invite)
🙋🏾🙋🏼 Questions: Layer5 Discussion Forum and Layer5 Community Slack

@leecalcote I would like to work on this issue. Could you please assign me this?

shall i work on this issue ?


text:
[mesheryctl] [epic] provide support for platform: kubernetes

Prologue
Getting Meshery up and running locally on a Docker-enabled system is easy with Meshery’s command line interface, mesheryctl. The same ease by which Meshery is deployed to a Docker host should be afforded for deployments to Kubernetes clusters - different types of Kubernetes clusters.
Current Scenario
While the Meshery contexts contained within config.yaml offer configuration of the type of platform to deploy Meshery, currently only platform: docker is supported.
Desired Scenario
Also support platform: kubernetes across all mesheryctl commands.
Epic Acceptance Tests

Each system command considers for context platform type “kubernetes”
Support platform: kubernetes in mesheryctl context (in config.yaml) and across all mesheryctl system commands.

Future

Consider supporting specific Kubernetes platforms like AKS, EKS, GKE, OpenShift, Minikube, Docker Desktop and so on. Example: platform: eks.
Review mesheryctl system config in consideration for being implicitly executed as part of mesheryctl system context or system start.

Child Issues

[x] Issue #2308 [mesheryctl] [child] platform support for Kubernetes in system start(platform: kubernetes)
[x]  Issue #2309 [mesheryctl] [child] platform support during “bash script” installation(platform: kubernetes)
[x]  Issue #2310 [mesheryctl] [child] make system reset platform aware(platform: kubernetes)
[x]  Issue #2311 [mesheryctl] [child] make system stop platform aware(platform: kubernetes)
[x] Issue #2312 [mesheryctl] [child] make system logs platform aware(platform: kubernetes)
[x]  Issue #2514 [mesheryctl] [child] make system status platform aware(platform: kubernetes)
[x] Issue #2561 [mesheryctl] [child] make system update platform aware(platform: kubernetes)

Wow. This is excellent.

All the child issues mentioned in this epic is done. Closing this issue.

authors: leecalcote navendu-pottekkat


text:
icon for load generators

Signed-off-by: Lee Calcote leecalcote@gmail.com
Related to #213

@agarwalrohit2503 what do you think? Do you approve of the addition of this icon?

If you approve, be sure to add your review to this PR

@agarwalrohit2503 I'll go ahead and move forward with this review. I hope the short video I created helped. @subhamkrai will be adding that video to the CONTRIBUTING.md for future reference.


text:
[BUG] /root/shell.sh: No such file or directory

Description

Currently when we start any of the labs we get greeted with this error:
$ /root/shell.sh
-bash: /root/shell.sh: No such file or directory

Expected Behavior

Lab starts without any issues
Screenshots

Environment:

OS: Elementary OS 6
Browser: Brave
Version: 1.28
Device:Laptop

Closing because issue got resolved by itself

@iamsdas is this still an issue?

I tried out the labs a few times and could not reproduce the issue. So I think it is safe to assume that it has been fixed. 🚀

Awesome. Thank you, @iamsdas.
By the way, we are about to start building a new Meshery adapter for Cilium service mesh. Please check in Slack, if interested to participate in it.

authors: iamsdas leecalcote


text:
added pull request template

#29
Added a pull request template.

@ShivangRawat30 Please remove the issue template, I have added it via github. Lets keep the pretty PR template.


text:
单选框（）元素的name属性的值含空格会导致单选框变成多选【纯html没有这个问题】

议题条件

[X] 我确认已查看官方使用文档：https://layui.dev ，但没有找到相关解决方案。
[X] 我确认已在 Issues 中搜索过类似的问题，但没有找到相关解决方案。
[X] 我已仔细阅读： 🍀 Layui Issue 贡献指南

议题类型
疑是 BUG
使用版本
v2.9.14
问题描述
按照layui官方文档示例(https://layui.dev/docs/2/form/radio.html )
普通单选框例子

 <input type="radio" name="AAA" value="1" title="默认">
 <input type="radio" name="AAA" value="2" title="选中" checked>
 <input type="radio" name="AAA" value="3" title="禁用" disabled>

右上角编辑，将input元素里面的name属性都修改为name=“AA A”「加了一个空格」，

  <input type="radio" name="AA A" value="1" title="默认">
  <input type="radio" name="AA A" value="2" title="选中" checked>
  <input type="radio" name="AA A" value="3" title="禁用" disabled>

运行，点击选择其它框，发现一、二两个框都被选择了，单选失效了（这些单选框不是一组了）。
如果只是纯html的就没有这种问题：

        <input name="a b" type="radio" value="1" checked>
        <input name="a b" type="radio" value="2">
        <input name="a b" type="radio" value="3">
        <input name="a b" type="radio" value="4" disabled>

问题总结：
单选框<input type="radio">的name在引入layui后值不能包含空格。
如果这里单选框中的name属性的值不支持空格请说明一下（可能只有我无聊书写加了空格，正常写默认是a_b）,不过html5这么写没问题。
业务代码
<!DOCTYPE html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Demo</title>

  <link href="//unpkg.com/layui@2.9.14/dist/css/layui.css" rel="stylesheet">

  <input type="radio" name="AA A" value="1" title="默认">
  <input type="radio" name="AA A" value="2" title="选中" checked>
  <input type="radio" name="AA A" value="3" title="禁用" disabled>

截图补充

浏览器
Microsoft Edge 版本 126.0.2592.102 (正式版本) (64 位)
演示地址
No response
友好承诺

[X] 我承诺将本着相互尊重、理解和友善的态度进行交流，共同维护 Layui 良好的社区氛围。

name 值一般不应该出现空格，name="AA A" 这是一个很奇怪的写法，建议将空格换成_或-。

repo: layui/layui


text:
Should we require real names?

In favor of real names:

Helps tie things back to being a real conference with real people
Makes it easier for us to tie CoC violations back to real people
Feels more "grown-up" than just handles/usernames

Against real names:

Some people, who are not trolls, might prefer to be pseudonymous, and that's totally valid.
Needs to be worded correctly to make it clear we're not asking for a legal name.
Yet another thing to ask people. Less info is better!
UI/design complications we want to let people say "show me names instead of usernames"

I'm currently mildly against.

I am also mildly against, particularly since I don't use my wallet name in this community.
To 'tie CoC violations back to real people', perhaps we can encourage/require an email field that matches the email of the Eventbrite ticket - or even a field where you have to enter your eTicket confirmation number?

Just for the sake of argument, I want to emphasize that "real name" != wallet/legal name.
The assumption would be the same as Slack: e.g. in my case, my username would be "lazerwalker" but my "real name" would be "Em Lazer-Walker" despite that not being my legal name.

maybe we can copy Slack here and call it "Display Name". in the chat, if a user has a display name, we render that instead of the username. i also think "Display Name" makes it more obvious that this doesn't have to be your legal name.

Yeah, the overwhelming feedback I got on Twitter is "Real Name" is definitely not correct 😂
I think I've also realized that "get your full name for CoC violations" is the wrong approach — the main benefit of this is to be able to help humanize people and make them seem less like just chat handles.
I want to play around with having part of the profile edit screen be literally making a "Hello My Name Is"-style name badge, and using that metaphor to help make it clear what should go in 'name'.

I think our current solution is fine!

authors: annie kawa-kitsuragi lazerwalker

repo: lazerwalker/azure-mud


text:
pre roll ads fall out

[ ] some ads can be clicked, open in new tab, and ad pauses - there's no way to resume or skip (see slack)
[ ] do not load any ad stuff when signed in (https://tag.targeting.unrulymedia.com/rmp/216276/0/vast2?vastfw=vpaid&w=300&h=500&url=https://odysee.com/@Kona_and_Suba_Guinea_Pig_Adventures:c/this-is-peanut-the-guinea-pig:1 is called)
[ ] cut off at the bottom a bit and have a top black bar (https://lbryians.slack.com/archives/C81FGKR51/p1625678103453600?thread_ts=1625646978.442100&cid=C81FGKR51)
[ ] ads must have a skip button (Josh mentioned this)

Regression:

[ ] The issue of videos not switching correctly (previously fixed by restoring the double src call) is back again.
[ ] The "Retry" button is gone, so we are back to having to do a full reload or re-enter the page.  A retry almost always loads for me. Either fix to prevent this scenario, auto-retry, and put back the button?
[ ] Minor:  It doesn't make sense to keep spinning when it already failed (makes user think whether to wait or not). This was previously fixed.

We are getting more reports of adblockers blocking various calls/media on the page after we pushed this change, even when logged in. It may be related to the ad calls still getting made when logged in, but not sure. Reached out to adblocker.

Confirmed that my findings are causing issues for signed in users with pop up blockers due to the call still being made while signed in. This prevents the video from playing (probably just from this error, and potentially not from our domain being blacklisted)

Some others

[ ] don't load for signed in users: https://imasdk.googleapis.com/js/sdkloader/ima3.js
[ ] double head request causes double master playlist call:

@mayeaux this is an older ads issue, if it's not useful, please close it

authors: infinite-persistence kauffj tzarebczan

repo: lbryio/lbry-desktop


text:
wip: add initial support for streaming torrent files

[x] - wait for piece
[x] - stream piece to browser
[ ] - prioritize from streaming position
[ ] - improve testing

needs libtorrent 2.0.6

Coverage decreased (-0.1%) to 57.739% when pulling 0c8c0a0140394ae69b73f3f28dd6949c18820f51 on torrent_stream into 5c543cb3744ed616f4e237d08dbf14d94eeef250 on master.

authors: coveralls shyba

repo: lbryio/lbry-sdk


text:
Question about MQTT topic structure and JSON packet schema

Dear Lee,
it is fun to see what you are working on over here. It looks like an excellent project. Kudos!
May I humbly ask you a specific question, as I see you are using MQTT within your architecture. In the README, it says:

Keg Cop will report pours to Raspberry Pints via MQTT or a web endpoint with a generic JSON packet.

Can you outline the typical JSON message(s) emitted by this appliance, and the corresponding MQTT topic structure? Is it some measurement values?
I am asking because I am thinking that Kotori may be a sweet complement for your system. It is easy to write adapters for individual device families, and if that would fit together in any way, I will be happy to provide a corresponding adapter for Keg Cop.
With kind regards,
Andreas.

Hi again,
I see that I asked too quickly before dedicating some time to browse the API documentation ^1 and the documentation of the JSON models ^2. Apologies.
^3 and ^4 would be the payloads which describe the measurement values emitted by the system, right? I am now also seeing that the Controller-Initiated Communication part of the API would probably be the right thing what I was looking for.
Specifically:

The Target URL Report provides a holistic picture of the system to a custom/third-party endpoint. It is a timer-based POST; a change of state does not trigger it. As with all target system configurations within Keg Cop, it will post to HTTP only.
-- https://docs.kegcop.com/en/latest/api/#url

I think this would be the right choice for integrating with Kotori, if that would make actual sense.
By chance, on the screenshots you provided on the Operations and Configuration pages ^5, I haven't seen any about displaying graphs of measurement values over time. Maybe I am missing them. On the other hand, if such a feature is not implemented within Keg Cop yet, but you think it would be nice to have, then I will be happy to support.
With kind regards,
Andreas.

The intention was always that this would be part of an extensible system of systems.  @thorrak has been "going to finish" KegScreen for a while now.  Maybe if I get enough people to help me shame him, he will. 😉
Anyway, so if such a picture over time were desired, the "upstream" should handle that.
My main target was to be the "physical" connection and own those measurements, where KEgScreen would build the fancy tap list.

All right. Maybe @thorrak is interested as well, otherwise I will not step on anyones toes. I am looking at eyecandy like the weather dashboards we are operating over at https://weather.hiveeyes.org/, for example ^1.
It is sweet to determine long-term trends and get a different grip on the telemetry data which is already emitted by the system. As mentioned above, I don't even know if that would be an actual benefit to your community at all. Probably it would be a better fit for a brewing rig?

You are absolutely not out of line, I'm all ears.  That's the best part of Open Source, everyone's ideas count.
I'll poke John to read this and see what he thinks.  It's possible there's complimentary work to what he wants to do.

Hey @amotl, I am going to close this as not an issue - but if you are interested in this project and you'd like to see additional support in MQTT, for instance, let me know.  Right now, I think the webhook functionality could send JSON anywhere you like and be ingested as JSON.  I had another question about a complete (and standards-based) MQTT setup, so it's rolling around in my head for use.

authors: amotl lbussy

repo: lbussy/keg-cop


text:
3.1.3 Enhance controlled lists and valid values

Enable storing of constraints such as datatypes, pick lists, or default values

Ok-- I'm not understanding this, especially the part about "The contractor shall add an option for default values to be an array of allowed literal value for a given property".
Is the "default literal" field supposed to be a dropdown with options derived from a vocabulary from the URI defined in the "Values > URI" field?
In other words: If the a Values URI is set to "http://id.loc.gov/vocabulary/issuance", then the "default literal" field should be a select box with the options of:

integrating resource
multipart monograph
serial
single unit

???
Thanks,
--Charles

We might have over summarized that one. That's one use case - so if you have a list, you can pick a default from the list.

Another is more complicated - an adhoc list of values for a literal property.
If we enabled "note type", there is no list in ID to use, but there is a List in MARC:
http://id.loc.gov/ontologies/bibframe.html#p_noteType
This would be added as a property in the Note ResourceTemplate see
http://bibframe.org/bibliomata/profile-edit/#/profile/b488ee5c-511a-4ea6-8cfd-81eee398b13f
Then you would populate a list (I think a text box control with a list deliminted by /n is easy)
Note Type
Issuance information
Type of computer data
Related material
Biographical data
Administrative history
Issuing body
Index
Finding aid
Binding
Related material
Action
Exhibition
Description source
Physical details
Accompanying material
Numbering
Data source
Data not found
Musical presentation:
Computer file characteristics:
Coverage
Location
Relief
Form of original Item
Metadata entry convention
Technique
Completeness
Film inspection date

The valid values part is if you have a literal value but it is constrained by a datatype like a date or timestamp, which flows into 3.2.6

So if you look at Monograph->Instance->Projected publication date (YYMM) http://bibframe.org/bibliomata/profile-edit/#/profile/4af68062-8c00-41cb-b311-fb6c450054f6
We would add a value constraint so we get a 4 digit number (or YYMM) and then if you type something else in bfe, 3.2.6 flags it as not valid.
There's more examples of this in the Identifer profile->
http://bibframe.org/bibliomata/profile-edit/#/profile/410f8076-d0db-4acb-9d1e-719007afa9f7
Barcodes, LCCNs and LC Shelfmark all could be validated to prevent garbage being typed in.

Resolved by #26

authors: cledvina kirkhess

repo: lcnetdev/profile-edit

license_source: bigquery


text:
add a callback optionnal parameter for server.close method

net and tls server.close method accept an optional callback parameter.
ldapjs server.close method delegates to net or tls server.close method but doesn't transfert any callback parameter...
Is it would be cool if it would.
seems to me the modification should be easy:
something like to change in "lib/server.js"
Server.prototype.close = function () {
  return this.server.close();
};

to
Server.prototype.close = function (callback) {
  return this.server.close(callback);
};

⚠ This issue has been locked due to age. If you have encountered a recent
problem that seems to be covered by this issue, please open a new issue.
Please include a minimal reproducible example
when opening a new issue.

authors: jsumners stalb

repo: ldapjs/node-ldapjs


text:
Array of changes is not accepted in client.Modify

Array of changes is not accepted in client.Modify
Documentation states "Note that you can pass in a single Change or an array of Change objects." and code is present to assert is change instead of passing to the code further down that copes with an array of changes.

👋
On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request.
Please see issue #839 for more information, including how to proceed if you feel this closure is in error.

authors: jsumners willmcenaney


text:
CDLP algorithm on some large graphs fails validation

Validation for CDLP fails for the datagen-sf3k-fb, graph500-27 and graph500-28 graphs (and potentially the larger graph500 data sets) using the code on the v1-dev branch.
datagen-sf3k-fb
Expected results:
$ head datagen-sf3k-fb-CDLP
6 563
10 1073928
41 48
48 8796117679059
50 8796107572362
59 65
65 40574
73 76
76 85
85 256504

Actual results:
$ head r573407-CDLP-datagen-sf3k-fb
6 555
10 1073925
41 41
48 8796117679052
50 8796107572359
59 59
65 40573
73 73
76 76
85 256496

Log:
Parsing file/directory /mnt/gx/datagen-sf3k-fb-CDLP.
Parsed 33484375 lines from datagen-sf3k-fb-CDLP.
Parsing file/directory /mnt/gx/ldbc_graphalytics_platforms_graphblas/graphalytics-1.5.0-graphblas-0.1-SNAPSHOT/./output/r573407-CDLP-dat
agen-sf3k-fb.
Parsed 33484375 lines from r573407-CDLP-datagen-sf3k-fb.
 - Vertex 2199043067904 has value '2199039431900', but valid value is '2199039431903'
 - Vertex 4398051328829 has value '4398048256842', but valid value is '4398048256859'
 - Vertex 2199024370932 has value '3895582', but valid value is '3895583'
 - Vertex 2199052528055 has value '583496', but valid value is '583497'
 - Vertex 2199030788455 has value '2199023419513', but valid value is '2199023419518'
...
 - [33484275 errors have been omitted]
Validation failed.
 - Correct vertices: 0 (0.00%)
 - Incorrect vertices: 33484375 (100.00%)
 - Missing vertices: 0 (0.00%)
 - Unknown vertices: 0 (0.00%)
Memory (free/total/max) = 1163.54M / 4464.00M / 92064.00M
...

graph500-27
Expected:
0 3678
2 3678
5 3678
6 3678
7 3678
8 3678
9 3678
12 3678
13 3678
17 3678

Actual:
0 3676
2 3676
5 3676
6 3676
7 3676
8 3676
9 3676
12 3676
13 3676
17 3676

graph500-28
Expected:
$ head /data/gx/graphs/graph500-28-CDLP
0 3678
5 3678
6 3678
7 3678
12 3678
13 3678
15 3678
17 3678
18 3678
19 3678

Actual:
$ head output/r502951-CDLP-graph500-28/r502951-CDLP-graph500-28
0 3676
5 3676
6 3676
7 3676
12 3676
13 3676
15 3676
17 3676
18 3676
19 3676

Thoughts
The CDLP algorithm is due for a rework anyways – but it's important to keep in mind that the current version fails validation.
Now the GraphBLAS implementation used to pass 100% of the tests, so why did this error not occur before? This is because the framework performed the validation incorrectly, using the equivalence match approach instead of the exact match approach, see the release notes of framework v1.4.0.
This may imply that some of the largest data sets (e.g. graph500-30) may have an incorrect CDLP reference output – as these were generated using the GraphBLAS implementation.

It turns out this was an issue with the reference data sets. These have been fixed now.


text:
hadoop generate data, how to set date format

I use hadoop to generate data set.
But, generate data date format is

I want yyyy-MM-dd hh:mm:ss
How to set generate data date format

@suzhaojun you need millisecond precision for valid benchmarks. If you only need the timestamps up to second precision:
ldbc.snb.datagen.util.formatter.StringDateFormatter.dateTimeFormat:yyyy-MM-dd'T'HH:mm:ss

authors: suzhaojun szarnyasg


text:
Error when launching python code.

After the command "ros2 launch ldlidar_stl_ros2 ld19.launch.py" I recieved the following error:
[INFO] [launch]: All log files can be found below /home/ditmar/.ros/log/2022-11-17-10-38-42-823400-ditmar-VirtualBox-3613
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ldlidar_stl_ros2_node-1]: process started with pid [3614]
[INFO] [static_transform_publisher-2]: process started with pid [3616]
[static_transform_publisher-2] [WARN] [1668677924.187515024] []: Old-style arguments are deprecated; see --help for new-style arguments
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.433554313] [LD19]: LDLiDAR SDK Pack Version is: v3.0.3
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.434860673] [LD19]: <product_name>: LDLiDAR_LD19
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.435963707] [LD19]: <topic_name>: scan
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436106027] [LD19]: <frame_id>: base_laser
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436180008] [LD19]: <port_name>: /dev/ttyUSB0
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436199364] [LD19]: <port_baudrate>: 230400
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436209824] [LD19]: <laser_scan_dir>: Counterclockwise
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436219813] [LD19]: <enable_angle_crop_func>: false
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436229702] [LD19]: <angle_crop_min>: 135.000000
[ldlidar_stl_ros2_node-1] [INFO] [1668677924.436245783] [LD19]: <angle_crop_max>: 225.000000
[ldlidar_stl_ros2_node-1] [ERROR] [1668677924.436360430] [LD19]: ldlidar node start is fail
[static_transform_publisher-2] [INFO] [1668677924.503143437] [base_link_to_base_laser_ld19]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.180000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'base_link' to 'base_laser'
[ldlidar_stl_ros2_node-1] [LDS][ERROR][Thu Nov 17 10:38:44 2022][/home/ditmar/ldlidar_ros2_ws/src/ldlidar_stl_ros2/ldlidar_driver/src/serialcom/serial_interface_linux.cpp][Open][41][Open open error,Permission denied]
[ldlidar_stl_ros2_node-1] [LDS][ERROR][Thu Nov 17 10:38:44 2022][/home/ditmar/ldlidar_ros2_ws/src/ldlidar_stl_ros2/ldlidar_driver/src/core/ldlidar_driver.cpp][Start][90][serial is not open:/dev/ttyUSB0]
[ERROR] [ldlidar_stl_ros2_node-1]: process has died [pid 3614, exit code 1, cmd '/home/ditmar/ldlidar_ros2_ws/install/ldlidar_stl_ros2/lib/ldlidar_stl_ros2/ldlidar_stl_ros2_node --ros-args -r __node:=LD19 --params-file /tmp/launch_params_02h4cjfi --params-file /tmp/launch_params_4p_xhzqx --params-file /tmp/launch_params_crh_pjiy --params-file /tmp/launch_params_d3w9fnwj --params-file /tmp/launch_params_ed2i03x1 --params-file /tmp/launch_params_xthq6i0l --params-file /tmp/launch_params_kcwvvbzd --params-file /tmp/launch_params_3_0jvih8 --params-file /tmp/launch_params_taoamxlv'].
Currently using ubuntu version: Ubuntu 22.04.1 LTS
I'm also using Oracle Virtual Machine to run Ubuntu.
I hope somone can help me with this problem.

Set the -x permission for the serial port device mounted by the lidar in the system:
sudo chmod 777 /dev/ttyUSB*

Thanks for the quick response!
The sudo chmod 777 /dev/ttyUSB* seems to have fixed the permission problem.
But after the following text it stops printing.
ditmar@ditmar-VirtualBox:~/ldlidar_ros2_ws$ ros2 launch ldlidar_stl_ros2 ld19.launch.py
[INFO] [launch]: All log files can be found below /home/ditmar/.ros/log/2022-11-17-12-21-39-380464-ditmar-VirtualBox-5986
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ldlidar_stl_ros2_node-1]: process started with pid [5987]
[INFO] [static_transform_publisher-2]: process started with pid [5989]
[static_transform_publisher-2] [WARN] [1668684099.539221234] []: Old-style arguments are deprecated; see --help for new-style arguments
[static_transform_publisher-2] [INFO] [1668684099.581556904] [base_link_to_base_laser_ld19]: Spinning until stopped - publishing transform
[static_transform_publisher-2] translation: ('0.000000', '0.000000', '0.180000')
[static_transform_publisher-2] rotation: ('0.000000', '0.000000', '0.000000', '1.000000')
[static_transform_publisher-2] from 'base_link' to 'base_laser'
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.611595903] [LD19]: LDLiDAR SDK Pack Version is: v3.0.3
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.612532324] [LD19]: <product_name>: LDLiDAR_LD19
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.613199108] [LD19]: <topic_name>: scan
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.613551183] [LD19]: <frame_id>: base_laser
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.613906238] [LD19]: <port_name>: /dev/ttyUSB0
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.614215534] [LD19]: <port_baudrate>: 230400
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.614502757] [LD19]: <laser_scan_dir>: Counterclockwise
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.614756829] [LD19]: <enable_angle_crop_func>: false
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.615068479] [LD19]: <angle_crop_min>: 135.000000
[ldlidar_stl_ros2_node-1] [INFO] [1668684099.615259426] [LD19]: <angle_crop_max>: 225.000000
[ldlidar_stl_ros2_node-1] [INFO] [1668684100.083317173] [LD19]: ldlidar node start is success
[ldlidar_stl_ros2_node-1] [INFO] [1668684100.110435328] [LD19]: ldlidar communication is normal.
[ldlidar_stl_ros2_node-1] [INFO] [1668684100.116253038] [LD19]: Publish topic message:ldlidar scan data.
Also the /scan doesn't show up in the ros2 topic list.
ditmar@ditmar-VirtualBox:~$ ros2 topic list
/parameter_events
/rosout

It works now, after a second time the /scan did show up.
I am now able to vizualize the data from the lidar in rviz2.
I want to use the lidar to detect obstacles on a modol car.
Is ther a way to print/obtain the "raw data" like Distance, Start angle and End angle?
So I can use the data in code.


text:
🛑 Plex is down

In 6ec8b00, Plex (thonk.xyz:32400) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Plex is back up in 0a11a37 after 6 minutes.

repo: le-server/thonk-upptime


text:
More advanced linkrot checking

x failed pings over x period of time (reasonable should be determined)
without a successful ping
successful ping should reset all counters
if it exceeds threshold it should then become definitely rotted
we don't want it to go rotted because cloudflare went down, basically

Wayback Machine API docs: https://archive.org/help/wayback_api.php

This is a better idea than the original two-strikes.
Could always make the failure count and the holdover period configurable via envvars.

Would a "definitely rotted" link then be checked against the web archive api and updated to point to it instead? What if it cannot be found on the web archive (an increasingly rare happening but it still happens)?

That's a good edge case. I think if no archive is available, the link should remain the same but either the title or description should be tagged.
And that's definitely a case where that alert email or whatever should trigger.

i set the variables to X because we should probably tweak - and different rings may want different settings. I'm also really not sure what our defaults should be - maybe the time period should be a week?

A week sounds like a sane baseline. We don't want to trip over things like provider outages or routing hiccups, and we're also not doing uptime monitoring for the people who are part of the ring.
Should things in the "maybe" rotstate be tested more frequently though? Daily, maybe? And should we have an update endpoint/method to set something back to "not rotted" if the admin checks and find the thing is fine?
It could work with the existing update method; I'll make sure that the admin wrapper I'm writing makes that a simple command.

Manual-run-test as well as manual-set for admin is a good idea - even just for testing, we'll want to be able to force an up-test. stuff in maybe should definitely be tested daily (or maybe once every couple hours - might need configuration capability?)

Since the update command is a PATCH request, you can literally just pass {"rotted": "yes" | "no" | "maybe"} and it'll change the flag. Logic to reset any counters based on the input can be added as needed.
Endpoints to check all links and a single link for rottenness already exists.
How would we want to record the check results? I'm assuming in the db, but I'm not thinking too clearly right now and I can't generate a schema for it.

Do we need the precise results of the check itself to be stored /anywhere/, or is it enough to just store the suspect state rotted?

I'm referring to the number of times a link has passed the ping check so the scheduled check can decide how to set the rotted flag.
I think I just figured it out anyway. It'll be a new table (rotted_links) that's just

uuid
count

uuid
int

A record is only added when the check first fails and updated on repeated checks. If it passes, the record is deleted.

Implemented in #3. Feel free to take a look.

authors: ZAdamMac le717 noghiri


text:
Add Koajs

Adding a language

[x] The code displays "Hello World"
[x] I have updated the readme to include the new language
[x] I have incremented the language count in the readme
[x] I have no association with the language

Link to programming language: https://koajs.com

It's Koa.js not Koajs

I've fixed some conflicts

I've made a new pull request


text:
various improvements

Description
Thank you for the work on this role. I've started to use it and I've found some improvements that everyone I'm sure will appreciate.
I didn't know how to run the automated tests, I've tried to run molecule but it wasn't finding the ANSIBLE_LIBRARY even if ansible is installed and working, please let me know how can I check it.

added tags support: setup, upd_conf, unsecure_logs
added possibility to show registration logs via unsecure_logs tag. See PR #11
moved global to global_values in gitlab_runner_config
added global_strings to gitlab_runner_config
changed the task Set advanced configuration  to loop through values
changed extra_options  to array and loop through it
updated README

I'm open to discussion about how to improve what I've implemented. For now it's working on my system but there is always a way to optimize.
Cheers
Type of change

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)

Reviews

@vutkin
@tgadiev
@kharkevich

Checklist:

[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing tests pass with my changes

Merged. Thanks @mprenditore !

Merged. Thanks @mprenditore !

Awesome, welcome!
If I'll add new features in the future I'mm make other MRs.
Cheers!

authors: mprenditore tgadiev