[$500] Web - Pressing ESC on attachment preview glitches the preview

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:

Open the app
Click on any chat
Click '+' add attachment
Attach multiple images
Open first uploaded image
Click on ESC to close the preview, observe that preview closes, reopens with different image and closes

Expected Result:
App should close preview on ESC click
Actual Result:
App glitches on closing preview on ESC click
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.3.61-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: Any additional supporting documentation
https://github.com/Expensify/App/assets/93399543/1c6168d6-ff13-4892-892f-4a98015c026a
https://github.com/Expensify/App/assets/93399543/9e5b35a2-db33-474a-957e-6fe952084b2e
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693558112570809
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01ebd6c095f0ad277c
Upwork Job ID:<PHONE_NUMBER>140925952
Last Price Increase: 2023-09-19

Proposal
Problem Statement
Pressing ESC Attachement preview glitches the preview.
Root Cause
The root cause is when keyboard shortcut is triggered we call Modal.close(() => callback), here modal.close is dependent on the onClose prop which we pass in Modal component. But in this case we have 2 Modals in stack of AttachmentsModal and other is ConfirmModal used for invalid file type. so variable we are using to store onClose prop is getting overridden by ConfirmModal onClose prop (which is null if modal not visble)
Solution
Conditionally rendering the ConfirmModal based on the whether there is a validation error or not, and Modifying onModalHide prop passed to AttachementModal will solve this issue.
// AttachmentsModal.js
{
  isAttachmentInvalid && (
      <ConfirmModal
          title={attachmentInvalidReasonTitle ? translate(attachmentInvalidReasonTitle) : ''}
          onConfirm={closeConfirmModal}
          onCancel={closeConfirmModal}
          isVisible={isAttachmentInvalid}
          prompt={attachmentInvalidReason ? translate(attachmentInvalidReason) : ''}
          confirmText={translate('common.close')}
          shouldShowCancelButton={false}
      />
  )
}

// ReportAttachments.js
          <AttachmentModal
            onModalHide={() => {
                // if active route is not the attachment route, user maybe navigated to search using KeyboardShortcut Cmd+K/Cmd+Shift+K below can be moved to dismissModal function also
                const activeRoute = Navigation.getActiveRoute();
                if (activeRoute.includes('/attachment')) {
                    Navigation.dismissModal(reportID)
                }
            }}
            /// other props
          />

Alternative Solution
As this problem can be solved by conditionally rendering the ConfirmModal. There is a downside to the approach we are following as explained in root cause, we can only have one modal in Stack at a time. So where there is multiple modals in stack, we have to conditionally render them.
A better approach would be to use a Array to store the onClose, and setOnClose function will push the onClose function to the array along with a ModalID. When unmounting the modal will remove the onClose function from the array. This way we can have multiple modals in stack and onClose will be called in the order of modals in stack.
Pseudo Code

Modal Mounted setOnClose({ onClose, modalID })
setOnClose will push the onClose function to the array along with a ModalID
Modal Unmounted removeOnClose(modalID)

Proposal
Please re-state the problem that we are trying to solve in this issue.
App glitches on closing preview on ESC click
What is the root cause of that problem?
AttachmentModal is using unnecessary useCallback for closeModal function. This causes React to not throw away the cached function.
https://github.com/Expensify/App/blob/5f668c669a501a94caebbb434a656580e3bcfb24/src/components/AttachmentModal.js#L307-L309
What changes do you think we should make in order to solve the problem?
Remove the useCallback wrapper for closeModal, e.g.:
    const closeModal = () => {
        setIsModalOpen(false);
    };

This is the safest and optimal way since the modal visibility is controlled by a local state.
What alternative solutions did you explore? (Optional)
N/A

While my solution is solving the issue I think the root cause is correctly identified by @zukilover, the solution proposed by me is solving the issue of Navigation issue when CMD+K or CMD+SHIFT+K is used for navigation (reported by a contributor on slack already) I am marking my off-topic (unless we decide to solve this issue alog with these).

Not sure why @adelekennedy and I are both assigned but I did the testing and can reproduce this only in Chrome. Looks like External is already added for some proposals.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Web - Pressing ESC on attachment preview glitches the preview
What is the root cause of that problem?
The root of this issue is that we are nesting ComposerWithSuggestions inside of AttachmentModal and then we are using a useEffect to focus the composer without a delay which causes triggering focusWithDelay while AttachmentModal is still mounted resulting in it re-rendering and causing the observed glitch
https://github.com/Expensify/App/blob/9675a77fc073b6197dd844b29e4ac27faf1e480f/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L433-L435
What changes do you think we should make in order to solve the problem?
The simplist solution we can introduce is by actually delaying the focus on the composer so that AttachmentModal has enough time to unmount and wouldn't re-render again.
focus(true);
}, [focus, prevIsFocused, prevIsModalVisible, isFocused, modal.isVisible, isNextModalWillOpenRef]);

Result
https://github.com/Expensify/App/assets/74202751/38b7c9b9-9261-4da0-93db-fe804fdb4a31

Proposal
Please re-state the problem that we are trying to solve in this issue.
Pressing or double pressing ESC on the attachment preview glitches the preview
What is the root cause of that problem?

The AttachmentModal unnecessarily utilizes useCallback for the closeModal function. This prevents React from discarding the cached function.
There is a focus issue when displaying the attachment preview in the modal. The current image in the attachment preview modal is not visually indicated as focused.

What changes do you think we should make in order to solve the problem?
We can remove the useCallback wrapper for the closeModal function. And add focus when displaying the image preview.
For example:
src/components/imageView/index.js
    useEffect(() => {
        if (imageRef) {
            imageRef.current.focus();
            return imageRef.current.blur();
        }
    }, []);
    ...
   <PressableWithoutFeedback
    ...
      ref={imageRef}
   >

Result

https://github.com/Expensify/App/assets/136574831/5821d38d-5afe-4e1f-8355-f6627ce98e15
https://github.com/Expensify/App/assets/136574831/ac4a25cf-3a3c-478f-a583-6139942346d3

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

I think we're reviewing proposals!

hi @abdulrahuman5196! Can you let me know what you think of the current proposals and if you'd like to see more?

Hey @abdulrahuman5196 would you like to see more proposals?

reached out to @abdulrahuman5196 to see if we can get a review of these

Issue not reproducible during KI retests. (First week)

Reviewing now

@Christinadobrzyn I am not able to repro the issue in the latest main. Could you kindly check again if reproducible?

Yep! This is no longer happening. I'll ask QA to test just to make sure.

@Christinadobrzyn I am not able to reproduce
https://github.com/Expensify/App/assets/43996225/f897a7d4-410c-433d-913c-f332fa8c137e

Hi, @Christinadobrzyn, did you press ECS twice on the first attachment preview?

QA confirmed this isn't happening anymore. Going to close!

Ah, it is still happening when you press Esc multiple times... I'll update the OP.

I updated my proposal https://github.com/Expensify/App/issues/27237#issuecomment-1719794579

Rechecking this again.

Got it. able to repro the issue if Esc is pressed multiple times

On @zukilover 's proposal here https://github.com/Expensify/App/issues/27237#issuecomment-1715649797 I am not sure of the root cause, but i tried the solution. It is not solving the issue.
On @astrohunter62 's proposal here https://github.com/Expensify/App/issues/27237#issuecomment-1719794579. I not sure if the root cause is correct. But the solution suggestion like a workaround to not show FlatList on non focused state to avoid the issue. So I am not inclined to the solution.
@Christinadobrzyn Currently there is no proposal to approve, can we increase the bounty given that the issue is couple of weeks old already.

@abdulrahuman5196
I believe the root cause is valid. When I press the 'ESC' key, it triggers the 'onClose' function in the modal.  Consequently, the modal experiences a glitch.

Increased the bounty on this one to get more proposals.

Proposal
Please re-state the problem that we are trying to solve in this issue.
When the Attachment Carousel is open, pressing the "ESC" key multiple times causes the modal to close and then reopen.
What is the root cause of that problem?
The SidebarLinks component has an event listener for the "ESC" key, but it doesn't check whether the modal is currently visible or not. When the "ESC" key is pressed, it triggers the Navigation.dismissModal() function with check modal.willAlertModalBecomeVisible.
https://github.com/Expensify/App/blob/4662f62e8905a969909977a87ebc64cfb72f6d09/src/pages/home/sidebar/SidebarLinks.js#L96-L104
Additionally, the AttachmentModal also calls Navigation.dismissModal() when it hides modal.
https://github.com/Expensify/App/blob/4662f62e8905a969909977a87ebc64cfb72f6d09/src/pages/home/report/ReportAttachments.js#L33

On first "ESC" press, modal is closed by BaseModal component close modal with onBackButtonPress prop, and AttachmentModal call Navigation.dismissModal().
On second "ESC" press, the SidebarLinks component's event listener trigger Navigation.dismissModal().

This leads to two consecutive calls to Navigation.dismissModal(), causing the issue.
Furthermore, the BaseModal component only closes the modal with the "ESC" key using its onBackButtonPress prop, but it doesn't update the modal's visibility status using Modal.setModalVisibility(false). This action write Onyx to modal's visibility.
What changes do you think we should make in order to solve the problem?
To prevent multiple calls to Navigation.dismissModal(), we will check modal visibility in SidebarLinks component with
if(modal.isVisible){
    Navigation.dismissModal();
}

Also, we will add Modal.setModalVisibility(false) to BaseModal onBackButtonPress prop.
onBackButtonPress={() => {
    Modal.setModalVisibility(false);
    onClose();
}}

By implementing these two changes, we will prevent multiple calls to Navigation.dismissModal(). The onBackButtonPress action will set the modal's visibility to false when the modal is closed  with the "ESC" key, ensuring that it won't be called again in the SidebarLinks component.
What alternative solutions did you explore? (Optional)
N/A
Result
result.webm

@bernhardoj Can you confirm https://github.com/Expensify/App/issues/23959 will fix this too?

@bernhardoj For me, it is pretty related cause when we move the modalHide logic to onDismiss, we will not have race condition for Navigation.dismissModal() in SidebarLinks and ReportAttachment
See @ilkeruyanik proposal

I have already asked the team which is bumping the version of RNWeb. Lets test again after the version bump

Thank you @bernhardoj for

I read @ilkeruyanik proposal and I can confirm double Navigation.dismissModal is causing the issue, but I still don't know why double Navigation.dismissModal reopens the attachment carousel. I think it's better to focus on that issue.

I agree on the same.

@ilkeruyanik and @tsa321 both  proposals mentions the issue happens on Navigation.dismissModal() being called twice and providing solutions to make sure only one call is made. But the root cause would need more information on why Navigation.dismissModal() causes the attachment viewer to show the next image and close. Without knowing this, if we only put a solution to make sure only one call is made, we would be putting a workaround solution.
So I would kindly request the contributors to recheck the root cause and add more information on the same.

@abdulrahuman5196
I investigated further this issue, and I found;
When user press ESC two times, the SidebarLinks component's event listener trigger Navigation.dismissModal() as I mentioned in proposal.
However, at that moment, the modal doesn't actually disappear.  It cause trigger onViewableItemsChanged in AttachmentCarousel.
Because we've set the Navigate.route in the onCarouselAttachmentChange prop in the ReportAttachments component, the AttachmentCarousel component's onViewableItemsChanged event also triggers the Navigate.route
https://github.com/Expensify/App/blob/389d7b0c4b96c6f2a2295055c685791d35b65252/src/pages/home/report/ReportAttachments.js#L34-L37
Note that  in this case viewableItems parameters are changed, up to rendered items. You can test it with set props initialNumToRender={1} windowSize={1}  maxToRenderPerBatch={1} on FlatList in AttachmentCarousel. It explains why this bug is not happen when carousel has only one image. Because it has only one rendered element.
On the other hand,  onModalHide is triggered in AttachmentModal component by onBackButtonPress props in the BaseModal component. It call Navigation.dismissModal() second time and return report page.
In summary, the root cause is Sidebarlinks components event listener trigger Navigation.dismissModal() while modal is not disappear. It cause triggers onViewableItemsChanged. It call onCarouselAttachmentChange, finally calls navigate.route.
When we do implication of my proposal, event listener in Sidebarlinks will not call Navigation.dismissModal(). It will solve this issue.

Proposal
Please re-state the problem that we are trying to solve in this issue.
when pressing esc key double time attachement preview glitches
What is the root cause of that problem?
https://github.com/Expensify/App/blob/389d7b0c4b96c6f2a2295055c685791d35b65252/src/pages/home/sidebar/SidebarLinks.js#L81
when pressing esc key SidebarLinks will called first and react native modal onBackButtonPress in baseModal  is called second.
so at the time   willAlertModalBecomeVisible set false so second time pressing esc key SidebarLinks Navigation.dismissModal(); will triggered.
but in the mean time in AttachmentModal -> AttachmentCarousel  we are using flatlist on that we are using onViewableItemsChanged it will triggered based on the viewabilityConfig
https://github.com/Expensify/App/blob/389d7b0c4b96c6f2a2295055c685791d35b65252/src/pages/home/report/ReportAttachments.js#L34-L37
whenever onViewableItemsChanged we are navigating REPORT_ATTACHMENTS.
so when pressing double esc before completing the modal close and open it again.
in basemodal  when onModalHide={hideModal} called only modal will removed completely.
https://www.npmjs.com/package/react-native-modal
so that glitches happened.
What changes do you think we should make in order to solve the problem?
we to prevent the onViewableItemsChanged
options 1)
https://github.com/Expensify/App/blob/389d7b0c4b96c6f2a2295055c685791d35b65252/src/components/Attachments/AttachmentCarousel/index.js#L24
here we need to add
waitForInteraction: true,
https://reactnative.dev/docs/flatlist#viewabilityconfig
options2)
https://github.com/Expensify/App/blob/389d7b0c4b96c6f2a2295055c685791d35b65252/src/components/AttachmentModal.js#L403
here
!_.isEmpty(props.report) && isModalOpen

Proposal
Please re-state the problem that we are trying to solve in this issue.
When clicking "Esc" multiple times, the attachment preview glitches.
What is the root cause of that problem?
The root cause here is buried quite deep and required a lot of debugging, so I'll try to be as detailed as possible here.
TL;DR
When we are hiding the attachments modal, we try to focus the composer, which causes the onScroll event on the FlatList inside the AttachmentCarousel. This causes an avalanche effect of bugs.
This same RCA can be easier reproduced here: https://github.com/Expensify/App/issues/29109
More detailed explanation:
In ComposerWithSuggestions, we are trying to focus the Composer right after we hide the modal:
https://github.com/Expensify/App/blob/01ef03f850047ca36caa21fd38b9f2f8555ef78d/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L481
However, since the modal dismissal is an animated process, it's not happening right away. So we are, in fact, focusing on the composer when the modal is still open. The focus action fires a scroll event, which is then captured by the FlatList inside the AttachmentsCarousel (since FlatList is a combination of a VirtualizedList and a ScrollView).
Here's the call stack that comes all the way back to the ComposerWithSuggestions:

This, as a result, causes the onViewableItemsChanged of the FlatList, which causes glitchy change of the image in this issue, and the endless redirection loop in https://github.com/Expensify/App/issues/29109.
What changes do you think we should make in order to solve the problem?
First, we need to call the composer focus on modal hide with delay:
-       focus();
+       focus(true);
    }, [focus, prevIsFocused, prevIsModalVisible, isFocused, modal.isVisible, isNextModalWillOpenRef]);

https://github.com/Expensify/App/blob/01ef03f850047ca36caa21fd38b9f2f8555ef78d/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L469-L482
Second, the focusWithDelay relies on ComposerFocusManager.isReadyToFocus():
https://github.com/Expensify/App/blob/3789cc36ed4c96ea4e94bf1552d87cc19b66beeb/src/libs/focusWithDelay.ts#L25-L30
This is, in fact, barely useful since the ComposerFocusManager.resetReadyToFocus() is called only in one place, and it's on Android:
https://github.com/Expensify/App/blob/11717c5772c631af6629d443270b8fbf107bf875/src/components/Modal/index.android.js#L12-L14
We should set the composer as "not ready to focus" every time a modal is open, and set it back to "ready to focus" when the modal is dismissed.
For this, we need to add the following prop to the ReactNativeModal component (it was by mistake removed in https://github.com/Expensify/App/pull/25672):
            onModalWillShow={() => {
                ComposerFocusManager.resetReadyToFocus();
            }}

This solution alone would be enough to solve the current issue. However, if we want to fix both this and https://github.com/Expensify/App/issues/29109 in one take, we should make the following change:
Third, we need to correctly handle setting back the composer to "Ready to focus".
Currently, the ComposerFocusManager.setReadyToFocus() is called in 2 places in BaseModal:
https://github.com/Expensify/App/blob/a348859ff43f38c487de96a3f1b4a75428f493b9/src/components/Modal/BaseModal.js#L123-L125
https://github.com/Expensify/App/blob/a348859ff43f38c487de96a3f1b4a75428f493b9/src/components/Modal/BaseModal.js#L75-L77
Calling it in the handleDismissModal was preferred because it's called finally, after the onModalHide. But this specific method is not called in case of a non-fullscreen modal, and it's not called on navigating back via browser navigation.
The non-fullscreen case is handled in hideModal, but since the Attachment modal is full-screen, the "go-back" navigation will not call the ComposerFocusManager.setReadyToFocus(), so the composer will not be focused on closing the attachment preview by navigating back.
That's why my suggestion is to move the ComposerFocusManager.setReadyToFocus() fully into hideModal:
Remove handleDismissModal and make the change:
    const hideModal = useCallback(
        (callHideCallback = true) => {
            if (shouldSetModalVisibility) {
                Modal.setModalVisibility(false);
            }
            if (callHideCallback) {
                onModalHide();
            }
            Modal.onModalDidClose();
-           if (!fullscreen) {
            ComposerFocusManager.setReadyToFocus();
-           }
        },
        [shouldSetModalVisibility, onModalHide, fullscreen],
    );

As a result, we will have both issues fixed.
What alternative solutions did you explore? (Optional)
Optionally, we could only call the ComposerFocusManager.setReadyToFocus() for the attachment modal here:
https://github.com/Expensify/App/blob/7fb66cdd840ba14f5c958dd60fc1bb4f75d58bab/src/pages/home/report/ReportAttachments.js#L33
But I don't see any major reason against my step 3 of this proposal, as it will be more versatile.

The latest proposals have much information which needs dive deep. Will review again tomorrow.

Still investigating. Will close over the weekend.

Thank you everyone for the root cause analysis.
Status so far: I was able to review the root cause which is onViewableItemsChanged of flatlist getting called causing this issue.
I am have checked couple of proposals. Need to do some different platform testing on some of the proposals, before providing more info. Will post here once that is done.

Still investigating. Will provide update sooner

RE-Reviewing now

From investigation, the proposal by @pradeepmdk here https://github.com/Expensify/App/issues/27237#issuecomment-1751743967 seems simpler fixes which is aiming to fix in the attachment component itself which is good compared to other proposals so far.
I tried 1st option and it didn't work for me. Just reducing the flicker time IMO.
2nd option is one I am more inclined for now. But it is showing loading indicator when closing the attachment modal.
https://github.com/Expensify/App/assets/46707890/f9590752-1735-4e54-8206-e43afd407e21
@pradeepmdk Could you check on these concerns and update the proposal if possible to fix the concerns?

@abdulrahuman5196 i updated propsoal. and i agree with @paultsimura my solution not solved https://github.com/Expensify/App/issues/29109 because when we press back button https://github.com/Expensify/App/blob/389d7b0c4b96c6f2a2295055c685791d35b65252/src/components/AttachmentModal.js#L370 it's not triggering. so now the decision with to you but   @paultsimura proposes solving both issues.
but waitForInteraction: true, worked on initially but now not working I am not sure what happened now 😞
and one more thing but all are saying https://github.com/Expensify/App/blob/389d7b0c4b96c6f2a2295055c685791d35b65252/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js#L481 focus on immediately cause this issue. then this issue is always there, right? if we have more images then when navigating between images then no issues on here only thing before navigating images we are facing issues. any idea on this?
ref: (from staging no issues)
https://github.com/Expensify/App/assets/16595846/38574fa3-2d3b-4243-bce7-8c85da009b3e

Hi folks thanks for the detailed discussion.
Just to note simpler fixes are not always workaround fixes. But anyways since the proposal couldn't fix the loading indicator issue and other similar issue we have to drop it.
The proposals left currently to re-review are

@ilkeruyanik proposal here https://github.com/Expensify/App/issues/27237#issuecomment-1746045280 :
I am not aligned on this since the proposal is still attempting to present multiple dismissModal by using stored values. But anyways will compare with other proposals as well.

@tsa321 's proposal here https://github.com/Expensify/App/issues/27237#issuecomment-1746060535
Could you kindly update the proposal if it doesn't included all the changes you have mentioned.

@paultsimura 's proposal here https://github.com/Expensify/App/issues/27237#issuecomment-1753912527
Need to fresh check this one.

Re-reviewing now

Still on this phase going back and forth testing - https://github.com/Expensify/App/issues/27237#issuecomment-1779814093.
Will update in a day.

Hi @abdulrahuman5196 just checking to see if there's any update based on the testing. Thanks!

Hi, Will review today just back from weekend

hi @abdulrahuman5196 can you provide an update for us? Thanks!

Sorry for dragging on. Still investigating proposal. Will cover over weekend or reach out for another C+ on monday.

@abdulrahuman5196 If you want help from another C+, I will be happy to help you cause I have been following this issue from the start.

Sure. Let me check over this weekend, if not will forward.

All the 3 pending proposals are working well. Let me compare them and come back with results.

@paultsimura 's proposal here https://github.com/Expensify/App/issues/27237#issuecomment-1753912527 looks good and work well. It is better than other proposal IMO. Reason being, the main root cause is that onViewableItemsChanged is being called incorrectly from FlatList during our usage. But its not worth some upstream fix and since fix at our end is relatively small in all proposals. And another reason I think of is that if we add Navigation.dismissModal in future in another place, we don't have to do any extra checks specific to this issue.
And I think we can just implement the First change proposed, I think some of the other changes proposed have been already implemented with some other PRs.
🎀 👀 🎀
C+ Reviewed

Thank you, the PR will be ready today.

I'm going ooo until Monday Nov 27th so going to assign another BZ teammate to monitor this until I'm back. Thanks!
Status - reviewing PR! 🎉

@tsa321  let me check if you had proposed the solution first.
Cc: @paultsimura do share if you have thoughts

Looking at the proposals
@tsa321 edit the original proposal to include focus code suggestions only 3 weeks back https://github.com/Expensify/App/issues/27237#issuecomment-1746060535
Whereas @paultsimura had the suggestion on his original proposal in Oct 10 itself https://github.com/Expensify/App/issues/27237#issuecomment-1753912527 that let to my decision.
But seems @tsa321 suggested the solution as part of analysis replies here https://github.com/Expensify/App/issues/27237#issuecomment-1751632831 which happened at Oct 8, 2 days before @paultsimura 's solution.
So if we consider only main proposals @paultsimura would be one to choose.
But I am not sure if we would consider replies and conversations which has code change suggestions as a valid proposals
@tsa321 / @paultsimura  let me know if I got the timelines in any way wrongly.
@hayata-suenaga do you have any suggestions here?
And note for contributors: We have guideline to update original proposal everytime you think of a solution is worth mentioning to avoid this type of concerns.

@abdulrahuman5196 I agree that the proposal of @tsa321 was not updated on time. Because of this, I did not even see those suggested changes before posting my proposal.
But in order not to make a decision based only on this, here are a couple more thoughts:
Setting focus(true) is, in fact, only a partial solution, because without my third proposed change (which I still think we should implement), we have an issue: when clicking the browser "back" button, the composer does not get focused similar to clicking "x" or "esc".

Third, we need to correctly handle setting back the composer to "Ready to focus".

https://github.com/Expensify/App/assets/12595293/594e7d75-1e0d-4cc8-817b-be699d33b027
@tsa321 did not include it in their original discussion but added it in the modified proposal after mine was posted, meaning they considered it valuable enough to be included in the proposal, but missed this change in the discussion.
Here is the behavior with the fix applied:
Fixed focus
https://github.com/Expensify/App/assets/12595293/0c82d48c-14d2-40ab-9d5c-9cbaf111954f

I'd just like to add that in the past, I had a similar situation when my proposal was rejected because as was originally added in a discussion. The reason was that "You should be confident about the proposed solution, so when you have it, it should be reflected in the proposal".
To me, it seems logical that when some new idea comes to mind, it should be reflected in the proposal, otherwise waiting for some extra response before updating the proposal means that the Contributor is not sure about the proposed solution and doesn't want to risk putting it in the proposal before an extra confirmation.
I would prefer to avoid going back and forth further here because it can lead to some personal confrontations. I'll let @abdulrahuman5196 and @hayata-suenaga make the further decision taking into account the timing and these 2 comments:
https://github.com/Expensify/App/issues/27237#issuecomment-1817412283
https://github.com/Expensify/App/issues/27237#issuecomment-1817417013

I'm going ooo until Monday Nov 27th so going to assign another BZ teammate to monitor this until I'm back. Thanks!
Status: working on PR

Thanks. To keep things relatively fair for all, I'd like to offer $250 of my bounty to @tsa321 when the issue gets fixed.

This PR is in review so moving with GH to weekly.

@Christinadobrzyn the PR is already approved & merged 🤔

Sorry that was my lazy way of writing, "we're waiting for the PR to go into production so this can be paid".

prepping for payment
Payouts due:
Issue Reporter: $250 @dhanashree-sawant (in Upwork)
Contributor: $1000 @paultsimura (in Upwork)
Contributor+: $1000 @abdulrahuman5196 (in Upwork)
Eligible for 50% #urgency bonus? N
Upwork job is here.
@abdulrahuman5196 do we need a regression for this?

Thank you @Christinadobrzyn
Based on this comment: https://github.com/Expensify/App/issues/27237#issuecomment-1820835956, could you please split my bounty into $750 for me, and $250 for @tsa321?

The PR that introduced the bug has been identified. Link to the PR:
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:
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:

Not a regression.

Determine if we should create a regression test for this bug.

Yes.

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.

Attach multiple images in a chat
Open the first uploaded image
Click on ESC multiple times
Verify that the attachment modal doesn't reopen
Open an attachment again
Click the "Back" button in the browser
Verify that the composer gets focused
Open an attachment again
Click the "X" button on the modal
Verify that the composer gets focused

@Christinadobrzyn

Awesome! Thanks @abdulrahuman5196!
I paid you and @paultsimura in Upwork based on this payment structure https://github.com/Expensify/App/issues/27237#issuecomment-1841947725
@tsa321 and @dhanashree-sawant can you accept the Upwork offer and I'll pay you?

Hi @Christinadobrzyn, sorry for the delay, the job was actually raised after 30 August but you have sent me 250$ offer, can you rectify it once to 50$?

Thanks @tsa321! I paid you in Upwork.
Thanks for catching that @dhanashree-sawant  - I got my dates mixed up - I sent you a modified offer, would you mind accepting so I can pay you?

That's fine, I have accepted the offer.

Thanks @dhanashree-sawant! I paid you in Upwork based on our payment summary.
This is good to close - thanks everyone!


How to add Controller in Chart????

Hello
Please help me how to add different types of controller in chart???
Thanks,
Kaushik

Hi Kaushik,
Sorry for delayed response.
I would like you thank for using this package and for valuable feedback.
Can you elaborate your use case a little more may be i can improve it.
Looking forward to hear from you.
Thanks

Hi @scopdrag ,
Currently i solved issued.
and thanks for this useful package.
Thanks,
Kaushik

Thanks Kaushik. I appreciate your decision.

I installed this package and implemented one of your examples but I get the following error.
Have you seen this before - I'm at a loss.  The view shows up fine when i remove the request to chart
ErrorException in FileViewFinder.php line 137:
View [bar-chart] not found. (View: C:\Users\jensmith\Harvard\cscie15\dev\a4\resources\views\stocks\show.blade.php)
in FileViewFinder.php line 137
at CompilerEngine->handleViewException(object(InvalidArgumentException), 1) in PhpEngine.php line 44
at PhpEngine->evaluatePath('C:\Users\jensmith\Harvard\cscie15\dev\a4\storage\framework\views/597abb7f51960a7017277348bbfed83e32adc1e5.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'stock' => object(Stock), 'rows' => array(array('Mon', 20, 28, 38, 45), array('Tue', 31, 38, 55, 66), array('Wed', 50, 55, 77, 80), array('Thu', 77, 77, 66, 50), array('Fri', 68, 66, 22, 15)), 'options' => array('legend' => 'none'), 'cols' => array())) in CompilerEngine.php line 59
at CompilerEngine->get('C:\Users\jensmith\Harvard\cscie15\dev\a4\resources\views/stocks/show.blade.php', array('__env' => object(Factory), 'app' => object(Application), 'errors' => object(ViewErrorBag), 'stock' => object(Stock), 'rows' => array(array('Mon', 20, 28, 38, 45), array('Tue', 31, 38, 55, 66), array('Wed', 50, 55, 77, 80), array('Thu', 77, 77, 66, 50), array('Fri', 68, 66, 22, 15)), 'options' => array('legend' => 'none'), 'cols' => array())) in View.php line 137
at View->getContents() in View.php line 120


replace Esc by Ins in new board helping to improve ux

I was lost in your tool because I keep pushin Esc when I want to exit a input.
It just cancel my input I was looking how to validate the input so I go to debug mode to find it

Extremely sorry, i forgot to change the help messages. Thank you for your PR


Investigate and fix bug with displaying dates so we can merge Service end date feature

Issue description
https://github.com/studentinsights/studentinsights/pull/1100#issue-260753987
Notes
@jngai, I think the best way to debug this would be to log into the demo site (either locally or on the web), click through to a Student Profile, and explore why the dates are being rendered as "Invalid date."

@alexsoble Quick question, that invalid date is due to a new field. Did you migrate the production/staging database?

Also for existing services data in production, there may not be anything stored for estimated_end_date either.

@Jngai Good point.
I'd suggest we add a migration to backfill all of that missing data when possible . . . if a future DiscontinuedService exists then it could be used as the estimated end date, for example.
And when there's no data we can use to backfill, I'd suggest we simply remove the "Scheduled at" line instead of having it say "Scheduled to End Invalid date." The latter isn't user-friendly, it's confusing.

@alexsoble I added a valid check on the datetime in my new pr #1105 , plus a I wrote a rake task to backfill the services estimated end date with their discontinuedservice discontinued at. Since a service can have many discontinuedservice, I just chose the first one. If its the last one, let me know. I tried locally and is working.
Do we have an auto deploy thing going on so all master commits head into demo site?

Addressed by @Jngai in #1105.


Wrong line number in the profiler

Running this file
using LinearAlgebra

function bar(x)
    if x < 0.5
        return round(Int64, exp(x))
    else
        return exp(x)
    end
end

function foo(n)
    for i = 1:n
        for j = 1:10000
            bar(rand())
        end
    end
end

foo(3)

Juno.@profiler foo(10000)

gives me

Clearly, nothing is there in the first line but Juno profiler is showing that most of the time has been consumed by the it.
In REPL:
julia> include("playground.jl")

julia> using Profile

julia> @profile foo(10000)

julia> Profile.print(format=:flat, sortedby=:count, mincount=100)
 Count File                                                Line Function
   122 .\float.jl                                           403 -
   136 ...\usr\share\julia\stdlib\v1.3\Random\src\RNGs.jl   296 default_rng
   142 .\special\exp.jl                                     117 exp(::Float64)
   184 ...sr\share\julia\stdlib\v1.3\Random\src\Random.jl   256 rand
   222 ...ace\MoireRelaxation.jl\playground\playground.jl    14 foo(::Int64)
   609 .\boot.jl                                            330 eval(::Module, ::Any)
   609 .\task.jl                                            333 (::REPL.var"#26#27"{REPL.REPLBackend})()
   609 ...ld\usr\share\julia\stdlib\v1.3\REPL\src\REPL.jl    86 eval_user_input(::Any, ::REPL.REPLBackend)
   609 ...ld\usr\share\julia\stdlib\v1.3\REPL\src\REPL.jl   118 macro expansion

I don't see such a contribution.

Could repro this. Seems like a problem in the upstream:

Posted upstream issue at https://github.com/timholy/FlameGraphs.jl/issues/21

Right, then let's just hide everything out-of-range in the in-editor display for now.

The display issue will be fixed with https://github.com/JunoLab/atom-ink/pull/260.

Is this issue already reported in the julia repository?


Add "Do Not Delegate" to AID creation screens as an advanced option

Allow for configurable defaults and disablement.
RootGAR must be delegator-able and Establishment Only


Packages its .git directory

This module ships with a /modules/_CodeMirror/.git/ directory that I assume is an error in the packaging script. Omitting the .git directory if it's not needed would reduce the size of the module and eliminate cruft.

This should have been corrected in the latest release.

This should have been corrected in the latest release.

It has been, indeed. Sorry for the noise and thanks for your work on Foundry plugins.

It has been, indeed. Sorry for the noise and thanks for your work on Foundry plugins.


default sslmode=required is invalid

Describe the bug
Hello 👋
I tried to deploy everything with terraform and get the admin-console running but I ran into a problem:
$ go run ./tools/admin-console
{"severity":"info","ts":1590400772.045519,"logger":"default","caller":"envconfig/envconfig.go:120","message":"resolving secret value for \"DB_PASSWORD\" (toFile=false)"}
{"severity":"info","ts":1590400772.4580789,"logger":"default","caller":"envconfig/envconfig.go:89","message":"loaded environment"}
{"severity":"info","ts":1590400772.458146,"logger":"default","caller":"setup/setup.go:73","message":"Effective environment variables: &{Port:8080 TemplatePath:./tools/admin-console/templates Database:0xc0002645b0 TopFile:top BotFile:bottom}"}
{"severity":"info","ts":1590400772.458175,"logger":"default","caller":"database/connection.go:40","message":"Creating connection pool."}
2020/05/25 11:59:32 setup.Setup: unable to connect to database: creating connection pool: cannot parse `port=5400 sslmode=required password=<REDACTED> dbname=main user=notification host=localhost`: failed to configure TLS (sslmode is invalid)
exit status 1

I can make it work without using ssl by explicitly exporting this ENV var
$ export DB_SSLMODE=disable
$ go run ./tools/admin-console
... works as expected

To Reproduce
terraform apply

gcloud auth login && gcloud auth application-default login
export DB_CONN=$(terraform output db_conn)
export DB_USER=$(terraform output db_user)
export DB_PASSWORD="secret://$(terraform output db_pass_secret)"
export DB_PORT=5400
export DB_NAME=$(terraform output db_name)
cloud_sql_proxy -instances=$DB_CONN=tcp:$DB_PORT &

go run ./tools/admin-console

Expected behavior
sslmode should be either require by default or disable or it should be mentioned in the docs

sslmode should be “disable” when using the Cloud SQL Proxy. Otherwise it should be “require”, “verify-ca”, or “verify-full”. When using the proxy, your connection is still encrypted, but you talk to the proxy over localhost and the proxy handles TLS.

/assign
I'll update the docs accordingly. Cloud SQL proxy uses a local socket w/ ssl disabled and manages the SSL connection between your workstation and the Cloud SQL VM.


Update for v1.1.1

Signed-off-by: Christopher Schröder<EMAIL_ADDRESS>
Checklist

[x] Used a personal fork of the feedstock to propose changes
[ ] ~Bumped the build number (if the version is unchanged)~
[ ] ~Reset the build number to 0 (if the version changed)~
[ ] ~Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)~
[x] Ensured the license file is being packaged.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.


Improve section.cpp for USA Demo 1

I ran into problems with inlining when trying to match Section::run(). Its pretty close otherwise.

Well thats awkward, lemme put this into draft first and i'll look into this.

Ok looks like we're good to go.


🌟 Create functionality to download datasets from ONA server

Create functionality to download datasets from ONA server. The function should work with small to large datasets, ensuring pagination during download.

Great!! I have some experience with this in python.

Amazing! This plus with what I have just shared with you, I think we will have a solid function that is very handy to the team.


Mystery Text Discussion: web.txt

Post your screenshots and discuss your findings about web.txt here!

For this assignment, I chose to analyze the content of the "www.txt" file using AntConc. As I experimented with the software, I observed that many of the frequently repeated words in the text were "fillers," such as "and," "but," "for," and "a." These words dominated the search results in the NGRAM tab, with most appearing over 100 times. When I shifted to the KWIC (Key Word in Context) view, one word in particular stood out: "for." The KWIC search revealed that "for" commonly appeared in specific phrases, such as "for the most part" (11 times), "for the first time" (9 times), and "for a moment" (19 times). This insight highlighted for me how often certain phrases are used in everyday language, even if we may not consciously notice their frequency.

As I looked into the web text file, I found that as I increased the ngram size, the type of words outputted be more "interesting".
Here is ngram: 6, compared to:

Ngram 2:

The words in ngram 6 are less frequent but it's cool to see how an authors style can be caught from these higher ngrams. Opposed to ngram 2, it just outputs generic words thaqt do not really provide context. More than anything, the higher ngrams gave me an idea of what text I was reading. But I will give credit to ngram 2 and 3 for showing me the key characters in this text.
KWIC Aspect
Narrowing in on the character name "Mr. Heathcliffe" unveiled several details of the text that I wouldn't have received before in ngram portion of my findings. I was able to learn more about the time this text was set, and a general premise of the story.

<img width="1211" alt="Screenshot 2024-11-13 at 9 13 48 AM" src="https://github.com/user-attachments/assets/1751c141-e7f4-4018-a7be

-62c2cf6d5c75">
Eventually, I found out the text with some serious scanning. Anyone who has read Pride and Prejudice has most definitely read Wuthering Heights!

Using AntConc, I explored the word "master" and found it frequently used in different contexts. It often reflects authority or relationships in the story. For example: "master’s assistance in coaxing him out of bad ways." and "master availed himself of his privilege to walk straight in." This shows that "master" is connected to power and control which involves interactions with other characters.  I also checked for repeated phrases using the n-grams tab. Most longer phrases (6 words) only appeared once such as "master angrily get him something that" and "master and mistress whose flushed cheeks". Shorter phrases appeared more often which might highlight recurring themes or actions.

The word "said" appears a lot in this dialogue. Some examples are "Said the young lady, scowling and turning her face." and "Said the master, angrily: 'Get him something that he can.'" This shows that "said" is often paired with emotional or descriptive actions making dialogue a big part of the story. For longer phrases with "said," most appeared only once when using the n-gram tab. Shorter phrases were more common, showing patterns in how characters speak.


Update dependencies in package.json to latest and add peerDependencies

{
  "peerDependencies": {
    "mocha": ">=1.18 <3"
  },
  "dependencies": {
    "mocha": "^2.1.0"
  },
  "devDependencies": {
    "browserify": "^8.0.2",
    "chai": "^1.9.1",
    "eslint": "^0.11.0",
    "istanbul": "^0.3.2",
    "jsdoc": "^3.3.0-alpha9",
    "jsonlint": "^1.6.2",
    "mockery": "~1.4",
    "shelljs": "^0.3.0",
    "sinon": "^1.10.3"
  }
}

Can you explain what you are suggesting and why?

Can you explain what you are suggesting and why?

I'm going to look at how switching to peerDependencies would affect existing projects.

Thanks @nzakas. Sorry for the delayed replied. Going forward will split up my PR. Looking forward to the peerDependencies changes.

No worries, the change has been merged in. I'm working on #2 at the moment, and when that's done, we'll do another release.

Turns out #2 will be a breaking change, so I'm going to push out the peerDependencies change as a patch first.

Published 1.0.3 with this change.


cannot install wheel from private pypi

We have built some wheels and uploaded to our private pypi. We can install them with pip, but not with pipenv.
My Pipfile:
[[source]]
url = "https://pypi.doubanio.com/simple"
verify_ssl = true
name = "pypi"

[[source]]
url =<EMAIL_ADDRESS>verify_ssl = true
name = "private"

[packages]
sasl = {index = "private"}

Got an error in running pipenv install:
Updated Pipfile.lock (72b261)!
Installing dependencies from Pipfile.lock (72b261)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:00
An error occurred while installing sasl==0.2.1 --hash=sha256:a86aed371778feee7340f1c504996f2aed3da1747e89005c1f4801c4bc9fa95f --hash=sha256:04f22e17bbebe0cd42471757a48c2c07126773c38741b1dad8d9fe724c16289d! Will try again.
Installing initially failed dependencies…
(sasl build errors)
ERROR: Couldn't install package: sasl

Some debug info:
Looking in indexes: https://pypi.doubanio.com/simple<EMAIL_ADDRESS><EMAIL_ADDRESS>
2 location(s) to search for versions of sasl:
* https://pypi.doubanio.com/simple/sasl/
*<EMAIL_ADDRESS>
Fetching project page and analyzing links: https://pypi.doubanio.com/simple/sasl/
Getting page https://pypi.doubanio.com/simple/sasl/
Found index url https://pypi.doubanio.com/simple
Looking up "https://pypi.doubanio.com/simple/sasl/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.doubanio.com:443
https://pypi.doubanio.com:443 "GET /simple/sasl/ HTTP/1.1" 304 0
  Found link https://pypi.doubanio.com/packages/9c/77/e2b33cb181d7d8b65e5541cee50d075b88a79456e71d8ebff398852ec19e/sasl-0.1.1.tar.gz#sha256=902e2fc57f0f1d0e40da0f05b20b7bffd7ccc90d9c123fb375581021fc2a7624 (from https://pypi.doubanio.com/simple/sasl/), version: 0.1.1
  Found link https://pypi.doubanio.com/packages/e2/52/8c1ce738d94654371565403b9c9468f2f0acf423c81a9a73d969f91ff98a/sasl-0.1.2.tar.gz#sha256=07e774f633de1b3cf0e1d0bdc9e02cd2f08fd5d8d9a4c073f33aedab4de9ffd4 (from https://pypi.doubanio.com/simple/sasl/), version: 0.1.2
  Found link https://pypi.doubanio.com/packages/73/e1/c38a11a2bca79d6857dfcfb539a7b615d06bc60e029980d057be469594e2/sasl-0.1.3.tar.gz#sha256=4f324226e1ee85ac41520579ba9de703294012602e536217fd0e7456e147d886 (from https://pypi.doubanio.com/simple/sasl/), version: 0.1.3
  Found link https://pypi.doubanio.com/packages/7e/cf/dd5d00ca015b0ab2e9981b0dc37a40054165bbcc83a003fa23b3b558868c/sasl-0.1.tar.gz#sha256=c4262541ec852f620656eac4797984e28cf6d2d7caeff110c64705660538390b (from https://pypi.doubanio.com/simple/sasl/), version: 0.1
  Found link https://pypi.doubanio.com/packages/8e/2c/45dae93d666aea8492678499e0999269b4e55f1829b1e4de5b8204706ad9/sasl-0.2.1.tar.gz#sha256=04f22e17bbebe0cd42471757a48c2c07126773c38741b1dad8d9fe724c16289d (from https://pypi.doubanio.com/simple/sasl/), version: 0.2.1
Fetching project page and analyzing links<EMAIL_ADDRESS>
Getting page<EMAIL_ADDRESS>
Found credentials in url for example.com
Looking up "https://example.com/repository/pypi-internal/simple/sasl/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): example.com:443
https://example.com:443 "GET /repository/pypi-internal/simple/sasl/ HTTP/1.1" 200 None
Updating cache with response from "https://example.com/repository/pypi-internal/simple/sasl/"
  Found link https://example.com/repository/pypi-internal/packages/sasl/0.2.1/sasl-0.2.1-cp36-cp36m-linux_x86_64.whl#md5=ccb31f06b5526e7c043e781af9f75455 (from https://example.com/repository/pypi-internal/simple/sasl/), version: 0.2.1
Checked 2 links for project 'sasl' against 2 hashes (1 matches, 0 no digest): discarding 1 non-matches:
  https://example.com/repository/pypi-internal/packages/sasl/0.2.1/sasl-0.2.1-cp36-cp36m-linux_x86_64.whl#md5=ccb31f06b5526e7c043e781af9f75455 (from https://example.com/repository/pypi-internal/simple/sasl/)

Pipenv found the wheel, but ignored it due to a hash dismatch.
How could I install the wheel?

$ pipenv --support
Pipenv version: '2020.6.2'
Pipenv location: '/home/yucheng.cai/knobs/venv/lib/python3.6/site-packages/pipenv'
Python location: '/home/yucheng.cai/knobs/venv/bin/python3'
Python installations found:

3.6.8: /home/yucheng.cai/knobs/venv/bin/python3.6
3.6.8: /home/yucheng.cai/knobs/venv/bin/python3
3.6.8: /home/yucheng.cai/knobs/venv/bin/python3.6
3.6.8: /home/yucheng.cai/knobs/venv/bin/python3
3.6.8: /usr/bin/python3
3.6.8: /usr/bin/python3.6m
3.6.8: /usr/bin/python3.6
2.7.5: /usr/bin/python2
2.7.5: /usr/bin/python2.7

PEP 508 Information:
{'implementation_name': 'cpython',
 'implementation_version': '3.6.8',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '3.10.0-957.1.3.el7.x86_64',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Thu Nov 29 14:49:43 UTC 2018',
 'python_full_version': '3.6.8',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

XDG_SESSION_ID
rvm_bin_path
HOSTNAME
GEM_HOME
TERM
SHELL
HISTSIZE
IRBRC
SSH_CLIENT
OLDPWD
MY_RUBY_HOME
SSH_TTY
USER
LS_COLORS
rvm_path
VIRTUAL_ENV
rvm_prefix
MAIL
PATH
PWD
LANG
PS1
HISTCONTROL
rvm_version
SHLVL
HOME
LOGNAME
GEM_PATH
SSH_CONNECTION
LESSOPEN
XDG_RUNTIME_DIR
RUBY_VERSION
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:
Debug–specific environment variables:

PATH: /home/yucheng.cai/knobs/venv/bin:/usr/local/rvm/gems/ruby-2.4.1/bin:/usr/local/rvm/gems/ruby-2.4.1@global/bin:/usr/local/rvm/rubies/ruby-2.4.1/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/local/rvm/bin:/opt/cassandra/bin:/home/yucheng.cai//.local/bin:/home/yucheng.cai//bin
SHELL: /bin/bash
LANG: en_US.UTF-8
PWD: /home/yucheng.cai/knobs
VIRTUAL_ENV: /home/yucheng.cai/knobs/venv

I think the problem here is that pipenv is pulling the hashes from pypi.org for some reason. Because your particular private package has a name collision with a public package, it is causing a hash mismatch, because it managed to get the right hash on one side of the equation but not the other.
I am also experiencing this.
@craynic I wonder, does your private package have dependencies that are also private but have name collisions with a public package? Are those getting resolved correctly?

There should be no collision. My private package is just a wheel built from the source package on pypi. No other dependencies or modifications.

There should be no collision. My private package is just a wheel built from the source package on pypi. No new dependencies or modifications.

When I say collision, I mean that the name of your private package (which appears to be 'sasl' in this case) is also the name of a package on pypi.org (https://pypi.org/project/sasl/). The hash you are comparing against is the hash available on pypi.org.
As for the dependencies, I was trying to explore whether we could replicate in your environment the problem that I am experiencing. Would it be possible for you to mock up some private repo packages that depend on each other while also depending on public packages from PyPI?

There should be no collision. My private package is just a wheel built from the source package on pypi. No new dependencies or modifications.

When I say collision, I mean that the name of your private package (which appears to be 'sasl' in this case) is also the name of a package on pypi.org (https://pypi.org/project/sasl/). The hash you are comparing against is the hash available on pypi.org.
As for the dependencies, I was trying to explore whether we could replicate in your environment the problem that I am experiencing. Would it be possible for you to mock up some private repo packages that depend on each other while also depending on public packages from PyPI?

It's possible and very common that multi packages have the same name even in one repository. I don't think it's mistake that they exist in two repositories.
And, I don't think it makes sense that two packages depends on each other. You could create a new virtual package depending on all of them.

What is the content of your Pipfile.lock?

I've lost the lock file.
Well it should had locked with the hash of the wheel package, Because the hash in the log is different from the hash of the source package on pypi.

Stale issue -- it is definitely possible to install a wheel from a private pypi on recent pipenv versions.


Add support for rpm packaging

Add support to generate rpm packages for HPX.
Proposed Changes

Add HPX_WITH_RPM to generate a rpm packages using the cpack package
make package target generates the rpm packages containing the current HPX version

Any background context you want to provide?
make package generates hpx-1.2.0-1.x86_64.rpm in the build folder. The rpm packages contains boost, hwloc, and gperftools as its dependencies.
sudo dnf install hpx-1.2.0-1.x86_64.rpm  install the headers, documentation, and all examples to /usr/local and installs the missing dependencies if they are not installed.
The package was generated on my desktop and installed within a VM using the same version of Fedora 28 and I was able to run the examples on the VM.
Once we have the debian package as well, the next step would be to integrate the packaging into our build process on circle-ci and store them as artifacts.

Yes, it will work on any rpm-based distribution, but was only tested on Fedora since I am using fedora, but the rpm package does not depend on Fedora.
Yes, you can generate rpms on debian systems by installing the rpm package.

I did some rpm builds of 1.2.0-rc1 on Opensuse, which have different issue, see #3509, #3510, #3511.

I did some rpm builds of 1.2.0-rc1 on Opensuse, which have different issue, see #3509, #3510, #3511 and #3512. These platforms should be supported for an rpm package.

Thanks @junghans! I'm not sure however if we will be able to support all of the mentioned platforms. Some of the problems you reported (thanks!) are easily fixable, though.

@hkaiser also see: https://github.com/diehlpk/hpx_packaging/issues/3

@diehlpk do you think we can close this? The official spec that you've worked on for Fedora is not generated (directly) by CPack. The only remaining use case would be sysadmins wanting to customize the spec for their system but considering the time you've put on the specs they're probably better off starting with your official spec anyway. Any other reason to include this in our repo?
Maybe you could update the Fedora instructions in our documentation?

OpenSUSE is in review too: https://build.opensuse.org/request/show/650301

@diehlpk do you think we can close this? The official spec that you've worked on for Fedora is not generated (directly) by CPack. The only remaining use case would be sysadmins wanting to customize the spec for their system but considering the time you've put on the specs they're probably better off starting with your official spec anyway. Any other reason to include this in our repo?
Maybe you could update the Fedora instructions in our documentation?

The offical spec file build hpx with gcc, openmpi, and mpich. maybe someone does not want to have all this builds or want to enable papi or other packages in his rpm.
I would prefer to keep it in the CMake file. it does not hurt if it is there or?
I like to take care of it, when it would need updates in future.

Yeah, hpx should fit Fedora 28 and 29 soon, please test it with:
dnf install hpx --enablerepo=updates-testing

On Fedora 29 it was not available, but I will test it tomorrow again.

Yeah, hpx should fit Fedora 28 and 29 soon, please test it with:
dnf install hpx --enablerepo=updates-testing

On Fedora 29 it was not available, but I will test it tomorrow again.

Yeah, it is still pending: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a9b53adbdc

I would prefer to keep it in the CMake file. it does not hurt if it is there or?

No, I don't think so. If you think it's useful it can definitely go in!

Yeah, hpx should fit Fedora 28 and 29 soon, please test it with:
dnf install hpx --enablerepo=updates-testing

On Fedora 29 it was not available, but I will test it tomorrow again.

Yeah, it is still pending: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a9b53adbdc

It is in testing now.

Yeah, hpx should fit Fedora 28 and 29 soon, please test it with:
dnf install hpx --enablerepo=updates-testing

On Fedora 29 it was not available, but I will test it tomorrow again.

Yeah, it is still pending: https://bodhi.fedoraproject.org/updates/FEDORA-2018-a9b53adbdc

It is in testing now.

I installed all three different versions of the example package and tested the hello_world example with mpirun for openmpi and mpich and it was working. I will later compile a small hpx application with the devel package.

OpenSuse is done, now we just have to wait for Leap:15.1 integration: https://build.opensuse.org/request/show/652750

And Fedora has two more days till stable:
https://bodhi.fedoraproject.org/updates/FEDORA-2018-9da04dcdf5
https://bodhi.fedoraproject.org/updates/FEDORA-2018-282193eb69

@junghans, @diehlpk Can this be closed now?

I think this isn't merged yet!

https://github.com/diehlpk/hpx/pull/1 is also still open.

I think this isn't merged yet!

Yes, I was busy with some administrative related things, which had to be finished soon. I will work on this today.

I think this isn't merged yet!

Yes, I was busy with some administrative related things, which had to be finished soon. I will work on this today.

I think this isn't merged yet!

Yes, I was busy with some administrative related things, which had to be finished soon. I will work on this today.

@msimberg The latest commit should address your review

@msimberg I cleaned up and added the pgp key again

Thanks @diehlpk! Looks good except that the addition to release_procedure.rst is now missing... If you add that back in I'll merge this.

Thanks @diehlpk! Looks good except that the addition to release_procedure.rst is now missing... If you add that back in I'll merge this.

@msimberg I added it again, it somehow got lost when I squashed my commits.


Domain=NSPOSIXErrorDomain Code=40 "Message too long"

What did you do?
I used a post request with a streamed body to send a large data in body as below
func request<T: Decodable>(_ endpoint: Endpoint) -> AnyPublisher<Result<T, NetworkError>, Never> {
        let requestModifier: Session.RequestModifier = { request in
            if let dicToStream = endpoint.bodyToStream {
                let jsonData = try? JSONSerialization.data(withJSONObject: dicToStream, options: [])
                if let jsonData = jsonData {
                    let inputStream = InputStream(data: jsonData)
                    request.httpBodyStream = inputStream
                }
            }
        }
        NetworkManager.authenticator.endPoint = endpoint
        return session.request(endpoint.url,
                               method: endpoint.httpMethod,
                               parameters: endpoint.httpMethod == .get ? endpoint.parameters : nil,
                               encoding: endpoint.httpMethod == .get ? URLEncoding.default : JSONEncoding.default,
                               headers: HTTPHeaders(endpoint.headers ?? [:]),
                               requestModifier: requestModifier)
            .customValidate(url: endpoint.url)
            .cURLDescription { description in
                self.logRequest(endpoint, description)
            }
            .publishResponse(using: CustomResponseSerializable<T>(endpoint: endpoint))
            .map { result in
                result.value!
            }
            .eraseToAnyPublisher()
    }

What did you expect to happen?
I expect data sent correctly
What happened instead?
An error occurred alot of time on several real device
"Alamofire. AFError.sessionTaskFailed(error: Error
Domain=NSPOSIXErrorDomain Code=40 "Message too long"
Userinfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask.<42>, _KCFStreamErrorDomainKey=1,
NSErrorPeerAddressKey=<CFData0×600000f622e0[Ox1bbb34418]>{length=28,capacity
= 28, bytes = 0x1c1e01bb000000002606470030330000 ...<PHONE_NUMBER>000000},
_kCFStreamErrorCodeKey=40,_NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask.<42>"
)}))"
Alamofire Environment
Alamofire (5.6.4)

There's really no point to that streaming you're trying to do, as JSONSerialization creates the entire data blob before it's sent to the InputStream.
Can you try using one of the upload methods? Perhaps that will work better for large POSTs.
In any event, can you also include the device, OS version, and Xcode version you're using? Additionally, a reproducible test case would help investigate.

Investigation shows this is most likely a URLSession bug, as Alamofire (as a user of URLSession) can't control how URLSession breaks up its messages. It's likely only an issue on particular OS versions. Unfortunately I don't believe there's anything Alamofire can do here. Like I said, I'd get rid of that streaming body implementation, I don't think it's doing anything, and perhaps look at using the .upload methods if there are particular requests with large bodies, perhaps URLSession avoids the bug with that upload method.

The problem never occurred while we were using the internal RestClient library provided by the Salesforce mobile SDK.
We decided to use our backend to connect to Salesforce, and I used the Alamofire library. Then the problem occurred.
I dont think its URLSession error because Salesforce SDK uses the default NSURLSessionDataTask as below
SalesForce SDK
https://github.com/forcedotcom/SalesforceMobileSDK-iOS
We use this to build the request
- (SFRestRequest *)requestForCreateWithObjectType:(NSString *)objectType
                                           fields:(NSDictionary *)fields
                                       apiVersion:(NSString *)apiVersion {
    NSString *path = [NSString stringWithFormat:@"/%@/sobjects/%@", [self computeAPIVersion:apiVersion], objectType];
    SFRestRequest *request = [SFRestRequest requestWithMethod:SFRestMethodPOST path:path queryParams:nil];
    return [self addBodyForPostRequest:fields request:request];
}

And this to send the request

(SFRestRequest *)requestForCreateWithObjectType:(NSString *)objectType
fields:(NSDictionary *)fields
apiVersion:(NSString *)apiVersion {
NSString *path = [NSString stringWithFormat:@"/%@/sobjects/%@", [self computeAPIVersion:apiVersion], objectType];
SFRestRequest *request = [SFRestRequest requestWithMethod:SFRestMethodPOST path:path queryParams:nil];
return [self addBodyForPostRequest:fields request:request];
}

And they use stream to set body
- (void)setCustomRequestBodyData:(NSData *)bodyData contentType:(NSString *)contentType {
    if (bodyData == nil) {
        bodyData = [NSData data];
    }
    NSInputStream *(^bodyStreamBlock)(void) = ^{
        return [NSInputStream inputStreamWithData:bodyData];
    };
    [self setCustomRequestBodyStream:bodyStreamBlock contentType:contentType];
    [self setHeaderValue:[NSString stringWithFormat:@"%lu", (unsigned long)[bodyData length]] forHeaderName:@"Content-Length"];
}

NSURLSessionDataTask
- (void)enqueueRequest:(SFRestRequest *)request requestDelegate:(id<SFRestRequestDelegate>)requestDelegate shouldRetry:(BOOL)shouldRetry {
    __weak __typeof(self) weakSelf = self;
    NSURLRequest *finalRequest = [request prepareRequestForSend:self.user];
    if (finalRequest) {
        SFNetwork *network;
        __block NSString *instanceIdentifier;
        if (request.serviceHostType == SFSDKRestServiceHostTypeCustom) {
            instanceIdentifier = [SFNetwork uniqueInstanceIdentifier];
            network = [self networkForRequest:request identifier:instanceIdentifier];
        } else {
            network = [self networkForRequest:request];
        }
        NSURLSessionDataTask *dataTask = [network sendRequest:finalRequest dataResponseBlock:^(NSData *data, NSURLResponse *response, NSError *error) {
            __strong typeof(weakSelf) strongSelf = weakSelf;
            [SFNetwork removeSharedInstanceForIdentifier:instanceIdentifier];

            // Network error.
            if (error) {
                [SFSDKCoreLogger d:[strongSelf class] format:@"REST request failed with error: Error Code: %ld, Description: %@, URL: %@", (long) error.code, error.localizedDescription, finalRequest.URL];
                id dataForDelegate = [strongSelf prepareDataForDelegate:data request:request response:response];
                [strongSelf notifyDelegateOfFailure:requestDelegate request:request data:dataForDelegate rawResponse:response error:error];
                return;
            }

            // Timeout.
            if (!response) {
                [strongSelf notifyDelegateOfFailure:requestDelegate request:request data:nil rawResponse:nil error:nil];
                return;
            }
            NSInteger statusCode = [(NSHTTPURLResponse *)response statusCode];

            // 2xx indicates success.
            if ([SFRestAPI isStatusCodeSuccess:statusCode]) {
                id dataForDelegate = [strongSelf prepareDataForDelegate:data request:request response:response];
                [strongSelf notifyDelegateOfSuccess:requestDelegate request:request data:dataForDelegate rawResponse:response];
            } else {
                if (shouldRetry && statusCode == 401) {

                    // 401 indicates refresh is required.
                    [strongSelf replayRequest:request response:response requestDelegate:requestDelegate];
                } else {

                    // Other status codes indicate failure.
                    NSError *errorForDelegate = [strongSelf prepareErrorForDelegate:data response:response];
                    id dataForDelegate = [strongSelf prepareDataForDelegate:data request:request response:response];
                    [strongSelf notifyDelegateOfFailure:requestDelegate request:request data:dataForDelegate rawResponse:response error:errorForDelegate];
                }
            }
        }];
        request.sessionDataTask = dataTask;
    }
}

@jshier I will try the upload method and let you know how it goes.

Yes, different ways of using URLSession may lead to different bugs given the different code paths each method uses. I'd expect this issue to be limited to particular OS versions that have this bug, so you'll want to look into that. In any case there are a few things I recommend.

Remove that httpBodyStream integration you have, it does nothing since you're using Data that's already entirely in memory. Removing it should simplify your code.
If your bodyData is truly large you can use the DeflateRequestCompressor introduced in Alamofire 5.7 to reduce the size. Just add the requestInterceptor: .deflateCompressor parameter before requestModifier in your request method.
Add a retrier to the requests to see if the request may succeed if attempted again. You can use the RetryPolicy class. Though looking at it I may need to update it to allow for other errors. You can subclass it and add logic to allow for retry on the POSIXError you're seeing.
Try using the upload methods which are designed to properly handle large body uploads. I don't know if this would necessary help with anything in memory but it's a different code path and may help.
Track the errors more precisely. It would be good to know if particular OS versions, devices, or device properties contribute to the likelihood of seeing the issue.

I ran into this issue on an iOS simulator and "resolved" it by simply rebooting the iOS simulator. I think the issue might be caused by network changes to the Mac, i.e. switching to a different Wi-Fi, connecting to a different VPN/proxy, etc.


Add controller, operator, and CRD patterns

🎉 now that we are writing Go like professional business grown-ups we can do controllers and CRD beeps and boops

This should look and feel similar to RunCommandLine()

RunController()


Development simple traefik

What this PR resolves:
Add Traefik client
Fixes: #207

I've been playing a bit with the code over the weekend. I think I've come up with something relatively ok now. @andrewayoub please have a look and let me know what you think about how the code looks now

I had a discussion with @muhamadazmy. It makes more sense to have these configs into SAL not as a client. @zaibon what do you think?

@arahmanhamdy @muhamadazmy  I don't really care if we call them sal or client.
Just please review and let's get that merge

@arahmanhamdy  ok so we've move this into a SAL.


[master] Configuration volumeSizeLimitMB per collection via VolumeGrowOption

Now there is only a global setting
master.volumeSizeLimitMB - Master stops directing writes to oversized volumes

I want configure volume size limit per collection similarly preallocate via VolumeGrowOption

To do so, the change would not be trivial. Not only it affects directing traffic, but also rebalancing, setting volume capacity, etc. Unlikely this will be implemeted.

ok

To do so, the change would not be trivial. Not only it affects directing traffic, but also rebalancing, setting volume capacity, etc. Unlikely this will be implemeted.

Yes, I looked more closely at the code and realized the same that it was not easy


support the pane view

Thank you for your awsome work.
Will this plugin support pane view in the future？
If not, may I make pull request to suppot it?

I'm not entirely sure what you mean, if you mean adding something to the sidebar, you can already do this in Obsidian with Core Plugins -> Outline

Thanks, OutLine do it what i wanted.


flavicon.ico

ERROR `/favicon.ico' not found when starting local jekyll server

Do you have a favicon.ico file in your local directory?

Do you have a favicon.ico file in your local directory? I'm seeing my favicon in my published website. Are you seeing it in the published one and just not locally? I'm not running locally yet just thru the Github Actions deploys.

there was no favicon.ico. So, I looked up the original src and found one, copied it to the webpage and it works. However, the template has no favicon.ico

Cool. I created one as well. That might make a good pull request to add a default one.


[BUG] Frontend not updated based on dynamic setting

What is the bug?
Currently we have a default setting off 5 maximum feature anomalies. However this can be changed either dynamically or through opensearch.yml file while spinning up an OS cluster. Currently if a change is made to the number of max anomal detectors for example we don't update the information text on the frontend or we don't block user from creating x features based on new setting and we still keep it at 5. This is caught by the validation API but I think it should be discussed at least if we want to change the form UX based on these dynamic settings.
Messaging such as: "A feature is the field in your index that you use to check for anomalies. You can add up to 5 features" is hard coded or "You can add up to 2 more features." when you shouldn't be able to if setting was changed.
How can one reproduce the bug?
Steps to reproduce the behavior:

Add plugins.anomaly_detection.max_anomaly_features: 2 to opensearch.yml or dynamically change settings through OS API.
Create Detector on frontend and it will still seem like the number of allowed features is 5 until you an error is caught by validation.

What is the expected behavior?
Although validation API catches this or the create API itself if user directly calls on the backend API, it could be cleaner to also change how many features we allow in the form and our frontend messaging based on a setting that we are letting users know are dynamic

We also need to let the frontend use the default detection interval and window delay setting. Currently they are hardcoded on the frontend.


Added looseExact function

@cryogenian please review : )

@beckyconning Could you clarify the meaning of the term looseExact? thanks!

Yeah I know it's rubbish. My first try was dnifExact. I am tired : P.
When you give findExact a locator and it can find an element with it then it will give you that element and if it can't find an element it throws an error.
When you give looseExact a locator and it can't find an element with it then it will give you unit, if it can find an element it throws an error.
"find" is the opposite of "loose" is the idea. But it its not great : P

Oh, i see! now that i understand, i actually like the name! But i think it should be spelt "lose" not "loose".
JMS

On Sep 17, 2015, at 2:55 PM, Becky Conning<EMAIL_ADDRESS>wrote:
Yeah I know it's rubbish. My first try was dnifExact. I am tired : P.
When you give findExact a locator and it can find an element with it then it will give you that element and if it can't find an element it throws an error.
When you give looseExact a locator and it can't find an element with it then it will give you unit, if it can find an element it throws an error.
"find" is the opposite of "loose" is the idea. But it its not great : P
—
Reply to this email directly or view it on GitHub.

Thanks! : )

I need a function name spellchecker.

I think you'd need a "semantic-checker". Not sure they've invented one of those yet :wink:

Why is it foreign and why do you need it? One can use findElement and check for Nothing or findExact and catch error.

And by the way here is unsuccessfully named contra in Selenium.Combinators :smiley:

Webdriver should throw specific technical errors so we don't have to. Also often you just want to lose an element.
e.g.
deleteNote
tryRepeatedlyTo $ byId noteId >>= loseElement

also contra eats errors and doesn't have access to the locator.

Its foreign because of locator.toString(). We could add showLocator and even a Show Locator instance in the future. We should raise a tickets to move a few things away from foreign though.

loseElement doesn't throw any selenium error.
What do you mean contra eats error?
:+1: for adding showLocator

Contra throws an error like "passed but I am contra so this is not good". Which isn't very informative.
This is like the purescript webdriver so i consider it a purescript-webdriver error I guess? The implementation is very simple its basically the opposite of findExact with an error that looks a lot like findExact's error.

Maybe we could merge this for now and raise a ticket to add a Show Locator instance and to reimplement loseElement's functionality in Purescript?

Probably both of them should share a foreign implementation then, with a function that produces the error.

I would prefer loseExact be written in purescript. But I would also prefer findElement be written in purescript. I'll make ticket for it.
:+1:

I re-wrote it in purescript : )

awesome! :+1:


before middleware generates an infinite redirect loop

Hi, I'm new with silex and I'm trying to build a simple login and register system. I wrote a before middleware that checks if a user session variable is set, if it's true it means that user is already logged in, otherwise is not and it must be redirecting to the home page where only a login form is visible.
`<?php
$app->before(function () use($app) {
// Checa si ya existe una sesion 'user' existente en variable
$userisloggedin = is_null($app['session']->get('user')) ? false : true;

//Da valor bool a la variable auth de Silex para saber que mostrar si hay o no una session
$app['twig']->addGlobal('auth',$userisloggedin);

if(!$userisloggedin) {
    return $app->redirect($app["url_generator"]->generate("home"));
}

});`
The problem is, when redirects to the home page, the user session is not exists yet, so it's redirecting over and over again to the home page and generates an error which is The page isn't redirecting properly
so I would like to know if it is possible to omit the home route for this middleware or what would be a solution for this. Sorry if my english is not good. Thank you!

You would need to use route middleware, at the moment you are using global middleware so it is called on every request.
You need to bind that middleware only to the routes that you want to be protected. For example
$app->get('/dashboard', function () {
    // all the protected stuff
})->before($before);

that $before would be whatever you were doing in your example.
More here: http://silex.sensiolabs.org/doc/master/middlewares.html

Closing as there is no feedback.


try to fix run-examples

Objective

run examples is failing with xvfb-run: error: Xvfb failed to start

Solution

rollback ubuntu version for run-examples to 20.04. latest is 22.04

Notes

this is just a quick fix and someone should probably get it working on 22.04. I'll make an issue for that if this gets merged.

bors r+

rolled back the version on wasm examples too

bors r+


[SPARK-8248][SQL] string function: length

Merged build triggered.

Merged build started.

Test build #34512 has started for   PR 6724 at commit 548d2ef.

@rxin can you review this? Once this merged, the other string functions can take this as the example.

Test build #34512 has finished for   PR 6724 at commit 548d2ef.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
class SimpleFunctionRegistry extends FunctionRegistry
case class Rand(seed: Long) extends RDG(seed)
case class Randn(seed: Long) extends RDG(seed)
case class Length(child: Expression) extends UnaryExpression with ExpectsInputTypes
class StringKeyHashMap[T](normalizer: (String) => String)
      logInfo(s"Using user defined output committer class $
      logInfo(s"Using output committer class $

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #34513 has started for   PR 6724 at commit db604ae.

Test build #34513 has finished for   PR 6724 at commit db604ae.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class Length(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test FAILed.

For failed tests, it will be fixed by c8e7cd2

How can we support get the length of BinaryType, ArrayType and MapType?

They are different functions right now. We can still support them even if they are named the same though.

Merged build triggered.

Merged build started.

Test build #34554 has started for   PR 6724 at commit 8e30171.

Test build #34554 has finished for   PR 6724 at commit 8e30171.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #34555 has started for   PR 6724 at commit 3641f06.

Test build #34555 has finished for   PR 6724 at commit 3641f06.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #34561 has started for   PR 6724 at commit 3c729aa.

Test build #34561 has finished for   PR 6724 at commit 3c729aa.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #34572 has started for   PR 6724 at commit 3e92d32.

Test build #34572 has finished for   PR 6724 at commit 3e92d32.

This patch fails MiMa tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test FAILed.

Merged build triggered.

Merged build started.

Test build #34584 has started for   PR 6724 at commit 1eb1fd1.

Test build #34584 has finished for   PR 6724 at commit 1eb1fd1.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test FAILed.

retest this please

Merged build triggered.

Merged build started.

Test build #34591 has started for   PR 6724 at commit 1eb1fd1.

Test build #34591 has finished for   PR 6724 at commit 1eb1fd1.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test PASSed.

Merged build triggered.

Merged build started.

Test build #34645 has started for   PR 6724 at commit ae08003.

Merged build triggered.

Merged build started.

Test build #34647 has started for   PR 6724 at commit aaa3c31.

Test build #34645 has finished for   PR 6724 at commit ae08003.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test PASSed.

@rxin, any more comment before merge?

I will create another PR with bunch of string functions after this merged, it will be great if this goes first.

Test build #34647 has finished for   PR 6724 at commit aaa3c31.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
case class StringLength(child: Expression) extends UnaryExpression with ExpectsInputTypes

Merged build finished. Test PASSed.

OK I'm merging this one.


Persist data with Redux

Hi,
Great component, more than an Issue I have a question. I'm sure that using the callback functions I can save every answer to a redux store and onSurveyFinished I can have the full survey saved on my store. My question is , how can I preload those answers?, in the event that the user answers 50% of the survey, how can I resume the user where it left without having to re-enter the questions he already answer?
many thanks in advance.

Right now the component doesn't support doing this, it is an easy addition to make, add support for pre-populating all fields and not just selectors.
That'd require injecting into the JSON stream which isn't the prettiest solution but the only one inline with how this component otherwise works.
Would that suffice for your needs? It doesn't exactly make redux integration easy, but you're already feeding it JSON from somewhere!
Part of the goal of this component is to be not need to worry about redux until the very end, after the survey is completed. Of course if you want to persist results and come back to the survey later it does become needed.
I should probably add a function that spits out the JSON so far that can be called off of a ref, that'd allow coming back to the survey w/o getting redux involved in transforming a store to/from JSON.
I actually made this entire component because I didn't want to have to integrate dozens of fields into redux, and this component lets me A/B test forms by just changing things up on my backend DB.

Hi devlinb, thanks for your response. The solution to be able to spits out the JSON so far, would be a really good solution for this purpose, that could be stored and presented to the component later if needed.
And one more thing, I realized that i could send and object instead of a string for the Question, this was in order to have different formats on the question (i.e i have a numeric sequense of the questions formated with one color and font, and the actual question with another color and font) and is working fine. However I'm getting a warning that the type of the question expected is a string not and object. Is there a way to have it expect both a string or and object to eliminate this warning?
Again, thanks so much for this component!

Do you mean you are passing an object for questionText in the JSON?
Huh, not a bad idea, now I feel bad that I called that questionText since it can be anything. :)
I've loosened the restrictions on it, the warning should be gone, but I didn't test it, I just changed the PropTypes.
A new version is up now, there are breaking changes after I fixed some of the callbacks.

One thing to be aware of is that the JSON doesn't have the index of the selection option(s) for selection groups, so it isn't a straightforward to restore state. I thought about it and decided that putting the index in the JSON would interfere with the main purpose of the component, which is allowing for going from a JSON backend database to a front end UI and feeding the results right back into the DB.


Docs: All links on wiki tutorial index are broken

Issue description
Going through the wiki, I tried to access the linked tutorial but it lead me to 404. Any pointers?
Type of Issue
Please delete options that are not relevant.

[x] Bug report
[x] Documentation update

Actually, all the links on the wiki page are broken?

@NMontanaBrown these are due to the changes of markdown files. I think we should clean the wiki a bit once we set up the deepreg.net properly after moving repo.
I personally suggest put everything in markdown files so all should be on the website. Information in two different places are not very consistent. And... github wiki is not that beautiful lol

@NMontanaBrown these are due to the changes of markdown files. I think we should clean the wiki a bit once we set up the deepreg.net properly after moving repo.
I personally suggest put everything in markdown files so all should be on the website. Information in two different places are not very consistent. And... github wiki is not that beautiful lol

I will clean this up after migration - the wiki can be used to host devmeeting record - agree on all docs should be in /docs

meeting notes...? i think wiki if public? well unless meeting nodes are ok to be public

i think for an OS project, everything should be public unless there is a good reason not to.


kubecm: 0.30.0 -> 0.31.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/sunny0826/kubecm/releases.
meta.description for kubecm is: Manage your kubeconfig more easily
meta.homepage for kubecm is: https://github.com/sunny0826/kubecm/
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.31.0 with grep in /nix/store/plyyiw5f0vsrcrlg5m7pcfg1p1j39c64-kubecm-0.31.0
found 0.31.0 in filename of file in /nix/store/plyyiw5f0vsrcrlg5m7pcfg1p1j39c64-kubecm-0.31.0

Rebuild report (if merged into master) (click to expand)

2 total rebuild path(s)

2 package rebuild(s)

First fifty rebuilds by attrpath

kubecm

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/plyyiw5f0vsrcrlg5m7pcfg1p1j39c64-kubecm-0.31.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A kubecm https://github.com/r-ryantm/nixpkgs/archive/99ae138ab7ee9230999c4e515b663d445f2b69a0.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/99ae138ab7ee9230999c4e515b663d445f2b69a0#kubecm

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/plyyiw5f0vsrcrlg5m7pcfg1p1j39c64-kubecm-0.31.0
ls -la /nix/store/plyyiw5f0vsrcrlg5m7pcfg1p1j39c64-kubecm-0.31.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

kubecm

Maintainer pings
cc @qjoly for testing.

Result of nixpkgs-review pr 331538 run on aarch64-linux 1

1 package built:

kubecm


runtime: add 24 byte malloc size class

We have a 16 and a 32 byte size class, but no 24. Slices escape a lot (io.Reader calls, sort.Sort calls, etc.). We should only allocate 24 bytes for them when they do.
Note sure how best to work this into our current size generation scheme.
@randall77 @bradfitz @aclements
Tentatively marking Go 1.8 since it's seems like a cheap, easy, safe win.

Naively, it's a one-liner in msize.go:initSizes
		if size&(size-1) == 0 { // bump alignment once in a while
			if size >= 2048 {
				align = 256
			} else if size >= 128 {
				align = size / 8
			} else if size >= 16 { // <---- change goes here, s/16/32
				align = 16 // required for x86 SSE instructions, if we want to use them
			}
		}

but make.bash then crashes.
So, cheap and easy, I got 2 out of 3.
Rick made some very discouraging noises expecting this for 1.8, but I'll look a little harder.

Time for 1.8 is now down to only a couple of more working days and while
the idea seems solid we don't have any performance numbers to indicate the
value of the change.
On Thu, Oct 27, 2016 at 3:10 PM, dr2chase<EMAIL_ADDRESS>wrote:

Naively, it's a one-liner in msize.go:initSizes
    if size&(size-1) == 0 { // bump alignment once in a while
        if size >= 2048 {
            align = 256
        } else if size >= 128 {
            align = size / 8
        } else if size >= 16 { // <---- change goes here, s/16/32
            align = 16 // required for x86 SSE instructions, if we want to use them
        }
    }

but make.bash then crashes.
So, cheap and easy, I got 2 out of 3.
Rick made some very discouraging noises expecting this for 1.8, but I'll
look a little harder.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/golang/go/issues/17633#issuecomment-256740258, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AA7Wn97PbpG0m-U1ENpmNZ4rnVW5s321ks5q4Pc-gaJpZM4KikrA
.

Fair enough. Here's one data point from the compiler for 1.9 about the prevalence of slice allocations: While compiling std+cmd, 3.42% of all allocations were []*gc.Node; 1.16% of allocations were []*gc.Field.

but make.bash then crashes.

My hunch would be that this is violating some of the assumptions of heapBitsSetType, which is very optimized for the current alignment constraints of small size classes. It's probably not too hard to fix, but it does mean it doesn't necessarily work to just add a size class to the table.

Is this a dup of #8885?

Yes. Closing this one, since #8885 predates it so much. (Normally we close the dup with the least conversation if the dates are roughly equal)


[PROPOSAL] Make all loaders asynchronous-only and Promise-based.

@RobLoach
What I am proposing will introduce breaking-changes, thus before I even make a draft PR, I wish to discuss this in Issues.
Currently, the engine provides the user the option of choosing to load templates synchronously or asynchronously. This makes sense for the file loader as Node provides synchronous and asynchronous ways to read files on the filesystem. However, for ajax the option of having it perform synchronously defeats the entire point of ajax which is suppose to be inherently asynchronous.
At first, I've tried to make the ajax loader async-only and allow for sync and async loading for the file loader. But I then encountered issues when I tried to ajax load templates that use other templates (i.e. include, extends, embed, import). The code that is suppose to handle these associations work on the assumption that the loader being used is able to perform a synchronous load.
Given what I've learned, I propose that the code be refactored in a way that assumes that all loaders are asynchronous-only. If the user wants to synchronously load a template, that can be achieved via the data key when providing params to the engine.
In addition, given that the project supports a minimum Node version of 6 (as indicated by the .travis.yml), I also propose that we deprecate the current use of callbacks to implement asynchronous behavior in favor a Promise-based implementation. Doing so would also allow for the server, in addition to the browser, to perform ajax loading through the use of Promise-based http clients such as axios.

I've already discovered this a few weeks before, but now I want to bring it to everyone's attention.
In the process of changing all the loaders to async only, I discovered that the change would also result in template rendering also becoming async only. The reason for this is because the action of rendering can involve template loading, due to the use of tags like include, extends, and embed, in the initial template.
If template loading happens asynchronously, then template rendering must happen asynchronously as well. Given that making all loaders asynchronous only would result in a breaking change to the engine's public API, should we still proceed with this course of action?

@dave-irvine, @RobLoach, @willrowe
Should we proceed?

I have re-written the load a couple of times to be async-only before the hybrid implementation was done a while back, so I'm definitely on board for loading and rendering being async-only.
I wasn't involved in the hybrid implementation, so I'm not sure why it was done that way or if there is anything to take into account for that. I can look over the old issues and PRs for it though and double-check if that would be helpful.

I have re-written the load a couple of times to be async-only before the hybrid implementation was done a while back, so I'm definitely on board for loading and rendering being async-only.
I wasn't involved in the hybrid implementation, so I'm not sure why it was done that way or if there is anything to take into account for that. I can look over the old issues and PRs for it though and double-check if that would be helpful.

I think it was for backwards compatibility reasons, but you are to free look over past discussions and commits to better find out the reasoning behind the current design.

I found it. #457

Thanks for finding that. It does indeed seem to be for BC sake. If everyone is on board with going the async-only route, I say we should roll this into the upcoming v2.0.0 release since that includes BC breaks as well.

Hitting up against this too, trying to make a vite based loader for use with storybook, but unable to make a sync version

@larowlan

trying to make a vite based loader for use with storybook, but unable to make a sync version
Do you mean "sync" or "async" there? Can you explain in more detail what is preventing you from being able to create a loader?

When a template is loaded as a parent, the loader has to be able to operate in a sync fashion
see this hunk in Twig.Template.prototype.render
if (!parentTemplate) {
            url = Twig.path.parsePath(template, template.parentTemplate);
            parentTemplate = Twig.Templates.loadRemote(url, {
              method: template.getLoaderMethod(),
              base: template.base,
              async: false,
              id: url,
              options: template.options
            });
          }

The explicit async: false there means my loader can't return a promise, because immediately after, the code calls
return template.parentTemplate.renderAsync(state.context, {
            blocks: state.getBlocks(false),
            isInclude: true
          });

With the ajax loader, its can get around this because XMLHttpRequest.open has a sync flag.
Similarly the fs loader can use the sync versions of the FS functions.
But for vite, I have glob imports references to the raw templates I don't have an option to make it sync (unless I'm missing something)
I've experimented with returning an empty template with an overridden .renderAsync function that can resolve the promise and then call render on the template, but that is throwing an Exception to say I'm mixing sync and async (from inside Twig.js's potentiallyAsyncSlow method)

This sounds like it may be a bug. Can you open a new issue with the code you are trying to run?

Can do


Update detect version to 6.7.0

A newer version of blackduck scanner is required for Blackduck server 2020.10.0
Update versions to 6.7.0

Thanikachalam, Bhuvana will take a look at this.


Include regenerator in webpack

issue with possibly arrow func persists, possibly due to runtime plugin babel

working as expected on ie 11 minus core-js with promises

working as expected on ie 11 minus core-js with promises

still core-js promises needed, I think. promises come from core-js

still core-js promises needed, I think. promises come from core-js

working as expected #5 will fix corejs issue

working as expected #5 will fix corejs issue