Terminate local process

Adds a convenient function to terminate the child process

I do not mind surfacing the shellPid, but the policy implemented in terminate() seems arbitrary and I have two concerns.
The use of waitpid can be problematic, and I need to do some research:
waitpid behavior can be affected by a global sigaction (SIGCHLD, SIG_IGN) or if SA_NOCLDWAIT has been set for SIGCHLD) - yet, I do not know what could be done to properly track the state of shellPid if I were to just make it public.
Sadly, the sigaction state for SIGCHLD is a global process setting.
The loop is messy, because if we are giving a chance to the process to terminate, and the process has not finished, sending another signal might just trigger the same cleanup processes again.   So I would rather just have a larger delay than then loop.
Perhaps an option is terminate (staged:Bool=true, waitForChild:Bool=true) to give folks flexibility if they want to use the staged kill, or not, and whether we should call waitpid.

ok, maybe just kill(shellPid, SIGTERM) and hope it will die. I tried to be smart, but maybe there's no point in it. That'd be in line with Swift Foundation.Process https://github.com/apple/swift-corelibs-foundation/blob/efedfc30e7ea2ce5e4db85e3869b9cb149273ad9/Sources/Foundation/Process.swift#L1032

The use of waitpid can be problematic, and I need to do some research:

You might want to have a try on dispatch source, I have used it here and it works like a charm.

@Co2333 Funny bit, I was already using DispatchSource to catch the child signal, so I guess we do rely on a swift-installed sigaction and swift-global sigaction semantics.
I think I will keep the terminate() from Marcin, and also surface the child PID for folks that might want to use it.


HOTT-977: Rules of origin proofs

Jira link
HOTT-977
What?
I have added/removed/altered:

[x] Added proofs data and content files
[x] Added a RulesOfOrigin::Proof data model to map proof references from the schemes file and read the proofs markdown files
[x] Expose the relevant Proofs models in the Rules of Origin schemes API

Why?
I am doing this because:

We want to show proofs information on the Rules of Origin tab

Deployment notes (optional)

The proofs information will only show up when both frontend and backend PRs are merged - they are safe to merge in either order

Superceded by #254


specify the armor format, and remove the shift step from basex

I think I ultimately prefer it this way. Some remarks on that in the spec draft, in the "Comparison to Base64" section.
@maxtaco

Made some comments!

Addressed your comments, @maxtaco.


Unhandled exception .NET System.IO.FileLoadException - app won't run

Describe the bug
I can't start the application at all, no explicit error message given, app window will not show at all.
To Reproduce
I think this is not reproduceable as it is most likely related to my environment - see additional context.
Application specifics
TabularEditor.exe, version: 2.25.8952.22276 portable
Windows 10 enterprise
Additional context
I'm running app on virtual machine where I don't have administrative rights. I wasn't able to trace back any changes to the OS except of installation of SSMS to the machine, uninstallation of the app didn't fix it. I was able to find two application error logs in Win event log. They suggest some of the .NET runtime libraries might be missing which is causing unhandled exception and failing to start the app. As our support is very slow to respond and maybe also a bit clueless what to do which is the reason why I beg for help here.
Would you be able to advise which dll might be missing or how to find out? Or what is the possible remedy - I can imagine reinstalling .NET runtime to newer/other version might help?
Event log error #1:
Log Name:      Application
Source:        .NET Runtime
Date:          03/09/2024 17:02:43
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      AWCPCStepaXV674
Description:
Application: TabularEditor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
Exception Info: System.IO.FileLoadException
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[], Byte[], System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, System.Security.SecurityContextSource)
at System.Reflection.Assembly.Load(Byte[])
at Costura.AssemblyLoader.ReadFromEmbeddedResources(System.Collections.Generic.Dictionary2<System.String,System.String>, System.Collections.Generic.Dictionary2<System.String,System.String>, System.Reflection.AssemblyName)
at Costura.AssemblyLoader.ResolveAssembly(System.Object, System.ResolveEventArgs)
at System.AppDomain.OnAssemblyResolveEvent(System.Reflection.RuntimeAssembly, System.String)
Exception Info: System.IO.FileLoadException
at TabularEditor.Program.Main()
Event Xml:

1026
0
2
0
0
0x80000000000000

19824

Application
AWCPCStepaXV674

Application: TabularEditor.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Runtime.InteropServices.COMException
Exception Info: System.IO.FileLoadException
at System.Reflection.RuntimeAssembly.nLoadImage(Byte[], Byte[], System.Security.Policy.Evidence, System.Threading.StackCrawlMark ByRef, Boolean, Boolean, System.Security.SecurityContextSource)
at System.Reflection.Assembly.Load(Byte[])
at Costura.AssemblyLoader.ReadFromEmbeddedResources(System.Collections.Generic.Dictionary2<System.String,System.String>, System.Collections.Generic.Dictionary2<System.String,System.String>, System.Reflection.AssemblyName)
at Costura.AssemblyLoader.ResolveAssembly(System.Object, System.ResolveEventArgs)
at System.AppDomain.OnAssemblyResolveEvent(System.Reflection.RuntimeAssembly, System.String)
Exception Info: System.IO.FileLoadException
at TabularEditor.Program.Main()

Followed by error #2:
Log Name:      Application
Source:        Application Error
Date:          03/09/2024 17:02:44
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      AWCPCStepaXV674
Description:
Faulting application name: TabularEditor.exe, version: 2.25.8952.22276, time stamp: 0x6687c969
Faulting module name: KERNELBASE.dll, version: 10.0.19041.4780, time stamp: 0xc4a0381f
Exception code: 0xe0434352
Fault offset: 0x00141072
Faulting process ID: 0x5a78
Faulting application start time: 0x01dafe12543e3cf0
Faulting application path: C:\Users\StepanAlbrecht\Downloads\TabularEditor.2.25.0\TabularEditor.exe
Faulting module path: C:\Windows\System32\KERNELBASE.dll
Report ID: 4a0ab01c-9335-454e-9678-0d8fe699dc0a
Faulting package full name:
Faulting package-relative application ID:
Event Xml:

1000
0
2
100
0
0x80000000000000

19825

Application
AWCPCStepaXV674

TabularEditor.exe
2.25.8952.22276
6687c969
KERNELBASE.dll
10.0.19041.4780
c4a0381f
e0434352
00141072
5a78
01dafe12543e3cf0
C:\Users\StepanAlbrecht\Downloads\TabularEditor.2.25.0\TabularEditor.exe
C:\Windows\System32\KERNELBASE.dll
4a0ab01c-9335-454e-9678-0d8fe699dc0a

@stepan-albrecht-adastra this issue seems similar to #1175
Tabular Editor is using Fody/Costura to embed compressed DLLs as resources, which improves app startup time and produces smaller binaries. Howewer, the WDAC Dynamic Code Security policy seems to take issue with this approach, as users in #1175 are confirming. I wonder if something similar could apply in your case?

Hi @otykier that's a good catch - I'm working with the security team to help me check if WDAC is the root cause. Will update this thread once properly tested.


[miracl] miracl / MIRACL static library

Library name: Miracl
Library description: Multiprecision Integer and Rational Arithmetic Cryptographic Library
Source repository URL: https://github.com/miracl/MIRACL
Project homepage (if different from the source repository):
Anything else that is useful to know when adding (such as optional features the library may have that should be included):
Seems that miracl is not available, having one will be great!

If you wish to add this port in the future, you can reopen this issue, but we're closing it for now.


intuit#296 Logging is not exists for getOAuth2LoginHelper()

Right now getOAuth2LoginHelper() does not write any logging as well as CurlHttpClient()
This PR adding logging only for getOAuth2LoginHelper().

@alexeycarpe Thanks for following this through, I will review it in my upcoming sprint.

Closing PR. Made equivalent changes in PR#315


[UI]Added arrow on hovering Collapsed SideNav

Signed-off-by: Harshit-Dandriyal<EMAIL_ADDRESS>Description
As discussed in meshey-ui slack channel, I have created hovering arrow on collapsed SideNav and removed lagged labels which sticks to side navbar
https://user-images.githubusercontent.com/56961488/160525728-7041fad8-50dd-4222-8fd0-94e447ed374c.mp4
This PR fixes #5123
Notes for Reviewers
Signed commits

[x] Yes, I signed my commits.

@warunicorn19

Codecov Report

Merging #5297 (8331920) into master (e4f0ff2) will decrease coverage by 4.30%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5297      +/-   ##
==========================================
- Coverage   17.39%   13.09%   -4.31%
==========================================
  Files         107      107
  Lines        9824     9824
==========================================
- Hits         1709     1286     -423
- Misses       7694     8262     +568
+ Partials      421      276     -145

Flag
Coverage Δ

e2etests
?

gointegrationtests
?

unittests
13.09% <ø> (ø)

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

Impacted Files
Coverage Δ

mesheryctl/internal/cli/root/system/update.go
1.05% <0.00%> (-58.95%)
:arrow_down:

mesheryctl/internal/cli/root/system/status.go
1.14% <0.00%> (-55.18%)
:arrow_down:

mesheryctl/internal/cli/root/system/start.go
1.91% <0.00%> (-54.55%)
:arrow_down:

mesheryctl/internal/cli/root/system/restart.go
1.92% <0.00%> (-48.08%)
:arrow_down:

mesheryctl/internal/cli/root/system/stop.go
2.15% <0.00%> (-44.61%)
:arrow_down:

mesheryctl/internal/cli/root/system/logs.go
3.26% <0.00%> (-36.96%)
:arrow_down:

mesheryctl/internal/cli/root/system/check.go
1.03% <0.00%> (-23.03%)
:arrow_down:

mesheryctl/internal/cli/root/system/dashboard.go
1.70% <0.00%> (-9.41%)
:arrow_down:

mesheryctl/pkg/utils/healthcheck.go
8.82% <0.00%> (-4.42%)
:arrow_down:

Continue to review full report at Codecov.

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

👍

I guess now there is no tooltip text on the parent elements of the nav-bar. This might not be something we want.

@asubedy but I think there is no need of tooltip text now because whenever we hover over our parent nav, it changes to arrow

@Harshit-Dandriyal In terms of design, lets consider a new user who isn't accustomed to the Meshery UI, so if he/she collapses the sidebar, it would be difficult for them to determine what those icons mean. So IMHO, labels would be really necessary.
Coming to your discussion regarding the arrow, it would be a nice feature to have along with the tooltip
CC @leecalcote @asubedy @warunicorn19

I agree with @adithyaakrishna, the tooltips are necessary.

@adithyaakrishna Correct, but what should we do then?

Add labels in side of arrows.
Add small arrow with listicon(nav item) which shows on hovering and will show labels(may looks conjested).
just leave navIcon without arrow as it common sense that it will expand(Already in project).
use arrow on hovering, leave labels which is implemented in this PR.
@leecalcote @warunicorn19 @adithyaakrishna Suggestion please

@Harshit-Dandriyal I think the simplest answer to all these questions will be - Have the same behavior that we have currently but with the fix that after hover is done tooltip the tooltip should not be there(no re-rendering), It should act as a normal tooltip on hover. example: https://mui.com/components/tooltips/#basic-tooltip

@Harshit-Dandriyal Any updates on this? 👀

@Harshit-Dandriyal Any updates on this? 👀

I recommended a prototype in meshey-ui, Still waiting for suggestions, If community will approve that, I can continue, Also anyone suggestion is welcome on that prototype :)

@Harshit-Dandriyal Do you mind sharing the link to the prototype or figma link here?

Sure :)
https://user-images.githubusercontent.com/56961488/161664638-16db1852-ec63-4b2d-9e60-db5b85c73bd8.mp4

https://user-images.githubusercontent.com/56961488/162347154-09c3f09e-1d10-450b-86ff-9fc4e7ab150a.mp4
@YashKamboj @adithyaakrishna @asubedy Any Suggestions? :)

Yes, @Harshit-Dandriyal this looks great. 🚀

@Harshit-Dandriyal Is there a commit for the change in the video which you uploaded above?
If not, could you please push it so that we can go ahead and merge it?

@Harshit-Dandriyal Is there a commit for the change in the video which you uploaded above? If not, could you please push it so that we can go ahead and merge it?

No, It was just a prototype, I just coded it casually, I was assuring that if a Community like this, I will continue my work on this

Looking good, Thank you @Harshit-Dandriyal


First working implementation

Hi,
Please review the first working implementation.
For this macro-function:
SQLPP_DECLARE_TABLE(
	(table)
	,
	(id, int, NOT_NULL)
	(c0, blob, NULL)
	(c1, bool, NOT_NULL)
	(c2, float, NULL)
	(c3, tinyint, NULL)
	(c4, smallint, NOT_NULL)
	(c5, int, NULL)
	(c6, bigint, NOT_NULL)
	(c7, text, NULL)
	(c8, varchar(16), NOT_NULL)
	(c9, varchar(32), NULL)
)

this code will be generated:
https://gist.github.com/niXman/553de6d36f8176a1ce58
Ok for merge?
Any proposals/objections?

Now I'm open for discussion about code-generation for creation of tables.

I'll add the description about ppgen requirements: boost.preprocessor-1.57 or greater is requered

Ping?

It is still based on the old table structure, I am afraid. I changed that end of November. It should be fairly easy to adapt, but you need to update your fork.
Also, it would be great if you could add a test minimalistic test that does something with the generated table. Since the rest of the library works without boost, it might be a good idea to check if boost is available before compiling it.

It is still based on the old table structure, I am afraid. I changed that end of November. It should be fairly easy to adapt, but you need to update your fork.

Ok...

it would be great if you could add a test minimalistic test that does something with the generated table.

Ok.

Since the rest of the library works without boost, it might be a good idea to check if boost is available before compiling it.

How do you suggest to do that?

Checking for boost: I haven't tried it yet, but this looks promising:
http://stackoverflow.com/a/6646746/2173029


remove csrf

it doesn't really do anything anyway.

👍

Current coverage is 69.68% (diff: 100%)

Merging #110 into master will not change coverage

@@             master       #110   diff @@
==========================================
  Files            20         20
  Lines           188        188
  Methods          46         46
  Messages          0          0
  Branches         28         28
==========================================
  Hits            131        131
  Misses           57         57
  Partials          0          0

Powered by Codecov. Last update 32bb267...a12f3ef


Create css.txt

some of them are from gpt

oki oki sorry for late response will merge it right now


Create config values for slider minimums and maximums

https://www.concrete5.org/community/forums/5-7-discussion/area-design-margin-and-padding-maximum-limit/
We should make the -50 and 200 something that can be set through a config value.

Any suggestions for the config value key names?

How about adding to the limits associative array in concrete/config/concrete.php
array(
'limits' => array(
'style_customizer' => array(
'size_max' => 200,
'size_min' => -50
)
)
);
Which we can then grab with Config::get('concrete.limits.style_customizer.size_max');


Accessible Hover View/Help contains yellow rectangles for certain whitespace characters like &nbsp, &emsp etc.

Install the GitLens extension
Hover on an editor line, some decorative text should appear to the right showing the last person who edited the line, the moment when it was edited and the commit message
Hover on that text, an editor hover should appear
Focus on a hover part of the editor hover
Make the accessible hover view appear
Notice that the accessible hover view contains yellow rectangles corresponding to the whitespace characters like &nbsp &emsp etc 🐛

https://github.com/microsoft/vscode/assets/61460952/e4940367-93ad-4647-80e8-e6d80a74497b

I still see a couple of these coming from this line:
https://github.com/microsoft/vscode/blob/1ad8aa5045bcca515120289d283a1e4ea664230e/src/vs/workbench/api/common/extHostExtensionService.ts#L514

Oh I see thank you, could you direct me to the exact file where you see this happening?


SWC has stopped working in one of my projects

Describe the bug
I use SWC in dozens of projects but bizarrely it has stopped working in just one. It fails to transpile JSX despite the correct JSX flag being present in the .swcrc file, again like dozens of other projects.
I think the easiest thing to do is to just clone the project and have a look. So:
git clone git@github.com:djalbat/reaction-with-style.git

Then the usual:
npm run install

And then just build:
npm run build-debug

I get errors like:
swc failed:

  x Expression expected
    ,-[lib/example.js:16:1]
 16 |
 17 | ReactDOM.render(
 18 |
 19 |     <View/>
    :     ^
 20 |
 21 |   ,
 22 |   bodyDOMElement
    `----

Clearly a problem with JSX.
Input code
ReactDOM.render(

    <View/>

  ,
  bodyDOMElement
);

Config
{
    "jsc": {
        "parser": {
            "syntax": "ecmascript",
            "jsx": true
        }
    },
    "module": {
        "type": "commonjs"
    }
}

Playground link (or link to the minimal reproduction)
https://play.swc.rs/?version=1.3.100&code=H4sIAAAAAAAAAwtKTUwucfH31StKzUtJLdLg4lIAApuwzNRyfTsQRweIk%2FJTKoFqXHNSc1PzSrg0rbkAjfPNzzcAAAA%3D&config=H4sIAAAAAAAAA1WPSw7DIAwF9zkF8rrbdtE79BAWdSIifrKJVBTl7iUE0maH3xsz8jooBbNoeKq1PMsQkYX4nEsi2Sf8lARIOxTNJia49XaWvRrRCtVoOxpIyBOluiX3hoMNQajjLXPGmzH%2FC3VwkUnkCu4o%2BsnSVTc0JbjwXmrZDkk50qF%2FwA%2FqsvNjMPLqm4kXGrYvhlQioBQBAAA%3D
SWC Info output
No response
Expected behavior
It should transpile just fine!
Actual behavior
See above.
Version
"@swc/core": "^1.2.50"
Additional context
Note that in the playground link, if you toggle the JSX flag then you get the behaviour that I have outlined.
So the problem seems to be that SWC is ignoring the configuration file for some reason.

"parser": {
      "syntax": "ecmascript",
      "jsx": false
    },

I think this is the problem

Please provide a minimal reproduction.
I can't repro with your repository, and if you know the first version that breaks, it would also help


Update Nodejs Version to v16

Current active version of NodeJS is v16:
https://github.com/nodejs/Release#release-schedule

Thanks for taking the time to do this, I've already got v16 in the 22.04 branch for the next release: https://github.com/laravel/settler/compare/master...22.04-Jammy#diff-462f987db78a5454da0f3f8991c18876defcda4f1630dafa2e5b0feea2b4b0ffR36


fix: 3249 - refresh of product after each Robotoff answer

Impacted files:

abstract_background_task.dart: now uses a new ProductRefresher method for query execution
barcode_product_query.dart: now uses a new ProductRefresher method for query execution
onboarding_data_product.dart: now uses a new ProductRefresher method for query configuration
product_refresher.dart: created methods for standard query configuration and execution
question_card.dart: added a fallback product; now uses a new ProductRefresher method for query execution
question_page.dart: added a fallback product to the QuestionCard; now refreshes the product locally after each answer
summary_card.dart: removed an unnecessary product refresh with loading dialog

What

Now we refresh the product after each Robotoff answer.
That's invisible for the user (no additional dialog) as it's part of the "saving your answer" dialog/query.
The Robotoff page is now displayed immediately. There used to be a visible product refresh before. Now the refresh is invisible, and we display the input (out of date?) product as a fallback during the refresh.
All those fixes and optimizations only make sense on a "product robotoff session". For Hunger Games (where we don't know the product beforehand) no big change.
That was an opportunity for refactoring: now the calls to off-dart getProduct methods are mainly performed by ProductRefresher, for consistency.
This PR goes with 2 new TODOs:

what should we do in Robotoff page if we cannot download a product and have no fallback - for the moment (it was the case before) we have a sort of forever loop (cf. QuestionCard)
we refresh the product after an answer and before a new question - there's room for optimization there, we could avoid one call (cf. QuestionPage)

This PR goes with different UI/UX suggestions:

especially in Hunger Games, we could have "instant answers" - a bit like what we do for background tasks, we could not await saving the results (we still would have to download the next product)
in Robotoff questions there is one (or many) pictures, and if you click on it you go to the picture list page, and then you have to click on "your" picture to go to an "edit picture" page. It should be faster (directly to the single picture page) and with no edit feature. cf. #3332
Generally speaking, the Robotoff UI could be improved, for instance by improving the initial CircularProgressIndicator (with a "Next question is being loaded..." dialog for instance?)

Fixes bug(s)

Fixes: #3249

Codecov Report

Merging #3336 (497996a) into develop (a141bdf) will increase coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop    #3336      +/-   ##
===========================================
+ Coverage    10.49%   10.50%   +0.01%
===========================================
  Files          253      253
  Lines        12313    12297      -16
===========================================
  Hits          1292     1292
+ Misses       11021    11005      -16

Impacted Files
Coverage Δ

...h_app/lib/background/abstract_background_task.dart
0.00% <0.00%> (ø)

...h_app/lib/data_models/onboarding_data_product.dart
0.00% <0.00%> (ø)

...ooth_app/lib/pages/hunger_games/question_card.dart
0.00% <0.00%> (ø)

...ooth_app/lib/pages/hunger_games/question_page.dart
0.99% <0.00%> (-0.08%)
:arrow_down:

...pp/lib/pages/product/common/product_refresher.dart
2.04% <0.00%> (-0.24%)
:arrow_down:

...ges/smooth_app/lib/pages/product/summary_card.dart
0.00% <ø> (ø)

...es/smooth_app/lib/query/barcode_product_query.dart
0.00% <0.00%> (ø)

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

Thank you @AshAman999 for your review!


Showcase ui enhancements

Fixed margins between sections
Size text sections to ~60 characters width
Centered showcase description
Fixed header spacing on text sections
Stronger initial background opacity
Increased caption readability

:+1:

:+1:


envoy: optimise getWildcardNetworkPolicyRule()

Introduce identity.NumericIdentitySlice to be used instead of bare []identity.NumericIdentity. This allows use of the new NumericIdentitySlice.AsUint32Slice() function, that returns the slice of numeric identities as a slice of uint32s without allocating and copying memory. This is possible since identity.NumericIdentity is defined as uint32.
Use this new NumericIdentitySlice.AsUint32Slice() in Envoy policy updates to make them more efficient.
Optimise getWildcardNetworkPolicyRule() by not using a map to dedup numeric identities, but using the new generic SortAndDedupSlice() to sort and deduplicate in place.

/test

/test

Addressed comments, rebased!

closed accidentally, reopening...

/test

/test

/test

Cool! Could you confirm if it's safe for NumericIdentitySlice to reference the same memory as the passed []NumericIdentity? Earlier, we used to copy the results, so this didn't matter. It's not obvious to me why this change is safe without any additional locking. There is a note that says the slice must not be modified - https://github.com/cilium/cilium/blob/main/pkg/policy/selectorcache.go#L34-L34. How do we ensure this contract holds true - https://go.dev/play/p/j1lRJQ4jSP2?

Slice returned by GetSelections() is promised (by the selector cache) to not be modified, so no locking is needed. By convention none of the recipients should then modify the returned slice either. Unfortunately Go does not give us any tools in enforcing this invariant.
In this particular case, we add the use the underlying slice in Network Policy resources for Envoy in our xDS cache. These resources are by design not to be modified once placed in the cache, so we should be fine here.

/test

Rebased to resolve merge conflict due to #27805 merged in the meanwhile.

/test


Add support for Edge TestRuns

After some hacking around I was able to run Edge via Sauce (using the add-running-script branch). The full run (even running with --processes=2) took 3 days. The main source of latency is that we need to tear down the session every time a test fails - we might want to file a bug to look into optimizing that.
I also cleaned up some of the handlers to be less hard-coded. Once browsers.json lands (#47), we should be able to remove any hard-coding from all of the routes.
Specifically this PR:

Adds the Edge logo to /static/
Adds sample Edge summary JSON data to /static/
Adds an Edge TestRun to the entities that get created in /tasks/populate-dev-data
Adds edge as a browser that's loaded on all test page loads

I deployed this branch at https://edge-dot-wptdashboard.appspot.com/

The main source of latency is that we need to tear down the session every time a test fails - we might want to file a bug to look into optimizing that.

--no-restart-on-unexpected

@jgraham I'll try that out! Do you know if that noticeably affects test result outcomes?


Max-height and overflow-scroll

I encountered the problem that if I have massive texts inside the editor, the editor becomes quite large. This is a problem, considering that I have to scroll up to the head of the editor every time I want to edit the content on the lower parts of of my text. It should be possible to add a max-height and overflow-y property to the input. I have not studied the files enough to verify my assumption, but I do not think it should be much of a problem.
Thank you for this amazing repo, it helps me a lot!

This issue is stale because it has been open for 60 days with no activity.

This issue was closed because it has been inactive for 7 days since being marked as stale.


Privacy/Personalization/Marketing Preferences

https://jira.corp.adobe.com/browse/PLAT-68848

@RussStringham  - Are there still open questions in this PR? Can you provide a list of all the stake holders who should review and approve this PR?

I'm still willing to incorporate dc:date if @lrosenthol can provide details or examples of how to use it.
CJM team has already approved PR.
Bikas Saha and Sandeep Nayak on AEP architecture team need to approve and have been providing feedback in other channels.
Someone on UPS team needs to approve (working with Mohit Garg, Guanghong Yang, Neeraj Goel, Bhavin Doshi, ...). We have had several meetings and email threads.
Someone on AEP/PQS/Data Lake team - meeting for first time later this week. Concerns not anticipated from this team.
Someone on XDM team

@RussStringham  - Can you also fix the json-lint errors on this PR?

Just wondering, is there a reason we use snake case in the enums for channels and camel case for the xdm keys? e.g. push_notifications vs xdm:pushNotifications

@aechow I don't know anything about these "channels" you speak of - but XDM keys are based on XMP (SO 16684), which uses camel case.

@aechow @lrosenthol I use snake_case for enum values, wherever enums are used, because that is the format I saw being used in other places. If enum values should use camelCase, I can make that change.

grep-ing the code, I see snake_case, camelCase and PascalCase all used for enums.


Use with angular single page router

Is there some trick to make this module work with angular router on a single page app? What I mean is, when using nodeJS for API and angular for front-end app, direct URL and API calls are secured, but clicking on menu links in angular app will just open the restricted page.
All I can think of is have angular router do a redirection if user data is not present, but maybe someone knows most elegant and secure way to do this.

Not sure I completely understand the situation (and I'm not 100% into Angular). However: If some parts of your single-page app shouldn't be seen by the client, then it should not have been loaded at all, or? All restricted content should be loaded on-demand (even in a single page app). Those URLs that are used to load the additional content can easily be restricted. If they return with a 401 your app knows that the content is restricted and can e.g. display a login field. All of that could be done on one single page


Composer installation issue?

[InvalidArgumentException]                                                                                Could not find package api-platform/postman-collection-generator at any version for your minimum-stability (stable). Check the package spelling or your minimum-stability
I get his when I run
php composer.phar require --dev api-platform/postman-collection-generator

Hi @mattpramschufer,
Indeed, it's a bug in the doc. You should better use php composer.phar require --dev api-platform/postman-collection-generator:dev-master for the moment, as this bundle is not stable yet. Check Composer doc for more informations.
Can you open a PR on current repo to fix this mistake in the doc please?

Well I did the PR before I actually tested it...
`Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for api-platform/postman-collection-generator dev-master -> satisfiable by api-platform/postman-collection-generator[dev-master].
- api-platform/postman-collection-generator dev-master requires api-platform/core ~1.1@beta -> satisfiable by api-platform/core[v1.1.0, v1.1.1].
- api-platform/core v1.1.0 requires phpdocumentor/reflection ^1.0.7 -> satisfiable by phpdocumentor/reflection[1.0.7].
- api-platform/core v1.1.1 requires phpdocumentor/reflection ^1.0.7 -> satisfiable by phpdocumentor/reflection[1.0.7].
- Conclusion: don't install phpdocumentor/reflection 1.0.7
Installation failed, reverting ./composer.json to its original content.
[`

Your error is up to api-platform dependency on phpdocumentor/reflection. You can search for an existing issue/PR on the dedicated repository: https://github.com/api-platform/core


Does higher work with hugging face Adafactor?

When I try to run https://github.com/brando90/higher/blob/master/examples/maml-omniglot.py i get this error:
args.scheduler=None
--------------------- META-TRAIN ------------------------
Starting training!
Traceback (most recent call last):
  File "/home/miranda9/automl-meta-learning/automl-proj-src/experiments/meta_learning/main_metalearning.py", line 441, in <module>
    main_resume_from_checkpoint(args)
  File "/home/miranda9/automl-meta-learning/automl-proj-src/experiments/meta_learning/main_metalearning.py", line 403, in main_resume_from_checkpoint
    run_training(args)
  File "/home/miranda9/automl-meta-learning/automl-proj-src/experiments/meta_learning/main_metalearning.py", line 413, in run_training
    meta_train_fixed_iterations(args)
  File "/home/miranda9/automl-meta-learning/automl-proj-src/meta_learning/training/meta_training.py", line 233, in meta_train_fixed_iterations
    args.outer_opt.step()
  File "/home/miranda9/miniconda3/envs/metalearning_gpu/lib/python3.9/site-packages/torch/optim/optimizer.py", line 88, in wrapper
    return func(*args, **kwargs)
  File "/home/miranda9/miniconda3/envs/metalearning_gpu/lib/python3.9/site-packages/transformers/optimization.py", line 577, in step
    update = self._approx_sq_grad(exp_avg_sq_row, exp_avg_sq_col)
  File "/home/miranda9/miniconda3/envs/metalearning_gpu/lib/python3.9/site-packages/transformers/optimization.py", line 508, in _approx_sq_grad
    return torch.mm(r_factor.unsqueeze(-1), c_factor.unsqueeze(0))
RuntimeError: mat1 must be a matrix, got 4-D tensor

related:

https://github.com/huggingface/transformers/issues/14574
https://stackoverflow.com/questions/70171427/adafactor-from-transformers-hugging-face-only-works-with-transfromers-does-it

https://github.com/facebookresearch/higher/issues/139

I also encountered a similar problem, did you solve it?


Multicombat borders

Adds a plugin that when active will draw lines along the edges of multicombat zones.
Source of coordinates: https://github.com/runelite/runelite/issues/1764#issuecomment-384809773

Fixes https://github.com/runelite/runelite/issues/1764

I think the "Merging is blocked" warning means this branch needs rebasing.

Seems like an excessive amount of commits for such a simple-looking plugin o.O

You should rebase this not merge commits

Still needs rebasing off master and rebasing down to a few logical commits.
git rebase upstream/master
git rebase -i HEAD~(number of commits to squash)

This loops through every border every render call? That can't be good for performance.

Probably not. Border segments within view could be calculated only when the character moves to a new tile.
How is this usually done? Check for a change of coordinates on tick?

Just spitballing here but you could separate them out into chunks and only get the neighboring X and do the calculations then. Or you could store them as a 2D array Array[x][y] = 0/1 and just get the nearest X tiles that way.
The file is rather large so I'm not sure how it is storing the data types. By boundary lines of multicombat?


Article Request: "What's this" Mnemonic + Password

Information about how the encrypted mnemonic works would be useful to have on the KB.
Inspired by the user report here: https://github.com/MyCryptoHQ/MyCrypto/issues/1935

https://github.com/MyCryptoHQ/support.mycrypto.com/pull/204


Improve ordering of results / weighting

This PR improves the way results are ordered.
In words we're prioritising:

Exact match (canonical)
Starts with first word (canonical)
Starts with any other word (canonical)
Exact match (synonym)
Starts with first word (synonym)
Starts with any other word (synonym)
Contains thing (canonical)
Contains thing (synonym)
Alphabetical

The order tries to prioritise obvious matches. If a match meets any of these rules, it gets given a score between 0-100. We later order by these scores.
A future country bias is possible by giving select countries a bias between 1-2. A bias of 2 doubles their score from the initial ordering. The scores are roughly worked out so that a biased country will move up the list, but perhaps not all the way to the top depending on how good the match is. This should hopefully balance likelihood of the country being picked with how good the match is.
Some good test cases:
uni - countries beginning with uni are prioritised, followed by synonyms.
stat - countries with state in their canonical name are prioritised, following those with state in their canonical name
ire- Ireland comes first, despite UK being biased 2x - as Ire is a match to canonical name whereas it's a synonym match to UK
king - UK comes first as we are biased higher. Followed by Kingman which is a canonical match, followed by synonym matches.
Poor test case:
br - UK comes first, over countries beginning with br - Brazil.
Future work:

Will need lots of cleanup.
Ideally we'd move pruning of duplicate results outside of ordering
Probably want something that prunes unlikely results before we get to ordering

There's a few styling nits and a commented piece of code that we can remove but given this is a prototype :shipit:.


Chromebook 11 HP: "xorg target does not work on Samsung ARM devices"

So yeah, i recently powerwashed my chromebook accidentally when i cleaned it. when i installed crouton again and downloaded xfce4, it refused to start because of the extension, then i got it and linux started but as a new window, which does not matter, but when i get to the top of the screen i get this notification box and that annoys me. so i tried to install xorg but i get this error.

#1415 is what you want to track


Use License url at master branch instead of develop

Basically it would be better to use License at master branch, even if this is example file.
e.x. Currently, magicalpanda/MagicalRecord does not have develop branch.

特にHockeySDKはdevelopがデフォルトブランチみたいですね。気づかずそのままURL貼っちゃいました。
MagicalRecordも当時はそうだったのかもしれません。
https://github.com/bitstadium/HockeySDK-iOS

Releases are in the master branch, current development in the default develop branch


Correctly delete pthread_keys

Expected behavior
You'd expect all memory allocated when creating a ThreadSpecificVariable to be deallocated when it goes out of scope.
Actual behavior
The pthread_key might actually never be deallocated as we never call pthread_key_delete.
SwiftNIO version/commit hash
all versions up to and including 1.1.0
Swift & OS version (output of swift --version && uname -a)
doesn't matter
Why this is hard
If we call pthread_key_delete in ThreadSpecificVariable's deinit (after turning it into a class), then the destructor passed to pthread_key_create will not be called anymore. That means we'd leak values that have been set to this ThreadSpecificVariable which is unacceptable.
That means we can only call pthread_key_delete if both the following conditions are met:

the ThreadSpecificVariable has been deallocated
all threads that had a value set to the ThreadSpecificVariable have exited (and therefore run the destructor passed to pthread_key_create)

The only way I could see that we achieve this is to store a Box<(ThreadSpecficVariable, T)>? in the pthread_setspecific because that way the ThreadSpecificVariable will be alive as long as all threads that have a value set.

fixed by #157

that's merged


gce: enable multi-queue SCSI

To getting better performance on GCP instances with SCSI local disks, google cloud document recommends to enable VIRTIO_SCSI_MULTIQUEUE flag on guestOsFeatures and following kernel parameter "scsi_mod.use_blk_mq=Y".
Fixes #418

Verified with https://jenkins.scylladb.com/job/scylla-master/job/releng-testing/job/next-machine-image/538

Please check if we don't need to enable dm_mod.use_blk_mq=y if you are using device mapper multipath - and you may be (even on local disks)

Please check if we don't need to enable dm_mod.use_blk_mq=y if you are using device mapper multipath - and you may be (even on local disks)

My laptop:
[ykaul@ykaul ~]$ sudo cat /sys/module/dm_mod/parameters/use_blk_mq
Y

To getting better performance on GCP instances with SCSI local disks, google cloud document recommends to enable VIRTIO_SCSI_MULTIQUEUE flag on guestOsFeatures and following kernel parameter "scsi_mod.use_blk_mq=Y".
Fixes #418

Are those instances relevant? We should be using instances with nvme interfaces. Are some instance types not available with nvme?
Please check that the kernel option survives a kernel upgrade.

The option was removed in torvalds/linux@6a23e05c2fe3c64ec012fd81e51e3ab51e4f2f9f

Please check if we don't need to enable dm_mod.use_blk_mq=y if you are using device mapper multipath - and you may be (even on local disks)

Same as SCSI, seems like it's enabled by default.
Also, we don't use device mapper on our image.

Unlike the GCE document says, we cannot verify MQ is enabled by cat /sys/module/scsi_mod/parameters/use_blk_mq, since built-in module dees not apperer on /sys/module, and scsi module is built-in module on Ubuntu GCE kernel.

This description was probably wrong, since /sys/module/scsi_mod/parameters/ itself is exists and there are some other parameters available but use_blk_mq is not available.
Correct reason is, same as device-mapper as @avikivity commented at https://github.com/scylladb/scylla-machine-image/pull/419#issuecomment-1345627101, the option was removed: https://github.com/torvalds/linux/commit/f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6
So, since linux 5.0, we always use multiqueue mode.

I think we should close this since we don't need patch.


</script> in script block breaks SFC parsing

Vue version
3.2.45
Link to minimal reproduction
https://sfc.vuejs.org/#eNp9jstqw0AMRX9l0DqegT427sSkP9HVbFxbpG4zDyTZpQT/e+WahjwgG4HOlXR0hNdS7DQi1OAFYzm0go3vh6nxbq0nGpLnjoYi5tCm/TaAcADDKGPRrMuJxcSft5bM1gTwbh1uArzo5n9nYANDLJmkim2xn5yTqo8hGd1ZA71amz+yMP1t6QN8iBSunRtT+drbLke308zRmGSIWPU57h7tg3161r9ZzrlFjtU75W9GUmOAzdlxp3BCqghTj4R0V3Y1eyG8ym6ki3MOaYb5FyirgIQ=
Steps to reproduce
Include </script> within a string in the script block
What is expected?
The template should still compile.
What is actually happening?
The <script> block is not correctly parsed.
System Info
No response
Any additional comments?
Upstream issue: https://github.com/nuxt/nuxt.js/issues/15624
Fuller reproduction: https://stackblitz.com/edit/github-mgrldc

I guess we have to avoid </script> string in <script> block since the compiler cannot perceive if it's a JavaScript string or the end tag when parsing SFC.
There's a workaround, splitting the string.
<script lang="ts" setup>
const myVar = "</" + "script>";
</script>

Shouldn't it easy to differentiate the two?

A note from #7944: the syntax highlighting in VS Code doesn't correctly handle this situation, while in the SFC playground, we can clearly see the first closing tag.

Is it possible to throw a more intuitive error message like a browser does?

I think maybe use regular expression to convert the / in the string into \/ before parser
https://play.vuejs.org/#eNp9UctSwjAU/ZVO1rSZEdxgYVCHhS7UUcdVNrW9lkDzmOQGcDr9d9NUakFll5xzb84jNbnWOtk6IFOSIghdZQjztODbeV2Lz7fMNE1K22tKe5rJ1OaGa4yqTJYzRtAyEllApz2XK2kxCrvRLGIkZYx243NGrvzu4RaREeFCK4OxyHSytkp6FzWTkd/qCP/uNApIi3mb7Z2RFaK2U0qd1JsyyZWgC89R4yRyAXGhxGKcXCSTS+/c4hBPwIr43aidBeMVGRkNHqce3IKJDcgCDJizYiezR4In3C/RVrNhsvEFoPV9ffDyJL6X0bwC86iR+z6PasiqSu3uA4bGQZ8gX0G++QNf232X5MlAcDZIjZkpATt6+fIAe3/uSaEKV31X/g/5DFZVrvXYjd04WXjbg7ng9i78Jpflq13uEaQ9hGqNhjbCfPiF2zPRf+yOk0nfYvMFORXuOg==


[ConstraintSystem] Diagnose more cases of invalid nil use during co…

…nstraint generation
Move check for nil destination of conditional casts to visitNilLiteral and
add support for nil? which wasn't previously detected.

@swift-ci please smoke test


Throw ObjectDisposedException on IManagedConnection if accessing one that's disposed

Little tipoff that users are doing something wrong. See #294

This is already supported by Npgsql. The following test passes:
        [Fact]
        public void using_disposed_managed_connection_should_throw_ObjectDisposed()
        {
            using (var container = ContainerFactory.Default())
            {
                var connection = container.GetInstance<IManagedConnection>();
                // initialise lazy connection
                var state = connection.Connection.State;

                connection.Dispose();

                var e = Exception<ObjectDisposedException>.ShouldBeThrownBy(()=>connection.Execute(cmd=> {}));
            }
        }

The message is: "Cannot access a disposed object. Object name: 'NpgsqlConnection'." This means we don't even need a test for it.

Closing this on then. Thanks @nieve


[KYUUBI #4530]  [AUTHZ]  fixbug support MASK_SHOW_FIRST_4 和 MASK_SHOW_FIRST_4 chinese data mask

Why are the changes needed?
To fix https://github.com/apache/kyuubi/issues/4530.

The reason for issue https://github.com/apache/kyuubi/issues/4530  is that MASK_SHOW_FIRST_4 and MASK_SHOW_LAST_4 mask types are currently implemented using the regexp_replace method, which only replaces English letters and digits, but ignores other languages, such as Chinese.
To fix this issue, I modified the regexp_replace method to treat Chinese characters as uppercase English letters, so they will also be masked properly.

How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

cc @bowenliang123 @pan3793

Overall, it is not in my favor to fix "Chinese" chars.
It would suggest we move one step back to discuss what range of the chars to fix (what about other languages or even other unicode chars) , what is the relation between regrex_replace to the purpose, and what possible solution in Spark or in Ranger (like how they do in Ranger's Hive plugin).

I think we should follow the same making rule implementation jas in Ranger's DataMasker. And just mask all the chars into "x" without classifying in upper/lower/digits or any type. @yaooqinn @huangzhir
（https://github.com/apache/ranger/blob/000db1cbeb0f8fed1e02e88edbdc80386023b515/plugin-nestedstructure/src/main/java/org/apache/ranger/authorization/nestedstructure/authorizer/DataMasker.java#L250）,
    private static String showFirstFour(String value){
        int length = StringUtils.length(value);

        return length <= 4 ? value : value.substring(0, 4) + StringUtils.repeat("x", length - 4);
    }

Let me summarize how this issue came about and how Hive, Spark, and Trino handle it.
Hive's data masking is implemented using the functions mask({col}), mask_show_last_n({col}, 4, 'x', 'x', 'x', -1, '1'), and mask_show_first_n({col}, 4, 'x', 'x', 'x', -1, '1') (see https://github.com/apache/ranger/blob/7f5b82bff2df72f20f5c41ba095406d354f8acf0/agents-common/src/main/resources/service-defs/ranger-servicedef-hive.json#L387).
                     {
				"itemId": 3,
				"name": "MASK_SHOW_FIRST_4",
				"label": "Partial mask: show first 4",
				"description": "Show first 4 characters; replace rest with 'x'",
				"transformer": "mask_show_first_n({col}, 4, 'x', 'x', 'x', -1, '1')"
			}

However, the implementation in the code ignores non-English character sets and simply returns the original data (see https://github.com/apache/hive/blob/7b3ecf617a6d46f48a3b6f77e0339fd4ad95a420/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFMask.java#L262).
      default:
        if(maskedOtherChar != UNMASKED_VAL) {
          return maskedOtherChar;
        }
        break;
    }

Regarding the related mask functions in Spark, there was a JIRA ticket (https://issues.apache.org/jira/browse/SPARK-23901) to add mask-related functions, but it was later decided that this was not a universal method, so the code was rolled back, and Spark does not currently have an implementation of mask-related functions.
Trino also does not implement these mask-related functions, but instead uses the regexp_replace function for data masking. However, Trino's regexp_replace function supports lambda expressions (see https://github.com/apache/ranger/blob/a0224b2fdef999b3e23e2374080df94bf38557a4/agents-common/src/main/resources/service-defs/ranger-servicedef-trino.json#L393).
{
        "itemId": 2,
        "name": "MASK_SHOW_LAST_4",
        "label": "Partial mask: show last 4",
        "description": "Show last 4 characters; replace rest with 'X'",
        "transformer": "cast(regexp_replace({col}, '(.*)(.{4}$)', x -> regexp_replace(x[1], '.', 'X') || x[2]) as {type})"
      }

I think we should follow the same making rule implementation jas in Ranger's DataMasker. And just mask all the chars into "x" without classifying in upper/lower/digits or any other language type. @yaooqinn @huangzhir
（https://github.com/apache/ranger/blob/000db1cbeb0f8fed1e02e88edbdc80386023b515/plugin-nestedstructure/src/main/java/org/apache/ranger/authorization/nestedstructure/authorizer/DataMasker.java#L250）,
    private static String showFirstFour(String value){
        int length = StringUtils.length(value);

        return length <= 4 ? value : value.substring(0, 4) + StringUtils.repeat("x", length - 4);
    }

If we don't refer to the implementations of Hive and Trino and there are no legacy issues, the natural way to implement data masking is to directly replace characters with "x". This PR is just a patch that fixes Chinese data masking and maintains some compatibility with Hive.

This PR is not quite persuasive to me for now.
I would like to see,

an explanation and implementation of different kinds of unicode chars. AndAgain Chinese is just one type of them, so PR
not sure relation between unicode chars and utf8 chars, whether in stored data itself or inside Spark engine
short of e2e test, to masking data in data in table
short of convincing test to test each case separately , all the ut mixed together , and part of tests limited to 3.2+

If this PR keeps to fix Chinese chars only (and only within the basic unicode range), I think I would not to pass it.
And I would like to hear any idea from  @yaooqinn  @pan3793 @Yikf @zhouyifan279

I think we have the following solutions::

Make no changes and keep the behavior the same as Hive. (Convert uppercase to 'X', lowercase to 'x', and number to 'n')
Add a solution to address the issue of Chinese character obfuscation. (Convert Chinese characters to '密')
Replace each character set in Unicode with a different character.
Replace all characters except English letters and numbers with a single character. (Add replacement for other characters, e.g., convert all other characters to 'U')
Treat all characters in the same way. (Convert all characters to 'X')
Other solutions are welcome.

I am willing to work towards everyone's ideas to solve this problem.

Add replacement for other characters, e.g., convert all other characters to 'U'

+1

hello ,I'd like to request your help to review my PR. Based on @bowenliang123 @yaooqinn  your feedback, I've made some changes to the code and re-submitted the PR. The changes include:
Replacing all non-English letters, numbers, and spaces with the letter 'U'. This will ensure that all Unicode character sets for all languages are properly masked.
Adding unit tests specifically for regexp_replace, maskShowFirst4, and maskShowLast4.
@bowenliang123 Could you please review my changes and let me know if there's anything else I can improve on? Thank you

Codecov Report

Merging #4643 (7754d74) into master (4c2f1e6) will decrease coverage by 0.03%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #4643      +/-   ##
============================================
- Coverage     57.64%   57.61%   -0.03%
  Complexity       13       13
============================================
  Files           579      579
  Lines         31901    31957      +56
  Branches       4263     4270       +7
============================================
+ Hits          18389    18413      +24
- Misses        11755    11780      +25
- Partials       1757     1764       +7

Impacted Files
Coverage Δ

...in/spark/authz/ranger/SparkRangerAdminPlugin.scala
72.72% <100.00%> (+8.25%)
:arrow_up:

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

The overall change looks good to me, except for minor revisions.

there  are 2 checks were not successful.
Error:  Plugin org.antlr:antlr4-maven-plugin:4.9.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.antlr:antlr4-maven-plugin:jar:4.9.3: The following artifacts could not be resolved: org.antlr:antlr4-maven-plugin:pom:4.9.3 (absent): Could not transfer artifact org.antlr:antlr4-maven-plugin:pom:4.9.3 from/to gcs-maven-central-mirror (https://maven-central-asia.storage-download.googleapis.com/maven2/): Connection timed out (Read failed) -> [Help 1]

Error:  Failed to execute goal on project kyuubi-spark-sql-engine_2.12: Could not resolve dependencies for project org.apache.kyuubi:kyuubi-spark-sql-engine_2.12:jar:1.8.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.spark:spark-streaming_2.12:jar:3.2.3 (absent): Could not transfer artifact org.apache.spark:spark-streaming_2.12:jar:3.2.3 from/to gcs-maven-central-mirror (https://maven-central-asia.storage-download.googleapis.com/maven2/): Connection timed out (Read failed) -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project kyuubi-spark-sql-engine_2.12: Could not resolve dependencies for project org.apache.kyuubi:kyuubi-spark-sql-engine_2.12:jar:1.8.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.spark:spark-streaming_2.12:jar:3.2.3 (absent): Could not transfer artifact org.apache.spark:spark-streaming_2.12:jar:3.2.3 from/to gcs-maven-central-mirror (https://maven-central-asia.storage-download.googleapis.com/maven2/): Connection timed out (Read failed)

These two errors seem to be caused by a network problem with connecting to https://maven-central-asia.storage-download.googleapis.com/maven2. After looking at other PRs, it seems that this issue is not unique.

Yea, the Google Maven Central mirror is not stable these days, I re-trigger the failed Job.

Error:  Plugin org.antlr:antlr4-maven-plugin:4.9.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.antlr:antlr4-maven-plugin:jar:4.9.3: The following artifacts could not be resolved: org.antlr:antlr4-maven-plugin:pom:4.9.3 (absent): Could not transfer artifact org.antlr:antlr4-maven-plugin:pom:4.9.3 from/to gcs-maven-central-mirror (https://maven-central-asia.storage-download.googleapis.com/maven2/): Connection timed out (Read failed) -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.antlr:antlr4-maven-plugin:4.9.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.antlr:antlr4-maven-plugin:jar:4.9.3

HI  @pan3793 ,There is still a check  not successful, and it seems to be a network issue. Could you please help to re-trigger the failed job again?

@huangzhir seems there is an un-addressed comment, and you can simply ignore the error caused by the network, the committer will check it before merging

Why is the filter condition where key=1 added everywhere

Based on @yaooqinn suggestion, the data preparation was moved to the setup method, which caused some changes in the data. The original test cases need to be modified by adding a where condition to keep searching for the original data. Maintain the integrity of the old test results.

Thanks, @huangzhir, for the hard-working and patience all the way thru.
Merged to master.

 It was my pleasure to contribute to this project.


Villages generate with vanilla stone and tree types.

Hello, I'm using the Gravitas2 modpack and would very much like to use ArborFirmaCraft in that pack. The problem is, with AFC installed, villages no longer generate using local wood and stone types, and use their vanilla counterparts instead.
Images of the issue: https://imgur.com/a/PWHZySK

Hello, I'm using the Gravitas2 modpack and would very much like to use ArborFirmaCraft in that pack. The problem is, with AFC installed, villages no longer generate using local wood and stone types, and use their vanilla counterparts instead.
Images of the issue: https://imgur.com/a/PWHZySK

Not having looked into this, this is probably going to be a problem with Gravitas as much as it's a problem with AFC, but obviously they aren't going to fix this for a mod that's not in their pack...
Odds are I am not going to be fixing this because it is a very niche case, and is probably hard to fix on my end. I'd say you should look into it, but if I remember correctly gravitas is ARR and maybe isn't open source? Idk, point is don't wait up at night wondering if I am fixing this, im probably not

I have already spoken with the development team of Gravitas about this issue, I believe they might be interested in adding the mod to their pack. The issue lies in the way AFC changes TFC's chunk data, which is apparently in a way that Gravitas can't hook into for their village generation. I will look into a way to fix it myself

I have already spoken with the development team of Gravitas about this issue, I believe they might be interested in adding the mod to their pack. The issue lies in the way AFC changes TFC's chunk data, which is apparently in a way that Gravitas can't hook into for their village generation. I will look into a way to fix it myself

Okay, I just took a quick look at this, and as I suspected this probably needs to be fixed on Gravitas's end:
The simplest fix, which seems to give different but not unreasonable wood types compared to the trees that actually are generating nearby is to do replace this line:
https://github.com/AllTheMods/Gravitas2/blob/7140ea8d033c48792cb6b5eba8aa197272f8e226/kubejs/server_scripts/worldgen/match_villages_wood.js#L15C10-L15C22
With this:
.get("afc:normal_forest")
A better fix would be to actually modify the script so that depending on whether the biome is an alpine, swampy, or normal height biome it will look at afc:alpine_forest, afc:swamp_forest, or afc:normal forest respectively.
Here's an example of the trees mismatching in an alpine village (though one kapok does generate inside the village):

It does seem like there are some other issues with this, though, like it doesn't seem that ATM knows what to do when the local tree type is added by AFC, as this village seems to have part of a house generating in a kapok area, and the rest all of the wood is replaced with air, which makes me think it tried to replace the blocks with "tfc:wood/log/eucalyptus" when that block doesn't exist and they want "afc:wood/log/eucalyptus". I don't know enough about kubejs scripting stuff to track this down much further, but I figured that might be a helpful start.

Also of note, is that a most villages do seem to work with this change, but like in this one the vanilla sandstone blocks aren't being replaced properly, which I doubt is my fault:


Allow custom wildcard wrap.

Related PR in extension repo: https://github.com/adieyal/sd-dynamic-prompts/pull/264#issue-1592117881

@akx I've done the modifications and written the tests. Hopefully the tests are adequate. 😺
Sorry for messing up the git history... Seems like I shouldn't use git rebase... 😢
I can reopen a pull request if this causes problems.

I merged these changes in a cleaner PR so I'm going to close this one. Thanks again for contributing the code.


Link points to the wrong page

"The ACPI notification ID. This parameter specifies the type of ACPI notification that PoFx is sending. For a list of ACPI notification IDs, see ACPI notifications."
The link "ACPI notifications" points to the page "Programming reference for Windows Driver Kit ". I would have expected it to show me stuff about ACPI notifications.

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

ID: a8a885ca-e592-d974-4651-07b51a6c1ce1
Version Independent ID: dd70ab29-cf5e-51d7-a6d5-5889d5ba81b8
Content: PEPCALLBACKNOTIFYACPI (pepfx.h) - Windows drivers
Content Source: wdk-ddi-src/content/pepfx/nc-pepfx-pepcallbacknotifyacpi.md
Product: windows-hardware
Technology: windows-devices
GitHub Login: @tedhudek
Microsoft Alias: tedhudek

The "power management framework" link also points the the WDK docs page.

Thanks @shaboinkin for the report.  I just updated the link to point to https://docs.microsoft.com/windows-hardware/drivers/kernel/acpi-notifications.
I also added a link from https://docs.microsoft.com/windows-hardware/drivers/kernel/acpi-notifications back to https://docs.microsoft.com/en-us/windows-hardware/drivers/ddi/content/pepfx/nc-pepfx-pepcallbacknotifyacpi.
Appreciate the feedback!


feat(day23): implement solutions

Confirming README and tests.

Codecov Report

Merging #19 (cea1283) into main (a28d26f) will increase coverage by 0.14%.
The diff coverage is 99.42%.

@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
+ Coverage   98.09%   98.23%   +0.14%
==========================================
  Files          43       45       +2
  Lines        4347     4866     +519
==========================================
+ Hits         4264     4780     +516
- Misses         83       86       +3

Impacted Files
Coverage Δ

Sources/Library/Amphipod.swift
99.03% <99.03%> (ø)

Tests/LibraryTests/AmphipodTests.swift
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


How can I read or receive messages

@gabrieldwight
First of all, thanks for the library, it is of great support for any research project.
I have a problem that I can't solve.
How can I read or receive the messages that a contact writes to me, I have already tried everything, I have configured the WebHooks from Meta, through the Glitch I can read the messages, but not through the methods of this project.
Could you give me a hand?

@InfoTI89 You can use Conveyor Extension to test your ASP.NET webhook endpoint locally as long as you have added the locally generated endpoint to Meta webhook subscription for testing then you can change to your production endpoint. For the sample project context, I used the conveyor extension for reading and receiving WhatsApp messages sent by the contact. One thing to note: You need to verify the endpoint generated by Conveyor to Meta if the generated verification token matches

thanks for the info, i will try it

@InfoTI89 Let me know if the conveyor extension solves your issue with receiving messages in the project context.

I'm trying, is there a test version of the conveyor? Currently it is asking me to make a payment to enable the settings.

For the custom settings, you will need the pro version. If you click access over internet it will generate the internet URL that can be used for testing when debugging the project.

Can you tell me why it tells me to start a project? Apologies in advance for the insistence.

You run your project in debug mode. Once the project is running, you click access over the internet, it will successfully generate a temporary internet URL for testing.


Add word count generator

In the list of exercises that need a generator #396 , I saw word-count. Once I started working on it, I found the template exercises/word-count/example.tt  but I couldn't find any generator associated to it, so I decided to modify the current template and create the generator that you can see in this PR.
The canonical-data.json file from x-common has less examples that the current version of word_count_test.rb Should I add these examples to x-common?

If the prior non-generated version of the test had more tests than what is in x-common, then we need to review the discussions that lead to that difference.
Do you feel like the additional tests are something that is Ruby specific?  Do you feel that the additional tests may be redundant or a good addition to other languages?

BTW: Thanks for jumping in here.

The additional cases are:
test_count_everything_just_once
test_handles_cramped_lists
test_with_apostrophes
test_with_quotations

I think this are valid test that cover cases that are not covered in the x-common cases

@pvcarrera create a PR in exercism/x-common adding the additional cases to the canonical-data.json file.

I think I need to update this branch/PR: Merge #451, then remove the generate-word-count scripts. Also, the generated tests don't follow the project style rules. I ran rubocop -a after the test cases where generated but, after the changes I did in #454, I realised that the test must be generated with the correct format.

Don't worry about updating the branch against 451, you should be able to rebase against master.
There is another change (unsure if it is in yet, though) that sets style enforcement/checks back to 0.  But this would also be on master.
The process for doing this would be on your fork of the project...

Done, I rebased, squashed and forced push.
I'm not sure if this is open to discussion, but this is my opinion about PRs workflow:
Rebasing an open PR rewrites the PR history, this means that comments are not synchronized with changes anymore. I don't usually rebase/force push once a PR is open, on the other hand, I add commits and merge master in the branch as many times as necessary. Once the PR is ready, I use the GitHub Squash and merge option. This reduces the PR to one commit but still keeps a link to the closed PR request where you can find the original code with its comments.

I was only stating about rebasing from master, since I changed how the Rubocop is behaving.
Thanks for the notes on the PR workflow.  It is very similar to how things are normally done here, though we reduce to "a few" if appropriate rather than always a single commit.
I did not realize we were ready for that, but you doing so, definitely signals that we are ready for "final approach" on this.

#451 Common generation script is now in master.

Cool, this PR is already up to date with #451

OK, I attempted to do a generate, might me doing something wrong since it changed recently.
Is that working for you?

I am using ASSIGNMENT=word-count make test-assignment to test it locally, it is coughing due to the line 68 in the tests.
running tests for: word-count
/tmp/word-count.CuENNcRPR7/word_count_test.rb:68: syntax error, unexpected tIDENTIFIER, expecting ')'
    phrase = Phrase.new('First: don't laugh. Then: don't cry.')

Looks like its due a to a use of single quotes as you mentioned in https://github.com/exercism/xruby/pull/463.  I pulled locally and changed the object_under test method as so
  def object_under_test
    "Phrase.new(\"#{input}\")"
  end

Output:

"Phrase.new(\"#{input}\")"

This will still break if the string contains double quotes.
Much better to find a solution that correctly escapes quote characters.

@Insti The input string comes from a json file, example: "input": "Joe can't tell between 'large' and large." I guess if one of the strings contains a double quote it'll come scaped, something like: "input": "Joe can't tell between \"large\" and large."

It's still a problem because the json is parsed before we try to insert it.
Example:
require 'json'
json = { :example => 'Contains " double quote' }.to_json
puts json
input = JSON.parse(json)['example']
puts %Q(Quote not escaped "#{input}")

Output:
{"example":"Contains \" double quote"}
Quote not escaped "Contains " double quote"

This might work though:
%Q(Quote now escaped #{input.to_json})

(Note that the surrounding quotes are now provided by the .to_json method.)

I think this is pretty much ready now. :+1:
@kotp?

Thanks for all your work on this @pvcarrera :heart:

I'm really happy to help, thanks a lot for all of your feedback 😍

Thanks @pvcarrera :tophat: to @Insti


Enable 🌈colored🎨 output in GitHub Actions

Ooo, shiny!

The disadvantage is that the ANSI escape characters for terminal colors appear in the raw GHA logs.
2022-04-10T14:17:54.5774565Z 37: ==================================== ERRORS ====================================
2022-04-10T14:17:54.5778925Z 37: ________________________ ERROR collecting test session _________________________
2022-04-10T14:17:54.5783471Z 37: ImportError while importing test module '/home/runner/work/skupper-router/skupper-router/skupper-router/tests/system_tests_delivery_counts.py'.
2022-04-10T14:17:54.5787311Z 37: Hint: make sure your test modules/packages have valid Python names.
2022-04-10T14:17:54.5790969Z 37: Traceback:
2022-04-10T14:17:54.5794775Z 37: /usr/lib64/python3.10/importlib/__init__.py:126: in import_module
2022-04-10T14:17:54.5799749Z 37:     return _bootstrap._gcd_import(name[level:], package, level)
2022-04-10T14:17:54.5804992Z 37: /home/runner/work/skupper-router/skupper-router/skupper-router/tests/system_tests_delivery_counts.py:20: in <module>
2022-04-10T14:17:54.5838247Z 37:     from proton import Message, Delivery
2022-04-10T14:17:54.5838810Z 37: /usr/local/lib64/python3.10/site-packages/proton/__init__.py:35: in <module>
2022-04-10T14:17:54.5839206Z 37:     from cproton import PN_VERSION_MAJOR, PN_VERSION_MINOR, PN_VERSION_POINT
2022-04-10T14:17:54.5839821Z 37: E   ImportError: cannot import name 'PN_VERSION_MAJOR' from 'cproton' (/usr/local/lib64/python3.10/site-packages/cproton.py)
2022-04-10T14:17:54.5840487Z 37: - generated xml file: /__w/skupper-router/skupper-router/skupper-router/build/tests/junitxmls/system_tests_delivery_counts.xml -
2022-04-10T14:17:54.5840916Z 37: =========================== short test summary info ============================
2022-04-10T14:17:54.5841160Z 37: ERROR
2022-04-10T14:17:54.5841433Z 37: !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
2022-04-10T14:17:54.5841868Z 37: =============================== 1 error in 0.17s ===============================
2022-04-10T14:17:54.5869747Z 39: collecting ... collected 0 items / 1 error

I like the coloring, looks nice but hate the special characters, makes reading the logs difficult

I like the coloring, looks nice but hate the special characters, makes reading the logs difficult

Ideally, one never has to open the raw logs, ever...
Downloading the logfile as a txt and filtering out the formatting escapes with
less -R 14.txt

works.
Maybe there is some browser extension to handle this when opening the raw log in browser....

@ted-ross showcase of a failure

The actual colors in the log depend on GitHub Color Theme. For example, with the selected theme in the picture below, failures are orange and passes are blue

Feel free to commit once you get the approval of @ted-ross

The "reddish" color has Ted's approval, as I understood in chat. If I understood wrong, I apologize and will promptly revert. The colour palette options that GitHub provides (see screenshot above) should allow individuals to perform colour adjustment if needed.


Emscripten is cleaning cache on every VScode startup

Brief Issue Summary
On startup this extention does em++ -x c++ -E -dM nul which triggers clearing cache on Windows. Cache takes about 5 minutes to rebuild so it's a deal breaker to use VSCode. Is there any workaround at least?
CMake Tools Diagnostics
No response
Debug Log
No response
Additional Information
No response

I did a little debugging and turns out, CMake extension calls compiler using small letter of harddrive which doesn't get normalized (?)
every time there's C:/... vs c:/ it actually triggers cache to be invalidated since for whetever reason Emscripten stores this path as some kind of "sanity hash"

This looks related to compiler querying which is something that the C++ extension is doing.  I'll transfer the issue over to cpptools for an evaluation.


Generated SDK of graphql handler doesn't work

It just returns null, it guess it's related to the way info is being parsed in graphql-tools-fork.

Not sure about the architecture here, but if you are able to share some code of what you are expecting vs what you got, I can take a look.

@yaacovCR We are taking all root operations from Query and Mutation, and wrap it with a function to make it available to run from the context. It's very similar to delegateToSchema, but as a function.
The current behaviour requires to pass context and info, but maybe we can bypass that later by wrapping all resolvers.
In this example: https://github.com/Urigo/graphql-mesh/blob/master/examples/postgres-geodb/src/mesh/additional-resolvers.ts#L8
I can only assume that it breaks because of the dependency in info variable, but maybe that's something we can solve somehow?
Because let's say the you have something like the in the example above:
// Schema A
type Node {
  id: ID!
}

type User implements Node {
  id: ID!
  username: String!
  name: String!
}

type Query {
   search(term: String): [Node!]!
}

// Schema B
type Location {
  id: ID!
  city: String!
  country: String!
}

type Query {
   locations(search: String!): [Location!]!
}

And then we would like to apply a schema extension, to connect the two together:
extend type Location {
  users: [User!]!
}

And to query it:
query locationsAndUsers {
  locations(search: "...") {
     id
     city
     country
     users {
        id
        name
     }
  }
}

We would like to have a function in context, to allow you to easily run search from schema A. The reason to have a function is the fact that we can later easily create type-safe typings for it.
The resolver will look like that:
export const resolvers = {
  Location: {
     users: (location, arg, context, info) => {
        return context.Users.search({ term: `location:${location.city}` }, context, info);
     }
  }
}

And I would expect the operation Query.search to be executed with the fragment of users, maybe with a spread to make the type explicit? something like:
query {
  search(terms: "...") {
     ... on User {
        id
        name
     }
  }
}

I can only assume that right now it fails and returns null because it unable to parse info correctly. @yaacovCR maybe it's something we can implement in graphql-tools-fork?  what do you think?

Sounds like a new graphql-binding...
Looks like you are passing the info object, are you sending that within the function in context to delegateToSchema? Where is that code?

@yaacovCR yeah exactly, it seems like the delegateToSchema behind the scenes is using the selection set as-is, while it needs to "transform" it, so it might needed to be done before running the actual resolver. Or maybe just create delegateToSchema manually with the extracted selection set.
I will push an example for that soon, and let you know.
Thanks!

@yaacovCR Ok so I managed to get this working, it's not perfect, but I guess it's fine for now.
The example is here: https://github.com/Urigo/graphql-mesh/tree/master/examples/postgres-geodb (see README)
So what I did is: the method I'm putting in the context is not the resolver of the root operation itself, but a method that executes delegateToSchema with the correct argument, but with the right selection set.
It's done here: https://github.com/Urigo/graphql-mesh/blob/master/packages/handlers/graphql/src/index.ts#L28-L37
This way, it makes sure that the selection set is being treated correctly, without the need to pass anything else but args, context, info.
It would like to improve that in the future, so right not the extension and the linking is defined as:
      extend type Geo_City {
        developers(limit: Int = 10): Github_SearchResultItemConnection!
      }

So behind the scenes, the implementation of developers field uses Github_search query field, so it must return the same value as the root operation (Github_SearchResultItemConnection).
It means that a query like that works:
query {
  allCities(orderBy: ID_ASC, condition: { name: "London" }) {
    nodes {
      name
      countrycode
      district
      developers {
        nodes {
          ... on Github_User {
            login
            avatarUrl
          }
        }
      }
    }
  }
}

And the custom resolvers that uses this binding is located here: https://github.com/Urigo/graphql-mesh/blob/master/examples/postgres-geodb/src/mesh/additional-resolvers.ts#L5-L13
This works, but what id I would like to eliminate the need for nodes and the fragment spread under developers? changing the definition of the field to developers: [Github_User!]! would be ideal.
But, at the moment it's not possible, because the delegation executions fails and returns just null - because when running Github_search it expect this structure because of the delegated operation.
The binding implementation can be controlled by us, and we do have strict resolvers signature, so right not it's failed on build time, which is great.
I think at some point, we'll allow developers to specify either info or fragment to fetch data with this kind of delegation, in order to make it simple to customize the fetched data (this way, it's simpler to create a fragment that will work with delegateToSchem, and then the user can manipulate the data before returning it).
What do you think: @yaacovCR

I think you can use HoistField transform to hoist nodes. Or you can just take nodes out of root fields, I guess...
I may be misunderstanding...


libgdx 1.93 changes - verify/fix that extension works with intel multi-os engine for ios

libgdx 1.93 changes - verify/fix that extension works with intel multi-os engine for ios

Update: July 10th 2016
there is branch ios-moe, but:
We need facebook SDK bindings first. Anybody knows how to do?

How about that I see an ios-moe package and Moe said they included the binding with 1.3 but I can't  compile

1.4.0 has ios-moe support now.


Memory leak on iOS 10 devices

There appears to be a memory leak occurring when using the scanner against iOS 10 devices.
I've created the following test case that allocates/deallocates successfully on an iPad with iOS 7.1.2, but will never dealloc the scanner on iOS 10.
Here's the app that I used in my test.  Just a standard Cordova (5.3.3) + barcodescanner (6.0.1) with the following index.html.
<!DOCTYPE html>

            <meta name="format-detection" content="telephone=no">
                <meta name="msapplication-tap-highlight" content="no">
                    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
                        <link rel="stylesheet" type="text/css" href="css/index.css">
                            <title>Hello World</title>

Apache Cordova

Connecting to Device

Device is Ready

Test scan

                Scan

I'm not entirely certain how to resolve something like this.  Here is some of the information that I've found so far.  I upgraded cordova to the most recent version and attempted to rebuild this app and encountered the same problem.
You can see based on the memory report between ios 10 and 7(and 9) that something is really not right.  The first memory report is from the iOS 10 device I'm testing with.  The second is iOS 7.  Each time the scanner loads, it increases the footprint of the application drastically, as well as taking up somewhere in the ballpark of 100-150 MB in the "Other Processes" area.

I'm not entirely sure what I'm looking for, but I've run the application in the instrument panel looking for leaks, and I don't really see anything nearly as large as the memory report is encountering.  Each scan seems to leak a negligible amount ( < 1 KB) on the instrument panel, so I'm not really sure how to trace this.
Is there anyone who would be able to assist me? My obj c knowledge base is lacking.

I've noticed that there appears to be a rather large IOKit allocation in the VM that i'm not sure where it's coming from. You can see here from the VM Summary that with the iPad it is not allocating these 100 MiB chunks, but does so in iOS 10. I'm still not really that sure where this is coming from or what would force these extra calls. It's every time the scanner is executed that one of these 26364 page, 102.88 MiB allocations occurs.  This is only happening on the iOS 10 device, and does not appear to be occurring at all on the iPad.

(Probably) the same issue here: I have an Ionic app with this plugin which works flawlessly on iOS 9. The same app on iOS 10 crashes on the 5th or 6th scan. When running the app from Xcode on the device, the error message in the output window is:
Message from the debugger: Terminated due to memory issue.
Looking at the memory consumption, the app starts out with about 35 - 50 MB and on each scan between 20 and 30 MB are added and never freed. When memory usage exceeds 150 MB the next scan reliably crashes the app.
I'm not sure how to proceed. Since the bug is only present with iOS 10 beta and not in iOS 9 it might have to be resolved by Apple, not the barcode scanner plugin?

I don't even get the message from the debugger with my testing.  It just crashes the connection and shows nothing.
I have however found that the leak of 100 MiB per scan is tied to this line in the -setUpCaptureSession method:
    NSDictionary* videoOutputSettings = [NSDictionary                                          dictionaryWithObject:[NSNumber numberWithInt:kCVPixelFormatType_32BGRA]                                          forKey:(id)kCVPixelBufferPixelFormatTypeKey                                          ];
I removed that from the plugin and it appears to leak a good amount less than before.  The only issue that I am having difficulty with right now is understanding why this is a leak now in iOS 10, and where the 10-15 MiB leak is in the application itself.
Removing that line has made it so that it takes about 20-30 scans before I can crash the application.  It will only seem to crash after the application leak manages to get to critical mass (highest I've gotten so far in testing is 515 MB).
I believe it has something to do with the capture stream from the AVCaptureSession/AVCaptureVideoDataOutput but I just don't understand enough about what I'm looking at/into to really find the correct course.
The majority of the leaked memory seems to be dirty IOKit VM allocations that just float there forever.

It's the same here with an iOS 9.3.5:
after ~30 scan the app crash.
Temporary solved using Telerik-Verified-Plugins/BarcodeScanner
hope this helps..

ok, don't know why, but removing the animation breaks everything again (always after ~30 scan) -> 3d8e3922d8ee79cc5a030c36ee59efb1ea1ac234
I think could be something here (check the differences):
phonegap/src/ios/CDVBarcodeScanner.mm
- (void)barcodeScanDone:(void (^)(void))callbackBlock {
    self.capturing = NO;
    [self.captureSession stopRunning];
    [self.parentViewController dismissViewControllerAnimated:YES completion:callbackBlock];

telerik/src/ios/CDVBarcodeScanner.mm
- (void)barcodeScanDone {
    self.capturing = NO;
    [self.captureSession stopRunning];
    [self.parentViewController dismissViewControllerAnimated: YES completion:nil];

and telerik:
- (void)barcodeScanSucceeded:(NSString*)text format:(NSString*)format {
    dispatch_sync(dispatch_get_main_queue(), ^{
        [self barcodeScanDone];
        AudioServicesPlaySystemSound(_soundFileObject);
        [self.plugin returnSuccess:text format:format cancelled:FALSE flipped:FALSE callback:self.callback];
    });
}

phonegap:
- (void)barcodeScanSucceeded:(NSString*)text format:(NSString*)format {
    dispatch_sync(dispatch_get_main_queue(), ^{
        [self barcodeScanDone:^{
            [self.plugin returnSuccess:text format:format cancelled:FALSE flipped:FALSE callback:self.callback];
        }];
        AudioServicesPlaySystemSound(_soundFileObject);
    });
}

I saw no change with what you mentioned here.  The difference between the Phonegap and Telerik versions of the scanner is how they perform the barcodeScanDone event.  That was the only change I saw between the two.  Regardless of that, I was still able to encounter the small memory leak with the scanner.
There still appears to be something around a 10 MB allocation that I cannot find and cannot seem to release from some aspect of the AVCaptureSession.  The allocation occurs when the AVCaptureSession is started, but doesn't dealloc after stopping the session.  It appears to be another smaller IOKit allocation.

I don't think so that the callback on barcodeScanSucceded is the problem. I think could be a issue of iOS 10 that doesn't release the memory because in iOS 9 it's working fine. We can see at the fallowing link https://forums.developer.apple.com/thread/61620 that other developers have a problem with the AVCaptureSession that it is a class that the library uses.
I have another seem issue with the iphone 4s but with iOS 9.3.5 and after a few times the app crash . Has someone had the same problem?

That forum post is my post regarding this issue.  As for the issue appearing on other platforms, I have an ancient iPad (i think first gen) and an iPhone 5c that were running the scanner without issues.  It sounds similar to what I'm encountering on iOS 10, although I'm not specifically encountering the issue.
The biggest problem so far that I've found is tied to the video output settings.  That is what is causing the 100 MiB allocations for IOKit.  I was able to verify that by changing to another setting (420YpCbCr8BiPlanarVideoRange and 420YpCbCr8BiPlanarFullRange) for testing sake and seeing that the memory is not being allocated in the same manner.  Obviously the scanner doesn't work correctly with different settings, but there still remains a small increase in the application footprint.
I'm still investigating this, but time is running out on my end and I'm running out of resources.

Hello guys,
I investigated for this issue and i found the problem on the c++ class.
A lot of objects are still in the memory also when barcode viewcontroller is closed (to see the picture below).

So we must delete those files because every time that we open the barcode viewcontroller it takes from 20 to 30 mb so it's a big problem.
I tried to investigate on the C++ code but i don't understand everything so i need of help.

The problem persists with iOS 10 final and plugin version 6.0.2.
With an iPhone 6s Plus the app dies on the third scan.

Guys i created a new plugin and i fixed this issue.
To use it you need to delete the native classes and to add my classes and you can see the difference.
Mole93/plugin-barcode-ios

@mole93 could you submit a PR to the main project to fix the memory leak? Thanks for your work!

@startupfoundry I can't because i changed completely the core logic of this plugin.
I deleted all classes (native) of this plugin and i copied the interface with javascript after i integrated this barcode library (MTBBarcodeScanner) as core of my plugin.
So i think that i can't create a PR with my fixed but i ask you to try my plugin and you can see the difference. It's faster and it uses only 3/4 mb for the process. It is a very good solution for the performance because the problem with the official plugin is the C++ classes because they create a lot of memory leak. I analyse the code and i saw that there are a lot of objects which are deleted but they forget to delete the sub object so the still in the memory.

Based on what I can see from @Mole93's branch and the plugin he cloned, it looks like I might have a working code base to resolve this issue.
I'm not entirely sure if it won't provide other issues, because the core of his alternate scanner logic uses an AVCaptureMetadataOutputObjectsDelegate and the underlying metadataOutput structure to replace the AVCaptureVideoDataOutputSampleBufferDelegate and the zxing library to identify the barcodes.
If my testing confirms this, I will submit a PR with the alternate methods.

@jlowe234 awesome. Thanks for your work on this guys!

Hey guys, have a release date the 6.0.3 with this fix? I have the same issue here!

@jlowe234 are you comfortable using your version in a production environment?

I do feel comfortable with it.  I'm awaiting sign off on an update with one of my apps that contains the submitted changes.  My testing has been great so far.
I believe the only possible issue area is with UPC-A and EAN13 formatting because that has been slightly modified to fit with the new metadata structure.  Admittedly, the majority of my app's barcode capabilities are related to QR.

I still have the same issue with the latest version of this plugin. It happens to the iPhone 6, iOS 10 after the 4th scans. App crashed.

I have the same issue. Works perfectly on iOS 9, but crashes on iOS 10 after opening 3-4 times.
iPhone 5S
Version 10.0.1
Barcode Scanner version 6.0.1

I was having the same issue so I initially switched to @Mole93's plugin and it solved the crashing problem but it was very slow in comparison.
I then manually copied the RAW contents of the CDVBarcodeScanner.mm file from @jlowe234's pending pull request and replace the contents of ./plugins/phonegap-plugin-barcodescanner/src/ios/CDVBarcodeScanner.mm in my project and executed the following command cordova platform remove ios && cordova platform add ios && cordova buid ios
It's now working fine. No crashes, no memory leaks. Thanks @jlowe234 & @Mole93!

Any plans to include @jlowe234's pull request any time soon?

Honestly this needs to be merged ASAP. This bug causes crashes for every iOS 10 user (Over 30%+ of iPhones have already updated to 10).

Not so clean but you can reference a github branch as a plugin, so here's a "don't do this at home" way:
inside your cordova.xml
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jlowe234/phonegap-plugin-barcodescanner.git#leak#312" />

quick & dirty

@lesion thanks, you saved me :)

@lesion i'm using that plugin (https://github.com/jlowe234/phonegap-plugin-barcodescanner.git#leak#312) but now i got a new problem, the app stoped to scan some kinds of codes, like this one:

Please can someone help me?
thanks so much.

What kind of field/variable are you scanning into? I just scanned that code in my application using the plugin and received the entire barcode.  It was identified as code 128 and printed all 30 characters.  Is it possible that the field you're printing to has a character limit?

thanks for answering, i don't think so, bacause i changed the puglin in order to fix memory leak but using the publing old version that worked.

#338 should be merged ASAP as it address this as well as adds new formats to iOS using iOS native functionality, IMHO.

So i tried
using the puglin:

It scans: 42010010 (only the first part, and don't have memory leak)
using the plugin:

It scans:<PHONE_NUMBER>61290100106971583637 (ok, but using this version i have problem if memory leak).

I'm trying to find why the plugin is getting only the first part, i think is sothing here:
//--------------------------------------------------------------------------
// convert metadata object information to barcode format string
//--------------------------------------------------------------------------
- (NSString*)formatStringFromMetadata:(AVMetadataMachineReadableCodeObject*)format {
    if (format.type == AVMetadataObjectTypeQRCode)          return @"QR_CODE";
    if (format.type == AVMetadataObjectTypeAztecCode)       return @"AZTEC";
    if (format.type == AVMetadataObjectTypeDataMatrixCode)  return @"DATA_MATRIX";
    if (format.type == AVMetadataObjectTypeUPCECode)        return @"UPC_E";
    // According to Apple documentation, UPC_A is EAN13 with a leading 0.
    if (format.type == AVMetadataObjectTypeEAN13Code && [format.stringValue characterAtIndex:0] == '0') return @"UPC_A";
    if (format.type == AVMetadataObjectTypeEAN8Code)        return @"EAN_8";
    if (format.type == AVMetadataObjectTypeEAN13Code)       return @"EAN_13";
    if (format.type == AVMetadataObjectTypeCode128Code)     return @"CODE_128";
    if (format.type == AVMetadataObjectTypeCode93Code)      return @"CODE_93";
    if (format.type == AVMetadataObjectTypeCode39Code)      return @"CODE_39";
    if (format.type == AVMetadataObjectTypeITF14Code)          return @"ITF";
    if (format.type == AVMetadataObjectTypePDF417Code)      return @"PDF_417";
    return @"???";
}

it is possible the plugin is not identifying the right barcode type?

i fixed it, the problem was the plugin return a special code:

it can fix:
(("" + result.text).replace(/[\x00-\x1f]/g,'-')).replace(/-/g,'')
thanks.

I took the project that I had from the first post and updated the plugin with the source from my repo.  My barcode scans were as follows for the above two codes:
Barcode 1 -
Format: CODE_128, Text:<PHONE_NUMBER>05518922818001123454
Barcode 2 -
Format: CODE_128, Text:<PHONE_NUMBER>61290100106971583637
Both codes appear to be correct based on what I could look up on the USPS tracking number format. The prefix is 420 + 5 digits (destination ZIP) plus the displayed numbers under the code.
I really can't tell you what could be wrong without seeing a project that can reliably reproduce the issue.  Do you have a small project that you can share which will demonstrate your reported issue?

I use  https://github.com/jlowe234/phonegap-plugin-barcodescanner  plugin  to scan  barcode, but  I can't scan  follow  barcode:

I need to help.
thanks

What kind of barcode is that? Does it scan with the existing plugin?
I could not get that barcode to scan with my branch of the plugin nor the current version of the plugin.

jlowe234, Thank you so much!
I can confirm that using your branch fixes the "crashes after X scans" and adds Code93 recognition.
It also added a bonus feature I was going to look into coding: How to scan ONLY where the red line crosses the image!
You do great work, and I hope that this (and your other) pull requests are merged in soon!

Same - I'm anxious for pull request #338 to be merged. There are only a few companies out there who all want $1000s a year for PDF417.  When merged, I'm going to find a way send you a $ tip, jlowe234.

@caixiang2014 this code looks be Codabar type.

If that is codabar, it is not supported with the ios version of the plug-in. That would be something that you would need to open a separate issue regarding. There are a few other Barcode variants that can be added via the AVMetadata change in my PR but I am unfamiliar with them so I did not add them.

Hi folks,
Thanks a lot for figuring this out and of course a HUGE THANKS to @jlowe234 for his PR which I've just merged and released as part of 6.0.3 🎉

The barcode scanner is still crashing for iOS 10 after 4-5 trials of opening/closing the camera. Is anyone else having this issue still? If not, I am testing in Ionic View and haven't tested and compiled to a native app yet, so this may be the issue - but I doubt it.
iPhone 5S
Version 10.0.1
Barcode Scanner version 6.0.1

I tested on iPhone 6 with IOS 10.0.2 and I don't see any crashing. I tested after compiling to a native app.

@osirisr Ionic View is not running the latest barcodescanner plugin version. By its very nature it's lagging behind.

@EddyVerbruggen Well I use the command cordova plugin add phonegap-plugin-barcodescanner and then when I check for the installed version using cordova plugin list I get this: phonegap-plugin-barcodescanner 6.0.3 "BarcodeScanner"
It is returning version 6.0.3, which I assume is the same as the version 6.0.3 that's here on Github... Right?
@dmgfjaved - I have iOS 10.0.1 ... it could be that this fix only works for iOS 10.0.2+
I'll provide an update once I compile to native app.

@osirisr You said "I am testing in Ionic View" which according to the Apple AppStore has a latest version of September 1st so your runtime doesn't include version 6.0.3 of the barcode scanner plugin. Also, check the list of plugin versions supported by Ionic View here.

I think the fix is actuallybpart of release 6.0.3.
On Sunday, 23 October 2016, osirisr<EMAIL_ADDRESS>wrote:

The barcode scanner is still crashing for iOS 10 after 4-5 trials of
opening/closing the camera. Is anyone else having this issue still? If not,
I am testing in Ionic View and haven't tested and compiled to a native app
yet, so this may be the issue - but I doubt it.
iPhone 5S
Version 10.0.1
Barcode Scanner version 6.0.1
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/312#issuecomment-255571413,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AJNaXP-3ngeSGWx89TitktxvivveixJ-ks5q2vfXgaJpZM4JtiVZ
.

@EddyVerbruggen I was unaware that Ionic View does not use the cordova plugin version you have installed in the project. After compiling and running on iOS 10.0.1 iPhone 5S, the barcode camera is no longer crashing! Thank you!

Issue is still there with 6.0.3 for me.  is there a workaround, even temporarily I need to get an update of my app pretty quickly.
Many thanks

you can use my plugin plugin-barcode-ios to fix this issue very quickly

Thx @Mole93 , that is brilliant I am now using your plugin.
It seems that I lost the red line on the capture window . I only got the green square.
Is there an option to enable the red guide line ?

@jaguarg which red line? Do you have any img that you can show me?

That's what I use to have ... now I only get the green box ...

@jaguarg ok, I got it. Can you open the issue on my plugin, please? I'll fix it soon

done.
Thank you so much for your help  .

Any update on this issue? I'm still having this issue on iOS 10.1+


Update to sass

node-sass is depreciated:
https://www.npmjs.com/package/node-sass
dart-sass JS API is a drop-in solution for replacing node-sass and is the recommended replacement for node-sass.
https://www.npmjs.com/package/sass

I've updated the permissions so you can remove this during the PR.

I've updated the permissions so you can remove this during the PR.

Thanks again @vandenbosm!

Thanks again @vandenbosm!


Fix Typo in AcfFieldJSON namespace

AcfFieldJson was an incorrect Namespace, I've replaced it to the correct one

Thank you very much, merging