feat: Start Botproject runtime in bot folder

Description
This PR is for starting runtime by csharp botproject in bot folder rather than by common botproject.
Solution

When a call to /connect api. Check whether the port 3979 has been used. If port is valid, use it as the endpoint to start runtime, otherwise use another valid port instead.
Check whether the .net core version >=3.0, init user secret and build runtime.
Stop previous bot runtime and start current bot runtime.

Task Item
related to https://github.com/microsoft/BotFramework-Composer/issues/1516
close #483
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Code refactor (non-breaking change which improve code quality, clean up, add tests, etc)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Doc update (document update)

Checklist

[ ] I have added tests that prove my fix is effective or that my feature works
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have functionally tested my change

Screenshots
Please include screenshots or gifs if your PR include UX changes.

The other thing you should account for is how this will work in a docker container.

It can't work in old bot, because I add a build script in template botproject and change its code.

This is a blocker unless we can either a) migrate old bots to this new build script or b) support both start up paths for some period of time.
I think a would be the best option, but its not clear if that's possible.

I add a migrate method to make old bot work.

The other thing you should account for is how this will work in a docker container.

I modify the dockerfile to include node, dotnet and powershell into one image.

@christopheranderson, @a-b-r-o-w-n , @cwhitten , wenyi has removed the powershell dependency in docker, and keep the 1 container in this PR, can we merge this PR for now and we can figure out the plan in the follow up PRs?

Yes this is fine. Thanks Lu
On Tue, Dec 17, 2019 at 7:38 PM Lu Han<EMAIL_ADDRESS>wrote:

@christopheranderson https://github.com/christopheranderson,
@a-b-r-o-w-n https://github.com/a-b-r-o-w-n , @cwhitten
https://github.com/cwhitten , wenyi has removed the powershell
dependency in docker, and keep the 1 container in this PR, can we merge
this PR for now and we can figure out the plan in the follow up PRs?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/BotFramework-Composer/pull/1672?email_source=notifications&email_token=AAI2MYGOFUVNIP3K4YNH3FLQZGLMBA5CNFSM4JSUDQGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHEX33Y#issuecomment-566853103,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAI2MYHV6ZIHMLPJY7O6M4TQZGLMBANCNFSM4JSUDQGA
.

We shouldn't combine dockerfile for Composer and C# runtime because we'll have multiple languages for runtimes. If we need to have 1 container which runs both (which I think we should avoid), then we should build the composer container, then have the dotnet one extend the base composer container. That pattern would work for other language as well.

Hi Anderson, Is there a solution for the "dockerfile spliting" problem? Like I said before, I have a build error when using two dockerfile, so, Is that ok to use multi-stage instead?

@VanyLaw have any commands changed to make this work? I'm seeing errors locally, but may be in a bad state:
~/src/BotFramework-Composer/Composer (wenyluo/csConnector) $ docker-compose build
Building composer
Step 1/27 : FROM node:12-alpine as build
 ---> 69c8cc9212ec
Step 2/27 : WORKDIR /src/Composer
 ---> Using cache
 ---> 71bb946b33f5
Step 3/27 : COPY . .
 ---> Using cache
 ---> 7f2deaf0fbd6
Step 4/27 : RUN yarn install --frozen-lock-file
 ---> Using cache
 ---> 2c35707c2fe0
Step 5/27 : ENV NODE_OPTIONS "--max-old-space-size=4096"
 ---> Using cache
 ---> f9d9d45b2d56
Step 6/27 : ENV NODE_ENV "production"
 ---> Using cache
 ---> d9984da779af
Step 7/27 : RUN yarn build:prod
 ---> Running in 45d73df91d2d
yarn run v1.19.1
$ yarn build:dev && yarn build:server && yarn build:client
$ yarn build:tools && yarn build:lib && yarn build:extensions
$ yarn workspace @bfc/tools build:all
$ concurrently --kill-others-on-fail "yarn:build:language-servers"
[build:language-servers] $ cd language-servers && yarn build
[build:language-servers] $ yarn build:lg
[build:language-servers] $ cd language-generation && yarn build
[build:language-servers] $ tsc --build tsconfig.build.json
[build:language-servers] yarn run build:language-servers exited with code 0
$ yarn workspace @bfc/libs build:all
$ yarn build:indexers && yarn build:shared && yarn build:code-editor
$ cd indexers && yarn build
$ yarn clean && yarn build:css && yarn build:ts
$ rimraf lib demo/dist
$ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
$ tsc --build tsconfig.build.json
$ cd shared && yarn build
$ yarn clean && yarn build:css && yarn build:ts
$ rimraf lib demo/dist
$ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
$ tsc --build tsconfig.build.json
$ cd code-editor && yarn build
$ yarn clean && yarn build:css && yarn build:ts
$ rimraf lib demo/dist
$ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
$ tsc --build tsconfig.build.json
$ yarn workspace @bfc/extensions build:all
$ concurrently --kill-others-on-fail "yarn:build:obiformeditor" "yarn:build:visual-designer"
[build:obiformeditor] $ cd obiformeditor && yarn build
[build:visual-designer] $ cd visual-designer && yarn build
[build:obiformeditor] $ yarn clean && yarn build:css && yarn build:ts
[build:visual-designer] $ yarn clean && yarn build:css && yarn build:ts
[build:obiformeditor] $ rimraf lib demo/dist
[build:visual-designer] $ rimraf lib demo/dist
[build:obiformeditor] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:visual-designer] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:visual-designer] $ tsc --build tsconfig.build.json
[build:obiformeditor] $ tsc --build tsconfig.build.json
[build:visual-designer] yarn run build:visual-designer exited with code 0
[build:obiformeditor] yarn run build:obiformeditor exited with code 0
$ yarn workspace @bfc/server build
$ tsc -p tsconfig.build.json
$ yarn workspace @bfc/client build
$ node scripts/build.js
Creating an optimized production build. This may take a few minutes..
error Command failed with signal "SIGKILL".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/bin/node
Arguments: /opt/yarn-v1.19.1/lib/cli.js build
Directory: /src/Composer/packages/client
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: Service 'composer' failed to build: The command '/bin/sh -c yarn build:prod' returned a non-zero code: 1

@VanyLaw have any commands changed to make this work? I'm seeing errors locally, but may be in a bad state:
~/src/BotFramework-Composer/Composer (wenyluo/csConnector) $ docker-compose build
Building composer
Step 1/27 : FROM node:12-alpine as build
 ---> 69c8cc9212ec
Step 2/27 : WORKDIR /src/Composer
 ---> Using cache
 ---> 71bb946b33f5
Step 3/27 : COPY . .
 ---> Using cache
 ---> 7f2deaf0fbd6
Step 4/27 : RUN yarn install --frozen-lock-file
 ---> Using cache
 ---> 2c35707c2fe0
Step 5/27 : ENV NODE_OPTIONS "--max-old-space-size=4096"
 ---> Using cache
 ---> f9d9d45b2d56
Step 6/27 : ENV NODE_ENV "production"
 ---> Using cache
 ---> d9984da779af
Step 7/27 : RUN yarn build:prod
 ---> Running in 45d73df91d2d
yarn run v1.19.1
$ yarn build:dev && yarn build:server && yarn build:client
$ yarn build:tools && yarn build:lib && yarn build:extensions
$ yarn workspace @bfc/tools build:all
$ concurrently --kill-others-on-fail "yarn:build:language-servers"
[build:language-servers] $ cd language-servers && yarn build
[build:language-servers] $ yarn build:lg
[build:language-servers] $ cd language-generation && yarn build
[build:language-servers] $ tsc --build tsconfig.build.json
[build:language-servers] yarn run build:language-servers exited with code 0
$ yarn workspace @bfc/libs build:all
$ yarn build:indexers && yarn build:shared && yarn build:code-editor
$ cd indexers && yarn build
$ yarn clean && yarn build:css && yarn build:ts
$ rimraf lib demo/dist
$ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
$ tsc --build tsconfig.build.json
$ cd shared && yarn build
$ yarn clean && yarn build:css && yarn build:ts
$ rimraf lib demo/dist
$ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
$ tsc --build tsconfig.build.json
$ cd code-editor && yarn build
$ yarn clean && yarn build:css && yarn build:ts
$ rimraf lib demo/dist
$ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
$ tsc --build tsconfig.build.json
$ yarn workspace @bfc/extensions build:all
$ concurrently --kill-others-on-fail "yarn:build:obiformeditor" "yarn:build:visual-designer"
[build:obiformeditor] $ cd obiformeditor && yarn build
[build:visual-designer] $ cd visual-designer && yarn build
[build:obiformeditor] $ yarn clean && yarn build:css && yarn build:ts
[build:visual-designer] $ yarn clean && yarn build:css && yarn build:ts
[build:obiformeditor] $ rimraf lib demo/dist
[build:visual-designer] $ rimraf lib demo/dist
[build:obiformeditor] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:visual-designer] $ copyfiles --up 1 "src/**/*.css" "src/**/*.scss" lib
[build:visual-designer] $ tsc --build tsconfig.build.json
[build:obiformeditor] $ tsc --build tsconfig.build.json
[build:visual-designer] yarn run build:visual-designer exited with code 0
[build:obiformeditor] yarn run build:obiformeditor exited with code 0
$ yarn workspace @bfc/server build
$ tsc -p tsconfig.build.json
$ yarn workspace @bfc/client build
$ node scripts/build.js
Creating an optimized production build. This may take a few minutes..
error Command failed with signal "SIGKILL".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/bin/node
Arguments: /opt/yarn-v1.19.1/lib/cli.js build
Directory: /src/Composer/packages/client
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: Service 'composer' failed to build: The command '/bin/sh -c yarn build:prod' returned a non-zero code: 1

Looks highly likely a memory issue, can you check did you alloc enough memory to docker-compose?  In windows, the correct way to do that is

you need to make sure your memory is set to more than 4GB, the value we set on node.js limitation.

Hi @cwhitten, It failed when client build, Maybe it's because docker out of memory. Could you try again after resetting docker memory to 4096?

Hi @cwhitten, The error was throw when client build, it seems like a out of memory issue, maybe extending the memory for docker can fix it.

Other than that one thing, this is looking good to me.

omposerDialogs/settings/appsettings.json

Hi @a-b-r-o-w-n , I debug and find it's because I get the localStorage setting in sync api. but EnvironmentProvider.getCurrent() return the default environment which used null basePath, instead of the current botproject environment.

So I used BotProjectService.getCurrentBotProject()?.environment instead to fix it.


Project configuration

Hi, I was investigating how to get jobtastic working, and I managed to create a sample projects with two types of tasks. I could start any number of tasks concurrently. I added the EXACT SAME files to my product code base in a new package. Whenever I try to run a task, I get an exception (_AttributeError: 'DisabledBackend' object has no attribute 'get_task_meta_for'). Here is the traceback:
Traceback (most recent call last):   File "/home/kyousef/server_sdk/SDK/inmobly_sdk/bgqueue_tasks/test.py", line 2, in <module>     odd_task = GenerateOdd.delay_or_fail(size=20)   File "/usr/local/lib/python2.7/dist-packages/jobtastic/task.py", line 183, in delay_or_fail     return self.apply_async(args=args, kwargs=kwargs)   File "/usr/local/lib/python2.7/dist-packages/jobtastic/task.py", line 256, in apply_async     logging.info('Current status: %s', task_meta.status)   File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 394, in state     return self._get_task_meta()['status']   File "/usr/local/lib/python2.7/dist-packages/celery/result.py", line 339, in _get_task_meta     return self._maybe_set_cache(self.backend.get_task_meta(self.id))   File "/usr/local/lib/python2.7/dist-packages/celery/backends/base.py", line 307, in get_task_meta     meta = self._get_task_meta_for(task_id) AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for'
Help will be much appreciated.

Hi Kareem,

AttributeError: 'DisabledBackend' object has no attribute '_get_task_meta_for')

What version of Celery are you using?
Regardless, I think this error means that you don't have a results backend configured. Jobtastic requires that you use a results backend so that we can use that to keep track of task status and other important things.
I hope that helps.
-Wes

Hi Wes,
I'm using Celery 3.1.23 (Cipater)
I do have a results backend. As I mentioned above, the same code works on a standalone python project. This error only happens when I copy it inside my product code base. I think it has something to do with project configuration or something that I did to the standalone project and missed with my product project.
Here is my app declaration:
from jobtastic_odd import GenerateOdd
from celery import Celery

app = Celery('inmobly_bg_queue', backend='amqp', broker='amqp://', )

I run the celery service using this command:
celery worker --loglevel=info -P processes -c 2 -A bgqueue_app
Finally, I start the task as follows:
from jobtastic_odd import GenerateOdd
odd_task = GenerateOdd.delay_or_fail(size=20)

Thanks for the help :+1:

It definitely seems like a problem with the celery settings, but it's not jumping out at me from reading those snippets, unfortunately.

I'm going to close this, but if anyone else has suggestions for troubleshooting, feel free to comment.


d8: First steps for Windows compatibility

Using Git Bash run as administrator.

Exec ln -s instead of FileUtils.ln_s
Use full path to VBoxManage on Windows
Don't use NFS on Windows

Ansible itself doesn't officially support Windows as a control machine, so these are just the first steps and more work later is needed.
See PR #110 for the same thing on the master branch.

Build failure is the same as on master, and not caused by this PR: https://github.com/wunderkraut/WunderMachina/pull/110#issuecomment-267011077.


Enable retries on saas connectors for failures at the http request level

Purpose
Http calls within our saas connectors currently don't support retries. Even though retries are supported at the task node level, we don't want to retry all the work which has already been done within the node.
Rather than relying on requests library for retry logic we implemented ourselves so that it is simple to track retries in our upcomingrate limiting work.
Changes

Added a decorator retry_send to send method within AuthenticatedClient
Decorator sleeps after any failures according to input backoff_factor and retry_count
Configured decorator to retry connection exceptions and a list of status codes(429, 502, 503, 504)
Retry logic looks for Retry-After header and sleeps based on that. Logic inspired by https://github.com/urllib3/urllib3/blob/26383f7acfcfd631942bbb579f284c0a6ec84f19/src/urllib3/util/retry.py#L301
Added a way to test AuthenticatedClient by mocking requests session and testing different retry scenarios
Removed sleep from test_zendesk_task.py which was previously needed due to throttles

Checklist

[x] Update CHANGELOG.md file

[x] Merge in main so the most recent CHANGELOG.md file is being appended to
[x] Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
[x] Add a link to this PR at the end of the description with the PR number as the text. example: #1

[ ] ~Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.~
~If docs updated (select one):~

[ ] ~documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)~
[ ] ~documentation issue created (tag docs-team to complete issue separately)~

[x] Good unit test/integration test coverage
[ ] ~This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging~
[x] The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket
Fixes #1290

@galvana this is still a draft but I tested this and this lets us uncomment the sleep from the zendesk tests
In my testing zendesk returns a 429 which includes this header:
'retry-after': '38'
Verified we respect this:
Retrying http request in 38 seconds
And tests pass!

This should be ready for review

@adamsachs thanks for the review. i updated the PR with what we discussed


Default to non-themed plots on whiteBG

For #8000

[X] Pull request represents a single change (i.e. not fixing disparate/unrelated things in a single PR)
[X] Title summarizes what is changing
[X] Has a news entry file (remember to thank yourself!)
[ ] Appropriate comments and documentation strings in the code
[ ] Has sufficient logging.
[ ] Has telemetry for enhancements.
[ ] Unit tests & system/integration tests are added/updated
[ ] Test plan is updated as appropriate
[ ] package-lock.json has been regenerated by running npm install (if dependencies have changed)
[ ] The wiki is updated with any design decisions/details.

Codecov Report

Merging #8177 into master will decrease coverage by 0.43%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master    #8177      +/-   ##
==========================================
- Coverage   58.48%   58.05%   -0.44%
==========================================
  Files         504      504
  Lines       23088    22723     -365
  Branches     3717     3718       +1
==========================================
- Hits        13503    13191     -312
+ Misses       8716     8655      -61
- Partials      869      877       +8

Impacted Files
Coverage Δ

src/client/common/types.ts
100% <ø> (ø)
:arrow_up:

src/client/datascience/jupyter/jupyterNotebook.ts
6.04% <0%> (-0.04%)
:arrow_down:

...nt/datascience/jupyter/invalidNotebookFileError.ts
0% <0%> (-75%)
:arrow_down:

.../client/datascience/jupyter/jupyterConnectError.ts
0% <0%> (-66.67%)
:arrow_down:

...science/jupyter/jupyterKernelPromiseFailedError.ts
0% <0%> (-50%)
:arrow_down:

...ent/datascience/jupyter/jupyterWaitForIdleError.ts
0% <0%> (-50%)
:arrow_down:

src/client/common/utils/platform.ts
64.7% <0%> (-23.53%)
:arrow_down:

src/client/language/characters.ts
12% <0%> (-18.77%)
:arrow_down:

...cience/jupyter/jupyterDebuggerNotInstalledError.ts
50% <0%> (-10%)
:arrow_down:

src/client/common/platform/pathUtils.ts
66.66% <0%> (-5.56%)
:arrow_down:

... and 38 more

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 2a37248...50fb0eb. Read the comment docs.


update index.js to reflect version 0.15.2

npm is not picking up the latest version (0.15.2) because index.js still shows the older version (0.15.1):
https://github.com/callemall/material-ui/blob/v0.15.2/package.json#L5

+1 . please, update package.json

I was trying to work around this by setting the package.json dependency like this:
"material-ui": "git://github.com/callemall/material-ui#v0.15.2",

But that isn't working either. Any ideas?

In your package.json you can specify:
"material-ui": "callemall/material-ui#v0.15.2",

Well, I had tried that too, but it didn't work for me. In any case, npm is now reflecting v0.15.2 so this issue can be closed now.


Rewriting Scanpy functions

Open discussion whether or not we should reimplement Scanpy algorithms or add it as a dependency.

[ ] Add a custom settings thing analogously to Scanpy with our own design (path to already downloaded datasets etc)
[ ] Discuss whether to add Scanpy as dependency or not

Regarding logging & settings:

It would be easiest to solely use Scanpy's logging and settings & to integrate it into our code
A nicer experience would be to write a new logger & settings based on Rich. In this case it likely would have to either monkeypatch Scanpy's logging & settings or the new custom logger would as a side effect also control Scanpy's equivalents.
In any case, our own download & caching etc must respect the logging & settings

Relevant links:

https://github.com/theislab/scanpy/blob/master/scanpy/_settings.py
https://github.com/theislab/squidpy/blob/6bc70401cb34e514fd736517d41889765be6b5eb/squidpy/_utils.py


[Doc] Add documents for MySQL Binlog Load

Proposed changes
This commit contains documents of Binlog Load in Chinese and English.
Includes:

binlog-load-manual.
binlog help documents.

Types of changes
What types of changes does your code introduce to Doris?
Put an x in the boxes that apply

[x] Documentation Update (if none of the other choices apply)

Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

[x] I have created an issue on (Fix #6858) and described the bug/feature there in detail

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

relate to #6287


Xen fixes

Here are fixes I needed to make in order to get Xen running.
To run an example Xen virtual machine, https://nixos.org/wiki/NixOS_and_Xen need to be slightly altered. The following guest configuration worked for me (you should replace the uuid with the uuid of your partition):
{ config, pkgs, modulesPath, ... }:

{
  require = [ <nixpkgs/nixos/modules/virtualisation/xen-domU.nix> ];

  fileSystems =
    [ { mountPoint = "/";
        device = "/dev/disk/by-uuid/b3f4a47f-2058-4546-b620-23bbf66a61cf";
      }
    ];
}

This is the configuration file that can be placed in /etc/xen/auto. The kernel image is a hardcoded nix path, since I haven't found another way of specifying it. This configuration assumes that your boot partition is the lvm partition at /dev/lvm_main/xen1.
memory = 512
kernel = '/nix/store/8zz6193wqm8b5i7f0c086cy48cwkc4a1-xen-4.5.0/lib/xen/boot/pv-grub-x86_64.gz'
name = "xen1"
extra = '(hd0)/boot/grub/menu.lst'
disk = [ 'phy:/dev/lvm_main/xen1,xvda1,w' ]
vif = [ '' ]

I'm neither a Xen nor a Nix expert, so please review the changes before applying them.

@michalpalka, I just saw your PR, thank you very much! I'll have a look at it over the weekend.

@michalpalka, thanks again for your changes! I've tried to rebase your changes related to xen. Could you please have a look at #8833 if I missed anything?
For the changes in glusterfs, could you maybe create a separate PR, please?
Also, do you want to write down your notes from above in https://nixos.org/wiki/NixOS_and_Xen? Otherwise, they will probably be lost.


Adding your own data listings to the data browser

Hi all,
This is purely a question of where to begin, but is there any documentation for how to add / remove listings of datasets from the data browser in a light touch way, preferably without branching the code? It's a  useful tool, and would like to use the feature to display listings of other data that I'm working with if possible.
Appreciate any guidance on this.

I'm also looking for information on this!


enable building rh9 rpm with shared openssl

Clarification: this change makes it possible for us to test the OpenSSL build using the CPack builder machinery. This does not change the release build to OpenSSL from static Mbed-TLS.


Add extensions into open-vsx

Currently this extension is not availbale for VSCodium. To correct that, you just need to follow this guide.

I was not aware such thing existed. I will definitely look into it. Thanks a lot!

Just published the 0.7.0 to vscodium (and some friendly soul published 0.6.0 before) so we can consider it done 🥳.


ROD-138 Add logic to hide information if user selects they are a sponsor

What?
ROD-138 - Date of submission and Cancelling application? should not appear if the person completing the form is a sponsor.
Why?
How?

Added logic

Testing?
Tested on local machine
Screenshots (optional)
Anything Else? (optional)
Check list

[x] I have reviewed my own pull request for linting issues (e.g. adding new lines)
[ ] I have written tests (if relevant)
[x] I have created a JIRA number for my branch
[x] I have created a JIRA number for my commit
[x] I have followed the chris beams method for my commit https://cbea.ms/git-commit/
here is an example commit
[x] Ensure drone builds are green especially tests
[x] I will squash the commits before merging

Also, since other changes from ROD-122 are not available in this branch, we cannot validate the changes. If we need any changes, then they should be made in the existing PR - https://github.com/UKHomeOffice/return-of-documents/pull/60


Use global object instead of query selector for IDs

I am not 100% sure but I think this can improve the performance in some case:
Every time you add an id attribute to an element in an HTML page, that id becomes a global variable.
Check the console on this codepen
So every time the selector is #id you can access directly the global object instead of using the querySelector, and if is something like #id .someclass you can get the docFragment from the #id and look for the .someclass only on that part instead of the whole document.
I think this will improve the performance since you will avoid the call to the querySelector, but I am not 100% sure. If you have time you can investigate on that :)

nice find.  how cross browser is that?

i'm also a bit apprehensive about relying on a global that could be situationally overwritten

http://codepen.io/anon/pen/BjoQOp?editors=101

Yap, that's true. I am not sure either. I just saw it and thought to share it, in case it is useful :smile_cat:

i'll dig deeper

;)

Closing the issue..


Lib min

implements Min detached from the hardware
MinImpl can be implemented for each architecture that needs it.

makes Transport.h not depend on define.h anymore, TRANSPORT_MAX_PAYLOAD now needs to be passed to the constructor.

moves all tests to their own subdirectory

[x] tested on f103
[x] tested on f767
[ ] added documentation

fixes #5
@TanDro would appreciate a review, if this is going in the right direction.
@TanDro could you please create, and give me access to, a rig-templates repository, or something like that?

closing this for now, as #53 will change things for this as well.


(neovim) the removed function in typescript file won't be deleted in suggestion until a new file is created

Process
https://github.com/vuejs/language-tools/assets/96933655/b51c4029-fefb-4cc3-b046-be6bf18d113e
in the video, i first add a function called sussybot() in hubs.ts, and the suggestion works in the App.vue.
then i delete it and get back to App.vue, the function's suggestion is still there, but with an error aside of it:
[TS Error] Error: Debug Failure. False expression: Should not run 'collectAutoImports' when faster path is available via `data`

then i create a new file called new.ts and add a function called you()
head back to App.vue, the sussybot() suggestion is gone
Env
i'm currently using NVIM v0.9.1 with NvChad.
lsp: volar takeover mode ( disabled tsserver ), and i've searched through https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/ , set everything available in capabilities.workspace's dynamicRegistration to true.
but still, it raise this warning:
[WARN][2023-08-31 12:42:07] ...lsp/handlers.lua:137	"The language server volar triggers a registerCapability handler despite dynamicRegistration set to false. Report upstream, this warning is harmless"

here's my nvim config file:
https://github.com/ogios/nvim-config-nvchad

#1274?

I found another

#1274?

@so1ve i don't think it's related to this error, i know there maybe some restricts especially set for node_modules.
but this happens in a normal workspace

Please check if this issue has been resolved in 2.x. If not, feel free to create a new one.


V2.10.1 custom model_serializer causes problems with dumping model to json

Initial Checks

[X] I confirm that I'm using Pydantic V2

Description
In pydantic 2.10.1 when I use custom @model_serializer decorator, model cannot be dumped to json anymore for some fields.
In pydantic 2.9.2 everything works as expected (t.model_dump_json() returns proper json i.e. '{"url":"http://example.com/"}').
Error message:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "CENSORED/.venv/lib/python3.8/site-packages/pydantic/main.py", line 477, in model_dump_json
    return self.__pydantic_serializer__.to_json(
pydantic_core._pydantic_core.PydanticSerializationError: Unable to serialize unknown type: <class 'pydantic.networks.AnyHttpUrl'>

I assume this can be regression related to https://pydantic.dev/articles/pydantic-v2-10-release#migrate-to-subclassing-instead-of-annotated-approach-for-pydantic-url-types
Example Code
from pydantic import AnyHttpUrl, BaseModel, ConfigDict, model_serializer
from enum import Enum

class NewBaseModel(BaseModel):
    model_config = ConfigDict(extra="forbid")

    @model_serializer
    def serialize_model(self) -> dict:
        data = {}

        for field_name, field_value in self:
            data[field_name] = field_value

            if isinstance(field_value, Enum):
                data[field_name] = field_value.name

        return data

class Test(NewBaseModel):
    url: AnyHttpUrl

t = Test(url="http://example.com")

t.model_dump_json()

Python, Pydantic & OS Version
pydantic version: 2.10.1
        pydantic-core version: 2.27.1
          pydantic-core build: profile=release pgo=false
                 install path: CENSORED/.venv/lib/python3.8/site-packages/pydantic
               python version: 3.8.18 (default, Nov  4 2024, 14:25:09)  [GCC 11.4.0]
                     platform: Linux-6.8.0-49-generic-x86_64-with-glibc2.34
             related packages: pydantic-settings-2.6.1 typing_extensions-4.12.2
                       commit: unknown

Hi! Thanks for the question.
This was fixed via https://github.com/pydantic/pydantic/pull/10947 and will be fixed in v2.10.2 this afternoon!

I am still getting the same error after I re-ran my unit tests for v2.10.1

You'll need v2.10.2 for this one :)


.btn background removed in :active state

Prerequisites

[X] I have searched for duplicate or closed issues
[X] I have validated any HTML to avoid common problems
[X] I have read the contributing guidelines

Describe the issue
Issue
It appears the latest 5.2.2 is implemented so that if you have a .btn with no variant e.g. .btn-VARIANT, and you click or make that button :active, it's background color will be removed. It appears this is because the --bs-btn-active-bg css variable is not getting defined:

This becomes an issue especially if you have custom background styles you're using alongside .btn e.g. white text color that is !important with a color background that is not important since they'll get removed leaving you with a blank all white button (see test case below)
Cause
I believe this is do to a recent addition of this line:
:not(.btn-check) + &:active introduced here
Reduced test cases
I've forked the button stackblitz to reproduce this here:
https://stackblitz.com/edit/s8s493?file=index.html
Just toggle the :active state either manually by clicking the button or via devtools
Chrome

Safari

What operating system(s) are you seeing the problem on?
macOS
What browser(s) are you seeing the problem on?
Chrome, Safari
What version of Bootstrap are you using?
v5.2.2

Have you updated to v5.2.2?

@mdo yes, my bad, I've updated the ticket to reflect 5.2.2.

https://github.com/twbs/bootstrap/pull/37273/files has a proof-of-concept and I'd love to get feedback on if the change has merit or not 🙏

you can set the colors with
.bg-red {
--bs-btn-color: #fff;
--bs-btn-bg: #dc3545;
--bs-btn-border-color: #dc3545;
--bs-btn-hover-color: #fff;
--bs-btn-hover-bg: #bb2d3b;
--bs-btn-hover-border-color: #b02a37;
--bs-btn-focus-shadow-rgb: 225,83,97;
--bs-btn-active-color: #fff;
--bs-btn-active-bg: #b02a37;
--bs-btn-active-border-color: #a52834;
--bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
--bs-btn-disabled-color: #fff;
--bs-btn-disabled-bg: #dc3545;
--bs-btn-disabled-border-color: #dc3545;
}

@jonnysp that's a good point and I could certainly do this as an alternative. Probably less risky too. I'll go ahead and close this and the PR out.


Use proper Sass types

Should make it easier to write/maintain.
Not yet working correctly.

This doesn't generate only in the media query (and so not only all). Looked at why only all was included, seems to force older browsers to ignore the media query, without saying what those older browsers are.


 Any chance for upgrade, when new patch comes?

yes i will update it and post it here if the mod doesnt delete this thread like he did with the rest

thx a lot works good

where can i get the r4nz injector?

Hecticism, thanks for your work.

For some reason, whenever I put it into the game folder or use an injector to inject it, it doesnt work. Can anyone help?

He got it from us.. check it out https://discord.gg/leagueplus :)

how to use 2 function Push and Update x64 ??? Please help me ! thanks

我把它放进Game文件夹后进入游戏 只有左下角的Skin changer by： 请问这个是付费使用吗

Do not share or promote any other binaries in this project.


how to use save in this library ?

I am attempting to develop an annotation tool using this library , but can't seem to find any projects or demonstrations to save the annotations . perhaps you could give me a code for the same . it would be deeply helpful .

@beru @joeyfigaro @seveibar @Hummer12007

link  this is the associated issue

bump


[PoC] migrate cmake workflows from CircleCI to GHA

There is still something off with the Windows CPU builds. CMake reports it found VS 2019 https://github.com/pytorch/vision/actions/runs/4958983089/jobs/8872517410?pr=7417#step:9:656. However, in the later build it uses 2016 https://github.com/pytorch/vision/actions/runs/4958983089/jobs/8872517410?pr=7417#step:9:674

Ok, this version mismatch is also present on the CircleCI workflows.

OK, even reinstalling CUDA through our own scripts didn't work: https://github.com/pytorch/vision/actions/runs/4991194607/jobs/8937357744

All CMake workflows on GHA are green now: https://github.com/pytorch/vision/actions/runs/5033885907/jobs/9028384793 :tada:
Do we want to have a grade period here, where we run the builds on CircleCI and GHA? IMO, we don't need to, since they were mostly unmaintained and we thoroughly tested the GHA builds in the process of migrating them.


Eliminate Race conditions for signatures

Description
Switch to using a db or some better locking libraries.

Background
occurence of the race condition :- https://circleci.com/gh/ConsenSys/mythril/1110 ,
good thing is that the race condition might not be that common.

I am not sure which race condition you are refering to, but I can easily break my signature.json while running multiple mythril processes at the same time. The exception starts with this string: ""Invalid JSON in signatures file" ...

Hi @avocadochicken ,That race condition was referring to the tests, can you mention like what version of mythril gave you that error?

Definitely v0.18.12 and maybe v0.18.11 .
I am running multiple mythril instances inside a python script (through a process pool).
from mythril.exceptions import CriticalError
from mythril.mythril import Mythril
from mythril.version import VERSION

...

def worker(addr, mythril_modules):
	try:
		mythril = Mythril()
		mythril.set_api_rpc('{}:{}'.format(geth[0], geth[1]))
		address, _ = mythril.load_from_address(addr)

		report = mythril.fire_lasers(
			strategy='dfs',
			max_depth=22,
			execution_timeout=30,
			address=address,
			verbose_report=True,
			modules=mythril_modules)

		return report.as_json()

	except CriticalError as ce:
		return {'error': str(ce)}

	except:
		return {'error': 'Mythril Exception'}
...

Here a call to mythril raises a CriticalError with the mentioned string as reason.
But: You do not need to run a process pool. Just run the same python script multiple times at the same time and the failure will also occur. The only way to get mythril running again, is to remove the files config.ini and signatures.json (inside my ~./mythril - I am on linux).

I just updated at the time of writing. I must admit, I had no single failure yet.

It broke again. Now the config.ini:
configparser.DuplicateOptionError: While reading from '/home/user/.mythril/config.ini' [line  7]: option 'leveldb_dir' in section 'defaults' already exists
[defaults]
leveldb_dir = /home/user/.ethereum/geth/chaindata
dynamic_loading = infura

Linux: ~/.ethereum/geth/chaindata
#– Windows: %USERPROFILE%\AppData\Roaming\Ethereum\geth\chaindata
leveldb_dir = /home/user/.ethereum/geth/chaindata
#– To connect to Infura use dynamic_loading: infura
#– To connect to Rpc use dynamic_loading: HOST:PORT / ganache / infura-[network_name]
#– To connect to local host use dynamic_loading: localhost
dynamic_loading = infura

The file is autogenerated and was deleted by myself beforehand. I was running 8 processes for approx. 40 hours before this caused the crash (v.0.19.6). And yes, this is caused by running multiple mythril processes at the same time.
In the past I was running a single process and I was running multiple processes concurrently (on multiple machines) as well. The cause is running multiple mythril processes on one machine at the same time. I am quite confident by by now that this is the reason (after scanning millions of contracts).
Please excuse me that I put this issue here.

Oh! we didn't put any locks on the config.ini file :smile: yet, thanks for informing.

Could you link the patch here please when it is done? I want to fix it on my machines as well.

This will hopefully not be an issue anymore with #758 merged. :+1:

This issue still occurs when running mythril with multiple threads.

hey @Danc2050 can you provide the exact stack trace of the issue?

mythril.interfaces.cli [ERROR]: IPC / RPC error: 429 0mythril.interfaces.cli [ERROR]: Traceback (most recent call last):
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/interfaces/cli.py", line 761, in parse_args_and_execute
    config = set_config(args)
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/interfaces/cli.py", line 520, in set_config
    config = MythrilConfig()
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/mythril/mythril_config.py", line 29, in __init__
    self._init_config()
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/mythril/mythril_config.py", line 76, in _init_config
    config.read(self.config_path, "utf-8")
  File "/usr/lib/python3.6/configparser.py", line 697, in read
    self._read(fp, filename)
  File "/usr/lib/python3.6/configparser.py", line 1092, in _read
    fpname, lineno)

Additionally, I am unsure if this is a related issue, but I seem to get some CRITICAL errors on some addresses:
mythril.mythril.mythril_analyzer [CRITICAL]: Exception occurred, aborting analysis. Please report this issue to the Mythril GitHub page.
Traceback (most recent call last):
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/mythril/mythril_analyzer.py", line 170, in fire_lasers
    custom_modules_directory=self.custom_modules_directory,
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/analysis/symbolic.py", line 179, in __init__
    self.laser.sym_exec(world_state=world_state, target_address=address.value)
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 158, in sym_exec
    self._execute_transactions(symbol_factory.BitVecVal(target_address, 256))
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 212, in _execute_transactions
    execute_message_call(self, address)
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/transaction/symbolic.py", line 67, in execute_message_call
    laser_evm.exec()
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 244, in exec
    new_states, op_code = self.execute_state(global_state)
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 294, in execute_state
    self._execute_pre_hook(op_code, global_state)
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/svm.py", line 584, in _execute_pre_hook
    hook(global_state)
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/plugins/implementations/dependency_pruner.py", line 224, in sstore_hook
    self.update_sstores(annotation.path, location)
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/ethereum/plugins/implementations/dependency_pruner.py", line 118, in update_sstores
    if target_location not in self.sstores_on_path[address]:
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/smt/bitvecfunc.py", line 261, in __eq__
    self, other, operator.eq, default_value=False, inputs_equal=True
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/smt/bitvecfunc.py", line 114, in _comparison_helper
    a.input_ == b.input_ if inputs_equal else a.input_ != b.input_,
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/smt/bitvecfunc.py", line 261, in __eq__
    self, other, operator.eq, default_value=False, inputs_equal=True
  File "/u/danc2/.local/lib/python3.6/site-packages/mythril/laser/smt/bitvecfunc.py", line 112, in _comparison_helper
    Bool(cast(z3.BoolRef, operation(a.raw, b.raw)), annotations=union),
  File "/u/danc2/.local/lib/python3.6/site-packages/z3/z3.py", line 929, in __eq__
    return BoolRef(Z3_mk_eq(self.ctx_ref(), a.as_ast(), b.as_ast()), self.ctx)
  File "/u/danc2/.local/lib/python3.6/site-packages/z3/z3core.py", line 1661, in Z3_mk_eq
    _elems.Check(a0)
  File "/u/danc2/.local/lib/python3.6/site-packages/z3/z3core.py", line 1378, in Check
    raise self.Exception(self.get_error_message(ctx, err))
z3.z3types.Z3Exception: b'Sorts (_ BitVec 256) and (_ BitVec 512) are incompatible'

@Danc2050 the error isn't exactly related to the issue but is a new error. You can also run mythril without using CLI where you can circumvent this problem but will require some effort. Will probably do something like adding a new arg for parallelisation.
And thanks for the other bug report.

A side note for anyone who wants to avoid this bug: Multiprocessing in Python seems to be side-stepping the issue while still allowing for CLI use.

@norhh Hey Norhh. I am trying to find alternatives to run Mythril not in the CLI mode, but am not really finding any resource on how to do this. Do you have any suggestions?


[WIP] Implements Type to BType conversion.

There is still failing test for ScalaJavaMapper

retest this please

retest this please

retest this please

There are lots of failing tests on Jenkins. What a nuisance.

Depends on https://github.com/scala/scala/pull/5773

retest this please

retest this please

Tests are still failing on Jenkins. I merge anyway, we can look at this in a different PR.


gender inclusive language

change "he/she" to "they"

@emberstevens : Thanks for your contribution! The author, @billmath, has been notified to review your proposed change.

@chbain : Thanks for your contribution! The author, @billmath, has been notified to review your proposed change.

Lines 314, 216: Added article "the".

@emberstevens Thanks for catching these.  I was going to approve this but it appears there is merge conflict.  Can you resolve this and re-submit.  Thanks!

@emberstevens Since this was a quick gender change I went ahead and updated it in our private repo.  So you don't need to worry about the conflict.  These changes should be live later today.  Thanks!
#please-close


Add a method to retrieve the sandbox interfaces in use

Signed-off-by: Hui Kang<EMAIL_ADDRESS>

@boucher circle-ci failed. retrying...

Thanks, looks like it passed the second time :)

@boucher Now that #365 is merged, are you planning to modify this PR to add the new method to the Sandbox interface instead of the Endpoint interface ?

Sure, let me take a look at what that involves.

Thanks !

@aboch yes, the goal is to get all the interfaces of the containers.
@boucher I can update the PR to move the function to sandbox interface based on #365 if you do not mind.

@huikang That would be great.

Closing as #518 is a rework of this PR.


[master] Bump KIE 7.54.0.Final

Related PR

https://github.com/kiegroup/optaplanner/pull/1326
https://github.com/kiegroup/kogito-runtimes/pull/1308

Many thanks for submitting your Pull Request :heart:!
Please make sure that your PR meets the following requirements:

[ ] You have read the contributors guide
[ ] Your code is properly formatted according to this configuration
[ ] Pull Request title is properly formatted: KOGITO-XYZ Subject
[ ] Pull Request title contains the target branch if not targeting master: [0.9.x] KOGITO-XYZ Subject
[ ] Pull Request contains link to the JIRA issue
[ ] Pull Request contains link to any dependent or related Pull Request
[ ] Pull Request contains description of the issue
[ ] Pull Request does not include fixes for issues other than the main ticket

How to retest this PR or trigger a specific build:

Pull Request
Please add comment: Jenkins retest this

Quarkus LTS checks
Please add comment: Jenkins run LTS

Native checks
Please add comment: Jenkins run native

Full Kogito testing (with cloud images and operator BDD testing)
Please add comment: Jenkins run BDD
This check should be used only if a big change is done as it takes time to run, need resources and one full BDD tests check can be done at a time ...

The Linux check has failed. Please check the logs.

The Linux check has failed. Please check the logs.

jenkins retest this please

Failed
testEventBasedSplitWithCronTimerAndSignal – org.jbpm.bpmn2.IntermediateEventTest
Let's run again

The Linux check has failed. Please check the logs.


add  history input and when

work for https://github.com/nushell/reedline/issues/315

I'm guessing that we're going to save this change for when we implement the historydb.

Closing this for now as the history API changed with #401 which implements timestamping etc. for the SQlite history backend. Feel free to implement an alternative file based encoding on that API. For compatibility in nushell we will maintain the entry only file format for a while.


Which proxy seller website do you prefer?

Please follow the guide below

Issues submitted without this template format will be ignored.
You will be asked some questions and requested to provide some information, please read them carefully and answer completely.
Put an x into all the boxes [ ] relevant to your issue (like so [x]).
Use the Preview tab to see how your issue will actually look like.

Before submitting an issue, make sure you have:

[ x] Updated to the latest version
[x ] Read the README and docs
[ x] Searched the bugtracker for similar issues including closed ones

Purpose of your issue?

[ ] Bug report (encountered problems/errors)
[ ] Feature request (request for a new functionality)
[x ] Question
[ ] Other

Describe your issue
Hi guys i wanna run multiple account in one machine. Which proxy seller website do you prefer for buy?
Thanks much!

Hello @oguzhankarabulut did you ever test this out? Was wondering if you figured anything out. Thanks


ionic 5 and Ionicons 5.x Issue: icon name have changed => md-create.svg : 404 Not Found

Hello,
i have a project that i have migrate to ionic 5 and ionicons 5.
All work nice with ionic-selectable, unless the  to Edit an item that use an a name that is no more used in ionicons 5 !
There is no template to modify that part of the module and i have not found how to change that icon !
So i have a blank icon and a network error 404 Not Found !
Here is the part of the module where the Edit icon is called.
<ion-button
  slot="end"
  fill="outline"
  class="ionic-selectable-item-button ios button button-small button-outline button-has-icon-only ion-activatable ion-focusable hydrated"
  ng-reflect-fill="outline"
  ><ion-icon slot="icon-only" name="md-create" ng-reflect-name="md-create" role="img" class="ios hydrated" aria-label="md create"></ion-icon
>
</ion-button>

Thanks a lot for your amazing module !
Hope you will finish the migration to ionic 5 and ionicons 5 soon ;)

Thanks for you report, that was resolved in version 4.7.1, is available now on npm

On ionic 6 with ionic-selectable version 4.9.0 I have the exact same issue.


i wonder about.

could you tell me the reason?
1, why use 40 there?
factor := math.Floor(float64(40*len(h.nodes)*weight) / float64(totalWeight))

2,  why use 3 there?
for i := 0; i < 3; i++ {
	key := hashVal(bKey[i*4 : i*4+4])
        h.ring[key] = node
	h.sortedKeys = append(h.sortedKeys, key)
}

thanks

This is a port from libketama with portability in mind. You should ask the author of libketama for these constants.
See: https://github.com/RJ/ketama/blob/master/libketama/ketama.c#L438

This is the number of virtualNode a.k.a vnode. This is an important parameter. Basically, each actual server is seen as 160 virtual servers. In the hope of achieving better load distribution. In other implementations, this constant is called ketama_points [1] or KETAMA_NVNODE.
IMO this should be documented in the readme.md of this project for completeness.
[1] http://search.cpan.org/~raz/Cache-Memcached-Fast-0.25/lib/Cache/Memcached/Fast.pm
[2] https://gitlab.com/nginx-modules/ngx_http_upstream_ketama_chash/blob/master/ngx_http_upstream_ketama_chash_module.c#L37

@serialx
for i := 0; i < 3; i++ {
	key := hashVal(bKey[i*4 : i*4+4])
        h.ring[key] = node
	h.sortedKeys = append(h.sortedKeys, key)
}

I think it's only loop for 3 times here. Is that right?

Fine. I got it.
@cssivision @serialx
https://github.com/3rd-Eden/node-hashring/blob/master/index.js#L57-L72


"Restart typescript server" missing once again

"Restart typescript server" command is missing.
I see this issue:
https://github.com/microsoft/vscode/issues/25382
It was closed as a dupe of this one:
https://github.com/microsoft/vscode/issues/22335
That was closed by a bot
and this closed one
and so on.. but this still happens
I had the "restart typescript server" last month. Now it's gone.
VSCODE Version: 1.50.1
This works ok on VSCode Insiders

/needsMoreInfo
Also, are you in a js/ts file when running this command?


Add guidance for indicating nullability on DTOs

Summary
Added a section to the existing document on nullable migration strategies (/dotnet/csharp/nullable-migration-strategies), "Updating Data Transfer Objects (DTOs) to indicate nullability" containing general guidance on using DTOs with nullable reference types.
I added it as a new section to the migration document, but if someone feels it belongs in a new document, or in a different document, please let me know.
I also added "See Also" links to the tutorial on migrating an app to use null references, and the specific EF Core guidance that already exists.
Tagging @roji, based on his comments in the original issue.
Fixes #18099.

@BillWagner, all resolved; I also found another 'i.e.' to remove that was still there.
Sorry about all the double-backticks; that's my RestructuredText instincts letting me down!

Thanks again @alistairjevans  I've just merged this. You should see the changes show up on our live site in the next day or two, on our regular publishing cycle.


Use db.MakeTimestamp

Replaced all time.Now().UnixNano() / int64(time.Millisecond) by db.MakeTimestamp()
As this is a very simple PR, no issue it's created (but will be created if required)
Signed-off-by: Joan Duran<EMAIL_ADDRESS>

Merged, thanks @jduranf


Report by criticity card is empty

The report by criticity card is empty

Have you got sync the data before ? card seem work on my environnement can you check if you have some error in the devTool console ?

After a refresh seem's to work but the "Exceptional" status is missing for Intigriti


Implement glyph.correctDirection.

We need to have a functional "correct path direction" algorithm. It needs to handle both PostScript winding direction rules and TrueType rules (which is really just do the PostScript rules and then reverse all paths). The Type 1 Font Format PDF (file page 32, labeled as page 27), has the best description of the desired result that I can find.

A subpath that is to be filled must be defined in a counterclockwise orientation in character space. A subpath that is to be left unfilled must be defined in a clockwise orientation. If you imagine walking along a subpath in the direction it is defined, then a filled area should be on your left. This convention allows PostScript language programs to create combinations of paths involving characters with reliable winding number orientations. On some implementations of Type 1 BuildChar, this orientation is expected; some rendering algorithms depend on it.

We, mostly me, wrote an implementation many, many years ago in RoboFab (source code.).  It was marginally okay most of the time but had one major issue that I remember: The nesting determination relied on bounding boxes. That led to things like the 0 in a % being incorrect if the contours of the 0 were inside of the bounds of the /.
I've checked fontTools and there isn't a function for this there. I did find an implementation on FontForge (source code) that could be referenced, though it seems to have it's own problems listed. T've also looked through the AFDKO's CheckOutlinesUFO.py (source code) but I didn't see an implementation there.
We could simply reimplement the RoboFab implementation, but we have a chance to do something better now.

cc @typemytype @behdad @anthrotype @miguelsousa @readroberts @cjchapman
Any thoughts?

@typesupply I think fontTools' areaPen solves this.

Two threads related to this,
https://github.com/fonttools/fonttools/issues/617
https://github.com/fonttools/fonttools/issues/621

If different contours of the glyph all have a consistent winding then yes, the areaPen is good enough to figure out if you should flip everything.  Otherwise, it's tricky indeed.  Here's some edge cases for example:
https://github.com/behdad/glyphy/blob/77bd0c223c1c35bbd50e2521d8769c557871f432/src/glyphy-outline.cc#L92

Yeah, those edge cases are tough and they jogged my memory on the implementation issues in the RoboFab version. I read through my ancient, bad, clumsy code and I think this is the algorithm that I used:
- base = counterclockwise
- if there are 0 contours: return
- if there is 1 contour: set direction to base, return
- find contours that have overlapping bounding boxes by
	- for contour1 in all contours
		- for contour2 in all contours
			- if contour1 == contour2: skip
			- if the bounding boxes intersect, note the hit in each contour
- for contour1 in all contours
	- direction = int(contour1 direction)
	- for contour2 in all contours that intersect with contour1
		- if the start point of contour1 is inside of the back in contour2: add 1 to direction
	- correctDirection = direction % 2
	- if contour1 direction != correctDirection: reverse direction of contour 1

As I recall, the points of potential failure are:

if the bounding boxes intersect
if the start point of contour1 is inside of the back in contour2

These both make assumptions that may or may not be true. Testing the contour bounding boxes for intersection is not the same as actually testing for contour intersections. For example:

Testing the start point position of the contour1 to see if if is within the black of contour2 was my way of working around this. However, only testing the start point, and not all points, leads to a potential inconsistency. Compare this:

To this:

These are the same shapes, but the RoboFab implementation gives different results for each:

This is because of the difference in start point position. I remember testing this back in the day and seeing this problem. The only solution I could come up with was to test all on curve points in each contour. However, that proved to be very expensive.

So, I think one way forward would be to make the RoboFab implementation test all points (and make the code less clumsy). Maybe hardware improvements have solved the problem. :)

what about @behdad's suggestion in https://github.com/fonttools/fonttools/issues/621#issuecomment-234195171

change the pointInsidePen() test to use a different point than the contour initial point. The point to use is, to be implemented in a separate function, a point "inside" the current contour.
That function can be implemented by taking the first segment of the contour, evaluate it at t=0.12345 and then moving "inside" (based on curve derivative at that point and the contour direction) by just a bit (~.12345 unit).
That should take care of the co-inciding points.

what about @behdad's suggestion in fonttools/fonttools#621 (comment)

I don't quite understand the math, but I think I get the gist. That might be better, but I wonder if testing a single point, no matter where it is located, is the always going to have faults. I'm starting to think about it as a nesting question. If we could build a tree of contours that contain other contours, we could use that to determine the desired direction. Here's the algorithm I'm thinking about:
- base = counterclockwise
- set the direction of all contours to base
- contours = all contours ordered from largest to smallest
- for contour1 in contours
	- for contour2 in contours
		- if contour2 completely is within contour1: reverse direction of contour2

The hard part is this:
if contour2 completely is within contour1
This is where my single point testing came from. At the time, we didn't have a way to determine if a contour was inside of another contour. We could guesstimate with the bounding boxes, but that isn't the same thing as actually testing. We have booleanOperations now so we could use that to combine largeContour + smallContour. If the result == largeContour, then smallContour is truly within largeContour.
There are edge cases that would need to be handled, but maybe this could work?

We have booleanOperations now so we could use that to combine largeContour + smallContour. If the result == largeContour, then smallContour is truly within largeContour.

I thought about that too. But that is definitely going to be even more expensive than testing all oncurve points.

If paths overlap, isn't the result undefined at best? I wonder whether we should even try to cater for that case.

If paths overlap, isn't the result undefined at best?

Correct.

I wonder whether we should even try to cater for that case.

There's very legit usecase: a "C" contour and a "cedilla" contour. Works in OpenType. Not in CFF.

There's very legit usecase: a "C" contour and a "cedilla" contour. Works in TrueType. Not in CFF. Though, CFF2 allows that.

The question is then rather: can a "correct path direction" algorithm be expected to reliably resolve that case?
For this use case it may be enough to do the following: if two contours overlap, they will get the same winding direction. Could that work? That still leaves us with detecting whether contours overlap efficiently.

There's very legit usecase: a "C" contour and a "cedilla" contour. Works in TrueType. Not in CFF. Though, CFF2 allows that.
The question is then rather: can a "correct path direction" algorithm be expected to reliably resolve that case?

In theory yes...

For this use case it may be enough to do the following: if two contours overlap, they will get the same winding direction. Could that work?

Sounds about right.

That still leaves us with detecting whether contours overlap efficiently.

Yeah this whole thing doesn't sound like a problem that we should try to solve. Fonts should have correct relative contour directions...

For this use case it may be enough to do the following: if two contours overlap, they will get the same winding direction. Could that work?

Yes. That's the point of the first step in my sketch. I drew some diagrams of things that would fail in my idea, such as this:

But...what is the "correct" solution to this? This is where we have an advantage in that, unless the designer is doing something weird, the results will be visually checked. The correct solution to these is then deferred to a human.
I'm working on an implementation of my idea...

Yeah this whole thing doesn't sound like a problem that we should try to solve. Fonts should have correct relative contour directions...

Totally agree.

Here's an initial sketch. This is written for clarity and no optimizations have been added. I'm only interested in seeing if this idea will work at this point.
from fontTools.pens.areaPen import AreaPen
from booleanOperations.booleanGlyph import BooleanGlyph

def correctDirectionWithBooleanOperations(glyph):
    glyphClass = glyph.__class__
    # set the contours to the same direction
    for contour in glyph:
        contour.clockwise = False
    # sort the contours by area
    areas = []
    for contour in glyph:
        pen = AreaPen()
        contour.draw(pen)
        area = pen.value
        areas.append((area, contour))
    areas.sort()
    areas.reverse()
    contours = [contour for area, contour in areas]
    # create a version of each contour that is simplified
    # to the result of performing a union on itself. this
    # will filter out intersections and unecessary points.
    cleanedContours = []
    for contour in contours:
        shell = glyphClass()
        pointPen = shell.getPointPen()
        contour.drawPoints(pointPen)
        shell = BooleanGlyph(shell)
        cleanedGlyph = shell.union(BooleanGlyph())
        cleanedContours.append((contour, cleanedGlyph))
    # build a tree of nested contours
    tree = {}
    for index, (largeContour, largeCleanedGlyph) in enumerate(cleanedContours):
        largeDigest = getDigest(largeCleanedGlyph)
        for smallIndex, (smallContour, smallCleanedGlyph) in enumerate(cleanedContours[index + 1:]):
            test = largeCleanedGlyph.union(smallCleanedGlyph)
            testDigest = getDigest(test)
            if largeDigest == testDigest:
                if largeContour not in tree:
                    tree[largeContour] = []
                tree[largeContour].append(smallContour)
    # run through the tree, largest to smallest, flipping
    # the direction of each contour nested within another contour
    for largeContour, largeCleanedContour in cleanedContours:
        if largeContour in tree:
            for smallContour in tree[largeContour]:
                smallContour.reverseContour()

def getDigest(glyph):
    contours = [list(contour._points) for contour in glyph]
    return contours

# ----
# Test
# ----

def buildGlyphs(font):
    glyph = font.newGlyph("A")
    pen = glyph.getPen()
    pen.moveTo((0, 0))
    pen.lineTo((100, 0))
    pen.lineTo((100, 100))
    pen.lineTo((0, 100))
    pen.closePath()
    pen.moveTo((10, 10))
    pen.lineTo((10, 90))
    pen.lineTo((90, 90))
    pen.lineTo((90, 10))
    pen.closePath()
    pen.moveTo((20, 20))
    pen.lineTo((80, 20))
    pen.lineTo((80, 80))
    pen.lineTo((20, 80))
    pen.closePath()
    pen.moveTo((30, 30))
    pen.lineTo((30, 70))
    pen.lineTo((70, 70))
    pen.lineTo((70, 30))
    pen.closePath()
    pen.moveTo((40, 40))
    pen.lineTo((60, 40))
    pen.lineTo((60, 60))
    pen.lineTo((40, 60))
    pen.closePath()

    glyph = font.newGlyph("B")
    pen = glyph.getPen()
    pen.moveTo((0, 0))
    pen.lineTo((100, 0))
    pen.lineTo((100, 100))
    pen.lineTo((70, 100))
    pen.lineTo((70, 30))
    pen.lineTo((0, 30))
    pen.closePath()
    pen.moveTo((10, 60))
    pen.lineTo((40, 60))
    pen.lineTo((40, 90))
    pen.lineTo((10, 90))
    pen.closePath()

    glyph = font.newGlyph("C")
    pen = glyph.getPen()
    pen.moveTo((0, 0))
    pen.lineTo((100, 0))
    pen.lineTo((100, 100))
    pen.lineTo((20, 100))
    pen.lineTo((20, 90))
    pen.lineTo((70, 90))
    pen.lineTo((70, 30))
    pen.lineTo((10, 30))
    pen.lineTo((10, 80))
    pen.lineTo((0, 80))
    pen.closePath()
    pen.moveTo((30, 40))
    pen.lineTo((60, 40))
    pen.lineTo((60, 70))
    pen.lineTo((30, 70))
    pen.closePath()

    glyph = font.newGlyph("D")
    pen = glyph.getPen()
    pen.moveTo((0, 0))
    pen.lineTo((100, 0))
    pen.lineTo((100, 100))
    pen.lineTo((0, 100))
    pen.closePath()
    pen.moveTo((0, 50))
    pen.lineTo((50, 100))
    pen.lineTo((100, 50))
    pen.lineTo((50, 0))
    pen.closePath()

    glyph = font.newGlyph("E")
    pen = glyph.getPen()
    pen.moveTo((0, 100))
    pen.lineTo((0, 50))
    pen.lineTo((100, 50))
    pen.lineTo((100, 100))
    pen.closePath()
    pen.moveTo((50, 50))
    pen.lineTo((10, 0))
    pen.lineTo((90, 0))
    pen.closePath()

    glyph = font.newGlyph("F")
    pen = glyph.getPen()
    pen.moveTo((0, 0))
    pen.lineTo((100, 0))
    pen.lineTo((100, 100))
    pen.lineTo((0, 100))
    pen.closePath()
    pen.moveTo((50, 0))
    pen.lineTo((10, 90))
    pen.lineTo((90, 90))
    pen.closePath()

    glyph = font.newGlyph("G")
    pen = glyph.getPen()
    pen.moveTo((0, 50))
    pen.lineTo((100, 50))
    pen.lineTo((100, 100))
    pen.lineTo((0, 100))
    pen.closePath()
    pen.moveTo((25, 0))
    pen.lineTo((75, 0))
    pen.lineTo((75, 100))
    pen.lineTo((25, 100))
    pen.closePath()

    glyph = font.newGlyph("H")
    pen = glyph.getPen()
    pen.moveTo((25, 60))
    pen.lineTo((25, 0))
    pen.lineTo((75, 0))
    pen.lineTo((75, 60))
    pen.closePath()
    pen.moveTo((0, 50))
    pen.lineTo((100, 50))
    pen.lineTo((100, 100))
    pen.lineTo((0, 100))
    pen.closePath()

    glyph = font.newGlyph("I")
    pen = glyph.getPen()
    pen.moveTo((0, 70))
    pen.lineTo((0, 0))
    pen.lineTo((70, 0))
    pen.lineTo((70, 70))
    pen.closePath()
    pen.moveTo((30, 100))
    pen.lineTo((30, 30))
    pen.lineTo((100, 30))
    pen.lineTo((100, 100))
    pen.closePath()
    pen.moveTo((40, 60))
    pen.lineTo((60, 60))
    pen.lineTo((60, 40))
    pen.lineTo((40, 40))
    pen.closePath()

def test(font):
    buildGlyphs(font)
    for name in sorted(font.keys()):
        glyph = font[name]
        manualDirection = [contour.clockwise for contour in glyph]
        for contour in glyph:
            glyph.clockwise = True
        correctDirectionWithBooleanOperations(glyph)
        autoDirection = [contour.clockwise for contour in glyph]
        print name, manualDirection == autoDirection

test(NewFont(showUI=False))

The glyphs used for testing look like this:

This is the result of running RoboFab's glyph.correctDirection() on these:

This is the result of running my sketch code:

The test gets them right where as RoboFab has some problems. If anyone has any other shapes to throw at the algorithms, please let me know.
My next steps:

Optimize the test algorithm as much as possible.
Fork the RoboFab implementation and have it test all points.
Push a lot of data through both algorithms and measure speed.

What's the best way to do a speed test like this these days? Is there a large corpus of fonts that is used for FontTools testing?

I would suggest to also randomize the contour directions, apply the algo, check whether you get the expected direction. Possible additional test: randomize contour order, then run algo, see if the results are the same (after reordering to original order).

And randomize start points.

randomize

Here's an updated test function (everything else remains the same):
def test(font):
    from random import randint
    buildGlyphs(font)
    for name in sorted(font.keys()):
        glyph = font[name]
        manualDirection = [contour.clockwise for contour in glyph]
        for i in range(100):
            for contour in glyph:
                contour.clockwise = randint(0, 1)
                contour.setStartSegment(randint(0, len(contour) - 1))
            correctDirectionWithBooleanOperations(glyph)
            autoDirection = [contour.clockwise for contour in glyph]
            if manualDirection != autoDirection:
                print "error:", name

I get consistent results each time. If I use RoboFab's glyph.correctDirection(), I get very inconsistent results.

I developed an implementation that uses the idea from my "smash the contours together and see if the biggest contour is the only thing left" algorithm with PointInsidePen. Here's the overview:
- set all contours to counter clockwise
- contours = all contours in the glyph
- sort contours by area, from largest to smallest
- for largeContour in contours
    - for smallContour in contours smaller than largeContour
        - contourInside = True
        - if largeContour and smallContour bounding boxes do not overlap
            - contourInside = False
            - stop testing smallContour
        - for each on-curve point in smallContour
            - if point is not inside of largeContour
                - contourInside = False
                - stop testing smallContour
        - convert curves to line segments
        - for each on-curve point in the new curve approximation
            - if point is not inside of largeContour
                - contourInside = False
                - stop testing smallContour
        - if contourInside is True
            - log smallContour as inside of largeContour
- recurse through nested contours and reverse the direction of each sub-contour

This is very fast and very reliable, from what I've seen so far.
I decided against implementing this in the fontParts layer. It uses approximation, so I'm wary of making it official. Instead, I implemented it in defcon and call this in fontshell's RGlyph.correctDirection method.

This is very fast and very reliable, from what I've seen so far.

Doesn't it fail if you have a larger contour of a "U", and then a smaller contour like a "-" that has it's four corners inside the area of the "U"?  We like the "-" to NOT be considered inside the "U", but your algorithm considers it inside. You can "fix" that if you also convert lines to small line segments the way you do with curves.
It's heuristics all the way...

Doesn't it fail if you have a larger contour of a "U", and then a smaller contour like a "-" that has it's four corners inside the area of the "U"? We like the "-" to NOT be considered inside the "U", but your algorithm considers it inside. You can "fix" that if you also convert lines to small line segments the way you do with curves.

That's a good one. Yeah, I consider that as not inside as well. This is easy to fix. FlattenPen can subdivide the line segments so this is an easy fix. There will be a performance hit.

It's heuristics all the way...

Yeah. That's why I decided to not put this in fontParts proper.

Done in https://github.com/robofab-developers/fontParts/commit/02abead21f6d9ae3c9a37be5092df65a0eaaabfc


Add 3.8 to setup.py

Storage done in https://github.com/Azure/azure-sdk-for-python/pull/8089

(message created by the CI based on PR content)


Bug: The dragging of the "CraftSim Craft Queue" window stays sometimes even though the mouse has been released

If I click with the mouse into the window again, the dragging still sticks. /reload helps as a fix.

i confirm this on my side its very easy to reproduce
1.open any of the craft sim windows
2.drag the window ( move until the mouse drag is stuck with out using click)


Allow setting a custom name for migrations table

I think it would be useful and more flexible. Maybe with some functional options or just another New* function.

Just an exported field:

type Migrator struct {
	DB *sql.DB
	FS fs.FS
	Table string
}

m := New(db, migrations)
m.Table = "migrate_inator"

With another New* function:

type Migrator struct {
	DB *sql.DB
	FS fs.FS
	table string
}

// New Migrator with default options.
func New(db *sql.DB, fs fs.FS) *Migrator {
	return &Migrator{
		DB: db,
		FS: fs,
		table: "migrate",
	}
}

func NewWithTable(db *sql.DB, fs fs.FS, table string) *Migrator {
	return &Migrator{
		DB: db,
		FS: fs,
		table: table,
	}
}

m := NewWithTable(db, migrations, "migrate_inator")

With a Config struct:

type Config struct {
	DB *sql.DB
	FS fs.FS
	Table string
}

type Migrator struct {
	DB *sql.DB
	FS fs.FS
	table string
}

// New Migrator with default options.
func New(db *sql.DB, fs fs.FS) *Migrator {
	return NewWithConfig(Config{
		DB: db,
		FS: fs,
		Table: "migrate",
	})
}

func NewWithConfig(cfg Config) *Migrator {
	return &Migrator{
		DB: cfg.DB,
		FS: cfg.FS,
		table: cfg.Table,
	}
}

m := NewWithConfig(Config{
	DB: db,
	FS: migrations,
	Table: "migrate_inator"
})

With functional options:

type Migrator struct {
	DB *sql.DB
	FS fs.FS
	table string
}

type Option func(*Migrator)

// New Migrator with default options.
func New(db *sql.DB, fs fs.FS, options ...Option) *Migrator {
	m := &Migrator{
		DB: db,
		FS: fs,
		table: "migrate",
	}

	for _, opt := range options {
		opt(m)
	}

	return m
}

func WithTable(table string) Option {
	return func(m *Migrator) {
		m.table = table
	}
}

m := New(db, migrations, WithTable("migrate_inator"))

@ntrrg thank you for the suggestion. I think it makes sense to have this. I'll think about the approach I like the most and probably implement it. 😊

@ntrrg out of curiosity, why would you want to change the table name?

Great, let me know if you need help. The good thing about the last two is you can implement new features without changing functions signatures.
To provide flexibility, some people may have a migrations table already. Or you may want to run multiple migrators (dangerous, but useful).

Because the library is still in v0, I opted to break compatibility and have New take an Options struct. The convenience functions are still the same.
This is now implemented, thanks for the suggestion @ntrrg. 😊

Amazing, thanks for your work!


All builds failing with react-email templates on Next.js 14 with error "Cannot get final name for export 'encodeXML'"

Describe the Bug
I'm having a blocking issue for all my builds with Next.js 14.2.3:
Cannot get final name for export 'encodeXML' of<EMAIL_ADDRESS>
It seems that this is already a long-standing issue that has been closed without proper resolution: https://github.com/resend/react-email/issues/1015
The mentioned workarounds do also not work for me:

Tried to use the render function to first render the react component to HTML and send the email
Tried to add the following to my next.config.js:

experimental: {
    serverComponentsExternalPackages: ["@react-email/components"],
  },

Not using the Edge runtime on my page

Tried setting my page as a client component with "use client" at the top

Used packages:
"@react-email/components": "^0.0.19",
"react-email": "^2.1.4",
Which package is affected (leave empty if unsure)
No response
Link to the code that reproduces this issue
private
To Reproduce
Create a next 14 project and use the following packages:
"@react-email/components": "0.0.19",
"react-email": "2.1.4",

Expected Behavior
Build succeeds
What's your node version? (if relevant)
v20.13.1

Defaulted back to send the email by plain text for now so my build succeeds.
If the issue keeps being unresolved, I'll probably just look into alternatives to react-email + Resend.

Is the error being thrown because of the Resend SDK?

Can you make an actual reproduction of this? Something I can clone and get up and running quickly because the original issue there was fixed, and it isn't present anymore. Your issue seems to be something else.

@gabrielmfern thanks for getting back to me. I'll see if I can find time to create smth to reproduce the issue. Although I think it might also be something from the resend package and I could be in the wrong place here.
Cause I currently managed to get around it by sending the HTML email from an edge API route instead of sending the email directly from my server action on the edge runtime, so in the server action I only send a POST request to the API route to trigger the email send and this worked.

@maldee still the same error unfortunately when trying to call it directly from the server action:

Hi,
I got the same problems as yours. My project was used Next Js 14.1.3 and react-email 2.1.5.
I have tried to reproduce this bug on blank Next JS (latest + my version) projects. But It did not happen. The blank project could be built without touching next.config.mjs file, this solution, and even passing React component as react param in resend.email.send configuration that running in server action and as api route.
I applied these solutions into my project and all could not make it build success.
Finally, I came with this solution. Rather than using renderAsync I use render instead to render html output at transactional directory, in your case I think It could be react-email. Then at the server action in parent project, I imported the html instead of react email component.
// At my-app/transactional directory
// render.js
import { render } from "@react-email/render";
import WaitListEmail from "./emails/WaitListEmail"

export default function renderWaitList(props) {
  return render(WaitListEmail(props), {
      pretty: true,
    });
 }

// At server action inside my-app/src/actions
// sendEmailAction.js
import renderWaitList from ".../../transactional/render"

const { error } = await resend.emails.send({
  from,
  to,
  subject,
  html: renderWaitList(props),
});

Hope that you could make a build success with this solution.

In what situation does the error happen exactly? I can see this is an issue people have, but I can't reproduce at all.

I've been logging my findings in Discord but I'll leave them here for others too.
I've stripped my project down to the bare minimum here: https://github.com/kylekz/email-repro
At this point, I'm almost certain it's something to do with instantiating a new instance of Resend(), as seen on this line https://github.com/kylekz/email-repro/blob/main/apps/web/src/app/actions.ts#L8
// actions.ts
"use server";
import { RemovedFromOrganization } from "@repo/email/emails/removed-from-org";
import { Resend } from "resend";

// const resend = new Resend("");
// uncommenting this line fixes the error

export async function email() {
  const react = RemovedFromOrganization({
    baseUrl: "",
    receiverName: "",
    organizationName: "",
  });
}

// page.tsx
"use client";
export default function MyComponent() {
  async function send() {
    startTransition(async () => {
      await email();
    });
  }

  return <button onClick={send}>Send Email</button>;
}

In my project, I have Notification classes for each of my emails which handle persisting to the database for web notifications, dispatching to a queue worker for background email sending, and marshalling from JSON into classes when receiving from the queue worker, so where I'm returning the React component template is not necessarily where the email is being sent.
If I place an unused const resend = new Resend("env.RESEND_API_KEY"); inside the file where my notification classes are defined, I'm able to work with email templates via resend.emails.send({ react: EmailTemplate({ ... }) }), without using react-email/render beforehand. This makes no sense to me, and I'm unable to see anything in the resend-node package that could indicate why this is the case.

This can't be an issue on our side, as it seems really volatile about when it happens. Just importing resend there fixes the issue, importing each component from their package instead of from @react-email/components also fixes the issue.
The package it points to — html-to-text — is a dependency of @react-email/render, but importing render directly anywhere does not cause the same error when building. After testing this on the latest canary for next´the issue goes away in any of the cases I mentioned, therefore seems to me that https://github.com/vercel/next.js/issues/60807 fixes this.
If anyone wants to upgrade to Next 15's canaries, you also need to upgrade your React and React Email dependencies accordingly. So, upgrade your React Email dependencies to the canaries we have, which also support React 19 directly.

Closing this issue as Next 15 has been out for a while, and since the issue is not on our side.


How do I change the state component of the asyncValidate?

I have an issue with non-standard validate of the phone field (input-based). To create a minimum of obstacles to the user, I believe, that any numbers in the field "Phone" are valid.
At the same time, I have to check phone with the server-side by asyncValidate, and if that phone is found - set prop "is_phone_exists" to my input component (for green background color rendering), Another word, after asyncValidate, I must send in my component of few props:

phone == "": input.valid is false, "is_phone_exists" is false
phone == "123": input.valid is true, "is_phone_exists" is false
phone == "+16504442233": input.valid is true, "is_phone_exists" is true.

How do I send an additional prop in my component? What's right way for it?
it would be good to have the feature to change the value and add any custom props for the Field in asyncValidate functions. :)

Wow! The new "warn" function is answer to my question. Thank you!


Update README.md

DO NOT MERGE

validated build works as expected https://dev.azure.com/b3ngr33ni3r/browserd/_build/results?buildId=175


Fix NFS latency causing denied permissions (#1073)

Description
Changed how .jobfinished, .jobscript and .jobfailed files are removed. On NFS systems with considerable latency, in edge cases these files would show as existing but not writable and could not be removed (see #1073). This PR addresses that by wrapping the removal of the files in a try/except that forces write permissions if the removal fails.
I do not think this behavior is currently covered by a test. Likely it should not be anyway, given that it is a difficult-to-reproduce error. However, in the environment I worked in, this error occurred once every ~1500 steps in short running steps (5-15 s) and caused considerable headache. With this fix, 10,000 steps of the same pipeline ran through without issue.
QC

[ ] The PR contains a test case for the changes or the changes are already covered by an existing test case.
[x] The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

Unfortunately the issue popped back up even with this proposed change. I will investigate further and report back, but will depend on the condition to occur as I am still lacking a reproducible example.

As mentioned in #1073 I have not been able to reproduce this issue again and likely will not be able to anytime soon. But since the fix in this PR did not completely solve the issue I would recommend against merging the changes. My apologies I could not be of more help.

Ok, thank you!

Closing this for now.


go-mode gofmt error

Error message is:
File mode specification error: (invalid-function (gofmt-before-save t ws-butler-before-save))

Could you provide a backtrace for this error? i.e.

M-x toggle-debug-on-error
Trigger the error again
Copy the contents of the backtrace buffer into pastebin and post the link here.

https://pastebin.com/6uhTT9Ai

This backtrace suggests you have this in your config:
(add-hook 'go-mode-hook #'gofmt-before-save nil t)

Let me know if that isn't the case, but if it is, remove it and:

Enable the :editor format module
Add (add-hook 'go-mode-hook #'+format|enable-on-save) to your config.el

OR
Use this instead:
(add-hook 'before-save-hook #'gofmt-before-save)

But then this would defeat the purpose of lazy-loading.

Yes, it works fine now,Thank you.


Rename "chat bots" to "assistants"

This issue tracks rebranding chat bots as assistants, which is consistent with OpenAI's naming conventions.
As part of this, we should also rename the "Agents" namespace to Assistants ("agent" is a misnomer, and we might decide to use it for something else later).

@aishwaryabh, @cgillum  Can we close this issue now?

Yes! This was done as part of https://github.com/Azure/azure-functions-openai-extension/pull/35. Closing.


Clean up "default" service port handling.

See #983 for context.  Builds on #4800 (though that's not required, if we decide we don't like the name)

Also see #3838, for the motivation for using the service port, if the ports list on the pod is empty.

LGTM. @brendandburns did you run e2e tests?

Ok, removed the field rename, since @thockin says he's doing it as part of his refactor.

Will review this today
On Thu, Feb 26, 2015 at 11:45 AM, Brendan Burns<EMAIL_ADDRESS>wrote:

Ok, removed the field rename, since @thockin https://github.com/thockin
says he's doing it as part of his refactor.
--
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/pull/4801#issuecomment-76253869
.

Yes, ran e2e, everything passed except cAdvisor, since I was sync'd to a time when that test was broken, I believe that fail is unrelated to this PR.  I can rebase and re-run if you would like me to.

@thockin ping for review ;)

I do not understand this, I find the logic a bit twisty.
What is the meaning of the new "default" magic?
This is a semantic change and not strictly compatible.  If we're going to break compat, let's just go all the way and say that if you don't specify a ContainerPort you get the ServicePort, full stop.  No "default" magic..

The thing about "default" is that you actually won't break compat for 99.9% of use cases, since they only have a single port anyway.
The logic is actually pretty straightforward:
If you name a port, you get that port, or an error if it doesn't exist.
If you don't name a port:
If the pod has no ports, you get the service port on that pod
If the pod has one port, you get that port
If the pod has multiple ports, you get the one with no name, or the name of "default"
I think that this is actually a good compromise that will provide compat to 99% of existing users, while moving to something more sane and explicable.

On Tue, Mar 3, 2015 at 2:19 PM, Brendan Burns<EMAIL_ADDRESS>wrote:

The thing about "default" is that you actually won't break compat for 99.9% of use cases, since they only have a single port anyway.
The logic is actually pretty straightforward:
If you name a port, you get that port, or an error if it doesn't exist.
If you don't name a port:
If the pod has no ports, you get the service port on that pod

This covers a corner case that was not covered before, so I'm in favor.

If the pod has one port, you get that port

This is current behavior, agreed.

If the pod has multiple ports, you get the one with no name, or the name of "default"

It's the last part that I don't get.  Why?  Why is ["default"] better
than [0] ?  It adds a special case and code to support it to solve a
problem that I don't think exists - is there somewhere that people
complain about [0] being bad?
Especially if I get my own wish and we just simplify to "If you don't
name a destination port, you get the service port on that pod" which
makes all of the "default" stuff go away.

We have a bug open to make the port handling cleaner, I'd prefer to merge
this pr, close that bug and the rip it out again if your code lands, than
wait.  But I don't feel super strongly about it.  I would def. like to fix
the no ports on the pod case.
Brendan
On Mar 3, 2015 2:53 PM, "Tim Hockin"<EMAIL_ADDRESS>wrote:

On Tue, Mar 3, 2015 at 2:19 PM, Brendan Burns<EMAIL_ADDRESS>wrote:

The thing about "default" is that you actually won't break compat for
99.9% of use cases, since they only have a single port anyway.
The logic is actually pretty straightforward:
If you name a port, you get that port, or an error if it doesn't exist.
If you don't name a port:
If the pod has no ports, you get the service port on that pod

This covers a corner case that was not covered before, so I'm in favor.

If the pod has one port, you get that port

This is current behavior, agreed.

If the pod has multiple ports, you get the one with no name, or the name
of "default"

It's the last part that I don't get. Why? Why is ["default"] better
than [0] ? It adds a special case and code to support it to solve a
problem that I don't think exists - is there somewhere that people
complain about [0] being bad?
Especially if I get my own wish and we just simplify to "If you don't
name a destination port, you get the service port on that pod" which
makes all of the "default" stuff go away.
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/pull/4801#issuecomment-77056743
.

Could we keep the no-ports case here and just drop the "default" stuff?
On Tue, Mar 3, 2015 at 3:05 PM, Brendan Burns<EMAIL_ADDRESS>wrote:

We have a bug open to make the port handling cleaner, I'd prefer to merge
this pr, close that bug and the rip it out again if your code lands, than
wait. But I don't feel super strongly about it. I would def. like to fix
the no ports on the pod case.
Brendan
On Mar 3, 2015 2:53 PM, "Tim Hockin"<EMAIL_ADDRESS>wrote:

On Tue, Mar 3, 2015 at 2:19 PM, Brendan Burns<EMAIL_ADDRESS>wrote:

The thing about "default" is that you actually won't break compat for
99.9% of use cases, since they only have a single port anyway.
The logic is actually pretty straightforward:
If you name a port, you get that port, or an error if it doesn't exist.
If you don't name a port:
If the pod has no ports, you get the service port on that pod

This covers a corner case that was not covered before, so I'm in favor.

If the pod has one port, you get that port

This is current behavior, agreed.

If the pod has multiple ports, you get the one with no name, or the
name
of "default"

It's the last part that I don't get. Why? Why is ["default"] better
than [0] ? It adds a special case and code to support it to solve a
problem that I don't think exists - is there somewhere that people
complain about [0] being bad?
Especially if I get my own wish and we just simplify to "If you don't
name a destination port, you get the service port on that pod" which
makes all of the "default" stuff go away.
—
Reply to this email directly or view it on GitHub
<
https://github.com/GoogleCloudPlatform/kubernetes/pull/4801#issuecomment-77056743

.

—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/pull/4801#issuecomment-77058808
.

I ripped out the default port stuff.  I will reming @thockin that he suggested that port[0] was confusing in the first place.
Given the feedback on this PR, I'm going to close #983 as WAI, if we want to kill named ports we can do that with a different issue.

For the sake of progress I'm going to roll with this, though I am not sure why you classify the case of default port (not specified) and multiple ports on a pod as an error?
Yes the [0] semantic is confusing and awful, I still think that.  My main argument is that if we change the semantic at all we should just change it to what we really want, which I think is to default it to service.port.  v1beta3 makes this change, but v1beta1 and 2 retain the old semantic.


Update documentation

@cying111, I have added the condition column and changed stringtie to stringtie2.

maybe we can some more for example

add the transcript quant step to the pipeline summary,and the different expression analysis step but for this step maybe mentioning that this is conditional when multiple samples are provided?
documentation 4. output and how to interpret results, maybe can add in the description on results when bambu and stringtie2 are used, as well as differential expression analysis results

better to go through the documentation in details to see what else could be added, given that we have added a very big component to the pipeline, it's better to be very explicit.


Edited grammar and presentation

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[x] My changes do not use shortened URLs or affiliate links.

Closes #XXXXX

Hi @thedowntownerd since you have made the pull requests from master its now in a soiled state and cant be merged as is. Please seek help in our contributors chat room


Run-time deps of build-time deps aren't available to builds

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

[x] are reporting a bug others will be able to reproduce and not asking a question. If you're not sure or want to ask a question do so on our Discourse: https://discourse.brew.sh
[x] ran a brew command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula (not cask) please file this issue at Homebrew/homebrew-core: https://github.com/Homebrew/homebrew-core/issues/new. If it's a brew cask problem please file this issue at https://github.com/caskroom/homebrew-cask/issues/new. If it's a tap (e.g. Homebrew/homebrew-php) problem please file this issue at the tap.
[x] ran brew update and can still reproduce the problem?
[x] ran brew doctor, fixed all issues and can still reproduce the problem?
[ ] ran brew config and brew doctor and included their output with your issue?

To help us debug your issue please explain:

What you were trying to do (and why)

use depends_on "opam" => :build and not also have to use depends_on "aspcud" => :build

What happened (include command output)

aspcud is not available to the build unless aspcud is itself added as a build-time dependency, even though it's a run-time dependency of opam.

What you expected to happen

/usr/local/opt/aspcud/bin to be in the PATH

Step-by-step reproduction instructions (by running brew commands)

iMac-TMP:homebrew-core joe$ git diff -- Formula/corectl.rb
diff --git a/Formula/corectl.rb b/Formula/corectl.rb
index d21c3c9..5f168d7 100644
--- a/Formula/corectl.rb
+++ b/Formula/corectl.rb
@@ -22,6 +22,7 @@ class Corectl < Formula
   depends_on :macos => :yosemite

   def install
+raise "PATH: #{ENV["PATH"]}"
     ENV["GOPATH"] = buildpath

     path = buildpath/"src/github.com/TheNewNormal/#{name}"
iMac-TMP:homebrew-core joe$ brew install -s corectl
==> Downloading https://github.com/TheNewNormal/corectl/archive/v0.7.18.tar.gz
Already downloaded: /Users/joe/Library/Caches/Homebrew/corectl-0.7.18.tar.gz
Error: PATH: /usr/local/Homebrew/Library/Homebrew/shims/super:/usr/local/opt/go/bin:/usr/local/opt/ocaml/bin:/usr/local/opt/aspcud/bin:/usr/local/opt/opam/bin:/usr/bin:/bin:/usr/sbin:/sbin
iMac-TMP:homebrew-core joe$ brew edit corectl
Editing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/corectl.rb
Warning: Using vim because no editor was set in the environment.
This may change in the future, so we recommend setting EDITOR,
or HOMEBREW_EDITOR to your preferred text editor.
iMac-TMP:homebrew-core joe$ git diff -- Formula/corectl.rb
diff --git a/Formula/corectl.rb b/Formula/corectl.rb
index d21c3c9..17fba92 100644
--- a/Formula/corectl.rb
+++ b/Formula/corectl.rb
@@ -17,11 +17,11 @@ class Corectl < Formula
   depends_on "go" => :build
   depends_on "libev"
   depends_on "ocaml" => :build
-  depends_on "aspcud" => :build
   depends_on "opam" => :build
   depends_on :macos => :yosemite

   def install
+raise "PATH: #{ENV["PATH"]}"
     ENV["GOPATH"] = buildpath

     path = buildpath/"src/github.com/TheNewNormal/#{name}"
iMac-TMP:homebrew-core joe$ brew install -s corectl
==> Downloading https://github.com/TheNewNormal/corectl/archive/v0.7.18.tar.gz
Already downloaded: /Users/joe/Library/Caches/Homebrew/corectl-0.7.18.tar.gz
Error: PATH: /usr/local/Homebrew/Library/Homebrew/shims/super:/usr/local/opt/go/bin:/usr/local/opt/ocaml/bin:/usr/local/opt/opam/bin:/usr/bin:/bin:/usr/sbin:/sbin
iMac-TMP:homebrew-core joe$

I'll just add that dev-cmd/audit encourages BUILD_TIME_DEPS like cmake and pkg-config to be marked explicitly as :run if they are needed at both build and run-time, so I agree that this should be fixed.

This is (was?) a feature, see 2fb5ead38a7632ff6f941909474767883a9e0252

Misfeature.


chore: speed up ci

:tada: This PR is included in version 0.0.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Allow to use a pool of connection to PostgreSQL

UeberDB currently use only one connection to PostgreSQL, which is insufficient for our high-traffic Etherpad instances.
This commit include a bump of pg dependency version and a new db connector, postgrespool.
It has been tested in production on several instances, one of it hosting more than 44,000 pads and heavily used.

Ping !

Hi,
using the connection pool is awesome.
The two drivers are really similar: since we already bumped the pg version, shouldn't we simply port the changes in the old driver and remove the duplicated code?
$ diff --ignore-space-change  --unified postgres_db.js postgrespool_db.js

--- postgres_db.js	2017-10-05 00:45:45.977646205 +0200
+++ postgrespool_db.js	2017-10-05 00:45:45.977646205 +0200
@@ -25,8 +25,12 @@
   this.settings.writeInterval = 100;
   this.settings.json = true;

-  this.db = new pg.Client(this.settings);
-  this.db.connect();
+  // Pool specific defaults
+  this.settings.max = this.settings.max || 20;
+  this.settings.min = this.settings.min || 4;
+  this.settings.idleTimeoutMillis = this.settings.idleTimeoutMillis || 1000;
+
+  this.db = new pg.Pool(this.settings);

 }

@@ -179,10 +185,5 @@

 exports.database.prototype.close = function(callback)
 {
-  var _this = this;
-  this.db.on('drain', function() {
-  	_this.db.end.bind(_this.db);
-  	callback(null);
-  });
-
+  this.db.end()
 }