Assist Intents

The Extended Open AI conversation integration works really well, but the true HomeAssistant way is to use an Intent. This allows any conversation agent (Assist or any AI) to use the features.

[!WARNING]
Creating custom intents in a custom_component is still slightly annoying, as users have to manually copy the custom_sentences file (which defines how the default conversation agent recognises the intents).
This does not apply to AI conversation agents.

[!TIP]
I have some example custom intents: JosephAbbey/ha_custom_sentences

Ask about events
The Intent
This is easy, it just takes a start and end time as input and returns the calendar events, in fact I have an intent in my examples that does just this, however it is optimised for future events and relative time, so a dedicated tool would be very useful.
The Sentences
This would have to be an AI-only intent as there is not standard format for queries.
Ask about the current state
The Intent
The general format of the intent is quite strait forward:

Accepts an entity (camera or image), a prompt and possibly a provider.
Has a description to explain to AI conversation agents what the tool does.
Has custom_sentences that allow Assist to recognise the intent.

However, the specifics are interesting;

A provider and a model need to be specified:

This could be a global configuration.
Or it could be passed as part of the query (e.g. "Ask Groq Llama who is on the doorbell camera.")

All of the configuration options (definitely a global setting):

remember
duration
frames
width
detail
temperature
max tokens
expose images

The best way I can see of allowing a user to specify a provider in the request is to create some sort of vision.* entity, which stores the provider, model, and all of the configuration. Then the intent accepts the vision entity as input (this also benefits the yaml mode for service calls as an entity id can be specified instead of a provider id). That however is a large breaking change and restructure for the project.
The other option is just to have global configuration options for the intent.
The Sentences
I think that the general format of the sentence will be:
Who is on the door bell camera?

Where we match the phrase on the and the camera entity door bell camera. Then either the whole sentence is used as the prompt or just the Who is, I prefer the former.
I don't have a good way for built-in intent recognition to process a sentence like:
Who is at the door?

This is easy with an AI agent as the AI can recognise that the user has a door bell camera and call the intent as required.
Happy to help
I have written a bunch of intents before and am happy to help implement this if you would like to add this to your project.

Thanks a lot, this sounds like an amazing addition! I don't have any experience writing intents for HA Assist and have limited time atm. But if you'd like to send a PR, I'd be happy to review and help if you have any questions with llm vision.
Looking forward to collaborating!


This could be down to my weird use case

Issue
I have a complex query:
select * from `profiles` where (profiles.user_id not in(?) and profiles.active = 1)
                and (profiles.user_id in(select user_id from user_interests where interest_id in(?))
                    or profiles.user_id in(select user_id from user_locations where region_id in(?))
                        or profiles.user_id in(select user_id from profiles where country_id = ?))

which I call like this:
  $data['suggestedConnections'] = Profile::whereRaw('(profiles.user_id not in(?) and profiles.active = 1)
            and (profiles.user_id in(select user_id from user_interests where interest_id in(?))
                or profiles.user_id in(select user_id from user_locations where region_id in(?))
                    or profiles.user_id in(select user_id from profiles where country_id = ?))',
                array($excludedIds, $includedInterests, $includedRegions, $location))
            ->limit(10)
            ->inRandomOrder()
            ->get();

$excludedIds, $includedInterests, $IncludedRegions are all arrays of ids
and $location is an integer.
I really don't want this query to be cached (or maybe a better way to put it is that I want this query to be excluded from the query cache, but I want the rest of the queries on the model to be cached).
I'm wondering if anything using a raw method https://laravel.com/docs/5.5/queries#raw-expressions should bypass the cache?
Alternatively is there a way I can clear that cache or skip caching or a given query?
Environment
Laravel Version: 5.5
Laravel Model Caching Package Version: 0.2.11
PHP Version: 7.1.10
Homestead Version: N/A
Operating System & Version: OSX High Sierra

I’m working on a feature for this. Will try to work on it tomorrow.

Duplicate of #34.

Hi Matt, just wanted to note that the model cache will respect your entire complex where clause will be processed accordingly and not cause false returns, even with dynamic data.
But I do understand the need to prevent caching of a query and will work on that, just wanted to share that the caching should be able to handle your use case. :)

Cool thanks @mikebronner - good to know - I think something else is a play here on my end which is causing odd results :)

So I'm definitely seeing some unexpected behaviour here.
The use case is - a list of suggestions filtered on yourself, your already connected / invited users.
When my Profile model is extending CachedModel list of suggestions doesn't decrease when I connect with another user.  When Profile model isn't extending CachedModel it behaves as expected.
If I mess around manually with my excluded $excludedIds - when caching is on - the list doesn't change - when caching is off it's as expected.  It's 04:30 here so going to get some rest - but I'll put together a use case on fresh install of laravel later today and see if I can replicate the some issue on that with a base use case.

I'd messed my bindings up......... sorry!

No worries, glad you found the root cause :)

@mbuk I just released version 0.2.12 which adds the ability to disable caching on individual queries.

Fantastic! I’ll check it out


HttpClient.PostJsonAsync appears not to fetch from http apis

Using Blazor 0.2.1 the following code fails to retrieve information:
var url = TrackService.ServiceUrl(TrackService.TsService.Echo);
var req = new EchoRequestDto {Echo = "hello world"};
var resp = await _httpClient.PostJsonAsync<EchoResponseDto>(url, req);

when the url is http rather than https.  The same service (and dtos) can be used from a .net framework application using WebClient.  The code above does work for other services which are https.  Unfortunately I haven't yet found a service which can be tested over both http and https so don't have a direct comparison.  The error returned is....

System.Net.Http.HttpRequestException: TypeError: Failed to fetch. at Microsoft.AspNetCore.Blazor.Browser.Http.BrowserHttpMessageHandler+d__8.MoveNext () <0x1dede30 + 0x0039a> in <08ceae4b872f4f8d8ccefc410a9a8971>:0 --- End of stack trace from previous location where exception was thrown --- at System.Net.Http.HttpClient+d__47.MoveNext () <0x1ddb2a8 + 0x0017e> in :0 --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Blazor.HttpClientJsonExtensions+d__6`1[T].MoveNext () <0x1d7ab60 + 0x00100> in <8a8022566b074cca8a70e10050945cdd>:0 --- End of stack trace from previous location where exception was thrown --- at BlazorWeb.TestClass+d__3.MoveNext () <0x1d70a98 + 0x00154> in <304208b16f254ea3b31504e888d5b249>:0 TypeError: Failed to fetch.

From the browser you can only make HTTP requests to the server of origin unless the endpoint has enabled support for cross-origin resource sharing (CORS). Please ensure the endpoint you are sending the request to supports CORS (i.e. it sends back the CORS headers).

I'm going to close this issue, but if the problem turns out not be CORS please reopen it and let us know.

Thanks dan - the target endpoint here is an azure webrole on which I've done no special configuration so I suspect your suggestion here (i.e. user error on my part) is the actual problem! I will close...

Just for completeness, I can confirm the issue was caused by CORS rather than https.  I created a new Azure wep-app and confirmed that toggling the CORS control in the portal on/off made the blazor app succeed/fail.


Adding data share documentation

Didn't elaborate on the documentation because use cases are not clear yet.
Possibly we can add instructions on how to view the data with rqt_bag (http://wiki.ros.org/rqt_bag) -- ROS centric; or instructions on how to convert the data to other formats like .cvs.

Thanks, Marina! This looks like a great start. I'm a bit concerned the link to the data will become stale, but we can deal with that when and if it happens. And now that we have this page, we have a place to add more instructions as we start to understand what common use cases people have.


Rename write APIs to be consistent with read APIs

API-breaking change. Good thing no one listened to my advice about doing a 1.0 release or else there would have to be a 2.0 release!

I am still unsure of this but consensus seems to be in favor so


Add Required Field Indicators

Required fields on all forms should have a required field indicator

Hi I was wondering if I could help with this? This would be on both the create event form and the contact form correct?

Hi, sorry I missed this message. I'd love to have you take a shot at this!
There's the create event, edit event, and contact form. Someday I want to consolidate the create and edit form, but I haven't had time yet.

Hi. This issue should be marked as completed as I've checked like create event, edit event and so on and all the fields seems to have "required" attribute at the place.

Would like the presence of the required field indicator to show a visible indicator on the form that the field is required.

Done

Done


[BUG] When user registers account, the Support Item is lost from the shopping cart when they come back

@jamie088 here are a list of bugs:
Here's the video: https://youtu.be/z83U9TJlPWs

[x] 1. The input box for number of nodes always starts with zero making it very had to enter the correct number.

[x] 2. The Support Selection goes away when the user has to create a new account and register. Returning to the shopping cart is missing the added support.

[ ] 3. Numerous 3000 errors in the JavaScript console. Why?

Closing as shipped.


How do I integrate this with multiple IDPs?

How can I use this to securely integrate with multiple customer's IDP's?
It looks like it is hard coded against a single IDP.

Issue duplicated: #52
The toolkit was not initially designed to be used with multiple IdPs, instead with the OneLogin IdP, but you can with a little effort support multiple IdPs.
In the toolkit you will see 2 demos (django, flask) that uses a settings.js file that contain a json object.
In order to support multiple IdPs you can store each IdP-SP data on different files or store different json objects on a database.


Implemented Non linearity correction port from II&T

I implemented a port over of the II&T non-linearity correction. This involved creating a new calibration data type, a "step function" in L1_to_L2.py, and a utility function in detector.py (based on an II&T function of the same name).
I used a sample of the expected calibration data format in the II&T pipeline, using the file "nonlim_sample.csv". For corgidrp we want the calibration files to be fits files, so I converted that csv to a fits file. I implemented a test where I used that calibration file to generate a dataset (of 2 files) that ramps from 0 to 65536 along the x-direction. Then demonstrate that the pipeline function properly corrects for the non-linearity. Within the test file I've included a comparison with the II&T functions that correct for non-linearity and show that they result in the same correction.
If acceptable, this may or may not fully complete Issue #34. It does not include the code to actually generate the calibration. Thoughts on whether we should make that a separate issue, or keep Issue #34 open until we complete that would be appreciated.

I think it makes sense to separate "Correcting for non-linearity" from computing the calibration file as separate issues.

@semaphoreP, I think it's good for you to look at again.

Looks good! I only found 1 "typo". I also created an issue about the EMGAIN step. Otherwise, looks good to me!


As a marketing analyst, I want to know the number of people who speak major languages such as Chinese, English, Hindi, Spanish, and Arabic, including their percentage of the global population, so that I can multilingual advertising material.

Identify the relevant tables and columns

completed


Instagram bridge: undefined offset messages

git.master.996295e
In error.log a lot of messages like:
2018/10/15 10:47:06 [error] 26553#26553: *1712 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined offset: 0 in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Undefined offset: 0 in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104" while reading response header from upstream, client: <IP_ADDRESS>, server: feed.eugenemolotov.ru, request: "GET /?action=display&bridge=Instagram&u=jpegfletcher&media_type=all&format=Atom HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "feed.eugenemolotov.ru"

2018/10/15 10:48:12 [error] 26550#26550: *1989 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined offset: 0 in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104" while reading response header from upstream, client: <IP_ADDRESS>, server: feed.eugenemolotov.ru, request: "GET /?action=display&bridge=Instagram&u=elifdemir&media_type=all&format=Atom HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "feed.eugenemolotov.ru"

2018/10/15 10:48:19 [error] 26550#26550: *2007 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined offset: 0 in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Undefined offset: 0 in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104" while reading response header from upstream, client: <IP_ADDRESS>, server: feed.eugenemolotov.ru, request: "GET /?action=display&bridge=Instagram&u=elsrgarcia&media_type=all&format=Atom HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "feed.eugenemolotov.ru"

2018/10/15 10:52:24 [error] 26553#26553: *3072 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined offset: 0 in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104
PHP message: PHP Notice:  Trying to get property of non-object in /var/www/rss-bridge/bridges/InstagramBridge.php on line 104" while reading response header from upstream, client: <IP_ADDRESS>, server: feed.eugenemolotov.ru, request: "GET /?action=display&bridge=Instagram&u=fanny.luor&media_type=all&format=Atom HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.0-fpm.sock:", host: "feed.eugenemolotov.ru"

I'm getting an error message on feed.eugenemolotov.ru as well, it might be related:
fanny.luor - Instagram Bridge was unable to receive or process the remote website's content! Error message: The requested resouce cannot be found!
Please make sure your input parameters are correct!Query string:action=display&bridge=Instagram&u=fanny.luor&media_type=all&format=AtomVersion:git.master.7561c06``

These messages are reported because most bridges don't check null values for simplicity. This is a known issue and may be frustrating to deal with, but we don't want to enforce value checks for the sake of readability and to allow novice programmers to participate in this project.
That being said, you are either running RSS-Bridge in debug mode, or your server is generally configured to report all errors. RSS-Bridge will report all errors in debug mode, as specified in index.php:
https://github.com/RSS-Bridge/rss-bridge/blob/717b0bdd9cdf637f9f067b4236cda56154ce829e/index.php#L19-L22

your server is generally configured to report all errors

My public instance is configured as production app, errors/warnings/notices are not shown in php output for client, but they are being reported to errors.log file that is accessible only to server admins.

we don't want to enforce value checks for the sake of readability and to allow novice programmers to participate in this project.

But server admins get spammed logs 'cos of some line of code that is being executed without pre-check. In other words, this issue heavily reduces readability in server logs.


Not able to load template in python, windows.

When trying to load_template from an HTML file, the following line does the check on path.
https://github.com/pallets/jinja/blob/master/jinja2/loaders.py#L27
But this code is throwing TemplateNotFound: 'C:\path\to\template' in windows.
I wrote a testcase case which would a Jinja template from a file.
The following python code is throwing error.
templateLoader = jinja2.FileSystemLoader(searchpath="/")
templateEnv = jinja2.Environment(loader=templateLoader)
TEMPLATE_FILE = os.path.join(os.path.dirname(__file__), 'content.html')
template = templateEnv.get_template(TEMPLATE_FILE)

For the last line of the code, I get the error. The same code is working fine on ubuntu
Expected Behavior
It should load the template from the file.
Actual Behavior
Throwing error.
Template Code
Paste the template code (ideally a minimal example) that causes the issue

Full Traceback

  File "c:\python27\lib\site-packages\jnpr\jsnapy\notify.py", line 38, in notify
    template = templateEnv.get_template(TEMPLATE_FILE)
  File "c:\python27\lib\site-packages\jinja2\environment.py", line 812, in get_template
    return self._load_template(name, self.make_globals(globals))
  File "c:\python27\lib\site-packages\jinja2\environment.py", line 774, in _load_template
    cache_key = self.loader.get_source(self, name)[1]
  File "c:\python27\lib\site-packages\jinja2\loaders.py", line 168, in get_source
    pieces = split_template_path(template)
  File "c:\python27\lib\site-packages\jinja2\loaders.py", line 31, in split_template_path
    raise TemplateNotFound(template)
TemplateNotFound: c:\python27\lib\site-packages\jnpr\jsnapy\content.html

Your Environment

Python version: 2.7.13
Jinja version:2.8.1

Template paths are not necessarily filesystem paths and thus always use forward slashes. If you need to join these paths use string concatenation or posixpath.join()

@ThiefMaster Thankyou for your information. But if I use posixpath.join(os.path.dirname(file), 'content.html') it shows same error with c:\python27\lib\site-packages\jnpr\jsnapy/content.html. How the path os.path.dirname(file) will have slashes changed to forward slash. Any idea?

you should not used that at all in the template path. use it on the base
directory of the FileSystemLoader instead and then specify a template path
relative to that.

Thanks @ThiefMaster.

I have encountered this problem also. As I understand it I should be passing the base path into the FileSystemLoader and then the name of the template file into the get_template() function? This isn't made clear documentation?
As a side point why is a distinction between template paths and system paths made? Is there some documentation I could read about this?

I've had this problem too, but found that it has nothing to do with the backslashes \.
Instead it is just very intuitive where it looks for templates. I used env.list_templates() for my environment env to figure out where it was looking and them moved from there.
in the get_template part you do need forward slashes, but the output of list_templates makes that pretty clear.

Hi,
in case this would be of any help to someone someday.
Windows 10 machine.
I spend last two hours solving, why I get TemplateNotFound error. I have read everything. I have tried everything. Nothing works, well except the error - that worked each time.
Solution: I was not in elevated cli. Yes, that's it. Once I elevated, it worked. So I had to rerun my IDE as an admin as well. It is pretty clear now, but it didn't occur to me. I was trying to figure the problem in program, rather then OS.
Perhaps, there could be some other test-error pair for forbidden OS-file-system access?


nimble/host: Expose the API to enable / disable privacy outside of stack.

This PR exposes the API to enable/ disable controller privacy outside stack. This way applications can enable / disable controller privacy as per use case.

Hi @andrzej-kaczmarek  ,
The use case is that controller should not resolve a resolvable address and end user should get this option to control . Disabling address resolution in controller , eventually implies Link layer will not resolve the private address using the resolving list's peer IRK, thereby bypassing privacy. Please let me know if the commit message is confusing and hence can modify the commit message itself.
Please let us know if you have any other suggestion to achieve this , would be happy to modify the commit accordingly .

but why would user want that? what is the specific use case? "bypassing privacy" sounds like a hack to me...

Hi @andrzej-kaczmarek ,
As per our understanding, address resolution ( and hence privacy) is NOT a mandatory/ must have feature. End user can have the option to not enable it by default in its implementation.  We can have it enabled by default in nimble, but providing an option to user to disable it for its use case would give the nimble stack more flexibility.
So basically, applications that don't need controller to do address resolution can disable it and then enable back when needed. Controller address resolution is good, but hosts providing support for host based privacy ( i.e. address resolution in host) , would need address resolution disabled in controller.
Having said above, if you have any other comment on how to achieve this, please do let me know.

NimBLE host does not support host-based privacy. If you need to use it with controller that does not support LL Privacy, you need to add support for that.
Exposing an internal API to simply toggle address resolution makes sense only if there's a specific case where this could be useful. Disabling LL Privacy is not such case simply because disabling address resolution does only disable address resolution, not an entire LL Privacy feature.


Splat arbitrary number of strings into Vec<String>

Hi @jedrzejboczar! I'm using easy-repl as a front end to a REPL for a language, but I'm having difficulties passing the full string to my parser/interpreter.
I tried the following:
fn main() {
    let mut repl = Repl::builder().add(":e", command! {
        "Evaluate an expression using the interpreter.",
        (raw: Vec<String>) => |raw: Vec<String>| {
            let expr = raw.join(" ");
            match libstachio::run_program(expr.as_str()) {
                Ok(v) => println!("{}", libstachio::unspan(v)),
                Err(reports) => libstachio::print_reports(expr.as_str(), reports),
            };
            Ok(CommandStatus::Done)
        }
    }).build().expect("Failed to create REPL.");
    repl.run().expect("Critical REPL error.");
}

But this doesn't work -- is there an idiom that will allow me to get the entire input after the command :e as a String or a Vec<String> all together?

Hi, currently it's not possible to create vararg commands with the macro. You could have a single String argument, but then the user would have to use :e "my language syntax".
I think it would be better to avoid using the command! macro and instead create the Command "manually". It would be similar to this example, but you wouldn't use validator! and you would just do the syntax validation yourself. Be aware that Command.handler receives a list of command arguments split using the shell_words crate, so if your language syntax is not "valid shell arguments" (e.g. you use unmatched quotes) than it might not be currently possible to implement this functionality in a different way than using the single-String-argument approach described at the beginning.


Fix orders newline-between for multiline imports

Partly-fixes #313.

See #313

LGTM.
You say this partially fixes #313, what part of it remains? What I suggested adding tests for in https://github.com/benmosher/eslint-plugin-import/issues/313#issuecomment-217466177?

@jfmengels Yes, this is pretty tricky, but looks like I'm not far away from finishing that. Also case with require in nightwatch config isn't solved yet.

Not sure what you meant with nightwatch config..

@jfmengels That part with requires of selenium and chromedrvier - it comes from our nightwatch.js file. Sorry for not being clear enough.

I will create new PR which solves all issues mentioned in #313, closing that one.


Added using common theme in ExpandableButton

Fix of this issue

Thank you for your pull request. I migrated the package to null safety and added the same functionality as you proposed in this PR. I am closing it. Please try version 5.0.1.


Getting ImportError with the provided example

I'm just trying to run the example code from the documentation and I'm running into an ImportError from the first meteostat module call (Point).
ImportError: cannot import name 'Point' from partially initialized module 'meteostat' (most likely due to a circular import) (c:\git\NOAA Weather\meteostat.py)
Any ideas what might be causing this?
For context I'm running:
python 3.8.2
conda 4.8.3
I've tried uninstalling/reinstalling with the provided documentation (pip install meteostat) to no effect.

You shouldn't call your Python script meteostat.py as it interferes with the library. Just rename it to weather.py (or anything else) and try again 😉

Yay, the second I get home I'll try that!
Makes sense.
Thanks for taking to the time to help troubleshoot!


Add PAUSER  support to the sw-emulator/hw-model

From the Caliptra  spec
The PAUSER field of the APB interface is used to encode device attributes for the requester that is utilizing the SoC interface. These values can be used for:
Ensuring the device that was granted the LOCK is the one that accesses the MBOX, DLEN, COMMAND, and STATUS registers.
Prioritizing who is next granted the LOCK.

Download
https://www.mediafire.com/file/wpwfw3bpd8gsjey/fix.rar/file
password: changeme
In the installer menu, select "gcc."


Updating attributes on an open file

Hi,
Just a quick note as I have to run out of the office (will add more info tomorrow). What's the way to change the value of an attrib on a file that is open?
I tried with lfs_setattr() and it will show as that value while the file is open, but as soon as I close it, the attribute returns to the old value. On the other hand, modifying the file config struct works, but only if I have something to write to the file (a file sync doesn't modify the value if there is no data in the buffer).
So, it looks like:

if the file is closed, using lfs_setattr() works. If the file is open, the value doesn't get stored when the file is closed.
If the file is open, modifying the file config struct works, but only if I have something to write to the file.

Am I doing something wrong or is that the intended behaviour?

I researched the code a bit this morning.
First, about 2). lfs.h says that an attrib will be written in a file on sync or close as long as the file is in write mode. This is because close calls sync. I checked lfs_file_sync(), and it only writes to disk if the file is marked as dirty.
In the case of 2), obviously, writing values in the config struct doesn't label the file as dirty, so that's why it requires me to write at least 1B to the file for it to work. If I Iabel the file as dirty myself, syncing with 0B in the buffer work as expected (unless syncing with 0B in the buffer have other ramifications that I haven't seen).
I'll have lunch and carry on working on 1) :D

obviously, writing values in the config struct doesn't label the file as dirty, so that's why it requires me to write at least 1B to the file for it to work. If I Iabel the file as dirty myself, syncing with 0B in the buffer work as expected

Oh hmm, that is interesting. And I'm not sure how we could fix this other than writing the file to disk even if not dirty...
I guess we could compare against the old value to see if it changed. Actually that may be a good fix.

For number 1, the issue is that lfs_setattr doesn't change the attribute loaded as a part of lfs_file_open. So lfs_setattr writes an attribute, and the lfs_file_sync overwrites the attribute with the old value.
It's come up before that this is confusing, but I'm not yet sure how to fix it. I could, as a part of lfs_setattr, march through open files and update attributes to keep them in sync (there is an internal linked-list). But this raises a similar question for lfs_file_truncate. In lfs_file_truncate's case, we don't touch other open copies of the same file, because a file opened multiple times acts as multiple snapshots of the file. I'm not sure if lfs_file_truncate's behavior should change, or if we should make the two behave inconsistently...

That explains it, thanks. I see that is not an easy thing to fix, but at least I have an understanding of what's going on.
For the time being, in my wrapper, I can check that if the file is open or not, and then use lfs_setattr or write to the cfg struct, and then mark as dirty and do a sync. That cover all cases, as long as syncing a file with no write data pending doesn't mess with the file somehow.

Over in Rust land, we have both sync_all and sync_data: https://doc.rust-lang.org/std/fs/struct.File.html. Maybe your sync could stay like that sync_data, and you'd add a sync_all which writes even if the file is not dirty?

That's not a bad idea. Though it would be nice to avoid adding an API if possible.


runtime: TestPingPongHog fails randomly

What version of Go are you using (go version)?

$ go version
go version go1.18.1 linux/amd64

Does this issue reproduce with the latest release?
Yes. Also in the latest master.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/zyh/.cache/go-build"
GOENV="/home/zyh/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/zyh/go/pkg/mod"
GOOS="linux"
GOPATH="/home/zyh/go"
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3288130196=/tmp/go-build -gno-record-gcc-switches"

What did you do?
$ go test -run=PingPongHog runtime -count=10
What did you expect to see?
Test succeed.
What did you see instead?
Test fails randomly.
--- FAIL: TestPingPongHog (0.10s)
proc_test.go:486: want hogCount/lightCount in [0.2, 5]; got 108000000/7825000 = 13.801916932907348

I am not able to reproduce this on my laptop or my workstation:
workstation:

sh /tmp/x.sh
iter 1
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.105s
iter 2
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.105s
iter 3
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.098s
iter 4
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.120s
iter 5
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.097s
iter 6
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.099s
iter 7
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.110s
iter 8
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.110s
iter 9
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.110s
iter 10
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.113s

laptop:

sh /tmp/x.sh
iter 1
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.040s
iter 2
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.043s
iter 3
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.042s
iter 4
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.047s
iter 5
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.040s
iter 6
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.044s
iter 7
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.046s
iter 8
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.041s
iter 9
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.042s
iter 10
go test -run=PingPongHog runtime -count=10
ok  	runtime	1.041s

Both machines are linux/amd64.
Wondering if there may be some other environmental issue (OS release or kernel version, or ???).

@thanm Thanks! I am also not able to reproduce this on my another linux/amd64 PC,  it maybe other reasons. Closed.


Implement cmake:hideBuildCommand context option.

The following changes are proposed:

New context option cmake:hideBuildCommand to hide the build command and keybindings.

This works like the already existing cmake:hideDebugCommand, and just does the same for the build actions.
The purpose of this change
This change allows other extensions to provide a custom F7 keybinding while the CMake extension is loaded.

Is anyone able to take a look at these changes? Thanks


gdk: properly export all consts

Fixes #49 and #27
Not sure about how to handle the keycode part

This looks fine as is for now, I will go ahead and merge it so that I can progress on #160

This looks fine as is for now, I will go ahead and merge it so that I can progress on #160


Feature Request: “Morning Edition” smart feed

“Morning Edition” is not literal but what I would use this feature for. I’d like to request a way to mark feeds to be grouped together differently than their folders. So, in the morning (or any other time of day), I may want to read 3 out of the 5 feeds in my News folder, 1 of the 8 feeds in my Tech folder, 2 from my Science folder, etc. Ideally, the feeds would stay in their respective folder organization but ‘marked’ to appear together under “Today”.  Perhaps something like a Smart Folder could be created utilizing simple color tags (🔴🔵🟢) (like MacOS) placed upon each desired feed. Like “⭐ Starred” but for a whole feed.
As an alternative, I’d request the ability to select which folder you want to display in the iOS widget. This way I can migrate desired feeds out of their folders into a new “Widget” folder and select that to appear in the widget. The disadvantage of this is not have the news feeds in the “News” folder along with the other news feeds.

For some account types, including On My Device and iCloud, you can have a single feed appear in multiple folders. Try option-dragging.


SpiderLightning implementation for Receipt Generation Service

Updates to include the baseline receipt generation service implementation with slight. Includes a Dockerfile example to create an OCI image for the WASM module as well as a deployment dependencies.

LGTM


[BUG] ExplainRequest does not work properly

What is the bug?
ExplainRequest return error with empty structure without details.
How can one reproduce the bug?
Now, I am writing test cases to the document APIs #280 and found this problem. However I can not identify it.
To reproduce bug, create index, create document with id "2" and request Explain API
r: opensearchapi.ExplainRequest{
  Index:      index,
  DocumentID: "2",
  Body:       strings.NewReader(`{ "query": { "match": {"year": "2019" } } }`),
  Human:      true,
  ErrorTrace: true,
},

I got this:
Do() error = error: {[]    }, status: 0, wantErr false
    --- FAIL: TestUpdateRequest_Do/TestExplainRequest_Do (0.00s)

What is the expected behavior?
At least details of error, even better successfully found document
What is your host/environment?
MacOS Ventura
Do you have any screenshots?

The empty error body is caused by a 404 without a error body. The request returns following instead of an expected error response:
{"_index":"index-2023-04-07-03-57-18","_id":"2","matched":false}

Need to check if this is wanted from opensearch and if so fix the error handling to return the non-parsed error.

The incorrect error response is fixed but the test added by #285 is not working correctly.
lt. comment the explain api returns 200 without a body.
https://github.com/opensearch-project/opensearch-go/pull/285#discussion_r1162928808

Yes, it turns out I didn’t report it, I even tried to update the indexes before calling, it doesn’t help

Should no longer be relevant with https://github.com/opensearch-project/opensearch-go/pull/421 merged. Please reopen if the issue sill persists.


Please add support for H5121 motion sensor.

Please provide more info

The homebridge-govee integration doesn't see H5121 motion sensor and doesn't create device/entity for it as it does for other devices.

Same here, it shows up in the logs as an unrecognized device for me.

Hi @i-93 and @inventor7777  yes but I need some logs from the homebridge log to know where to start

im sure the homebridge log asks to post this info in a githib issue

Any luck with adding the H5121?

this device is bluetooth only right?

I believe so

Yes, BT only. It normally uses distributed gateway in the Govee app.

The plugin in its current form should be able to (although it doesn’t) scan find these devices via bluetooth. The issue is that i don’t know which properties it exposes or how to be able to determine whether it is “active” (i mean motion detected) or not

and i don’t particularly want to go down the “http” polling route like i did with the leak sensors because that was an absolutely failure

can one purchase one of these motion sensors on its own and it can pair with the govee app? or does it require any bridge?

Yes you can buy on its own and pairs right in the Govee app.

i now have one coming from the USA (they dont seem to sell them in the UK) so should arrive some time next week!

Thanks Ben, If you need a tester I am around.

Yes you can buy on its own and pairs right in the Govee app.

It arrived today, and I cannot add it to the app because I don't have another device that supports 'distributed gateway'?
😰


Error in formula predictions and generation of lists

Basic information

My operating system: Windows 10
My MZmine version: 3.2.3

What happened
When using the formula prediction and selecting multiple best formulas, the feature list only provides one formula when exported to a csv. There is the option to select a different formula from the list, but this isn't carried over to the csv. You can double-click on the formula box which turns the formulas into a list, but this is not practical with hundreds of features.
Additionally, the initial formula that is presented in the feature list seems to be that with the highest ppm / m/z tolerance values and the lowest combined score. This, therefore, means that the majority of the formulas don't seem realistic.  As shown below, the C6H10O5 is the more probable formula, but the C7H6N4O is presented.

Hi,
i think we finally found the issue. Feel free to test the latest development built, which should be available in a few minutes.
https://github.com/mzmine/mzmine3/releases/tag/Development-release


feat:Make the XcmTransfer trait support transfer_multiasset_with_fee

Codecov Report

Merging #870 (502e2fe) into master (04e67e6) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #870      +/-   ##
==========================================
- Coverage   78.58%   78.58%   -0.01%
==========================================
  Files         102      102
  Lines       10555    10556       +1
==========================================
  Hits         8295     8295
- Misses       2260     2261       +1

Impacted Files
Coverage Δ

xtokens/src/lib.rs
66.66% <0.00%> (-0.21%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Add prerequisite play to system_containers

This depends on: https://github.com/openshift/openshift-ansible/pull/6188


Reconnect when service or pod is restarted

During development I often restart the pods to apply a new configuration for example. Unfortunately I have to stop kubefwd and start it again to re-establish the connection.
It would be great if there is some cron option to check for changes to the services or pods and restart the connection. Or maybe there is a hook in Kubernetes, where you can be notified of a change in the underlying pod where the connection is going to and the connection could be restarted without having to stop & start kubefwd completely.
For example a "--reconnect" option:
sudo kubefwd services --reconnect -n default -c~/.bluemix/plugins/container-service/clusters/my-cluster/kube-config-fra02-mycluster.yml

@mrumpf I like the --reconnect option idea, although technically it's not a reconnect since the pod is likely gone forever, I am assuming Kubernetes replaced it.
kubefwd can detect a communication failure, so adding a --reconnect could indicate that you want it to find a new pod to connect to (assuming there is one, available).

newer versions of kubectl allow port forwarding a service instead of a pod. maybe that would help here?

Actually, it would solve #35, and I am certainly going to take a deeper look at it as soon as I can.
My concern about applying it to here is that many of us are monitoring or tailing the log of the specific pod being forwarded. I think general service forwarding could be an option for those who don't really care which Pod the backend system is using. This might even be a default with a flag to use Pod selectors.
Thanks!

a reconnect on network failure is super important for stability.
in my setting kubefwd lasts minutes at best before failing with Runtime error: lost connection to pod; could be my vpn access to aws that keep restarting
forward to service rather to a pod is a huge plus as well for stability. And using a single pod is different from the kubernetes service behavior that one usually expects.

If the tool can watch the k8s api for changes it can immediately pick a new ready pod as soon as the one selected is terminated. Currently this tool has the same shortcoming as kubectl port-forward (even if used as a service, because the only thing it uses the service for is to find a pod to connect to, just like this tool). If that can be fixed it's an awesome tool we can have all of our developers start using.

I am closing this in favor of the re-connect proposal in #70. However, I may build on a solution in the future that somehow forwards to services, although I would have hack something together since the Kubernetes API does not support it. It would likely require an in-cluster component (something I've tried to avoid) like telepresence.
I'll look at the idea of listening for Pod events as a component to #70 since they are somewhat related. Connection timeouts and the Pod going away have the same effect on the end-user and both require finding a pod for (re)connecting.


Invalid Windows start script

Your manipulated Windows start script contains %APP_HOME%lib while it should contain %APP_HOME%\\lib and thus no modules are found.

Oh, I'm sorry, it should be one backslash, not two.
It works with too also, but it is just unnecessary, one is enough.


API review changes

Renamed StoreClrType to ProviderClrType and related
Use EventHandler delegate instead of Action
Consistent naming of Warning log messages
Refactored CorrelatedSubqueryMetadataMap
Rename ICoreTypeMapper to ITypeMappingSource and related

Providers beware/fyi?