[$1000] When initiating chat with new user This is the beginning... is not displayed in LHN as with group message

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Go to the search
Search new user after that check on side panel
Now check that on group chat
Create n new group chat

Expected Result:
This message should be displayed below the username "You can also use the + button below to send or request money!"
Actual Result:
Before sending any message to user, email address showing below the username
Workaround:
unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.2.81-1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/224175068-d750bbb4-b0e6-4ba4-9339-e7e0caeef5ab.mp4
https://user-images.githubusercontent.com/43996225/224175114-148dee29-8dbb-4b43-adf1-5d1cdeb77fc2.mp4
Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1678200365765579
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01fca09f95526ac422
Upwork Job ID:<PHONE_NUMBER>103667200
Last Price Increase: 2023-03-22

Triggered auto assignment to @kevinksullivan (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Bug0 Triage Checklist (Main S/O)

[ ] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
[ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)

If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead

[ ] This bug is reproducible using the reproduction steps in the OP. S/O

If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
If the reproduction steps aren't clear and you determine the correct steps, please update the OP.

[ ] This issue is filled out as thoroughly and clearly as possible

Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.

[ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Triggered auto assignment to @AndrewGable (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Job added to Upwork: https://www.upwork.com/jobs/~01fca09f95526ac422

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External)

Triggered auto assignment to @dangrous (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Proposal
Please re-state the problem that we are trying to solve in this issue.
The LHN subtitle of 1:1 chat only shows email address of the user instead of 'This is the beginning of your chat...' which is not the same with a group chat.
What is the root cause of that problem?
We only show 'This is the beginning of your chat...' on a chat with multiple participants.
What changes do you think we should make in order to solve the problem?

I think this is expected. Looking at the code, only chat with multiple participants that has the text 'This is the beginning of your chat history with {user1}, {user2}'. As you can see, it lists all user in that group (even though we can't see it), but in a 1:1 chat, there is no other people beside that user itself. So, I'm guessing that's why only for group we have the text 'This is the beginning of your chat history with {user1}, {user2}'. If we still want to show 'This is the beginning of your chat...' for 1:1 chat, we can simply remove the multiple participants validation here.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L270-L273

Proposal
Please re-state the problem that we are trying to solve in this issue.
The subtitle below the LHN shows the email address of the user instead of the desired message.
What is the root cause of that problem?
The root problem is with the incorrect or no assignment of the variable lastMessageText in the case of 1:1 chats. As you can see from the following line.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L283
We default the alternate text to personalDetail.login when the lastNessageText variable is not defined. And this variable stays undefined or empty because we only set the value of the variable in the following cases.
It is an archived room or policy expense chat.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L258
The chat has multiple users
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L270
What changes do you think we should make in order to solve the problem?
ATTENTION: Probable Typo in the issue's expected results section.
I think there is a typo in the expected results section. The title says that we should display the 'This is the beginning text....', however, the expected results say that we should show  "You can also use the + button below to send or request money!" as a subtitle. Hence I am going to propose a solution for both cases.
Setting the subtitle to This is the beginning .... message.
In this case, we can remove the condition of multiple users from assignments in the following if condition. This way we will let our single chats to qualify to have the same subtitle.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L270
Setting the subtitle to  "You can also use the + button below to send or request money!"
In this case, we can add the personalDetail.login with our message in the following line.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L283

📣 @Taimoor0217! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.

Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Contributor details
Your Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/freelancers/~01093e6d7144f50f6b

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

Proposal
I identified that issue
Please re-state the problem that we are trying to solve in this issue.
On LHN displayed email address/username of the user instead of last App message
What is the root cause of that problem?
we are not showing last message "This is the beginning of your chat.." or "you can also use + button" on 1:1 chat
What changes do you think we should make in order to solve the problem?
we are not showing this message on 1:1 chat 'This is the beginning of your chat..' on 1:1 chat.
but on group chat we are showing this message,
so we want to show 'This is the beginning of your chat..' this message then we need to remove hasMultipleParticipants from the if condition
her is the code:
Line 269: if (!lastMessageText)//here i removed hasMultipleParticipants from the condition
{
---
result.alternateText = lastMessageText || Str.removeSMSDomain(personalDetail.login);
}
Result:

but if we want to show this message the 'you can also use + button' then here is the code:
Line 269:  if (!lastMessageText) {
// Here we get the beginning of chat history message and append the display name for each user, adding pronouns if there are any.
// We also add a fullstop after the final name, the word "and" before the final name and commas between all previous names.
let useBeginning = 'reportActionsView.beginningOfChatHistory';
let usePlus  = 'reportActionsView.usePlusButton';
let beginningOrPlus = hasMultipleParticipants ? useBeginning:usePlus;//if hasMultipleParticipants true user 'beginning message' if false user 'Plus Button message'
lastMessageText = Localize.translate(preferredLocale, beginningOrPlus)//and using beginningOrPlus here
+ _.map(displayNamesWithTooltips, ({displayName, pronouns}, index) => {
const formattedText = _.isEmpty(pronouns) ? displayName : ${displayName} (${pronouns});
if (index === displayNamesWithTooltips.length - 1) { return ${formattedText}.; }
if (index === displayNamesWithTooltips.length - 2) { return ${formattedText} ${Localize.translate(preferredLocale, 'common.and')}; }
if (index < displayNamesWithTooltips.length - 2) { return ${formattedText},; }
}).join(' ');
}
////Here I have removed the username from the last message.
const index = lastMessageText.indexOf('!');
if (index !== -1) {
lastMessageText = lastMessageText.substring(0, index + 1);
}
result.alternateText = lastMessageText || Str.removeSMSDomain(personalDetail.login);
}
Result:

📣 @ayazhussain79! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.

Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Contributor details
Expensify account email<EMAIL_ADDRESS>Upwork Profile Link: https://www.upwork.com/fl/~018a62c1e70a3fab40

So clarifying - I think we need to figure out the expected behavior here:

Why do we differentiate between chats with one person and group chats? I don't really see why we would but I will check in Slack and see if anyone has a good answer. If not, we should definitely consolidate and remove that hasMultipleParticipants check.
Do we want to show the "This is the beginning..." line (as with group chats) or the "You can also..." line (as in the issue description)? @kavimuru can you confirm where you got that spec?

I'll follow up on Slack tomorrow, haven't had any reaction yet.

@dangrous any updates on this?
Thanks :)

Slowly but surely! Sorry, last week was a bit hectic for a lot of us. Conversation continues... https://expensify.slack.com/archives/C01GTK53T8Q/p1679337013344439?thread_ts=1678735336.127209&cid=C01GTK53T8Q

Okay, answers! Here's what we're going for:

DM with one person - This is the beginning of your chat with ...
DM with group - This is the beginning of your chat with …
Room - No activity yet

We will need new translations for these, which I will put in here when they exist.
We may need new proposals to account for the Room adjustment, since previously we were only dealing with the DM side of things.

Proposal [Updated with the new Room Requirement]
Please re-state the problem that we are trying to solve in this issue.
The subtitle below the username  in LHN shows the email address of the user instead of the desired message for 1:1 chats
What is the root cause of that problem?
The root problem is with the incorrect or no assignment of the variable lastMessageText in the case of 1:1 chats. As you can see from the following line.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L283
We default the alternate text to personalDetail.login when the lastNessageText variable is not defined. And this variable stays undefined or empty because we only set the value of the variable in the following cases.
It is an archived room or policy expense chat.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L258
The chat has multiple users
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L270
What changes do you think we should make in order to solve the problem?
1- Setting the subtitle to This is the beginning .... message.
In this case, we can remove the condition of multiple users from assignments in the following if condition. This way we will let our single chats to qualify to have the same subtitle.
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L270
Proof of Concept

2- No activity yet in chat rooms.
As we can see in  the follwoing line
https://github.com/Expensify/App/blob/b69b5f3f31d3054dd9eadb1a284d5efb490daf15/src/libs/SidebarUtils.js#L240
The subtitle is created by calling a method called ``getChatRoomSubtitle`

Updated proposal

@dangrous @kevinksullivan @thesahindia this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

📣 @bernhardoj You have been assigned to this job by @dangrous!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻
Keep in mind: Code of Conduct | Contributing 📖

Based on the contributing guide, we should edit the original proposal instead.
Oh! Never mind then. I feel like that guidance has changed recently, and I am clearly not up to date. Sorry about that!

PR is ready for review.
cc: @thesahindia

@dangrous I guess the approved/merged solution introduces a new issue where the "No activity yet" text is shown for the archived chats, however, the chat unavailable message should be shown. This is introduced because we are completely ignoring the initial subtitle from the getPolicyName method as mentioned in my proposal above https://github.com/Expensify/App/issues/15799#issuecomment-1479833574. If the team decides on creating a separate bug for this fix, I would like to take it up.
Thanks :)

the chat unavailable message should be shown

To be fair, that's not an issue caused by the merged PR. Before the PR, we will just show the workspace name if it's an archived room. There is no chat unavailable message.

Hm I'm not seeing that on dev, though it does seem like I should...

Do you mind sharing reproduction steps so I can confirm?
If it does show up, I think it's not quite a regression since neither the old or new behavior makes sense haha (this just made it a little more noticeable)... It should presumably show the last chat as normal, or possible a "archived" message? But definitely would be a good bug to fix if it exists and we can create a new issue!

@bernhardoj apologies for the misunderstanding. I might be incorrect, but to my understanding, we still showed the chat unavailable message when there is not activity in a room and it has been archived.
@dangrous I am talking about the scenario, where there is no last message in the chat and then it is archived. I guess in that scenario, it might be better to show a different message than no activity? Maybe the chat unavailable message?
archived room with the last message

archived without last message

Ohh got it. I think that's fine; it's pretty clear what it means. Thanks for checking on it though!

This didn't get auto posted for some reason, but this was deployed to production on 3/29, so we should handle payment on 4/5 cc @kevinksullivan
We also need to fill out the checklist:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@thesahindia / @dangrous] The PR that introduced the bug has been identified. Link to the PR:
[@thesahindia / @dangrous] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@thesahindia / @dangrous] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@kevinksullivan] Determine if we should create a regression test for this bug.
[@thesahindia] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

Offers sent to @thesahindia and @bernhardoj !

@kevinksullivan I identified that issue

Current assignee @kevinksullivan is eligible for the NewFeature assigner, not assigning anyone new.

Looks good!

Paid + bonus to @bernhardoj .
@thesahindia let me know when you've accepted the new job I sent over! Sorry about the last one.
@ayazhussain79 sent an offer for reporting. Let me know when you accept!

@kevinksullivan I haven't receive the bonus, yet.

@kevinksullivan offer accepted

@bernhardoj hm it says paid in upwork? You still didn't receive it?

Thank you

Paid + bonus to @bernhardoj

@kevinksullivan Yes, I have received the initial payment. I thought we are eligible for the 50% bonus based on your previous comment, but I just checked that the PR is merged within 4 days 😆.

Ah, I forget about that. Thanks for correcting it!

Ah, sorry for the confusion @bernhardoj . I just sent you a bonus and paid @thesahindia , so this is all set!


ContactsClientAPI.ListComplete returns an unmarshal error

Hi,
We are using the sdk to retrieve security contacts and we are hitting an un-marshal error

import path of package in question: "github.com/Azure/azure-sdk-for-go/services/preview/security/mgmt/v3.0/security/securityapi"
SDK version:

❯ go list -m github.com/Azure/azure-sdk-for-go
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible

go version go1.23.3 darwin/arm64

What happened?
ContactsClientAPI.ListComplete return an unmarshal error:

security.ContactsClient#List: Failure responding to request: StatusCode=200 -- Original Error: Error occurred unmarshalling JSON - Error = 'json: cannot unmarshal array into Go value of type security.ContactList'

What did you expect or want to happen?
Receive the contacts list ))

How can we reproduce it?
Call ContactsClientAPI.ListComplete

Thanks!

This is from the legacy SDK which is no longer supported (all packages under github.com/Azure/azure-sdk-for-go/services are legacy packages).
The latest security client SDK can be found here. Can you please migrate and see if it resolves your issue?
Please see the migration guide for common questions/answers on migration.

thanks for the quick reply, will let you know how it goes after migration!

@jliusan please follow up after customer's migration.

@tadelesh @jliusan migrated to the new API and we are still hitting an unmarshal error:
unmarshalling type *armsecurity.ContactList: unmarshalling type *armsecurity.ContactList: json: cannot unmarshal array into Go value of type map[string]json.RawMessage

@amass01 could you turn on logging by setting environment variable AZURE_SDK_GO_LOGGING to all and configure policy.LogOption to print the body of this call? Please help to show the detail  info in the raw response.
https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/new-version-guideline.md#logging

[Dec 23 16:07:59.417325] Response: ==> REQUEST/RESPONSE (Try=1/2.951570625s, OpTime=2.951620584s) -- RESPONSE RECEIVED
   GET https://management.azure.com/subscriptions/XXX/providers/Microsoft.Security/securityContacts?api-version=2020-01-01-preview
   Accept: application/json
   Authorization: REDACTED
   User-Agent: azsdk-go-armsecurity/v0.12.0 (go1.23.3; darwin)
   --------------------------------------------------------------------------------
   RESPONSE Status: 200 OK
   Api-Supported-Versions: REDACTED
   Cache-Control: no-cache
   Content-Length: 456
   Content-Type: application/json; charset=utf-8
   Date: Mon, 23 Dec 2024 14:07:59 GMT
   Expires: -1
   Pragma: no-cache
   Strict-Transport-Security: REDACTED
   X-Cache: REDACTED
   X-Content-Type-Options: REDACTED
   X-Ms-Correlation-Request-Id: REDACTED
   X-Ms-Ratelimit-Remaining-Subscription-Resource-Requests: REDACTED
   X-Ms-Request-Id: 94fd56ac-71f6-4062-b858-432cb88e8c23
   X-Ms-Routing-Request-Id: REDACTED
   X-Msedge-Ref: REDACTED
   --------------------------------------------------------------------------------
[{"properties":{"alertNotifications":{"state":"On","minimalSeverity":"High"},"notificationsByRole":{"state":"On","roles":["AccountAdmin","ServiceAdmin"]},"emails":"XXX","phone":"XXXXX"},"id":"XXXXX","name":"default","type":"Microsoft.Security/securityContacts","etag":"\"XXXXX\"","location":"West Europe"}]
   --------------------------------------------------------------------------------

[Dec 23 16:07:59.417378] Retry: response 200
[Dec 23 16:07:59.417411] Retry: exit due to non-retriable status code

@amass01 please upgrade to the latest version<EMAIL_ADDRESS>

that worked, thank u!!!


delete habits

:warning: Is your feature request related to a problem? Please describe.
I would like to remove a habit, which is no longer relevant, but cannot find that Option.
:bulb: Describe the solution you'd like
A delete button in the edit menu of a habit.
:raising_hand: Do you want to develop this feature yourself?

[ ] Yes
[x] No

additional
make protocol items removable as well.

Deleting items is done by swiping them right.
This is something that could be shown in a small tutorial (#34).

You may check v3.0.0 and let me know what you think about the tutorial.


Feature/Question/Bug: Disabling default validations

The Problem
RRF perform default validations, but it's not possible to disable them.
The typeMismatch is triggered on a type="email", but if you don't want to display this to the user, do server side validations or provide you own email validation logic, this is inconvenient.
Steps to Reproduce
Type an invalid email in the form
Expected Behavior
The typeMismatch error should not be triggered
Actual Behavior
The typeMismatch is triggered
Reproducible Code Example
CodePen: https://codepen.io/mikkelwf/pen/owNJaO

So this is an interesting case because even with <form novalidate> and/or <input formnovalidate /> in HTML5 constraint validation, the input will still validate; i.e., .willValidate === true. This is per the spec - despite novalidate and/or formnovalidate the control is not barred from constraint validation.
To address your issue, I added some careful (and small) logic for handling noValidate and formNoValidate:
Form noValidate:

If noValidate={true}, then the <Form> will submit even if the form is invalid. This is in line with the spec, and is useful when you want to liberally allow the user to submit a form but also make the user aware of any validation problems.
This does not preclude validation errors from showing. They will still show, but they'll essentially be treated as warnings, not errors.
The noValidate attribute will still be passed on to the native <form>.

Control formNoValidate

If formNoValidate={true} on the <Control>, then HTML5 validity will not affect the field's validity.
No checks will be run to sync the HTML5 validity state of the control with the field validity state controlled by RRF.
This will allow you to prevent error messages from showing for HTML5-specific validators, and allow your <Form> to prevent submission if any of the inputs is invalid for your own custom validators.

// noValidate on Form

// handleSubmit will always be called upon submit
<Form model="user" noValidate onSubmit={handleSubmit}>
  <Control.input type="email" model=".name" />
  <Errors model=".name" messages={{
    typeMismatch: 'Email invalid, but you can still submit'
  }} />
</Form>

// formNoValidate on Control

// handleSubmit will be called if control is valid per custom validators,
// not per HTML5 constraint validation
<Form model="user" onSubmit={handleSubmit}>
  <Control.input
    formNoValidate
    type="email"
    model=".name"
    validators={{isEmail}}
  />
  <Errors model=".name" messages={{
    typeMismatch: 'You will never see this error message',
    isEmail: 'You might see this, and handleSubmit will not be called'
  }} />
</Form>

// noValidate on Form and formNoValidate on Control

// handleSubmit will always be called
<Form model="user" noValidate onSubmit={handleSubmit}>
  <Control.input
    formNoValidate
    type="email"
    model=".name"
    validators={{isEmail}}
  />
  <Errors model=".name" messages={{
    typeMismatch: 'You will never see this error message',
    isEmail: 'You might see this, but handleSubmit will still be called'
  }} />
</Form>

Thanks! Amazing!
Looking forward to the next release.. :)
Btw. that really good answer/description deserves a place in the documentation, at least under the FAQ..

Btw. that really good answer/description deserves a place in the documentation, at least under the FAQ..

Good call!

I tried to fork the changes, and can confirm it now works as expected.. SUPER NICE..!
Any ETA on a new release..?

Probably today or tomorrow at the latest. There's a few more fixes I want to get in.

super.. i'm running on my own fork right now, so no pressure.. :)
again, super nice with a working fix..! ⭐

Hi @davidkpiano,
I've just been bitten by the change made regarding noValidate. I think this is a breaking change for a 'dot' release.
I had noValidate on all my forms so that the HTML5 error messages weren't displayed as I was taking care of validation and error messages myself.
The upgrade to 1.12.1 has caused all by forms to be submittable when invalid.
I personally think this change should be reverted, or at least the property used to turn off validation should NOT be noValidate.
As a side note, I tried to add formNoValidate to my controls, but the HTML 5 error popup is still showing when I submit my empty and invalid form.
Peter

@peterox The behavior seems correct -- I don't believe this is a breaking change. That is, if you use noValidate on your form, it means that it can be submitted according to the HTML5 spec.

I also have problems with this update. What I need is to onSubmit to be called only when form is valid according to validators rules, but I don't want to show HTML5 messages. Form noValidate will always submit the form, and Input formNoValidate will still show HTML5 error popup. So it looks like there is no way to get what I want for example for <input type="email" />, but I guess that this is quite common usecase, unless it is possible somehow?

One of ideas would be to add new prop to Form, for example onValidSubmit. This would be in sync with HTML5 spec, because onSubmit would work as in specs, and this additional callback would be good combination with noValidate.

@klis87 I like this idea:

One of ideas would be to add new prop to Form, for example onValidSubmit. This would be in sync with HTML5 spec, because onSubmit would work as in specs, and this additional callback would be good combination with noValidate.

@peterox what do you think of the above? The behavior would be that:

with noValidate, onSubmit will always be called (this is supposed to happen, according to the spec)
with or without noValidate, onValidSubmitwill never be called unless the form is 100% valid.

Would that fix your concerns?

@davidkpiano that would work for me.
Though I still think this is a breaking change so should be communicated as such. i.e. v1.13.0 at least
Here's why.
Using v1.12.0 of react-redux-forms with noValidate on my form, my forms were properly validating using my supplied validators without any of the pesky HTML5 validation popups. I am using react-toolbox form components so adding the HTML5 attributes to the inputs was necessary for them to be displayed correctly.
I did an npm update which updated to 1.12.1.
My forms will now submit when invalid.
If I am in this boat then I believe many other people would also be.

Thanks @davidkpiano. Keep up the awesome work.

@peterox Actually, I found a better solution, that is much more idiomatic (that is, it doesn't require a new magical prop for React-Redux-Form).
If you want to hide native HTML5 validation errors for a form that should still consider the validity before submitting, do not use noValidate - it does not mean what you think it means.
Instead, use the native onInvalid event handler to prevent the message from showing up:
<Control.text
  model="user.email"
  type="email"
  onInvalid={e => e.preventDefault()}
/>

I'll add this to the FAQs.

Hi @davidkpiano . I tried your idea but this is still not a workable fix.
With the onInvalid handler as above, and with the noValidate attribute removed,  the HTML5 error messages don't pop up
BUT...
when I hit submit on my form that has invalid fields, my error messages used to be shown. i.e. all fields were validated.
Now, with the above handler added, when I click submit nothing happens. The fields do not show up as in error (and the form does not get submitted).
Peter

@peterox I can't replicate this. The below code works perfectly fine:
<Form model="user">
  <Control.text
    model=".email"
    type="email"
    onInvalid={e => e.preventDefault()}
  />
  <Errors
    model=".email"
    messages={{ typeMismatch: 'that is not a valid email' }}
  />
</Form>

Maybe I left off one piece of the puzzle.
I have showErrors set to 'touched'. So the initial error messages (like
required) are not shown when the form is displayed. Prior to 1.12.1 when
you clicked the submit button all fields were validated and all error
messages displayed.
With 1.12.1 and the onInvalid handler this doesn't happen.
Looking at the code validation happens on submit. My guess is that the
native browser code never fires submit when an invalid field is found.
Peter
On Mon., 19 Jun. 2017, 6:34 am David Khourshid<EMAIL_ADDRESS>wrote:

@peterox https://github.com/peterox I can't replicate this. The below
code works perfectly fine:

type="email"
onInvalid={e => e.preventDefault()}

/>
<Errors
model=".email"
messages={{ typeMismatch: 'that is not a valid email' }}
/>

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/davidkpiano/react-redux-form/issues/823#issuecomment-309301188,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAxGF8QlQMvF55ULEBfhez2tlFkLxSa2ks5sFYnbgaJpZM4NvUVZ
.

@peterox Interesting, can you please open up a separate issue about this? This is more a use-case that hasn't really been explored rather than a bug, but I'm keen on fixing it.

@davidkpiano I have the same issue like @peterox and I will say it here as I really think this is a bug.
I have following components:
import React from 'react';
import { Control } from 'react-redux-form';

import FormGroup from './FormGroup';

const isValid = ({ fieldValue }) => fieldValue.valid || (!fieldValue.touched && !fieldValue.asyncKeys);

const Input = props => (
  <Control
    {...props}
    component={FormGroup}
    mapProps={{ valid: isValid }}
  />
);

export default Input;

import React from 'react';
import { FormControl, FormGroup as BootstrapFormGroup, ControlLabel } from 'react-bootstrap';
import { Errors } from 'react-redux-form';

import ErrorMessages from './ErrorMessages';

const show = field => field.touched || field.asyncKeys;
const onInvalid = e => e.preventDefault();

const FormGroup = ({ valid, label, messages, ...rest }) => (
  <BootstrapFormGroup validationState={valid ? null : 'error'}>
    <ControlLabel>{label}</ControlLabel>
    <FormControl {...rest} onInvalid={onInvalid} />
    <Errors
      model={rest.name}
      messages={messages}
      component={ErrorMessages}
      show={show}
    />
  </BootstrapFormGroup>
);

export default FormGroup;

The problem is, that I wanted error state and error messages to be visible only when field is touched. It won't work in the following case - you don't fill your form but just press submit immediately - show and isValid aren't called when clicking submit, so my components aren't told that fields should become touched and no message or invalid styles are being shown.
This is really a serious issue as currently there is no way to make this work, and all I can do is to revert to older version.

@klis87 Can you open a fresh issue with that?


Latest backup in any state should not be deleted while partial delete command

Example:
backup100 CREATING
backup99 CREATED
backup98 FAILED
...
backup0 CREATED

backup100 - newest
backup0 - oldest
Given:
We want to delete oldest one, but backup100 is still creating.
Actions:

we run ch-backup delete --purge-partial backup0
we compute deleting_backups and retained_backups and collect deduplication data
backup100's metadata is loaded with state=CREATING, so we think it could be deleted/partially deleted as well
while we downloading other backups metadata (it could take a while) backup0 is changing state to CREATED
delete command finishes metadata downloading
backup100 will be deleted, but it was created right now

Fix
Skip newest backup while purge-partial flag in delete command.
Btw, lock on backup and delete commands does not help there because metadata loading works outside of lock scope.
Also newest backup could be useful for future's backups because of deduplication.

https://github.com/yandex/ch-backup/pull/50


Difficulty using multiple computers.

Good evening, I'm having a very big problem. I have a lab with more than 10 computers, and it's getting too slow to open the apps, do I need to do any configuration? Because it really is very slow, to the point that students are not able to work.

Try modify RDP graphics settings (Enable/disable H.264, etc...)
Using H.264 will shift some of the work of rendering frames from the processor to the server's video card.


Fixed failing example.

This is a backport from part of #734.

Build status:

Linux
Mac
Windows
Performance


Enable quarantining of Homebrew-Cask's downloads

[X] Have you followed the guidelines in our Contributing document?
[X] Have you checked to ensure there aren't other open Pull Requests for the same change?
[X] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your changes? Here's an example.

This pull requests adds an additional step to the Hbc::Download class that quarantines all downloaded files.
The original proposal by @reitermarkus tinkered with Gatekeeper's download database (~/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2, see #3526), which I found really prone to breaking the main Gatekeeper policy database (i.e. /private/var/db/SystemPolicy).
Inspired in Transmission's source code, I implemented download quarantining through the use of a Swift script. In this way, we can add Gatekeeper support while keeping the code completely visible to the user.
As regards the metadata, I added a modicum of fields:

Agent: Homebrew-Cask
Download type: WEB_DOWNLOAD (see a list of the possible types here)
Download URL: this is obtained from the Cask url field
Originl URL: the Cask's homepage

This also includes:

tests for install, fetch, and audit, across multiple types of containers
the ability to disable quarantining either when Swift is not found, or when using the special flag --no-quarantine

If merged, this pull request closes homebrew/homebrew-cask#22388.
Please review, and thanks for your comments!

If merged, this pull request closes Homebrew/homebrew-cask#22388, Homebrew/homebrew-cask#48862.

Not quite, as it’d still need the --no-quarantine flag to close the issues. But that is definitely the least important part.

This needs some tests.

@vitorgalvao: which commands should --no-quarantine affect?
@reitermarkus: I've replied to your comments inline. About tests - these would need more logic to detect the com.apple.quarantine extended attribute, and besides, every time we quarantine in the tests, we'll pollute the system database.

these would need more logic to detect the com.apple.quarantine extended attribute

Yes, that's what the tests should be checking.

we'll pollute the system database

How? Everytime you download something with a browser it will also “pollute” the system database, so I don't think that is a reason not to have tests.

which commands should --no-quarantine affect?

Anything that downloads, so fetch, install, audit --download.

Anything that downloads, so fetch, install, audit --download.

Although this should probably be a global option, so you can set it in HOMEBREW_CASK_OPTS.

I've found that after #4401's changes, the extended attributes are not preserved between ditto's unpacking and the move to the Caskroom. Upon further inspection (xattr over path and unpack_dir), FileUtils's copy_entry is not preserving the extended attributes necessary to keep the app quarantined.

I thought it had been decided that there will not be any swift code added to Homebrew.  Someone added a swift script once and it was quickly (and correctly) removed.  @MikeMcQuaid is this ringing a bell?

@MikeMcQuaid , @chdiza: as I explained in homebrew/homebrew-cask#48862, the Swift approach enables us to quickly access MacOS's APIs without having to worry about compilation, FFI, etc. The only drawback comes (as you noticed) from having to detect errors based on the exit code.
If you want to use pure Ruby, you can, but the drawbacks outweigh the benefits IMO. There are two approaches:

Manipulate the SQLite database and the extended attributes by hand. This is really prone to breaking Gatekeeper's policy database, which is why I abandoned this approach.
Program the logic in a Objective-C library which exposes a C API, and then use FFI to call them from within Ruby. You'd get the ease of access that comes from using Ruby, but you'd have to worry about how to compile and install the library when installing or upgrading Homebrew.

(Just a PSA, I’m only catching up on previous discussions, no strong opinion.)
Points I’ve seen made against using Swift in Homebrew:

Swift’s bus factor among maintainers,

giving up monolinguality

and Swift’s track record in language stability.

Also, and correct me if I'm wrong here, but doesn't the user have to have Xcode or the CLT installed in order to run a swift script?  My impression is that lots of cask users won't have those installed because they're only looking to install .apps and not cmdline stuff.

and Swift’s track record in language stability.

but doesn't the user have to have Xcode or the CLT installed in order to run a swift script?

It’s my understanding that from Mojave on, Swift will be (finally) included as part of macOS. That will remove the need for further software installation (Xcode/CLT) and (presumably, I’m guessing on this one) backward-incompatibility will start to be handled more carefully.

Swift’s bus factor among maintainers

I still don't understand that argument when AppleScript is the alternative. There is much more documentation for Swift than for AppleScript, whose syntax is also much more convoluted.

I still don't understand that argument when AppleScript is the alternative. There is much more documentation for Swift than for AppleScript

Well documented or not, people need to practise for a language to be useful to them.
I could probably churn out an IOKit driver in AppleScript for you in a day.1 I’d still barely manage to write a Hello World in Swift to save my life.

whose syntax is also much more convoluted.

Absolutely.

1 Dramatization

Well documented or not, people need to practise for a language to be useful to them.

True. But as someone who writes a bunch of AppleScript regularly (and loathes every second of it) and close to no Swift, I still feel that if I needed to do something a bit more advanced, I’d more easily find information on the latter than the former.
AppleScript’s (and JXA’s) documentation is terrible and code you find online is typically bad (as in, it does the job but it’s longer and less optimal than it could be).
All that said, if we’re going to try to rewrite the scripts in AppleScript, we should at least do it in JXA. Not only is the syntax saner, it can do some things AppleScript can’t, and it should be more auditable by more people (being JavaScript).

Well documented or not, people need to practise for a language to be useful to them.

I'd argue it's harder to practise without good documentation.

I'd argue it's harder to practise without good documentation.

Very much so! Learning AppleScript was a royal pain.

@MikeMcQuaid, I'll try and port the Swift script to AppleScript (I'll need to switch to the original Objective-C classes first).
In the meanwhile, I'll change the current script according to your comments.

I'll try and port the Swift script to AppleScript

@amyspark Already done. PR incoming.

@amyspark Thanks! We can iterate on the Swift code first if that's easier.
@claui Nice work.

@MikeMcQuaid, error handling has been moved to Ruby (courtesy of Erica Sadun's stderr stream). If @claui needs it, I can streamline error detection so that it depends only on stderr's contents.

Looking at
https://github.com/Homebrew/brew/pull/4665 the Swift code here doesn't seem significantly less complex to warrant the Xcode/CLT/Mojave/newer versions of macOS dependency. That said, I don't feel strongly enough about this that if @Homebrew/cask does feel strongly (and this is handled appropriately and throws user-friendly errors on old versions of macOS/Swift not being present) that the Swift code should not be used.

I’d be fine with either – especially in light of what @vitorgalvao wrote on Swift probably shipping with Mojave, and @reitermarkus’s point on more accessible documentation.

That said, I don't feel strongly enough about this that if @Homebrew/cask does feel strongly

I don’t. If this can be adequately handled in AppleScript, I have no objection to using it over Swift1. I still think JXA would be a stronger choice, but I’m not going to push the point further.
I echo @claui’s sentiment. I’m fine with either.

Small caveat that AppleScript has given some issues on headless cask uninstalls.

@claui, @vitorgalvao, @MikeMcQuaid, thanks for your comments!
About the extra dependencies - If there's no swift available, quarantining is silently disabled (see Quarantine.available?); in this way, we don't break tests which depend on CLI output. The only (warning) message appears when using --no-quarantine, which has its own tests.
If you feel like it -but it'll probably be overkill- I can add @claui's script as a fallback (crediting you, of course!).

I can add @claui's script as a fallback (crediting you, of course!).

That’s very considerate of you but I’d prefer that we stick with one single script for maintainability’s sake. Even if that means no quarantine at all for some users.

Ping @reitermarkus @MikeMcQuaid for further review.

Thanks for your review @MikeMcQuaid! Please let me know if everything is OK for you.

Every nitpick is an opportunity to improve. Thanks again for your comments @MikeMcQuaid.
@vitorgalvao, did I forget any Cask issues to close?
@reitermarkus, ping again 😅

@vitorgalvao, did I forget any Cask issues to close?

Don’t auto-close https://github.com/Homebrew/homebrew-cask/issues/48862, since we may have to revise the policy depending on the installed artifact instead of scraping it completely. After this change is live, I’ll likely replace that issue with a new one.

However, if one extends #4731 to uncompressed.rb, naked dmg, tar.gz and zip are fixed; the rest still need propagate.

I don't think this matters, because the only time we use naked archives is as a workaround.

Would it be a better option to issue a single xattr and quarantine everything in @cask.staged_path instead of forking for each child?

Forking is definitely the bottleneck here, so yes.

@reitermarkus, done. Thanks for the review.

Heads up: I found that some Casks ship with the wrong permissions (tried to install Fritzing for a course and quarantine failed on an internal .git folder). I've added a line that ensures all extracted files are writable previous to quarantining, but I'm not sure if this should rather go in dmg.rb.

Everyone, please let me know if this is ready for merging. Let me know if I should merge/rebase on master, as I forked this over two weeks ago.

@claui, @reitermarkus -- I've rebased+squashed on my side. Before cleaning this pull, let me know if the current state is OK with you.

I ran a final smoke test on a clean VM (30-ish casks). Everything seems to work great so far.
Some PKG installers didn’t quarantine their payload but that’s expected.
Three Casks failed to install but I could confirm those errors are unrelated.
LGTM :shipit:

@amyspark Ready for cleanup 😉

Ok everyone, incoming rebase+squash! 🚀

Thanks a lot @amyspark ✨ for tackling this! This feature was much needed.


null ref at CarAI.TrySpawn

Stacktraces
Not sure if this is due to recent changes to LSM, or due to PR #1381 :
Simulation error: Object reference not set to an instance of an object
at (wrapper dynamic-method) Vehicle.Vehicle.Spawn_Patch1 (Vehicle&,uint16) <0x0056a>
at CarAI.TrySpawn (uint16,Vehicle&) <0x000c8>
at TrafficManager.Patch._VehicleAI._CarAI.SimulationStepPatch.Prefix (CarAI,uint16,Vehicle&,UnityEngine.Vector3) <0x002cc>
at (wrapper dynamic-method) CarAI.CarAI.SimulationStep_Patch1 (CarAI,uint16,Vehicle&,UnityEngine.Vector3) <0x00057>
at (wrapper dynamic-method) CargoTruckAI.CargoTruckAI.SimulationStep_Patch0 (CargoTruckAI,uint16,Vehicle&,UnityEngine.Vector3) <0x00177>
at VehicleManager.SimulationStepImpl (int) <0x00511>
at SimulationManagerBase`2.SimulationStep (int) <0x0004c>
at VehicleManager.ISimulationManager.SimulationStep (int) <0x00024>
at SimulationManager.SimulationStep () <0x00693>
at SimulationManager.SimulationThread () <0x0018a>
  [Core]

Also getting a few of these (but possibly due to Building Spawn Points mod):
Vehicle not found!
   at System.Environment.get_StackTrace()
   at Building.RemoveOwnVehicle(UInt16 vehicleID, Vehicle ByRef data)
   at FireTruckAI.RemoveSource(UInt16 vehicleID, Vehicle ByRef data)
   at FireTruckAI.ArriveAtSource(UInt16 vehicleID, Vehicle ByRef data)
   at FireTruckAI.ArriveAtDestination(UInt16 vehicleID, Vehicle ByRef vehicleData)
   at CarAI.CarAI.SimulationStep_Patch0(.CarAI , UInt16 , Vehicle ByRef , Frame ByRef , UInt16 , Vehicle ByRef , Int32 )
   at FireTruckAI.SimulationStep(UInt16 vehicleID, Vehicle ByRef vehicleData, Frame ByRef frameData, UInt16 leaderID, Vehicle ByRef leaderData, Int32 lodPhysics)
   at VehicleAI.SimulationStep(UInt16 vehicleID, Vehicle ByRef vehicleData, UInt16 leaderID, Vehicle ByRef leaderData, Int32 lodPhysics)
   at TrafficManager.Patch._VehicleAI._CarAI.SimulationStepPatch.Prefix(.CarAI __instance, UInt16 vehicleID, Vehicle ByRef data, Vector3 physicsLodRefPos)
   at CarAI.CarAI.SimulationStep_Patch1(.CarAI , UInt16 , Vehicle ByRef , Vector3 )
   at FireTruckAI.SimulationStep(UInt16 vehicleID, Vehicle ByRef data, Vector3 physicsLodRefPos)
   at VehicleManager.SimulationStepImpl(Int32 subStep)
   at SimulationManagerBase`2.SimulationStep(Int32 subStep)
   at VehicleManager.ISimulationManager.SimulationStep(Int32 subStep)
   at SimulationManager.SimulationStep()
   at SimulationManager.SimulationThread()  [Core]

Logs

output_log.txt
TMPE.log

Did you use Smarter Firefighters: Improved AI before? Errors about vehicle not found + FireTruckAI in the stacktrace are almost always caused by that mod or because of unsubscribing it (incorrect allocation of guest/own vehicles might throw warning/error even if you remove the mod).

No, never used that mod (although been considering it as vanilla fire fighter AI is pants). The fire truck stuff has been happening for quite some time and it seems related to this: https://github.com/MacSergey/BuildingSpawnPoints/issues/28
I'm going to try running with <IP_ADDRESS> build for a few hours and see what happens to the TrySpawn null ref. If it's still happening then it's likely something that changed in past couple of days (ie. not TM:PE).

#1381 has nothing to the error you showed. Vehicle not found! means that either vehicle was not added correctly to the building once spawned or something happened to the building which caused a desync -> vehicle has not been found in the list of vehicles connected with that building (guest and own vehicles are used when you click on the building to show incoming or spawned vehicles) - it shouldn't break anything from simulation perspective

I'm no longer getting the null ref at CarAI.TrySpawn - only thing that's changed (forgot to rebuild mod) is some mods/assets updated as below:

But now getting this error:
Invalid list detected!
   at System.Environment.get_StackTrace()
   at CarAI.CarAI.CheckOtherVehicles_Patch1(UInt16 , Vehicle ByRef , Frame ByRef , Single ByRef , Boolean ByRef , Vector3 ByRef , Single , Single , Int32 )
   at CarAI.CarAI.SimulationStep_Patch0(.CarAI , UInt16 , Vehicle ByRef , Frame ByRef , UInt16 , Vehicle ByRef , Int32 )
   at VehicleAI.SimulationStep(UInt16 vehicleID, Vehicle ByRef vehicleData, UInt16 leaderID, Vehicle ByRef leaderData, Int32 lodPhysics)
   at TrafficManager.Patch._VehicleAI._CarAI.SimulationStepPatch.Prefix(.CarAI __instance, UInt16 vehicleID, Vehicle ByRef data, Vector3 physicsLodRefPos)
   at CarAI.CarAI.SimulationStep_Patch1(.CarAI , UInt16 , Vehicle ByRef , Vector3 )
   at CargoTruckAI.CargoTruckAI.SimulationStep_Patch0(.CargoTruckAI , UInt16 , Vehicle ByRef , Vector3 )
   at VehicleManager.SimulationStepImpl(Int32 subStep)
   at SimulationManagerBase`2.SimulationStep(Int32 subStep)
   at VehicleManager.ISimulationManager.SimulationStep(Int32 subStep)
   at SimulationManager.SimulationStep()
   at SimulationManager.SimulationThread()  [Core]

Also getting this with disaster vehicles:
Vehicle not found!
   at System.Environment.get_StackTrace()
   at Building.RemoveOwnVehicle(UInt16 vehicleID, Vehicle ByRef data)
   at DisasterResponseVehicleAI.RemoveSource(UInt16 vehicleID, Vehicle ByRef data)
   at DisasterResponseVehicleAI.ArriveAtSource(UInt16 vehicleID, Vehicle ByRef data)
   at DisasterResponseVehicleAI.ArriveAtDestination(UInt16 vehicleID, Vehicle ByRef vehicleData)
   at CarAI.CarAI.SimulationStep_Patch0(.CarAI , UInt16 , Vehicle ByRef , Frame ByRef , UInt16 , Vehicle ByRef , Int32 )
   at DisasterResponseVehicleAI.SimulationStep(UInt16 vehicleID, Vehicle ByRef vehicleData, Frame ByRef frameData, UInt16 leaderID, Vehicle ByRef leaderData, Int32 lodPhysics)
   at VehicleAI.SimulationStep(UInt16 vehicleID, Vehicle ByRef vehicleData, UInt16 leaderID, Vehicle ByRef leaderData, Int32 lodPhysics)
   at TrafficManager.Patch._VehicleAI._CarAI.SimulationStepPatch.Prefix(.CarAI __instance, UInt16 vehicleID, Vehicle ByRef data, Vector3 physicsLodRefPos)
   at CarAI.CarAI.SimulationStep_Patch1(.CarAI , UInt16 , Vehicle ByRef , Vector3 )
   at DisasterResponseVehicleAI.SimulationStep(UInt16 vehicleID, Vehicle ByRef data, Vector3 physicsLodRefPos)
   at VehicleManager.SimulationStepImpl(Int32 subStep)
   at SimulationManagerBase`2.SimulationStep(Int32 subStep)
   at VehicleManager.ISimulationManager.SimulationStep(Int32 subStep)
   at SimulationManager.SimulationStep()
   at SimulationManager.SimulationThread()  [Core]

Going to try again tomorrow but without service vehicle selector see if that has any effect.

Any conclusions? Have you had a change to test it?

Reopen if issue persist.


Puddle refactor

Puddle Refactor
I got sick of Puddle so I decided to ECS it.
Most of these changes are internal facing i.e. refactor. Few outward changes are changes to RSI and adding the Evaporation component.
Changes:

Replaced SpillExtensions.cs with PuddleSystem.Spill.cs
Added PuddleSystem
Removed logic from PuddleComponent
Moved some *.png into separate RSIs for puddle effects
Add PuddleVisualizer

Screenshots
https://user-images.githubusercontent.com/1146204/134028685-13d44057-e69d-4768-9ce2-785caadc8833.mp4
Changelog
:cl:

fix: Fixed puddle spawning at  (0,0)
fix: Puddle blocking puddles and bullets

Changelog
🆑

fix: Fixed puddle spawning at  (0,0)
fix: Puddle blocking puddles and bullets

either write fix: Fixed thing or fix: Thing but mixing them up is just confusing


Folding results

Added folds for each file's matches in the results area.

addresses https://github.com/MagicDuck/grug-far.nvim/issues/166


Refactoring imports with multiple sub-packages causes ParsingError or produces incorrect output

Example one with parens:
from flask.ext.security.decorators import (login_required, auth_token_required)
causes redbaron to freak out with:
baron.parser.ParsingError: Error, got an unexpected token LEFT_PARENTHESIS here:
   1 import flask_( <---- here

The token LEFT_PARENTHESIS should be one of those: AS, COMMA, COMMENT, DOT, ENDL, NAME, SEMICOLON, SPACE

Example two:
from flask.ext.security.decorators import login_required
Becomes:
import flask_login_required as login_required
But it should be:
from flask_security.decorators import login_required

Thanks!


Upgrade to cel-cpp v0.2.0 to pick up ANTLR thread-safety changes.

Signed-off-by: Tristan Swadell<EMAIL_ADDRESS>For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Description: The CEL module used by Envoy-WASM is not thread-safe. A recent upgrade within the https://github.com/google/cel-cpp repo upgraded the C++ ANTLR runtime from v4.7.1 to v4.7.2 with a repro case to verify the thread-unsafe before behavior and the thread-safe after behavior. There may be additional issues above CEL within the Envoy-WASM stack which caused the segfault in https://github.com/envoyproxy/envoy-wasm/issues/497; however, the change should remove a number of possible bugs and narrow the scope of the segfault search.
Risk Level: Low
Testing: Unit testing in the cel-cpp stack.
Docs Changes: n/a
Release Notes: CEL thread-safety improvements
[Optional Fixes #Issue]
[Optional Deprecated:]

@jplevyak we need to cherry-pick this into istio/envoy-1.6 and should make its way to istio-proxy:1.6.1


How do I Hold GPIO state in deep sleep mode? (IDFGH-1048)

Hello guys,
I have a project with ESP32 WROOM in my own pcb board where I control one transistor to connect the ground my device sensors when my ESP32 is wake and when it goes to sleep it must have a GPIO in low lvl in order to put the transistor in cut mode.
The problem that I figured out is that the GPIO's are floating instead of stay in low mode.
First I was trying to do this in arduino IDE, that can be the best option for me as my project was original made over there. However I didnt find any function to make the GPIO keep the same state during the deep sleep.
Looking in ESP-IDF i found these function:
gpio_deep_sleep_hold_en();
gpio_hold_en(gpio_num_t BLINK_GPIO);
I understood that they were made for this keep the gpio in previous state during the deep sleep, however i have tried without success.
Following the code so you can easily reproduce this issue:
Code to reproduce this issue
// the code should be wrapped in the ```cpp tag so that it will be displayed better.
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_spi_flash.h"
#include "esp_sleep.h"
#include "driver/gpio.h"
#include "sdkconfig.h"

#define BLINK_GPIO 25

void app_main()
{
    printf("Hello world!\n");
	gpio_pad_select_gpio(BLINK_GPIO);
	gpio_set_direction(BLINK_GPIO, GPIO_MODE_OUTPUT);

        /* Blink off (output low) */
	printf("Turning off the LED\n");
        gpio_set_level(BLINK_GPIO, 0);
        vTaskDelay(2000 / portTICK_PERIOD_MS);
        /* Blink on (output high) */
	printf("Turning on the LED\n");
        gpio_set_level(BLINK_GPIO, 1);
        vTaskDelay(2000 / portTICK_PERIOD_MS);

    printf("Restarting now.\n");
	fflush(stdout);
	gpio_deep_sleep_hold_en();
	gpio_hold_en(gpio_num_t BLINK_GPIO);
	esp_sleep_enable_timer_wakeup(10000000);
	esp_deep_sleep_start();

}

Therefore, I would like your help to understand why this is not working and if is possible to make it in arduino IDE.
Thanks in advance!!!

Hi, @andrelmbraga Thanks for reporting the issue. Found out this issue is same with the issue #2712 reported in Arduino repository, will close #3370. Thanks.


Luigi workers should report dead workers to scheduler

This is a frequent annoyance:
INFO - 2014-09-11 16:02:49,449 - JobThing(date=2014-09-10, build=2014-W32) is currently run by worker Worker(salt=178277472, host=edgenode-a1.spotify.net, username=as, pid=22199)
If the hostname of the worker doing the scheduler check is the same host reported as the worker currently running the job, the least it could do is see if the pid is still alive and if not, report it dead to the scheduler and rerun the task.
That, or provide some sort of command line tool to tell the scheduler it's dead. Because right now I have no recourse but to wait for some unknown timeout; I can't use --local-scheduler or stuff will go awry.

Actually this is a great idea to make luigi more responsive. Although I think the added complexity might not be worth it. The pinging works fine enough I believe.

I'm closing this issue.

[x] It has been inactive for +4 months.
[ ] It's not about luigi core, so not as many users are affected about this.
[ ] The change seems quite big, it's unlikely to be sporadically picked up.
[ ] The owner haven't responded or disappeared.
[ ] I don't understand what this is issue is about.
[ ] There exists a reasonable workaround for this.
[ ] We need to check if this hasn't been fixed by now (for old issues).
[ ] This is kind of by design and not a bug.

Every open issue adds some clutter, and we try to make the issues fewer and make it easier for new collaborators to find. Currently we try to close any issue that meets the first checkbox + one other.
Feel free to reopen this issue at any point if you have the intent to continue to work this. :)


N-queens.py

Backtracking solution of Leetcode question N-queens in pythin

Hey @avis011, can you link your submission? It would be easier to verify.

Like this: https://leetcode.com/submissions/detail/813323575/
Thanks!

Everything you asked is done

Closed with #31


Fix boolean bundle gem settings

Fixes #3443 (nmarley's problem at the bottom)
The issue was that alpha =~ beta returns nil if alpha doesn't contain beta and the position—e.g. 6—instead of false and true respectively like was assumed by whomever wrote the original logic. It coincidentely worked for yes because everything—like 6 using my above example—except for false and nil resolve to true. However, when they selected no for coc or mit they were always reasked because it resolved to nil which for boolean settings doesn't get transformed into false.

Okay messed up this PR will make a new one...one of these days I'll finally understand git perfectly!!


Add top level key to reply event to keep consistent with request format

Fixes #55. Also updated all the test cases.
This also fixed the wrongly marked resourceType of mocked requests.

OK, flake8...
Any coding style suggestion to break something like this into multiple lines?

   del resp['data']['imageStoragePoolMap']['+data']['dockerImage']['VirtualSize']

A backslash to break the line is fine.  Or assign one of the inner maps to a variable.

This looks good but I'm going to hold off on merging this until github phase 1 is done.  The size of the change in python-agent has gotten quite large (not this PR but the ones before).  I want to wait until cattle picks up current master.

Sure. Thanks!

@yasker Sorry, but breaking changes are tricky to push out.  I'm dealing with this right now with some of the github work.  What I'd prefer is that we do a lock step approach.

Release python-agent that supports both old and new behavior
Create a PR to remove legacy behavior
Include python-agent in cattle with cattle also moving to the new behavior
Merge python-agent PR to master to remove legacy behavior
Include new python-agent in cattle

If we do this this way cattle master and python master will always work together.  I know it's more work, but that's just the problem with breaking changes.

@ibuildthecloud The related modification is much more in python-agent side(mostly on test cases) compared to cattle server, but not so much on cattle server, so how about this:

A cattle server PR for both old and new behavior. Then this can be merged without breaking anything.
Python agent PR stay the same, after cattle is merged, it won't break cattle.
After python-agent merged, submit another PR to remove backward compatibility.

@ibuildthecloud Thanks Darren! I would send out PR for removing temporary compatibility code today.


Template class name bug

If we load multiple templates, currently all the template classes have the same name. We must generate a unique class name and use require_once with class_exists to validate if the template is already loaded.

Not a bug, since the compiled file contains only the template part of the template class, therefore the class definition is not in conflict.


Small tweaks to method signatures and swirlds main class to work with…

… new swirlds lib.

Sorry I didn't see there was a PR for this fix, and wound up fixing it in another pull.
Thanks though!


brod_sock exits with 'normal' reason on tcp_closed

this is to avoid crash report from proc_lib

@zmstone ping

LGTM, @byronpc any comment ?
=INFO REPORT==== 31-May-2016::19:07:54 ===
client aaa metadata socket down localhost:9092
Reason:{shutdown,tcp_closed}


Start transaction - check payment method

Preparing the server in order to make it possible to prevent a start transaction when the billing prerequisites are not met.
New enum

enum StartTransactionCheck {
OK = 'ok',
BILLING_NO_PAYMENT_METHOD = 'no_payment_method',
BILLING_NO_TAX = 'billing_no_tax',
BILLING_NO_SETTINGS = 'billing_no_settings',
BILLING_INCONSISTENT_SETTINGS = 'billing_inconsistent_settings',
}

The UI will enable the start transaction button only when the check status is set to StartTransactionCheck.OK
The status is send together with the Tag and the Car when using the endpoint getUserDefaultTagCar endpoint.

@LucasBrazi06 : Changes have been done


Change emoji font on status bar

Hi,
I just want to have color emoji font for the status bar. I have vanilla dwm and dwmblocks. Also I have installed JoyPixels, symbola, noto-emoji, etc.
Or how to apply a second font in the status bar. I've applied several patches like statusbarfont but it has some errors in dwm.c

I've found it, sorry
#21


SetConversationDataWithHttpMessagesAsync - Object reference not set to an instance of an object

@willportnoy  Related to #400, Call stack below.
at Microsoft.Bot.Connector.Bots+d__8.MoveNext (Microsoft.Bot.Connector, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Connector.BotsExtensions+d__7.MoveNext (Microsoft.Bot.Connector, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask+d__7.MoveNext (Microsoft.Bot.Builder, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at Microsoft.Bot.Builder.Dialogs.Internals.PersistentDialogTask+d__6`1.MoveNext (Microsoft.Bot.Builder, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (mscorlib, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089)

@wbreza can you include your repro steps? It would be good if you can clarify what you mean by switching dialogs in #400. Are you setting the conversation data in your dialogs?

I have my own implementation of a JSON form builder that I created before you guys supported it.  I dynamically build form/dialogs from JSON payloads.  I also have an external LUIS pipeline where I process user messages to determine intent.  Based on the matching intent I load my custom dialog + form.

Message received in Web API controller
Manually process LUIS intents
Invoke bot framework with custom dialog/form
Load dialog with Form 1
Store PerUserConversation state values

After form completes user asks another question.  It follows the same process as above.  Some forms send multiple messages, ex) welcome message + first question of form.  In this case I get the above referenced exception on the 2nd form.
I've attempted to manually clear / reset PerUserConversationData after Form 1 completes, but I still get the same issue.
I also support asking unrelated questions in the middle of a form.  When this happens I detect a new intent, attempt to clear PerUserConversationData and load the relevant form.
Hope this helps understand the issue.

@msft-shahins @willportnoy Any update?

I looked at the implementation of SetConversationDataWithHttpMessagesAsync - it's not a method we call directly in the builder.  The implementation looks like it checks for null BotId, conversationId, and botData and throws ValidationExceptions if those references are null.
So, I would guess there is a null reference somewhere within BotData or the IConnectorClient.
How are you initializing IConnectorClient?

I assume that this issue is resolved. Feel free to open it again if you face the same issue.

I will be updating to new version soon and hope to see it as resolved.  Will let you guys know if I continue to run into issues.


[WFCORE-5917] Use variable expansion replacement instead of pattern r…

…emoving to avoid duplicate jboss.server.base.dir options
Jira issue: https://issues.redhat.com/browse/WFCORE-5917

This will remove the -Djboss.server.base.dir from the SERVER_OPTS.

This variable is not exported so is not visible to the server process. After removing the option, which is duplicated later in the server command launch (see that it explicitly uses -Djboss.server.base.dir=\""$JBOSS_BASE_DIR"\" \, the server needs to be stopped and started again to use it, which will initialize it back to the original value. I mean, it is unused after removing the duplicated option on this line.
The domain.sh has the same issue.

Really having it defined twice isn't a huge issue.

Yes, I agree, it is just the point of having it twice for the same server launch command line.

However, we need to be able to override it from the command line.

This change does not affect this calculation. This is done when the options are consolidated above this change, L140.

Core -> WildFly Preview Integration Build 13244 outcome was FAILURE using a merge of 143dfa3fb3ed214548251fb3cfc1faec495b2ebe
Summary: Execution timeout (new); tests passed: 2024, ignored: 18 Build time: 10:00:32

converting to draft, since although the approach is approved, we found we need to apply the same to domain.sh and potentially, look at batch ps1 scripts too, and or check if we can add a validation test to it.

Core -> WildFly Preview Integration Build 13263 outcome was UNKNOWN using a merge of 7c5135d84bc0428d993ccfd8922a8dd4bb97bffb
Summary: Canceled (Exit code 143 (Step: Build & test full (Maven))) Build time: 00:07:03

Core -> Full Integration Build 13200 outcome was UNKNOWN using a merge of 7c5135d84bc0428d993ccfd8922a8dd4bb97bffb
Summary: Canceled (Exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 00:07:03

Core -> Full Integration Build 13439 outcome was UNKNOWN using a merge of 7c5135d84bc0428d993ccfd8922a8dd4bb97bffb
Summary: Canceled (Tests passed: 1281, ignored: 6; exit code 143 (Step: Build & test full (Maven)) (new)) Build time: 00:07:09


How to run the XLA GPU UTs? it seems filtered.

bazel test --config=opt --config=cuda --test_verbose_timeout_warnings --verbose_failures --color=yes //tensorflow/compiler/xla/tests:multioutput_fusion_test
WARNING: The following configs were expanded more than once: [cuda]. For repeatable flags, repeats are counted twice and may lead to unexpected behavior.
WARNING: All specified test targets were excluded by filters
INFO: Analyzed target //tensorflow/compiler/xla/tests:multioutput_fusion_test_gpu (0 packages loaded, 0 targets configured).
INFO: Found 1 target and 0 test targets...
Target //tensorflow/compiler/xla/tests:multioutput_fusion_test_gpu up-to-date:
bazel-bin/tensorflow/compiler/xla/tests/multioutput_fusion_test_gpu
INFO: Elapsed time: 6.680s, Critical Path: 6.21s
INFO: 2 processes: 2 local.
INFO: Build completed successfully, 7 total actions
INFO: Build completed successfully, 7 total actions

Actually, the binary(bazel-bin/tensorflow/compiler/xla/tests/multioutput_fusion_test_gpu) could been run manually, but it could not run automatically.

Please provide details about what platform you are using (operating system, architecture). Also include your TensorFlow version. Also, did you compile from source or install a binary?
Make sure you also include the exact command if possible to produce the output included in your test case. If you are unclear what to include see the issue template displayed in the Github new issue template.
We ask for this in the issue submission template, because it is really difficult to help without that information. Thanks!


Edit group from Linodes view page to edit all Linodes' group in group

In other words, on the Linodes view page, be able to edit group name.


Add codemagic extension

Description
Features

Trigger builds

Select the app you want to trigger a build for, Select the branch and the workflow and trigger the build.
If the build is in progress, you can cancel as well.

See all builds

Get all the builds including the metadata.
Download the artifacts for a specific build.

Screencast
https://github.com/user-attachments/assets/0f809eb7-1c33-4e9a-8539-5000b25e0e25
Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

The video attached is a bit outdated. I've added useCachedPromise.

Hey @pernielsentikaer,
Thanks for taking your time and reviewing this PR.

One of the commands crashes if I gives it wrong credentials, can you handle that gracefully?

When you say you gave wrong credentials? By that you mean invalid "Codemagic access Token"?
I've handled this scenario and can't reproduce the same error.
https://github.com/user-attachments/assets/adb4970b-8da2-4220-95c4-f33556f779cb

Also @pernielsentikaer, I see the navigation action, "Open in PhpStorm". That's not something, I added in my code. That's related to your testing suite?

As you can see below is one of the commands correctly handling wong credentials where the other doesn't, this is a fresh install - does that help you?
https://github.com/user-attachments/assets/a571b452-2184-4f39-acc4-4880da8612bc

I am working on this..

@pernielsentikaer Thanks for finding an edge case. This happens only on new install. Since I was using this extension for quite some time. It was hard for me to find this. You can take a look at the PR now. Thanks for your time.


v2: Add build tag urfave_cli_no_suggest

What type of PR is this?

cleanup
feature

What this PR does / why we need it:
Like urfave_cli_no_docs (in docs.go), allow to disable flag and command suggestions at build time (and drop dependency on module github.com/xrash/smetrics) with a new urfave_cli_no_suggest build tag:
$ go build -tags urfave_cli_no_suggest,urfave_cli_no_docs

Release Notes
Add `urfave_cli_no_suggest` build tag to disable suggestions and drop dependency on module [`github.com/xrash/smetrics`](https://pkg.go.dev/github.com/xrash/smetrics) for smaller binaries.

@dolmen Can you fix the test failures ?

@dearchap Tests fixed by approving API docs changes.


[Feature Request]

PBRP has the ability to modify codename, can you add a tool to modify more read-only attributes?
Many official upgrade packages now recognize more than Just Codename.
This feature can be adapted to more similar models using a PBRP image.

Hmmm, sounds good that can be implemented. Can you plz elaborate about the variables which needed more.

@AndroiableDroid Like build fingerprint and few other device specific props

Hmmm, sounds good that can be implemented. Can you plz elaborate about the variables which needed more.

ro.separate.soft ro.product.device ro.product.system.model
There will be a lot, I think we can do something like Mprop(https://github.com/jedy/mprop, you can use this tool in the normal system, but can't use in PBRP) such a command-line tool, so that we can in the rc file to perform a custom sh, get the original system and write PBRP attribute.
Many models of the same CPU and the same manufacturer can use the same PBRP image.If you can write the properties of the original system to PBRP after startup, you can save a lot of work.Of course, attributes can vary from vendor to vendor, so a command-line tool that lets developers read and write attributes is most appropriate.

Does resetprop does work like that?

Ya that could be figure out. Resetprop working fone for you?

Thanks, I've taken care of my thoughts!


Remove usbOnline check

It's flaky for a lot of Volt users (usbOnline is false while boardd communication is just fine).
To make openpilot usable, people are commenting out that line.
I need a workaround/solution for this issue switch volt people from my volt-devel fork to release2.

Having the same issue (Tesla), commented it too. Seems related to long usb cable.

Of course it is , been saying it over and over since I had my EON a while ago. The reason the Volt (and Tesla) user get this is because they’re using USB extension since they use the OBD2 port and not a close by giraffe. I stopped using the USB extension a week after installing my EON and NEVER one Panda related issue since then (and it’s been a while).

It works just fine with the extension beside the fact the is sometimes stops charging for some time then resume charging. No issue for driving itself.

EDIT: works just fine with the extension AND with usbOnline disabled.
Using this one: https://www.amazon.com/gp/product/B00UY59OR6/

I support disabling this assuming the battery level is high enough. Will look into the checks.

Yeah, will shutdown anyway at 3% SOC. Might now be a very save shutdown if controls_allowed though...

Changed internally (usb online check only when passive==1) and will be in next release. closing this pr. Thanks @vntarasov.


Tauri v2 - error on writeTextFile with path arg

Hello, I can't create / write to a file with Tauri 2 (it worked for Tauri 1) with writeTextFile :
Uncaught (in promise) invalid args `path` for command `write_text_file`: command write_text_file expected a value for key path but the IPC call used a bytes payload

I add new permission :
  {
    "identifier": "fs:allow-write-text-file",
    "allow": [{ "path": "$APPDATA/**/*" }]
  },

Test with :
import { writeTextFile, BaseDirectory } from '@tauri-apps/plugin-fs';
const contents = JSON.stringify({ notifications: true });
await writeTextFile('config.json', contents, {
  baseDir: BaseDirectory.AppData,
  append: true
});

Thanks

I can't reproduce this, what version of tauri and the plugins are you on? You can get the info by running tauri cli npx tauri info

you probably have an older version of fs, run cargo update -p tauri-plugin-fs in src-tauri

That's right, completely forgot to update it. Thank you so much.


Header value 0 must be of type str or bytes

Yo! Got an interesting error at a client who is using an Amazon CDP as their master. The first time a JSS recipe is run, a package object is created but the package upload fails. Here's the verbose output of autopkg run -v com.github.jss-recipes.jss.Firefox_EN:
JSSImporter
JSSImporter: Category type: category-'Productivity' already exists according to JSS, moving on...
JSSImporter: Category type: policy_category-'Testing' already exists according to JSS, moving on...
JSSImporter: Copying /Users/foo/Library/AutoPkg/Cache/com.github.jss-recipes.jss.Firefox_EN/Firefox-48.0.2.pkg to all distribution points.
JSSImporter: Copying to https://jss.example.com:8443
Header value 0 must be of type str or bytes, not <type 'int'>
Failed.
Receipt written to /Users/foo/Library/AutoPkg/Cache/com.github.jss-recipes.jss.Firefox_EN/receipts/Firefox-receipt-20160913-100420.plist

The following recipes failed:
    Firefox.jss
        Error in com.github.jss-recipes.jss.Firefox_EN: Processor: JSSImporter: Error: Header value 0 must be of type str or bytes, not <type 'int'>

Nothing downloaded, packaged or imported.

Subsequent JSS recipe runs succeed, but with "Package upload not needed." And the package shows up as red (missing) in Casper Admin, proving that the file doesn't exist.
Looks like somebody on JAMF Nation is seeing the same error when uploading to a JDS.
And there's a suspiciously similar issue reported here that seems related to a specific version of requests.

Update: This was fixed by updating to the latest version of python-jss, released yesterday. This PR was the fix.
Thanks!

All the credit on that one goes to @ftiff. Who knows how long it would have taken for me to discover that issue?
I'm surprised that contrary to Reitz's philosophy with requests (easy to use, does the heavy lifting for you) it throws an exception rather than at least trying to cast a non-basestring to str. I'm sure they have good reasons for it, but I can visualize the typecasting code I would put in to just avoid it. Of course, then people ignore the proper interface rather than learn their tooling better.
I feel like there have been a lot of mysterious issues with JSSImporter that may actually resolve due to this-slack questions where first vs. subsequent runs succeed or fail for unknown reasons. Time will tell.
Either way, I need a day to go through all of the issues and PRs on JSSImporter and do a new release that bundles the new python-jss so we can close the door on this entirely.


Upcoming update

In upcoming update I will be probably moving back from CoffeeScript to only JavaScript. This will let me work more on Web support and also possibility to add debugger to Nide. What do you think? Also, sorry for this language changes, non is still in early development, but this move back to JavaScript will be probably final.

Okay, web support seems promising in this engine and I'm looking forward to
seeing it.
On Sat Feb 07 2015 at 5:54:08 AM Thomas Slusny<EMAIL_ADDRESS>wrote:

In upcoming update I will be probably moving back from CoffeeScript to
only JavaScript. This will let me work more on Web support and also
possibility to add debugger to Nide. What do you think? Also, sorry for
this language changes, non is still in early development, but this move
back to JavaScript will be probably final.
—
Reply to this email directly or view it on GitHub
https://github.com/non-dev/non/issues/13.

Closing, 3.6.0 released 5703bf69483c6104d50f15bf78aa1bb8748fa636


[TablePagination] Add showFirstButton and showLastButton support

fixes #20725

[x] I have followed (at least) the PR section of the contributing guide.

Look

Testing video
https://recordit.co/1zDeLDC3zn

@ShahAnuj2610 Thanks for looking into it, we will get it land into v5. We have freezed new features on v4.

Could you add some tests in TablePagination.test.js? Especially handleLastPageButtonClick looks prone to off-by-one errors.

@eps1lon have added test cases for showFirstButton and showLastButton

We probably want to get rid of this in the future and replace with Tooltips

@eps1lon Interesting that you mention it, there is an issue very close for the Autocomplete #20991 and a matching one for the DatePicker.


Timex.DateTime.diff missing sign in result

iex(25)> Timex.diff expiry, Timex.DateTime.now, :minutes
7
iex(26)> Timex.diff Timex.DateTime.now, expiry, :minutes
7

According to the docs, the result should be signed. Timex version 2.1.1

@tallakt I believe the reason I changed this was because a signed diff didn't seem useful to me when one could use compare to determine the past/future relation. It's easy enough to change back, but I suppose my question is: do you rely on the signed result? Is it a useful property of the function compared to returning the diff as a non-negative integer always, and using compare to determine how two dates/datetimes relate to each other?
Another question then becomes, if diff returns a signed value, is compare even useful as a function? Should it be deprecated/removed and just leave diff as the sole means of comparison?

I would rather just use diff and then normal operators for comparing the results rather than the -1, 0, +1 result which feels alot like C++ to me. That's my opinion anyway. But I don't feel very strongly about it, but as a minimum, we should update the docs.

Agreed on the docs. I'll think about these two functions in general and post back here with my decision. Chances are I will deprecate compare and just lean on diff for double duty moving forward, but I want to think it through before I decide.

I've updated the docs in the meantime

After giving it a bit of thought, it is probably more intuitive that dates arithmetic with dates behave like with normal numbers, with signed results, eg:
iex> Timex.diff a, b
4
iex> Timex.diff b, a
-4

@tallakt Agreed. I think I'll make that change sooner rather than later, because I don't want the current behaviour to become too entrenched.

FWIW, I'm working on upgrading to 2.0 and the fact that diff is no longer signed (compared to 0.x and 1.x) is giving me trouble.  I've implemented our own diff function that delegates to Timex.diff and restores the sign based on compare but it feels like I shouldn't have to do that.  It would be like if a math library defined - to always return the abs value, so that 5 - 10 returned 5 (requiring the user to compare the values to figure out if it should be negative).
Anyhow, sounds like you are already planning and restoring the signed behavior but I wanted to lend my voice to it as well :).

By the way, the signed behavior of diff in Timex 0.x and 1.x worked the opposite of how I expected.  In my mind, I thought of diff as the equivalent of subtraction for date math -- so just as 10 - 15 is negative, I expected diff(may_10_2016, may_15_2016, :days) to return -5 and diff(may_15_2016, may_10_2016, :days) to return 5 -- but it does the opposite.  Reading the old docs for diff (from when it returned a sign value), it says:

Calculate time interval between two dates.

...which helps explain the behavior.  I think that it's easy to assume that diff(a, b) is the equivalent of a -b so if you want to preserve this behavior, I'd suggest calling the function interval instead of diff.  Or, if you're willing to flip the sign from how it behaved before, diff would still be a good name, IMO.

@myronmarston This has been merged into master and the behaviour is exactly as you describe it, putting an older date before a newer one returns a negative value, and vice versa. The same behaviour as compare.

This RFC has been merged in 3.0, so the diff behaviour is again signed.


Add fetcher: OpenSea NFT API

https://docs.opensea.io/reference#api-overview

would it support sth like this? https://opensea.io/assets/0xb0cf7da8dc482997525be8488b9cad4f44315422/213

No this issue is about fetching data from the OpenSea API, but you don’t need it to display NFTs listed on OpenSea.
For example in this case, the interactive web page is defined using the non-standard animation_url field, but you can access it using rawData:  https://codesandbox.io/s/fervent-lake-n41qe?file=/src/App.js

+1 for this. Would probably be a more reliable (albeit, more centralized) nft fetcher. There are several mainstream NFT projects that the ethereum fetcher was unable to load due to api inconsistencies.


CosmosFullNode: Add support for additional ports

There isn't an option to add additional ports to the podTemplate at the moment.
I would like to expose EVM RPC ports (8545 and 8546 ) as well and at the moment, that is not possible unless I reconfigure the ports in app.toml.

Is this really not possible? How does it work with a remote signer then?


Bug when posting to /schedules/{id}/overrides

Hi,
When posting to /schedules/{id}/overrides, logic defined here (https://github.com/PagerDuty/pdpyras/blob/main/pdpyras.py#L130):
if is_index and http_method=='get' or multi_put:
            # Plural resource name, for index action (GET /<resource>), or for
            # multi-update (PUT /<resource>). In both cases, the response
            # (former) or request (latter) body is {<resource>:[<objects>]}
            envelope_name = resource
        else:
            # Individual resource create/read/update
            # Body = {<singular-resource-type>: {<object>}}
            envelope_name = envelope_name_single

leads to the latter case in which we are updating an individual resource which is not the case. Specifically:

is_index is true because url has 3 parts
http_method is POST, so we fail in the else part

As a consequence, when performing session.rpost('/schedules/{id}/overrides', json=overrides), overrides provided are being encapsulated as a "override" property of an object.
Workaround is to pass overrides as:
overrides = {
overrides= [ ... ],
override = ''
}
Then, as override property is present, the whole object is being sent.

Hi @sl-alexandrenerat I believe I am having the same issue when attempting to post to /incidents/{uid}/snooze I wonder if I am encountering the same issue.
Curl requests to api.pagerduty.com for that path work correctly. However, when I try through pdpyras I get this
POST /incidents/#####/snooze: API responded with non-success status (400): {"error":{"message":"Invalid Input Provided","code":2001}}

How did you troubleshoot this issue and identify where the problem was occurring? I am stuck determining how to move forward with gathering more information on what is going.

@jwrobb I'm not sure it's the same bug actually as your api call doesn't post a list designated with a plural property.
Anyway to find out which was the problem I added debug to requests library (here https://gist.github.com/Daenyth/b57f8522b388e66fcf3b?permalink_comment_id=3194372#gistcomment-3194372) and also used a debugger to step into my call.

Hello @sl-alexandrenerat,
Thank you for pointing this out. This is a counter-pattern in the API that I hadn't noticed before. It breaks rpost in this use case, but it doesn't need to.
An ideal fix would be defining a static list of endpoints at the top similar to VALID_MULTI_UPDATE_PATHS, i.e. VALID_MULTI_CREATE_PATHS = [('schedules', '{id}', 'overrides')] and then conjoin a similar thing to multi_put to the condition, i.e.
        multi_post = http_method == 'post' and nodes in VALID_MULTI_CREATE_PATHS
        ...
        if is_index and http_method=='get' or multi_put or multi_post:

@jwrobb I recommend not using rpost for snoozing an incident because the endpoint isn't supported by the r* methods.
If you had been using regular old post instead, then it would be worth examining the value of the json argument and ensuring that it's a dictionary that looks something like {"duration": 86400}

Upon further review, it looks like POST /overrides departs from API norms to an extent that makes it irreconcilable with the design of the resource_envelope decorator. This is because in the response, there is no resource envelope.
Per the API docs, the root level of the response body is an array of objects, versus an object with a resource envelope. No resource envelope means there's nothing to extract from the response body. You can just call session.jpost('/schedules/PSCHEDID/overrides', json={'overrides': [...]}) and the return value is the array of created overrides.
The only way to make rpost work with the create overrides endpoint is making a super special exception for just this particular API where it returns the response body in full, but that is treading into the territory of "making an API for the API" which goes against the design philosophy of this API client.


Fix TTL for stat metrics is reset on stat commit

What this PR does / why we need it:
Currently, while storing new committed stat from pipeds, Redis EXPIRE is always called that reset the TTL set for the stat metrics hash key, lead to piped stat metrics keep available even after piped has stopped.
<IP_ADDRESS>:6379> TTL HASHKEY:PIPED:STATS
(integer) 266
<IP_ADDRESS>:6379> TTL HASHKEY:PIPED:STATS
(integer) 300                    /// TTL is reset here 👀
<IP_ADDRESS>:6379> TTL HASHKEY:PIPED:STATS
(integer) 299

Which issue(s) this PR fixes:
Fixes #2234
Does this PR introduce a user-facing change?:

NONE

I see. I think this way is acceptable in case there are a large number of Pipeds (e.g. our prod env). (The more Pipeds, the lower the "not-found" rate.)
Btw, let's see how the graph will be in our dev environment where only a few Pipeds are running.

/lgtm

👍
/approve


Community select

Adds community select to editor page.

Looks good to me, simple and effective.
Could we also add (if user posting in community, add reblog operation into same transaction) ?
Right now, if user posts in community, they will have to manually reblog so it shows on their blog as well, but that's unnecessary step and adding option to editor like (add to my blog as well) also unnecessary. Just making it easy for user, default reblog their new post from community into their blog as well while posting.

ok

@feruzm pushed auto reblog for community posts


not compatible with laravel 10

It seems that it is not compatible with version 10+ of illuminate/notifications, could you change the required version to version 10+ to be able to use it with Laravel 10+?
or if there is any other way please let me know
Problem 1     - netflie/laravel-notification-whatsapp[v0.1.0, v1.0.0] require illuminate/notifications ~8.0 || ~9.0 -> found illuminate/notifications[v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.4] but these were not loaded, likely because it conflicts with another require.     - Root composer.json requires netflie/laravel-notification-whatsapp * -> satisfiable by netflie/laravel-notification-whatsapp[v0.1.0, v1.0.0].

I am also interested in this :)

Hi,
Can you help me? Try to install the branch dev-laravel-10 and let me know if is working -> https://packagist.org/packages/netflie/laravel-notification-whatsapp#dev-laravel-10
Thanks.

Hi,
Can you help me? Try to install the branch dev-laravel-10 and let me know if is working -> https://packagist.org/packages/netflie/laravel-notification-whatsapp#dev-laravel-10
Thanks.

Thanks man, this works fine.

Thanks @maverik23
@albertobenavides can you confirm is also working for you? Thanks.

@aalbarca, yes, thank you :)