fix: Distance - The title 'Distance' changing to 'Merchant' when toggling on Billable

Details

Fixed Issues
$ https://github.com/Expensify/App/issues/31128
PROPOSAL: https://github.com/Expensify/App/issues/31128#issuecomment-1804110716
Tests

Go to old dot as admin
Navigate to collect Workspace settings--Expenses
Set "re-bill expenses to clients" to "default to Billable "
Steps:
Launch app
Open employee WS
Tap plus icon -- Request money
Tap distance request
Select start and finish waypoints
Tap next
Tap distance
Tap on distance request created to open distance request detail page
Note under distance heading, distance mentioned
Tapping on distance, user can add/change waypoints
Toggle on Billable
Verify "distance" heading is not changed.
Tap on "distance"
Verify waypoints are editable

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

Offline tests

Go to old dot as admin
Navigate to collect Workspace settings--Expenses
Set "re-bill expenses to clients" to "default to Billable "
Steps:
Launch app
Open employee WS
Tap plus icon -- Request money
Tap distance request
Select start and finish waypoints
Tap next
Tap distance
Tap on distance request created to open distance request detail page
Note under distance heading, distance mentioned
Tapping on distance, user can add/change waypoints
Toggle on Billable
Verify "distance" heading is not changed.
Tap on "distance"
Verify waypoints are editable

QA Steps

Go to old dot as admin
Navigate to collect Workspace settings--Expenses
Set "re-bill expenses to clients" to "default to Billable "
Steps:
Launch app
Open employee WS
Tap plus icon -- Request money
Tap distance request
Select start and finish waypoints
Tap next
Tap distance
Tap on distance request created to open distance request detail page
Note under distance heading, distance mentioned
Tapping on distance, user can add/change waypoints
Toggle on Billable
Verify "distance" heading is not changed.
Tap on "distance"
Verify waypoints are editable

[x] 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: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb 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 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 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.
[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.

Screenshots/Videos

Android: Native
https://github.com/Expensify/App/assets/85894871/80302798-d7f3-40bc-959a-2370138201c7

Android: mWeb Chrome
https://github.com/Expensify/App/assets/85894871/4ab0ac85-8ffb-40bb-a385-46aaa41f737c

iOS: Native
https://github.com/Expensify/App/assets/85894871/c8658810-e114-4c6f-9d51-d9dc2b6c856f

iOS: mWeb Safari
https://github.com/Expensify/App/assets/85894871/59167370-10ce-4a00-a7d4-2793defaa21c

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/85894871/c6ab34e6-004e-4cca-acba-436b948a65b4

MacOS: Desktop
https://github.com/Expensify/App/assets/85894871/dc62eb16-d7ae-4f1f-ad1e-36ad5f093ce9

Reviewer Checklist

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

[X] I verified the steps for local testing are in the Tests section
[X] I verified the steps for Staging and/or Production testing are in the QA steps section
[X] 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)
[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 checked that screenshots or videos are included for tests on all platforms
[X] I included screenshots or videos for tests on all platforms
[X] I verified tests pass on all platforms & I tested again on:

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

[X] 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
[X] I verified proper code patterns were followed (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] 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 verified that this PR follows the guidelines as stated in the Review Guidelines
[X] 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)
[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] 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 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.
[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 reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/16493223/f3c30702-d06d-423c-b46f-d1ffdd914ae1

Android: mWeb Chrome

https://github.com/Expensify/App/assets/16493223/e311f113-6f81-4a13-b22e-cd3c3a761418

iOS: Native

https://github.com/Expensify/App/assets/16493223/eb6a5d09-0999-40b3-b822-8cee6f710b0c

iOS: mWeb Safari

https://github.com/Expensify/App/assets/16493223/d8fefa3d-3847-4233-a1d3-1f51d2f55956

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/16493223/a948a806-e602-420d-9c95-6a00e3a9f3b3

MacOS: Desktop

https://github.com/Expensify/App/assets/16493223/59523124-b9f9-4c2a-85e2-2a9b02112834

@Krishna2323 Thanks!

: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.

🚀 Deployed to staging by https://github.com/iwiznia in version: 1.4.2-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.2-3 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Fix bloom ffn fusion

Type of Change
feature or bug fix or documentation or others
API changed or not:not
bug fix
Description

Adding a bias to Bloom's ffn fusion can inference logical sentences, but it's not the same as modified sentences
detail description
JIRA ticket: xxx

Expected Behavior & Potential Risk
the expected behavior that triggered by this PR
How has this PR been tested?
how to reproduce the test (including hardware information)
Dependency Change?
any library dependency introduced or removed

old result

new result


Maintain original question order

This looks ready to merge to me.
Do you want to take this opportunity to add a couple tests for the pieces of getFormV2? It might save us some headaches in the future.

Using #544 to track the addition of tests, which requires a little scaffolding and some slightly tedious fixture work.


fix(jdtls): update handlers to support 0.5.1 signature

maintains compatibility with <= nvim 0.5.0

Thanks!

Please run stylua . in the root of lspconfig to address style-lint, then make lint to confirm there are no luacheck errors.

Thanks @mjlbach, stylua . and make lint have now been run and the PR has been updated.


Draggable custom price line

Type of PR:
PR checklist:

[ ] Addresses an existing issue: fixes #
[ ] Includes tests
[ ] Documentation update

Overview of change:
This is a patch from here - thanks randalhsu
https://github.com/randalhsu/OPAL/tree/main/lightweight-charts-patch
Is there anything you'd like reviewers to focus on?

sorry ignore this.  New to all this


Duplicate identifier error after moving a typescript file

From @voxking on March 14, 2016 23:12

VSCode Version: 0.10.10
OS Version: Windows 10

Typescript says things are duplicate when i move a file around.
My guess is that the location of the file is not updated in the typescript service properly because when i restart VSCode it fixes itself but still its annoying to have to restart the editor.
Steps to Reproduce:

get a large typescript code base like react.d.ts or something similar
move it
watch it happen

Copied from original issue: Microsoft/vscode#4211

From @voxking on March 14, 2016 23:16

Moving to TS.
What we do in this case is we send a close request of the file in its old location and then an open at the new location. There is now API to signal a move right now. If there is something VSCode can do different to solve the problem, please move back.

This should be fixed by #8371 . Please reopen it if the issue still exists.


Support for Hardy Barth cPH1

Is your feature request related to a problem? Please describe.
I use a Hardy Barth cPH1 Wallbox which is currently not supported
Describe the solution you'd like
Add support for Hardy Barth cPH1 Wallbox
Describe alternatives you've considered
use Hardy Barth cPH1 Wallbox internal features, which are currently very limited

Siehe https://github.com/evcc-io/evcc/issues/2229


Docker will not build

Made it be able to downgrade

in Dockerfile, made everything to be able to downgrade


Two factor login redirects to favicon

Gitea version (or commit ref): 1.9.0+dev-257-g7dd983797
Git version: 2.22.0
Operating system: Manjaro Linux
Database (use [x]):

[ ] PostgreSQL
[ ] MySQL
[ ] MSSQL
[x] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[x] Not relevant

Description
When I login to my self-hosted instance of Gitea using 2FA, I always get redirected to a 404 at base_url/favicon.ico . Am I doing something wrong? I'm using the gitea/gitea docker image from Docker Hub. I can just change the URL to base_url and it works, but I was wondering if there's anything I can do to fix it. My nginx config:
server {
  server_name MY_SERVER_NAME;

  listen 443 ssl;
  add_header Strict-Transport-Security "max-age=31536000";

  ssl on;
  ssl_certificate     /etc/letsencrypt/live/MY_SERVER_NAME/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/MY_SERVER_NAME/privkey.pem;

  ssl_protocols  SSLv3 TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers RC4:HIGH:!aNULL:!MD5;
  ssl_prefer_server_ciphers on;
  keepalive_timeout    60;
  ssl_session_cache    shared:SSL:10m;
  ssl_session_timeout  10m;

  location / {
    proxy_pass http://localhost:10080;

    proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
    proxy_set_header        Accept-Encoding   "";
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Forwarded-Proto $scheme;
    add_header              Front-End-Https   on;
    proxy_redirect     off;
  }
}

We are also experiencing this same issue. Everyone has 2FA and is redirected to the favicon as described above.

I think this is because static file request path has been saved to session.

@sardaukar please check if what you're experiencing is https://github.com/go-gitea/gitea/issues/13771

This is no longer happening to me with newer versions of Gitea.


Multiple trio-click/asyncclick repositories

Heya. It's a bit confusing that there are 3 (that I know of) asyncclick/trio-click repositories.
It looks like this is the 'official' one, right? I think the fact that this one is 'forked from smurfix/trio-click' causes a few issues. I tried to create a pull request here, but I always get redirected to the 'smurfix' one.
Initially I created the pull request on https://github.com/click-contrib/asyncclick, before there was a mention to go there.
Also, quick question: does the fact that this is named 'trio-click' mean only 'trio' will be 'supported' in the long run? I use this with asyncio (which works fine for now), but would be good to know if this may change in the long run...

Also related to this issue:
asyncclick' setup.py points to http://github.com/python-trio/asyncclick
https://github.com/python-trio/trio-click/blob/bac4f5404749772f315b90ea38fe02de81681835/setup.py#L25
This is important because PyPI's asyncclick entry points its homepage to an invalid URL in trio-click organization.

did you know, you can contact github support to swap the direction of your forks, so that @smurfix / trio-click becomes a fork of python-trio/trio-click ? https://support.github.com/contact

tbh I'm not sure what's supposed to be happening here either. @smurfix can you sort us out?

I think this needs an organization admin to rename the repository, @njsmith

I think the desired outcome is:
https://github.com/smurfix/trio-click/ -> 302 -> https://github.com/python-trio/asyncclick
https://github.com/trio-click/trio-click/ -> 302 -> https://github.com/python-trio/asyncclick
@smurfix can you confirm?

Yeah, that would be helpful.
I've been neglecting asyncclick a bit but I'm working on merging the latest click release (plus anyio 2.0 compatibility).

@graingert I don't see a trio-click org?

correction:
I think the desired outcome is:
https://github.com/smurfix/trio-click/ -> 302 -> https://github.com/python-trio/asyncclick
https://github.com/python-trio/trio-click/ -> 302 -> https://github.com/python-trio/asyncclick
@smurfix can you confirm?

Yes, sure. I missed the earlier trio-click thing.

Hmm, ok, so in that case possibly the simplest way to accomplish that combination of redirects would be to:

delete this repo
transfer smurfix/trio-click to the python-trio org, so it becomes python-trio/trio-click
rename python-trio/trio-click → python-trio/asyncclick

Does that seem like a good plan? Would we be losing anything important if we deleted this repo in favor of the repo that's currently called smurfix/trio-click?

You could rename this repo, or move it to another org. Also I think GitHub support can do it all in one go with permission from the owners

I have just asked github support about how to redirect smurfix/asyncclick to python-trio/. Though deleting this one and moving my personal one over here would work for me.

Should be all done now


Fix typo

Codecov Report

Merging #61 into dev will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##              dev      #61   +/-   ##
=======================================
  Coverage   64.47%   64.47%
=======================================
  Files          16       16
  Lines         335      335
  Branches       96       96
=======================================
  Hits          216      216
  Misses         87       87
  Partials       32       32

Continue to review full report at Codecov.

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

@biancapower thank you!


CSUCI_Mapper(CSU_DSpace_Mapper)

Some general links to know:

Development contribution process
"CIC all tasks" list view
"CIC current sprint" status view

Specific to this mapper:

List of collections, by mapper type: https://registry.cdlib.org/?mapper_type=csuci_mets
Endpoint: http://scholarworks.calstate.edu/oai/request

Rikolti MVP project board cheat sheet:

Please @ CDL developers liberally, in the comments.
When picking up an "issue," please indicate:

a) Assignees: self assign;
b) Sprint: select the current sprint cycle;
c) Date started: indicate the start date -- see right side fields

CIC developers will likely need to create PRs (and possibly additional issues). When doing so, please also indicate the following:

a) Repository: Rikolti;
b) Milestone: "4 CIC work" (these details are required in order for them to surface in the Rikolti MVP project board); and
c) link the PR to the associated issue.

When requesting review, please:

a) include a comment & @ CDL developers; and
b) Date delivered: indicate the date delivered (field on the right)

@lthurston -- an update that CSU CI is planning to migrate out of DSpace later this year. We're proposing to close out this issue, as this mapper will become obsolete once they transition into a new system. Thank you!


Reduce the use unknownError in FileSystem

There were a few cases where unknownError was being used, including ones where the error was very much known. This should make it easier to diagnose such errors if they happen in the wild.

@swift-ci please test

@swift-ci please test
https://github.com/apple/swift-package-manager/pull/4003

https://github.com/apple/swift-package-manager/pull/4003
@swift-ci please test


chore: drop deprecated packages

The deprecation marker has now been published to npmjs.com, so we can
drop the deprecated packages, and only leave the new @jsii/ packages
there.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

AWS CodeBuild CI Report

Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository


remove drvjs from tools module

This change is

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.

Comments from Reviewable


[release-0.59]logs: Do not set verbosity for higher log levels

What this PR does / why we need it:
Without this PR a  warning will override the log level.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:
NONE

/lgtm


ETH balance not updating and not able to send from wallet

This was working fine last night.  I tried test transaction with my tokens also and clicking the generate button does nothing

whats the dev's policy on ensuring against breaking changes? i've been relying on this to make real transfers. is there a more reliable wallet available?

The fact that all ya'll are so obsessed with ICOs that you take down the nodes and crash everything is not a "breaking" change on our end.
Solution

Run your own node

Connect to that node in top right

Stop doing ICOs

hi are you a dev? im not doing anything with ICO's... please can you assist to find a solution. is this a software problem, or a node problem? some saying things worked ok last night... we are not all ethereum tech experts. thanks.

the software isn't reporting any problems... certainly not in a user friendly manner... it just isn't working. i had to delve into javascript console logs to see there are problems. even then i can't determine if its a problem with a node or the software...

can i change the node from myetherwallet.com?

top right corner laurencefass.


"gotk install" fails on Windows

I'm not sure what other information would be useful. --verbose didn't seem to add anything.
Terminal output:
~ ❯ gotk --version
gotk version 0.1.8

~\..\gotk-system ❯ gotk install  --verbose --dry-run
✚ generating manifests
✗ install failed: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory 'C:\Users\...\AppData\Local\Temp\kustomize-264520769\repo'

~\..\gotk-system  ❯ ls
        Directory: C:\Users\..\gotk-system

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
d----        10/15/2020   7:38 PM                  patches
-a---        10/15/2020   8:00 PM            280   applications.yaml
-a---        10/15/2020   4:18 AM           6115   gotk-system.yaml
-a---        10/15/2020   7:51 PM            270   kustomization.yaml
-a---        10/15/2020   8:00 PM            268   system.yaml
-a---        10/15/2020   2:34 AM          87053   toolkit-components.yaml
-a---        10/15/2020   7:48 PM            279   toolkit-kustomization.yaml
-a---        10/18/2020   8:20 PM            299   toolkit-source.yaml

This is the directory I previously bootstrapped using v0.1.8 using WSL on Windows 10.
Let me know if there's any other information I can provide.
EDIT:
The same command (gotk install  --verbose --dry-run) works under WSL.

Just ran into the same issue. Tried both under WSL and also with the Windows executable in Powershell.

gotk is working fine under the WSL2 Linux kernel.
( I dev on WSL2 )
I will try the Windows build in Powershell and see if I can isolate the issue affecting the more Windows native environments.

Yeah, WSL2 actually uses a Linux VM in the background where WSL1 just translated Linux commands to windows commands so there might be a difference there.
Thanks for looking into it.

Run into the same issue. I'm using Windows 10 and have no option to install WSL2.
It seams that the temp path creation fails under Windows. The directory C:\Users\xxx\AppData\Local\Temp\kustomize-030280576\repo was not created.
C:\Users\xxx>gotk bootstrap github --owner=%GITHUB_USER% --repository=xxx-infra --branch=main --path=xxx-dev --personal
► connecting to github.com
✔ repository cloned
✚ generating manifests
✗ generating install manifests failed: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory 'C:\Users\xxx\AppData\Local\Temp\kustomize-030280576\repo'

I debugged the code on my windows machine and found the code-line that breaks. But don't know why those paths are getting compared via d.HasPrefix.
https://github.com/kubernetes-sigs/kustomize/blob/76a8f034cb906baf1ca0a4f7b62cef785960a0a8/api/loader/loadrestrictions.go#L24

I just verified that the existing pullrequest which is referenced in this issue https://github.com/kubernetes-sigs/kustomize/issues/2789 will fix this gotk issue.

Thanks @haraldatbmw for digging into this. What if we drop the root-only restriction, would that solve the issue?

@stefanprodan The fix is inside the go-getter project (detect.go) https://github.com/hashicorp/go-getter/pull/284/files
Is there a place inside the toolkit code where the root-only restriction can be dropped?

@haraldatbmw can you please try my PR on Windows? Thanks

@stefanprodan I tested your PR on Windows without success. The same error occurs. The Detect function is called too and results in the same error. I think it's best to force the fix in go-getter and kustomize.
install failed: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory 'C:\Users\xxx\AppData\Local\Temp\kustomize-400166277\repo'

Ok so there is nothing we can do but wait on a fix in kustomize and by the looks of it, it will take some time. Meanwhile Windows users should download  kustomize v3.4.0 and install the toolkit with:
kustomize build https://github.com/fluxcd/toolkit/manifests/install?ref=main | kubectl apply -f-


[HotFix] Remove license violation in localization/lib/ndt_*

Status
PRODUCTION
Description
[Fix] Remove license violation in localization/lib/ndt_* (#1922)
Related PRs

branch
PR

hotfix/license_lib_ndt to develop
#1936

@kfunaoka Please update us on the status of this PR. If it won't make it into 1.11, then fork and do the PR from there.

I've moved the branch into my repo and will create a pull request into the split repo.
https://github.com/kfunaoka/Autoware/commits/hotfix/license_lib_ndt


Fix simple image being drawn twice. Fix #1113

@avandecreme Awesome, thank you for fixing this!
@jetic83 Can you verify this fixes your issue?

Yes, thank you! works excellent now!

@jetic83 Thank you for confirming!


Idea: Default to Wikidata label search if no Wikipedia article found

> pip = Reality::Entity.new("Piper Club")
=> #<Reality::Entity?(Piper Club)>
> pip.describe
-------------------------------
#<Reality::Entity?(Piper Club)>
-------------------------------
=> nil

That's because Piper Club article currently exists only in Italian Wikipedia, but its Wikidata item is full of statements that could be imported.

https://github.com/molybdenum-99/reality/commit/61bc9ead50d38d87f6468db27069bc015f85fe01 Did it! (Only for singular entities though, not for entity lists. Will fix it later.)
Also added some useful predicates for your case. In current master it is:
pip = Reality::Entity('Piper Club')
# => #<Reality::Entity(Piper Club)>
pip.describe
# ------------------------------
# #<Reality::Entity(Piper Club)>
# ------------------------------
#             coord: #<Reality::Geo::Coord(41°55′8″N,12°30′4″E)>
#        located_in: #<Reality::Entity?(Rome)>
#  official_website: "http://www.piperclub.it/"
#    street_address: "Via Tagliamento 9"
#  twitter_username: "piperclubroma"

:clap: Bravo!

Added list loading fallback too, now in master. Will came in next release, in 1-2 weeks. So, closing the issue now.


Add a max of 70 characters to the coupon code.

The coupon code should have a maximum, otherwise users can add very long strings (I tested with two paragraphs of lorem ipsum).
This sets the max to 70, the same as the title. We could set it to another value.
If this PR is accepted, we will need to do the same validation on the client.

Coverage decreased (-0.009%) to 28.34% when pulling f795d6af4841b51809bc405d66c578b8f9010091 on maxOnCouponCode into a9122dcfa6bc4779cf97a2489a4d8516f77e4f21 on master.

Coverage decreased (-0.009%) to 28.34% when pulling f795d6af4841b51809bc405d66c578b8f9010091 on maxOnCouponCode into a9122dcfa6bc4779cf97a2489a4d8516f77e4f21 on master.

Coverage decreased (-0.009%) to 28.34% when pulling 15060a9388dcc9a705ee0c764f26873d9fb4f255 on maxOnCouponCode into a9122dcfa6bc4779cf97a2489a4d8516f77e4f21 on master.


Link to page + version with change.log

Can you put a link to the plugin web suite here
Publishing a version history on the web suite could also helpful

Link added.
I'll maintain a version history from this point on!

Thanks!


Adding for_range operator

See #654 for discussion.

I changed the syntax to be like this:
+loop:
  for_range>:
    from: 0
    to: 100
    step: 10
  _parallel: true
  _do:
    +nesting:
      echo>: "doing something for range [${range.from}, ${range.to})"

I also added range.index variable so that tasks can use it as an unique identifier of the task.
This is useful for this use case: for_range operator creates temporary tables (tmp_0, tmp_1, tmp_2).


satisfies operator breaks with callback on Partial object literals

🔎 Search Terms
"satisfies", "callback", "function"
🕗 Version & Regression Information

This is the behavior in every version I tried (above 4.8), and I reviewed the FAQ for entries about "Bugs that Aren't Bugs"

⏯ Playground Link
Link to playground
💻 Code
type AuthState = {
  isLoading: boolean;
  isLoggedIn: boolean;
  userToken: string | null;
};

type ActionFunction = (arg: any) => {
  type: string;
  payload: Prettify<Partial<AuthState>>;
};

export const authActions = {
  signOut: () => ({
    type: actionTypes.SIGN_OUT,
    payload: { userToken: null, isLoggedIn: false },
  }),
  login: ({ userToken }: { userToken: string }) => ({
    type: actionTypes.LOGIN,
    payload: { userToken, isLoggedIn: true },
  }),
  restoreToken: ({ userToken }: { userToken: string }) => ({
    type: 22, // error on type for 22: Type 'number' is not assignable to type 'string'.
    payload: { userToken, isLoading: false, notAValidKey: 'Value' }, // no error on notAValidKey, should error Object literal may only specify known properties, and 'notAValidKey' does not exist in type 'Partial<AuthState>'
  }),
} satisfies Record<string, ActionFunction>;

🙁 Actual behavior
There is no error thrown on payload for the key notAValidKey as one would expect since this key isn't inside the Partial type AuthState. There is an error thrown for type with value 22 so the callback type ActionFunction isn't breaking the satisfies operator.
🙂 Expected behavior
This should throw an error on restoreToken in the above authActions const.
The behaviour should mimic what happens when there is no callback in the object. For example as it errors here:
type AuthState = {
  isLoading: boolean;
  isLoggedIn: boolean;
  userToken: string | null;
};

export const action = {
  key: {
    isLoggedIn: true,
    notAValidKey: 'Value', // error thrown: Object literal may only specify known properties, and 'notAValidKey' does not exist in type 'Partial<AuthState>'.
  },
} satisfies Record<string, Partial<AuthState>>;

Additional information about the issue
No response

Functions aren’t contextually typed in their return type afaik so EPC doesn’t apply.  Note that the excess property check is more of a built-in lint rule than a type check, so it’s intentionally not comprehensive.

Simplified repro (Playground):
type AuthState = {
  isLoading: boolean;
  isLoggedIn: boolean;
  userToken: string | null;
};

type ActionFunction = (arg: any) => {
  type: string;
  payload: Partial<AuthState>;
};

const action1 = (({ userToken }: { userToken: string }) => ({
    type: "fun",
    payload: { userToken, isLoading: false, notAValidKey: 'Value' },
})) satisfies ActionFunction;  // no EPC error

const action2: ActionFunction = (({ userToken }: { userToken: string }) => ({
    type: "fun",
    payload: { userToken, isLoading: false, notAValidKey: 'Value' },
}));  // also no EPC error

which I'm almost positive is a duplicate of like 10 other issues.  tl;dr you shouldn't rely on the excess property check to enforce runtime invariants - you need #12936 for that.

The closest thing to a canonical duplicate afaict is https://github.com/microsoft/TypeScript/issues/7547

#241 is also relevant


Scheduler timestep_transform issues during training

Hello, first of all thank you for the great work!
I am trying to use the training script for training the model, and it seems that the model_args dictionary doesn't include the height, width, num_frames values in the training script, so it fails to run when we set the noise scheduler flag use_timestep_transform to True. Specifically, the timestep_transform method (https://github.com/hpcaitech/Open-Sora/blob/476b6dc79720e5d9ddfb3cd589680b2308871926/opensora/schedulers/rf/rectified_flow.py#L10) requires these dictionary keys, and these aren't passed at any stage in the training script. Is there an easy way to fix this?
Best,
Konstantinos

Just realized that the dataset contains this information and the model_args is updated every time a new batch is used. Closing the issue.


Color :status by default

There are currently some failing unit tests that i'm not exactly sure how to fix. Mostly on asserting colors. Could use some help on this.


reply to solved tickets can get lost

To-Reproduce:
Customer sends email
Will get notification about ticket created - fine :)
Supporter is writing answer and mark ticket as solved.
Customer don't think so and will reply
Supporter will not se the reply because it's listed under solved ... this will be a little show stopper ;)
Support will not react ...
Version:
current master
Possible solution:
if ticket is in solved list and customer replys ticket will get back to pending state
Maybe related to issue #22

Yes, makes totally sense,
I will make that if customer replies when it is solved, it will be marked as open again (since pending means is waiting for customer)

Thanks !

I pulled the dev and checkt app/Ticket.php so i could be sure to work with the fixed verison :)
Then i tried the steps i discribed but the ticket status did not change. Some idea why ?

Can you try to create a test in similar at the SimpleTicketTest::commenting_a_closed_ticket_reopens_it
but in
CreateTicketsFromNewEmailsTest
Should be a mix of that test and the does_create_comments_for_new_comment_emails
I have to finish another thing now so I can't look at it quickly..
Let me know!

Hi,
Just created the test
CreateTicketsFromNewEmailsTest::a_comment_from_requester_email_changes_status_to_open
And it passes,
What it testes is that:

Customer creates a ticket,
Agent mark it as solved
Customer replies by email
4. Ticket is reopened

Thanks - i looked at the tests you mentioned - but yesterday i run in problems with phpunit on my dev machine ;)
I'll be on the road up to monday - so i'm not sure if i found the time for a closer look - i'll try to bring up the tests the on the server ASAP and check if / whats going on :-)

I believe it should be working now, but let me know if it is not for you
Cheers,

Hello BadChoice :)
if found out
PHP Fatal error:  Trait 'Illuminate\Foundation\Testing\RefreshDatabase' not found in /home/forge/...../tests/Unit/CreateTicketsFromNewEmailsTest.php on line 18
Did i forget to run a command because
vendor/laravel/framework/src/Illuminate/Foundation/Testing does not contain RefreshDatabase
or is a file not checked in ?

you need to composer update

Thanks @composer - now it works ...
Customer writes Email
Customer gets Notificaiton
Supporte (wich is currently logged in) is writing a answer and not assigning and pressing comment as solved
Customer gets this answer
Customer writes back
ticket still remains solved
I guess i could be because of this workflow ?
 ./vendor/bin/phpunit --filter CreateTicketsFromNewEmailsTest tests/Unit/CreateTicketsFromNewEmailsTest.php
PHPUnit 6.3.0 by Sebastian Bergmann and contributors.
...                                                                 3 / 3 (100%)
Time: 659 ms, Memory: 10.00MB
OK (3 tests, 15 assertions)

Ok i digged into to it the old way ... via writing into logfile ;)
Change source :
    private function updateStatusFromComment($user, $newStatus) {
        Log::info('$newStatus: '.$newStatus);
        Log::info('$this->status: '.$this->status);
        $previousStatus = $this->status;
        if ($newStatus && $newStatus != $previousStatus){
                $this->updateStatus($newStatus);
                 Log::info('A');
        }
        else if (!$this->user && $this->status != static::STATUS_NEW){
                $this->updateStatus(static::STATUS_OPEN);
                Log::info('B');
        }
        else{
                $this->touch();
                Log::info('C');
        }

        event(new TicketStatusUpdated($this, $user, $previousStatus));
        return $previousStatus;
    }

After i set the ticket to solved i wrote a email from the custer account and found in the logfile
[2017-09-19 12:22:20] production.INFO: $newStatus:
[2017-09-19 12:22:20] production.INFO: $this->status: 4
[2017-09-19 12:22:20] production.INFO: C

$newStatus from  public function addComment($user, $body, $newStatus = null) seams to be null
I try to go mor into it later this day or tomorrow ;)

I can't work on this today, let me know what else you find and tomorrow I can spend some time ;)

I'm not sure if this line is resonsible for reOpen
if (!$this->user && $this->status != static::STATUS_NEW){
and i guess $this->user is set because ticket was once send to customer by a support-user ?
so touch() block will be triggered....

You were right, I was looking for the ticket user, and I needed to look for the commenter
Fixed in the last commit

Thanks a lot that you took the time :-)

Worked like charme :-)

Great!

is there any email reply system in handesk

it replies automatically when you update the ticket


close menu

@devsideal
can we close menu manually after perform click operation

this feature is not in current version but good idea, i will add in next version.

Done in new release
use  app:autoClose="true/false" in xml
or  mSquareMenu.setAutoClose(true/false);  in java

@devendroid
Thanks. Keep it up.... You have done a Great Work


Vertical align in outlook

**How can we reproduce this bug
When creating 2 columns, images and callouts in the right hand column are vertical aligned Center in outlook but aligned top everywhere else, when using inky markup
What did you expect to happen?
All to be top aligned
What email clients does this happen in?
Outlook 2010 2013
I can fix with th, td {vertical-align: top;}

Seems like that should be added to the _normalize.scss file. Is that something you can add with a PR?

I think that it happens because it's not explicitly set. You can now explicitely set the valign on a column Resolved by zurb/inky#45
It's in the develop branch for testing before release!


Refactor the order's finite state machine

Feature Request
Is your feature request related to a problem or unsupported use case? Please describe.
We added a finite state machine on the order in PR https://github.com/openfun/joanie/pull/178 but misused it.
Describe the solution you'd like
The frontend should be able to create an order in draft state and slowly update it to complete the requirements (credit card or other payment, invoicing address, signed contract...). Once the order is ready, the frontend can trigger a confirm transition that will make all the checks and validate the order. The confirm transition` should return a 400 error if the order is not well prepared.
The confirm transition is where the credit card payment should be created on the provider.
The current failed state is final which does not seem like a good idea. It is the credit card payment that fails but the order still has a chance to proceed once we fix the payment. In view of this, a better name for this state is pending.
Discovery, Documentation, Adoption, Migration Strategy
flowchart TD
    D(("draft")) -->|submit| S((submitted))
    S --- T{payment successul?}
    T -->|no| P((pending))
    P -->|retry| T
    T -->|yes| V((validated))
    D -->|cancel| C((canceled))
    P -->|cancel| C
    V -->|cancel| C
    V -->|exception| P
    style V fill:#1f883d,stroke:#1f883d,color:#fff
    style C fill:#f00,stroke:#f00,color:#fff
    style P fill:#ee7600,stroke:#ee7600,color:#fff
    style S fill:#0078ee,stroke:#0078ee,color:#fff

After implementation, update this graph and add it to the project's documentation.

Do we need the confirmed state? The order could jump directly to pending state after the payment

As discussed IRL, we renamed the first state to "submitted" :tada:

@samy-aitouakli the workflow seems a little different in the code than what was describe in the issue. Can you add a documentation page that includes this mermaid graph, modified to match to what was merged and explaining the ordering process?


Clusterlink demo fix

I was trying to use the clusterlink demo, but ran into a few different issues. After further testing, I found the following changes allowed for a successful cluster link example.

Issues with the SSL certificates not containing the Source and Destination entries in the SAN
Source and Destination deployment yaml used the same TLS secret for zookeeper and kafka, this would certainly fail SSL.
Clusterlink Resource Yaml failed to apply with algo error.
I worked around this by converting the kafka-server-key.pem to PKCS8 format and creating a new TLS secret in kubernetes.
Also fixed up a few of the items in the README.md file.

LGTM


"ready" event not firing

Hey there,
I'm playing around with the app events, and cannot get "ready" to fire. Here's a minimal example, with JSBin example. "render" fires just fine, but the "ready" event does not get called:
const { h, app } = hyperapp;

const initialState = {};

const view = (state, actions) => (
  <div class="container">
    Hey.
  </div>
);

const events = {
  ready: () => console.log('ready'),
  render: () => console.log('render')
}

app({
  state: initialState,
  view: view,
  events: events
})

Not sure if it's a bug, or if I'm doing it wrong. Much thanks!

This has been changed on GitHub, but not yet released through npm.  It was renamed from loaded to ready, so you can use the former for now.  Sorry for the confusion, we have been polishing up for a v1 release.


Update print message for upload_conversion_adjustment code sample.

Both, the reason for the new added spaces is due to the new Perl formatter on v5.30.1, which was just upgraded to on gLinux.


Fastnlight: Watch zk9.cc

Fastnlight requests the watch of the watch_keyword zk9\.cc. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

zk9\.cc has been seen in 0 true positives, 0 false positives, and 0 NAAs.


Ad-hock ignore and blacklist files

It would be good to be able to specify a blacklist and ignore list as custom files through command line parameters, instead of predefined locations ones (and in that case it would take priority).

This can be closed now.

Can you please make a new tag for the recent features to get to Debian and other distros?


u16 can not be used as type specifier

I tried to send an u16 slice or array using {=[u16]} (or {=[u16;3]} as documented in the defmt book. However I got a compiler error complaining about [u16] being an invalid type specifier. Same problem for u32. u8 compiles and runs without issues. Reduced test case below. I am using defmt 0.3.8 with rust/cargo 1.82.0
use defmt::*;

fn main() {
    let arr :[u16; 3] = [0,1,2];

    debug!("{=[u16]}", arr);

}

=[u8] is supported as a special case because people really often want to log byte arrays on embedded systems (network packets, disk sectors, HID frames, etc). =[u16], etc, is not supported at this time.


Color shifts a different amount depending on the output format

I've been using cupscale for some time now and I have noticed that using most models the images colors shift some amounts. While I've mostly thought that this is just artifacts from the models I found out today that there seem to be differences in this color shift depending on the file output.
When I output images to .png I get more color shift than when I output them to .jpg which seems odd to me.
In addition it seems possible to fix some of the color shift on the .png files by importing them into gimp and re-exporting the image. Which does mostly fix the color issue. In terms of colors the re-exported images have the exact same colors as when I directly output .jpg files but the file is still a png.
If I had to guess what was going on I'd guess that there is something going on with the png encoding that is causing it to output weird colors or something. Also since the colors on pngs are fixable by re-exporting the image it seems like it is possibly some other kind of a weird issue
Here is a small example of the issue. Both images are cut from the corner of a larger image I upscaled using cupscale and the ultrayandere model.
The first image is output as png and the second one is output as jpg

For whatever weird reason the png output is much darker and the jpg image is much closer to the original. I can also get the png image to the same colors as the jpg by re-exporting it as I described above.
If it is of any use I have a nvidia gpu and I used the cuda/pytorch esrgan option.

Mhh.. well, how could I say it.
The long story short is that ffmpeg is fuuuuuucked with color management.
https://github.com/n00mkrad/flowframes/issues/84


add Qwen2

Please add Qwen2 support
EETQ_CAUSAL_LM_MODEL_MAP = {
    "llama": LlamaEETQForCausalLM,
    "baichuan": BaichuanEETQForCausalLM,
    "gemma": GemmaEETQForCausalLM
}

Hello, thank you for your interest in EETQ. The code you modified is for vllm, whose code is not merged yet, https://github.com/vllm-project/vllm/pull/3614. Could you please specify how you will use it?  If you want to quantize Qwen2 with EETQ on transformers or TGI, I think you could directly use it under these two frameworks.

I am not using vllm.  My change is not related to vllm.
I am trying to do this:
from eetq import AutoEETQForCausalLM
from transformers import AutoTokenizer

model_name = "/workspace/models/dolphin-2.9.2-qwen2-72b"
quant_path = "/workspace/models/dolphin-2.9.2-qwen2-72b-eetq"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoEETQForCausalLM.from_pretrained(model_name)
model.quantize(quant_path)
tokenizer.save_pretrained(quant_path)

The code changes I made https://github.com/NetEase-FuXi/EETQ/pull/25, enable this code to function.
Without the code changes, I get the error that qwen2 is not supported.
qwen2 is not supported because, it is not in EETQ_CAUSAL_LM_MODEL_MAP
it is not in EETQ_CAUSAL_LM_MODEL_MAP because there is no Qwen2EETQForCausalLM
I implement that class.

The output
https://huggingface.co/cognitivecomputations/dolphin-2.9.2-qwen2-72b-eetq

I am not using vllm. My change is not related to vllm.
I am trying to do this:
from eetq import AutoEETQForCausalLM
from transformers import AutoTokenizer

model_name = "/workspace/models/dolphin-2.9.2-qwen2-72b"
quant_path = "/workspace/models/dolphin-2.9.2-qwen2-72b-eetq"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoEETQForCausalLM.from_pretrained(model_name)
model.quantize(quant_path)
tokenizer.save_pretrained(quant_path)

The code changes I made here, enable this code to function. Without the code changes, I get the error that qwen2 is not supported.
qwen2 is not supported because, it is not in EETQ_CAUSAL_LM_MODEL_MAP it is not in EETQ_CAUSAL_LM_MODEL_MAP because there is no Qwen2EETQForCausalLM I implement that class.

If you want to use EETQ to quantize a model and inference in an existing inference framework like TGI, transformers or vllm, you have to customize the quantization for each framework because cutlass kernel will change the layout of quantized weight. The above code is customized for vllm (Sorry for unclear description in README). If you use it in other framework, it may output wrong tokens.

@ehartford AutoEETQForCausalLM is developed for vllm framework, you can use eetq in transformers, like this：
from transformers import AutoModelForCausalLM, EetqConfig

path = "/workspace/models/dolphin-2.9.2-qwen2-72b"
quantization_config = EetqConfig("int8")
model = AutoModelForCausalLM.from_pretrained(path, device_map="auto", quantization_config=quantization_config)
quant_path = "/workspace/models/dolphin-2.9.2-qwen2-72b-eetq"
model.save_pretrained(quant_path)

I wanna quantize my model to eetq format to publish it so people can download the eetq quantized version of my model.  Just like they do with gptq, gguf, exl2, etc.


fix: only remove object on post remove

fixed in https://github.com/araise-dev/SearchBundle/pull/8


Migration Process Documentation

Customers should be able to easy change from another system to ZITADEL.
Acceptance Criteria

[ ] New section "Migration" in docs/guides
[ ] https://github.com/zitadel/zitadel/issues/4314
[ ] https://github.com/zitadel/zitadel/issues/5152
[ ] Specific Considerations for migration from

[ ] Auth0
[ ] Keycloak

[ ] Move Export and import with ZITADEL to the migration section

Keycloak blog article is in progress

I've add "custom identity management" and add a sub-task to this list. We often get questions around migrating from an exisitng database where password hashes are stored.

Any updated on this? Specifically the KeyCloak migration guide.

Any updated on this? Specifically the KeyCloak migration guide.

@bman46 the keycloak guide will take another couple of weeks. Just as a disclaimer: the user migration will not be smooth until ZITADEL supports PBKDF2 hashing (https://github.com/zitadel/zitadel/issues/4157)
What are you struggling with? Maybe we can help you out in the meantime.

Haven't attempted it yet, so no issues. I was just looking to see if there was any official documentation on the topic before I attempt it.

Haven't attempted it yet, so no issues. I was just looking to see if there was any official documentation on the topic before I attempt it.

Sure. I'll ping you when the guide is out. In case you want to start migrating already and you run into any questions, let us know - best over on discord or in a discussion here.

+1 question about migrating users when using social logins / external IDPs from current auth provider to zitadel

Follow-ups:

https://github.com/zitadel/zitadel/discussions/5626
#118


JND json book of Judges is an incorrect translation

The book of Judges in the Darby translation JSON file is incorrect.

I'll keep this open until I look into this. Thank you for mentioning it.

@scrollmapper
I have currently replaced that in my copy with JND's book of Judges (from here). However, I only have it in Lua and CSV format at the moment (See my fork here). I have also added some paragraph breaks to it (Genesis through to the end of Exodus, and more bits throughout).

Thank you for reporting this. I've dropped this translation due to to this issue for now. (Will show in next update).

@scrollmapper
Were you going to be restoring this translation anytime soon?


Are maintainers missing in this project?

Hi @Xion or other people who maintains this project,
What is the status of this project?
This is a great tool for testing, I would like to keep using but looks like it hasn't been maintained for a while.
If there are any alternatives we could use, that information would be appreciated, too.
Thanks!

For now I forked and published on PyPI as "calleee" with three "e"s.
Nothing much has been done, except that I applied #19.
I'm planning on going through the list of issues here, one by one.

@Xion Just a friendly ping. Would you be open to someone taking over as maintainer of this project? It's incredibly useful, and I see you haven't been active on Github in some time (I hope all is well).

I wonder if this can be moved to pytest-dev


Stevenic/botframework config docs

Pull Request Test Coverage Report for Build 1596

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.06%) to 69.387%

Files with Coverage Reduction
New Missed Lines
%

libraries/botframework-config/src/botRecipe.ts
1
10.0%

Totals

Change from base Build 1589:
0.06%

Covered Lines:
2176

Relevant Lines:
3007

💛  - Coveralls


SqlBulkCopy - Leverage Generics to Eliminate Boxing

@Wraith2 @cheenamalhotra - This is a re-creation of #358 - there were multiple merge conflicts that were difficult to resolve.

Leverage Generic Code Paths to eliminate boxing of value types as the value is being written to the database
Benchmark test that validates the boxing is eliminated (this only works in Release mode as the Debug JIT does not perform the necessary optimizations)
Extension Method for Generic Cast instead of a GenericConverter type -- this makes the code a bit less verbose + easier to read.

Possible breaking changes:

IDataReader.GetFieldType is invoked in SqlBulkCopy that was not invoked previously.  Custom data reader implementations that do not properly implement this method could break.
IDataReader.IsDbNull is now invoked in the IDataReader code path for every value (previously it was only invoked if streaming was enabled).  This is necessary to invoke the proper value method (GetInt32, etc.) and handle potential nullable value types.

TODO:

Migrate this code into netfx (I want to wait for all tests to pass before I spend any effort doing this)

Hi @cmeyertons
We appreciate your efforts.

I have implemented a custom data reader implementation in the NoBoxingValueTypes test -- I would've preferred to leverage the FastMember library to reduce the amount of code required, but that package was not available in the currently configured Nuget sources.

FastMember is not an official Microsoft package, and neither provides a unique solution that keeps us blocked. Yes it does simplify code, but that's not necessary to do the same job. We cannot justify the need to depend on this package for just code enhancements. Please continue to use the existing reflection design in tests to add your tests.

@cheenamalhotra based on #1046 -- i'm guessing that some of my test failures are expected at this point?

You'll still have to check them individually and decide if they're code related of infra, apart from TVPMain, that's just flaky as hell.

@cmeyertons
Yes, we have some random failures which should go away once we rerun pipelines, don't bother about those ones. We're trying to fix them, but as Wraith mentioned, they're flaky..

@cheenamalhotra  @Wraith2  alright tests are looking much better -- in the process of re-patching the code onto this branch, I did find the bug that was causing tests to fail.
If I could get a preliminary approval on how the code looks now (the potential breaking changes, using the extension method over the GenericConverter class), I can get started on the netfx port (I really don't want to change manage across both with a bunch of iterations)

If I could get a preliminary approval on how the code looks now (the potential breaking changes, using the extension method over the GenericConverter class), I can get started on the netfx port

It's been 16 months, you've been trying to get this merged so I'd really hope that someone can find the time to review it and give constructive feedback. You've been far more patient than anyone should need to be on this.

@cmeyertons

IDataReader.IsDbNull is now invoked in the IDataReader code path for every value (previously it was only invoked if streaming was enabled). This is necessary to invoke the proper value method (GetInt32, etc.) and handle potential nullable value types.

As you specifically mentioned this now in your PR, I'm a little worried about the IDataReader.IsDbNull call that will be made on every value. I suspect this might have a negative impact on performance for large rows. I have previously heard reports on this call causing performance lag (e.g. https://github.com/dotnet/SqlClient/issues/846#issue-762198571 and also from internal teams when using 200+ columns) so doing so for every type may cause significant performance drop, specially on existing customer applications that rely on current behavior.
We of course need to write a use case to prove that, so I'll be looking more into that tomorrow. But if you can also test it out and come up with a use-case to find any significant performance drop with this PR, we may have to revisit the design a bit to make it an optional behavior. But if our test results do not suggest any performance degradation, we'd be happy to take it as is.

I've investigated the perf impact of IsDBNull in the past and I found that the cost of the seek to the field was being attributed to it which made IsDBNull seem heavier than it is and GetFieldValue calls seem lighter . To check if a column value is null you have to seek to the column header which will run the parser if you haven't already touched the field and at that point IO can also occur. When you call GetFieldValue on that same column the seek should already have happened from the previous call so you usually just pick up the value in the SqlBuffer.
The fastest call is one that never happens so it would be good to get some numbers. For this PR can you demonstrate (with a BenchmarkDotNet bench if possible) that the original/current implementation is still slower than the PR branch with a reasonable column width of say 32 or 64? You'll need to give it a runtime of at least a minute ime to make sure the GC kicks in for the boxes that are being removed, without the GC the overhead of the new approach won't be properly balanced against the waste of the current one and your PR will look artificially poor, been there made that mistake.

@cheenamalhotra @Wraith2 after much further investigation, it appears that migrating the code paths from object value to T value appears to have a detrimental impact on performance  -- I see about a 10% increase across the board.
You can view my the benchmarking code in my repo in the benchmarks/current and benchmarks/new branches.  I am bulk copying appx 40 columns
Some observations:

This does not appear to be solely related to IsDbNull -- i see the 10% uptick on various submethods that were genericized.
This might be due to passing decimal by value (128 bits instead of 64).  I did attempt to change all of the signatures to ref and that did not alleviate the problem.
Maybe leveraging the in modifier would help -- however, this change is probably not backwards compatible.
Some extra boxing is forced to occur during CoerceValue if coercion is necessary -- eliminating boxing would require a generic version of Convert.ChangeType which is a framework change.
I did uncover a small performance change that I can submit in a subsequent PR

Inevitably, the boxing cost is much lower than I initially anticipated.  While this was a good and fun personal exercise in getting into the lowers details of the SqlClient library, I'm at a deadend on how to improve performance at this point.
CURRENT

BenchmarkDotNet=v0.12.1, OS=Windows 10.0.18363.1500 (1909/November2018Update/19H2)
Intel Xeon E-2176M CPU 2.70GHz, 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=5.0.202
  [Host]     : .NET Core 3.1.14 (CoreCLR 4.700.21.16201, CoreFX 4.700.21.16208), X64 RyuJIT
  Job-ZNZZJB : .NET Core 3.1.14 (CoreCLR 4.700.21.16201, CoreFX 4.700.21.16208), X64 RyuJIT

IterationCount=5  LaunchCount=1  WarmupCount=0

Method
Mean
Error
StdDev
Gen 0
Gen 1
Gen 2
Allocated

BulkCopy
17.91 s
1.270 s
0.330 s
364000.0000
2000.0000
-
2.13 GB

NEW
BenchmarkDotNet=v0.12.1, OS=Windows 10.0.18363.1500 (1909/November2018Update/19H2)
Intel Xeon E-2176M CPU 2.70GHz, 1 CPU, 12 logical and 6 physical cores
.NET Core SDK=5.0.202
  [Host]     : .NET Core 3.1.14 (CoreCLR 4.700.21.16201, CoreFX 4.700.21.16208), X64 RyuJIT
  Job-UIKJLZ : .NET Core 3.1.14 (CoreCLR 4.700.21.16201, CoreFX 4.700.21.16208), X64 RyuJIT

IterationCount=5  LaunchCount=1  WarmupCount=0

Method
Mean
Error
StdDev
Gen 0
Gen 1
Gen 2
Allocated

BulkCopy
20.01 s
2.480 s
0.384 s
178000.0000
2000.0000
-
1.04 GB

The memory is a lot better which was the initial goal. The speed drop is a bit troubling. Does any particular hotspot stick out?

Hi @cmeyertons
I extended your project to include more info (+10 columns +Async APIs +SqlDataReader +Threading Diagnoser).
I also used the same data to keep things comparable. Below are the results for ~50 columns:
My source changes are here: fork: benchmarks/new
CURRENT - IDataReader

Method
Mean
Error
StdDev
Completed Work Items
Gen 0
Gen 1
Allocated

BulkCopy
22.82 s
12.746 s
1.972 s
2.0000
646000.0000
2000.0000
2.52 GB

BulkCopyAsync
22.48 s
1.601 s
0.416 s
250.0000
646000.0000
2000.0000
2.52 GB

NEW - IDataReader

Method
Mean
Error
StdDev
Completed Work Items
Gen 0
Gen 1
Allocated

BulkCopy
1 25.86 s
13.320 s
2.061 s
4.0000
294000.0000
2000.0000
3 1.15 GB

BulkCopyAsync
1 26.16 s
1.946 s
0.505 s
2 645.0000
294000.0000
2000.0000
3 1.15 GB

1 Performance degradation is approx. 13% (sync) &19% (async).
2 Async flow consumes significantly more threads here.
3 There's no doubt allocation has improved.

CURRENT - SqlDataReader

Method
Mean
Error
StdDev
Gen 0
Gen 1
Allocated
Completed Work Items

BulkCopy
28.81 s
2.297 s
0.355 s
371000.0000
3000.0000
1.45 GB
10.0000

BulkCopyAsync
65.16 s
19.408 s
5.040 s
802000.0000
5000.0000
3.04 GB
3924955.0000

NEW - SqlDataReader

Method
Mean
Error
StdDev
Completed Work Items
Gen 0
Gen 1
Allocated

BulkCopy
1 34.56 s
2.044 s
0.531 s
3.0000
371000.0000
3000.0000
1.45 GB

BulkCopyAsync
1 70.56 s
2.968 s
0.459 s
3925037.0000
804000.0000
7000.0000
3.04 GB

1 Performance degraded by approx. 20% (sync) and 8% (async), even though there's no change in allocation.
Was this intended or can you improve allocations for SqlDataReader too?

@cheenamalhotra @Wraith2

1 Performance degraded by approx. 20% (sync) and 8% (async), even though there's no change in allocation.
Was this intended or can you improve allocations for SqlDataReader too?

Looking at the SqlDataReader internals, it looks like it holds data in a SqlBuffer object, so it might already be boxed -- i was anticipating less allocations due to invocations through GetSqlDecimal etc.
I've refactored some code paths to closer align the # of method invocations to the original -- refactored ConvertWriteValueAsync back to more similar of the original ConvertValue (changed to ConvertValueIfNeeded)
I lifted out the null checking from ConvertValueIfNeeded to eliminate the method dispatch for nulls (this is a small perf improvement that could be made to the existing codebase)
Some of my suspicions at this point are:

The IfNeeded pattern is adding the amount of local memory used (instead of writing over the existing value, we're passing back a new, second value) -- even if this is null most of the time, there could be extra cost there.  I see jumps in both SqlBulkCopy.ConvertValueIfNeeded and SqlParameter.CoerceValueIfNeeded
I'm wondering if this pattern introduces more CPU cache misses as you are hitting different code paths for each column in the dataset, incurring more context switching -- I have no evidence of this, just a hunch.
There are a couple of methods that I could additionally inline for the object vs T use case -- TdsParser.WriteValueWithWait and SqlBulkCopy.DoWriteValueAsync -- these are the only extra invocations at this point that I can see.  That would require some code duplication however.

I will work on getting your benchmarks into my repo later today -- @cheenamalhotra  thanks for enhancing them, much appreciated it!

Hi team, closing this PR to get it off my list.  I no longer am working with MSSQL and it appears this experiment hampered performance rather than helped it (most likely due to CPU caching instructions, etc).
I sincerely appreciate everyone's help throughout this attempted contribution and learned a ton!


ParallelRunner expects the CreatesApplication trait to be at the root of the tests folder

Laravel Version: 8.25.0
PHP Version: 8.0
Database Driver & Version: N/A

Description:
On line 132 of the ParallelRunner class, the createApplication method expects the CreatesApplication trait to be at the root of the application's tests folder.
It probably shouldn't make that assumption, since that folder may have been reorganised by the user.
Steps To Reproduce:

move the CreatesApplication trait in a Traits subfolder of the tests folder;
run php artisan test --parallel.

There seems to be a way to change the $applicationResolver static property of the ParallelRunner class, but so far my attempts have failed.
I created the following service provider:
<?php

namespace App\Providers;

use Illuminate\Testing\ParallelRunner;
use Illuminate\Testing\ParallelTestingServiceProvider as BaseProvider;

class ParallelTestingServiceProvider extends BaseProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        ParallelRunner::resolveApplicationUsing(function () {
            $applicationCreator = new class {
                use \Tests\Traits\CreatesApplication;
            };

            return $applicationCreator->createApplication();
        });
    }
}

And I added it to the list of application providers in config/app.php.
It seems to be ignored so far – am I missing something?
Thanks,
Yannick

There seems to be a way to change the $applicationResolver static property of the ParallelRunner class, but so far my attempts have failed.
I created the following service provider:
<?php

namespace App\Providers;

use Illuminate\Testing\ParallelRunner;
use Illuminate\Testing\ParallelTestingServiceProvider as BaseProvider;

class ParallelTestingServiceProvider extends BaseProvider
{
    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        parent::boot();

        ParallelRunner::resolveApplicationUsing(function () {
            $applicationCreator = new class {
                use \Tests\Traits\CreatesApplication;
            };

            return $applicationCreator->createApplication();
        });
    }
}

And I added it to the list of application providers in config/app.php.
It seems to be ignored so far – am I missing something?
Thanks,
Yannick

Why would this folder or file be moved by the user?

Why would this folder or file be moved by the user?

Why is this file in this folder and not in the vendor folder in the first place? So it can be extended or modified, right?
In my case I've got a number of traits in my tests, so I move them under a Traits subfolder for clarity. I don't know what other people may or may not do, my point is that from the moment a file is not in the vendor folder, the framework should not assume what happened to it.
Otherwise that'd mean you are willing to dictate how your users organise their files in the pre-existing structure, which sends a worrying message in my opinion.

Why is this file in this folder and not in the vendor folder in the first place? So it can be extended or modified, right?
In my case I've got a number of traits in my tests, so I move them under a Traits subfolder for clarity. I don't know what other people may or may not do, my point is that from the moment a file is not in the vendor folder, the framework should not assume what happened to it.
Otherwise that'd mean you are willing to dictate how your users organise their files in the pre-existing structure, which sends a worrying message in my opinion.

After updating, I started getting this error on Windows server:
During class fetch: Uncaught ErrorException: include(C:\www\test\laravel\vendor\composer/../laravel/framework/src/Illuminate/Testing/Concerns/TestDatabases.php): Failed to open stream: No such file or directory in C:\www\test\laravel\vendor\composer\ClassLoader.php:444

After updating, I started getting this error on Windows server:
During class fetch: Uncaught ErrorException: include(C:\www\test\laravel\vendor\composer/../laravel/framework/src/Illuminate/Testing/Concerns/TestDatabases.php): Failed to open stream: No such file or directory in C:\www\test\laravel\vendor\composer\ClassLoader.php:444

Don't move the file.

Don't move the file.

This is just wrong, but I know there's no point arguing with you.

This is just wrong, but I know there's no point arguing with you.

I completely agree with @osteel here.
At our company, we follow the convention from languages such as Go and put our tests in the same directory as our application code.
Having a separate nearly empty tests directory is pointless in this case, so we remove it and move the CreatesApplication trait to a different location. A strategy that has worked perfectly for us, up to this point.
Laravel is extremely flexible, and we love it for this. But "Don't move the file" doesn't fit its philosophy.

I completely agree with @osteel here.
At our company, we follow the convention from languages such as Go and put our tests in the same directory as our application code.
Having a separate nearly empty tests directory is pointless in this case, so we remove it and move the CreatesApplication trait to a different location. A strategy that has worked perfectly for us, up to this point.
Laravel is extremely flexible, and we love it for this. But "Don't move the file" doesn't fit its philosophy.

I've sent in a PR to the docs to hopefully make it clear in the future that the trait should stay in place: https://github.com/laravel/docs/pull/6789

I've sent in a PR to the docs to hopefully make it clear in the future that the trait should stay in place: https://github.com/laravel/docs/pull/6789

@driesvints that's something, but if that file is not supposed to be changed, then I think it should be in the vendor folder.
With this new feature the framework introduces a hard link to a file that Laravel users were free to update thus far. Effectively, it introduces a breaking change for some users. As part of a minor version release.
One could argue that one doesn't have to use that feature, and that it relates to tests, so it's not a big deal. But if that's a practice the Laravel team is OK with, what will it be next time? What new hard dependency will be introduced? It reduces the confidence users have regarding a part of the codebase they are supposed to have full control over.
Like I said, it sends a worrying message.

@driesvints that's something, but if that file is not supposed to be changed, then I think it should be in the vendor folder.
With this new feature the framework introduces a hard link to a file that Laravel users were free to update thus far. Effectively, it introduces a breaking change for some users. As part of a minor version release.
One could argue that one doesn't have to use that feature, and that it relates to tests, so it's not a big deal. But if that's a practice the Laravel team is OK with, what will it be next time? What new hard dependency will be introduced? It reduces the confidence users have regarding a part of the codebase they are supposed to have full control over.
Like I said, it sends a worrying message.

but if that file is not supposed to be changed, then I think it should be in the vendor folder.

While the file shouldn't switch location, the contents of the trait can still be modified which could be useful in certain situations.

With this new feature the framework introduces a hard link to a file that Laravel users were free to update thus far. Effectively, it introduces a breaking change for some users. As part of a minor version release.

 To be honest I definitely understand your remarks but I personally think it's no big deal for such a small piece of code.

but if that file is not supposed to be changed, then I think it should be in the vendor folder.

While the file shouldn't switch location, the contents of the trait can still be modified which could be useful in certain situations.

With this new feature the framework introduces a hard link to a file that Laravel users were free to update thus far. Effectively, it introduces a breaking change for some users. As part of a minor version release.

 To be honest I definitely understand your remarks but I personally think it's no big deal for such a small piece of code.

@driesvints it seems that @nunomaduro kind of planned for this with the $applicationResolver static property of the ParallelRunner class. Can we hook into it somehow, like I attempted to in my second comment in this issue?
When such hard links are introduced, I think it's fair to expect a way to go around it to be provided as well.
In any case, thank you for being respectful and actually taking the time (not just in this instance). I think others would be inspired to do the same.

@driesvints it seems that @nunomaduro kind of planned for this with the $applicationResolver static property of the ParallelRunner class. Can we hook into it somehow, like I attempted to in my second comment in this issue?
When such hard links are introduced, I think it's fair to expect a way to go around it to be provided as well.
In any case, thank you for being respectful and actually taking the time (not just in this instance). I think others would be inspired to do the same.

@osteel I been looking at using the method as well for Orchestra Testbench but it's just not possible. Basically the test command pass Illuminate\Testing\ParallelRunner class string as an argument to paratest to run everything under a separate child process.
There a PR to remove said method to avoid any further confusion.

@osteel I been looking at using the method as well for Orchestra Testbench but it's just not possible. Basically the test command pass Illuminate\Testing\ParallelRunner class string as an argument to paratest to run everything under a separate child process.
There a PR to remove said method to avoid any further confusion.

Can we hook into it somehow, like I attempted to in my second comment in this issue?

Seems like that's unfortunately not possible as Mior describes above.

In any case, thank you for being respectful and actually taking the time (not just in this instance). I think others would be inspired to do the same.

Welcome :)

Can we hook into it somehow, like I attempted to in my second comment in this issue?

Seems like that's unfortunately not possible as Mior describes above.

In any case, thank you for being respectful and actually taking the time (not just in this instance). I think others would be inspired to do the same.

Welcome :)

The alternative right now is to use a custom Runner class and add --runner options when using parallel testing.
Based on your structure.
<?php

namespace Tests;

class ParallelRunner extends \Illuminate\Testing\ParallelRunner
{
    /**
     * Creates the application.
     *
     * @return \Illuminate\Contracts\Foundation\Application
     */
    protected function createApplication()
    {
        $applicationCreator = new class {
            use Traits\CreatesApplication;
        };

        return $applicationCreator->createApplication();
    }
}

and then use:
php artisan test --parallel --runner="\Tests\ParallelRunner"

The alternative right now is to use a custom Runner class and add --runner options when using parallel testing.
Based on your structure.
<?php

namespace Tests;

class ParallelRunner extends \Illuminate\Testing\ParallelRunner
{
    /**
     * Creates the application.
     *
     * @return \Illuminate\Contracts\Foundation\Application
     */
    protected function createApplication()
    {
        $applicationCreator = new class {
            use Traits\CreatesApplication;
        };

        return $applicationCreator->createApplication();
    }
}

and then use:
php artisan test --parallel --runner="\Tests\ParallelRunner"

@crynobone will give this a try when I get a minute, thank you

@crynobone will give this a try when I get a minute, thank you

@crynobone that worked 👍

@crynobone that worked 👍

I'll just implement Nuno's PR before there is more drama around it.

I'll just implement Nuno's PR before there is more drama around it.

Done.

Done.


Bug - Automatic location resolver is incorrect for SHA256 file

Describe the bug
If one downloads https://aka.ms/download-jdk/microsoft-jdk-11-linux-x64.tar.gz, then the http URL is automatically converted to https://aka.ms/download-jdk/microsoft-jdk-<IP_ADDRESS>-linux-x64.tar.gz. See 👇  (This works as expected)

However, the URL conversion for SHA256 checksum file doesn't seem to be working fine since a couple of days

Current behavior -https://aka.ms/download-jdk/microsoft-jdk-11-linux-x64.tar.gz.sha256sum.txt is redirected to https://aka.ms/download-jdk/microsoft-jdk-11.0.20-linux-x64.tar.gz.sha256sum.txt
Expected behavior - https://aka.ms/download-jdk/microsoft-jdk-11-linux-x64.tar.gz.sha256sum.txt must be redirected to https://aka.ms/download-jdk/microsoft-jdk-<IP_ADDRESS>-linux-x64.tar.gz.sha256sum.txt
Notice the missing .1  in the version field.
Note: This happens for v17 and v8 as well.

@jmjaffe37 Can you take a look please

Looks like the sha256sum links have yet to be updated. I will go through and do them 👍

This issue is now fixed, thank you! Appreciate the fast response ✨

@samruddhikhandale thank you for noticing that this issue is fixed! I want to apologize that I forgot to update you here once I addressed the problem 😅


Swapping two adjacent regions of an array of any sizes

Let a be an array of size n, and let 0 < l < n. How do we swap the regions from 0 to l-1 and from l to n-1 of a?
With @mtzguido , we have been working on a verified implementation performing this task fully in-place and in only n writes.
To do that, we compute the gcd of n and l, say d, so that any array index x can be reached from some i such that 0 <= i < n by repeatedly adding l and truncating modulo n, and such starting point i is unique for a given x.
Then, for each such i, we save the contents of a[i], then we shift a[(i+l)%n], a[(i+2l)%n], etc. to l positions to the left (treating a as a "ring buffer"), and we do it n/d - 1 times, and then we restore the saved contents to the last index of that cycle.
The proof involves:

Bézout's identity, which we use as a characterization of the gcd (so we do not really exploit the "greatest" aspect of the gcd in terms of integer ordering, rather it's the common divisor that is greatest to work with.) With this identity, we show that every number can be reached from its remainder in its division by d with at most n/d - 1 steps.
Euclid's lemma (also called Gauß' lemma), to prove that, for a given array index x, if x can be reached from i with k steps, where 0 <= i < d and 0 <= k < n/d, then such i and k are unique. A SMT pattern on the latter lemma allows to automatically prove that all array accesses are disjoint.

With those two lemmas, we don't need to reason about periodic sequences or anything, it is enough to reason with integer ring computations.

I now also have a Pulse version, which successfully works! (I haven't tested its extraction yet, though.)


Not sure why it won't change to blue? css

Challenge Use CSS Selectors to Style Elements has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/603.2.4 (KHTML, like Gecko) Version/10.1.1 Safari/603.2.4.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:

Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.

@Norma64 Thank you for reporting this issue. Your code is incorrect. Please use the Gitter chat rooms linked below for asking for help. GitHub issues are not for coding help.
This is a standard message notifying you that this issue seems to be a request for help. Instead of asking for help here, please click the "help" button on the challenge on freeCodeCamp, which will take you to the help chatroom for that specific challenge. You can also view our full list of official chatrooms.

Still having the same issue, please help.

You should only remove style attribute from h2 tag - not whole h2 tag

Hi,
Thanks for reporting this issue.
Here are some next steps that you should follow before we can help you with your query:

Check these troubleshooting steps first.
Please use the Chat Rooms or try looking through our forum for help with a specific challenge and any coding assistance.

IMPORTANT:
Please NOTE that this tracker is for reporting bugs and enhancements to freeCodeCamp's code base only.
Happy Coding!

@Manish-Giri It doesn't do anything when I click the Help button.

Please visit the forum and post your query there:
https://forum.freecodecamp.com/
Happy coding! :smile: !


How to use the lbfgs optimizer with ligthning?

Hi,
I have a problem in using the LBFGS optimizer from pytorch with lightning.
I use the template from here to start a new project and here is the code that I tried (only the training portion):
    def training_step(self, batch, batch_nb):
        x, y = batch
        x = x.float()
        y = y.float()
        y_hat = self.forward(x)
        return {'loss': F.mse_loss(y_hat, y)}

    def configure_optimizers(self):
        optimizer = torch.optim.LBFGS(self.parameters())
        return optimizer

    def optimizer_step(self, epoch_nb, batch_nb, optimizer, optimizer_i):
        def closure():
            optimizer.zero_grad()
            l = self.training_step(batch, batch_nb)
            loss = l['loss']
            loss.backward()
            return loss

        optimizer.step(closure)

The LBFGS optimizer from pytorch requires a closure function (see here and here), but I don't know how to define it inside the template, specially I don't know how the batch data is passed to the optimizer. I tried to define a custom optimizer_step function but I have some problems to passing the batch inside the closure function.
I will be very thankful of any advise that helps me to solve this problem or points me to the right direction.
Rodrigo
Environment:

PyTorch version:  1.2.0+cpu
Lightning version: 0.4.9
Test-tube version: 0.7.1

@riverarodrigoa good suggestion. Agreed we need to support this. Probably the easiest way is to refactor the main code in trainer or detect lbfgs/similar optimizers and pass in the closure. Do you want to submit a PR for this? if not I can take a look at it

Hi @williamFalcon, thanks for looking at my question. I am still learning pytorch and understanding lightning, I think it would be better if you look at it as you has a more deep understanding of the framework. By my side I will try to work on this too and any improvement I do I'll update on this issue.

@riverarodrigoa Support added in #310. If you run from master lbfgs will work now

Hi, thanks for adding support to LBFGS.
I tried to test it but I have found that my loss is increasing at every epoch. Could you tell me what is wrong with my code? Am I missing or defining something wrong?
I'm trying to implement a simple MLP with 10 units in the hidden layer.
This is my code:
import os
from collections import OrderedDict
import torch.nn as nn
from torchvision.datasets import MNIST
import torchvision.transforms as transforms
import torch
import torch.nn.functional as F
from argparse import ArgumentParser
from torch import optim
from torch.utils.data import DataLoader
from torch.utils.data.distributed import DistributedSampler

import pytorch_lightning as pl
from pytorch_lightning.root_module.root_module import LightningModule
from figaro_mlp.mlp2.Data_Figaro import DataFigaroTrain, DataFigaroValid, DataFigaroTest, ToTensor

class FigaroMLP(LightningModule):
    """
    Sample model to show how to define a template
    """

    def __init__(self, hparams):
        """
        Pass in parsed HyperOptArgumentParser to the model
        :param hparams:
        """
        # init superclass
        super(FigaroMLP, self).__init__()
        self.hparams = hparams

        self.batch_size = hparams.batch_size

        # if you specify an example input, the summary will show input/output for each layer
        # self.example_input_array = torch.rand(5, 28 * 28)

        # build model
        self.__build_model()

    # ---------------------
    # MODEL SETUP
    # ---------------------
    def __build_model(self):
        """
        Layout model
        :return:
        """
        self.hidden_layer = nn.Linear(in_features=self.hparams.in_features,
                                      out_features=self.hparams.hidden_dim)
        self.output_layer = nn.Linear(in_features=self.hparams.hidden_dim,
                                      out_features=self.hparams.out_features)
    # ---------------------
    # TRAINING
    # ---------------------
    def forward(self, x):
        """
        No special modification required for lightning, define as you normally would
        :param x:
        :return:
        """
        h = torch.sigmoid(self.hidden_layer(x))
        res = self.output_layer(h)
        return res

    def loss(self, reference, out):
        mse = F.mse_loss(out, reference)
        return mse

    def training_step(self, batch, batch_idx):
        """
        Lightning calls this inside the training loop
        :param batch:
        :return:
        """
        # # forward pass
        x, y = batch

        y_hat = self.forward(x)

        # calculate loss
        loss_val = self.loss(y, y_hat)

        # in DP mode (default) make sure if result is scalar, there's another dim in the beginning
        if self.trainer.use_dp or self.trainer.use_ddp2:
             loss_val = loss_val.unsqueeze(0)

        tqdm_dict = {'train_loss': loss_val}
        output = OrderedDict({
            'loss': loss_val,
            'progress_bar': tqdm_dict,
            'log': tqdm_dict
        })

        # can also return just a scalar instead of a dict (return loss_val)
        return output

    def validation_step(self, batch, batch_idx):
        """
        Lightning calls this inside the validation loop
        :param batch:
        :return:
        """
        x, y = batch
        y_hat = self.forward(x)

        loss_val = self.loss(y, y_hat)

        if self.on_gpu:
            val_acc = val_acc.cuda(loss_val.device.index)

        # in DP mode (default) make sure if result is scalar, there's another dim in the beginning
        if self.trainer.use_dp or self.trainer.use_ddp2:
            loss_val = loss_val.unsqueeze(0)

        output = OrderedDict({
            'val_loss': loss_val,
        })

        # can also return just a scalar instead of a dict (return loss_val)
        return output

    def validation_end(self, outputs):
        """
        Called at the end of validation to aggregate outputs
        :param outputs: list of individual outputs of each validation step
        :return:
        """
        # if returned a scalar from validation_step, outputs is a list of tensor scalars
        # we return just the average in this case (if we want)
        # return torch.stack(outputs).mean()
        val_loss_mean = 0
        for output in outputs:
            val_loss = output['val_loss']

            # reduce manually when using dp
            if self.trainer.use_dp:
                val_loss = torch.mean(val_loss)
            val_loss_mean += val_loss

        val_loss_mean /= len(outputs)
        tqdm_dict = {'val_loss': val_loss_mean}
        result = {'progress_bar': tqdm_dict, 'log': tqdm_dict}
        result = {'val_loss': val_loss_mean, 'progress_bar': {'val_loss': val_loss_mean}}
        return result

    # ---------------------
    # TRAINING SETUP
    # ---------------------
    def configure_optimizers(self):
        """
        return whatever optimizers we want here
        :return: list of optimizers
        """
        optimizer = optim.LBFGS(self.parameters(), lr=1)
        # scheduler = optim.lr_scheduler.CosineAnnealingLR(optimizer, T_max=10)
        return [optimizer], []

    def __dataloader(self, train):
        xvars = ['R_2611_C01', 'T_Air', 'H2Od_pc', 'P_Air', 'CO_ppm']
        yvars = ['CH4d_ppm']
        sample = 0

        if train:
            dataset = DataFigaroTrain(filepath=self.hparams.data_path, xvars=xvars, yvars=yvars,
                                      sample=sample, transform=transforms.Compose([ToTensor()]))
        else:
            dataset = DataFigaroValid(filepath=self.hparams.data_path, xvars=xvars, yvars=yvars,
                                      sample=sample, transform=transforms.Compose([ToTensor()]))

        batch_size = self.hparams.batch_size
        should_shuffle = False

        loader = DataLoader(
            dataset=dataset,
            batch_size=dataset.__len__(),
            shuffle=should_shuffle,
        )

        return loader

    @pl.data_loader
    def train_dataloader(self):
        print('training data loader called')
        return self.__dataloader(train=True)

    @pl.data_loader
    def val_dataloader(self):
        print('val data loader called')
        return self.__dataloader(train=False)

    @pl.data_loader
    def test_dataloader(self):
        print('test data loader called')
        return self.__dataloader(train=False)

    @staticmethod
    def add_model_specific_args(parent_parser, root_dir):  # pragma: no cover
        """
        Parameters you define here will be available to your model through self.hparams
        :param parent_parser:
        :param root_dir:
        :return:
        """
        parser = ArgumentParser(parents=[parent_parser])

        # param overwrites
        # parser.set_defaults(gradient_clip_val=5.0)

        # network params
        parser.add_argument('--in_features', default=5, type=int)
        parser.add_argument('--out_features', default=1, type=int)
        # use 500 for CPU, 50000 for GPU to see speed difference
        parser.add_argument('--hidden_dim', default=10, type=int)
        parser.add_argument('--learning_rate', default=0.1, type=float)

        # data
        parser.add_argument('--data_root', default='data_path/', type=str)

        # training params (opt)
        parser.add_argument('--optimizer_name', default='lbfgs', type=str)
        parser.add_argument('--batch_size', default=1, type=int)
        return parser

Thank you in advance.

your learning rate is 1. i suggest looking into how to select learning rates (coursera, etc).  try 0.001

your learning rate is 1. i suggest looking into how to select learning rates (coursera, etc).  try 0.001


Warn end users about enabling unknown sources

@PaulKinlan (cc @petele)
Paul,
Since the whole site is geared toward developers, I think a warning is overkill. But your parenthetical in step 2b might do with a little context and possibly a link to android developer documentation.

@jpmedley we were asked to put it in, and I agree with it. It should only be enabled for testing your site and not left on at all.


Fix broken link for KubeDiag architecture image

This patch fixes a broken link for KubeDiag architecture image in design document.

LGTM


Provide support for explicitly pausing autoscaling of ScaledJobs

Proposal
Provide support for explicitly pausing autoscaling of ScaledJobs so that it no longer spins up new jobs.
This should be done by applying the autoscaling.keda.sh/is-paused: true annotation on the ScaledJobs resource.
Use-Case
Avoid scaling when:

Cluster is having resource starvation
Doing maintenance
...

Anything else?
Follow-up for https://github.com/kedacore/keda/issues/944

Thank you @keeganwinchester-shipt!

autoscaling.keda.sh/is-paused: true - I personally don't like the is- part of this at all. It gives me an impression that it describes a state rather than setting the action.
I'd use autoscaling.keda.sh/paused: true instead
@tomkerkhove @JorTurFer ^^

Fine by me, I thought that was what we agreed on but I'll update the spec

I agree

This is being worked on by @flux-benj in https://github.com/kedacore/keda/issues/3303