[HOLD Auth#10709 Web-Expensify#41839] Implement Uneven Splits

Details

Hold on https://github.com/Expensify/Auth/pull/10709
Fixed Issues

$ https://github.com/Expensify/App/issues/40616
Tests

[x] Verify that no errors appear in the JS console

Creating an uneven split from Global Create

Click on the ‘+’ button.
Choose ‘Split expense’
Enter an amount
Type in a few participants and press ‘split’ on each of them.
Confirm the selection
Click on ‘Amount’ and change it.
Make sure we have adjusted the even shares based on the new amount.
Change the amount of the first participant.
Verify the amounts of the remaining participants have been adjusted and are equal to even splits of the remaining total (total - amount you entered)
Repeat the same step for each participant until the last participant has automatically the remaining correct amount.
Confirm the split.
Verify the money request reports have been created and have the correct amounts.
Click on the Split preview card
Verify the individual amounts are correctly shown next to each participant.

Creating an uneven split from a group chat

Create a group chat with a few participants
Click the ‘+’ button from the group chat and choose ‘Split Bill’
Enter an amount
Change the amount of the participants in the inputs next to each participant.
Confirm the split.
Verify the money request reports have been created and have the correct amounts.
Click on the Split preview card
Verify the correct amounts are shown next to each participant.

Error handling

Click on the ‘+’ button.
Choose ‘Request Money’
Enter an amount
Type in a few participants and press ‘split’ on each of them.
Confirm the selection
Change the amount of the first participant, choose an amount that exceeds the total value of the bill.
Verify an error message is shown that says “You enter  but the total is ”
Verify clicking on ‘Split’ does nothing.
Edit the amount so that it’s correct
Verify the error message disappears.
Confirm the split and make sure it gets created properly.

Offline tests

Go offline
Click on the ‘+’ button.
Choose ‘Request Money’
Enter an amount
Type in a few participants and press ‘split’ on each of them and confirm the selection.
Adjust the amounts next to each participant using correct values.
Create the split.
Verify the split is created offline
Verify the preview card shows the correct participants.
Click on the preview to view the split details page.
Verify the page shows the correct amounts next to each participant.
Go back online.
Verify the split action is no longer grayed out
Verify individual chats and money reports have the correct amounts.

QA Steps

[ ] Verify that no errors appear in the JS console

PR Author Checklist

[X] I linked the correct issue in the ### Fixed Issues section above
[X] I wrote clear testing steps that cover the changes made in this PR

[X] I added steps for local testing in the Tests section
[X] I added steps for the expected offline behavior in the Offline steps section
[X] I added steps for Staging and/or Production testing in the QA steps section
[X] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[X] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[X] I included screenshots or videos for tests on all platforms
[X] I ran the tests on all platforms & verified they passed on:

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

[X] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[X] I followed proper code patterns (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[X] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I followed the guidelines as stated in the Review Guidelines
[X] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] I verified that if a function's arguments changed that all usages have also been updated correctly
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase
[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))

[X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[X] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

Working on conflicts. This isn't 100% ready for review, what's remaining is:

Waiting for this PR so we can reuse the amount input instead of the copy and pasted component: reusable and stylable money request amount input by ZhenjaHorbach · Pull Request #40390 · Expensify/App
Fixing a flicker issue in the amounts due to this https://github.com/Expensify/App/pull/40386/files#diff-9c07b44e092fd3d975806649be46d76b75a377c16e32ed86597b630a84c290d0R5864
Spanish copy

But the rest of functionality can be reviewed and tested now

Starting a split bill from group chat, the sum of amounts do not match the split total amount
https://github.com/Expensify/App/assets/102477862/5be5b10e-138d-42ec-bb33-e8083266e559

Thanks @c3024, taking a look tonight

Fixed the QAB issue, we have to always go to the confirmation page for uneven splits.

Starting a split bill from group chat, the sum of amounts do not match the split total amount

I'm unable to reproduce this one..

@c3024 this should be ready for another review please

Starting a split bill from group chat, the sum of amounts do not match the split total amount

I'm unable to reproduce this one..

Rechecked. This is fine for already known users. This issue occurs for unknown users for whom backend returns Hidden.

The reset button shows up even when the values aren't tweaked. The reset button should only appear once you've changed one of the split values

Good catch @dubielzyk-expensify, will update!

Rechecked. This is fine for already known users. This issue occurs for unknown users for whom backend returns Hidden.

Yes this should be fixed in the backend where we'll save the real accountIDs in transaction.comment.splits.

@dubielzyk-expensify it's being worked on here, we're probably gonna merge it today.
@c3024 please help test this we really would like to have it merged today as well.

This looks pretty good to me. Keen to get @Expensify/design eyes as well.

Code changes look good. Testing again to complete the checklist.

Reviewer Checklist

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ ] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If any new file was added I verified that:

[ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[ ] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[ ] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[ ] I verified that all the inputs inside a form are aligned with each other.
[ ] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[ ] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

I am getting this continuous loading/blank report page when checking if the report preview of individual chats is working well.

Android build has been throwing errors on my device. Tried a few times already. Could you run a build here?

The 'merchant empty' error disappears immediately after appearing. Works well on staging.
https://github.com/Expensify/App/assets/102477862/551be404-d2fa-4179-8bda-081c2e2ddf79

Fixed @c3024. Since I switched to use useDebouncedState, the setFormError had to be included in the dependencies of this effect. I removed it and added a lint exception, it seems working fine. Not sure why the lint complains for setForm taht's coming fro useDebouncedState but not when it's coming from useState.

Investigating merchant field error not showing

Ok fixed

@dangrous this is ready for review but not merging. I'm making a one liner PR in Auth that should be deployed first then we can merge.

Note: the bugs in the split page when navigating to the participant profile or their split share not showing will be fixed once backend is deployed. The reason for that is we only have their optimistic accountIDs stored in the splits prop of the transaction. The backend should return their actual accountIDs and the splits prop will be updated.

but also noting the same formatting issues that @rafecolton did, as well as some NABs in the code. But looks good overall so if we're okay with those weirdnesses, we can move forward (in my view!)

Working on pushing an update for that right now!

@c3024 could you check this commit please? it implements this change where we'll display formatted amounts
https://github.com/Expensify/App/assets/9680864/4a4faddc-630e-4883-b917-aad53d95ee60

See there's a bit of activity here. Just tag design when you want another review here :)

This should be ready for a final testing round!

I noticed the keyboard is disabled on native. Pushing a fix now.

Tests well on web chrome
https://github.com/Expensify/App/assets/102477862/07168fbb-f1c1-46d1-8c2a-300bb6ce4530

Can you please test the latest fix on iOS? I'm having issues with npm run ios

For UGX currency, the split does not reset correctly. It worked once correctly but failed every other time. I think there is some issue with currencies that cannot be split into decimals.
https://github.com/Expensify/App/assets/102477862/4fcb62f5-a37e-4e0a-aacd-f1401b33f949

For UGX currency, the split does not reset correctly. It worked once correctly but failed every other time. I think there is some issue with currencies that cannot be split into decimals.

Do we have the same issue on staging?

Looking into it, very weird bug.

wondering why does it work fine when I reset manually
https://github.com/Expensify/App/assets/9680864/b80b77bf-e548-4b2b-bfff-b7a983831f13

Tests well on iOS Native
https://github.com/Expensify/App/assets/102477862/5bac5f3f-15cf-427c-ac84-21d44f0cf327

Tests well on all platforms
Android
https://github.com/Expensify/App/assets/102477862/58518551-8c61-4c28-bba8-f82d4e52f12d
Android mWeb
https://github.com/Expensify/App/assets/102477862/c837186c-1075-45e1-af20-c88865c95278
iOS mWeb
https://github.com/Expensify/App/assets/102477862/ff85ba97-7c74-4ce4-b54d-13c5c4fddb69
Desktop
https://github.com/Expensify/App/assets/102477862/86e1fb6b-e509-404c-b170-e756a576d5b0
Chrome
https://github.com/Expensify/App/assets/102477862/0ab68add-aa75-4646-9b26-b23cae9cf0f7

Not sure if this is know, but I'm getting Missing translation on error:

Also, I'm not sure if this can be easily achieved, but if I press close to the edge (orange box in screenshot below) it doesn't register it as a tap on the input field, so it goes to my profile.

For accessibility reasons we should make sure the tap target on the Reset button is at least 44px x 44px. I keep misclicking it at the moment. Something like this for a tap target would be good:

Also, there's a tiny, but significant delay in updating the values of the split. It feels a bit jarring and jumpy when I change the values:
https://github.com/Expensify/App/assets/145416827/f9cad681-a82c-4f42-9ec9-6eb8e1fbca4b
When I go frame-by-frame it looks like the transition between two numbers are filled with ...:

I think ideally we'd want it to go from old number -> new number directly without an intermediary step. This is one where a "loading state" as such actually introduces more confusion, so I think we should remove it. Thoughts @youssef-lr ?
cc @Expensify/design

Good catch Jon, I agree with that.

Yup, agree with that too Jon.

Ok I figured out the issue with the amount flickering, it's due to autogrow, when this prop is supplied we calculate the width of the input based on the number of characters. When we type a new character and given how the text has text-align: left and the container has align-items: flex-end (which is what allows us to right align the amount and the currency), the new character goes outside the input because the input still has the old width, once the new width is calculated it gets positioned correctly inside the input.
The alternative I found for now is to not align items using flex-end so that we'll have space to the right of digits. @ZhenjaHorbach also has found a way to make this work and we're troubleshooting it together as his solution has a padding that keeps getting added, here are the recordings of both solutions:

Removing align-items: flex-end

https://github.com/Expensify/App/assets/9680864/f6172efb-9517-4dfe-8b37-352d1fc3e34a

Same thing,  but adding text-align: right to the input, but then the currency will be far to the left

https://github.com/Expensify/App/assets/9680864/a2cf215a-8b89-4adc-98b9-7f3b75db8fc0

@ZhenjaHorbach's solution which is still in progress, we have to figure out the extra padding that keeps getting added

https://github.com/Expensify/App/assets/9680864/63442313-ae45-47ce-82a4-edf528334b23

3 is very close to what we want though like you said we want to reduce the padding between the currency symbol and the text.
If not, my personal take is that 2 feels better, but I don't feel super strongly. Keen to hear what @Expensify/design team thinks

Yup, I'm aligned with Jon above.

@ZhenjaHorbach has figured out the bug in this commit https://github.com/Expensify/App/pull/41373/files, I'll merge that commit to my branch shortly so we can test again. I just need to figure out how to make the code easy to understand because it won't be clear to everybody what it's doing, I'll try adding clear comments.

Build was failing randomly, merged main and trying again.

Looks like the Web and Auth PRs are both in prod so we can take this off hold

Still getting the Missing translation bug:

And the touch target on the reset button is still too small like mentioned here

Still getting the Missing translation bug:

I honestly don't know why is this happening, the translations are already added. Could be an issue with the ad hoc build only?

And the touch target on the reset button is still too small like mentioned

Should be fixed now. I'm working on alternative solution #2 and will update the PR then create a build.

Still getting the Missing translation bug:

I've confirmed this is an issue with new translation keys on AdHoc builds only. This shouldn't be an issue once the PR is in staging or prod.

Now there's two issues that hasn't appeared before
https://github.com/Expensify/App/assets/145416827/f361ecc7-c3ed-4a6d-bc3b-a7f5a1eed9f7

The footer button jumps up from the correct, to incorrect spacing at the bottom:

And during certain moments you can see the numbers jumping to two lines:

@dubielzyk-expensify that flicker seems to be unavoidable now if we use autogrow for the text input, there seems to be a delay when the amount gets bigger and we adjust the input width to accommodate for it, for a brief moment the input gets updated with the number while still having the old width. The contributor and I tried to figure this out with no luck.

@dubielzyk-expensify for the split button moving, it seems to be an issue on main and can be seen in the participants page as well, notice how the the 'Next' button moves a bit
https://github.com/Expensify/App/assets/9680864/cad9f3cd-eea2-46d1-9a51-933d78b870e4

@dubielzyk-expensify I've pushed a few fixes to eliminate the flicker in the inputs, let me know what you think!

The "Paid by" appears to be sticky as well now, which is not correct

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

PR above should fix this issue

QA please don't check this off until the PR above is CP'ed.

🚀 Deployed to production by https://github.com/marcaaron in version: 1.4.71-6 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

We had minor UI issue from this PR, more information here https://github.com/Expensify/App/issues/41751#issuecomment-2099742434


Can I recover a key from iOS Backup?

Does the iOS app, store the key somewhere where i can recover it from an iOS backup?
I did a iPhone restore, but the keybase app did not restore to its original state ultimately losing access to my account/teams etc?
What can i do now? expect reseting my account and losing everything
Thanks

Hi!  No, the iOS app doesn't back up your device key to Apple's servers, so it's not part of your restore.
It does sound like you'll need an account reset unless you have another device or paper key that you could use to reprovision your phone.

I was thinking for the full local backup stored on my computer may contain some useful information.
A paper key would have been a smart solution but i only have the online password unfortunately.
The main problem is that i was the only owner of a few teams, and now i feel they are lost forever :( only by 'updating' my phone 🤦♂

Hey – a colleague of mine has recently restored their iPhone and can no longer access Keybase. They also can't setup the macOS app, because it asks for verification via phone. Sounds like the same as above.
What is the procedure in this scenario? You mention "account reset" up there, but I'm not clear on what that means. Please bear in mind that my colleague is not a software developer and needs clear instructions here.

I've been hit by this too. I have a (local, password-protected) backup of the iOS device from before the wipe that theoretically should contain the keys but I don't see anything. What's the name of the file in the iOS app's sandbox that the key is written to?

I still have not reset my account hoping that in a not so distant future this would be possible...

I can't reprovision the device as it would have the same name, and renaming it differently doesn't seem like an acceptable solution to me (it's physically the same device — and my Keybase devices profile shouldn't be cluttered)...

This.
A solution would be very much welcome.


Fix #3241 - Standalone file gives error about System.ValueTuple.dll.dll

Fixes https://github.com/Microsoft/visualfsharp/issues/3241

I confirmed manually that this fixes the problem

@dotnet-bot test Windows_NT Release_ci_part2 Build please

Pulling - this is a really annoying regresssion when editing standalone F# files!


Fixed a Bug were PHP7+ throws a fatal error

Fixed a Bug were PHP7+ throws a fatal error: PHP Fatal error:  Redefinition of parameter $quotaMax. Older Versions of PHP had simply ignored that problem.

@nikolashermann, can you take a look at this issue? I think, more and more people now are migrating to PHP 7.


Distributed training with TensorFlow2.0 not working: "Aborting RingReduce with Invalid argument: Shape mismatch in the collective instance 106."

We trying to build a multi-worker strategy based on tutorials: Multi-worker training with Keras and distributed training with TF2. The code works with this configurations:

first node:
os.environ['TF_CONFIG'] = json.dumps({ 'cluster': {  'worker': ["localhost:5006","localhost:5007"] },  'task': {'type': 'worker', 'index': 0}})
second node:
os.environ['TF_CONFIG'] = json.dumps({ 'cluster': {  'worker': ["localhost:5006","localhost:5007"] },  'task': {'type': 'worker', 'index': 1}}).

Then we tried to run the code from two devices with the following system information:

OS: Linux Mint 19.1 Cinnamon, Cinnamon Version: 4.0.10
python version: 3.6.8
tensorflow version: 2.1.0

with the following configurations:

on the first device:
os.environ['TF_CONFIG'] = json.dumps({   'cluster': {       'worker': ["<IP_ADDRESS>:6006","<IP_ADDRESS>:6006"]   },   'task': {'type': 'worker', 'index': 0} })
on the second device:
os.environ['TF_CONFIG'] = json.dumps({   'cluster': {       'worker': ["<IP_ADDRESS>:6006","<IP_ADDRESS>:6006"]   },   'task': {'type': 'worker', 'index': 1} }).

The devices can navigate into each other through ssh without password. We report the used script and the link to the source data set.
Script:
def create_dataframe(data, time_field):
    data['time'] = pd.to_datetime(data[time_field])
    data = data.drop(columns=[time_field])
    data.sort_values('time')
    data = data.reset_index(drop=True)
    data.set_index('time', inplace=True)
    return data

def aggregate(df, freq , field, aggregation):
    df_count = df.groupby(pd.Grouper(level='time', freq=freq))[field].agg(aggregation)
    df_count.dropna(inplace=True)
    df_count = df_count.to_frame().reset_index()
    df = df.reset_index()
    df_count.set_index('time', inplace=True)
    return df_count

def split_sequence(sequence, n_steps):
    X, y = list(), list()
    for i in range(len(sequence)):
        end_ix = i + n_steps
        if end_ix > len(sequence)-1:
            break
        seq_x, seq_y = sequence[i:end_ix], sequence[end_ix]
        X.append(seq_x)
        y.append(seq_y)
    return array(X), array(y)

strategy = tf.distribute.experimental.MultiWorkerMirroredStrategy()

df=pd.read_csv("/path/to/electricityusagedata.csv")

df = create_dataframe(df, 'dt')
dfy = aggregate(df,freq = '1h', field = 'value', aggregation = 'mean')
n_steps = 10
n_features=1
value=df['value']

X, y = split_sequence(dfy.value, n_steps)

Xtrain = X.reshape(X.shape[0], X.shape[1], n_features)

with strategy.scope():

	inputs = tf.keras.layers.Input(shape=(n_steps, n_features))
	layer = tf.keras.layers.Dense(5, activation='relu')(inputs)
	layer = tf.keras.layers.Dense(1)(layer)

	lstm_stacked = tf.keras.Model(inputs=inputs, outputs=layer)
	lstm_stacked.compile(optimizer=tf.keras.optimizers.Adam(),loss=tf.keras.losses.MeanSquaredError())
	lstm_stacked.summary()

lstm_stacked.fit(Xtrain,y,epochs=10)

The complete output from the command line is
2019-11-11 11:44:33.962245: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudart.so.10.0'; dlerror: libcudart.so.10.0: cannot open shared object file: No such file or directory
2019-11-11 11:44:33.962282: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2019-11-11 11:44:34.962335: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2019-11-11 11:44:34.962374: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2019-11-11 11:44:34.962394: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (keypartner): /proc/driver/nvidia/version does not exist
2019-11-11 11:44:34.962620: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-11-11 11:44:34.991840: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency:<PHONE_NUMBER> Hz
2019-11-11 11:44:34.992692: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x57231a0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-11 11:44:34.992737: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2019-11-11 11:44:35.000579: I tensorflow/core/distributed_runtime/rpc/grpc_channel.cc:300] Initialize GrpcChannelCache for job worker -> {0 -> localhost:6006, 1 -> <IP_ADDRESS>:6006}
2019-11-11 11:44:35.001075: I tensorflow/core/distributed_runtime/rpc/grpc_server_lib.cc:390] Started server with target: grpc://localhost:6006
Model: "model"
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
input_1 (InputLayer)         [(None, 10, 1)]           0
_________________________________________________________________
dense (Dense)                (None, 10, 5)             10
_________________________________________________________________
dense_1 (Dense)              (None, 10, 1)             6
=================================================================
Total params: 16
Trainable params: 16
Non-trainable params: 0
_________________________________________________________________
WARNING:tensorflow:`eval_fn` is not passed in. The `worker_fn` will be used if an "evaluator" task exists in the cluster.
WARNING:tensorflow:`eval_strategy` is not passed in. No distribution strategy will be used for evaluation.
WARNING:tensorflow:ModelCheckpoint callback is not provided. Workers will need to restart training if any fails.
2019-11-11 11:45:04.330943: W tensorflow/core/grappler/optimizers/data/auto_shard.cc:428] In AUTO-mode, and switching to DATA-based sharding, instead of FILE-based sharding as we cannot find appropriate reader dataset op(s) to shard. Error: Did not find a shardable source, walked to a node which is not a dataset: name: "FlatMapDataset/_9"
op: "FlatMapDataset"
input: "PrefetchDataset/_8"
attr {
  key: "Targuments"
  value {
    list {
    }
  }
}
attr {
  key: "f"
  value {
    func {
      name: "__inference_Dataset_flat_map_slice_batch_indices_173"
    }
  }
}
attr {
  key: "output_shapes"
  value {
    list {
      shape {
        dim {
          size: -1
        }
      }
    }
  }
}
attr {
  key: "output_types"
  value {
    list {
      type: DT_INT64
    }
  }
}
. Consider either turning off auto-sharding or switching the auto_shard_policy to DATA to shard this dataset. You can do this by creating a new `tf.data.Options()` object then setting `options.experimental_distribute.auto_shard_policy = AutoShardPolicy.DATA` before applying the options object to the dataset via `dataset.with_options(options)`.
Train on 8750 samples
Epoch 1/10
2019-11-11 11:45:07.181787: E tensorflow/core/common_runtime/ring_alg.cc:279] Aborting RingReduce with Invalid argument: Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.
Additional GRPC error information:
{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}
	 [[{{node scoped_allocator_1_1_CollectiveReduce}}]]
Additional GRPC error information:
{"created":"@1573469107.181701406","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.\nAdditional GRPC error information:\n{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}\n\t [[{{node scoped_allocator_1_1_CollectiveReduce}}]]","grpc_status":3}
2019-11-11 11:45:07.181854: W tensorflow/core/common_runtime/base_collective_executor.cc:217] BaseCollectiveExecutor::StartAbort Invalid argument: Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.
Additional GRPC error information:
{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}
	 [[{{node scoped_allocator_1_1_CollectiveReduce}}]]
Additional GRPC error information:
{"created":"@1573469107.181701406","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.\nAdditional GRPC error information:\n{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}\n\t [[{{node scoped_allocator_1_1_CollectiveReduce}}]]","grpc_status":3}
2019-11-11 11:45:07.181990: E tensorflow/core/common_runtime/ring_alg.cc:279] Aborting RingReduce with Cancelled: [_Derived_]Cancelled
Additional GRPC error information:
{"created":"@1573469107.181911798","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Cancelled","grpc_status":1}
2019-11-11 11:45:07.182013: W tensorflow/core/common_runtime/base_collective_executor.cc:217] BaseCollectiveExecutor::StartAbort Cancelled: [_Derived_]Cancelled
Additional GRPC error information:
{"created":"@1573469107.181911798","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Cancelled","grpc_status":1}
2019-11-11 11:45:07.182077: W tensorflow/core/framework/op_kernel.cc:1655] OP_REQUIRES failed at collective_ops.cc:253 : Invalid argument: Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.
Additional GRPC error information:
{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}
	 [[{{node scoped_allocator_1_1_CollectiveReduce}}]]
Additional GRPC error information:
{"created":"@1573469107.181701406","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.\nAdditional GRPC error information:\n{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}\n\t [[{{node scoped_allocator_1_1_CollectiveReduce}}]]","grpc_status":3}
2019-11-11 11:45:07.182133: W tensorflow/core/common_runtime/base_collective_executor.cc:217] BaseCollectiveExecutor::StartAbort Invalid argument: Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.
Additional GRPC error information:
{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}
	 [[{{node scoped_allocator_1_1_CollectiveReduce}}]]
Additional GRPC error information:
{"created":"@1573469107.181701406","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.\nAdditional GRPC error information:\n{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}\n\t [[{{node scoped_allocator_1_1_CollectiveReduce}}]]","grpc_status":3}
	 [[scoped_allocator_1_1_CollectiveReduce]]
2019-11-11 11:45:07.182123: W tensorflow/core/framework/op_kernel.cc:1655] OP_REQUIRES failed at collective_ops.cc:253 : Cancelled: [_Derived_]Cancelled
Additional GRPC error information:
{"created":"@1573469107.181911798","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Cancelled","grpc_status":1}
  32/8750 [..............................] - ETA: 12:56Traceback (most recent call last):
  File "worker1.py", line 91, in <module>
    lstm_stacked.fit(Xtrain,y,epochs=10)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 792, in fit
    use_multiprocessing=use_multiprocessing)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_distributed.py", line 790, in fit
    *args, **kwargs)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_distributed.py", line 777, in wrapper
    mode=dc.CoordinatorMode.INDEPENDENT_WORKER)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/distribute/distribute_coordinator.py", line 853, in run_distribute_coordinator
    task_id, session_config, rpc_layer)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/distribute/distribute_coordinator.py", line 360, in _run_single_worker
    return worker_fn(strategy)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_distributed.py", line 772, in _worker_fn
    return method(model, **kwargs)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 340, in fit
    total_epochs=epochs)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 127, in run_one_epoch
    batch_outs = execution_function(iterator)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 86, in execution_function
    distributed_function(input_fn))
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 568, in __call__
    result = self._call(*args, **kwds)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/eager/def_function.py", line 632, in _call
    return self._stateless_fn(*args, **kwds)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 2341, in __call__
    return graph_function._filtered_call(args, kwargs)  # pylint: disable=protected-access
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 1589, in _filtered_call
    self.captured_inputs)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 1670, in _call_flat
    ctx, args, cancellation_manager=cancellation_manager))
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/eager/function.py", line 523, in call
    ctx=ctx)
  File "/home/keypartner/my_tutorial_env/lib/python3.6/site-packages/tensorflow_core/python/eager/execute.py", line 67, in quick_execute
    six.raise_from(core._status_to_exception(e.code, message), None)
  File "<string>", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError:  Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.
Additional GRPC error information:
{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}
	 [[{{node scoped_allocator_1_1_CollectiveReduce}}]]
Additional GRPC error information:
{"created":"@1573469107.181701406","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.\nAdditional GRPC error information:\n{"created":"@1573469107.160620334","description":"Error received from peer","file":"external/grpc/src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Shape mismatch in the collective instance 106. Op at device /job:worker/replica:0/task:1/device:CPU:0 expected shape [49] but another member in the group expected shape [64]. This is likely due to different input shapes at different members of the collective op.","grpc_status":3}\n\t [[{{node scoped_allocator_1_1_CollectiveReduce}}]]","grpc_status":3}
	 [[scoped_allocator_1_1_CollectiveReduce]] [Op:__inference_distributed_function_843]

Function call stack:
distributed_function

2019-11-11 11:45:07.262512: W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Cancelled: Operation was cancelled

We are wondering why the multi devices example doesn't work meanwhile it works on multi threads at localhost.

@jessicadef, Please provide the complete standalone code replicate the reported issue. Thanks!

We provided the two python scripts to be run from the two machines. The dataset is available here. Thanks.
workers.tar.gz

@jessicadef, Please paste the code snippet to localize the reported issue. Thanks!

@gadagashwini Thanks for your reply! I figured out where the issue was: one of the two machines was running the code in a virtualenv environment which did not allow the machines to communicate.

@jessicadef,
Can you please let us know if you are happy to close if no issue persists. Thanks!

I met this problem with tf 2.1, but after I upgraded it to tf 2.2, the problem was solved.


fix bug INSTALL_FAILED_CONFLICTING_PROVIDER

Installation did not succeed.
The application could not be installed: INSTALL_FAILED_CONFLICTING_PROVIDER

Resolved at v1.1.0


OCPBUGS-29552: IPI install fails on Nutanix when using DHCP

OCPBUGS-29552: IPI install fails with etcdInsufficientMembers on Nutanix when using DHCP network
The back-port of the PR https://github.com/openshift/machine-api-provider-nutanix/pull/66 to branch release-4.12.

/retest

/retest

/retest

/retest


[Bug]: i come across EOF error message when I try to run the open hands dev.

Is there an existing issue for the same bug?

[X] I have checked the existing issues.

Describe the bug and reproduction steps
docker: Error response from daemon: Get "https://docker.all-hands.dev/v2/all-hands-ai/openhands/manifests/sha256:e5106a11371c103ed9422fecbc1cd39d12d506e2b12791e4152965a67019bd9e": EOF.
OpenHands Installation
Docker command in README
OpenHands Version
No response
Operating System
None
Logs, Errors, Screenshots, and Additional Context
No response

Can you clarify how you are running OpenHands?
Are you running using the Development workflow?
Or are you running via the docker command in the README?
Some conflicting information in the bug which would appreciate if you could clarify.


Reintroduce jacoco after java 17 update

This reverts commit a02f946571dc3cbc788e40122ca42573330d344b.

Codecov Report

Merging #436 (82728f1) into master (4562b1b) will increase coverage by 0.06%.
Report is 19 commits behind head on master.
The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@             Coverage Diff              @@
##             master     #436      +/-   ##
============================================
+ Coverage     87.15%   87.22%   +0.06%
- Complexity      372      373       +1
============================================
  Files            32       32
  Lines          1432     1432
  Branches        164      164
============================================
+ Hits           1248     1249       +1
  Misses          115      115
+ Partials         69       68       -1

see 1 file with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Achievements system

[x] Make Achievements class non-abstract
[x] Hard-code achievements into an array
[ ] Send a (green?) notification to the user when an achievement is completed
[ ] Remove isMultiStep field
[ ] Send GET requests to trigger finishAchievement (for testing)
[ ] Add field in DB to hold achievement completion state

Just a heads up, for the in-app notifications you just need to attach an object called notification which has fields: message and type (success for green, warning - yellow, danger - red) to the model sent to the EJS template.
So if you'd want to send a green notification for the user you'd write:
res.render("thePageToRender", { notification: { message: "theMessage", type: "success" }});
This gets handled by some js code at the bottom of footer.ejs.
You will need to merge in #74 first though as there was a small bug.

Oh and what about the prizes for the achievement? Can't see anything about them in the issue.


test PR with Github API

Please pull this in!

Docs Build status updates of commit c053296:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

sdp-test/index.md
:bulb:Suggestion

Details

Line 387: [Error] Error happened in build.entrypoint.ps1. Please build your target branch first and then reopen this pull request to do another round of verification. If the issue still happens, open a ticket in http://SiteHelp and include the following error message for our team to troubleshoot: Cannot process argument transformation on parameter 'defaultBoolValue'. Cannot convert value "" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.

sdp-test/index.md

[Suggestion] Missing attribute: author. Add the current author's GitHub ID. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.
[Suggestion] Missing attribute: title. Add a title string to show in search engine results. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit c053296:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sdp-test/index.md
:bulb:Suggestion

Details

sdp-test/index.md

[Suggestion] Missing attribute: author. Add the current author's GitHub ID. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.
[Suggestion] Missing attribute: title. Add a title string to show in search engine results. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 619725f:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sdp-test/index.md
:bulb:Suggestion

Details

sdp-test/index.md

[Suggestion] Missing attribute: author. Add the current author's GitHub ID. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.
[Suggestion] Missing attribute: title. Add a title string to show in search engine results. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit d7baa06:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sdp-test/index.md
:bulb:Suggestion

Details

sdp-test/index.md

[Suggestion] Missing attribute: author. Add the current author's GitHub ID. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.
[Suggestion] Missing attribute: title. Add a title string to show in search engine results. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 707ee46:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sdp-test/index.md
:bulb:Suggestion

Details

sdp-test/index.md

[Suggestion] Missing attribute: author. Add the current author's GitHub ID. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.
[Suggestion] Missing attribute: title. Add a title string to show in search engine results. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 9638745:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sdp-test/index.md
:bulb:Suggestion

Details

sdp-test/index.md

[Suggestion] Missing attribute: author. Add the current author's GitHub ID. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.
[Suggestion] Missing attribute: title. Add a title string to show in search engine results. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

Docs Build status updates of commit 2aaac5b:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sdp-test/index.md
:bulb:Suggestion

Details

sdp-test/index.md

[Suggestion] Missing attribute: author. Add the current author's GitHub ID. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.
[Suggestion] Missing attribute: title. Add a title string to show in search engine results. NOTE: This Suggestion will be elevated to a Warning on 9/1/2019.

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


🐞 [Bug]: Billing isn't reflected on the dashboard contracts

Is there an existing issue for this?

[X] I have searched the existing issues

which package/s did you face the problem with?
Dashboard
What happened?
I noticed that some of my contracts get delayed showing the billing value after a full billing cycle if it didn't show it at all.
Its billed on the TFChain and its showing the on chain and graphql.
Steps To Reproduce
No response
which network/s did you face the problem on?
Dev
version
a948bfa
Twin ID/s
9090
Node ID/s
250
Farm ID/s
1
Contract ID/s
151438
Relevant screenshots/screen records

dashboard (2).log
Relevant log output
{
  "contract_id": 151438,
  "twin_id": 9090,
  "type": "rent",
  "state": "Created",
  "created_at":<PHONE_NUMBER>,
  "details": {
    "nodeId": 250,
    "farm_id": 1
  },
  "solutionName": "-",
  "solutionType": "-",
  "expiration": "-",
  "consumption": 0
}

{
  standardReserve: 17,937,800
  additionalReserve: 0
  standardOverdraft: 0
  additionalOverdraft: 0
  lastUpdatedSeconds: 1,726,147,368
  cycles: 1
}

with amount 17,937,800

The issue is with the created_at interface. Once fixed, the billing will be fixed.

problem in first time created billing report because billing rate is calculated by subtracting current from previous report

The issue happens in the first billing cycle only.

I couldn't find the created_at interface issue but found that the issue is with accessing the contract field in the gql response

so we need to update the GqlConsumption interface

verified on devnet
Version ffbb750
Billing is now reflected right on the dashboard
deployment list :

contracts list :

only network contracts is showing no data available
testcase


Fix issues in running historical analysis and custom result index section

Description
Fix the following issues:

wrong route path in running historical analysis
when disabling customer result index after enabling it, the field is not getting reset to undefined which leads an error on create detector review page says empty custom result index name

Issues Resolved
[List any issues this PR will resolve]
Check List

[ ] New functionality includes testing.

[ ] All tests pass

[ ] New functionality has been documented.
[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

e2e CI failed for this error, not related to this pr:
Run if timeout 600 grep -q "bundles compiled successfully after" <(tail -n0 -f dashboard.log); then
Timeout for 600 seconds reached. OpenSearch Dashboards did not finish compiling.

Did manual e2e verification


accounting: settle in reserve

This PR changes the accounting flow so that settlement of actual debt is already triggered in the Reserve stage.
The new accounting flow is as follows:

Credit like Debit now only updates balances and no longer attempts to settle.
Settlement now uses the right context
If in Reserve we detect we are close enough to payment threshold we trigger settlement right there and fail if settlement fails.
We still block if the expected debt would exceed the threshold. this is possible even if settlement occurred (e.g. if all outstanding requests actually exceed the payment threshold and we had positive balance with the peer before).

Motivation:

Currently it is possible to get in a state where we are above the payment threshold but we still will never attempt to settle again. The only way to always have a chance retry without intentionally going arbitrarily high over the payment threshold is to do this in reserve stage already.
This PR should also reduce the frequency of overdraft errors in case of many concurrent requests.

It looks like this is working as intended.  The balance with my peers approaches 100K and then a settlement is issued.  The most observable effect is that checks used to be 100K+ and now they tend to be shy of 100K (like in the 80s) when I'm pushing lots of chunks into the network.
I haven't seen a peer get to 100K and stall as was happening previously when connected to (apparently) non-swapping peers.


CompositeValidator skips validation logic

Affected Version
4.7.2
Description
New CompositeValidator calls the php() method instead of the validate() method of its validators. This causes problems if the validate method has been overridden in those validators - any logic in the validate() method is skipped entirely!
This is a breaking change for some of the sites I help to maintain, so it would be great to see a fix released quickly.
Steps to Reproduce
Create a subclass of SilverStripe\Forms\Validator, override the validate() method, and return it in a call to getCMSValidator() or its new replacement getCMSCompositeValidator().
The functionality in validate() of your validator class will not be called.
The CompositeValidator was added as a result of #2118

Hi @GuySartorelli, the Validator API is designed so that subclasses override the php() method (hence why it’s an abstract method) and put the validation logic in there rather than override validate(). I appreciate that’s confusing - it’s an artefact of some old code.
I think we have two choices

Adjust the composite validator to call validate() instead of php(). At a glance it looks like that would be okay, but I’m not sure if there are any potential knock-on effects

If we do that, we could deprecate php() and encourage people to put validation logic in validate() instead

Stick with calling php() and instead update method documentation to make it clearer that that’s where the validation logic should be

Could possibly do final public function validate() to ensure no one else has validation logic that’s silently doing nothing

Either way, I think we should look at changing the API in future because php() isn’t a very descriptive method name.
@chrispenny I don’t suppose you can remember why CompositeValidator::validate() calls php() instead of validate()? It was a year ago, so no worries if not 😄

This came up because we had implemented a validator that performs effectively exactly what the CompositeValidator does - when its validate method is called, it triggers validation of any validators that were passed into it.
But now of course that code isn't being triggered. This is a big imo not because the API isn't clear but because it is a breaking change. Where validate used to be called on any validators returned from getCMSValidator, now it is not.
I don't think updating documentation is sufficient in this case and strongly advocate for the first option.

Thanks for finding this, @GuySartorelli! I think this was just an oversight on my part. Apologies.
Just reviewing what happens in Validator::validate().

And CompositeValidator::validate().

I think CompositeValidator::validate() could simply be updated to call validate() on its children without negative effect. We could also get rid of the !$validator->getEnabled() check above it, and the new $validator->validate() call would need to be taken out of the conditional statement, as it always returns a ValidationResult.

PR raised 😃

PR merged


Fatal Python error: Couldn't create autoTSSkey mapping

When I run sh prepare_data.sh from the root folder, I get:
Finish loading models*
Fatal Python error: Couldn't create autoTSSkey mapping
Thread 0x00007f5bcb029740 (most recent call first):
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/window/backends/backend_glfw.py", line 213 in init
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/init.py", line 187 in new
File "/home/Workspace/Project/DeepIM/toolkit/LM6d_devkit/../../lib/render_glumpy/render_py_multi.py", line 92 in init
File "toolkit/LM6d_devkit/LM6d_2a_adapt_images.py", line 104 in main
File "toolkit/LM6d_devkit/LM6d_2a_adapt_images.py", line 211 in
Aborted (core dumped)
target path: /home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine/data/gt_observed
1 ape
Traceback (most recent call last):
File "toolkit/LM6d_0_gen_gt_observed.py", line 198, in
gen_gt_observed()
File "toolkit/LM6d_0_gen_gt_observed.py", line 91, in gen_gt_observed
'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine/image_set/observed/ape_all.txt'
target path: /home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine/rendered_poses
angle_std=15.0, angle_max=45.0, x_std=0.01, y_std=0.01, z_std=0.05
1 ape
Traceback (most recent call last):
File "toolkit/LM6d_1_gen_rendered_pose.py", line 72, in
with open(sel_set_file) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine/image_set/observed/ape_all.txt'
target path: /home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine/data/rendered
target path: /home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine/image_set
start  1 ape
Fatal Python error: Couldn't create autoTSSkey mapping
Thread 0x00007fde47315740 (most recent call first):
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/window/backends/backend_glfw.py", line 213 in init
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/init.py", line 187 in new
File "/home/Workspace/Project/DeepIM/toolkit/../lib/render_glumpy/render_py.py", line 81 in init
File "toolkit/LM6d_2_gen_rendered.py", line 76 in main
File "toolkit/LM6d_2_gen_rendered.py", line 205 in
Aborted (core dumped)
Fatal Python error: Couldn't create autoTSSkey mapping
Thread 0x00007f412c378740 (most recent call first):
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/window/backends/backend_glfw.py", line 213 in init
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/init.py", line 187 in new
File "/home/Workspace/Project/DeepIM/toolkit/../lib/render_glumpy/render_py.py", line 81 in init
File "toolkit/LM6d_3_gen_PoseCNN_pred_rendered.py", line 91 in
Aborted (core dumped)
####### Prepare LM6d_refine_syn ########
/home/Workspace/Project/DeepIM
target path: /home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine_syn/poses
0%|                                                                                | 0/1236 [00:00<?, ?it/s]
Traceback (most recent call last):
File "toolkit/LM6d_ds_0_gen_observed_poses.py", line 266, in
gen_poses()
File "toolkit/LM6d_ds_0_gen_observed_poses.py", line 189, in gen_poses
pose_dict, quat_stat, trans_stat, new_points = stat_poses()
File "toolkit/LM6d_ds_0_gen_observed_poses.py", line 109, in stat_poses
pose_path)
AssertionError: path /home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine/data/gt_observed/ape/000001-pose.txt not exists
Traceback (most recent call last):
File "toolkit/LM6d_ds_1_gen_observed.py", line 185, in
gen_observed()
File "toolkit/LM6d_ds_1_gen_observed.py", line 76, in gen_observed
with open(syn_poses_path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine_syn/poses/LM6d_ds_train_observed_pose_all.pkl'
Traceback (most recent call last):
File "toolkit/LM6d_ds_2_gen_gt_observed.py", line 178, in
gen_gt_observed()
File "toolkit/LM6d_ds_2_gen_gt_observed.py", line 75, in gen_gt_observed
with open(syn_poses_path, 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine_syn/poses/LM6d_ds_train_observed_pose_all.pkl'
15.0 45.0 0.01 0.01 0.05
Traceback (most recent call last):
File "toolkit/LM6d_ds_3_gen_rendered_pose.py", line 85, in
with open(sel_set_file) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/Workspace/Project/DeepIM/toolkit/../data/LINEMOD_6D/LM6d_converted/LM6d_refine_syn/image_set/observed/LM6d_data_syn_train_observed_ape.txt'
start  0 ape
Fatal Python error: Couldn't create autoTSSkey mapping
Thread 0x00007fc36b260740 (most recent call first):
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/window/backends/backend_glfw.py", line 213 in init
File "/home/anaconda3/lib/python3.7/site-packages/glumpy/app/init.py", line 187 in new
File "/home/Workspace/Project/DeepIM/toolkit/../lib/render_glumpy/render_py.py", line 81 in init
File "toolkit/LM6d_ds_4_gen_rendered.py", line 92 in
Aborted (core dumped)
@wangg12  Do you have any suggestions what I could have done wrong?

Can you check whether your glumpy is working by running python lib/render_glumpy/render_py_multi.py?


chore(dependencies): Update dependency @types/node to v20.5.9

This PR contains the following updates:

Package
Type
Update
Change

@types/node (source)
devDependencies
patch
20.5.1 -> 20.5.9

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

:tada: This PR is included in version 1.1.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Microsoft.Xaml.Behaviors.WinUI.Managed 3.0.0-preview1 compile error

me too:

@Sergio0694

Can you repro in a blank project? Can you provide a minimal repro?


Update command syntax

This page uses outdated aux value syntax and should be updated with block states

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: cf7660a7-e7f1-f1e8-6cbf-2c5ae54c00e0
Version Independent ID: cf7660a7-e7f1-f1e8-6cbf-2c5ae54c00e0
Content: Create an In-World Game with Commands
Content Source: creator/Documents/CreateAnInWorldGame.md
Service: minecraft-bedrock-edition
GitHub Login: @iconicNurdle
Microsoft Alias: mikeam

Great catch! Thank you so much! I have made the update and it will be visible after the next document release.


Provide concept emulation for Ranges-TS concepts

This pull request provides concept emulation for Ranges-TS bidirectional and random access iterator concepts.
This is still a work in progress, but I generally prefer to iterate with library authors when developing a contribution.
I believe I've conformed the style guidance in the contributing guidelines. I've also attempted to emulate the local coding style for the file I've modified (but I would be surprised if I inferred the conventions perfectly). In either case, I'm happy to make any stylistic corrections.
Regarding the type traits defined in this submission, I was torn as to whether they belonged in the hpx/trait/is_iterator header or in dedicated files in the hpx/util direction. For the moment, I have opted for the former. Direction in this respect would be welcome.
It appears there is no unit testing for the is_iterator header. I'm building and running the complete test suite at present, but am willing to provide unit tests to demonstrate the added functionality in isolation.
Proposed Changes

[x] Add relevant type traits underlying the BidirectionalIterator and RandomAccessIterator concepts

[x]  addition_result
[x]  dereference_result
[x]  equality_result
[x]  inequality_result
[x]  inplace_addition_result
[x]  inplace_subtraction_result
[x]  predecrement_result
[x]  preincrement_result
[x]  postdecrement_result
[x]  postincrement_result
[x]  subscript_result
[x]  subtraction_result

[x] Add a type trait to verify whether a traversal concept is satisfied

[x] satisfy_traversal_concept

[x] Add specializations to has_traversal and belongs_to_iterator_traversal integrating the concept check.

Any background context you want to provide?
See #3641

Regarding the type traits defined in this submission, I was torn as to whether they belonged in the hpx/trait/is_iterator header or in dedicated files in the hpx/util direction. For the moment, I have opted for the former. Direction in this respect would be welcome.

Having the new traits in that header should be good enough. I don't think those are of any use outside of iterator categorization.

It appears there is no unit testing for the is_iterator header. I'm building and running the complete test suite at present, but am willing to provide unit tests to demonstrate the added functionality in isolation.

Tests would be very welcome, indeed.
Thanks for your work on this!

Do we still need the explicit handling of the boost traversal categories with the new traits?

In short, for the BidirectionalIterator and RandomAccessIterator, no, and for weaker iterators, yes.
For BidirectionalIterator and RandomAccessIterator, the interface guarantees are sufficient to robustly distinguish between the two concepts. The boost traversal categories really only provide a mechanism to 'lie', i.e. specify a iterator level that is stronger or weaker than your interface would otherwise suggest (which is probably a footgun). However, the situation with ForwardIterator and InputIterator is less straight forward.
Fundementally, the multiple pass guarantee is what distinguishes the ForwardIterator concept from the InputIterator concept in the ranges TS. To my knowledge, there is no means to deduce this from the iterator interface; we really do need to author annotations of some sort to make a determination. Prior to the C++ 20 standard and its various iterator category requirement reductions, the traversal categories of the boost iterator library are the best way I know of to do so.

The remaining test failures are unrelated.

@apmccartney IIUC, a user still needs to specialize the Boost traversal category for their iterators if those are input iterators. Is that correct?

A user still needs to specialize the Boost traversal category for their iterators if those are input iterators. Is that correct?

If the user's iterator models forward traversal and nothing stronger, then yes, the user must specialize boost::iterator::iterator_traversal on their iterator type in order for hpx algorithms to take advantage of that forward traversal gaurantees.
If the user's iterator models bidirectional traversal or stronger, then no, the user need not take any action for hpx algorithms to take advantage of that traversal (regardless of the iterator's nested iterator_category typedef).

If the user's iterator models bidirectional traversal or stronger, then no, the user need not take any action for hpx algorithms to take advantage of that traversal (regardless of the iterator's nested iterator_category typedef).

@apmccartney Thanks for this explanation. However, when I use the reduce_iterators branch (see #3650), merge your changes there, and edit this line to input_iterator_tag, I still see compilation problems stating that the used iterator is not at least a forward iterator. I think the iterator used in that test exposes the interface of a random access traversable iterator, so things should compile. Would you mind having a look?

However, when I use the reduce_iterators branch (see #3650), merge your changes there, and edit this line to input_iterator_tag, I still see compilation problems stating that the used iterator is not at least a forward iterator.

There's apparently a bug in my implementation. Testing to come should sort that out. =)

Would you mind having a look?

Absolutely. I'll take a look this evening.

I reviewed the compilation failure for reduce_3641.cpp after merging my branch and making the perscribed modications to the file. After a bit of poking around, I was pleased to find that my implementation was simply incomplete rather than seriously flawed. I've made the corresponding extension and the test is now passing on my locally merged branch. I've explained in some detail in the commit message.

This commit adds a specialization to the satisfy_traversal_concept for
the boost::forward_traversal_tag provided by the boost::iterator
library.
Forward traversal cannot be robustly verified via concept emulation due
to the ambiguities between iterfaces specified by the ForwardIterator
and InputIterator concepts in the C++20 ranges TS. That said, any
class that satisfies the BidirectionalIterator concept is certain to
also fullfill the ForwardIterator concept.
The specialization established in this commit leverages that fact to
provide partial concept checking for ForwardIterator.

I plan to take some time Saturday afternoon to complete a small set of unit tests. Is there anything else you would like to see as part of this merge request?

Is there anything else you would like to see as part of this merge request?

@apmccartney Could you add some comment to the specialization of satisfy_traversal_concept<Iter, boost::forward_traversal_tag> (https://github.com/STEllAR-GROUP/hpx/pull/3684/files#diff-ad7521def89116999da36bcdfd269fbdR304) explaining your decision, please? A casual reader might otherwise not understand why it is derived from bidirectional_concept<Iter> (frankly, my first thought was: 'This must be a typo!'). Otherwise, all is fine and good to go. Thanks!

@apmccartney Some of our algorithm tests fail as a result of your changes (see https://circleci.com/gh/STEllAR-GROUP/hpx/67315 and https://circleci.com/gh/STEllAR-GROUP/hpx/67327). Would you be able to have a look?

Yes, absolutely. Looking now. I apologize for the delayed response. Recovering from illness.

@msimberg this is good to go. The errors on pycicle are unrelated, afaics.

@msimberg I would like to merge this asap in order to get #3641 and #3650 out of the way.

@hkaiser almost there... @apmccartney unfortunately we still try to support C++11 (although we've discussed dropping it soonish). That means your autos for return types won't work, see here. Would you mind fixing those?

@hkaiser almost there... @apmccartney unfortunately we still try to support C++11 (although we've discussed dropping it soonish). That means your autos for return types won't work, see here. Would you mind fixing those?

I'll fix those. Thanks!

@msimberg should be fine now, let's see how the tests go.

@msimberg things look good now, I believe. The C++11 builds have succeeded. The tests fail at runtime because of a configuration error in pycicle… Merging now.

@apmccartney Congrats to you for your first accepted PR into HPX. Please get in contact with @aserio if you're interested in receiving a STE||AR-Group t-shirt. We give that away for all of our first-time contributors.


"String += int" doesn't convert the int correctly

In the Java source, I used "string += i" where i = 1 produced the string "01" and i = 2 produced "11".
j2objc v<IP_ADDRESS>.1, Xcode v7.2

What you described isn't valid Java syntax. Please modify the following test, run it with javac and j2objc to report a difference, and if there's a difference between the two outputs, reopen this issue and attach the test that fails.
This is what I think you meant, which works the same on both platforms:
StrCat.java:
class StrCat {
  public static void main(String... args) {
    String s = "";
    s += 1;
    System.out.println(s);
    s = "";
    s += 2;
    System.out.println(s);
  }
}

$ javac StrCat.java
$ java StrCat
1
2
$ j2objc StrCat.java
translating StrCat.java
Translated 1 file: 0 errors, 0 warnings
$ j2objcc StrCat.m
$ ./a.out StrCat
1
2

Actually, I simplified my example too much. What I had in my code was "string += i + 1" which on Android appends the result of "i + 1" to the string but j2objc appends i then 1. (Hence i=0 => "01" and i=1 => "11")
What do you mean, not valid Java? I've used this in my Android code for years. (And it's accepted by j2objc but produces a different result)

I hate guessing games: J2ObjC is a compiler, and the best tests/bug-reports for compilers are simple classes with a main() that executes some code and reports a result, such as the StrCat.java class I included. Your comment was still vague (example code would have required less typing), but I was able to reproduce your problem with the following:
class StrCat {
  public static void main(String... args) {
    String s = "";
    int i = 0;
    s += i + 1;
    System.out.println(s);
    s = "";
    i = 1;
    s += i + 1;
    System.out.println(s);
  }
}

Fixed in current source.


Should we default to an empty prefix?

Original discussion in #86 and #77 indicated that it's probably better to remove the default dot- prefix. But we might want to keep some backward compatibility for it.
All ideas and preferences welcome!

Maybe this should be part of v2 and not in a minor release.
But may I suggest that we rethinking the way we assume normal files and dotfiles are different? Why not do what stow does and just symlink whatever it finds inside the directory be it a dotfile or not. I currently can't figure out a way to have this behavior.


fix: fail fast on sorted selection with step cache

Closing as outdated.
The underlying issue is not a priority at the moment.


Exception while using the Rapid Library

Hi Lalith,
I'm trying to use Rapid for membership information. Trying to execute the StandaloneAgent example provided in the examples directory. Below are the steps I'm executing.
Step1:  on Terminatal1 executed the following command
$>java -cp standalone-agent.jar:. com.test.StandaloneAgent --listenAddress <IP_ADDRESS>:1234 --seedAddress <IP_ADDRESS>:1234
Output I'm seeing as follows
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1234 -- cluster size 1
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1234 -- cluster size 1
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1234 -- cluster size 1
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1234 -- cluster size 1
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1234 -- cluster size 1
Step2: Opened Terminal2 and executed the following command
$>java -cp standalone-agent.jar:. com.test.StandaloneAgent --listenAddress <IP_ADDRESS>:1235 --seedAddress <IP_ADDRESS>:1234
Output:
Terminal1
[main] INFO  com.vrg.rapid.Cluster  - <IP_ADDRESS>:1235 is sending a join-p2 to <IP_ADDRESS>:1234 for config<PHONE_NUMBER>269931577
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1235 -- cluster size 2
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1235 -- cluster size 2
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1235 -- cluster size 2
and the output on Terminal2 is as follows
[protocol-<IP_ADDRESS>:1234-0] INFO  com.vrg.rapid.MembershipService  - Join at seed for {seed:<IP_ADDRESS>:1234, sender:<IP_ADDRESS>:1235, config:3713649891269931577, size:1}
[protocol-<IP_ADDRESS>:1234-0] INFO  com.vrg.rapid.MembershipService  - Proposing membership change of size 1
[protocol-<IP_ADDRESS>:1234-0] INFO  com.test.StandaloneAgent  - The condition detector has outputted a proposal: ClusterStatusChange{configurationId=3713649891269931577, membership=[hostname: "<IP_ADDRESS>"
port: 1234
], delta=[<IP_ADDRESS>:1235:UP:]}
[protocol-<IP_ADDRESS>:1234-0] INFO  com.vrg.rapid.MembershipService  - Decide view change called in current configuration<PHONE_NUMBER>269931577 (1 nodes), for proposal [<IP_ADDRESS>:1235, ]
[protocol-<IP_ADDRESS>:1234-0] INFO  com.test.StandaloneAgent  - View change detected: ClusterStatusChange{configurationId=-4337195239393783641, membership=[hostname: "<IP_ADDRESS>"
port: 1235
, hostname: "<IP_ADDRESS>"
port: 1234
], delta=[<IP_ADDRESS>:1235:UP:]}
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1234 -- cluster size 2
[main] INFO  com.test.StandaloneAgent  - Node <IP_ADDRESS>:1234 -- cluster size 2
Step3:
I have killed the process in the Terminal2 and moved to the Terminal1. I'm getting following exception in the Terminal1
[bg-<IP_ADDRESS>:1234-0] ERROR com.vrg.rapid.messaging.impl.Retries  - Retrying call to hostname: "<IP_ADDRESS>"
port: 1235
because of exception {}
io.grpc.StatusRuntimeException: UNAVAILABLE
at io.grpc.Status.asRuntimeException(Status.java:526)
at io.grpc.stub.ClientCalls$UnaryStreamToFuture.onClose(ClientCalls.java:433)
at io.grpc.ForwardingClientCallListener.onClose(ForwardingClientCallListener.java:41)
at io.grpc.internal.CensusTracingModule$TracingClientInterceptor$1$1.onClose(CensusTracingModule.java:339)
at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:443)
at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:63)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.close(ClientCallImpl.java:525)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl.access$600(ClientCallImpl.java:446)
at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:557)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:107)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /<IP_ADDRESS>:1235
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:714)
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:323)
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:633)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
... 1 more
Caused by: java.net.ConnectException: Connection refused
... 11 more
[bg-<IP_ADDRESS>:1234-0] ERROR com.vrg.rapid.messaging.impl.Retries  - Retrying call to hostname: "<IP_ADDRESS>"
port: 1235
because of exception {}
What I expected on Terminal1 was  cluster size 1. However, I'm getting the above expection
Step 4:
on Terminal2, I'm trying to restart the process that I have killed in the step3 and getting the following exception
[main] ERROR com.vrg.rapid.Cluster  - Join message to seed <IP_ADDRESS>:1234 returned an exception: {}
com.vrg.rapid.Cluster$JoinPhaseTwoException
at com.vrg.rapid.Cluster$Builder.joinAttempt(Cluster.java:400)
at com.vrg.rapid.Cluster$Builder.join(Cluster.java:315)
at com.vrg.rapid.Cluster$Builder.join(Cluster.java:294)
at com.test.StandaloneAgent.startCluster(StandaloneAgent.java:44)
at com.test.StandaloneAgent.main(StandaloneAgent.java:100)
[main] INFO  com.vrg.rapid.Cluster  - <IP_ADDRESS>:1235 is sending a join-p2 to <IP_ADDRESS>:1234 for config -1
What I expect here is that, after restarting the process again, it will rejoin the cluster and cluster size should be 2.
Is the behaviour in the step3 and step4 are expected? Am I using the membership library correctly.
Can you please help me here?
Thanks
Ravi

Rapid is a consensus based membership service. Once you bootstrap a cluster (size > 1), you need a majority of processes to agree to each membership change. In this case, you had size == 2, and then dropped to size == 1, so there is no majority anymore.
Once you lose a majority, there is no safe way for Rapid automatically recover. You will need some out-of-band mechanism (like an admin command) that invokes Cluster.start() and start a new cluster.
For your particular exercise, try to create 5 nodes and try failing some.

Thank you Lalith.
One more question, can we use the nodes/machines that are belongs to multiple Data Centres to form a cluster?

Yes you can (the membership structure is flat and independent of topology).
You may want to consider plugging in your own messaging and failure detectors though (see the examples/ folder and also look at https://github.com/lalithsuresh/rapid/blob/master/rapid/src/main/java/com/vrg/rapid/monitoring/IEdgeFailureDetectorFactory.java).


Running on little endian machine

Will your code generate the correct OTPs on a little endian machine?

It's only been tested on little endian, but I don't think the code does anything that cares about the systems' endianness.


Add implementation/support for ALTER PUBLICATION

Add plan + execution logic for ALTER PUBLICATION.

@mergifyio rebase


Fix bug in dbh.op_upsert not replacing values

Codecov Report

Merging #12 (9708218) into master (9e8570e) will decrease coverage by 0.02%.
The diff coverage is 85.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##           master      #12      +/-   ##
==========================================
- Coverage   82.33%   82.32%   -0.02%
==========================================
  Files           9        9
  Lines        1653     1663      +10
==========================================
+ Hits         1361     1369       +8
- Misses        292      294       +2

Flag
Coverage Δ

unittests
82.32% <85.00%> (-0.02%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/dbh.c
77.28% <85.00%> (+0.10%)
:arrow_up:

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


analogy network imread

the network input is [224,224,3],should the imread images imresize [224,224,3]？
and the network input should scale [0,1], or just [0, 255]?

Thanks for asking.
Yes, you should resize the image size so that it matches the input size.
For scaling, we use [0, 255].


set up for testing and add empty PlusCodes.sol file

A few outstanding issues I noticed:
Folder Names
Should they be capitalized or not? This is causing issues with setting up. I made de-capitalized, but this should be discussed.
Plus Codes contract
PlusCodes.sol was missing from the utilities folder. I'm not sure how to write it (even though a mock and test are dependent on it), so I need some guidance on what to do with it.

Ideally file names should be sentence case. (With exceptions for README) That's what Swift does and that is the best managed language.
If that's not possible because tooling is expecting something different then we can look at configuring the tooling, or changing this policy.

Plus Codes can be removed. That's too domain specific