Question: What will be the scope of View Model object if it is intialized directly without using ViewModelProvider inside Adapter class ?

PlantAndGardenPlantingsViewModel object is initialized directly inside GardenPlantingAdapter. How will observable fields of this ViewModel behave?

would you mind address some details, I cannot catch.

Yes, actually you are right, even the google hasn't a solution for ViewModel of Item which should be created from a factory.
However, I think the ViewModel of Item will be considered as a normal object of data-binding.
The idea of MVVM is that everything of business could and should be done in the ViewModel including the Items, never expose logical to UI level.

Thanks for the reply. I have a quick question. Sunflower is recommended as one of the best starter guide for learning android architecture components. As we know it is in development phase, where can we get the roadmap of upcoming features? Very few google github repos in kotlin are available for Android Jetpack components that address only a specific area only.
Sunflower is eagerly awaited app, which provides end to end solution. As of now, Sunflower is not using all Architecture component and even for the existing one's full power of Architecture components is not demonstrated as compared to other google codelabs. It's humble request to include more screens and features and if possible share roadmap for upcoming features.

...and to provide a working example of master-detail flow using either ConstraintSets, or Navigation AAC :smile:


Couldn't drop privileges: User is missing UID (see mail_uid setting)

After binding the mailserver with OpenLDAP, users are not able to identify using their username + password.
May 16 17:53:00 mail dovecot: pop3(user@domain.org): Error: Couldn't drop privileges: User is missing UID (see mail_uid setting)
Docker-compose :

mail:
    image: tvial/docker-mailserver:latest
    hostname: mail
    domainname: ${SMTP_DOMAIN}
    ports:
      - "$PORT_SMTP:25"
      - "8143:143"
      - "8110:110"
      - "8587:587"
      - "8993:993"
      - "8995:995"

    environment:
    - HOSTNAME=mail
    - DOMAINNAME=${SMTP_DOMAIN}
    - ENABLE_POP3=1
    - ENABLE_LDAP=1
    - LDAP_SERVER_HOST=<IP_ADDRESS>
    - LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
    - LDAP_BIND_DN=${LDAP_BIND_DN}
    - LDAP_BIND_PW=${LDAP_ADMIN_PASSWORD}
    - LDAP_QUERY_FILTER_USER="(&(mail=%s))"
    - LDAP_QUERY_FILTER_GROUP="(&(mailGroupMember=%s))"
    - LDAP_QUERY_FILTER_ALIAS="(&(mailAlias=%s))"
    - SASLAUTHD_LDAP_FILTER="(&(uid=%U)(objectClass=posixAccount))"
    - DOVECOT_PASS_FILTER="(&(objectClass=posixAccount)(mail=%u))"
    - DOVECOT_USER_FILTER="(&(objectClass=posixAccount)(mail=%u))"
    -<EMAIL_ADDRESS>
    cap_add:
    - NET_ADMIN
    - SYS_PTRACE
    restart: always

When looking at the logs of OpenLDAP, the request is correctly processed, a user is returned, but the mailserver seems to handle this response incorrectly.
I also don't see where I could fix this, since I coudln't find the file mail_uid nor any settings related to this.
Any fix or help for that ?
Thanks 👍 !

You need a LDAP server with postbook schema.
If you need a docker you can use this one: https://hub.docker.com/r/jsmitsnl/docker-openldap-postfix-book/

Okay, so this led to a completely different error. Now that the schema is updated, mailserver is complaining that it encounters Permission Denied.
May 16 22:29:30 mail postfix/smtpd[1439]: disconnect from unknown[<IP_ADDRESS>] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=7/8,
May 16 22:33:56 mail postfix/smtpd[1743]: disconnect from unknown[<IP_ADDRESS>] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=7/8,
May 16 22:36:27 mail postfix/smtpd[1820]: disconnect from unknown[<IP_ADDRESS>] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=7/8,
May 16 22:26:52 mail dovecot: pop3(arthur@newproject.org): Namespace '': mkdir(/var/mail/newproject.org) failed: Permission denied top=0/0, retr=0/0, del=0/0, size=0,
May 16 22:26:52 mail dovecot: pop3(arthur@newproject.org): Error: Namespace '': mkdir(/var/mail/newproject.org) failed: Permission denied,
May 16 22:26:52 mail postfix/smtpd[1439]: NOQUEUE: reject: RCPT from unknown[<IP_ADDRESS>]: 451 4.3.0<EMAIL_ADDRESS>Temporary lookup failure<EMAIL_ADDRESS><EMAIL_ADDRESS>proto=ESMTP helo=<[<IP_ADDRESS>]>,
May 16 22:26:52 mail postfix/smtpd[1439]: disconnect from unknown[<IP_ADDRESS>] ehlo=2 starttls=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=7/8

Is there something I'm missing ? Should I have given any additionnal permissions ?

The mail dir should have the permission 5000:5000. That is the virtual user id.
Now the permission of /var/mail is not correct.

You can see these lines that are important (first and last):
https://github.com/tomav/docker-mailserver/blob/60656aec492936d4287132bf523cf1576d07a6ab/test/docker-openldap/bootstrap/ldif/03_user-email-other-primary-domain.ldif#L18-L22

Thank you very much for your patience.
Now my client successfully connects to the server via POP3 but not with SMTP.
May 17 08:32:53 mail postfix/trivial-rewrite[1819]: warning: dict_ldap_open: /etc/postfix/ldap-domains.cf: Fixed query_filter  is probably useless,
May 17 08:32:53 mail postfix/trivial-rewrite[1819]: warning: dict_ldap_lookup: Search error -7: Bad search filter ,
May 17 08:32:53 mail postfix/trivial-rewrite[1819]: warning: virtual_alias_domains: ldap:/etc/postfix/ldap-aliases.cf: table lookup problem,
May 17 08:32:53 mail postfix/trivial-rewrite[1819]: warning: virtual_alias_domains lookup failure,
May 17 08:32:53 mail postfix/smtpd[1815]: NOQUEUE: reject: RCPT from unknown[<IP_ADDRESS>]: 451 4.3.0<EMAIL_ADDRESS>Temporary lookup failure<EMAIL_ADDRESS><EMAIL_ADDRESS>proto=ESMTP helo=<[<IP_ADDRESS>]>

If you are not using the postaccount ldif you will have to set dovecot user attributes. DOVECOT_USER_ATTRS
if you set it so that is using the uid and gid of the ldap user it will try to down grade the user permissions of the folder, This will work until you restart the container and it resets the permissions to 5000:5000
quick fix is
DOVECOT_USER_ATTRS==uid=5000,=gid=5000

This issue was closed due to one or more of the following reasons:

Age
Contributor inactivity
The issue seems to be resolved

If you think this happened by accident, or feel like this issue was not actually resolved, please feel free to re-open it. If there is an issue you could resolve in the meantime, please open a PR based on the current master branch so we can review it.

I had this same issue when using ldap. Setting mailGidNumber and mailGidNumber to 5000 fixed it for me.

dn: uid=jsmith,ou=people,dc=clayrisser,dc=com
cn: John
mail<EMAIL_ADDRESS>mailEnabled: TRUE
mailGidNumber: 5000
mailUidNumber: 5000
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: person
objectClass: PostfixBookMailAccount
objectClass: top
sn: Smith
uid: jsmith
userPassword: {CRYPT}<SOME_HASH>

I have the same issue, however, if i set DOVECOT_USER_ATTRS in the mailserver.env, it it not used in the actual dovucot conf within the container, I know this setting and i have used it in manually configured dovecot/postfix, but here in the container i only see a default which looks like this
user_attrs          = mailHomeDirectory=home,mailUidNumber=uid,mailGidNumber=gid,mailStorageDirectory=mail
rather than 'homeDirectory=home,=uid=5000,=gid=5000'
And i check on "latest" and with "edge"
Any hint on what i might be doing wrong ?


Snake & ladder Game

Hi 👋, I'm Vagish Yagnik
This PR adds  a simple  Snake & Ladder game
Using this, students can learn about a few design patterns commonly used in Java Development.

This Game consists of

Player class : Stores player id, name, current position.
Ladder class : Stores start & end position of the ladder & verifies that no 2 ladders starts at same position & other basic checks.
Snake class : Stores face & tail position of the snake & verifies that no 2 snakes have same face position.
Game class: Is a Monitor class which stores state of the game at any point in time. See the builder pattern here.
PlaySnakeNLadder - Main class that populates Game class with players, ladders & snakes.

Sample Output -

Some Bug Fixes

Good merge @vagishyagnik


Submit notebook context to TextCortex

Details at #7

A full implementation of #7 is blocked by #12, currently cell outputs are not submitted to the API


Remembering the object's position when navigating around the sampe area

Hello again,
I tried to add and move around objects in the scene in order to observer the behaviour using Teb_planner ,it seems that the object's position and size when detection at the first try is remembered and taken into account in future tries. Is there a parameter that I can change so that each time the object detected is not used more than once only during run-time.
I read about it on one of the issues and @croesmann has mentioned he will push some changes regarding with it this summer.
Thanks in advance and cheers.

hi @MomoTavas,
Do you mean objects in the costmap_2d? The costmap is not maintained by the teb_local_planner, so you need to update your navigation stack configuration. However, obstacles are usually cleared in case you receive new valid range sensor date or if you call the corresponding service call.
If you mean user-supplied obstacles provided via ObstacleArrayMsg, these are cleared at every stage, so you can clear all user-supplied (custom) obstacles by sending an empty obstacle list.
I hope this answers your question. If you are still unsure and if this question is still relevant, please comment and/or reopen this issue.


Ignore plays that happened before the item was added

If a user has watched an item before it was added to Jellyfin, that play is ignored.
This is needed because the Trakt plugin sets the exact date of last play. In this scenario: a file is imported, it is marked as watched by Trakt, this plugin sees it as expired, and the file is immediately deleted.
My reasoning for this change is that while a file is in Jellyfin, it should stay there until someone actually watches it. This would also remove the need for the setting to mark items as unwatched on deletion, as future imports would simply ignore those plays.
Please note that I'm not at all familiar with C# or Jellyfin plugins, so double check my code. Also, this feature should probably be put behind a user setting, but I don't know how to do that. Feel free to make all the changes you deem necessary.
Closes #34.

Hi. Thanks for your contribution!

Also, this feature should probably be put behind a user setting, but I don't know how to do that

I think this feature makes a lot of sense by default and don't need different settings. At least for now I don't see case when you want your freshly added files being deleted instantly 😄

This would also remove the need for the setting to mark items as unwatched on deletion

You're right, this setting will probably be removed in the future versions (although still can be useful outside of plugin's scope).


Deploy slack-router to production

What does this PR do?

Modify the setup of the slack-router and commands so as to be production-ready

Steps taken:

Move the lambda code for all the slash commands to one S3 bucket.
Allow router lambda to publish to SNS topics for the commands
Update lambda handlers

Partially fixes #36

Per discussion - @d-rita can you please track @dakotabenjamin's suggestions as separate issues for us to work on later?
Merging this for now.


noImplicitReturnType [Suggestion]

We have noImplicitReturns which is great and helps tick up silly mistakes but it woud great to have noImplicitReturnType as well.
So what would noImplicitReturnType do?
Currently we can write a function like so:
function life () {
    return 42;
}
let x = life(); // Number

So all is great, TypeScript works out the return type nicely for us.
function life (x: boolean) {
    if (x) {
        return 'hi';
    } else {
        return 42;
    }
}
let y = life(true); // Number / String

This is where things start to go a little crazy. TypeScript records y as of type number  | string which is of course acurate. But what if i wanted this function to only return strings?
We already have support for that with limited modifications
function life (x: boolean): string {
    if (x) {
        return 'hi';
    } else {
        return 42; // Type '42' is not assignable to type 'string'.
    }
}
let y = life(true);

And as a result TypeScript nicly throws an error.
So my suggestion is that in much the same way as with noImplicitAny and let enforcing strict typeing an argument is added in the form of noImplicitReturnType which for my first example (only a single return) wouldn't have any effect but for the second would throw an error instead of typing the function as number | string

You might be interested in the typedef tslint rule.

Interesting, will set that up for now but i belive something like this should be in TS itself

I worry that new developers will enable this feature long before they fully understand the nature and expressive power of TypeScript's type system.
More concretely I think that adopting would very likely result in

Increased use of any
Failure to understand and take advantage of union and intersection types
Reduced benefits of CFA
Reduced use of generics
General confusion

There are already many misconceptions about TypeScript which have lead to poor coding practices that result in a failure to take advantage of the language.
Here is an unfortunately typical example from a Stack Overflow question:
export class ListComponent {
  items: any[] = [{id: 1, value: 'item1'}, {id: 2, value: 'item2'}, {id: 3, value: 'item3'}];
  myModel: any = {id: this.items[1].id , value: this.items[1].value};
}

We can all agree that such code is terrible, but why was it written that way?
I really want to stress that the above pattern is common.
I think adding this feature would be a serious mistake.

Another, more pertinent example is code such as
function f(n: number) {
  return n % 2 === 0 ? 'even' : 'odd';
}

With the proposed feature, this would result in an error

Error: Return type not specified.

How likely is it that when responding to said error, the user will write
function f(n: number): 'even' | 'odd'?

Presumably a union of unit types from the same primitive family would not trigger this error.
I'm sympathetic because it's easy to do something like
function fn() {
  if (x) return g();
  // ...
  return g;
}

and then deal with an inscrutable error message about foo | () => foo somewhere else in the program. I argued in favor of not creating union types for function return types but will admit that in practice it hasn't been that much of a problem.

@RyanCavanaugh I can definitely see the reasoning behind wanting some kind of error there but, at the same time, it is very situational foo | () => foo is a very useful and perfectly valid type in some situations.
My fear is that use of this flag will be premature and that if it is enabled in the first TypeScript code base which someone works on, it may never occur to them that they can even express such a type.
Also, I wonder how the flag would be classified. Would it fall under --strict? That doesn't seem right to me.

I'm also want such behavior to be present in typescript itself.
Reason for this is that functions return type is an its contract, so you can break it very easily by modifying function. Of course in case of some other code use such function directly, typescript will warn there, but not all code consumed in type-safe manner and still should provide stable contract.
Consider example of server-side controller, its return type is what client-side will receive, but methods of controller are called inside some third-party lib which doesn't care greatly what it gets as function result.
@Controller('foo')
export class FooController {
  @Get()
  bar() {
    return 5;
  }

  @Get()
  bar2(id: string) {  // <-- there should be error with proposed feature
    if (id === "secret") {
      return "some text";
    }
    return 0;
  }
}

So, in general proposed compiler flag should throw error when function returns not a single type so that developer could review changes to decide between contract breakage or fixing code.
Also, suggested name of flag does not consistent with its wanted behavior, developer should not specify return type explicitly in case of single inferred type.

@salterok that's basically what I was looking for, if a function only ever returns a number it's type should be taken as number without complaint it's only automatic union types that would be blocked
Basically do what noImplicitAny does for let x = y; but with functions, perhaps a better name would be something like noImplicitReturnUnion?


Segmentation fault after updating firmware

Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

Consider checking out SDK examples.
Have you looked in our documentations?
Is you question a frequently asked one?
Try searching our GitHub Issues (open and closed) for a similar issue.

All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)

Required Info

Camera Model
D420

Firmware Version
<IP_ADDRESS>

Operating System & Version
Ubuntu16

Kernel Version (Linux Only)
(4.15.0-50-generic

Platform
PC

SDK Version
{ legacy / 2.22.0 }

Language
{C/C#/labview/nodejs/opencv/pcl/python/unity }

Segment
{others }

Issue Description
I installed via the process mentioned here: https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md.
On running realsense-viewer i kept getting messages to update the firmware to >5.10.
I followed the process mentioned here: https://www.intel.com/content/dam/support/us/en/documents/emerging-technologies/intel-realsense-technology/Linux-RealSense-D400-DFU-Guide.pdf
Here is the output of my firmware update process:
$ intel-realsense-dfu -b 002 -d 003 -f -i /home/hansolo/Downloads/IntelD420/dkms/D400_Series_Development_FW_5_11_4/Signed_Image_UVC_5_11_4_0.bin

Intel® RealSense™ DFU Tool v1.1.0-

Device busnum = 2
Device devnum = 3
FW file path = /home/hansolo/Downloads/IntelD420/dkms/D400_Series_Development_FW_5_11_4/Signed_Image_UVC_5_11_4_0.bin
FW Version of .bin File   = <IP_ADDRESS>
FW version on device = <IP_ADDRESS>
MM FW Version = <IP_ADDRESS>
FW update required...
Updating FW...
DFU FW version in file = <IP_ADDRESS>
DFU_version = 60
DFU_isLocked = 0
FW_highestVersion = <IP_ADDRESS>
FW_lastVersion = <IP_ADDRESS>
Percentage done: 99
Running post download processes...
.
Post download processes done.
Done!
When I run realsense-viewer with the camera connected, the application closes with this as the output on the terminal:
10/06 17:43:14,205 WARNING [139687942130304] (synthetic-stream-gl.cpp:79) Initializing rendering, GLSL=1
10/06 17:43:14,205 WARNING [139687942130304] (synthetic-stream-gl.cpp:88)  0 GPU objects initialized
10/06 17:43:14,205 WARNING [139687942130304] (synthetic-stream-gl.cpp:131) Initializing processing, GLSL=1
10/06 17:43:14,287 WARNING [139687942130304] (synthetic-stream-gl.cpp:145)  0 GPU objects initialized
Segmentation fault (core dumped)
my dmesg logs, lsusb logs, udev logs all detect the device.
On running
$intel-realsense-dfu -p, the output is:

Intel® RealSense™ DFU Tool v1.1.0-

Could not find device in opmode!
Device currently updating auxilliary modules, please try again later
Can you please help me regarding this issue. I tried setting the $ export LRS_LOG_LEVEL="" to all possible values but end up getting a 0 byte file.

@LalitPradhan hello, you've mentioned that you're using D420 model -
What is the output of  rs-enumerate-devices -c -o -m ?
Also, did you try to run other demos, such as rs-depth , rs-capture and what were the results.
Providing the librealsense logs is required to have a better understanding of your situation.
So you can run realsense-viewer, redirect and reconfigure its log to a file with the "settings" button in the upper right. Then connect the device to PC to collect the logs without compiling from sources.

@ev-mp
$ rs-enumerate-devices
Segmentation fault (core dumped)
$ rs-depth
Segmentation fault (core dumped)
$ rs-capture
Segmentation fault (core dumped)
I changed the settings as mentioned above to log, the log file has no content on seg fault.
Cheer!
Lalit

@LalitPradhan , can you locally compile and run rs-enumerate-devices, replacing this line

log_to_console(RS2_LOG_SEVERITY_ERROR DEBUG);

It should generate the initial data to analyze.

@LalitPradhan Any update for this issue? Could you please provide the issue log as ev-mp suggested? Looking forward to your reply. Thanks!

@LalitPradhan Could you please update if you still need support on this? Thanks!

@LalitPradhan If no other questions, will close this ticket accordingly. Thanks!


Review javascript structure

We need to review existing javascript structure:

We need to add references to CDN resources with appropieate fallbacks.
We need to check for latest versions of the libraries.
We need to check if new libraries needed in default templates.
Predefined default modules for plugins initiation in site.js file (like module.modal = function(){..})

Do we have to update jquery version?
Performance comparison: http://jsperf.com/speed-comparison-of-jquery-versions/16

We can stick with the older version for now.

-1. We need to add references to CDN resources with appropieate fallbacks- Done
-2. We need to check for latest versions of the libraries- Done. Validate library isn't updated because of compatibility with validation unobstrusive.
-3. We need to check if new libraries needed in default templates- I think, that template should be as sleek as possible. If team thinks differently - let's discuss what libraries are needed.
-4. Predefined default modules for plugins initiation in site.js file (like module.modal = function(){..}) - Added default validation, mirroring validation unobtrusive default configuration, modal default initiation, added descriptions, documentation links and examples of libraries in template.


Not show animate scroll indicate when table scroll bounce bottom

when I pull to bottom it work normaly but when i scoll fast and it bounce to bottom refreshcontroll just work target action but no animation loading. So any idea for this case, Thank!

Any updates?


Handles missing signal.SIGUSR1 when registering a handler in worker

Windows machines don't have a signal.SIGUSR1. In order to avoid the
problems that come with registering a SIGTERM handler instead, we just
disable the SIGUSR1 handler on Windows machines. This resolves #1360.

lgtm

It seems that @Tarrasch leaving has caused a temporary delay in merging PRs, so we might have to push to get this one in and on pypi.

I can do it.
Did Tarrasch leave officially? He mentioned to me he would have less time going forward, didn't realize he announced it :)

Yeah, he posted in the mailing list that his last day was Monday when he announced the 2.0.0 release.

Oops realized for some reason I was no longer subscribed to the mailing list :( have missed the last few weeks of traffic

Same thing happened to me when @interskh mentioned the announcement at work.

Maybe we can get @ulzha, @DeaconDesperado or @econchick to the rescue? This just needs to be merged and a new version (2.0.1) pushed to PyPI, as explained here. :)
This solution seems sensible to me. Good job @daveFNbuck!

yeah would any of you want to push this to pypi? i can do it but might make sense for someone else to develop the habit of doing so :)

... but might make sense for someone else to develop the habit of doing so :)

Exactly my thoughts. :)

@Tarrasch @erikbern We're actually doing a walkthrough the code together right now, just working though on github. Can we maybe work together on this tomorrow?  It would be great to learn the process.

pushing to pypi is easy, i might have to add you as maintainers though

@erikbern Just noticed there's a step by step.
Shall we give this a try now?

sure go ahead whenever you have merged this

@erikbern What's the cadence for versioning?  1 pt release for each PR merged?

no it's generally been every few weeks or months. so no stress. but apparently 2.0.0 broke everything on windows so might be worth launching 2.0.1 soon. i wonder if there are other things that broken in 2.0.0

Hmm, I remember now that a user reported this as breaking way back, but nobody sent a PR and it was forgotten and left unfixed for the 2.0.0 release. See https://github.com/spotify/luigi/pull/1137. Interesting to see that so many people prefer to wait to upgrade luigi until it's released on PyPi, as of #1359 and #1360.
@DeaconDesperado, I usually just hand-waved when I picked version numbers. When you release, you should also mention that https://github.com/spotify/luigi/pull/1298 have been merged. Perhaps making it worth calling this 2.1.0, since it's not only a bugfix release.

Please could I give this (new release to make 2.x work on Windows) a nudge? Sorry to be that guy, but it's been quiet for a month now...

what do we need to do? publish a 2.1 to pypi?

If you're asking me, then yes please!

I believe that the windows issues are already patched on master, so we
should just need to publish it.
On Sat, Dec 5, 2015 at 8:16 AM, Max Grender-Jones<EMAIL_ADDRESS>wrote:

If you're asking me, then yes please!
—
Reply to this email directly or view it on GitHub
https://github.com/spotify/luigi/pull/1363#issuecomment-162217762.

I uploaded 2.0.1 to pypi today

Looks good to me - thanks!

Thanks @erikbern! :)


Fix ConditionalLogic docs to use select field keys

Hi there!
When using a Select field using key => value choice definitions, the parameter passed to the ConditionalLogic comparison function should be the choice's key, not its value.
Proposed Changes

Fix README ConditionalLogic section to use Select field keys instead of values

Thanks Guilherme! 🙌


Tenant Logo Type

let the user choose if upload an image or just add an icon

https://www.apollographql.com/docs/apollo-server/data/file-uploads/#integrating-with-express


We don't need to hardcode 'sh -xc'; removing this makes us agnostic t…

…o whether or not the image is an entrypoint image or not.

Fixes https://github.com/groupon/DotCi/issues/153


Pagination implementation for real-life database

In all the examples I can find, paginated queries are made against a mockup database which is just a JS array, and thus it is simply passed through connectionFromArray to return the correct paginated result (like the Star Wars example mentioned in the README).
For a real-life database, query all records and then pass them to connectionFromPromisedArray doesn't seem to be a good solution, as it will easily break your perfomance/crash your server as soon as you're doing anything at (even modest) scale
So what solutions should you use to avoid insane database fetching?
(I'm using a SQL database but I think a good solution to this problem applies to pretty much every not-a-js-array dbms)

Recently @chandu0101 created a nice and relatively big example of a relay application which uses MongoDB and sangria (scala GraphQL implementation).
If you don't mind looking at some scala code, then I would suggest to check out this function:
https://github.com/chandu0101/sri-sangria-example/blob/master/server/src/main/scala/sri/sangria/mongoserver/services/BaseService.scala#L52-L99
It creates a relay Connection which is based on MongoDB query. It also properly handles relay-style pagination and the result set, which comes from the DB, always contains only relevant documents. This particular example uses mongo's skip and limit to archive this. But I can also imagine other strategies to do this - for instance using an ID-based cursors which would be even more efficient.
Even though this example uses sangria-relay, conceptually it is very similar to reference implementation.

From all the solutions I found on the internet (including this one). It seems it does not work if data is inserted in the database during the lifetime of a cursor.
Am I wrong ?
Is there a generic solution ?

I thought about a solution to solve the data insertion:

If there is no before nor after cursor I execute the database query but I only select the Ids, not the content. generate a new queryId (uuidv4) and save the Id's I get to a redis hastable where the key is the queryId
If there is a cursor I extract the queryId from the cursor and get the list of Id's from the database
I use the query args to compute which Id's the client is interested in
I make a database query including the corresponding Ids
Return the result

I have a compliant implementation for Mongoose database I can share if anyone interested.
My only concern Is how long should I keep the queries in my redis server.

@mattecapu this package relay-mongodb-connection creates relay connection from mongodb cursors, it also uses skip and limit

Thank you @sibelius and @OlegIlyenko, your links were a good starting place for understanding what was going on in the creation of a ConnectionType response.
My solution was to not use createConnection* utilities but to create a ConnectionType response by myself.
Essentially I encode information about the ordering field (i.e. the ID) in the cursor and then use that to query results with ID >= or <= than cursor. The first and last parameters are handled with some clever LIMITing and order reversing.
My actual use case was a little more complicated because I'm fetching from multiple tables. Thus after retrieving the minimum required records I'm doing an additional round of sorting and cutting.
I'd be happy to provide some code examples if someone needs them.

@mattecapu I think u should provide some code examples to help people understand better how to implement a cursor

Well the point is, if you implement a ConnectionType for an endpoint you just need to

accept connectionArgs parameters
return a suitable response in the shape { edges: [{ cursor, node }], pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor }

Cursors can be any string you want. Normally Relay defaults to arrayconnection:<id> converted to base64 to make it opaque (you shouldn't actually relay on the implementation details of the cursors).
I used <type_name>:<id> converted to base64 as cursors.
Then a request to my endpoint look like this
endpoint(after: "sdflkjsdlfkjslkdf", first: 10) {
   # stuff
}

Basically, any request described by the specification is supported.
Thus when I get the request I process it in the following way:

Start from the greedy query: SELECT * FROM table
If the after argument is provided, add id > parsed_cursor to the WHERE clause
If the before argument is provided, add id < parsed_cursor to the WHERE clause
If the first argument is provided, add ORDER BY id DESC LIMIT first+1 to the query
If the last argument is provided, add ORDER BY id ASC LIMIT last+1 to the query
If the last argument is provided, I reverse the order of the results
If the first argument is provided then I set hasPreviousPage: false (see spec for a description of this behavior).
If no less than first+1 results are returned, I set hasNextPage: true, otherwise I set it to false.
If the last argument is provided then I set hasNextPage: false (see spec for a description of this behavior).
If no less last+1 results are returned, I set hasPreviousPage: true, otherwise I set it to false.

Using this "algorithm", only the needed data is fetched. While after and before can be both set, I make sure first and last args are treated as mutually exclusive to avoid making a mess. The spec itself discourage making requests with both the arguments set.
Notably, I return an object with the shape described above (and in the linked spec) and I don't use the connectionFromArray helper, which expects a raw collection to slice accordingly to the args.

That's a really great write-up @mattecapu. I'm going to close this out now but that is exactly the kind of thing that would work well in the documentation (could be something in a code comment, in the README, or we could start an examples folder). Would be happy to look at a PR adding something like that.

@mattecapu It seems the algorithm does not work if there was an deletion in the database between two paginated queries and/or if we want to sort by anything else than Id's right ?

@mattecapu what happens when the ids are not ordered? i.e they are UUIDs, id > paresedValue will be useless.

Sorry @GuillaumeLeclerc I lost your question in a notification misunderstanding with GitHub.
I'm going to address your question together with @oexza new comment.
As laid out in the comment above, my algorithm as both the limitations you guys noticed, but we can easily generalize it to overcome both at once using creation timestamps as "order-providers", instead of abusing of the id field, which by the way isn't guaranteed to be sequential anyway (in my specific use case, it was).
To support dynamic data getting deleted or added inbetween queries, paginating with creationTime works like a charm, especially with Relay caching mechanism.
We can provide a further generalization by not fixing an order-provider field but let it be dynamic, effectively allowing a lot of different orders on the data, which can come in handy. This is pretty simple to implement too, but gets complicated once you have to support dynamic data too. I supect there's no silver bullet for this use case, but I might be wrong.
@wincent I'll see what I can do! Thanks for the appreciation.

I came across this issue and I wanted to share a Node.js library that I created a while ago.
https://github.com/joonhocho/graphql-relay-connection
It helps you easily create a custom relay connections.
You can create connections for MongoDB, simple number arrays, etc by providing few functions.
I hope this can help.

@mattecapu Great post! Just wanted to say it helped out a lot. We had some tweaking to do since we accept arguments other than the Relay args spec.

Everything was working great with @mattecapu's solution,
but I ran into one rare situation as such and am in quite a pickle...
wondering if any of you have run into this issue.
We have one query for events that returns data in a specific order.
This specific order, which is passed as part of an SQL statement, includes things like how many times that event's page has been viewed, whether it has an promotional image, etc. Basically about 5 *** DESCs in ORDER BY.
We have an events query like this:
{
  viewer {
    events(first: 1, inCountry: Japan) {
      edges {
        node {
          id
          name
        }
      }
    }
  }
}

first and last can be dealt with as addressed above; flip the multiple ORDER BY DESC to ORDER BY ASC.
But when you introduce after & before, it is very difficult to serve the correct data that corresponds to the given Node ID, as due to the nature of our query, it is not as simple as saying event.id > 1 or event.createAt > xxxx when after & before are passed.

@Naoto-Ida if I understood correctly and your order is deterministic, createAt attribute should do the trick.
How do you compute your cursors?

@mattecapu
Our ORDER statement in our SQL would include something like:
ORDER BY

closest to user location
amount of views
whether its free, etc.
Or something like that. It would differ drastically depending on the user and "when" you query it, so it does not work off the createAt. Sorry, maybe my example of using createAt was misleading.
What I was trying to get at was that your method works great in situations where ordering is based on a single factor.

We compute it by base64decoding it, and splitting it into object:ID. From there we get that one record and get the ones before/after that.
So in the end, due to there not being that many records and time constraints, we redis cached the all the event record. We fetch it when a query with the same arguments come in, then based off of the supplied cursor, would slice the total records and serve the ones before/after it.

Now I see the problem.
When I was writing my algorithm, my implicit assumption was that between two different queries, the only change that could happen to the database was addition or removal of records.
While this may be a good-enough assumption for most cases, it fails if, like in your case, there's a third way to mutate the state of your database: updating a record.
That messes up with my algorithm because I cannot tell wether a given record was changed from the last time I queried the db.
Yet, this is not a problem specific to my algorithm. In general, there's no way to do this without storing information about updates.
Likewise, without storing a createdAt attribute there's no way to tell if a given record was there when I first run the query (apart from using other time-related information stored in the record, such as a sequential ID).
So the only way to support such constraint is to change the architecture of your db, adopting some kind of time-traveling structure.
Eventually, this is not as difficult as it sounds.
For the general case, you'll have to store every update you make to your db.
So your records will now look like this
object_id | updated_attribute | new_value | timestamp

Your data will be shattered into several of this atomic operations, which aggregated togheter will give you the most recent version of it. So for example if I want to retrieve attribute name of object 34 I'll ask my db
SELECT new_value FROM mytable WHERE object_id='34' ORDER BY timestamp DESC LIMIT 1

But now If I want to know which state my db was as a given time, I'll simply exclude all updates done after a specific timestamp_
SELECT new_value FROM mytable WHERE object_id='34' AND timestamp < GIVEN_TIMESTAMP
 ORDER BY timestamp DESC LIMIT 1

Voilà, I can now run queries against any version of my DB.
Obviously this is a simplification, you'll have a lot of issues to address (or better, operations to translate) to support this kind of architecture, but it's the only/best way to support such problem constraints.
Speaking for your specific case, @Naoto-Ida, I think you could get away with a far less disruptive change: create a table views(post_id, timestamp) and calculate amountOfViews at query-time by aggregating with the foreign key of your main table. That way you can filter by timestamp and retrieve the state (and thus the order) you had at that time.

If the first argument is provided, add ORDER BY id DESC LIMIT first+1 to the query

@mattecapu why +1 to limit number? I think it is just as equal as first argument.

@luckydrq You add +1 to get the boolean for pageInfo.hasNextPage

@luckydrq yeah it basically peeks at the next page to see if there is one.
Re-reading my last post, it comes to me there's a less invasive way to support updates, just use an updatedAt attribute. Use it the same way you use the createdAt attribute, and update it on updates.

@mattecapu Thanks for posting your solution here it was very helpful.
I implemented the same logic in our project on top of our GraphQL and Relay implementation in PHP.

@mattecapu I read your guide how to handle GraphQL connections with SQL. It's pretty much what I came up with when I was analyzing it myself (+ some details like how to handle hasNextPage).
The problem is that the SQL query gets really complicated really fast when I add a sorting argument to the GraphQL connection - especially if the sorting can be a combination of fields.
Do you have any tips how to handle that efficiently?

Hi @enumag, what do you exactly mean by 'SQl complexity'? The length in chars? Execution time? Other metrics?
 Unfortunately, my algorithm (feels weird to call it in such a way...) is very straightforward, and I really can't think of any ways to make it shorter or to improve its 'efficiency'. It really just translates between GraphQL and SQL, so I don't see room of improvement without pruning feature from your endpoint.
That said, using SQL builders means that you never deal with the raw, horrific string, and using an ORM means an even nicer interface (I use Sequelize). I would hint at this as a good practice, because it abstracts away much of the trouble.

Hi @enumag, what do you exactly mean by 'SQl complexity'? The length in chars? Execution time? Other metrics?

Primarily execution time and efficient usage of indexes on that table.
Secondary is the SQL query length and number of conditions in WHERE clause but I'm already using an SQL builder so I can deal with that myself.

Thank you @mattecapu. I had the same "algorithm" in my head, but I forgot to reverse the result when using last / before.. which makes senses from the UI point of view.
If someone is interested, here is my current implementation with Node, Apollo, and Knex on top of MySQL. Constructive feedbacks are more than welcome!
I took some shortcuts that I could improve in the future:

Currently the cursor is an ID --> I should use Base64 to apply the opaque principle
In my case, selection based on ID (greater/smaller, order by asc/desc) is sufficient in my current project, but it could be improved to be "generic". Although, it has been mentioned above: having a full bulletproof solution might not be that easy to achieve.

const userSchema = gql`

    type User implements Node {
        id: ID!
        email: String!
        ...
    }

    extend type Query {
        ...
        usersPaginated(input: UserPaginatedInput!): UserPaginatedConnection
    }

    input UserPaginatedInput {
        first: Int
        after: ID
        last: Int
        before: ID
    }

    type UserPaginatedConnection {
        pageInfo: PageInfo
        edges: [UserPaginatedEdge]
    }

    type PageInfo {
        hasNextPage: Boolean
        endCursor: ID
        hasPreviousPage: Boolean
        startCursor: ID
    }

    type UserPaginatedEdge {
        cursor: ID
        node: User
    }
    ...
`

const userResolvers = {
    ...
    usersPaginated: async (parent, args, { db }, info) => {
        try {
            const { first, after, last, before } = args.input
            let [hasNextPage, endCursor, hasPreviousPage, startCursor] = [false, null, false, null]
            let res = []

            if (!!first && !!last)
                throw new ApolloError('Ambiguous query: first and last should not be used together')
            if (!first && !last)
                throw new ApolloError('Missing first or last argument')

            const query = db.from('gql_user')

            if (!!first) {
                if (!!after)
                    query.where('id', '>', after)

                query.limit(first + 1)
                    .orderBy('id', 'asc')

                res = await query

                if (res.length > first) {
                    hasNextPage = true
                    res = res.slice(0, first)
                }
            }

            else if (!!last) {
                if (!!before)
                    query.where('id', '<', before)

                query.limit(last + 1)
                    .orderBy('id', 'desc')

                res = await query

                if (res.length > last) {
                    hasPreviousPage = true
                    res = res.slice(0, last)
                }

                res.reverse()
            }

            startCursor = res[0].id
            endCursor = res[res.length - 1].id

            const pageInfo = {
                hasNextPage,
                endCursor,
                hasPreviousPage,
                startCursor
            }

            let edges = []
            res.map(row => {
                edges.push({
                    cursor: row.id,
                    node: row
                })
            })

            return {
                pageInfo,
                edges
            }
        } catch (err) {
            throw new ApolloError(err.sqlMessage, err.code, err)
        }
    }
    ...
}

Sorry for spamming, but I'd like to thanks @mattecapu for his explanation of the algorithm in one of his prior posts. I was mislead by these cursors based on static arrays and noticed that there must be a different way for pagination of dynamic data such as data from a database where data gets deleted in between pages / accessing different pages during pagination causing anomalies. The detailed description really helped to come up with a correct solution in my project.

@mattecapu unless I am mistaken steps 4 and 5 are using the wrong ORDER BY (when using first, it should be ASC and vice-versa). Can you fix so people that find this thread are not more confused than necessary 😅

Hi @Sytten, re-reading the specification now it seems that ordering is not dependent on the field, but should be decided by the endpoint.
The ORDER BY clause in my algorithm is there to select the right chunk of results, but a side-effect is that the order gets reversed when using last as opposed to first! So I'll add a mention to this in the original comment.
Thanks!

@mattecapu Good that you found that too, but that is not really my point :)
Check the coded algo from https://github.com/graphql/graphql-relay-js/issues/94#issuecomment-613137054, you will see that the ORDER BY is the inverse of your algo (first -> ASC, last -> DESC) and for a good reason. If you take N+1 DESC it wont give you the right dataset assuming an autoincrement Int for first and vice versa. Unless you consider first being the highest IDs then it would make sense but I would specify it.

@Sytten I see. It's quite misleading, indeed. I was paginating in reverse chronological order (as most feeds do nowadays) so 'first' to me meant 'first to be displayed'. This explains my choice of ordering, I will edit to clarify.

Hi @mattecapu sorry for bringing up an old thread, but I need some help.
I am trying to implement relay pagination with postgres and I am facing the issue where I want to sort on multiple columns. Let us say I have products table. I have an ID column, which is globally unique and auto increments every time something is added. Sorting based on this ID is very easy using the algorithm mentioned above. But what if I want to sort on multiple columns? For example, I want to sort on the Name column (to get products in alphabetical order), and then start executing pagination queries. The ID cursor no longer makes sense, because we are sorting on a different field now. So do I make a name cursor and use that? What if I want to sort based on three or more columns? How would I create a cursor then?
I have created a stock overflow question as well: https://stackoverflow.com/questions/72011183/how-to-implement-graphql-relay-style-cursor-based-pagination-in-postgres-with-s , I don't need answers specific to python, but a recommended general approach is appreciated.

Well the point is, if you implement a ConnectionType for an endpoint you just need to

accept connectionArgs parameters
return a suitable response in the shape { edges: [{ cursor, node }], pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor }

Cursors can be any string you want. Normally Relay defaults to arrayconnection:<id> converted to base64 to make it opaque (you shouldn't actually relay on the implementation details of the cursors).
I used <type_name>:<id> converted to base64 as cursors.
Then a request to my endpoint look like this
endpoint(after: "sdflkjsdlfkjslkdf", first: 10) {
   # stuff
}

Basically, any request described by the specification is supported.
Thus when I get the request I process it in the following way:

Start from the greedy query: SELECT * FROM table
If the after argument is provided, add id > parsed_cursor to the WHERE clause
If the before argument is provided, add id < parsed_cursor to the WHERE clause
If the first argument is provided, add ORDER BY id DESC LIMIT first+1 to the query
If the last argument is provided, add ORDER BY id ASC LIMIT last+1 to the query
If the last argument is provided, I reverse the order of the results
If the first argument is provided then I set hasPreviousPage: false (see spec for a description of this behavior).
If no less than first+1 results are returned, I set hasNextPage: true, otherwise I set it to false.
If the last argument is provided then I set hasNextPage: false (see spec for a description of this behavior).
If no less last+1 results are returned, I set hasPreviousPage: true, otherwise I set it to false.

Using this "algorithm", only the needed data is fetched. While after and before can be both set, I make sure first and last args are treated as mutually exclusive to avoid making a mess. The spec itself discourage making requests with both the arguments set.
Notably, I return an object with the shape described above (and in the linked spec) and I don't use the connectionFromArray helper, which expects a raw collection to slice accordingly to the args.
EDIT: The above algorithm produces array with different orders depending on which of first or last is used to paginate. This is against the specification, so there should be one more step:

Re-order results in a consistent manner (e.g. by creation date)

Thanks to @Sytten for bringing this problem to my attention.
EDIT2: The above ordering reflects pagination, not chronological order. Hence first is interpreted as 'first to be displayed', not 'first chronologically'. Therefore, you might want to swap ASC and DESC in step (4) and (5). Thanks to @Sytten for bringing this problem to my attention.

This is what I do, using TypeORM and type-graphql.
@Query(returns => UserConnection)
  async getUsers(@Args() conn: UserConnectionArgs): Promise<UserConnection> {
    const result = new UserConnection()
    let userQuery = this.userRepository.createQueryBuilder()
    if (conn.search) {
      userQuery = userQuery.where('username LIKE :search', { search: `%${conn.search}%` })
    }
    if (conn.after) {
      userQuery = userQuery.where('id > :id', { id: conn.decodedAfter })
    }
    if (conn.before) {
      userQuery = userQuery.where('id < :id', { id: conn.decodedBefore })
    }
    if (!conn.first && !conn.last) conn.first = 10

    if (conn.first || !conn.last) {
      userQuery = userQuery.orderBy('id', 'ASC')
      conn.first ||= 10
      const users = await userQuery.take(conn.first + 1).getMany()
      result.edges = users.slice(0, conn.first).map(u => ({ node: u, cursor: btoa(u.id.toString()) }))
      result.pageInfo.hasNextPage = users.length > conn.first
      result.pageInfo.hasPreviousPage = false
      result.pageInfo.startCursor = result.edges[0]?.cursor || null
      result.pageInfo.endCursor = result.edges[result.edges.length - 1]?.cursor || null
    }
    if (conn.last) {
      userQuery = userQuery.orderBy('id', 'DESC')
      let users = await userQuery.take(conn.last + 1).getMany()
      users = users.reverse()
      result.edges = users.slice(0, conn.last).map(u => ({ node: u, cursor: btoa(u.id.toString()) }))
      result.pageInfo.hasNextPage = false
      result.pageInfo.hasPreviousPage = users.length > conn.last
      result.pageInfo.startCursor = result.edges[0]?.cursor || null
      result.pageInfo.endCursor = result.edges[result.edges.length - 1]?.cursor || null
    }

    return result
  }


Update examples/peer/index.ts

Typo fix. It ain't much meme.

Codecov Report

Merging #240 (aec586e) into main (7c978ac) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #240   +/-   ##
=======================================
  Coverage   94.05%   94.05%
=======================================
  Files         197      197
  Lines        5400     5400
  Branches      649      649
=======================================
  Hits         5079     5079
  Misses        178      178
  Partials      143      143

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c978ac...aec586e. Read the comment docs.


Create internal links within dd when grid_ggd[:].path is provided

IMAS data model schema has property path in grid_ggd IDS which is a path to another IDS grid_ggd to refer to an existing definition of grid_ggd. For example, radiation.grid_ggd[1].path can refer to edge_profiles.grid_ggd[1] by having value IDS::edge_profiles/grid_ggd(1). This is described in the webpage for OMAS data schema for all different grid_ggd.
This is an important feature for this data model to save space and reduce redundancy. While end users can write their own parser for grid_ggd.path and link to th relevant grid_ggd, it would be a really cool enhacement if IMASDD implements this link internally such that when dd.radiation.grid_ggd[1] is called, it points to dd.edge_profiles.grid_ggd[1] automatically. I envision a check in the constructor call of grid_ggd functions where if path is provided, it creates this link. And an explicit function too, so that one can add the path after creation of IDS object and get this link working.
I don't know though how this will be implemented or if it is even possible in a meaningful way without slowing down IDS access too much since all children grid_ggd are actually separate data types based on parent IDS.

This sounds very similar to the expressions feature that we have for this in another repository, @orso82 do you think this could be added to IMASDD?

Yes, that can be done in a similar way that we handle expressions.
@anchal-physics can you confirm that the IDS::edge_profiles/grid_ggd(1) syntax is something specific to how the GGD specification is implemented in IMAS. I have not seen such referencing anywhere else...

I've read it on the OMAS schema page.

Path of the grid, including the IDS name, in case of implicit reference to a grid_ggd node described in another IDS. To be filled only if the grid is not described explicitly in this grid_ggd structure. Example syntax: IDS::wall/0/description_ggd(1)/grid_ggd, means that the grid is located in the wall IDS, occurrence 0, with relative path description_ggd(1)/grid_ggd, using Fortran index convention (here : first index of the array)

Maybe this is Fortran syntax. I'm unaware of official IMAS data schema documentation. I'll search for it.

IMAS has actually done a good job at updating their documentation.
Take a look here https://sharepoint.iter.org/my.policy (unfortunately you still need an ITER account to see it)

From the official html documentation of IMAS, all I can find about grid_ggd[:].path is the following:

Path of the grid, including the IDS name, in case of implicit reference to a grid_ggd node described in another IDS. To be filled only if the grid is not described explicitly in this grid_ggd structure. Example syntax: IDS::wall/0/description_ggd(1)/grid_ggd, means that the grid is located in the wall IDS, occurrence 0, with relative path description_ggd(1)/grid_ggd, using Fortran index convention (here : first index of the array) {dynamic}

But I was able to find the PR where this feature was introduced. In particular, the file IDS-path-syntax.md provides complete syntax for idspath. The webpage documentation is slightly outdated as it does not show the utilities documentation for some reason. Following description should follow grid_ggd(:)/path:

Path of the grid, including the IDS name, in case of implicit reference to a grid_ggd node described in another IDS. To be filled only if the grid is not described explicitly in this grid_ggd structure. Example syntax: 'wall:0/description_ggd(1)/grid_ggd', means that the grid is located in the wall IDS, occurrence 0, with ids path 'description_ggd(1)/grid_ggd'. See the link below for more details about IDS paths

The link is to IDS-path-syntax.md file. In this syntax, note that there is no IDS present and occurrence is shown differently.
I'll paraphrase the new syntax here:
<top_ids_name>[:occurrence]</path/to/grid_ggd>
Here:

<top_ids_name> is top most IDS such as wall, radiation, edge_profiles etc.
[:occurrence] parameter is actually optional. Physics Data Model and Access Layer User Guide v1.11  Sec 4.1 says that within a single data entry, IDS can occur multiple times. In storage, each IDS is a separate HDF5 file and data entry is an HDF5 file referring to all other IDSs, thus occurrence technicaly means the HDF5 index of the IDS in the path. I think for IMASDD, each IDS only occurs once, so we can probably ignore this. When not provided, Access Layer software assumes 0th occurrence.
</path/to/grid_ggd> is idspath description which is '/' separated path in the IDS structure. If an array of IDS is present, it's index can be provided using curved brackets.

Example:
If I want to refer to grid_ggd of edge_profiles to store radiation information. Then at dd.radiation.grid_ggd[1].path, I will store the value: edge_profiles/grid_ggd(1).
Note: As far as I understand, since a particular grid_ggd instance out of the array of grid_ggd has this path field (dd.radiation.grid_ggd[1].path in above example), it must be referring to a particular index of grid_ggd in the path as well otherwise it won't really make sense. The example in documentation however misses this detail.

I hope this was helpful. If this feature comes up soon, it will be helpful in synthetic bolometer that I am developing.

How about something like this in IMASDD.jl ?
all__grid_ggd = Union{IMASDD.edge_profiles__grid_ggd, ...}

function Base.getproperty(@nospecialize(ids::all__grid_ggd), field::Symbol)
    if _getproperty(ids, :path)..
        return _getproperty(getfield(top_dd(ids),getproperty(ids, :path)), field)
    else
        return _getproperty(ids, field)
    end
end


Add Legion Expansion support

Ensure the AI can build all Legion units

Current ability on land is somewhere between (AI) platinum and uber level.

Today it's Queller Legion's first victory over Queller vanilla on land, with both set to Uber.

Support for Starcannon implemented. Support now complete, just personalities to go.


Support for async

Need to integrate Rust's async-await support with WinRT's async support via its IAsyncXxx interfaces.

I have a proof-of-concept prototype implementation for winrt-rust in the branch https://github.com/Boddlnagg/winrt-rust/tree/futures-preview ... maybe this helps ;-)

Whoever implements this, make sure its compatible with tokio please.

error[E0277]: the trait bound `std::result::Result<windows::foundation::IAsyncOperation<windows::devices::enumeration::DeviceInformationCollection>, winrt::error::Error>: core::future::future::Future` is not satisfied
  --> src\lib.rs:18:20
   |
18 |     let _devices = DeviceInformation::find_all_async_device_class(DeviceClass::AudioCapture).await;
   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `core::future::future::Future` is not implemented for `std::result::Result<windows::foundation::IAsyncOperation<windows::devices::enumeration::DeviceInformationCollection>, winrt::error::Error>`

@eklipse2k8 there should be a ? before .await operator

@eklipse2k8 Support for .await hasn't been implemented yet.


Website embedding issue

### Tasks

Where do you want to embed the website, i mean on which platform? You can use blocks, plugins, or coding to embed the website. As i embedded my address on one of the website.


fix provide a conf to enable/disable streamload commit on be

When to enable commit on be?
Bypassing FE during commit is good for load performance, especially when doing frequent streamloading.
When to disable commit on be?
The current implementation of the bypass will mess up the statistics, thus the query plan optimizer. So disable it when you encountering any troubles. Such problem will be fixed in future work.
Proposed changes
Issue Number: close #xxx

run buildall

run external


build failures due to boost update to 1.66.0

libmavconn fails with:
| /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/src/udp.cpp:50:5: error: no matching function for call to 'for_each(boost::asio::ip::basic_resolver<boost::asio::ip::udp>::results_type, boost::asio::ip::basic_resolver<boost::asio::ip::udp>::iterator, mavconn::resolve_address_udp(boost::asio::io_service&, size_t, std::__cxx11::string, short unsigned int, boost::asio::ip::udp::endpoint&)::<lambda(const endpoint&)>)'
|     });
|      ^
| In file included from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/c++/7.3.0/algorithm:62:0,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/smart_ptr/shared_ptr.hpp:39,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/shared_ptr.hpp:17,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/date_time/time_clock.hpp:17,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/asio/time_traits.hpp:23,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/asio/basic_deadline_timer.hpp:28,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/asio.hpp:24,
|                  from /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/include/mavconn/udp.h:21,
|                  from /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/src/udp.cpp:22:
| /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/c++/7.3.0/bits/stl_algo.h:3878:5: note: candidate: template<class _IIter, class _Funct> _Funct std::for_each(_IIter, _IIter, _Funct)
|      for_each(_InputIterator __first, _InputIterator __last, _Function __f)
|      ^~~~~~~~
| /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/c++/7.3.0/bits/stl_algo.h:3878:5: note:   template argument deduction/substitution failed:
| /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/src/udp.cpp:50:5: note:   deduced conflicting types for parameter '_IIter' ('boost::asio::ip::basic_resolver_results<boost::asio::ip::udp>' and 'boost::asio::ip::basic_resolver_iterator<boost::asio::ip::udp>')
|     });
|      ^
[...]
| /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/src/tcp.cpp:50:5: error: no matching function for call to 'for_each(boost::asio::ip::basic_resolver<boost::asio::ip::tcp>::results_type, boost::asio::ip::basic_resolver<boost::asio::ip::tcp>::iterator, mavconn::resolve_address_tcp(boost::asio::io_service&, size_t, std::__cxx11::string, short unsigned int, boost::asio::ip::tcp::endpoint&)::<lambda(const endpoint&)>)'
|     });
|      ^
| In file included from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/c++/7.3.0/algorithm:62:0,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/smart_ptr/shared_ptr.hpp:39,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/shared_ptr.hpp:17,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/date_time/time_clock.hpp:17,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/date_time/posix_time/posix_time_types.hpp:10,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/asio/time_traits.hpp:23,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/asio/basic_deadline_timer.hpp:28,
|                  from /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/boost/asio.hpp:24,
|                  from /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/include/mavconn/tcp.h:23,
|                  from /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/src/tcp.cpp:22:
| /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/c++/7.3.0/bits/stl_algo.h:3878:5: note: candidate: template<class _IIter, class _Funct> _Funct std::for_each(_IIter, _IIter, _Funct)
|      for_each(_InputIterator __first, _InputIterator __last, _Function __f)
|      ^~~~~~~~
| /[...]/libmavconn/0.18.7-r0/recipe-sysroot/usr/include/c++/7.3.0/bits/stl_algo.h:3878:5: note:   template argument deduction/substitution failed:
| /[...]/libmavconn/0.18.7-r0/mavros-0.18.7/libmavconn/src/tcp.cpp:50:5: note:   deduced conflicting types for parameter '_IIter' ('boost::asio::ip::basic_resolver_results<boost::asio::ip::tcp>' and 'boost::asio::ip::basic_resolver_iterator<boost::asio::ip::tcp>')
|     });
|      ^
| ninja: build stopped: subcommand failed.
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /[...]/libmavconn/0.18.7-r0/temp/log.do_compile.20867)
ERROR: Task (/[...]/meta-ros/recipes-ros/mavros/libmavconn_0.18.7.bb:do_compile) failed with exit code '1'

socketcan-interface fails with:
| In file included from /[...]/socketcan_interface/include/socketcan_interface/socketcan.h:4:0,
|                  from /[...]/socketcan_interface/src/socketcan_interface_plugin.cpp:2:
| /[...]/socketcan_interface/include/socketcan_interface/asio_base.h:26:5: error: invalid use of template-name 'boost::asio::strand' without an argument list
|      boost::asio::strand strand_;
|      ^~~~~
| /[...]/socketcan_interface/include/socketcan_interface/asio_base.h:26:5: note: class template argument deduction is only available with -std=c++1z or -std=gnu++1z
| In file included from /[...]/recipe-sysroot/usr/include/boost/asio.hpp:123:0,
|                  from /[...]/socketcan_interface/include/socketcan_interface/asio_base.h:6,
|                  from /[...]/socketcan_interface/include/socketcan_interface/socketcan.h:4,
|                  from /[...]/socketcan_interface/src/socketcan_interface_plugin.cpp:2:
| /[...]/socketcan-interface/0.6.8-r0/recipe-sysroot/usr/include/boost/asio/strand.hpp:29:7: note: 'template<class Executor> class boost::asio::strand' declared here
|  class strand
|        ^~~~~~
| In file included from /[...]/socketcan_interface/include/socketcan_interface/socketcan.h:4:0,
|                  from /[...]/socketcan_interface/src/socketcan_interface_plugin.cpp:2:
| /[...]/socketcan_interface/include/socketcan_interface/asio_base.h: In member function 'void can::AsioDriver<Socket>::dispatchFrame(const can::Frame&)':
| /[...]/socketcan_interface/include/socketcan_interface/asio_base.h:34:9: error: 'strand_' was not declared in this scope
|          strand_.post(boost::bind(&FrameDispatcher::dispatch, &frame_dispatcher_, msg)); // copies msg
|          ^~~~~~~
| /home/lukas/work/repositories/openembedded.org/openembedded-core/build/tmp-glibc/work/armv5e-oe-linux-gnueabi/socketcan-interface/0.6.8-r0/ros_canopen-0.6.8/socketcan_interface/include/socketcan_interface/asio_base.h:34:9: note: suggested alternative: 'srand'
|          strand_.post(boost::bind(&FrameDispatcher::dispatch, &frame_dispatcher_, msg)); // copies msg
|          ^~~~~~~
|          srand
| /[...]/socketcan_interface/include/socketcan_interface/asio_base.h: In constructor 'can::AsioDriver<Socket>::AsioDriver()':
| /[...]/socketcan_interface/include/socketcan_interface/asio_base.h:73:7: error: class 'can::AsioDriver<Socket>' does not have any field named 'strand_'
|      : strand_(io_service_), socket_(io_service_)
|        ^~~~~~~

http://git.openembedded.org/openembedded-core/commit/?id=18e94bc08db55afb2d9b9db9a51c6a2d5478c056

Here are the two patches to the upstream repositories:

https://github.com/ros-industrial/ros_canopen/pull/269
https://github.com/mavlink/mavros/pull/953

A pull request to meta-ros with these patches will follow soon.


distrubute system fs.hdfs.impl.disable.cache need to be configurable

in current source fs.hdfs.impl.disable.cache、fs.s3a.impl.disable.cache、fs.oss.impl.disable.cache is hardcode true， and this need to be configurable

@xuzifu666 May I assign this issue to you?

@xuzifu666 May I assign this issue to you?

ok， assign to me plz

@xuzifu666 Has "fs.hdfs.impl.disable.cache" been fixed too?  I still see that this configuration item is set to true directly on line 366.

@xuzifu666 Has "fs.hdfs.impl.disable.cache" been fixed too? I still see that this configuration item is set to true directly on line 366.

@jaogoy had fixed，cc @kangkaisen


where are the files mentioned in the scripts/get_polarity.sh now?

where are the files mentioned in the scripts/get_polarity.sh now?

Hi @cyzhangAThit, the repo they were in is now private. I'll reupload them here soon

Long delay, but all fixed. Data files are now uploaded.


How to start new chat ? Please reply

please describe your issue

Hello
I have done all setup of firebase & created two account on it, but then I
don't know how to start conversations between two account.
Even I search the name of another account but I didn't find it.
Can you please help me out how to add peoples and how to start chat
with them.
Thank you.
On Fri 26 Apr, 2019, 1:10 PM Andrea Leo<EMAIL_ADDRESS>wrote:

please describe your issue
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/chat21/chat21-ionic/issues/49#issuecomment-486960221,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIPUY44DXJSUWPRJ7NPAVGDPSKWYJANCNFSM4HIGRBLQ
.

Hey, please reply & If still, you didn't get my point tell me.

same error here....


PR Accept for Resetting the Keys / Removing the Existing Keys

Hi,
I have started using the module to integrate with our deployment. I am not 100 percent sure but so far from the Observed Behaviour, it seems that once the CL.THROTTLE commands gets executed the Key Entry is made, and subsequent CL.THROTTLE, use the entry to process the rate limit quota.
Working On A PR for the following, but wanted to discuss before hand if I have interpreted this correctly:-
1.Removing a Key Altogether
2.Resetting / Updating a key with new Rate Limit Tuple
Waiting for your response
Thanks
Romit

Hi Romit,

I am not 100 percent sure but so far from the Observed Behaviour, it seems that once the CL.THROTTLE commands gets executed the Key Entry is made, and subsequent CL.THROTTLE, use the entry to process the rate limit quota.

Yes sort of. The library uses a pretty novel algorithm called GCRA. What it ends up storing is a "TAT", or theoretical arrival time. Check out the implementation for full details, but it's pretty easy to see this at work for yourself.
# build
$ cargo build --release

# start Redis
$ redis-server --loadmodule target/release/libredis_cell.dylib

Then from another console:
$ redis-cli

<IP_ADDRESS>:6379> cl.throttle user123 5 5 3600
1) (integer) 0
2) (integer) 6
3) (integer) 5
4) (integer) -1
5) (integer) 720

<IP_ADDRESS>:6379> keys '*'
1) "user123"

<IP_ADDRESS>:6379> get user123
"1559260935732768000"

1.Removing a Key Altogether

Only one value is stored, so it's easy to do with with the built-in DEL:
<IP_ADDRESS>:6379> del user123
(integer) 1

2.Resetting / Updating a key with new Rate Limit Tuple

If the intent here is to change a user's rate, I'd recommend the simpler option of just deleting their key and then start issuing new CL.THROTTLE commands with the new rate.

Thanks a Lot, that makes more sense and is much cleaner and simple.
I tried to Deploy Redis In Master and Slave Topology ( 1 Master and 2 Slaves), with the module.
I was able to execute whopping 40k rps per second on a SINGLE KEY (CL.throttle Invocation)
I was expecting the commands to be synced to the Slave nodes as well, but the Only command that ever synced was the DEL (Delete Key, when TTL Expired), (Used Monitor Command on Slaves to See the Stream of Incoming Events)
Is this by design, that the replication is disabled, or has it been disabled on the Prod Code.
My intent is to use the Slave as a Standby in Separate Fault Domain, since the Layer serves a critical Data Path.
In the above case, as soon as the switchover happens, the CL.THROTTLE, would start hitting the new Master (Slave which got Promoted to Master)
Just want to understand, why we do not sync Keys to the Slaves

Is this by design, that the replication is disabled, or has it been disabled on the Prod Code.

Hey @romitmisra1 ,
The results of CL.THROTTLE should be getting replicated out to replicas. You can see the specific code that causes this here, and the Redis Module API function that's getting invoked here. It tells a cluster to invoke the command as is on replicas with exactly the same args. This code was contributed to the project by a user who was using the library in clustered mode, so I would suspect that it works.
Can you double-check your setup and take a look at your logs on the master and each replica to make sure there's nothing that looks amiss? One failure case that I can think of, for example, would be in the redis-cell plugin was loaded on the master, but not on replicas (I'm not sure exactly what would happen in that case, but there's a decent chance it would result in the same symptoms that you're seeing).
If everything looks fine, if you come up with a basic set of commands to bring up a cluster with a similar configuration to yours, I'll dig in and see if I can find what's not working.

Thanks Brandur, I have already started debugging the code, and will get back with the detailed logs.
Will see if this is a config issue, or some edge case that I triggered, will keep you posted, and thanks for the reply

Sounds good! Thanks.

@romitmisra1: I hope that you are well. Could you give us an update on how this worked out for you?


Buffered access to log output

This is an attempt at implementing the feature proposed in https://github.com/godotengine/godot-proposals/issues/536 as we need this for a project
Added support for buffered log access from game scripts. This can be enabled from the project settings.
The log buffer can be accessed from the Engine singleton, via the get_log_buffer() method. The Engine singleton will also emit a signal when a new message is logged.
If messages are not handled a warning will be logged when the buffer is full (and some log messages in the buffer will be deleted).
Bugsquad edit: This closes https://github.com/godotengine/godot-proposals/issues/536.

Would it be possible to allow accessing stdout and stderr independently using separate methods?

Would it be possible to allow accessing stdout and stderr independently using separate methods? Either way, I think this is a good start already

I believe that by overriding
virtual void log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, ErrorType p_type = ERR_ERROR);
we could achieve something like that. The question is then just how we want to structure the data we want to access (Some struct with ErrorType, file name, function, line nr, and message?)

Error/Warning messages are now handled separately. The error/warning buffer contains a small dictionary for each error message containing all the message information (type, message, line nr and so on).
New signal and buffer access method for the error/warning buffer has been added to the Engine singleton

My take on this is that we already have a logger class that allows implementing custom loggers. It's probably not so accessible to this and, given what this project requires is quite corner case, I think it may be best to instead make it better to just implement a custom logger rather than a new engine feature.

I explained in the proposal, but with the new extension system it should now be possible to add custom loggers, we just need to expose the interface to the binder.

Thanks for your work on this, but as mentioned above, this implementation seems too specific to be in core - we'd rather expose the facilities needed to create and add custom loggers to GDScript. :)

As mentioned by reduz, soon this will hopefully be easier with the new extension system.

It sounds like this will indeed be easier, and i am excited about the new system. Will the extension system be backported to 3.x.x however?
Otherwise could i target the 3.x.x branch with this PR instead? Or is there a better way to add a custom logger in Godot 3.x.x?

, given what this project requires is quite corner case, I think it may be best to instead make it better to just implement a custom logger rather than a new engine feature.

With the wide spread of services such as Steam i would argue that being able to utilize their logging API's is not a corner case.
I'm curious as to how this would otherwise be achieved in Godot 3?

Will the extension system be backported to 3.x.x however?

The extension system is backwards-incompatible and relies on core changes that will only be in 4.0. Therefore, it can't be backported to 3.x.


IronPython.Compiler.Ast.PythonVariable is not public type

I have an application that makes extensive use of PythonAst to create auto-completion lists in code editor and I have a lot of trouble because PythonVariable type is not public.
For instance, I would like to retrieve the list of class variables from ClassDefinition.Body.Variables but this is a type of Dictionary<string, PythonVariable> where PythonVariable is inaccessible due to its protection level.  I know I could fork IronPython and make this change myself but I am not too keen creating a private IronPython version to distribute with my application.
Therefore, I would really appreciate if you could make aforementioned type public. unless there is a very good reason to keep it hidden.
Thank you.

You could make a pull request to see what changes are required. Further discussions could be placed there.

This is fixed now via #573


European hydrothermal plumes simulation

This PR starts an example for modeling hydrothermal plumes on a very deep ocean.
Very preliminary: at the very least we'll want #20 and maybe #191 before taking these simulations seriously, but this should be a good start.

Tides are weak because the ocean is so deep I think

Ah I see. But if tidal forces are much stronger on Europa (compared to Earth) then they might matter? I don't have the numbers though.
I noticed that after ~10,000 Europan days (354 million Earth seconds) only the bottom ~10% (10 km) of the temperature field were affected by the heating flux. There are waves propagating so the vertical velocity field is non-zero almost everywhere.
Not sure if this is how things go on Europa (i.e. super long simulations will be the norm) or if we're missing key physics.

Superseded by PR #304.


cmd/zoekt-index: check for errors while walking the dir

calling zoekt-index with a directory that doesn't exist ends in a panic:
$ zoekt-index /t/a/a
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x6e47c6]
goroutine 8 [running]:
main.(*fileAggregator).add(0xc4201143a0, 0x7ffce775677c, 0x6, 0x0, 0x0, 0x94f880, 0xc4201424b0, 0xc4201424b0, 0xc4201445b0)
    /home/vincent/dev/go/src/github.com/google/zoekt/cmd/zoekt-index/main.go:36 +0x26
main.(*fileAggregator).(main.add)-fm(0x7ffce775677c, 0x6, 0x0, 0x0, 0x94f880, 0xc4201424b0, 0x6, 0xc42003dfa0)
    /home/vincent/dev/go/src/github.com/google/zoekt/cmd/zoekt-index/main.go:117 +0x69
path/filepath.Walk(0x7ffce775677c, 0x6, 0xc42003df90, 0x0, 0x0)
    /usr/local/go/src/path/filepath/path.go:401 +0x76
main.indexArg.func1(0x7ffce775677c, 0x6, 0xc4201143a0, 0xc42006e240)
    /home/vincent/dev/go/src/github.com/google/zoekt/cmd/zoekt-index/main.go:117 +0x59
created by main.indexArg
    /home/vincent/dev/go/src/github.com/google/zoekt/cmd/zoekt-index/main.go:116 +0x1b5

we can fix this by checking the error in the walk function and now it ends with the error logged:
$ zoekt-index /t/a/a
2018/01/26 16:19:34 lstat /t/a/a: no such file or directory

This change has the additional effect that any error in a subdirectory or file will exit the application, I don't know if that's reasonable for you.

ha, I'm having the same problem, good to see its being addressed +1:


Rest post doesnt work

Can you give more details?  This is enough to help you figure out the problem


Q: Skip formatting on module doc comment

Hi :wave:
I'm looking for clarification here, as I couldn't find anything in previous issues.
Is it possible to disable formatting of inner module doc comments but keep formatting for the rest of the module?
For example:
//! Some long poetic comment waxing lyrical on the merits of this module, over long lines.

// Leave the above alone ^

// But keep formatting for everything else in the module
struct Foo { /* ... */ }

I've tried the obvious solution, namely trying to add the attribute #[rustfmt::skip] to the comment, but rust doesn't like it very much. Am I missing something?
Thanks and enjoy the holidays!

Thanks for the question, but no I don't think there's a way to get that selective with comments. The attributes aren't applied to other attributes/comments/etc. so you can't use the attribute to apply to a specific comment.
The only possible, albeit clunky, approach I could think of would be to leverage the file-lines feature to try to exclude that particular line (or lines depending on what the comment really looks like)


fix llvm2mir, added lost gens_num argument

Thank you for the pull request.  I've merged it.
I did not work on llvm2mir for long time.  It is only half baked even for LLVM IR generated from C (it does not support C call ABI fully and auto-vectorized code).  There are also bugs (at least I know about lost copy problem out of SSA).
In any case llvm2mir will be absent in the 1st release of MIR.


An inquiry when using multiple compute nodes

Hi, I am interested in training using your BNS-GCN in a distributed environment. However, I have encountered some difficulties running the setup with just the reddit_multi_node.sh script.
Could I get some guidance on how to properly configure the environment for distributed experiments?
Thanks for your help.

Hi, thank you for your interest to BNS-GCN. There are many issues that can cause the failure of launching multi-node training. Could you please share me with the error message? Simply launching reddit_multi_node.sh should not work as you need to specify some arguments for distributed training by following this.
If you are asking how to setup a distributed training environment, you have find the official PyTorch tutorial helpful.
Thanks.

@qhtjrmin  I'm going to close this issue due to its inactivity. Please feel free to reopen it if the above response is not sufficient. Thanks.


build ffmpeg for fips with openssl

Checklist before submitting

[x] Did you read the contributor guide?
[ ] Did you update any affected documentation?
[ ] Did you write any tests to validate this change?

Description
This PR adds a patch to build ffmpeg with openssl for fips support. And also skips a test in tokenizers as it failed on fips enabled system due to call to hashlib.md5().
Review process to land

All tests and other checks must succeed.
At least one maintainer must review and approve.
If any  maintainer requests changes, they must be addressed.

Validation worked locally, so  merging the PR.


Automated E2E tests for Prometheus

Planning to implement automated E2E tests for prometheus through litmus API.
All the test cases to be implemented will be added to this issue.

Not in current scope of the project


docs: add FAQ section and answer secondary controller question

fixes: https://github.com/zwave-js/node-zwave-js/issues/5909

@zwave-js-bot automerge


Code refactoring from Fosdem to Fossasia

I would like to work on code refactoring from Fosdem to Fossaisa. This will also help me in understanding the code flow of the app, thus it will become easy for me to implement new features.

Yes, great. Please feel free to work on it. A question is, how could we merge improvements from the original app in future? Or should we just move forward and develop a separate code base completely to keep it easier for us?

I might be wrong here, it will become difficult with time to merge code from the original repo. as we might end up implementing our own improvements. Even refactoring will create a lot of merge conflicts. So according to me the best options is maintain a separate codebase. And porting any major improvement manually from the original repo. to fossasia repo.

Yeah @mariobehling I also agree with @batraabhishek, It will be much easier to maintain a separate codebase. Maybe in separate branches.

That is good idea. Let us create separate branch, work on it, and when it will be working properly - eventually merge it.

Yeah, good idea. Feel free to start working on it and merging code here.

Sure. Thanks


[RFC] Allow component slot override through theme

Problem
How does the theme default props work
Users can define default props for there components using the theme as follow:
const theme = createTheme({
  components: {
    MuiDatePicker: {
      defaultProps: {
        closeOnSelect: true,
      },
    },
  },
});

The props passed to the theme, will then be merged with the props passed to the component with a shallow merge.
https://github.com/mui/material-ui/blob/50e2b942cb7602fdbb69df7d4285fd4de9747f71/packages/mui-utils/src/resolveProps.ts#L13-L17
What is the problem with the slots ?
The way the merge currently works, makes it very difficult, or even impossible for users to override a slot component (or some slot component props) directly from the theme.
For instance, if a user wants to customize the left and right arrow icons on all the date pickers of its application, he will not be able to use the theme.
Since the merge is a shallow merge, the props.components passed to DatePicker overrides the one stored in the theme default props instead of being merged with it.
Example with the props: working
Example with the theme: not working
When is this problem blocking ?
I did not find any actual use case on the core and I don't think users should always override the slots through the theme.
But on bigger components like the one provided by X, the ability of overriding some slot once and for all can make some customization a lot easier.
Here are a few example I have in mind:
DataGrid + Joy
@siriwatknp did a POC during our retreat (https://github.com/mui/mui-x/pull/5360/files).
The behavior could be even better if users could just import a method to populate the theme with joy slots.
This could look something like:
import { addJoyDataGrid } from '@mui/x-data-grid/joy';

const theme = createTheme({ /** Some theme customization not related to the data grid **/ });
const themeWithJoyDataGrid = addJoyDataGrid(theme);

// Each data grid usage does not have to care about the theme
const UserList = () => {
  const users = useUsers();

  return (
    <DataGrid {...users} />
  );
};

export default function App() {
  return (
    <ThemeProvider theme={themeWithJoyDataGrid}>
      <UserList />
    </ThemeProvider>
  );
}

Custom DatePicker with custom input
The current version of the pickers requires a renderInput prop.
This prop can be defined in the theme to avoid defining it on each picker (with @ts-ignore to avoid having TS complain that the prop is required)
Working example
In v6, we are discussing replacing this prop with a component slot to be coherent with the other component customization.
But it would prevent users from defining it in the theme, which would be a clean solution I would like to encourage.
Proposal
For the components prop, increase the depth of the merge of one.
--- a/packages/mui-utils/src/resolveProps.ts
+++ b/packages/mui-utils/src/resolveProps.ts
@@ -4,14 +4,20 @@
  * @param {object} props
  * @returns {object} resolved props
  */
-export default function resolveProps<T extends { className?: string } & Record<string, unknown>>(
-  defaultProps: T,
-  props: T,
-) {
+export default function resolveProps<
+  T extends { className?: string; components?: Record<string, unknown> } & Record<string, unknown>,
+>(defaultProps: T, props: T) {
   const output = { ...props };

   Object.keys(defaultProps).forEach((propName: keyof T) => {
-    if (output[propName] === undefined) {
+    if (propName === 'components') {
+      if (defaultProps[propName] !== undefined) {
+        output[propName] =
+          output[propName] === undefined
+            ? defaultProps[propName]
+            : resolveProps(defaultProps[propName] as any, output[propName]);
+      }
+    } else if (output[propName] === undefined) {
       output[propName] = defaultProps[propName];
     }
   });

Advantages

Users will be able to define the component slot on the theme
We will be able to provide methods to enrich the theme and customize our X components for Joy

Disadvantages

It adds some additional complexity
How can user override there default props on a specific component to fallback on the built-in default value ?

Follow up
I focused this RFC on the components prop, but the same can be discussed for the componentsProps prop.

In general, this makes sense to me. We can do a POC with Joy UI in the next quarter together with Data Grid integration.

Would you consider it a breaking change ? Technically it's a behavior change but I don't know who would currently use the theme to define components and expect the current behavior.

Would you consider it a breaking change ?

I don't think so. If my understanding is correct, the change is basically merging components prop from the theme and on the instance together, right?

Technically it's a behavior change but I don't know who would currently use the theme to define components and expect the current behavior.

Yeah, I feel that it will benefit the X components more than in general usage. I agree with the proposal that the components should be merged. It is just a matter of when we should create a PR, may be let's wait for @mnajdova's opinion first.

the change is basically merging components prop from the theme and on the instance together, right?

Yes

Agree with the proposal. I would generally consider this as a bug fix, not a breaking change. I would assume this is what people would expect, but I also think this is not widely used so far, so it may even go unnoticed.

A PR was opened for it in #35088


sh: twitterscraper: command not found

I did install it with pip in centos,but why can't commands be found?Please help. Any help would be appreciated.

I am not familiar with CentOS. Can you also try to install it by first cloning the repository and then installing it with python setup.py install