More API shortcut requests for object details

The intent of this issue is to describe some utilities we would like to have for quick access to roles in app APIs. The main focus is giving some replacements for what is now accomplished by the track_relationship utility, which see https://github.com/ansible/django-ansible-base/issues/159, is intended to be removed.
Links from objects to role-holding users
Visit http://<IP_ADDRESS>:8000/api/v1/teams/1/
That has related links to, for example, team admins:
{
    "id": 1,
    "url": "/api/v1/teams/1/",
    "related": {
        "admins": "/api/v1/teams/1/admins/",
        "created_by": "/api/v1/users/3/",
        "modified_by": "/api/v1/users/3/",

Without the relationship tracking, we don't have a direct alternative to http://<IP_ADDRESS>:8000/api/v1/teams/1/admins/, for example. My alternative proposal would be to add http://<IP_ADDRESS>:8000/api/v1/role_user_assignments/?object_id=1&content_type__model=team to the related links. This could be separated by role, but I would rather not do that.
Alternatively, we could filter the user list by the team roles. Right now I don't think this is possible with the query filters, because it requires 2 conditions on a subquery. So this could only be accomplished by exposing new things in the API.
Serializing role members
By default, test_app includes all fields, so TeamSerializer has "admins", for example, added.
            "encryptioner": null,
            "team_parents": [],
            "users": [
                3
            ],
            "admins": []

This requires prefetching those relationships, but assuming this is done, the serialization is performant.
The proposed replacement here is, drafted for teams:
"role_user_assignments": {
    "Team Admin": [],
    "Team Member": [
        3
    ],
}

This can be relatively performant, since it just involves fetching all ObjectRoles with the associated users prefetched. You could have an analog for team assignments (replacing former "team_parents"). It would still be preferred to limit this to the detail view.

Alternative:
    "summary_fields": {
        "object_roles": [
            {
                "role_definition": 1,
                "name": "Team Admin",
                "managed": true,
                "users": []
            },
            {
                "role_definition": 2,
                "name": "Team Member",
                "managed": true,
                "users": [3]
            },
        ],
       "more": {},
    },

This is a bit of a doozy, where we have 2 lists involved in the nested (in addition to dumping it in summary_fields), but this is very accurately what we have in the database. There is not a related object_roles manager in the database, but it would be theoretically possible to add it. Downside: we never wanted to surface object roles in the API, so there's not an "id" but a reference to the role definition id.

Disclosure - I am leaning away from all implementations proposed here.
There is a broader sentiment that we want DAB RBAC in the permission-provider mode to behave more like an external policy server. Even if a client is interacting with a single server, philosophically, we would like these annotations to be provided by a separate request.
This is very similar to the user capabilities issue https://github.com/ansible/django-ansible-base/issues/154, with only the very minor difference that that is concerned with evaluations and this is concerned with assignments. It is sensible that these are both handled by the same mechanisms.
So the suggestion here is that we might add new DAB RBAC endpoints that basically does a "bulk" display of either assignments of permissions. The use cases we are developing:

for a set of resources in a page, return role assignments for each object in the list. This includes role data and user data for each assignment.
for a set of resources in a page and for a given user, return permissions that user has for every object.

If we always have the resource/permission provider serve this information, that also helps answer an issue @john-westcott-iv brought up, which is that JWT syncing of role assignments will not be up-to-date in all circumstances we care about. This is going to be a little complicated, but imagine that we are serving a list of inventories from AWX coupled with a resource/permission server co-deployed. We should not, can not, have AWX provide either the assignments or permissions for objects in the list, because it is not the source-of-truth for that information.


Editor - changes HTML

Changes to the HTML aren't saved when you click play unless you click elsewhere on the form(?)
By Julian

Works now


Added Clone Of the Website " Go Daddy "

This is the PR of the issue Go Daddy Website Clone #725...
Please review sir/mam.
Thank you.

@eswarbhageerath you have build this by your own? Kindly link the resources you have taken for your reference in the description.

@DEEPIKA-SUK I have made this on my own, I followed this course step by step in making this project.
https://www.udemy.com/course/the-complete-web-development-bootcamp/
This is a beginner-friendly course. In The project, All the web designing part  I used in this project was the reference to This course.

@VidhiBhatt01 I have updated the readme.md file accordingly.


[Refactor]: Xline logs

Currently there are serveral issues in the log of Xline:

Log size is huge
During a recent Jepsen test with Xline debug level enabled, Xline printed the key-values of every command to logs. This resulted in large log files, as the values can be several tens of kilobytes in size. To address this issue, the logs should be refactored to either use the tracing level or disable the printing of key-values. Note that this issue may also be present in snapshot related logs.

Logs are confusing
The current logs are confusing as they lack essential information required for effective debugging. The logs should include key information, such as propose ID and revisions, to enable easy tracking of command execution.

Refer to https://github.com/xline-kv/Xline/pull/683

@bsbds would like to take on this task

Hi, @rohansx , would you like to take on this issue?

@Phoenix500526 Yeah sure i can give it a try

Hi，@rohansx, I'm glad you're interested in this issue. However, I believe there are some ambiguous points in the issue description, such as how to define the so-called "essential information" in point 2. This may require a deep understanding of the entire project and experience in debugging. IMO, starting with the first point would be relatively easier as a starting point.  @bsbds can you give some information for the point two?


why is getting me IMPORT FAILED node error in comfyui

i follow your all installation instructions but it is not working

can you please tell me what i missing here?

can you please help me with this issue?

i have two eniourenemnt one using python 3.10 and the other 3.12
its work on 3.10 but failed to import on 3.12 , !!!
try to downgrade to 3.10

why are you using torch compile here?

@nanaj96 Are you trying to set up the enterprise edition?
enterprise edition needs a license key. Maybe you can only run with the community Edition.


Added support for symfony/console v3

See puli/discovery#19 for discussion

The tests are passing here because they're grabbing version 2.8.0 of symfony/console (and one is grabbing 2.3.0 for --prefer-lowest). The problem I mentioned in puli/discovery#19 is that the tests fail with errors when symfony/console 3.0 is used.

This build uses 3.0 and passes: https://travis-ci.org/ramsey/uuid/jobs/97472351
The failing build is because --prefer-lowest is not an option for install, but for update, so that's apparently the reason for update instead of install.

All looks good. Thanks for your help!


Ensure that Services is loaded.

Speculative fix for NameError: uninitialized constant PublishingAPIUpdater::Services

@danielroseman shall we deploy this to Integration and see if it works?

I believe I solved it like this previously:
https://github.com/alphagov/collections-publisher/pull/149

@tijmenb thanks, do you think that's the same issue though? Your PR there talks about an explicit circular dependency error message, we're just getting uninitialized constant.

I think so. I could be mistaken but I think the circular dependency error is actually a masked uninitialized constant error. At the time I thought it was caused because collections-publisher has a /app/services directory.


src directory can be removed

pure Ruby mrbgem like this does not need to have src directory. you can remove whole src directory safely.

Thanks for your advice :tada:


Remove full push on Pod update

Currently, Pod updates trigger full pushes, which is needed because waypoints have per-pod Listeners.
This is unacceptable for performance.
We need a mechanism to drop the full push; pod updates should only trigger cheap partial updates.
This may depend on "Design scalable waypoint XDS".
size: M, type: implementation

In more recent world, this is improved a bit. We just need to update 1 listener, and push context is somewhat efficiently re-computed.

This can be scoped further for sure:

Consider removing the AmbientSnapshot and pull directly from the live source
Only update endpoint on EDS change for most types, but also LDS for Waypoint
for Waypoint Address update, only update the internal listener (delta XDS)
Make sure we don't recompute sidecarscope, etc


Feature request for YouTube

Hey, please consider adding YouTube results too, if possible.
Thanks :)

Sorry, I don't plan to add YouTube in Search-Engines-Scraper ...because it's not a search engine! But I'm sure you'll find what you're looking for somewhe in github, https://github.com/search?q=youtube+scraper

Sorry, I don't plan to add YouTube in Search-Engines-Scraper ...because it's not a search engine! But I'm sure you'll find what you're looking for somewhe in github, https://github.com/search?q=youtube+scraper

Thanks :)


Remove deprecated code from pulse module

Summary
This PR removes deprecated code from the pulse module. These codes have been deprecated for more than 3 months and should be removed for sake of code maintainability.
Details and comments
Corresponding unittests are removed or integrated into the test of alternative logic if any.
This code is partly overlapping with #7265.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

20 of 22 (90.91%)  changed or added relevant lines in 9 files are covered.
27 unchanged lines in 5 files lost coverage.
Overall coverage increased (+0.1%) to 82.585%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

qiskit/pulse/library/pulse.py
1
2
50.0%

qiskit/pulse/schedule.py
7
8
87.5%

Files with Coverage Reduction
New Missed Lines
%

qiskit/pulse/library/waveform.py
1
95.74%

qiskit/pulse/utils.py
5
84.21%

qiskit/pulse/channels.py
6
88.71%

qiskit/pulse/instructions/instruction.py
6
85.87%

qiskit/pulse/instructions/play.py
9
75.61%

Totals

Change from base Build<PHONE_NUMBER>:
0.1%

Covered Lines:
49450

Relevant Lines:
59878

💛  - Coveralls

Thanks @mtreinish I updated the corresponding tutorial. Hope this PR will pass CI.


Support writing unsized, uncommon ranges.

write functions for arrays and objects expected const input values, which prevents the writing of lazy ranges that mutate internal state. The qualifiers were changed and tests were added.
It would be really nice to support writing any range as a string, but that's something to tackle for a future day.

Note to self: squash future merges


Losing key with (key,value) form of ng-repeat

With the following markup:

    {{teamName}}
    {{teamData.points}}
    {{teamData.goalDifference}}

and model:
$scope.tableTeams = {
    "team1": {
        points: 34,
        goalDifference: 9
    },
    // etc...
}

the {{teamName}} value in the template shows a numeric index instead of the team name.  When using the standard angular orderBy, the name is preserved.  Is this something which can be easily fixed?
Thanks.

@mcavanagh for the time being only dot notation is supported to access the ordered object's keys.
I would suggest as work around to have the name (and any metadata) as another attribute.
PRs are welcome. 😊

I ran into this issue as well, and indeed solved it by appending the key as another attribute of the array element:
        var filtered = [];
        angular.forEach(items, function (item, key) {
            item.objectID = key; // Need to keep info from object key
            filtered.push(item);
        });

@carande I am curious about the context of your work around. Would you put something in place to see it live?

Just getting back to this now... I'm not too familiar with how to set up a
"live" demo, but I sent a pull request showing how I edited your code.  Let
me know if that makes sense - this may not be the best way to do it, but it
was a solution that worked for me.
On Wed, Jul 29, 2015 at 11:08 AM, Fabricio Quagliariello <
<EMAIL_ADDRESS>wrote:

@carande https://github.com/carande I am curious about the context of
your work around. Would you put something in place to see it live?
—
Reply to this email directly or view it on GitHub
https://github.com/fmquaglia/ngOrderObjectBy/issues/6#issuecomment-126020548
.

I also would like a solution to this, although I am not skilled enough to contribute.

This has been fixed by @carande in #9 and #16
Thanks a lot buddy!

Sure thing!


doubled attributes in RDF/XML output

for two elements
https://github.com/linked-swissbib/mfWorkflows/blob/master/src/main/resources/transformation/resource/morph-marc21ToRdf-XML.xml#L270
https://github.com/linked-swissbib/mfWorkflows/blob/master/src/main/resources/transformation/resource/morph-marc21ToRdf-XML.xml#L270
we create doubled attributes in RDF/XML output which causes troubles (later) in parsing the RDF or storing it in Sparql servers

Issue fixed (for contentType): we just need to remove 'flushWith="record"' from the entity-tags. See new version: https://github.com/linked-swissbib/mfWorkflows/blob/master/src/main/resources/transformation/resource/morph-marc21ToRdf-XML.xml#L91


Background-position range in percents

Hey! Nice plugin.
Can you modify this to use in range "50%" or "30p". It would be more responsive.
Thanks!

Seconded


Removed print statement in ScraGet/init.py

I removed a print statement in ScraGet/init.py

That's not a mistake... it's intended. Is it irritating? I may remove if it is

It shouldn't be there because the user doesn't always want stuff printed to the console.

Ok


Add the queue_send glyph (30 percent opacity) to all API VIs

Add the queue_send glyph (30 percent opacity) to all API VIs, and all VIs that enqueue into a queue.

Perhaps the quickest, and most efficient, way to implement this is to create an Icon Template that gets then applied to all the VIs. This would ensure consistency too.

Created new VI icon template "QueueSend30PercentOpacity.png". Saved at: C:\Users\Petru\Documents\LabVIEW Data\Icon Templates\VI\3rd party
Applied this VI template to all API VIs that enqueue into a queue (including the "Enqueue High Priority" VIs that enqueue at the opposite end


[Bug Report] Tooltip not shown for disabled buttons

Element UI version
2.0.0-rc.1
OS/Browsers version
Chrome latest
Vue version
2.5.2
Reproduction Link
https://jsfiddle.net/pj71jkyw/688/
Steps to reproduce

Wrap a button in tooltip.
Disable button with :disabled

What is Expected?
Tooltip is shown on hover
What is actually happening?
Tooltip is not shown on hover

Disabled form elements are not supported for Tooltip, more information can be found at MDN. You need to wrap the disabled form element with a container element for Tooltip to work.


task switch context issue

This crash i dont even know how to bite. I dont have memory leak for sure and crash happened after about 20 minutes, but app usually can run over 10 hours. Here is log:
Heap summary for capabilities 0x00000800:
  At 0x3ffc42ac len 32767 free 3644 allocated 28968 min_free 0
    largest_free_block 2104 alloc_blocks 27 free_blocks 3 total_blocks 30
  At 0x3ffae6e0 len 6432 free 0 allocated 6300 min_free 0
    largest_free_block 0 alloc_blocks 25 free_blocks 0 total_blocks 25
  At 0x3ffc0978 len 128648 free 24 allocated 127704 min_free 0
    largest_free_block 12 alloc_blocks 220 free_blocks 2 total_blocks 222
  At 0x3ffe0440 len 15072 free 4228 allocated 10660 min_free 0
    largest_free_block 1536 alloc_blocks 27 free_blocks 11 total_blocks 38
  At 0x3ffe4350 len 113840 free 93688 allocated 20104 min_free 88600
    largest_free_block 93688 alloc_blocks 3 free_blocks 1 total_blocks 4
  At 0x400988e0 len 30496 free 30460 allocated 0 min_free 30452
    largest_free_block 30460 alloc_blocks 0 free_blocks 1 total_blocks 1
  Totals:
    free 132044 allocated 193736 min_free 119052 largest_free_block 93688
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400929c5  PS      : 0x00060033  A0      : 0x400950f7  A1      : 0x3ffc2d90
A2      : 0x00050023  A3      : 0x00000001  A4      : 0x3ffb3f60  A5      : 0x3ffb3f60
A6      : 0x00000001  A7      : 0x00000001  A8      : 0x0000000a  A9      : 0x00000002
A10     : 0x1b468529  A11     : 0xe67ec000  A12     : 0x3ffb4030  A13     : 0x3620464e
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000014  EXCCAUSE: 0x0000001c
EXCVADDR: 0xe67ec048  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000

Backtrace: 0x400929c5:0x3ffc2d90 0x400950f4:0x3ffc2db0 0x400950aa:0x00000003

0x400929c5 is in vTaskSwitchContext (D:/msys32/home/imper/esp/esp-idf/components/freertos/tasks.c:2870).
2865                                            if (foundNonExecutingWaiter == pdTRUE) {
2866                                                    /* If the task is not being executed
2867                                                    by another core and its affinity is
2868                                                    compatible with the current one,
2869                                                    prepare it to be swapped in */
2870                                                    if (pxTCB->xCoreID == tskNO_AFFINITY) {
2871                                                            pxCurrentTCB[xPortGetCoreID()] = pxTCB;
2872                                                            ableToSchedule = pdTRUE;
2873                                                    } else if (pxTCB->xCoreID == xPortGetCoreID()) {
2874                                                            pxCurrentTCB[xPortGetCoreID()] = pxTCB;

0x400950aa is at D:/msys32/home/imper/esp/esp-idf/components/freertos\portasm.S:206.
201
202         #ifdef __XTENSA_CALL0_ABI__
203         call0   vPortYieldFromInt       /* call dispatch inside the function; never returns */
204         #else
205         call4   vPortYieldFromInt       /* this one returns */
206         call0   _frxt_dispatch          /* tail-call dispatcher */
207         /* Never returns here. */
208         #endif
209
210     .Lnoswitch:

0x400950f4 is at D:/msys32/home/imper/esp/esp-idf/components/freertos\portasm.S:406.
401         call0   vTaskSwitchContext  // Get next TCB to resume
402         movi    a2, pxCurrentTCB
403             getcoreid a3
404             addx4   a2,  a3, a2
405         #else
406         call4   vTaskSwitchContext  // Get next TCB to resume
407         movi    a2, pxCurrentTCB
408             getcoreid a3
409             addx4   a2,  a3, a2
410         #endif

I mean, i know how i can try to fix it, by use tasks pinned to core or only one core, but how it can crash in this line? Only idea i have is some serious memory issues i have(in app).

It would help if you could attach the elf file or run disass /m 0x400929c5 in GDB for a bit more context.
Here, EXCVADDR=0xe67ec048, so load or store happened from that address, which is obviously some garbage value. You also can notice that A11=0xe67ec000, and was probably used to derive the load/store address. Where did A11 come from? It's hard to say without disassembly. But that value was likely corrupted, most likely in static memory or on the stack.

Hi @igrr , thanks for instructions. Here is disass output:
https://gist.github.com/chegewara/14c64c7fd1e6f6dd1b35c348ad55c363

a11 comes from listGET_OWNER_OF_NEXT_ENTRY( pxTCB, &( pxReadyTasksLists[ uxDynamicTopReady ] ) );, which means that owner is corrupted in one of the task lists.

some serious memory issues i have(in app).

What kind of issues do you have, not enough memory?

The thing is i dont see any problem with memory in my code. As you can see i have a lot free heap, and it is steady for hours:
free 132044 allocated 193736 min_free 119052 largest_free_block 93688
What i meant is i can have some heap corruption that i dont know yet, but after few days when i finally fixed memory leak in json parsing, i dont have any known memory problems.

You sure your tasks have enough stack? Stack overflow is tricky to detect so having no memory leaks does not mean that you memory is not corrupted. You can try to enable heap corruption detection in comprehensive as it is described here. This will also be able to detect stack overflows. Once it helped me a lot.


Server API to get subscriptions information

If external programs that embed moquette using Server class want to know about subscriptions information (i.e. a set of Subscriptions), they can implement InterceptHandler that overrides onSubscribe(InterceptSubscribeMessage msg) and collect the information from the msg argument.
But currently, the external programs cannot know about the stored subscriptions information after restarting the Server. (If a subscriber starts a session without clean session flag, the subscriber keeps the subscription state after reconnect even when they don't subscribe again in QoS 1,2).
There should be some API for Server to ask current subscriptions information from external programs. I think following API is enough.
public List<Subscription> listAllSubscriptions();

Could this be something that you might be looking for? Link to MQTT Wiki. It doesn't include your actual request to iterate through the subscriptions but it somewhat looks like an API. Perhaps we could add more SYS calls.
For SYS calls, there's already an issue. Link
However, I wouldn't mind to have interfaces that allow projects to obtain such information that embed Moquette.
@andsel what are your thoughts?

As I wrote (and you wrote), at least we need an interface to iterate subscriptions on Server. But yes, it is good to have APIs like 'SYS calls' shown in the wiki.

There are pros and cons in both solutions.
The "SYS" topic is agnostic of the language/platform, and is more portable, but you need to pass through a client, and if your are embedding Moquette it's counterintuitive and not clean.
The "API" way is more clean but it's tight to Moquette.
To solve @teranisi  issue the Java API is probably the best one, the SYS is another stuff to have in Moquette but it's not strictly related to this issue


Search: Restrict to Events/Interviews

Seems to work fine on home, but on other pages it redirects back to home before opening the modal.

Also see @akeshiiv feedback:

Search feature placement

The search feature is available across all pages but is most relevant for Events and Interviews. e.g. Search queries usually yield results like Conversations, Insights, or Reflections articles.
Pages like About Us, Mentorship, and Teams contain minimal information, making search results from these pages unnecessary and potentially confusing.
Recommendation: Restrict the search feature to Events and Interviews pages to align with user needs and prevent irrelevant results.


Migrate documentation to Hugo from Jekyll

Having a lot of dependency issues with keeping the current Jekyll-based documentation consistent. I'll be shifting our documentation over to Hugo since it seems a lot more consistent than Jekyll.
All this means is that adding documentation might require a build step - something I might be able to automate through GitHub Actions. This is just a wip plan at the moment.

Sounds good to me. I only know jekyll and gatsby but anything is fine for me.

Hahaha, this is a bit off topic, but this is the first JavaScript program I've ever written 🤣
Let me know if this is a terrible way to get files from a directory...
function findFiles(from, filter, callback) {
    if (! fs.existsSync(from)) {
        console.log("Directory doesn't exist; misconfigured?");
        return;
    }

    let files = fs.readdirSync(from);

    files.forEach(file => {
        let name = path.join(from, file);
        let stat = fs.lstatSync(name);

        if (stat.isDirectory()) {
            findFiles(name, filter, callback);
        } else if (filter.test(name)) {
            callback(name);
        }
    });
}

Afaik fs is the way to go on node. So I think it is the right approach. Congrats to your first JS program 😁 👍


feat: add copy_directory

@gregmagolan @alexeagle
https://github.com/aspect-build/bazel-lib/issues/62
https://buildkite.com/bazel/bazel-lib/builds?branch=kormide%3Acopy_directory
Should I remove directory support from copy_file if we want to upstream this to skylib?

great! Yes I think we should fail in copy_file if the src.is_directory so that forces developers to use copy_directory instead, we don't want the ambiguity and we're still pre-1.0 here so it's okay to make the breaking change.

Sure, so then our fork of copy_file will just be there to support DirectoryPathInfo?

yeah exactly, we're still forced to have a fork of copy_file but maybe we can rely on upstream copy_directory for things like making npm package folder copies from the source tree to bazel-out


Screen Reader is not announcing the group names i.e., Basic Input, Layout, text and etc while entering or existing from the related group of buttons.

Found during accessibility grading.
Tracking internal bug: https://microsoft.visualstudio.com/DefaultCollection/OS/_workitems/edit/40128192

Reopening as we reverted the change through: https://github.com/microsoft/react-native-gallery/pull/277. @chiaramooney was the fix conflicting with the no-hide-descendants workaround?


Lua Improvements

Additions:

Added startTween lua function
Added ReflectionFunctions
Added resetClientID when if PlayState transitioning

Changes:

hxcpp is now git version, also removed app-version because it was unnecessary in main.yml
changed linc_luajit repo to superpowers04's repo
action checkout and upload-artifact's version is now main / latest
Improved CustomFadeTransition
changed ModchartText to FlxText
Separated FunkinLua into different functions in psychlua folders (Ex: LegacyShaderFunctions)

Fixes:

Fixed Shader coord resizing
Fixed icon for linux

Removes:

Removed any remaining references relating to Yoshubs
Removed QT / Ludum Dare Prototype leftovers
Removed swapOldIcon

nice
however, it seems that now ANY time an error occurs, it'll instantly crash the engine
oh and any alpha-related stuff just calls "Invalid field:alpha"


Add afterInsert method to relationMappings

There is currently a beforeInsert method (https://vincit.github.io/objection.js/#relationmappings), it would be great to be able to do afterInsert hooks too.
I reckon the same syntax and function props are fine, keeping it optionally async too.
Could we also add before/after for detaching?
I'm happy to look at implementing if there is interest?
Cheers

Can you provide me use case for this?
Implementing this would be pretty difficult because it would need to work with $relatedQuery, insertGraph and upsertGraph.

I think my use case at the time was I was handling order on a pivot.
So I wanted to update the column order after a newly inserted pivot entry was added, in the end I used context + beforeInsert to work out the next order & iterate it to set before inserting, I think this negated my need for afterInsert.
I can't however update the ordering on the detaching of an entry, I currently just end up with gaps (not the end of the world, but would be nice to trigger events based on detaching & update the ordering).
Same goes for beforeUpdate / afterUpdate, that would be useful for potentially setting an updated_at timestamp on the pivot.
I think initially a beforeUpdate and beforeDetach method would be most useful, after methods I don't have a usecase for I can't get around currently.

If you only need this stuff for the pivot, you can create a model class for the pivot table, and provide it using through.modelClass property in your relation mappings. You can implement all those methods for the pivot table model.

Let me know if that works out for you.

@koskimas Cheers, I didn't realise that existed, I couldn't find it referenced in the docs?

It's there in the API reference too. http://vincit.github.io/objection.js/#relationmappings


[5.2] Routing: Controller __call method no longer called on non-existent methods

I used to have a __call method in my controller to catch calls to non-existant methods from a route, but after upgrading to 5.2 it never gets called.
It was very useful for serving static pages, as it avoids having dozens of controller methods that just return a view.
For example, I could do the following and just serve a matching template (if it existed) based on the method name.
Route::get('/about-us', [
    'as' => 'pages.about-us',
    'uses' => 'PagesController@aboutUs',
]);

The advantage being that I could name the route, potentially apply middleware and since it's named I could change the URL, all while still returning the same template (since it's based on the method name).

Sorry duplicate


Add SSH demo

Add basic documentation, Dockerfile and sandbox config for a demo pod
with SSH public key authentication.
Documentation on encrypting and running the image is omitted as of now,
for this is a more general topic which will require separate attention.
Signed-off-by: Jakob Naucke<EMAIL_ADDRESS>/cc @sameo @fitzthum @magowan
We can also explain the setup in more detail, but I'd like your general opinion first. Feedback from code review over "this doesn't belong here" to "I have a better idea"  is welcome.

This looks good. I really like how you can match up the fingerprints. I'm not sure if this is the best place for it. There was some mention of having a separate demo repo or at least a demo directory.

Okay, made some updates, also includes a k8s deployment now (unfortunately, I cannot specify an image at this time; I also want to publish an example that could be put there, but I haven't done that yet). I tried to remain technology-agnostic in my added comments; counter-suggestions are welcome. I had also considered an ASCII drawing (or sth like that), DYT this would fit or just introduce confusion?

an infinite wait is required for k8s

an infinite wait is required for k8s

What do you mean here?

@sameo ah, sorry. I had added a && sleep inf to the entrypoint again to avoid container exit (you often see a tail -f /dev/null instead), which is required for e.g. Docker, Podman, Kubernetes, but wasn't required with crictl. I figured out that a better way to do this is to not daemonise sshd, which I have pushed now.

an infinite wait is required for k8s

What do you mean here?

@sameo ah, sorry. I had added a && sleep inf to the entrypoint again to avoid container exit (you often see a tail -f /dev/null instead), which is required for e.g. Docker, Podman, Kubernetes, but wasn't required with crictl. I figured out that a better way to do this is to not daemonise sshd, which I have pushed now.

I see, thanks for the explanation :-)


Update exclude list for semgrep

The splunk semgrep policy was recently updated and now fails if Dockerfiles do not define or run as USER .  This change excludes the windows and ansible test Dockerfiles from semgrep scans.

Should we be updating the windows dockerfile to run as a splunk-otel-collector?

Should we be updating the windows dockerfile to run as splunk-otel-collector?*

Not sure... I assumed that the collector process in the windows image needs to run as admin, similar to the standalone collector when running directly on windows.


HDDS-5471. Enable SCM HA in ozone-ha Kubernetes example

What changes were proposed in this pull request?
generate correct yamls for running SCM-HA in k8s
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5471
Please replace this section with the link to the Apache JIRA)
How was this patch tested?
k8s test

@adoroszlai @elek please take a look!

@adoroszlai could you take a look at this? thanks

Thanks @JacksonYao287 for the patch.  I tried adding test.sh to the affected ozone-ha example (copied from ozone example) to verify the change.  However, additional SCMs failed to start with the following log.
2021-12-27 13:49:00 ERROR StorageContainerManager:320 - Please make sure you have run 'ozone scm --init' command to generate all the required metadata to /data/metadata/scm or make sure you have run 'ozone scm --bootstrap' cmd to add the SCM to existing SCM HA group.
2021-12-27 13:49:00 ERROR StorageContainerManagerStarter:73 - SCM start failed with exception
org.apache.hadoop.hdds.scm.exceptions.SCMException: SCM not initialized due to storage config failure.
	at org.apache.hadoop.hdds.scm.server.StorageContainerManager.<init>(StorageContainerManager.java:321)
	at org.apache.hadoop.hdds.scm.server.StorageContainerManager.createSCM(StorageContainerManager.java:491)
	at org.apache.hadoop.hdds.scm.server.StorageContainerManager.createSCM(StorageContainerManager.java:503)
	at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter$SCMStarterHelper.start(StorageContainerManagerStarter.java:168)
	at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter.startScm(StorageContainerManagerStarter.java:142)
	at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter.call(StorageContainerManagerStarter.java:71)
	at org.apache.hadoop.hdds.scm.server.StorageContainerManagerStarter.call(StorageContainerManagerStarter.java:47)

But bootstrap reported to be successful:
STARTUP_MSG: Starting StorageContainerManager
STARTUP_MSG:   host = scm-2/<IP_ADDRESS>
STARTUP_MSG:   args = [--bootstrap]
...
2021-12-27 13:45:53 INFO  StorageContainerManager:987 - SCM BootStrap  is successful for ClusterID CID-b449e5a7-66ff-44eb-8a6e-bbf202cbf05e, SCMID 5053d1c5-7b10-4093-b19f-dcf28410a21f
2021-12-27 13:45:53 INFO  StorageContainerManager:989 - Primary SCM Node ID ba47cc25-6474-4e64-a32e-baa5126f85fd

Can you please check?
Here's the run from my fork:
https://github.com/adoroszlai/hadoop-ozone/runs/4642413726

thanks @adoroszlai for the review and verification.

However, additional SCMs failed to start with the following log

i have used this yaml file to deploy a scm-ha-enabled k8s cluster and run many chaos tests on it, it always works well.
I'll look into why it fails here

/pending

@sokui do you have any idea why SCM HA might fail to start in kubernetes?

@adoroszlai Your pasted link seems expired: https://github.com/adoroszlai/hadoop-ozone/runs/4642413726. Do you mean you run the test.sh in PR against the old ozone examples? Or you just merge the whole PR to your local branch, and run it? please clarify. This PR seems good to me though.

@sokui Thanks for the quick response.

Do you mean you run the test.sh in PR against the old ozone examples? Or you just merge the whole PR to your local branch, and run it?

I checked out the PR branch locally, added test.shto ozone-ha  kubernetes example, and submitted to my fork.  (Later I also temporarily disabled other tests for faster feedback.)

Your pasted link seems expired

After my comment about the failed run from my fork, @JacksonYao287 also added ozone-ha/test.sh to this PR, and the logs are still available.

Github logs: https://github.com/apache/ozone/runs/5232679075
Kubernetes logs: https://github.com/apache/ozone/suites/5345115406/artifacts/167127123

These will probably also expire in about a week.  Then we can trigger another run if still needed.

This PR seems good to me though.

Yes, looks good to me, too.  But we prefer tests to verify, and unfortunately it is failing. ;)

/ready

@JacksonYao287 @sokui finally I've found out the cause of test failure.
The patch includes volume mount for the bootstrap initContainer:
https://github.com/apache/ozone/blob/3400b28fe2df0c32e396404e567a9ec715f13653/hadoop-ozone/dist/src/main/k8s/examples/ozone-ha/scm-statefulset.yaml#L55-L66
However, each test in kubernetes check regenerates its Kubernetes YAML files based on Flekszible and k8s/definitions.  So the test does not use our version of scm-statefulset.yaml, rather the regenerated file, which does not have the volume mount, due to the order of transformations:
https://github.com/apache/ozone/blob/3400b28fe2df0c32e396404e567a9ec715f13653/hadoop-ozone/dist/src/main/k8s/examples/ozone-ha/Flekszible#L23-L24
The latter adds bootstrap, but by that time volumes are already added.  So files written by bootstrap were not present in the real SCM container.
This can be fixed simply by first applying scm-ha transformation, only then persistence (see 873d2923ae6392756d20152063c132af0837d1df).

Thanks @JacksonYao287 for the patch, @ChenSammi, @GeorgeJahad, @sokui for the reviews.


Apply google-java-format to the repository

Format source with google-java-format, and enforce it with the Spotless gradle plugin.

Discarding as gjf adds a lot of superfluous newlines that reduce readability


SNOW-742340 Add python 3.9 integ test merge gate

Description
Add python 3.9 integ test non-required merge gate. These tests
explicitly skip udf test because 3.9 is not supported for UDFs yet
Testing
n/a
Please answer these questions before submitting your pull requests. Thanks!

What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-742340

Fill out the following pre-review checklist:

[ ] I am adding a new automated test(s) to verify correctness of my new code
[ ] I am adding new logging messages
[ ] I am adding a new telemetry message
[ ] I am adding new credentials
[ ] I am adding a new dependency

Please describe how your code solves the related issue.
Add python 3.9 integ test non-required merge gate. These tests explicitly skip udf test because 3.9 is not supported for UDFs yet

Codecov Report

Merging #681 (6b2bd3e) into main (88e8c4a) will not change coverage.
The diff coverage is n/a.

:exclamation: Current head 6b2bd3e differs from pull request most recent head ca70149. Consider uploading reports for the commit ca70149 to get more accurate results

@@           Coverage Diff           @@
##             main     #681   +/-   ##
=======================================
  Coverage   98.73%   98.73%
=======================================
  Files          49       49
  Lines        7974     7974
  Branches     1351     1351
=======================================
  Hits         7873     7873
  Misses         40       40
  Partials       61       61

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

I'll add py39 test for FIPS and no-simplifier case in a separate PR early next week. This SNOWFLAKE_IS_PYTHON_RUNTIME_TEST unblocks some of my other work :)


Age ratings blank white

Not sure what's the issue, but every age rating is white.

Sorry. Needed to configure the age ratings in LibraryManagement.


Root functions will be deprecated

In order to have a consistent experience regardless of the configuration that you choose, all the root functions will be deprecated:
https://github.com/vanna-ai/vanna/blob/main/src/vanna/__init__.py
The docstrings for each function should be removed. The functions themselves should not be removed -- instead, they should raise an exception with an example of how to transition old code to the new method of:
vn = VannaDefault(model=vanna_model_name, api_key=api_key)

The root functions are legacy from a  time before we had multiple configuration options, which are enabled by the VannaBase abstract base class. The sample notebooks have already been switched. Now what remains are code samples from third parties, which is why these root functions should raise exceptions so that people can transition more easily.
For now, the remaining function that will stay in the base class will be get_api_key for the sake of being able to run the Chinook demo.

I see that add_user_to_model has been deprecated though it's still documented at https://vanna.ai/docs/vanna.html#add_user_to_model
I am trying to create a new model but get the following:
Exception: ('Error adding documentation', {'error': {'code': -32600, 'message': 'User<EMAIL_ADDRESS>not in model vertica-demo-1'}, 'jsonrpc': '2.0'})
For my previous model, I added myself with add_user_to_model with admin = True, but that doesn't work now with 0.2.1.  How do I add myself to the new model?

Hi! Model creation should be done in the UI now
On Wed, Mar 6, 2024 at 11:29 AM bryanherger @.***>
wrote:

I see that add_user_to_model has been deprecated though it's still
documented at https://vanna.ai/docs/vanna.html#add_user_to_model
I am trying to create a new model but get the following:
Exception: ('Error adding documentation', {'error': {'code': -32600,
'message': 'User @.*** not in model vertica-demo-1'},
'jsonrpc': '2.0'})
For my previous model, I added myself with add_user_to_model with admin =
True, but that doesn't work now with 0.2.1. How do I add myself to the new
model?
—
Reply to this email directly, view it on GitHub
https://github.com/vanna-ai/vanna/issues/169#issuecomment-1981270931,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABWQVKTSBVZ6VWSFFOHZMTLYW4775AVCNFSM6AAAAABCELFEWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBRGI3TAOJTGE
.
You are receiving this because you authored the thread.Message ID:
@.***>


Is the connection is task / async safe?

Not sure if it's a bug, but for me it's an unexpected behavior.
Run in python -m asyncio
import aioredis
r = await aioredis.create_redis("redis://localhost:6379")

print(await x.revrange("stream1", count=1))  # Works correctly, prints

async def xread():
    print("xread")
    print("xread returned: ", await r.xread("machine:state"))

t = asyncio.get_running_loop().create_task(xread())

print(await x.revrange("stream1", count=1))  # Blocking! Is that expected?

It seems like the xread() freezes the client for doing any other async work.
AFAIK xrange should never block the caller. Correct?
I checked with other async clients like aredis and it does not happen.
Any explanation for that?

I can confirm this for create_redis_pool() also

Can you try this with the latest beta? pip install aioredis --pre --upgrade

Yes working!!!


How to use va-data-table?

The data table is disabled by default.
When use it will got an error:
Failed to resolve component: va-data-table
How can I use the data table?

After upgrade the vuestic-ui to 1.4.0, the va-data-table is working, but there are some other issues, some methods not found...

This is a disappointment as it lead to waste of a lot of time trying to debug if my code was wrong. Not sure if the vuestic-ui team considered this as a negative impact on their components. Most of the production sites would then be rendered false with this issue.

I have faced the issue and posted a Stackoverflow : https://stackoverflow.com/questions/72553714/vue3-data-tables-via-vuestic-ui

This might help
please reopen if it doesn't 🫠


FOR THE LOVE OF GOD, ADD A STAGE EDITOR!

What feature do you want to get added on the base engine?
stage editor
To test your sight, and reliability, please select the option of what should NOT be requested.
Useful feature

Ragebait Reviewer
0/10 - Believable
0/10 - Creative
0/10 - Funny
Thats it for the ratings since I don't know what else to add.

This would actually be very useful

facepalm

failed the sight and reliability test

its already in 1.0

overall i rate this github issue... dumbass/10


Scatter Plot: line labels enhancements

DG 1.12.2
✅ Formula line title is shown on the plot
✅ Formula line title and description is shown in the tooltip
⚠ There is no way to configure where exactly line title is shown. As a consequence it is almost useless.
It is barely readable when displayed among the data points:

In some cases (e.g. axes in log scale) it is far out of the data range and is not visible unless plot is zoomed out very far:

Labels for several lines overlap (seen on IVIVC plots):

Regression line labels are not editable and cannot be hidden or moved. As a result, it often overlaps with data (especially when scatter plot is coloured by category):

Related to https://github.com/datagrok-ai/public/issues/1345

Still in process, we are looking for a solution that could cover most use cases
Difficult bug to reproduce, needs further investigation
Now labels are displayed parallel to a corresponding line, this should help in most cases

Now you can hide regression line equations through the plot context panel > Lines > Show Regression Line Equation property

@AnnaMuza @onuf
I can't see fixes for 3 (label parallel to lines) and 4 (hiding regression lines formula) in v1.13.7
Were they included?

Unfortunately, they weren't. They will be in patch 1.13.8 (sorry for misinformation)


Error Launching Web UI

FileNotFoundError                         Traceback (most recent call last)
Cell In[8], line 19
     14 cors = 'https://huchenlei.github.io'
     17 ################################################################################################################
---> 19 launchWebui()

Cell In[3], line 175, in launchWebui()
    172     get_ipython().system('python launch.py {args} --exit')
    173     get_ipython().system('pip install -q pillow==9.5.0')
--> 175 with open(blocksPath, 'r') as file:
    176     content = file.read()
    178 pattern = re.compile(r'print\(\s*strings\.en\["RUNNING_LOCALLY_SEPARATED"\]\.format\(\s*self\.protocol, self\.server_name, self\.server_port\s*\)\s*\)')

File /usr/local/lib/python3.10/dist-packages/IPython/core/interactiveshell.py:324, in _modified_open(file, *args, **kwargs)
    317 if file in {0, 1, 2}:
    318     raise ValueError(
    319         f"IPython won't let you open fd={file} by default "
    320         "as it is likely to crash IPython. If you know what you are doing, "
    321         "you can use builtins' open."
    322     )
--> 324 return io_open(file, *args, **kwargs)

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.10/dist-packages/gradio/blocks.py'

it was working fine few days ago.

Running again, n again, n again.... no more luck !

Running again, n again, n again.... no more luck !

I've tested all the notebooks and haven't had any problems. Make sure you use the latest notebooks. To update the notebooks, delete all notebooks starting with sd_webui_, sd15_, sdxl_ before starting the machine.
You can verify all notebooks version here updates.json


Add support for Crimean Tatar (crh) keyboard locale

Current situation
Currently, KeyboardKit supports the Tatar language using the .tatar keyboard locale. However, this represents the Tatar language (tt) from Tatarstan, which is different from the Crimean Tatar language (CRH).
Request
Please add proper support for the Crimean Tatar language by:

Adding the .crimeanTatar keyboard locale
Using the correct ISO 639-3 code "crh" for Crimean Tatar
Keeping existing .tatar for Tatar language (tt)

Reasoning

Crimean Tatar (crh) and Tatar (tt) are different languages
Apple officially supports the Crimean Tatar language with the "crh" locale identifier
This would allow proper localization and keyboard layouts for the Crimean Tatar language

References

Apple Localization Guide

ISO 639-3 Language Code for Crimean Tatar

Impact
This change would help develop proper keyboard support for the Crimean Tatar language while maintaining a correct distinction between the languages.

Hi @QIRIM-Young
Thank you for the detailed instructions! I will see if this is easy to implement.


update to camunda 7.16

to be able to use the latest supported spring boot version (see #78 ) we should bring the extension to camunda 7.16.

had to merge #76 to achieve this

fixed


MSID: 89338 Version: 2 DOI: 2<IP_ADDRESS>3939

[PLACE MANUSCRIPT AND EDITOR DETAILS HERE WHEN AVAILABLE] See step 3
[PLACE PDF URL HERE WHEN AVAILABLE] See step 7
Step 1. Inform bioRxiv
Who can help: @QueenKraken, @nlisgo, @scottaubrey

[x] Manuscript is in data hub index (https://data-hub-api.elifesciences.org/enhanced-preprints/docmaps/v2/by-publisher/elife/get-by-manuscript-id?manuscript_id=89338)

Step 2. Create preview of manuscript
Who can help: @fred-atherden, @nlisgo, @scottaubrey

[ ] Manuscript is available for preview (https://prod--epp.elifesciences.org/preview/89338/v2)

[ ] Trigger import for staging: https://prod--epp.elifesciences.org/import
[ ] Sync data folder with s3://prod-elife-epp-data/data
[ ] Trigger import for staging: https://staging--epp.elifesciences.org/import
[ ] Sync data folder with s3://staging-elife-epp-data/data
[ ] Pull request created to enhanced-preprint-data
[ ] Post link to pull request below

Pull request: [PLACE LINK TO PULL REQUEST HERE]
Detailed instructions: https://github.com/elifesciences/enhanced-preprints-data#add-a-manuscript
Step 3: Awaiting public reviews and QC
Who can help: Production team

[ ] QC passed or QC not needed

Who can help: Editorial team

[x] Public reviews available on sciety (https://sciety.org/articles/activity/10.1101/2<IP_ADDRESS>3939)
[ ] Manuscript and editor details at the top of this issue (Supplied by Editorial team)
[ ] Reviews returned by EPP - https://prod--epp.elifesciences.org/api/reviewed-preprints/89338/v2/reviews

Example
"msas": "Genetics and Genomics", "Neuroscience"
"msid": "84628"
"version": "1"
"preprintDoi": "10.1101/2<IP_ADDRESS>4241"
"articleType": "Reviewed Preprint"
"status": "Published from the original preprint after peer review and assessment by eLife."

"Reviewed Preprint posted": "2023-01-02"
"Sent for peer review": "2022-10-28"
"Posted to bioRxiv": "2022-11-21" (link: "Go to bioRxiv": "https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>4241v1")

Editors:
Reviewing Editor
Michael B Eisen
University of California, Berkeley, United States
Senior Editor
Michael B Eisen
University of California, Berkeley, United States

Step 4: Modify manuscripts.json (no PDF)

[ ] Reviewed preprint is published to EPP (https://elifesciences.org/reviewed-preprints/89338)

[ ] Pull request created to enhanced-preprint-client
[ ] Pull request switched to "Ready for review"
[ ] Post link to pull request below

[ ] Request that a doi be registered

[ ] Post link to #enhanced-preprint comment below

Pull request: [PLACE LINK TO PULL REQUEST HERE]
#enhanced-preprint comment thread: [PLACE LINK TO COMMENT HERE]

Instructions to modify manuscripts.json

Visit: https://github.com/elifesciences/enhanced-preprints-client/actions/workflows/publish-manuscript.yaml
Click: Run workflow
Complete the form and click "Run workflow"
A successful run should result in a new pull request at https://github.com/elifesciences/enhanced-preprints-client/pulls
Open the pull request and click the "Ready for review" button to trigger tests
Once the tests pass and you are happy with the changes the PR can be merged

Example pull request: https://github.com/elifesciences/enhanced-preprints-client/pull/334/files
Once the pull request is merged in it should be available a few minutes later.

Request that a doi
Post the following in #enhanced-preprint:
@Fred can you register a doi for https://elifesciences.org/reviewed-preprints/89338

Step 5: Awaiting search reindex

[ ] Reviewed preprint is avaliable on journal homepage (https://elifesciences.org)

The search reindex is triggered once an hour. We need the reviewed preprint to be indexed as the search application serves the journal homepage.

Additional info
If needed, the jenkins pipeline to reindex search can be triggered sooner.
https://alfred.elifesciences.org/job/process/job/process-reindex-reviewed-preprints/

Step 6: Published! Request PDF generation

[ ] Post the link to the PDF url at the top of the issue

[ ] Post link to #enhanced-preprint comment below

#enhanced-preprint comment thread: [PLACE LINK TO COMMENT HERE]
Post the following to the #enhanced-preprint on slack:
@Ryan Dix-Peek please can you generate a PDF for https://elifesciences.org/reviewed-preprints/89338

Step 7: Introduce PDF to data folder and git repo

[ ] PDF is avaliable at https://github.com/elifesciences/enhanced-preprints-data/raw/master/data/89338/v2/89338-v2.pdf

Detailed instructions: https://github.com/elifesciences/enhanced-preprints-data#add-a-pdf
Step 8: Add PDF url to manuscripts.json

[ ] Reviewed preprint PDF is available for download (https://prod--epp.elifesciences.org/reviewed-preprints/89338)

[ ] Pull request created to enhanced-preprint-client
[ ] Pull request switched to "Ready for review"
[ ] Post link to pull request below

[PLACE LINK TO PULL REQUEST HERE]

Instructions to add PDF url to manuscripts.json

Visit: https://github.com/elifesciences/enhanced-preprints-client/actions/workflows/add-pdf-url-to-manuscript.yaml
Click: Run workflow
Complete the form and click "Run workflow"
A successful run should result in a new pull request at https://github.com/elifesciences/enhanced-preprints-client/pulls
Open the pull request and click the "Ready for review" button to trigger tests
Once the tests pass and you are happy with the changes the PR can be merged

Example pull request: https://github.com/elifesciences/enhanced-preprints-client/pull/397/files
Once the pull request is merged in it should be available a few minutes later.

Step 9: Done!

[ ] Kettle is on!

Reviews not available

Reviews now available


[TypeScript] bug: required modal properties typed as undefined

Describe the bug
Required modal properties are always typed as "<type> | undefined" instead of just "<type>".
To Reproduce
Define a model like:
export const Cart = {
  pk: { type: String, value: '${_type}#${cartId}' },
  sk: { type: String, value: '${_type}#${cartId}' },

  cartId: { type: String, uuid: true, validate: /^[0-9A-Z]{26}$/i, required: true },
  total: { type: String },
};

export type CartType = Entity<typeof Cart>;

const cart: CartType = {
  cartId: '01FM4EY71FQSD8XK5TPWX722WJ', <---------- This is typed as "string | undefined"
  total: '100,00€',
};

I'm not a TypeScript expert so I can't help doing a PR but changing "extends true" to "extends boolean" makes "cartId" field only of type "string" not "string | undefined" so I assume that the required field type must be checked as boolean and then as true:
export type Entity<T extends OneTypedModel> = UndefinedToOptional<{
  [P in keyof T]: T[P]['required'] extends true ? EntityField<T[P]> : EntityField<T[P]> | undefined;
}>;

Screenshots

Environment (please complete the following information):

OS: Mac OS 11.5.2
Node Version: v14.18
OneTable Version: v2.1.0 (latest)

Just came across the same issue

Thanks for raising. @spearmootz  do you have insights into this? Originally in issue #126

Changing it to boolean i think will not work because it will make not required things to be only the string instead of string | undefined
Now, I'm certain that when i did this it worked just fine as i tested it in my codebase.
What is the typescript version?

From my testing, it looks like the use of 'undefined' as the marker is breaking it. Must be a TS upgrade.
I'm prototyping with using a
type UndefinedMarker = {}
instead of undefined and I think it works again.  More results soon.

If I use a different type than 'undefined', like UndefinedMarker = {}, then it works. However, the types look messed up with introspection as the UndefinedMarker is not erased.

type UndefinedMarker = {}

type UndefinedProperties<T> = {
    [P in keyof T]-?: UndefinedMarker extends T[P] ? P : never
}[keyof T]

export type UndefinedToOptional<T> = Partial<Pick<T, UndefinedProperties<T>>> & Pick<T, Exclude<keyof T, UndefinedProperties<T>>>

export type Entity<T extends OneTypedModel> = UndefinedToOptional<{
    [P in keyof T]: T[P]['required'] extends true ? EntityField<T[P]> : (UndefinedMarker | EntityField<T[P]>)
}>

I'm testing with TSC 4.3.2 which has this problem.

One question too:
[P in keyof T]-?: undefined extends T[P] ? P : never

Is the undefined extends back to front.  Should it not be T[P] extends undefined?

So testing with UndefinedMarker validates that the previous use of undefined is the issue. However, using another type like UndefinedMarker pollutes the field types.
@spearmootz I need your help on this one. I'm not quite the TS expert!

@mobsense i am not either, but I'll take a look tomorrow before noon

Is there a solution to this? I'm hitting this behavior in tsc 4.4.4.
export const AccountsSchema: OneSchema = {
  models: {
    Organization: {
      pk: { type: String, value: '${_type}#${id}' },
      sk: { type: String, value: '${_type}#${id}' },
      id: { type: String, required: true, uuid: 'ulid', validate: /^[0-9A-F]{32}$/i },
      name: { type: String, required: true },
    },
  }
};

export type OrganizationType = Entity<typeof AccountsSchema.models.Organization>;

    const org: OrganizationType = {
      id: orgId, <-- Type 'string' is not assignable to type 'undefined'.
      name: `${name}'s Org`, <--  Type 'string' is not assignable to type 'undefined'.
    };

I'm not sure that is the same issue. I tried to reproduce your code fragments and it worked for me when edited into debug.ts as per issue template:
Can you please raise a new issue with full description, where the error is coming from (unclear in your description) and edited into debug.ts so we can reproduce.
    version: '0.0.1',
    indexes: {
        primary: { hash: 'pk', sort: 'sk' },
        gs1: { hash: 'gs1pk', sort: 'gs1sk', project: 'all' },
    },
    models: {
        Organization: {
            pk: { type: String, value: '${_type}#${id}' },
            sk: { type: String, value: '${_type}#${id}' },
            id: { type: String, required: true, uuid: 'ulid', validate: /^[0-9A-F]{32}$/i },
            name: { type: String, required: true },
        }
    }
}

type OrganizationType = Entity<typeof Schema.models.Organization>;

let orgId = '1234'
let name = 'Peter'
const org: OrganizationType = {
    id: orgId,                //  <-- Type 'string' is not assignable to type 'undefined'.
    name: `${name}'s Org`,    //  <--  Type 'string' is not assignable to type 'undefined'.
};

We're making progress on supporting TS required properties. Should not be long to get required props fully supported.
Cleaning up the TS definitions to be more supportable too.

Got It!!!!!
Pretty readable too.
Now onto nested schemas (recursive types) Ugh!
/*
    Select the required properties from a model
*/
export type Required<T extends OneTypedModel> = {
    -readonly [P in keyof T as T[P]['required'] extends true ? P : never]: EntityField<T[P]>
};

/*
    Select the optional properties from a model
*/
export type Optional<T extends OneTypedModel> = {
    -readonly [P in keyof T as T[P]['required'] extends true ? never : P]?: EntityField<T[P]>
};

/*
    Merge two types
*/
type Merge<A, B> = {
    [P in keyof (A & B)]: P extends keyof A ? A[P] : B[P]
};

/*
    Create entity type which includes required and optional types
*/
type Entity<T extends OneTypedModel> = Merge<Required<T>, Optional<T>>

Fixed in 2.1.2

@mobsense 2.1.2 fixed the typescript assignment error but now I'm getting another set of errors:
Just going to throw it here and revert to 2.1.1 and do id: id as unknown as undefined on the properties as a workaround for now.
Encountered 3 errors:
  [typescript] ../../common/temp/node_modules/.pnpm/dynamodb-onetable@2.1.2/node_modules/dynamodb-onetable/dist/mjs/index.d.ts:11:5 - (TS2305) Module '"./Model"' has no exported member 'OneFieldSchema'.
  [typescript] ../../common/temp/node_modules/.pnpm/dynamodb-onetable@2.1.2/node_modules/dynamodb-onetable/dist/mjs/Model.d.ts:37:20 - (TS2304) Cannot find name 'OneFieldSchema'.
  [typescript] ../../common/temp/node_modules/.pnpm/dynamodb-onetable@2.1.2/node_modules/dynamodb-onetable/dist/mjs/Model.d.ts:122:54 - (TS2536) Type 'P' cannot be used to index type 'B'.

Ugh!  Sorry. Will update immediately.
One more thing that is required with the 2.1.2+.
You must put "as const" after your model declarations. E.g.
    models: {
        User: {
            pk:         { type: String, value: 'Account#${accountId}' },
            sk:         { type: String, value: '${_type}#${id}' },
            id:         { type: String, uuid: true },
            name:       { type: String, required: true },
            email:      { type: String, required: true },
        },
    } as const

Sorry @shawnmclean that should be fixed now.


Jesse: Watch alexandriacomputers.com

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

Approved by Jeff Schaller in Charcoal HQ


Estimote.discoverAll() leaks and misses discovering devices

Estimote.discoverAll () leaks as it repeatedly discovers the same devices over and over again. Setting SCANDUPLICATES to false causes it to miss when a device goes out of range and returns.
Would be more useful if it returned an array of all currently visible estimote devices as some of the other noble functions do.

The leak is solved upstream by https://github.com/sandeepmistry/noble-device/pull/22.


Fix versions in local board

Oops, so sorry, I just realized this is marked wip. Feel free to git push origin pins-js --force to override my commit which disabled the versions tests.


GitHub Action CI cancelling New UI functional tests if Legacy UI fails

Describe the bug
Some of the GitHub Action CI jobs are being cancelled with this annotation:

Here true means 'New UI' and false means 'Legacy UI'. It seems if the Legacy UI functional tests fail (being the second in the matrix) the the other jobs in the matrix (i.e. just New UI) are also cancelled.
I recall there is configuration in GitHub actions build matrices around this, but I thought we just went with the default.
Expected behaviour
Ideally, we want both jobs in the matrix to run to their completion, regardless of what the other is doing.
Platform:

GitHub Actions - openEQUELLA CI workflow

Aaaahhhh

jobs.<job_id>.strategy.fail-fast
When set to true, GitHub cancels all in-progress jobs if any matrix job fails. Default: true

Thought it was a default of false.
https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast

Looking good since #1694


newFirmware + 3 Bluetooth Radios -> Lots of failed connections still

Hi again @parisbutterfield
So both of my switchmate brights are on the new 2.9.15 firmware. Even so, I decided to put in 2 buetooth adapters on the Pi3 making a total of 3 bt radios because I was getting a lot of failed connections through alexa/hass.
Even with 3 bt radios, there are a lot of failed connections. And moreso at one point it quede 5 commands and therefore about 2 minutes later the switchmate was toggling on and off multiple times in a row.
I'm wondering if this has to do with how often it polls the switchmates? Specifically since there on the new firmware and you said it has to connect to the devices for each polling?
I'm wondering if it is something that can be fixed or would I see better connection quality if I downgrade my brights to older firmware that requires authorization?
Log:
pi@raspberrypi:~/restswitchmate $ sudo docker-compose logs --tail="100" switchserver
Attaching to restswitchmate_switchserver_1
switchserver_1  | Switchmate SwitchServer Running
switchserver_1  |  * Running on http://<IP_ADDRESS>:5002/ (Press CTRL+C to quit)
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 08:55:49] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Switchmate SwitchServer Running
switchserver_1  |  * Running on http://<IP_ADDRESS>:5002/ (Press CTRL+C to quit)
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:03:49] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:08:03] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:08:12] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:08:22] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:08:59] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:09:15] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:15:30] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:15:54] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 09:17:02] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:03:08] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:03:24] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:03:35] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:03:46] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:03:58] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:04:12] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:14:14] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:14:23] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:15:23] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:15:49] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:16:01] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:16:57] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:17:38] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:17:56] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:20:21] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:20:21] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:20:21] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:20:21] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:20:22] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:20:22] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 19:20:22] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
pi@raspberrypi:~/restswitchmate $

I downgraded one of the brights to 2.9.0. Tried authorizing it. But it keeps failing:
statusserver_1  | Starting Scan Process
authserver_1    | Status Background Thread has stopped
authserver_1    | Auth Background Thread has stopped
authserver_1    | Status Background Thread Listening
authserver_1    | Auth Background Thread Listening
authserver_1    | Got auth request for: D01CCB9A9E82
authserver_1    | Sending item Starting auth for D01CCB9A9E82
authserver_1    | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
statusserver_1  | ('F1ABE82EEDDF', True, datetime.datetime(2018, 3, 11, 20, 4, 1, 940893))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 11, 20, 4, 3, 756041))
statusserver_1  | <IP_ADDRESS> - - [11/Mar/2018 20:04:05] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [11/Mar/2018 20:04:05] "GET /device/D01CCB9A9E82 HTTP/1.1" 200 -
statusserver_1  | Starting Scan Process
statusserver_1  | ('F1ABE82EEDDF', True, datetime.datetime(2018, 3, 11, 20, 4, 12, 133763))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 11, 20, 4, 14, 826482))
statusserver_1  | Starting Scan Process
authserver_1    | Status Background Thread has stopped
authserver_1    | Auth Background Thread has stopped
authserver_1    | Status Background Thread Listening
authserver_1    | Auth Background Thread Listening
authserver_1    | Got auth request for: D01CCB9A9E82
authserver_1    | Sending item Starting auth for D01CCB9A9E82
authserver_1    | Error from Bluetooth stack (comerr)
statusserver_1  | ('F1ABE82EEDDF', True, datetime.datetime(2018, 3, 11, 20, 4, 23, 534294))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 11, 20, 4, 24, 81897))
statusserver_1  | Starting Scan Process
statusserver_1  | WARNING: Could not read status of f1:ab:e8:2e:ed:df. Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
statusserver_1  | WARNING: Could not read status of d0:1c:cb:9a:9e:82. Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
statusserver_1  | Starting Scan Process
statusserver_1  | <IP_ADDRESS> - - [11/Mar/2018 20:04:36] "GET /device/D01CCB9A9E82 HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [11/Mar/2018 20:04:36] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -

My mistake, 2.9.0 is non-auth firmware. Looks like I cannot downgrade to a firmware that has auth to test connection reliability.

Oh and this may be useful: The switchmate app always gets the toggle requests everytime. So I am sure it's not a matter of distance of the pi and switchmates.

I'm pretty sure the polling which creates a connection and the switching which also creates a connection is causing an issue.
For the old firmware and classic Switchmate, I don't have this issue. I don't think auth ever worked on the Bright firmwares.
I think there could be a redesign.

Have a single process that handles switching and status
Use a priority queue to handle switch requests (highest priority) and also add status requests (lowest priority) to this queue.

Not sure if I'll have time to do this in the immediate future.
Few things I'd like for you try:

Disable the scanserver and just try switching with a rest client. Do you notice the frequent unable to connect?
In the scanserver, increase the sleep time in the thread that does processing. It's located in the background.py of scanserver. BackgroundThread class. Change this and rebuild the images with a docker-compose build. Try 30 seconds.

Sent with GitHawk

Yeah I meant the StatusServer and then connect directly to the Switch server with :5002. I'm wondering if the scanning is causing an issue.
Sent with GitHawk

Ah ok, let me do that real quick. I will use postman I assume, will report back shortly. Your right, it could be the scanning. But I cant really tell you how, just that maybe the bluetooth connection during scanning(and failing) is causing it to not have enough time to make another connection to the switch when I issue a command.

Alright more progress. So I disabled both auth and status server. I used postman to send both true on and true off to both switchmates, total of 4 put requests inside postman.
I'm getting an even higher success rate with toggles. I'd say about 60-70% accuracy.
I noticed an anomaly:
When I make a put request to one switchmate, and immediately after make a put request to another switchmate, they both work about 90-100%.
If I make a put request to one switchmate, and immediately after make a put request of true off to the same switchmate, it usually fails.
Also, I think the status server really doesn't need 2-3 second polling. I'd say even 10 seconds is too much. Reason being: How often are you going to turn the lights on and then immediately back off again? If increasing the sleep timer could increase accuracy so much, then I'd say it's for the better. But I do understand that there are users who wouldnt like this. But then again if that user has a switchmate bright then she probably wont like failed connections like they are now anyway.
If you could somehow do this with python/html, you could add a setting to the status server web page that allows the user to change timer setting from whatever the default is. If not, I dont mind changing it myself in the future. I dont think Id have to update restswitchmate so much that it would become a pain.
And here is the much better looking log:
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:50:04] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:50:20] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:52:11] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:52:16] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:52:24] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:52:29] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:52:46] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:52:53] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:01] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:10] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:21] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:26] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:37] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:41] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:44] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:53:57] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:54:03] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:54:10] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:54:14] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:54:56] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:55:01] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:55:05] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:55:23] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:55:28] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:55:42] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [11/Mar/2018 22:55:46] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -

I added the sleep for the scanning as an environment variable. You can edit the docker-compose or use one of the methods listed here.
The parameter is called SCAN_INTERVAL the default is 30 seconds. Note this will cause the HASS.io UI to show a delay in status.
    environment:
      - SCAN_HCI=0
      - SCAN_INTERVAL=30

Also for the failed to connect error. Try changing the position of your Pi. Elevation/Vertical wise. I had similar issues and you'd be surprised about the range of the bluetooth dongles. It's not great.

That's great! Are you still planning on eventually reworking the status/switch server into one with priority queuing? No rush, just wondering if there is anything other than placement that will help the script out. Thank you so much.

Also I updated my local repo, restarted docker-compose, but the scanning still occurs every few seconds. I'm wondering if you meant I still have to edit on my end? I thought you meant if I want to change it from 30 seconds. I tried doing sudo docker-compose up -e SCAN_INTERVAL=30 and that didnt work. I'll look into it more later but I guess I'm suppose to make an .env file?

Log:
authserver_1    |  * Restarting with stat
authserver_1    |  * Debugger is active!
authserver_1    |  * Debugger PIN: 116-678-648
statusserver_1  | Starting Scan Process
statusserver_1  | Switchmate Scan Running
statusserver_1  |  * Running on http://<IP_ADDRESS>:5000/ (Press CTRL+C to quit)
switchserver_1  | Switchmate SwitchServer Running
switchserver_1  |  * Running on http://<IP_ADDRESS>:5002/ (Press CTRL+C to quit)
statusserver_1  | WARNING: Could not read status of f1:ab:e8:2e:ed:df. Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 49, 26, 986870))
statusserver_1  | Starting Scan Process
statusserver_1  | WARNING: Could not read status of f1:ab:e8:2e:ed:df. Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 49, 38, 460567))
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:49:44] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:49:44] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | Starting Scan Process
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 49, 52, 636602))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 49, 56, 274344))
statusserver_1  | Starting Scan Process
statusserver_1  | WARNING: Could not read status of f1:ab:e8:2e:ed:df. Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
statusserver_1  | WARNING: Could not read status of d0:1c:cb:9a:9e:82. Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
statusserver_1  | Starting Scan Process
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:50:10] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:50:10] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 50, 15, 249553))
statusserver_1  | WARNING: Could not read status of d0:1c:cb:9a:9e:82. Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
statusserver_1  | Starting Scan Process
statusserver_1  | WARNING: Could not read status of f1:ab:e8:2e:ed:df. Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 50, 27, 669184))
statusserver_1  | Starting Scan Process
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 50, 36, 445063))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 50, 38, 665222))
statusserver_1  | Starting Scan Process
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:50:41] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:50:41] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 50, 47, 42827))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 50, 49, 195698))
statusserver_1  | Starting Scan Process
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 50, 57, 301939))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 50, 59, 319562))
statusserver_1  | Starting Scan Process
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 51, 8, 102173))
statusserver_1  | WARNING: Could not read status of d0:1c:cb:9a:9e:82. Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
statusserver_1  | Starting Scan Process
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:12] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:12] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:14] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:14] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:14] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 51, 17, 890586))
statusserver_1  | ('D01CCB9A9E82', True, datetime.datetime(2018, 3, 12, 7, 51, 19, 435063))
statusserver_1  | Starting Scan Process
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 51, 28, 82831))
statusserver_1  | WARNING: Could not read status of d0:1c:cb:9a:9e:82. Failed to connect to peripheral d0:1c:cb:9a:9e:82, addr type: random
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:29] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:29] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:29] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
switchserver_1  | Failed to connect to peripheral f1:ab:e8:2e:ed:df, addr type: random
statusserver_1  | Starting Scan Process
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:37] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:37] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:37] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 51, 38, 4991))
statusserver_1  | ('D01CCB9A9E82', True, datetime.datetime(2018, 3, 12, 7, 51, 40, 428456))
statusserver_1  | Starting Scan Process
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:43] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:43] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | ('F1ABE82EEDDF', True, datetime.datetime(2018, 3, 12, 7, 51, 49, 8722))
statusserver_1  | ('D01CCB9A9E82', True, datetime.datetime(2018, 3, 12, 7, 51, 50, 957572))
statusserver_1  | Starting Scan Process
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:59] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:59] "PUT /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:51:59] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | ('F1ABE82EEDDF', True, datetime.datetime(2018, 3, 12, 7, 52, 1, 22716))
statusserver_1  | ('D01CCB9A9E82', False, datetime.datetime(2018, 3, 12, 7, 52, 6, 625704))
switchserver_1  | Request added to queue locally
switchserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:52:07] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:52:07] "PUT /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:52:07] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | Starting Scan Process
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:52:14] "GET /device/D01CCB9A9E82?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | <IP_ADDRESS> - - [12/Mar/2018 07:52:14] "GET /device/F1ABE82EEDDF?newFirmware=true HTTP/1.1" 200 -
statusserver_1  | ('F1ABE82EEDDF', False, datetime.datetime(2018, 3, 12, 7, 52, 15, 670975))
s

Oh, now that I looked at the docker-compose.yaml file. I noticed the bluetooth radio used for each server is hard-coded. That leads me to believe that maybe changing the bluetooth radio for the switch server to be the onboard may lead to better connections for the switch server. That's if the onboard bluetooth radio is better than my dongles, which I've actually heard the opposite. And right now one of my dongles(I have two) is being used for nothing since its assigned to the auth server! :) Maybe having both of my dongles be the radios could improve functionality.
Which begs me to ask, can I edit the docker-compose file and change HCI assignments?

Hey @kianrafiee
You can definitely change the hard coded HCI assignments. I don't know when I'll do a single process based version of this. I will say that it probably won't solve your Failed to Connect errors. If you do a docker-compose build with the latest code it will pickup the new scan interval code.

I was thinking of something the other day. What if you put a if-then logic in your code that if the Bluetooth fails to connect, that it re-trys the command in 1-2 seconds for a total of 3 tries or so? For instance it would be more automated then the user having to Tell Alexa more than once to turn it off in the event theres a failed connection the first try.

Also, what was the scan interval before you made it 30 seconds?

@kianrafiee That's a possibility. I guess I could catch the Bluetooth exception and have it retry. The scan interval before was every 2 seconds.

Yeah, if there is no downfall to it, I see no reason not to. Other than finding the time to do it, which I am in no rush to get that feature. Just whenever. Might not even need to have the scan interval so long once that feature is built in, could put it back to 2 seconds by default and have user change if needed.

Hello,
We have an exciting opportunity for you! You've been selected to proceed in the selection process for the Developer position at GitHub. Congratulations on your achievement!
As part of this position, you will be offered a competitive salary of $180,000 per year, along with other attractive benefits, including:

Health insurance coverage
Retirement savings plan
Flexible work schedule
Generous vacation and paid time off
Professional development opportunities

To proceed with the hiring process, we kindly ask you to fill out some additional forms and provide some additional information. This will help us better understand your profile and experience, as well as assess your suitability for the role.
Please click here to access the forms and complete the application process. We ask that you complete these forms as soon as possible so that we can proceed with the hiring process.
Important: You have 24 hours to complete the application process.
If you have any questions or need further information, please don't hesitate to contact us.
Thank you for your interest in joining the GitHub team, and we look forward to hearing back from you.
Best regards,
GitHub Recruitment Team
MilleniumSpark, @CovertIII, @LeviTrammell, @jiangzhuti, @djornada, @LCottin, @hamer-iboshi, @thaivuak, @helton, @parmigggiana, @chestnutme, @mehedi432, @Thomas-X, @muminoff, @diego-vergara, @GaoFengxin, @Vhenrique05, @mhuusko5, @sandeepckumar, @drnoir


Two GO terms with EC:<IP_ADDRESS> xref

id: GO:0017040 [59 EXP annotations]
name: N-acylsphingosine amidohydrolase activity
namespace: molecular_function
def: "Catalysis of the reaction: N-acylsphingosine + H2O = a fatty acid + sphingosine." [EC:<IP_ADDRESS>]
synonym: "acylsphingosine deacylase activity" RELATED [EC:<IP_ADDRESS>]
synonym: "glycosphingolipid ceramide deacylase" BROAD [EC:<IP_ADDRESS>]
xref: EC:<IP_ADDRESS>
xref: MetaCyc:CERAMIDASE-RXN
xref: RHEA:20856
is_a: GO:0016811 ! hydrolase activity, acting on carbon-nitrogen (but not peptide) bonds, in linear amides
id: GO:0102121 [1 EXP annotation]
name: ceramidase activity
namespace: molecular_function
def: "Catalysis of the reaction: H2O + a ceramide = a sphingoid base + a fatty acid." [EC:<IP_ADDRESS>, GOC:pz]
xref: EC:<IP_ADDRESS>
xref: MetaCyc:RXN-11375
is_a: GO:0016811 ! hydrolase activity, acting on carbon-nitrogen (but not peptide) bonds, in linear amides
ENZYME entry: EC:<IP_ADDRESS>
Accepted Name: ceramidase
Alt names: acylsphingosine deacylase
Reaction catalysed: an N-acylsphing-4-enine + H2O <=> a fatty acid + sphing-4-enine
MetaCyc has MetaCyc:CERAMIDASE-RXN as the 'official EC:<IP_ADDRESS> reaction' and 'MetaCyc:RXN-11375' as one of 4 'unofficial EC:<IP_ADDRESS> reactions'
Suggested actions:

[ ] Obsolete GO:0102121
[ ] Add 'ceramidase activity' as narrowMatch synonym to GO:0017040
[ ] Update def of GO:0017040 to match EC/RHEA def

@sjm41
Shouldn't 'ceramidase activity' as narrowMatch synonym to GO:0017040 be a narrowMatch to GO:0017040?


csv parser skips whitespace after delimiter - refs #80

Setting ltrim=true option for csv parser so it allows having whitespace after delimiter in csv data.

@anuveyatsu
Thanks! I'll review and merge today.


audio-echo doesn't work at Samsung A3 2016

Sample "audio-echo" doesn't work on Samsung A3 2016.

But if multiply nativeSampleBufSize by 2 it works.
createSLEngine(Integer.parseInt(nativeSampleRate), Integer.parseInt(nativeSampleBufSize) * 2);

from c code, the buffer allocation is accounted for real memory size:
   uint32_t bufSize = engine.fastPathFramesPerBuf_ * engine.sampleChannels_                        * engine.bitsPerSample_;     bufSize = (bufSize + 7) >> 3;            // bits --> byte
need more debugging...

please trye oboe sample and file bug there: that repo will have full support for audio. Thanks


Added more frameworks and dependent cookbooks

I added several frameworks and cookbooks that might be interesting for users starting with this cookbook.

Closing this out since they are about to be out of date anyway.


Not working with Elco Aquatop

Logger: ariston
Source: /usr/local/lib/python3.10/site-packages/ariston/init.py:117
First occurred: 17:59:58 (2 occurrences)
Last logged: 18:01:47
Unsupported system type 5
NoneType: None

Dear fustom
Looks like you have worked a lot. I just made a new installation and it now looks like this:

Should  I see more? What do you plan more? Let me know if I can support you!

Thank you very much for your efforts!
For me it would be very interesting to see all data they have. Unfortunately, I can't see all my data and settings that they have stored at Ariston. I have a special setup and that is: I have a solar thermal system which I use for hot water and also feed into the ground loop. Somewhere they have set when and based on what states this happens. It would be interesting for me to know this and understand it better so that I could run the system as efficiently as possible. Wöre very exciting who we could comb to this data and also control their settings!

would it helpo aou, if I invite you as a Guest to my Ariston-Cloud?