[Android] Handling Permission Appropriately in Jetpack Compose

Handling Permission Appropriately in Jetpack Compose
Introduction
App permissions help support user privacy by protecting access to restricted data such as system state and Restricted actions, such as recording audio.
With Jetpack Compose there are some changes in the approach and how we can request permissions.
Most developers do not handle these permissions correctly. In this article, I will explain the easiest ways in which one can handle single or multiple permissions in the android app at runtime.
Key takeaways

What is permission handling
What are runtime permissions
How to implement single and multiple permissions at runtime

Article quality
This article will focus on showing a learner how to handle permissions correctly and with ease. It will be beginner-friendly to those who are venturing into Jetpack Compose and easy to follow along
References

Permissions Handling in Android

Nice topic. Let's ensure that it adds value to the community. Thanks

Just wanted to follow up on this topic, as we will be clearing up the queue where possible.
Just and FYI I will be closing this topic form just to help clear up the queue where possible - can be REOPENED at anytime when ready. 👍

Hello @hectorkambow . Kindly open this issue. My PR is ready


Fix stacktraces builds

Fix stacktraces in address sanitizer build

Does -fno-omit-frame-pointer has performance impact?
-g ok.

@dcherednik updated.


live555:x86-windows-static build failure

Host Environment

OS: Windows 10
Compiler: revision : VS2019

.\vcpkg.exe install live555:x86-windows-static --head                                  Your feedback is important to improve Vcpkg! Please take 3 minutes to complete our survey by running: vcpkg contact --survey
The following packages will be built and installed:
live555[core]:x86-windows-static (from HEAD)
Starting package 1/1: live555:x86-windows-static
Building package live555[core]:x86-windows-static from HEAD...
Warning: abi keys are missing values:
head
-- Using cached C:/Art/Library/vcpkg/downloads/live555-latest.tar.gz
-- Skipping hash check for C:/Art/Library/vcpkg/downloads/live555-latest.tar.gz.
-- Using source at C:/Art/Library/vcpkg/buildtrees/live555/src/555-latest-9d23023a24
-- Configuring x86-windows-static
-- Building x86-windows-static-dbg
CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:136 (message):
Command failed: C:/Art/Library/vcpkg/downloads/tools/cmake-3.14.0-windows/cmake-3.14.0-win32-x86/bin/cmake.exe --build . --config Debug --target install -- -v
Working Directory: C:/Art/Library/vcpkg/buildtrees/live555/x86-windows-static-dbg
See logs for more information:
C:\Art\Library\vcpkg\buildtrees\live555\install-x86-windows-static-dbg-out.log
Call Stack (most recent call first):
scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process)
scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake)
ports/live555/portfile.cmake:32 (vcpkg_install_cmake)
scripts/ports.cmake:94 (include)
Error: Building package live555:x86-windows-static failed with: BUILD_FAILED
Please ensure you're using the latest portfiles with .\vcpkg update, then
submit an issue at https://github.com/Microsoft/vcpkg/issues including:
Package: live555:x86-windows-static
Vcpkg version: 2019.09.12-nohash
Additionally, attach any relevant sections from the log files above.
C:\art\Library\vcpkg [master ≡]>
I was wondering if anybody could help me with this issue?

Hi @Silphium thanks for posting this issue.
This issue has been fixed now. Please try to update vcpkg and rebuild it.


EditorNode::show_warning displays a console warning during project loading

Simple solution to handle cases where we're trying to show a warning dialog during project loading. I don't know if there could be a way to actually have a dialog box at that time.
Fixes #31522

Thanks!


Calico would really like separate ETCD cluster

For performance and access reason, calico would like its own etcd cluster.

Hello @galthaus, i'll work on it when i'll split the network plugins in roles #114
Indeed, We should give the option.

I think  to create a group
[calico-etcd]
calico-etcd-1
calico-etcd-2
calico-etcd-3
```

and use this group in the role calico instead of the group `etcd`

And to continue to use the kubernetes etcd the configuration is simple:

```
[calico-etcd:children]
etcd
```

That's what i'm going to do, thanks @ant31

@galthaus could you please let me know what are the performance issues you're talking about ?

Do you think this issue is still relevant @galthaus ?

I think it is still a problem as pointed out by the calico team.  Whether
we fix it in this env is a different issue.
I actually think there are a couple of ways to fix or address it.  I think
it is probably a scale deployment thing.
On Thu, Apr 21, 2016 at 7:20 AM, Smaine Kahlouch<EMAIL_ADDRESS>wrote:

Do you think this issue is still relevant @galthaus
https://github.com/galthaus ?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/kubespray/kargo/issues/119#issuecomment-212889504

I'd very much love to have a separate etcd cluster for both Calico and Flannel..
This is a blocker for my infrastructure.

Calico and Flannel have experimental support for using k8s annotations instead of etcd as backend. I hope to take a look at it soon.
As far as a separate etcd cluster, I don't think we'll do it right now, but we could create an overridable var for network_plugin_etcd_access_endpoint, which would default to etcd_access_endpoint.

So that'd be an external_etcd support in the 1st implementation step, right?
What is the etcd cluster to store configs, f.e. "Flannel | Set Flannel etcd configuration" task? The main one or the separated one?

Could we use CoreOS 's etcd Operator??
On Fri, Nov 25, 2016, 9:21 AM Bogdan Dobrelya<EMAIL_ADDRESS>wrote:

So that'd be an external_etcd support in the 1st implementation step,
right?
What is the etcd cluster to store configs, f.e. "Flannel | Set Flannel
etcd configuration" task? The main one or the separated one?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kubernetes-incubator/kargo/issues/119#issuecomment-262965869,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAFs8MgD_GV1Hd0RL4SUl-p8JXLt05dBks5rBu7pgaJpZM4HPS6A
.

@abourget in order to create an operator, the cluster must have networking configured. A tricky deployment case would that be, wouldn't that?

So what is the progress of this ticket? How can I set a separate etcd cluster for calico ?


Find a way to allow for "watch -d qtop" visualization WITH color

as discussed, watch -d -c exists only on some systems (certainly not rhel6*), so this is still valid

-c AUTO should autodetect controlling terminal. Otherwise, -c ON and -c OFF as options

this is implemented via #85


Apply initial user settings once FaceModule object got created.

BUG=XWALK-6635

Hi, @huningxin , would you PTAL? Thanks~
'Start' button click will do:
1, navigator.mediaDevices.getUserMedia() to get stream.
2, new FaceModule() to create FaceModule object.
3, apply user settings on FaceModule object.
4, start FaceModule pipeline.
5, get FaceModule configurations and populate them to UI.

realsense/face/js/face_api.js change is another minor bug fix by the way.

LGTM. Thanks!


[DDW-715] Enter key not working on send

This PR CHANGES.
Todos

[x] Rewrite handleSubmitOnEnter function

Testing Checklist

[ ] Test

Test Scenarios
Scenario 1: Pressing Enter key displays 'Confirm Transaction' dialog
Given I am on Wallet Send tab
And the wallet has sufficient ADA for transaction
And the fields 'Receiver' and 'Ada' have been correctly filled
When the focus is on ('Receiver' | 'Ada' | 'Send button')
And I press the 'Enter' key
Then 'Confirm Transaction' dialog is displayed
And there is no error displayed on Console

Review Checklist
Basics

[x] PR has been assigned and has appropriate labels (feature/bug/chore, release-x.x.x)
[x] PR is updated to the most recent version of the target branch (and there are no conflicts)
[x] PR has a good description that summarizes all changes
[x] PR has default-sized Daedalus window screenshots or animated GIFs of important UI changes:

[x] In English
[x] In Japanese

[x] CHANGELOG entry has been added to the top of the appropriate section (Features, Fixes, Chores) and is linked to the correct PR on GitHub
[x] Automated tests: All acceptance and unit tests are passing (yarn test)
[x] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in development build (yarn dev)
[x] Manual tests (minimum tests should cover newly added feature/fix): App works correctly in production build (yarn package / CI builds)
[x] There are no flow errors or warnings (yarn flow:test)
[x] There are no lint errors or warnings (yarn lint)
[x] There are no prettier errors or warnings (yarn prettier:check)
[x] There are no missing translations (running yarn manage:translations produces no changes)
[x] Text changes are proofread and approved (Jane Wild / Amy Reeve)
[x] Japanese text changes are proofread and approved (Junko Oda)
[x] UI changes look good in all themes (Alexander Rukin)
[x] Storybook works and no stories are broken (yarn storybook)
[x] In case of dependency changes yarn.lock file is updated

Code Quality

[x] Important parts of the code are properly commented and documented
[x] Code is properly typed with flow
[x] React components are split-up enough to avoid unnecessary re-renderings
[x] Any code that only works in main process is neatly separated from components

Testing

[ ] New feature/change is covered by acceptance tests
[ ] New feature/change is manually tested and approved by QA team
[ ] All existing acceptance tests are still up-to-date
[ ] New feature/change is covered by Daedalus Testing scenario
[ ] All existing Daedalus Testing scenarios are still up-to-date

After Review

[ ] Merge the PR
[ ] Delete the source branch
[ ] Move the ticket to done column on the YouTrack board
[ ] Update Slack QA thread by marking it with a green checkmark

For now the Fix looks good. However I would give it one more run after all the code changes are done. 👍


update README.md

Hello, Thanks for sharing the results of your research!
This PR updates the script file name in README.md.
Best regards.

Thanks for your suggestion! Now update!


Errors compiling minimal example: "undefined reference to pthread_create" and "undefined reference to `dlopen'" (and my fixes)

Hi,
Compiling webui worked instantly, but compiling the minimal example gave me these errors:
Build C Example (gcc release static)...
/usr/bin/ld: home/vince/lisp-projects/webui/examples/C/minimal//../../..//dist/libwebui-2-static.a(webui.o): in function `_webui_show_window':
webui.c:(.text+0x9c03): undefined reference to `pthread_create'
/usr/bin/ld: webui.c:(.text+0x9c0f): undefined reference to `pthread_detach'
/usr/bin/ld: webui.c:(.text+0x9daf): undefined reference to `pthread_create'
/usr/bin/ld: webui.c:(.text+0x9dbb): undefined reference to `pthread_detach'

[…]

/usr/bin/ld: /home/vince/lisp-projects/webui/examples/C/minimal//../../..//dist/libwebui-2-static.a(webui.o): in function `_webui_wv_show':
webui.c:(.text+0xce4e): undefined reference to `dlopen'
/usr/bin/ld: webui.c:(.text+0xcec6): undefined reference to `dlopen'
/usr/bin/ld: webui.c:(.text+0xcf1e): undefined reference to `dlsym'

I found a combinaison of characters in the Makefile that makes the compilation succeed and the example run:
# in examples/minimal/GNUMakefile
# BUILD FLAGS
# STATIC_BUILD_FLAGS = main.c -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
STATIC_BUILD_FLAGS = main.c  -Wl,--no-as-needed -ldl  -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
# DYN_BUILD_FLAGS = main.c -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
DYN_BUILD_FLAGS = main.c  -Wl,--no-as-needed -ldl  -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"

[…]

else
	# STATIC_BUILD_FLAGS += -lpthread -lm -l$(WEBUI_LIB_NAME)-static
	STATIC_BUILD_FLAGS +=  -lm -l$(WEBUI_LIB_NAME)-static -lpthread
	# DYN_BUILD_FLAGS += -lpthread -lm
	DYN_BUILD_FLAGS += -lm -lpthread

-lpthread is moved last and I added -Wl,--no-as-needed -ldl (source: first SO answers).
minimal example: ./main runs but takes 100% CPU, ./main-dyn segfaults, both binaries of the text editor run.

I am on an oldish system:
Mint 20 LTS (Ubuntu Focal), x64
gcc 9.4.0

kuddos for the work.

This is on main/nightly right?
Likely a dup of #379

indeed, nightly branch, commit from May 28th a54d906 main origin/main nightly Fix GC WebView2.

I pulled master ("4466bcf main origin/main Update webui_get_best_browser description") and I was having the same error messages when compiling the minimal example, but now I only need to add -Wl,--no-as-needed -ldl:
-STATIC_BUILD_FLAGS = main.c -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
-DYN_BUILD_FLAGS = main.c -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"
+STATIC_BUILD_FLAGS = main.c  -Wl,--no-as-needed -ldl  -I"$(INCLUDE_DIR)" -L"$(LIB_DIR)"


Add android xml example and start.sh

Hello, I am very pleased with this project. May I contribute a few small additions at this time?

I added Android XML to the example project.
I also created a script for a new project using Amper, based on projects in the examples folder.

Thank you very much.

@utsmannn thanks for the contribution. Could you explain the purpose of the example project?

Sorry, I didn't mean to close it. It happened automatically due to the default branch change. If we decide to proceed, the changes have to be made on top of 0.1 instead of main. Sorry for the inconvenience.


TPI: Dynamic Run Unittest

Refs: https://github.com/microsoft/vscode-python/issues/21149

[x] macOS @lramos15
[ ] linux @rzhao271
[ ] windows @amunger
Complexity: 4

Author: @eleanorjboyd
Create Issue

Prerequisites:
Use the following repo of tests or use your own repo of unittest https://github.com/eleanorjboyd/inc_dec_example_repo
Background Information:
This rewrite is for the underlying infrastructure of how python handles testing therefore all behavior visible to the user should be pretty much the same (minus maybe some error logs going in a better place or test names shortened). Therefore throughout this testing, you can reference the current testing in Python to compare if you think something doesn't look right (or you can always post here too!).
Steps:
Part 0: Setup

make sure you have the setting "python.experiments.optInto": ["All"]
Open the inc_dec_example_repo/inc_dec_example_test_suite  testing repo folder in vscode
Use the create environment command from the command palette, select venv and whatever python version you want >=3.7
From the command palette run python: configure tests select unittest and "." (root directory) and test_*.py

Part 1: UI Nesting & Run

Go to the testing explorer, and confirm all the tests are discovered

Part 2: Debugging

add some break points to the unittest tests and check to make sure these break points are hit
make sure you can do other normal debugging actions (stop, restart, step over, etc)

Part 3: Large Files

change for i in range(0, 100): in test_subtest.py to be much larger like i in range(0, 10000): and make sure it both works for discovery and run tests (tests should be displayed on the test explorer after discovery and run)

Part 4: Seeing Dynamic Run

Expand the testing explorer UI to see all the nodes (especially test_two_classes.py which has a wait inside one of its tests)
Click run all and make sure that you are seeing the nodes on the test UI finish at different times (ie they don't all resolve together, like some are still spinning while others are complete with a check or an x)

I had to delete the __pycache__ files locally from the repo if anyone else runs into that issue as well.

I had to delete the __pycache__ files locally from the repo if anyone else runs into that issue as well.
Sorry about this- will push an update to the repo

Secondly, this repo requires pytest so I just updated the directions to include installing pytest. This is a requirement for the example repo but not for using unittest in general. (thank you @lramos15 and @lramos15 for pointing this out!)
Thanks!


"Warning: unmountComponentAtNode()" when external window is open

If there is an external window open, reloading the browser triggers an error which will log two errors to the console:
react-dom.inc.js:526 Warning: unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.
router.cljc?rel=1553207189704:204 Uncaught Invariant Violation: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops

The external 10x window is now non-functional, so reloading the browser a second time will load the app without errors and re-attach to that window.
It seems like there is some state hanging around between browser reloads which causes this, although that might be a red herring.
cc: @stumitchell

@danielcompton as a stop gap measure, I was able to address this issue by adding (reagent.core/force-update-all) to the init function in our cljs that sets up our app. Prevents the warning and the non-functional 10x window on every other reload, but does have the side effect of pinning the 10x window again.

I tried fixing that on the consumer lvl by catching an unload event with hope for clearing the faulty state. No luck :/
Call me silly, but for the time being, I just hide 10x whenever I have to see something that 10x overlaps in the regular view.
document.getElementById("--re-frame-10x--").style.display = "none";
and to show it again:
document.getElementById("--re-frame-10x--").style.display = "initial";


SecurityUtilities.SignFile: NullReferenceException when the supplied certificate has no private key.

Calls to SecurityUtilities.SignFile referencing a certificate that does not include a private key result in a very non-specific NullReferenceException. This would be easier for the caller to fix if a more useful message were provided.
Based on what's already thrown from that method, I would suggest something like an InvalidOperationException with the message: "MSB3487: The signing certificate does not include private key information."

MSBuild triage: sounds good


My project does not have a left arrow and a right arrow

hi sir , i installed ur library , everything is okay but i dont see 2 arrows . i added ur code in https://brainhubeu.github.io/react-carousel/docs/examples/defaultArrows but still havent arrows . so could u solve me this issue ??
my project : https://github.com/dquanghuy4444/poshop-mobilestore
thank u so much

+1

Same here, any plugin works for me

Ok, just found out here that the npm install is pointing to the v1, that's why it isn't working, the docs are showing the v2 but not telling people to force the install!
Just to be sure that you're in v1, try this and you'll see the arrows:
<Carousel arrows>

</Carousel>

Install the v2 and use the docs version and it should work!
npm i<EMAIL_ADDRESS>

Ok, just found out here that the npm install is pointing to the v1, that's why it isn't working, the docs are showing the v2 but not telling people to force the install!
Just to be sure that you're in v1, try this and you'll see the arrows:
<Carousel arrows>

</Carousel>

Install the v2 and use the docs version and it should work!
npm i<EMAIL_ADDRESS>

ok sir , it's work . thanks u <3


spaLoadingTemplate = false is not honored

Environment

Operating System: Darwin
Node Version:     v16.15.0
Nuxt Version:     3.6.0
Nitro Version:    2.5.1
Package Manager<EMAIL_ADDRESS>Builder:          vite
User Config:      ssr, modules, nitro, spaLoadingTemplate, app, i18n, alias, vite, css, postcss, build
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
In nuxt.config.ts
set spaLoadingTemplate: false
ssr:false
Describe the bug
The spaloading page is shown even when spaLoadingTemplate is set to false
Additional context
No response
Logs
No response

Same here, still seeing it after disabling.

Apologies. This should be resolved in https://github.com/nuxt/nuxt/pull/21739.

@danielroe I updated to the newest version but this screen still shows on first render. Is this not this option?

No, that's just the dev loading screen.

@danielroe Upon further reflection, this "dev loading screen" was what I thought spaLoadingTemplate: false would get rid of, along with the production loader. Maybe the docs could reflect that this only takes effect in production builds?

you're right - that is not related to the spaLoadingTemplate.


Translate: React Without JSX

Translate: React Without JSX

Assign me

Please, do not create new issues for claiming translations. Issue #4 is the right place to do that.


[GroupFilters] translate filter checkbox text

add localization to Group Filters Component

This needs to be changed in the backend.
See #204.

Can you change or translate "non-binary" to "divers" in the group administration? @JonasGilg

Can you change or translate "non-binary" to "divers" in the group administration? @JonasGilg

As the biological gender is meant we probably should change it to "intersex". We also should change the group title to "biological gender" or "biological sex" to make that more clear.

Will the incoming data have the same classification of "biological gender"? We are not sure about the data from the LHAs if its the case.

Maybe this is something to ask the LHAs. But my intuition tells me, that health related data works with biological gender.

@JonasGilg in Sormas for example the gender of cases was not specifically reported as biological gender


fix(client): increment cert. month adding sharing to LinkedIn

Checklist:

[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 main branch of freeCodeCamp.
[x] All the files I changed are in the same world language, for example: only English changes, or only Chinese changes, etc.

Closes #40971

@raisedadead , I agree. Thanks for the input. I'll check and update.


Route set up

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[ ] Test A
[ ] Test B

Test Configuration:

Firmware version:
Hardware:
Toolchain:
SDK:

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

Thanks for the PR. Can you please mention the description of this PR & if it was tested in the browser?

There are new requirements for the Route.
We would be having:
Left Nav:

Users
Flags
Segments
Environment switching
Account settings

and then within the pages, we will have:

Create a flag
Delete a flag
Edit a flag

Closing this PR as a new PR #64 is raised


connector-github-notification is broken

Hi there,
I've spent a couple of hours trying to run this demo with limited success. Would it be possible for someone to update it to make sure it works? I realise you have a lot of things to do without this, but it's probably a rather trivial task for you. And it's a huge task for many users who are not familiar with the Teams setup.
Some of the issues I encountered:

The manifest.json is incorrect. It produces errors when trying to side-load it. (Of the "Manifest parsing failed" variety)
"Zip manifest.json file and sideload to any team" option results in githubconnector.azurewebsites.net app being used, not local ngrok, even though I updated urls in default.json. Probably because the config url is associated with the connector id, it does not come from the manifest.
When I go for the "Alternative you can set your own connector" option, I manage to access the config page from Teams ("Continue to authenticate to Github"), click "continue" and nothing else happens. Just a blank page. See the screenshot:

This is the part I was unable to get past.
With the githubconnector.azurewebsites.net option, I was able to get slightly farther, but it failed without explanation during the configuration process too.

Some minor issues:

Broken link https://msdn.microsoft.com/en-us/microsoft-teams/connectors
Broken link aka.ms/teamsdocs
Mentioning mongodb setup in the readme would've been nice, for those new to it. ("Download and install mongodb, change connection string to mongodb://localhost/test")
I would also appreciate basic instructions on how to test this, how to know if it's working.

@nikitar - could you please try following the steps mentioned here?
https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/connector-generic/nodejs

Thanks for the response @Wajeed-msft, I did get that one working for the most part. It does not offer an example of direct integration, however. It is just a configuration page with instructions about how to connect a single channel to a single form. And ms forms already support connectors. I was interested in how direct integration (particularly auth) with a third-party service (like github) would work.

If you need to authenticate the user as part of loading your page in step 2 above, refer to this link for details on how you can integrate login when your page is embedded.
Here is sample  which shows auth flow implemented with AAD. I'll move this to main repo.

We are closing this issue for now, Please feel free to reopen it, if required.


K8s container operations based on k8s runtime events

Fixed the bugs in containers implementation:

the container listened to graph events and used pod.K8s.Spec.Containers field to add/update/delete containers (rather than using the k8s runtime v1.Pod objects)
the pod objects had the entire container metadata within them - making them needlessly large

Enabling details_enabled basically breaks the history. I don't think we should offer the user this option

@hunchback Sorting the keys by alphabetical order and keeping details_max_fields fields makes no sense : what if the important keys starts with an 'S' ? We are not going to merge such a mechanism

Enabling details_enabled basically breaks the history. I don't think we should offer the user this option

This field currently breaks two things:

the history (handling disabling indexing in a separate PR)
display on UI exposing a race condition to to graph.node payload size which make some of the nodes/edges not to pass to the UI
So disabling this by default is needed as an immediate fix to  k8s (addressing at least one issue) - once the above we can change the default behavior back.

We have not removed the entire details fields now as:

this feature is needed - and will be re-enabled once above fixed
its' mandatory for development of k8s (all development depends on it)

@hunchback Sorting the keys by alphabetical order and keeping details_max_fields fields makes no sense : what if the important keys starts with an 'S' ? We are not going to merge such a mechanism

The important fields will be moved (as discussed):

details will reside under toplevel.K8s.Extra
important fields reside under toplevel.K8s
It more serving to protect against very large Extra fields (which may hurt elasticsearch; network; storage) -  this PR ensures that no actual logic is based on the content of this field. As to sorting - given that go maps are randomized - all this ensures is that result of pruning is consistent

run skydive-functional-tests-backend-elasticsearch

run skydive-k8s-tests

run skydive-k8s-tests

ok, let me know if you find a reasonable solution soon.
On Wed, Oct 31, 2018, 23:19 Sylvain Baubeau<EMAIL_ADDRESS>wrote:

@lebauce commented on this pull request.
In topology/probes/k8s/container.go
https://github.com/skydive-project/skydive/pull/1426#discussion_r229871862
:

}

-func (p *containerProbe) Stop() {

p.graph.RemoveEventListener(p)
+func newContainerProbe(clientset *kubernetes.Clientset, g *graph.Graph) Subprobe {

return newContainerCache(clientset.CoreV1().RESTClient(), &v1.Pod{}, "pods", g)

I will try to take a deeper look at how this can be done. But there can be
a lot of pods in a Kubernetes cluster so indexing all the pods twice just
to create the containers attached to the pods is probably overkill
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/skydive-project/skydive/pull/1426#discussion_r229871862,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACogI_ia3n5c9UsVnmqeCqCXywbvJl7fks5uqhP4gaJpZM4X_Fik
.

@lebauce - regarding the proposed optimization (for merging k8s requests for both pod and container) - I have not found a reasonable technical solution (which does not require chaining of requests). I would be happy we move forward with this PR. And if in the future and extra connection to the k8s API server (which is anyway happening within the host) then we can consider optimizing which may anyway require other means.

@hunchback I can't think about at least 2 implementations for this:
https://github.com/lebauce/skydive/commit/50b2e3fd09f4932acef1cc6b84691785247d106d
or
https://github.com/lebauce/skydive/commit/148ef7d01475b4fe6692183d9f88f189dd633aa2

@hunchback We already discussed about performance vs style. We will (almost) always prefer a fast/low memory implementation to a nice but slow/hugh memory one. This is simply not acceptable to index twice all the pods in a cluster but because we can't think of an elegant solution

ok, will look farther
On Tue, Nov 6, 2018, 16:04 Sylvain Baubeau<EMAIL_ADDRESS>wrote:

@hunchback https://github.com/hunchback We already discussed about
performance vs style. We will (almost) always prefer a fast/low memory
implementation to a nice but slow/hugh memory one. This is simply not
acceptable to index twice all the pods in a cluster but because we can't
think of an elegant solution
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/skydive-project/skydive/pull/1426#issuecomment-436263466,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACogI6yAXdfWwbWstzCfrRjnIktmNN6Xks5usZb8gaJpZM4X_Fik
.

run skydive-k8s-tests

run skydive-k8s-tests

run skydive-k8s-tests

run skydive-k8s-tests

@lebauce - having trouble running the k8s tests - please have a look

@hunchback It seems the PR broke the TestK8sContainerNode test
http://ci-logs.skydive.network/skydive-k8s-tests/builds/1174/log.html


The test that comparea a set of some-numbers with a set of (cdr some-numbers) fails if the car appears in the cdr

Inside the test set-equality, this form
(is-false (set-eq (apply 'set-insert (cons (empty-set) some-numbers))                     (apply 'set-insert (cons (empty-set) (cdr some-numbers)))))
may fail if the car of some-numbers appears in the cdr of it. Since some-numbers is made of random numbers, that can happen (the probability is around 10%).

Wow that is embarrassing! This should be fixed by 7a99eaaca1f952029def9ad5a2b80a612a712208 which replaces the second set by one with an extra value that's outside the numerical range of the randomly-generated list.


"Sorry, an error occurred while trying to access this service." following fresh deployment

Deployed this fork of the Company Communicator template with our customer and everything went by smoothly until we tried accessing the Authors tab in Teams.

This is after a fresh deployment with new app registrations and Teams app packages. We are accessing the tab via Teams Web in an inPrivate browsing session so there is no cache and we tried re-syncing via the Deployment Center in the App Service.

Seeing 401s when trying to access


add demo or GIF to get view in action

Actually, the project has a sample app. Also, I've added 2 gifs
Thanks a lot for the ideas


sftp with costum port defined in ssh config

Hi,
thanks for this nice restic wrapper. I'm using it on s3 which works fine. I can't however backup via sftp.
I defined my ssh connection, i.e. hostname and costum port in ~/.ssh/config
Restic runs fine, e.g. with restic -r sftp:hostname:/backup/repo backup /backupdir
However, when I call it with restic tools, i.e. with RESTIC_REPOSITORY="sftp:hostname:backup/repo"
I get:
subprocess ssh: ssh: Could not resolve hostname hostname: nodename nor servname provided, or not known
Fatal: unable to open repo at sftp:hostname:backup/repo: unable to start the sftp session, error: EOF

Is this maybe related to this script or do I miss something here? I can't seem to find out. Thanks.

Sorry, my bad. I was calling restic-tools as superuser, which is why I couldnt use the ssh config in my user directory.


POSIX - Consider using "SCHED_RR" instead of "SCHED_FIFO" for realtime threads

Although OSAL defines 256 priority levels (0-255), most typical POSIX systems will have considerably fewer than 256 priority levels for task scheduling.  A typical Linux system offers priority levels ranging from 1 to 99.
To handle this, the POSIX layer combines multiple OSAL priorities into a single POSIX priority bucket, evenly spreading the OSAL range into the available POSIX priority range.
When combined with the SCHED_FIFO policy, this may have unintended consequences in the case that two OSAL tasks are created with priority values that cause them to be mapped into the same POSIX bucket.
To illustrate: consider two OSAL tasks, created with priority levels "1" and "2".  If both get mapped into the same bucket (likely) then the OS will treat them as equal for scheduling purposes.
Assuming the task at priority "2" becomes ready-to-run first, it can use the CPU indefinitely even if the task with priority "1" also becomes ready-to-run.  This is because task 1 will be behind task 2 in the FIFO queue.
Using the round-robin (RR) scheduling policy can be an improvement here, since the kernel will time-slice the two tasks rather than allowing task 2 to indefinitely preempt task 1.
Although there is no ideal solution due to the lower number of actual priority levels in the kernel, the RR policy is arguably a better choice here.

Trac comment by jphickey on 2015-05-12 16:52:47:
Pushed commit [changeset:daba687] for review.

Adds dynamic selection logic to determine whether {{{SCHED_RR}}} or {{{SCHED_FIFO}}} is a better choice for realtime tasks given the number of available kernel priority levels.  {{{SCHED_RR}}} will be preferred when there are fewer than 256 priority levels in the kernel.

Honors a new configuration directive called {{{OSAL_DEBUG_DISABLE_TASK_PRIORITIES}}} which can be added to {{{osconfig.h}}} to completely disable RT threads.  When this is defined, all threads will assume default scheduling as done by the OS.  This can be used to take the scheduling policy completely out for debugging purposes.

Imported from trac issue 45.  Created by jphickey on 2015-05-12T16:43:47, last modified: 2019-04-11T17:11:06

Trac comment by acudmore on 2015-06-01 13:28:45:
With regard to the dynamic selection logic, will there ever be 256 priority levels in a linux kernel?
This sounds like a good place for the linux options section of the osconfig.h file: allow the user to select the scheduling policy SCHED_RR, SCHED_FIFO, default ( or possibly dynamic )

Trac comment by glimes on 2015-05-18 20:29:10:
Current commit seems to be [changeset:503168b]

Trac comment by glimes on 2015-05-18 20:35:44:
Recommend accept.
Looks like more than enough debug info to extract details about
scheduling from the booting system, if there is any questions
about the specific decisions being made.

Trac comment by sduran on 2015-06-01 15:30:48:
Makes sense.  Recommend accept.

Trac comment by jhageman on 2019-04-05 17:31:31:
Commit referenced above no longer exists.  Is this still an issue?

Trac comment by jphickey on 2019-04-11 17:11:06:
I have reviewed this again and it is no longer relevant.  The "posix-ng" implementation already has runtime logic to select FIFO or RR depending on what is available from the host system without needed compile-time config.


Website Contains Broken Links

Website Contains Broken Links
Broken Link Checker found :coffin: links on https://uptane.github.io
View Results

Links to be fixed :

code:    404
url:     https://uptane.github.io/deployment-considerations/glossary.html
parent:  https://uptane.github.io/docs/standard/uptane-standard
error:   Not Found

code:    404
url:     https://WZ6MBDOHOT-dsn.algolia.net
parent:  https://uptane.github.io
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/index.html
parent:  https://uptane.github.io/docs/standard/uptane-standard
error:   Not Found

code:    404
url:     https://uptane.github.io/uptane-standard/uptane-standard.html#create_version_report
parent:  https://uptane.github.io/docs/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/uptane-standard/uptane-standard.html#custom-metadata-about-images
parent:  https://uptane.github.io/docs/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/uptane-standard/uptane-standard.html#build-time-prerequisite-requirements-for-ecus
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/repositories.html#time-server
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/key_management.html
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/normal_operation.html
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/pouf.html
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/reference_pouf.html
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/ecus.html
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/security_considerations.html
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/customizations.html#delta-update-strategies
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://github.com/uptane/uptane.github.io/blob/master/reference_pouf.md#file-formats
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/exceptional_operations.html#rolling-back-software
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/uptane-standard/uptane-standard.html#check_root
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/customizations.html
parent:  https://uptane.github.io/docs/1.2.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/deployment-considerations/repositories.html
parent:  https://uptane.github.io/docs/2.0.0/deployment/best-practices
error:   Not Found

code:    404
url:     https://uptane.github.io/uptane-standard/1.2.0/uptane-standard.html
parent:  https://uptane.github.io/enhancements/pures/pure2
error:   Not Found

code:    403
url:     https://www.scitechnow.org/videos/scitech-now-episode-420/
parent:  https://uptane.github.io/learn-more/press
error:   Forbidden

code:    403
url:     https://rin.org.uk/blogpost/1706945/332376/What-is-spoofing-and-how-to-ensure-GPS-security
parent:  https://uptane.github.io/docs/deployment/best-practices
error:   Forbidden

code:    403
url:     https://knowhow.napaonline.com/how-many-parts-are-in-a-car/
parent:  https://uptane.github.io/docs/2.0.0/deployment/best-practices
error:   Forbidden

code:    400
url:     https://www.googletagmanager.com
parent:  https://uptane.github.io
error:   Bad Request

code:    0
url:     https://uptane.github.io/blog/blog Index 0
parent:  https://uptane.github.io/blog
error:   URL can't contain control characters. '/blog/blog Index 0' (found at least ' ')

Hello, can I work on this?

Hello, can I work on this?

sure @Mikerniker go ahead

Ok ,thanks @Abhijay007
Can you or @hexsecs verify if the new links to add are correct:
Broken Links in Uptane-Standard Section

URL: https://uptane.github.io/deployment-considerations/glossary.html
Parent: https://uptane.github.io/docs/standard/uptane-standard
Location: 2. Terminology  - word: "glossary"
Change to: https://uptane.org/docs/deployment/best-practices#11-glossary

URL: https://uptane.github.io/deployment-considerations/index.html
Parent: https://uptane.github.io/docs/standard/uptane-standard
Change to: https://uptane.github.io/docs/deployment/best-practices
Broken Links in Best Practices Section

URL: https://uptane.github.io/uptane-standard/uptane-standard.html#create_version_report
Parent: https://uptane.github.io/docs/deployment/best-practices
Change to: https://uptane.github.io/docs/standard/uptane-standard#5436-create-and-send-version-report

URL: https://uptane.github.io/uptane-standard/uptane-standard.html#custom-metadata-about-images
Parent: https://uptane.github.io/docs/deployment/best-practices
Location: <IP_ADDRESS>, words: "relevant section of the Standard"
Change to: https://uptane.github.io/docs/standard/uptane-standard#52311-custom-metadata-about-images
Broken Links in Best Practices Section VER 1.2.0

URL: https://uptane.github.io/uptane-standard/uptane-standard.html#build-time-prerequisite-requirements-for-ecus
Parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to:  https://uptane.github.io/docs/standard/uptane-standard#541-build-time-prerequisite-requirements-for-ecus

URL: https://uptane.github.io/deployment-considerations/repositories.html#time-server
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to:  ?

URL: https://uptane.github.io/deployment-considerations/key_management.html
Parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/deployment/best-practices#4-managing-signing-keys-and-metadata-expiration

URL: https://uptane.github.io/deployment-considerations/normal_operation.html
Parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/deployment/best-practices#5-normal-operating-procedures

URL: https://uptane.github.io/pouf.html
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to:   https://uptane.org/enhancements/pouf/pouf-main  ?
10
URL: https://uptane.github.io/reference_pouf.html
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.org/enhancements/pouf/pouf1 ?

URL: https://uptane.github.io/deployment-considerations/ecus.html
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/deployment/best-practices#2-preparing-an-ecu-for-uptane

URL: https://uptane.github.io/deployment-considerations/security_considerations.html
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/deployment/best-practices#8-enhanced-security-practices
13
URL: https://uptane.github.io/deployment-considerations/customizations.html#delta-update-strategies
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/deployment/best-practices#7-customizing-uptane ?

URL: https://github.com/uptane/uptane.github.io/blob/master/reference_pouf.md#file-formats
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to:   ?

URL: https://uptane.github.io/deployment-considerations/exceptional_operations.html#rolling-back-software
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/deployment/best-practices#6-exceptional-operations

URL: https://uptane.github.io/uptane-standard/uptane-standard.html#check_root
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/standard/uptane-standard#5443-how-to-check-root-metadata

URL: https://uptane.github.io/deployment-considerations/customizations.html
parent: https://uptane.github.io/docs/1.2.0/deployment/best-practices
Change to: https://uptane.github.io/docs/deployment/best-practices#7-customizing-uptane
Broken Links in Best Practices VER 2.0.0
18
URL: https://uptane.github.io/deployment-considerations/repositories.html
Parent: https://uptane.github.io/docs/2.0.0/deployment/best-practices
Change to:  https://uptane.github.io/docs/deployment/best-practices#3-setting-up-uptane-repositories
Broken Links in PURE
19
URL: https://uptane.github.io/uptane-standard/1.2.0/uptane-standard.html
parent: https://uptane.github.io/enhancements/pures/pure2
Change to: https://uptane.github.io/docs/1.2.0/standard/uptane-standard   ?
IGNORE LIST
20
URL: https://www.scitechnow.org/videos/scitech-now-episode-420/
parent: https://uptane.github.io/learn-more/press
Notes: URL is working
21
URL: https://rin.org.uk/blogpost/1706945/332376/What-is-spoofing-and-how-to-ensure-GPS-security
Parent: https://uptane.github.io/docs/deployment/best-practices
Notes: URL is working
22
URL: https://knowhow.napaonline.com/how-many-parts-are-in-a-car/
Parent: https://uptane.github.io/docs/2.0.0/deployment/best-practices
Notes: URL is working
23
URL: https://www.googletagmanager.com
parent: https://uptane.github.io
Notes: Same issue as #123
Error is within HEAD section of HTML
24
URL: https://uptane.github.io/blog/blog Index 0
parent: https://uptane.github.io/blog
Notes: Same issue as #123
URL has an extra “Index 0” attached to it
25
URL: https://WZ6MBDOHOT-dsn.algolia.net
parent: https://uptane.github.io
Notes: Same issue as #123
Error is within HEAD section of HTML

Hi @hexsecs / @Abhijay007 just following up if you want me to go ahead with these changes/ if the links are fine. Thanks!

@Mikerniker you can look into #162, it contains the same but more broken links


Use polyfill without depending on global scope

I'm trying to use this in an environment where I don't have control over what's happening in the global scope of the page, and I'd rather not populate an Intl polyfill outside my own scope.
Would you consider a change like this that allow me to pass in the desired Intl object when needed?

CLA is valid!

Couldn't you have a closure where you make an Intl binding available, and have this package inside that closure so it can see your Intl? This would be shadowing the global scope's Intl, but seems like what you'd want in this use case.

I'd like to to use this in a project built with Webpack. While I'm very open to changing how I'm going about this, neither moving away from Webpack nor putting things in global scope are an option on this project.
This is an oversimplification, but here's an idea of what's happening in what scopes when using Webkit:
function() {
    var require = function(file) {
        var files = {};

        files['foo'] = function() {
            return module.exports from file;
        };

        files['bar'] = function() {
            return module.exports from file;
        };

        return files[file];
    };

    // let's do real stuff now
    function() {
        var intlPollyfill = require('foo');

        // this doesn't have direct access to what's being done in this
        // function, or what was done in foo
        var intlMessageformat = require('bar');
    }();
}();

I don't believe this is necessary, closing for now.


[ENG-4010]Codeblock cleanup in markdown

Decouple the code block component (React Syntax Highlighter) from the markdown component. Also move the Markdown component map function var creation logic to the component level.
With this change, the react syntax highlighter logic/imports don't get compiled when  a different code block is used.

Need to unit test the markdown component further

It seems using markdown with this always imports python syntax highlighting even when no python block is there, why is that?

This fails:
component_map={
    "codeblock": lambda value, **props: rx.text(
        "Props: ", props, ". Value: ", value
    ),
},

This:
rx.code_block(
    """use reflex::events::Events;""",
    language="rust",
)

Returns something like:
``jsx
export function Prismasynclight_8ebdbf53b7f95eef99249393f8836500() {
const { resolvedColorMode } = useContext(ColorModeContext);
const _language = "rust";
if (_language) {
(async () => {
try {
const module = await import(
react-syntax-highlighter/dist/cjs/languages/prism/${_language}
);
SyntaxHighlighter.registerLanguage(_language, module.default);
} catch (error) {
console.error(
Error importing language module for ${_language}:,
error
);
}
})();
}
return (
<SyntaxHighlighter
children={"use reflex::events::Events;"}
language={_language}
style={resolvedColorMode === "light" ? oneLight : oneDark}
/>
);
}
Why can't this be a static import?

This fails:
component_map={
    "codeblock": lambda value, **props: rx.text(
        "Props: ", props, ". Value: ", value
    ),
},

this should be fixed now

It seems using markdown with this always imports python syntax highlighting even when no python block is there, why is that?

I think its coming from the _get_custom_code in markdown
def _get_custom_code(self) -> str | None:
        hooks = {}
        for _component in self.component_map.values():
            comp = _component(_MOCK_ARG)
            hooks.update(comp._get_all_hooks_internal())
            hooks.update(comp._get_all_hooks())

Moving the syntaxhighlighter language registration logic into the CodeBlock as a hook means when extracting all hooks from a component, it includes the code block hook with the default set language (python).
I think a way to get around that was a condition to exclude hooks from the CodeBlock component and one way to do that was to modify the _get_all_hooks API to accept a list of component types to ignore when getting hooks of its children, but we cant do that without a breaking change. Alternatively, I thought we could implement a modified version of the _get_all_hooks here (i.e, going down the tree to exclude the CodeBlock component here without calling comp._get_all_hooks)


Short event life option

Replaces #808.  I manually tested the scenario import and export with the code that upgrades the old keep_events_for from days to seconds.  Scenarios also now have a schema_version.  Successfully imported both an old and new schema export.
@dsander, would you mind giving this a final review and maybe deploy to your setup?

Tested it locally and it works fine. LGTM :+1:

Thanks for testing @dsander!  Rebasing and merging.

:+1: Excellent, thanks!


Error with empty database

on /aujourdhui , "S'inscrire" is not a button
on /comptes there is an error : "Call to a member function getDatemaj() on null"

Check new version

it work well


Sagemaker not Finishing the Training Process

I am running a custom Sagemaker container, and the last lines of my file (for example) look like:
torch.save(...)
print("All done!")
return

I see the "All done!", but the notebook cell never returns / completes. Is there something special that needs to be done for a clean exit of the specified SAGEMAKER_PROGRAM?

can you share your Dockerfile?

https://github.com/duckietown/aido-on-sagemaker/blob/master/duckietown-pytorch-rl/container/Dockerfile

Related to #469


Seeing errors with enphase integration

2023-04-06 11:19:34.731 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.envoy_#########_current_battery_capacity (<class 'custom_components.enphase_envoy.sensor.TotalBatteryCapacityEntity'>) is using state class 'measurement' which is impossible considering device class ('energy') it is using; expected None or one of 'total_increasing', 'total'; Please update your configuration if your entity is manually configured, otherwise report it to the custom integration author.
and:
Logger: custom_components.enphase_envoy
Source: helpers/update_coordinator.py:182
Integration: Enphase Envoy (DEV)
First occurred: 10:20:58 AM (1 occurrences)
Last logged: 10:20:58 AM
Error fetching envoy Envoy ########## data: Error communicating with API: peer closed connection without sending complete message body (incomplete chunked read)
This 2nd error appears when it cannot talk to the envoy anymore. Usually restarting the envoy resolves it for a while and then it comes back. I'm wondering if we can include this to get around this issue?
https://stackoverflow.com/questions/48105448/python-http-server-client-remote-end-closed-connection-without-response-error
self.send_header('Content-Type', 'blabla' )
self.end_headers()

Any ideas? Rebooting the envoy seems to "fix" it for a while but over time the issue comes back.

My integration doesn't supply battery data unless you've modified it to pickup a different data feed? What sensor is feeding this battery entity and where does that data come from?

Sorry I commented on the wrong integration! I Meant to put my comment on this:
https://github.com/whisk3y/home_assistant_envoy_d7_fw/tree/brianfork


Enable easier means of editing the configuration file

It's quite time consuming to browse and edit a raw JSON file. A UI of some sort would be great.

A cheap option might be to write a json-schema for the format and the producing a web page. There are several frameworks that produces a wysiwyg editor from json-schemas where you can edit the json both as code or with forms. Some with validation as you're typing, code completion, etc.
(The preferrable user experience would of course be to have plugins for IntelliJ/Android Studio and maybe eclipse.)


DBusError: Failed to parse advertisement

Hi,
for the life of me I can't get this to work. I must be doing something wrong?
advert = Advertisement("My Peripheral", [], 0, 60, serviceData={'11223344':b'\0x01'})

Hello, thanks for the report. The serviceData type was wrong internally should be fixed in the PR (if you could confirm it works for you)
pip install -e git+https://github.com/spacecheese/bluez_peripheral.git@fix-service-data#egg=bluez_peripheral

Hey there, thanks for the quick reply. Yes that update works lovely. Keep up the good work. ;)


My bots don't connect to my server.

When I open up my start.bat file this comes up
BotsServer:
C:\Users\User\Desktop\FWBOTS.GA v2.0\FWBOTS.GA\server>node server.js
Starting server on port 8081
User connected with id:bHbufwizdyaFNql
Keep in mind, that isn't my id....
startbots:C:\Users\User\Desktop\FWBOTS.GA v2.0\FWBOTS.GA>node f.js
{ owned: false, maxMass: false, minLevel: 0, maxLevel: 100 }
generating tokens...
Failed to get token!<PHONE_NUMBER>77646
Failed to get token!<PHONE_NUMBER>93160
Failed to get token!<PHONE_NUMBER>17478
All FBs Successfully Checked..
ogar-feeder-bot started! Join a game in Chrome with the Userscript installed.
Press CTRL + C to stop this script.
startup
server-booted-up

make sure u got ur UID filled in the config and installed the userscript if u need any help with that message me on skype:mastkilxp


closes #86 adtte vignette example@devel

Closes #86 .
Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the devel branch until you have checked off each task.

[x] Code is formatted according to the tidyverse style guide
[x] Updated relevant unit tests or have written new unit tests - See Unit Test Guide
[x] If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
[x] Update to all relevant roxygen headers and examples
[x] Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
[x] Address any updates needed for vignettes and/or templates
[x] Update NEWS.md
[ ] Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
[x] Address or fix all lintr warnings and errors - lintr::lint_package()
[ ] Run R CMD check locally and address all errors and warnings - devtools::check()
[x] Link the issue so that it closes after successful merging.
[x] Address all merge conflicts and resolve appropriately
[x] Pat yourself on the back for a job well done!  Much love to your accomplishment!

@amitjaingsk feel free to have an early look at this update and let me know if any comments. Ignore the earlier 2 I tagged you in - I had to close those as needed to rename the branch

@amitjaingsk please take a look at the updates and hopefully enough to resolve the comments, and if you approve this PR then i can merge.


Guard-minitest does not seem to work with spring in a Rails 4 engine.

Guard-minitest does not seem to work with spring in a Rails 4 engine.
Steps to reproduce it:
rails plugin new example --mountable
cd example/
echo "gem 'guard-minitest', group: :development" >> Gemfile
bundle
bundle exec guard init minitest
bundle exec guard

Here it runs the test/example_test.rb sample test successfully:
01:27:50 - INFO - Guard is using TerminalTitle to send notifications.
01:27:50 - INFO - Guard::Minitest 2.3.0 is running, with Minitest::Unit 5.3.4!
01:27:50 - INFO - Running: all tests
Run options: --seed 27937

# Running:

.

Finished in 0.004659s, 214.6383 runs/s, 214.6383 assertions/s.

1 runs, 1 assertions, 0 failures, 0 errors, 0 skips

01:27:52 - INFO - Guard is now watching at '/Users/david/Sites/example'

Now when editing Guardfile and changing guard :minitest do to guard :minitest, spring: true do, the test is not run anymore:
01:28:45 - INFO - Run all
01:28:45 - INFO - Running: all tests

Nothing is run.

Uncommenting the Rails 4 watches gives the same result.
Adding spring to the Gemfile does not help.
Stubbing spring into bins after creating this config/spring.rb file:

Spring.application_root = './test/dummy'

...does not help either.

Just tested this in a Rails engine.
spring: 'bundle exec spring rake test' works
but spring: true does not work.
I'll make a testrepo
Versions in use:
rails-4.2.0
spring-1.2.0
minitest-5.5.1
guard-2.11.1
guard-minitest-2.3.2

It's because bin/rake doesn't exist...
There should be a message in guard-minitest for this. I'll try and cook something up.

I've released guard-minitest 2.4.2, which shows an error in this scenario (instead of a silent failure).
So, I'm closing this.
Let me know if there are any other issues.

@bikramwp - thanks so much for the repo to reproduce this. I wouldn't have worked this out without it.

@e2 Good find and good fix. Thanks for picking this one back up.

@genericsteele - I don't know if Errno::ENOENT is a good choice. But it was the least confusing that I could think of.

Uhm, i found out that, for some reason, this issue occurs if there is spec folder along with the test one. I was migrating from rspec to minitest and I was trying to solve this issue but I gave up. Anyway, as soon as I renamed the spec folder the issue was fixed... weird.


validate_ending_datetime_against_granules failed

Describe the bug
The "validate_ending_datetime_against_granules" check failed producing a pyQuARC error:
"ERROR: Running check for the rule: 'validate_ending_datetime_against_granules' failed.. Details: validate_ending_datetime_against_granules() missing 1 required positional argument: 'version'"
To Reproduce
Steps to reproduce the behavior:

Run the command: "python3 main.py --concept_ids C2119341690-LARC_ASDC --format umm-c"
See error

Expected behavior
I did not expect this check to fail since a version is provided in the metadata for this collection.
Outputs
This error exists for a number of records (e.g. C2081904030-LARC_ASDC, C1997469361-LARC_ASDC). It seems like it may be a UMM-C specific error since it was not present in any of the tested dif10 records.
Additional context
Add any other context about the problem here.

closed by #225


index and sort

Hi!
Trying to use sort with index returns the following error: error calling sort: sequence must be provided.
Using:
{{ range sort ( index $.Site.Data.cases $.Lang ) ".home.weight" }}

On Hugo Static Site Generator v0.17 BuildDate: 2016-10-07T11:46:29-03:00.

Please use http://discuss.gohugo.io/ for questions.


[hotfix][connector] Use null to replace empty pending transaction in 2pc sink

What is the purpose of the change
This PR uses null to replace the original empty pending transaction in 2pc sink.
Brief change log

68d1ca81541296f168c4cb13478c1d23b976f959 do the above fix.

Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): no
The public API, i.e., is any changed class annotated with @Public(Evolving): no
The serializers: no
The runtime per-record code paths (performance sensitive): no
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
The S3 file system connector: no

Documentation

Does this pull request introduce a new feature? no
If yes, how is the feature documented? not applicable

Hi @dawidwys , could you have a look at this PR~?

Very thanks @dawidwys for the review! Will merge~


homework 15: Selection Sort, Insertion Sort , Bubble Sort, Merge Sort.

You can comment other methods and keep only sortBySelectionSorting(). See it doesn't work.
You just change the indexes.

okay i change it


[BUG] Python chip-device-ctrl module 'chip' has no attribute 'CertificateAuthority'

Reproduction steps
chip-device-ctrl fails with the error
2023-08-06 15:02:02 WRO1-LDL-P90374 chip.DL[74749] INFO PublishService D460C5A7D93C7AF4._matterd._udp5550.-1
2023-08-06 15:02:02 WRO1-LDL-P90374 chip.DIS[74749] INFO mDNS service published: _matterd._udp; instance name: D460C5A7D93C7AF4
module 'chip' has no attribute 'CertificateAuthority'
Failed to bringup CHIPDeviceController CLI
Aborted (core dumped)
Bug prevalence
Whenever I do this
GitHub hash of the SDK that was being used
c4d95d0bef9295daf8652348b72eec9778cac944
Platform
python, other
Platform Version(s)
No response
Anything else?
No response

I am getting this issue on my x86 platform, does this has a workaround or solution?

Same, need some help here.


Types get merged into the global namespace unexpectedly when using module.exports

As someone new to TypeScript after writing a lot of JavaScript for nodejs, I found an issue that I think is either a bug or warrants adding some kind of warning when you use module.exports. When using module.exports, types defined in my nodejs files act as if they are globally available to the whole program.
For the sake of example, let's say I have some code in a file named main.ts that looks like this:
class ComputationClass {
    public value: number;

    constructor(a: number, b: number) {
        this.value = a * b;
    }
}

console.log("Hello, World!");
console.log(new ComputationClass(1, 2).value);

module.exports = {
    something: function() {
        console.log("Something!");
    }
};

And some code in another file named other.ts that looks like this:
let x = new ComputationClass(1, 4);

And a tsconfig.json that looks like this:
{
    "compilerOptions": {
        "target": "ES5",
        "module": "commonjs",
        "moduleResolution": "node",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false
    },
    "exclude": [
    ]
}

I also have the nodejs typings from DefinitelyTyped installed.
I would expect when I compile this to get an error that looks like this:
other.ts(1,13): error TS2304: Cannot find name 'ComputationClass'.

Except I don't. It compiles without any warnings or errors, even though ComputationClass is not available in other.ts.
This made me sad, as one of the type safety benefits I was hoping to reap from TypeScript was TypeScript telling me if some code tried to use something without actually importing it.
After a long foray trying to understand where I went wrong, I found the export = syntax:
export = {
    something: function() {
        console.log("Something!");
    }
};

If I do that, I get the error message I was expecting.
As someone who writes a lot of nodejs, seeking out this export = syntax didn't occur to me for the longest time, because module.exports Just Worked. Except when it worked, it made some of my types appear as if they were globally available when they weren't.
Before stumbling across the export = syntax, some Googling and digging into the TypeScript source landed me on this code, which further confused me:
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/checker.ts#L15666
forEach(host.getSourceFiles(), file => {
    if (!isExternalOrCommonJsModule(file)) {
        mergeSymbolTable(globals, file.locals);
    }
    if (file.moduleAugmentations) {
        (augmentations || (augmentations = [])).push(file.moduleAugmentations);
    }
});

Well, it is a commonjs module! I'm using commonjs features! And I told tsconfig.json to be in commonjs mode. Evenually I traced this isExternalOrCommonJsModule expression through to this section of code, which is looking for module.exports: https://github.com/Microsoft/TypeScript/blob/master/src/compiler/binder.ts#L1196
However, that code is wrapped in a if (isInJavaScriptFile(node)) { block, for reasons I don't know enough to understand.
If I move this line up a little bit, so it's available:
const specialKind = getSpecialPropertyAssignmentKind(node);

And add the following code above line 1212, so it is outside of the if (isInJavaScriptFile(node)) { block:
switch (specialKind) {
    case SpecialPropertyAssignmentKind:
        bindExportsPropertyAssignment(node);
        break;
    case SpecialPropertyAssignmentKind.ModuleExports:
        bindModuleExportsAssignment(node);
        break;
}

I get the error I should've gotten all along with module.exports.
I can submit this change as a pull request, if it makes sense to those more familiar with how TypeScript internals work. Or perhaps a new kind of warning or change to the docs is in order if this is intended behavior, as I'm sure other people new to TypeScript but familiar with nodejs have run into this problem (personal anecdote: one of my coworkers was having this problem as well.)

@RyanCavanaugh @vladima

TypeScript follows the ES6/ES2015 module semantics. i.e. a file is considered as a module if it has a top-level import/export. if the file does not have any of these, it is considered a global script.
CommonJS, AMD, and SystemJS are other module formats, that have different semantics from the ES6 module spec. As you noted TypeScript could try and understand these, but that just adds complexity to the language, and the module syntax (which is already complicated enough). there are also problems with emitting the output code to other module systems.
What is supported however, is to write your modules in ES6 compatible format, and the TS compiler will emit it to CommonJS/AMD/SystemJS/ES6 modules. This way you get your interoperability, but still use the standard syntax.

Or perhaps a new kind of warning or change to the docs is in order if this is intended behavior, as I'm sure other people new to TypeScript but familiar with nodejs have run into this problem (personal anecdote: one of my coworkers was having this problem as well.)

PRs to update the docs (https://github.com/Microsoft/TypeScript-Handbook) or a proposal to update the error message are definitlly welcomed.


bug: I can't use ion-slide directive with ng-repeat

Type: bug
Platform: mobile webview
If I use ng-repeat inside "ion-slide-box" I got an js error:

Controller 'ionSlideBox', required by directive 'ionSlide', can't be found!

In order to temporary fix this issue we forked an ionic to:
https://github.com/StoreMaven/ionic/tree/storemaven-fix
In this branch we just removed the "require: '^ionSlideBox'" statement in "ionSlide" directive
Of course it is not a proper solution. Can you help us with the issue?

Hi,
it is working for me - at least if you are not trying to have the "loop" functionality working.
<ion-slide-box slide-interval="500" auto-play="true" show-pager="false">
    <ion-slide ng-repeat="article in latestArticles">
      {{article.name}}
    </ion-slide>
</ion-slide-box>

I found out that this commit never made it to master -> https://github.com/driftyco/ionic/commit/2ab776023d571d57d9b8a1d7878904b24b1364f8

Greetings @zeev-storemaven!
I've closed this issue because my sensors indicated it was old and inactive, and may have already been fixed in recent versions of Ionic. However, if you are still experiencing this issue, please feel free to reopen this issue by creating a new one, and include any examples and other necessary information, so that we can look into it further.
Thank you for allowing me to assist you.


user: Current not implemented on linux/amd64" $HOME=/home/ngrok

I'm following this tutorial to publish a local RocketMap to the web with ngrok: https://rocketmap.readthedocs.io/en/develop/advanced-install/docker.html#advanced-docker-setup
Here are the 2 commands regarding ngrok: https://rocketmap.readthedocs.io/en/develop/advanced-install/docker.html#external-access
The RocketMap is running correctly, but the ngrok container logs this to me:
t=2017-08-03T18:43:32+0000 lvl=warn msg="failed to get home directory, using $HOME instead" err="user: Current not implemented on linux/amd64" $HOME=/home/ngrok
docker info:
Containers: 3
 Running: 3
 Paused: 0
 Stopped: 0
Images: 5
Server Version: 17.06.0-ce
Storage Driver: devicemapper
 Pool Name: docker-202:1-2711675-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 10.74GB
 Backing Filesystem: ext4
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 1.772GB
 Data Space Total: 107.4GB
 Data Space Available: 47.14GB
 Metadata Space Used: 2.834MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.145GB
 Thin Pool Minimum Free Space: 10.74GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.77 (2012-10-15)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfb82a876ecc11b5ca0977d1733adbe58599088a
runc version: 2d41c047c83e09a6d61d464906feb2a2f3c52aa4
init version: 949e6fa
Security Options:
 apparmor
Kernel Version: 3.13.0-24-generic
Operating System: Ubuntu 14.04 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 987.9MiB
Name: mo-mueller
ID: Q67L:CMIH:UOEU:V6J7:5UES:G7WI:6FQZ:SQZT:TSOD:5RI2:XIJQ:WDSY
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 <IP_ADDRESS>/8
Live Restore Enabled: false

How can I fix that?

I get this issue too.

Did you change the default user? May be give part of the command you ran and I'll look into it.

Hey @wernight, this issue seems to still be there for me as of today. I have tried various things:

Setting the home directory manually
Changing the default user
Setting permissions

I'm really not sure where the issue is coming from. If you, or anyone else, seemed to have fixed this, please let us know!

Same here, setting HOME via ENV or anything does not resolve this issue. Any ideas?

Thanks for sharing the command that fails.
I do see the warning with: docker run  wernight/ngrok ngrok http 8080. However it seems to work. I'll look in fixing that warning if possible.

I think I fixed the warning. Note also that running in interactive mode seem to also fix the issue (i.e. with -it).

Note that the default user is ngrok and not root. Doesn't that default user work for you?

./ngrok http 8080                               WARN[01-13|17:19:22] failed to get home directory, using $HOME instead err="user: Current not implemented on linux/arm"
I have this type of error
Please solve this.

./ngrok http 8080                               WARN[01-13|17:19:22] failed to get home directory, using $HOME instead err="user: Current not implemented on linux/arm"
I have this type of error
Please solve this.

Need this command
export USER=$(id -un)

Note that the default user is ngrok and not root. Doesn't that default user work for you?

Sorry @wernight, I missed your message.
I didn't tried, I can't tell right now, but it would be a matter of test it, or try @tindurz solution: export USER=$(id -un)

You can try this.
echo $HOME
echo $USER
Then
set $USER = $HOME
Then
./ngrok http 80

Solve my problem thanks


NOTICK: When creating label namespace if branch name is over 60 characters cut it off due to k8s Character limits regarding labels

As observed in example below long branch names can cause issues when creating a label based on the branch.
First check length if it's over 60 characters drop the rest of the string otherwise use the branch as normal.
K8s limit is 63 charecters.
Failing example:
https://ci02.dev.r3.com/job/Corda5/job/corda-runtime-os-e2e-tests/job/WillV%2FCORE-3153-Replace-Stub-Crypto-Processor-With-Real-Implementation/1/
Subsequent Pass ( Tested with replay)
https://ci02.dev.r3.com/job/Corda5/job/corda-runtime-os-e2e-tests/job/WillV%2FCORE-3153-Replace-Stub-Crypto-Processor-With-Real-Implementation/2/

@williamvigorr3  FYI


Coordinator network commissioning and some other stuff

Hi,
I already mentioned the issue here: https://github.com/Koenkk/zigbee2mqtt/issues/1445 but it turns out that it's more than that. I actually have two devices now with a 3.0.x firmware from here that exhibit the same thing.
One is an usb stick with cc2531, one is a serial device for raspberry with CC2530+CC2592, both acting as a coordinator.
They seem to work all right so far (maybe with some issues I'm still investigating), but there is one thing that does not work in both cases: Trying to commission a new network. I'm using my own code to communicate with the coordinator devices.
The app cnf bdb start commissioning request (mode: 0x4 - BDB_COMMISSIONING_MODE_NWK_FORMATION) failes with an app cnf bdb commission notification with status 0x8 (BDB_COMMISSIONING_FORMATION_FAILURE).
I tried various settings for the channels mask, setting a particular pan id or letting it unset (that is, to be randomly generated), with the same result.
Is there something I'm missing when doing network commissioning?
The usb stick also has a led which lights up when the stick is inserted and it stays that way for a while. I don't know what it's doing during that time, but while it's lit, communication with the stick is limited, it doesn't reply to reset commands or to 'sys ping'.

The zigbee-herdsman commissioning code can be found here: https://github.com/Koenkk/zigbee-herdsman/blob/master/src/adapter/z-stack/adapter/startZnp.ts#L157
Note that this is not the correct place for z-stack firmware support, I recommend using: https://e2e.ti.com/

Thank you!
The generic z-stack support is indeed there, but I was addressing the specific firmwares found here, as there are a lot of options for compiling which can affect a lot the behavior.
I also have firmwares compiled by myself, including for serial cc2530 for raspberry (also for cc2538) which do not exhibit this behavior.


refactor(utils): use Remark to parse Markdown server-side

Motivation

#hacktoberfest
Fix #5659

Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
I did the following to verify my changes work:

add expectations and verified the snapshot change in transforms absolute links in versioned docs test (linkify.test.ts) to confirm md file links contained in html comments are not in the expected result (since comments are stripped out before looking for md broken links)

run npm run start:website:watch locally and add the following lines in website/docs/installation.md file :
<!-- [doc4](md-link-in-single-line-comment.md) -->

<!--
  [doc5](md-link-in-multi-line-comment.md)
-->

I saved the file and verified the warning is not shown anymore

Related PRs
N/A

Yes thank you @slorber and @Jarod42 . I'll add both the tests mentioned and fix the code!

Another false positive is links within inline code. `[link](./tutorial-basics/congratulations.md)` is converted to [link](/docs/tutorial-basics/congratulations), which is even weirder because it's actually rendered.
Fixing these very niche cases is much more non-trivial than what the current impl does. Just wondering: is it possible to move the entire logic to a Remark plugin instead? Or at least use Remark to parse the MD file? Or... we actually bite the bullet and give up on using simple regex tests?

Fixing these very niche cases is much more non-trivial than what the current impl does

Indeed :) At least it does not seem that trivial if there's a constraint to parse every line of the md file only once (for performance requirements for instance).

is it possible to move the entire logic to a Remark plugin instead ?

In case the logic is not going to be moved in another plugin and there's no such a performance requirement, an option might be to first calculate all the links that should be ignored in the md file analysed (extract all fenced blocks, all ``, then all html comments in a newContent: string, then match all md links) in a mdLinksToBeIgnored list, then when replaceMarkdownLinks matches a link that is in mdLinksToBeIgnored list, the function may avoid to transform that link. This means each md file will be parsed at least twice: one to calculate mdLinksToBeIgnored and the other one for replaceMarkdownLinks. What do you think ?

This means each md file will be parsed at least twice: one to calculate mdLinksToBeIgnored and the other one for replaceMarkdownLinks. What do you think ?

That doesn't sound unaffordable to me. From a computational perspective, it's still O(n) :D We need to have something first in order to improve on it

Hi @MattiaPrimavera Thanks for your time and effort put into this! Unfortunately, our final resolution has deviated significantly from your initial implementation, and continuing to work on your fork will be quite intractable. I've sent #6261 to properly address this and I'll close this one. Thanks again, and hope you can keep up with this great work in your future path with open source :D


Rewrite parsers, and readers, to take &str instead of &[u8]

File affected: reader.rs

If you're okay with it, then I'll be very happy to implement it!
That was supposed to be my next comment, by the way.

Late comment; anyways, @scileo I've added you to this issue then, as always I appreciate all the help and let me know if you have any issue!

I appreciate it. I'll start working on it tomorrow, and I'll keep you informed of my position.


Support more timestamp format when casting string to timestamp

Currently, when casting string to timestamp, if the input string has sub-second information then it must have 6 digits for microseconds follow by 'Z' (UTC) time zone notion.
This PR relaxes such requirements. The input string can have from 0 to 6 digits for microseconds and the Z time zone notion is optional.
Closes https://github.com/NVIDIA/spark-rapids/issues/6399.

Tasks:

[X] Modify code
[X] Integration test
[ ] Update docs

Integration tests are blocked due to a bug in cudf: https://github.com/rapidsai/cudf/issues/11593

build

build

build

build


[$1000] Copy paste simple text from microsoft word detects the text as image

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

Action Performed:

Open the app
Open any report
Open Microsoft Word and write anything in it
Copy and paste it in report chat and send

Expected Result:
It should consider it as simple text
Actual Result:
On mac chrome it considers the text as image
Workaround:
unknown
Platforms:

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

[ ] MacOS / Chrome

Version Number: v1.2.52-4
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/211951688-f059a5bf-2a7c-41da-95a1-e14de7fa7a82.mov
https://user-images.githubusercontent.com/43996225/211951804-f9656f1a-322f-447f-ad3a-39bc6679ce62.mp4
Expensify/Expensify Issue URL:
Issue reported by: Dhanashree-Sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1673453015471619
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~015a89f9e17a87633b
Upwork Job ID:<PHONE_NUMBER>450935296
Last Price Increase: 2023-01-23

I am able to reproduce

Proposal
Issue
Whenever we copy anything from MS word, MS word sends multiple formats of the selection to the clipboard. These formats include:

Plain text
HTML
RTF
File (An png of the selection)

Ref:

In our code, we're checking for files in Clipboard at the very beginning. If Clipboard contains a file, all other types present in the Clipboard object are ignored as seen in the following:
https://github.com/Expensify/App/blob/ae66a7f019dda888390173a542b273d97042eaaa/src/components/Composer/index.js#L217
Solution
There can be multiple solutions here.

We can modify our code such that Text/HTML takes greater precedence than a file if present.

diff --git a/src/components/Composer/index.js b/src/components/Composer/index.js
index 078376c15..4816141b7 100755
--- a/src/components/Composer/index.js
+++ b/src/components/Composer/index.js
@@ -210,13 +210,6 @@ class Composer extends React.Component {
         const {files, types} = event.clipboardData;
         const TEXT_HTML = 'text/html';

-        // If paste contains files, then trigger file management
-        if (files.length > 0) {
-            // Prevent the default so we do not post the file name into the text box
-            this.props.onPasteFile(event.clipboardData.files[0]);
-            return;
-        }
-
         // If paste contains HTML
         if (types.includes(TEXT_HTML)) {
             const pastedHTML = event.clipboardData.getData(TEXT_HTML);
@@ -265,6 +258,13 @@ class Composer extends React.Component {
             return;
         }

+        // If paste contains files, then trigger file management
+        if (files.length > 0) {
+            // Prevent the default so we do not post the file name into the text box
+            this.props.onPasteFile(event.clipboardData.files[0]);
+            return;
+        }
+
         const plainText = event.clipboardData.getData('text/plain');
         this.paste(Str.htmlDecode(plainText));
     }

Give user a choice to paste as whatever type they desire IF clipboard contains multiple types.
We can also do nothing here as the image contains a valid representation of all the content in MS word (which includes all the styling and formatting).

For reference, Slack gives html/text greater precedence over files in Clipboard.

Hey @allroundexperts! Thanks for the succinct and clear proposal! Can you explain how you know Slack gives greater precedence to these types of files?

@jasperhuangg You can just do the same test on Slack. Copy anything from MS Word. Then try pasting it in Slack. You'll note that Slack just pastes the text as HTML unlike Expensify.

@jasperhuangg @0xmiroslav Any update on my proposal?

Proposal
    handlePaste(event) {
        event.preventDefault();

        const {files, types} = event.clipboardData;
        const TEXT_HTML = 'text/html';

-       // If paste contains files, then trigger file management
-       if (files.length > 0) {
-           // Prevent the default so we do not post the file name into the text box
-           this.props.onPasteFile(event.clipboardData.files[0]);
-           return;
-       }
-
        // If paste contains HTML
        if (types.includes(TEXT_HTML)) {
            const pastedHTML = event.clipboardData.getData(TEXT_HTML);

            const domparser = new DOMParser();
            const embeddedImages = domparser.parseFromString(pastedHTML, TEXT_HTML).images;

            // If HTML has img tag, then fetch images from it.
            if (embeddedImages.length > 0 && embeddedImages[0].src) {
+               // If paste contains image as a file, then trigger file management
+               if (files.length > 0) { // or we can update this condition to `files.length === 1`
+                   this.props.onPasteFile(event.clipboardData.files[0]);
+                   return;
+               }

                // If HTML has emoji, then treat this as plain text.
                if (embeddedImages[0].dataset && embeddedImages[0].dataset.stringifyType === 'emoji') {
                    const plainText = event.clipboardData.getData('text/plain');
                    this.paste(Str.htmlDecode(plainText));
                    return;
                }
                fetch(embeddedImages[0].src)
                    .then((response) => {
                        if (!response.ok) { throw Error(response.statusText); }
                        return response.blob();
                    })
                    .then((x) => {
                        const extension = IMAGE_EXTENSIONS[x.type];
                        if (!extension) {
                            throw new Error(this.props.translate('composer.noExtensionFoundForMimeType'));
                        }

                        return new File([x], `pasted_image.${extension}`, {});
                    })
                    .then(this.props.onPasteFile)
                    .catch(() => {
                        const errorDesc = this.props.translate('composer.problemGettingImageYouPasted');
                        Growl.error(errorDesc);

                        /*
                        * Since we intercepted the user-triggered paste event to check for attachments,
                        * we need to manually set the value and call the `onChangeText` handler.
                        * Synthetically-triggered paste events do not affect the document's contents.
                        * See https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event for more details.
                        */
                        this.handlePastedHTML(pastedHTML);
                    });
                return;
            }

            this.handlePastedHTML(pastedHTML);
            return;
        }

+       // If paste contains files, then trigger file management
+       if (files.length > 0) {
+           // Prevent the default so we do not post the file name into the text box
+           this.props.onPasteFile(event.clipboardData.files[0]);
+           return;
+       }
+
        const plainText = event.clipboardData.getData('text/plain').replace(/\n\n/g, '\n');

        this.paste(Str.htmlDecode(plainText));
    }

Updated code:
diff --git a/src/components/Composer/index.js b/src/components/Composer/index.js
index 5e00825c5a..487210b16f 100755
--- a/src/components/Composer/index.js
+++ b/src/components/Composer/index.js
@@ -214,7 +214,7 @@ class Composer extends React.Component {
         const TEXT_HTML = 'text/html';

         // If paste contains files, then trigger file management
-        if (files.length > 0) {
+        if (files.length > 0 && !event.clipboardData.getData(TEXT_HTML)) {
             // Prevent the default so we do not post the file name into the text box
             this.props.onPasteFile(event.clipboardData.files[0]);
             return;

Update Proposal
This one handles several more edge cases. (SVG and CORS blocked images).
diff --git a/src/components/Composer/index.js b/src/components/Composer/index.js
index 5e00825c5a..da282a7c85 100755
--- a/src/components/Composer/index.js
+++ b/src/components/Composer/index.js
@@ -213,8 +213,8 @@ class Composer extends React.Component {
         const {files, types} = event.clipboardData;
         const TEXT_HTML = 'text/html';

-        // If paste contains files, then trigger file management
-        if (files.length > 0) {
+        // If paste contains files and no HTML, then trigger file management
+        if (files.length > 0 && !types.includes(TEXT_HTML)) {
             // Prevent the default so we do not post the file name into the text box
             this.props.onPasteFile(event.clipboardData.files[0]);
             return;
@@ -223,9 +223,14 @@ class Composer extends React.Component {
         // If paste contains HTML
         if (types.includes(TEXT_HTML)) {
             const pastedHTML = event.clipboardData.getData(TEXT_HTML);
-
             const domparser = new DOMParser();
-            const embeddedImages = domparser.parseFromString(pastedHTML, TEXT_HTML).images;
+            const parsedHTML = domparser.parseFromString(pastedHTML, TEXT_HTML);
+            if (parsedHTML.body.childNodes.length === 1 && parsedHTML.body.childNodes[0] === 'img' && files.length > 0) {
+                this.props.onPasteFile(event.clipboardData.files[0]);
+                return;
+            }
+
+            const embeddedImages = parsedHTML.images;

             // If HTML has img tag, then fetch images from it.
             if (embeddedImages.length > 0 && embeddedImages[0].src) {

@0xmiroslav In the updated proposal (https://github.com/Expensify/App/issues/14232#issuecomment-1407475708), image data is not being fetched again. As far as the private image link is concerned, that is working as well after the update.
https://www.loom.com/share/0f924e13059844e5afac68cdcee4d5ba

@0xmiroslav Yes, is that an issue?

@0xmiroslav Sounds good. Sorry for that!

Hey @allroundexperts thank you for engaging in so much discussion and getting to a proposal that satisfies our requirements. You've been assigned!

@jasperhuangg @0xmiroslav Created the PR:
https://github.com/Expensify/App/pull/14713

@0xmiroslav @jasperhuangg kind reminder for PR review.

Closing per https://expensify.slack.com/archives/C01GTK53T8Q/p1675369192212829?thread_ts=1674760715.010859&cid=C01GTK53T8Q

@jasperhuangg Will I get any compensation for this?

@allroundexperts Yes! You definitely deserve to be compensated–we are currently talking about this internally and I'll get back to you once the discussion has concluded.

Hey @davidcardoza!
Can you please ensure that @allroundexperts gets compensated fully for his investigation of this issue? Since no PRs were merged we'll compensate $2000 without any bonuses.
The C+ contributor @0xmiroslav should also get compensated fully for their help with this issue, again without any bonuses.

@jasperhuangg I am OOO for a family medical emergency (posted in #social earlier today). I may not be back in office until Monday. If the payment is urgent can you please reassign to someone on the bug zero team?

Seems like payment isn't urgent, so no worries.
And I hope everything is okay, sending positive thoughts your way!

@jasperhuangg sorry to randomly jump in here :D I thinkkk we normally keep App issues open until payment has been sent to everyone, right? 🤔

@davidcardoza Hope everything is okay, sending positive thoughts.
Whenever you are back to work can you let me know if I would be compensated for reporting bonus?

@davidcardoza Any update here?

@0xmiroslav Contract sent
@allroundexperts Contract sent

Hi @davidcardoza, kindly let me know about my query too.

@dhanashree-sawant Contract sent

Okay great thanks, accepted the offer

All payments have been sent.


Create a gh worfkow for testing gh self hosted runner

This is a following for #211
Now we have the mechanism in place, we do not want to test it on every PR, as this is an specific feature but it would be great to create a gh workflow to run mapt as self hosted runner and then run some logic on it.
This flow should be triggered manually https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
Also this could be used as an example to set the same strategy on other repos

fixed via #282


Disable the complex Julia objects in Pluto

begin
    filter!(m -> occursin("pluto", string(m)), PlutoRunner.allmimes)
    import PlutoRunner
    PlutoRunner.use_tree_viewer_for_struct(x) = false
end

This cell will be most important
    if false
        import Pkg
    end

because if :Pkg \in top.definitions in topological_order.jl

nb.cells_dict != topological order

thanks 👍


 Can you please help? Thanks, Splatman333.

i doubt you're on 11.1. i'd think you are on 11.2


Launch Python Profiling,the VSP file always shows loading

Environment

Steps to Reproduce
1.Create python application project and add "Lib\test\pythoninfo.py" and set as Startup File
2.Debug> Launch Python Profiling
3.Press any key to continue
Expected behavior
The VSP file displays content normally.
Additional context and screenshots
The VSP file always shows loading.

@AdamYoblick Is this deprecated already?

@AdamYoblick Is this deprecated already?

Technically no, vsp should still be supported. Let me reach out to the VS team.

@linette-zyy What version of python did you have installed for this?

@linette-zyy Also can you please provide the pythoninfo.py file you mentioned so we can use it to troubleshoot?

@AdamYoblick Python install from workload, the version in Python3.9
The pythoninfo.py file  is contained in the annex.
file.zip

I can repro this one. The .vsp file is created but just the UI just hangs on Preparing data. xxx.

Patrick Nelson would be the one from the VS team that can help troubleshoot this. But he just went on PTO :)

I can't repro this anymore in Microsoft Visual Studio Enterprise 2022 (64-bit) - Int Preview Version 17.12.0 Preview 1.0 [35114.17.main]