Index reorganize fails due to being deadlock victim

Issue:
On occasion, I have had index reorg/rebuilds fail due to deadlock
Output:
"Transaction (Process ID ## was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction."
Params:
@Databases nvarchar(max) = NULL,
@FragmentationLow nvarchar(max) = NULL,
@FragmentationMedium nvarchar(max) = 'INDEX_REORGANIZE,INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationHigh nvarchar(max) = 'INDEX_REBUILD_ONLINE,INDEX_REBUILD_OFFLINE',
@FragmentationLevel1 int = 5,
@FragmentationLevel2 int = 30,
@MinNumberOfPages int = 1000,
@MaxNumberOfPages int = NULL,
@SortInTempdb nvarchar(max) = 'N',
@MaxDOP int = NULL,
@FillFactor int = NULL,
@PadIndex nvarchar(max) = NULL,
@LOBCompaction nvarchar(max) = 'Y',
@UpdateStatistics nvarchar(max) = 'ALL',
@OnlyModifiedStatistics nvarchar(max) = 'N',
@StatisticsModificationLevel int = NULL,
@StatisticsSample int = NULL,
@StatisticsResample nvarchar(max) = 'N',
@PartitionLevel nvarchar(max) = 'Y',
@MSShippedObjects nvarchar(max) = 'N',
@Indexes nvarchar(max) = NULL,
@TimeLimit int = NULL,
@Delay int = NULL,
@WaitAtLowPriorityMaxDuration int = NULL,
@WaitAtLowPriorityAbortAfterWait nvarchar(max) = NULL,
@Resumable nvarchar(max) = 'N',
@AvailabilityGroups nvarchar(max) = NULL,
@LockTimeout int = NULL,
@LockMessageSeverity int = 16,
@DatabaseOrder nvarchar(max) = NULL,
@DatabasesInParallel nvarchar(max) = 'N',
@LogToTable nvarchar(max) = 'N',
@Execute nvarchar(max) = 'Y'
Version:
2019-02-10 10:40:47
SQL Server Version:
Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64)   Nov 30 2018 12:57:58   Copyright (C) 2017 Microsoft Corporation  Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0  (Build 14393: ) (Hypervisor)
What Command?
dbo.IndexOptimize

It is by design that deadlocks can happen when you reorganize an index in SQL Server.

Yes, but could the process be coded to continue processing other indexes on the other tables in the database vs stopping and leaving them fragmented?


resolve race condition problem

I found a race condition problem which cause to throw NoSuchPropertyException when there are to many threads since version 3.1.2. Although it was resolved by trying to call method of "getReadMethod", it will loss some performance,  I think it is the best way  to resolve  race condition.

@harawata @JCgH4164838Gh792C124B5 @yasserzamani maybe you would like to also check this change.

Thank you, @rolandhe !
And thank you for the heads-up, @lukaszlenart !
I just took a quick look and didn't find any logical issue. 👍

Hello @rolandhe .  Thank you for reporting the race condition scenario (and thanks to @lukaszlenart for advising about the PR conversation).  👍
I read the proposed code changes in the PR and subsequent comments, but remain unsure if the proposed changes will work as intended.  Can you tell us approximately how many concurrent threads were involved (10's, 100's, 1000's, etc.) before the symptom started being evident ?
Also, could you provide a small example (inline in a comment here, or maybe a link to small reproducer project) that reproduces the condition (causing NoSuchPropertyException to be thrown with some consistency) ?
Since changes to the getGetMethod() and getSetMethod() could have some subtle side-effects to the behaviour and performance of OGNL (and the applications that use it), some extra caution may be needed when evaluating the proposed changes.  A reproducer, that can be used to cause the condition, would help evaluate proposed changes.
There may be a trade-off involved in changes to the "two-level-cache logic" that is currently in place for OGNL.  Structural changes to avoid the NoSuchPropertyException condition could change the performance characteristics of OGNL.  For that reason, the probability/frequency of the issue in OGNL 3.1.x should probably be considered against performance impacts.
If the race condition can be eliminated (or reduced) without any substantial reduction in performance, or other undesirable side-effects, that would be ideal.  If not, then it may be a "judgment call" as to what is "better" (and maybe even something requiring a flag/choice).
Thanks again, @rolandhe.  Any additional details you can provide will help out.  😄

Hello @rolandhe . Thank you for reporting the race condition scenario (and thanks to @lukaszlenart for advising about the PR conversation). 👍
I read the proposed code changes in the PR and subsequent comments, but remain unsure if the proposed changes will work as intended. Can you tell us approximately how many concurrent threads were involved (10's, 100's, 1000's, etc.) before the symptom started being evident ?
Also, could you provide a small example (inline in a comment here, or maybe a link to small reproducer project) that reproduces the condition (causing NoSuchPropertyException to be thrown with some consistency) ?
Since changes to the getGetMethod() and getSetMethod() could have some subtle side-effects to the behaviour and performance of OGNL (and the applications that use it), some extra caution may be needed when evaluating the proposed changes. A reproducer, that can be used to cause the condition, would help evaluate proposed changes.
There may be a trade-off involved in changes to the "two-level-cache logic" that is currently in place for OGNL. Structural changes to avoid the NoSuchPropertyException condition could change the performance characteristics of OGNL. For that reason, the probability/frequency of the issue in OGNL 3.1.x should probably be considered against performance impacts.
If the race condition can be eliminated (or reduced) without any substantial reduction in performance, or other undesirable side-effects, that would be ideal. If not, then it may be a "judgment call" as to what is "better" (and maybe even something requiring a flag/choice).
Thanks again, @rolandhe. Any additional details you can provide will help out. 😄

I committed example that reproduce condition exception, it is ognl.race.RaceTestCase#testOgnlRace,,before you run this code you should remove lines 2147 and 2148 of OgnlRuntime.java. Maybe you would run many times and then produce the "NoSuchPropertyException".

Hello @rolandhe (and everyone).
Thanks for providing the reproducer test code.  😄
Unfortunately, using the reproducer code I was unable to reproduce any failures or exceptions with the existing OGNL 3.2.16-SNAPSHOT code (many executions, with variations from a few threads to 1000s).  Adding an additional test that called the original test multiple times with varied numbers of threads and iterations, along with cache clears, did not generate any exceptions either.
I also tried the test code with the OgnlRuntime from this PR (both "as-is" and with lines 2147-2148 commented out), using the same sorts of tests against the original code.  There were no failures or exceptions in that case either.
It seems that in practical terms, the probability of the race condition in the original code appears to be very slight, otherwise we would expect to be able to reproduce it with some frequency (at least with 100's or 1000's of threads and many repeated runs).
I am not sure if the reproducer test, given it cannot (consistently) demonstrate the presence or absence of the race condition failure, should be included in the final revision of this PR ?   Others might have different thoughts on that.
The good news is that after running multiple builds, with both the old code and the new code from this PR, there were no indications of any observable performance differences between the two.   😄
With no apparent performance impact seen, the proposed OgnlRuntime logic change seems OK to me.  Good work!   👍  👏

Just FYI, here is the repro I used when investigating the NoSuchPropertyException before (1) (2) .
import ognl.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.*;
import java.lang.reflect.*;

public class GetGetMethodRaceCondition {
  public static void main(String[] args) throws Exception {
    int run = Integer.valueOf(args[0]);
    List<Future<Object>> futures = new ArrayList<>();
    ExecutorService executor = Executors.newCachedThreadPool();
    try {
      IntStream.range(0, run).forEach(i -> {
        futures.add(executor.submit(() -> {
          return OgnlRuntime.getGetMethod(null, String.class, "bytes");
        }));
      });
      for (int i = 0; i < run; i++) {
        if (futures.get(i).get() == null) {
          System.out.println("!!! ERROR !!!! at round " + i);
        }
      }
    } finally {
      executor.shutdown();
    }
  }
}

To reproduce the issue reliably, I had to use a shell script like the below.
#!/bin/sh

# compile
javac GetGetMethodRaceCondition.java -cp ognl-3.2.15.jar

echo ''
# run rounds
for i in {1..100}
do
  java -cp ognl-3.2.15.jar:javassist-3.27.0-GA.jar:. GetGetMethodRaceCondition 100
done

p.s.
The direct cause of NoSuchPropertyException was in getReadMethod and it was fixed in #104 , so 3.2.15 won't throw NoSuchProprtyException even with this race condition exist, I believe.

Hello @rolandhe (and everyone).
Thanks for providing the reproducer test code. 😄
Unfortunately, using the reproducer code I was unable to reproduce any failures or exceptions with the existing OGNL 3.2.16-SNAPSHOT code (many executions, with variations from a few threads to 1000s). Adding an additional test that called the original test multiple times with varied numbers of threads and iterations, along with cache clears, did not generate any exceptions either.
I also tried the test code with the OgnlRuntime from this PR (both "as-is" and with lines 2147-2148 commented out), using the same sorts of tests against the original code. There were no failures or exceptions in that case either.
It seems that in practical terms, the probability of the race condition in the original code appears to be very slight, otherwise we would expect to be able to reproduce it with some frequency (at least with 100's or 1000's of threads and many repeated runs).
I am not sure if the reproducer test, given it cannot (consistently) demonstrate the presence or absence of the race condition failure, should be included in the final revision of this PR ? Others might have different thoughts on that.
The good news is that after running multiple builds, with both the old code and the new code from this PR, there were no indications of any observable performance differences between the two. 😄
With no apparent performance impact seen, the proposed OgnlRuntime logic change seems OK to me. Good work! 👍 👏

Please copy test code to your MASTER branch code, NOT this PR code, then remove or comment next two lines:
   if (m == null)             m = getReadMethod((target == null) ? null : target.getClass(), propertyName, null);
then run the test code, maybe run many times, I tested five times, and reproduce.

Hi @rolandhe .
Sorry if it was not clear from the earlier comment, but I previously had copied and ran the test code against the master branch of OGNL 3.2.  I tested both with the original branch state for getMethodValue(), as well as with the two lines commented out, but did not see any failures in multiple runs.
Today I repeated the same tests again many times manually, and was finally able to reproduce the failure (using the original OGNL 3.2 OgnlRuntime, with the two lines commented out of getMethodValue()).  Without commenting out those two lines, I never saw the error being produced.
I also performed the test with the OgnlRuntime code from this PR in its original form, and with the same lines commented out in getMethodValue() for comparison, and did not see any failures in multiple runs.
Using a process like the sample @harawata provided above (thanks @harawata 😄 ), it was easier to produce the error more consistently as well.
Anyway, your PR's changes appears to eliminate the race without any noticeable side-effects.  Thanks for your work on this.  👏


How to add A custom reponse object type?

How can I makemy response object  of a custom type?

Currently the request and response objects are from Node.js and subclasses to be Express. You can change this, and I can provide an example, but just need more information about what you are trying to do, exactly, so I can provide an example for you.

I guess the issue is, I have a router and when ever it calls a get request. I want the object to be of a custom type. The reason for that is because if I leave it as its default type, it will assume some properties of req are undefined, when they can't be. I guess another solution would be to use extend the router, but apparently that isn't possible in express 4.17.1

What makes it not possible to extend the router? You can subclass it, and pass any type of request and response objects in to it. I can provide an example, but just need more information about what you are trying to do, exactly, so I can provide an example for you.

Oh, I was looking at this issue https://github.com/expressjs/express/issues/2768 which said that the router cannot be subclassed.

That answer may have been correct 5 years ago, but things change. I can better answer your question and/or provide an example, but just need more information about what you are trying to do, exactly.

element.get('/property/:propertyName', (req, res, next) => {   if (req.sessionRequest) {     req.sessionRequest.urlVariables.propertyName = req.params.propertyName;   }   return sessionEndpointExceptionHandler(     defaultSessionEndpointLogic,     COMMANDS.GET_ELEMENT_PROPERTY,   )(req, res, next); });
Here is one of my routes what I would want is the request param of this route to be of a custom type so I can avoid unnecessary null checks, that's all

That sounds like a feature Express offers right out of the box. Can you share how you envisioning setting up that value that would be in (req.sessionRequest) and I can provide an example for how to make that happen in Express?

That sounds like a feature Express offers right out of the box. Can you share how you envisioning setting up that value that would be in (req.sessionRequest) and I can provide an example for how to make that happen in Express?

I'm sorry, I don't quite understand what exactly you want

You said you want req.sessionRequest to be set to some object such that is would never be null thus to avoid null checks, right? Well, can you share how you would accomplish that, like what would req.sessionRequest be in that case, and how would it get the right values you want it to have?

Ah, yes of course. So, currently in the request object, sessionRequest is an optional paramater. If I change it to my custom object, it is guaranteed to exist, thus sparing me the null checks.

Right. So I'm saying, can you post the implementation for how you are setting the value in your custom object? Here is an example for how to do this in Express generically, but if you can provide your method, I can update my example to be more specific:
Object.defineProperty(app.request, 'sessionRequest', {
  get: () => { /* return your type here */ }
})

Oh, I meant I wanted to set req to a customObject. In this case I would want(req:Pluma.Request). This would cause the session request to be surely defined and avoid null checks. I am sorry if I was unclear earlier, also thanks for the swift responses.

Gotcha. So how are you constructing that custom object? Are you doing something like var customObject = new PlumaRequest(req) ?

const request: Pluma.Request = {
urlVariables: req.params,
parameters: req.body,
command: '',
};

Ah. So you need your request object to be some kind of subclass of our request, or you cannot pass it into the router. This is because it won't have enough information there to actual perform the routing.

can u provide an example by any chance, sorry I'm a bit new and confused

Right. So I'm saying, can you post the implementation for how you are setting the value in your custom object? Here is an example for how to do this in Express generically, but if you can provide your method, I can update my example to be more specific:
Object.defineProperty(app.request, 'sessionRequest', {
  get: () => { /* return your type here */ }
})

I can't use the above method as I am using a router for my many routes. Also, I should have mentioned  this object is my custom object and it does sublcass request. const customObject: Pluma.Request = {
urlVariables: req.params,
parameters: req.body,
command: '',
};

There is no method to provide a request object that is not a subclass of the HTTP request object. This is because the router needs the things like HTTP method and URL in order to route the request, so those have to be there in your object.

Yes, I forgot to mention, my object is a sublcass of the request object

Gotcha. So if you have a class that is a subclass of the Express request object, a very straight-forward way to make all the request objects in your app is to do the following:
app.request = PlumaRequest.prototype

That's the issue here. I don't want all request objects to be of type PlumaRequest. I want only the request objects on a certain router to be of type. For example I have
const element = express.Router();

``

I want all the get  routes of the element router to have the request as being typed PlumaRequest. Is that possible?

Ah, ok, I apologize; that wasn't clear to me before. There are many different methods. For example, you can create a subclass of the router itself which changes the objects to be your type of request, but the easiest method is simply an anonymous function at the use time:
app.use((req, res, next) => element(new PlumaRequest(req), res, next))

Oh ,thanks I think it would suit my needs better if I could do it by extending the express router. If you could provide a small example that would be ideal. Also, thanks for the quick responses and you patience, I'm a bit new to coding.

So express.Router is a standard constructor, so you would extend it like you would any other object. Here is an example:
function PlumaRouter () {
  express.Router.call(this)

  // do whatever init you want to do here
}
utils.inherits(PlumaRouter, express.Router)

// your methods and such here
// you probably want to override handle if you are wanting to change the request type
PlumaRouter.prototype.handle = function (req, res, done) {
  express.Router.protototype.handle.call(this, new PlumaRequest(req), res, done)
}

// and later:
app.use(plumaRouter.handle.bind(this))
// or
app.use((req, res, next) => plumaRouter.handle(req, res, next))

But if you want the nice app.use(plumaRouter), then you need to make your subclass be that puesdo javascript type. This is not specific to the Express router, just any class you want to make in javascript where the instance is a function instead of an object.
function PlumaRouter () {
  function plumaRouter (req, res, next) {
    plumaRouter.handle(req, res, next)
  }
  Object.setPrototypeOf(plumaRouter, this)

  // do whatever init you want to do here, but not on "this", on "plumaRouter"
  return plumaRouter
}
utils.inherits(PlumaRouter, express.Router)

// your methods and such here
// you probably want to override handle if you are wanting to change the request type
PlumaRouter.prototype.handle = function (req, res, done) {
  express.Router.protototype.handle.call(this, new PlumaRequest(req), res, done)
}

Thanks so much!

Router' is not a constructor function type.ts(2507) is an error I get when trying to extend the router as follows:
import express from 'express';
class PlumaRouter extends express.Router
{
//insert other code here
}


Unresolved reference in 1.2.0

After switching to 1.2.0 I've got an errors:
Unresolved reference 'whatIfNotNull'.
Unresolved reference 'whatIfNotNullOrEmpty'.
Errors appear in Android project and KMP project

Hey @Gizmodo, new version 1.2.1 has been released and now it fixes the issue. Thank you for your reports!


[flutter_plugin_android_lifecycle] update to android 29

Description
Update android sdk to 29. This plugin is a dependency of other plugins, so it has to be updated and published before updating other plugins.
Related Issues
part of https://github.com/flutter/flutter/issues/64396
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
[x] All existing and new tests are passing.
[x] I updated/added relevant documentation (doc comments with ///).
[x] The analyzer (flutter analyze) does not report any problems on my PR.
[x] I read and followed the Flutter Style Guide.
[x] The title of the PR starts with the name of the plugin surrounded by square brackets, e.g. [shared_preferences]
[x] I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy.
[x] I updated CHANGELOG.md to add a description of the change.
[x] I signed the CLA.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?

[ ] Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
[x] No, this is not a breaking change.

LGTM


Support for other browsers than firefox

Currently only Firefox is supported. Allow to configure the browser.

Well, the only reason i have chosen firefox is because the viewport was more predictable in that time.


Video freezes on Android

Describe the issue
After a few minutes of playing the video, it freezes.
With the same video, this happens at about the same time at a difference of a few seconds.
Logs:
11-08 13:20:27.770: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus Failed to readFile
11-08 13:20:27.770: E/MM_OSAL(1071): Read File Error!
11-08 13:20:27.770: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus VIDEO_FMT_FAILURE
11-08 13:20:27.770: E/MM_OSAL(1071): Mpeg4File::getSample FATAL starting at 5507377, size 337
11-08 13:20:27.770: W/NuMediaExtractor(29456): read on track 1 failed with error -1004
11-08 13:20:27.850: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus Failed to readFile
11-08 13:20:27.851: E/MM_OSAL(1071): Read File Error!
11-08 13:20:27.851: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus VIDEO_FMT_FAILURE
11-08 13:20:27.851: E/MM_OSAL(1071): Mpeg4File::getSample FATAL starting at 57596232, size 32069
11-08 13:20:27.851: W/NuMediaExtractor(29456): read on track 0 failed with error -1004
11-08 13:30:45.672: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus Failed to readFile
11-08 13:30:45.672: E/MM_OSAL(1071): Read File Error!
11-08 13:30:45.672: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus VIDEO_FMT_FAILURE
11-08 13:30:45.672: E/MM_OSAL(1071): Mpeg4File::getSample FATAL starting at 37037493, size 1860
11-08 13:30:45.672: W/NuMediaExtractor(30751): read on track 0 failed with error -1004
11-08 13:30:45.674: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus Failed to readFile
11-08 13:30:45.674: E/MM_OSAL(1071): Read File Error!
11-08 13:30:45.674: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus VIDEO_FMT_FAILURE
11-08 13:30:45.674: E/MM_OSAL(1071): Mpeg4File::getSample FATAL starting at 3663184, size 343
11-08 13:30:45.674: W/NuMediaExtractor(30751): read on track 1 failed with error -1004
11-08 13:30:46.870: D/(1049): DpmQmiMgr areAllIfaceActive
11-08 13:30:46.935: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
11-08 13:30:46.935: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'STATE' not found
11-08 13:30:46.935: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
11-08 13:30:46.935: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'UID' not found
11-08 18:08:06.387: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus Failed to readFile
11-08 18:08:06.387: E/MM_OSAL(1071): Read File Error!
11-08 18:08:06.387: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus VIDEO_FMT_FAILURE
11-08 18:08:06.387: E/MM_OSAL(1071): Mpeg4File::getSample FATAL starting at 2473320, size 361
11-08 18:08:06.387: W/NuMediaExtractor(14626): read on track 1 failed with error -1004
11-08 18:08:06.719: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus Failed to readFile
11-08 18:08:06.719: E/MM_OSAL(1071): Read File Error!
11-08 18:08:06.719: E/MM_OSAL(1071): Mpeg4File::mp4ReadStatus VIDEO_FMT_FAILURE
11-08 18:08:06.719: E/MM_OSAL(1071): Mpeg4File::getSample FATAL starting at 22387482, size 17010
11-08 18:08:06.719: W/NuMediaExtractor(14626): read on track 0 failed with error -1004
11-08 18:08:08.516: D/(1049): DpmQmiMgr areAllIfaceActive
11-08 18:08:08.569: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
11-08 18:08:08.569: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'STATE' not found
11-08 18:08:08.569: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
11-08 18:08:08.569: E/NetlinkEvent(1074): NetlinkEvent::FindParam(): Parameter 'UID' not found
11-08 18:08:08.702: I/mmid(822): select timeout: wait for receiving msg
11-08 18:08:10.049: I/Finsky(9321): [4202] com.google.android.finsky.bp.am.run(6): Stats for Executor: Db-verify_apps.db com.google.android.finsky.bp.an@9e941f6[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
11-08 18:08:10.710: I/Finsky(9321): [4202] com.google.android.finsky.bp.am.run(6): Stats for Executor: Db-scheduler com.google.android.finsky.bp.an@4ae39f7[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 11]
11-08 18:08:10.711: I/Finsky(9321): [4202] com.google.android.finsky.bp.am.run(6): Stats for Executor: InstallQueueDatabaseManager com.google.android.finsky.bp.an@fe22064[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]
Unity version
2017.4.3f
Operating system
Android

Unity 2018.1.0f2 the same thing happens

Hi @LeXuSMalus, thanks for the details - the Unity VideoPlayer on Android has a lot of open issues! What type of device and Android version are you using?
Can you try adding this:
if (Application.platform == RuntimePlatform.Android) {
 videoPlayer.Prepare();
}

To line 195 of - Assets/Vimeo/VideoController.cs, does this change anything during runtime?

Could not replicate the issue using Unity 2018.2.18f1 on Windows 10 (x64) and an Oculus Go Android device. Closing this issue but in case this is still causing problems feel free to re-open / open a new issue

请问大神们是怎么解决的，我也发生了这个问题。


Preserve directive prologues fixes #5 #7

This fixes #5 and also includes the fix for #7 since I need it for this.  While the relevance of strict directives may be doubtful for modules, correctness is still a goal and we should still preserve the original code and only order imports.
For references, this code
// below is a directive prologue
  'use custom' ; /* more directives... */ 'enable typecheck'
                 'forbid IE'

import './SetupEnvironment';
import type { Period } from './Period'

"this is not a directive prologue";

function foo() {
}

now becomes
// below is a directive prologue
"use custom";
/* more directives... */

"enable typecheck";
"forbid IE";

import "./SetupEnvironment";

import type { Period } from "./Period";

("this is not a directive prologue");

function foo() {}

and the following
; 'use strict'

import './SetupEnvironment';
import type { Period } from './Period'

"this is not a directive prologue";

function foo() {
}

still becomes
import "./SetupEnvironment";

import type { Period } from "./Period";

("use strict");

("this is not a directive prologue");

function foo() {}

since an empty statement is not a directive prologue according to the spec.

note to self: there's still an issue with duplicated comments

(the above is expected to fail, I am not done yet)

I can't give this a thorough review right now, but I wonder, is there a way to check if there is a performance impact to this change?

We could of course do it manually, not sure if we can add performance tests. But regarding how it "should" affect the performance:

Preserving directive prologues should not affect it all all, since I'm only using the result from the parse that's already being done
Other than that, I only changed how the imports are removed from the code. Before, a Regex was created for each import, then run in the code. Now, I build a list of ranges to replace (which calls sort on the list of ranges, but that's around O(n log n) and the input size is only the number of imports present in the file), do a bunch of substrings to extract the parts to keep, then join those parts back together.

So I wouldn't expect this to have an effect on performance (if anything it could improve it due to less Regexes). But perhaps we should take a large JS file and compare the times it takes to format, just so we can rule out an unexpected bottleneck.

@IanVS Do you have time to take a look at this in the next few days? Otherwise do you mind if I do a quick test myself and then merge?

I'll give it a quick glance through today and approve.  Curious about perf, but I don't think that's a blocker.

@blutorange In reading the spec, I see that it says:

A Directive Prologue may be an empty sequence.

I'm not so familiar with the spec, is an empty sequence different from an empty statement?  I guess an empty sequence is ""?

@IanVS  As far as I understand it

A Directive Prologue is the longest sequence of ExpressionStatements [...] where each ExpressionStatement in the sequence consists entirely of a StringLiteral token followed by a semicolon.

An empty sequence is like the empty set, so that's just their way of saying that having the directive prologue is optional.
This is a source file with an empty directive prologue list, consisting of an empty statement and a function declaration statement.
;
function foo() {}

This is a source file with a single-element directive sequence, and the value of the directive is the empty string.
"";
function foo() {}

This is also source file with a single-element directive sequence. (The semicolon is inserted via the process of automatic semicolon insertion)
""
function foo() {}

It doesn't really matter though, since we aren't doing the parsing ourselves and just rely on the parser being implemented correctly. I just added some tests for these cases just in case somebody gets the idea to implement the parsing manually ; )
PS: You can use e.g. https://astexplorer.net/ to see how a piece of code parses.


Add support for Apache Hive

I don't see any way to connect to Hive

Hey @kangshung - we can add this to our roadmap for our Cloud product. It would be great to hear more about your use case and timelines.

We have no current plans to add Hive support to open source data-diff. Hive support may, in the future, be added to Datafold Cloud.


Deprecate use of .genignore file?

Can we deprecate the use of .genignore now that include/exclude can be done in the cargo-generate.toml file?
Maybe at least in the README.md? (Better yet: remove any mention of it)

@sassman please close this one - I believe I retired .genignore by discouraging its use in https://github.com/cargo-generate/cargo-generate/pull/431


Software comments

This project looks absolutely insane, only thing I could suggest is to comment your software code just to explain what some of it is doing.

Cheers for the suggestion, more comments have been added and more documentation will follow! Cheers


http-client-java, support enable-subclient option

No changes needing a change description found.


Update to Java 11

This could be painful. We run on Java 10, but for 11 will need to:

use a JDK that has the JavaFX modules included.
use the backported / new jpackager tool instead of javapackager and see what regressed.

Also it'll break a ton of APIs. We probably want to load the JVM in such a way that we open all internals to the apps, without needing --add-opens etc, at least when not sandboxed.

We upgraded to JavaFX 11. Just pulled the maven artifacts for openjfx. The only thing that bit us (since we don't use Java modules) was specifying the module-path to include all of the openjfx jars and then --add-modules ALL-MODULE-PATH
No problems with APIs changing.

I scanned Graviton with the helpful jdeps tool. Here's what we'll need to fix for the Java 11 upgrade:

TornadoFX doesn't support Java 11 until the TornadoFX 2 release, which isn't out yet. TornadoFX uses a lot of internal FX APIs on Java 8 so the changes are extensive.
Conscrypt seems to use a single internal class but I can't find any discussion of whether it breaks on Java 11 or not, it might work.
TinyLog needs to be upgraded to the TinyLog 2 version which has API changes.
I currently hack my way into Application.Parameters using reflection for inline apps, change or remove this functionality.

As it turns out, you might be interested to know that Graviton seems to pretty much run out of the box on Java 11 with OpenJFX.
What I did to get it to work was to create a full JDK image that includes the OpenJfx modules using jlink (you can fing a Gradle build file that does that here), and then I cloned the master branch and ran the "assemble" Gradle task (using a JDK 8, absolutely no changes), set my JAVA_HOME to my newly cobbled-together jdk and ran the bootstrap script generated by Gradle Application plugin...and it just started!
Because the javafx modules where spliced back into the image, it is possible to run Graviton on the Classpath, without worrying about missing modules to import and so on.
Apart from some warnings from the rather ominously-named "app.graviton.ModuleHacks" package about illegal reflective access, it seemed to just work as far as I could tell (admittedly it wasn't a very thorough testing session).
Of course, the fact that Graviton starts and runs off a Java 11 runtime doesn't magically make it so for the apps it start: unfortunately none of the example javafx apps (Everest, CalendarFX or TicTacToe) worked. The swing-based SpotBugs seemed to run fine.
Good news is, though, that JavaFX apps made for Java 11+ do seem to work as intended in that configuration: I tested it my own app with Maven coordinates 'eu.fthevenet:binjr-core' and it worked (although you can't do anything with it due to a totally unrelated issue I reported here).


Azure Storage Blob Service Properties excludes properties for static sites

The documentation on Microsoft.Storage storageAccounts/blobServices 2019-06-01 excludes information for updating static site properties such as the ErrorDocument404Path : https://docs.microsoft.com/en-us/azure/templates/microsoft.storage/2019-06-01/storageaccounts/blobservices?tabs=json#BlobServicePropertiesProperties
These properties are, however, documented here for cURL: https://docs.microsoft.com/en-us/rest/api/storageservices/set-blob-service-properties
And they are also documented here for the Az-Module: https://docs.microsoft.com/en-us/powershell/module/az.storage/enable-azstoragestaticwebsite?view=azps-6.2.1
Can you please clarify if in fact these properties can be set using ARM in Azure DevOps and update the documentation? If these can't be updated via arm, can you please clarify why not, since they are available on the other mechanisms available for updating static website properties?

Hello @thecherrytree
I have assigned the issue to the content author for further review.

@thecherrytree - Those properties are not available through ARM templates. The properties for an ARM template match the properties that are available on the PUT operation sent to management.azure.com. The operation you provided is sent to <account-name>.blob.core.windows.net. For more information about the difference between these two operation types, see Azure control plane and data plane.
#please-close


New trim helper function

Created a new trim helper function which is used in every situation where we need to trim a string
Co-authored-by: Tibor Dusnoki<EMAIL_ADDRESS>JerryScript-DCO-1.0-Signed-off-by: Adam Szilagyi<EMAIL_ADDRESS>

@szilagyiadam Please rebase the PR to the latest master.


Have we a way to bind Datetime values from querystring or route?

I know that doesn't exists a format for datetime to use with getf
So, I can't find a way to bind datetime values from URL...
could someone show me how I do it?

@64J0 something like
getf "/api/%datetime" getApplication
I want to bind some datetime ISO string directly to a System.Datetime like asp.net does
I know that does not exist string format for DateTime, but I want to know if we have another way to do it.
For know the only way I see is parsing the raw string by hand


Add techniques in DOI metadata

Summary
The DataCite metadata standard is able to record the experimental technique used to establish the dataset.  However, SciCat doesn't do this: so the DataCite metadata is lacking this information.
Note that, although SciCat can store the experimental technique information as dataset metadata, this information is not propagated to publishedDataset.
Steps to Reproduce

create a dataset, including the experimental technique
trigger publishing the dataset.
observe DOI metadata; e.g., via DataCite API.

Current Behaviour
The DataCite metadata contains no subject elements.
Expected Behaviour
The DataCite metadata should contain subject element(s) that describe the techniques.
Details
The document ETN-1: Embedding PaNET in DataCite metadata describes how to include PaNET terms within the metadata associated with a DOI.
The document ETN-2: Working with PaNET terms in SciCat describes how to format PaNET terms within SciCat.
Note that (as described in #1192) the DataCite metadata is calculated in two places:  scicat-backend-next's published-data.controller.ts and oai-provider-service's openaire-mapper.ts.
Arguably, there should be a single place (within SciCat code) that provides DataCite metadata (as described in #1192).  While removing this duplicate code (i.e., closing #1192) would benefit this issue.  I don't consider #1192 to block this issue.

@paulmillar thanks for opening the issue.
Given that PublishedData can contains one or more datasets, what would you do if multiple datasets with different techniques are present?
Would you add a list of techniques to publishedData and than propagate all of them to DataCite?

Hi @nitrosx,
Yes, this is certainly a valid question.  I've spent a little time thinking about this, but haven't come to a strong opinion.
One could argue that each technique (of those techniques describing the publishedData) indicates that there's at least some data (within the publishedData data) taken with that technique.  Under that interpretation the publishedData techniques would be the union of all techniques in its member datasets.
Alternatively, one could argue the publishedData techniques should describe all the datasets being published, since the publishedData is describing all those datasets.  With this interpretation, the publishedData techniques is the intersection of all techniques in the member datasets.
Yet a third option is the selection is context-driven.  Why is a DOI being generated?  This might suggest some techniques (from the union) be included and other should be ignored.  This would be a more nuanced approach, something that would likely require human input.
In practical terms, I would suggest taking the first option (use the union of techniques from member datasets) as an initial version.
A subsequent update could be to present the list of techniques in the web UI, to allow the user to choose/veto techniques, as appropriate.


Blank Body Yields XML - Null Body Now Throws Error

Even if you specify an output format of application/json, failing to define the body parameter results in XML output.
See http://stackoverflow.com/questions/41709910/azure-functions-nodejs-http-response-renders-as-xml-rather-than-http-response
This was easy to work-around by setting the "body" value to null:
e.g.
module.exports = function(context, req){
        var url = "https://www.google.com";
        context.res =  {
            status: 200,
            headers: {
            "Access-Control-Allow-Credentials" : "true",
            "Access-Control-Allow-Origin" : "https://www.google.com",
            "Access-Control-Allow-Methods" : "POST, OPTIONS",
            "Access-Control-Allow-Headers" : "Content-Type, Set-Cookie",
            "Access-Control-Max-Age" : "86400",
            "Vary" : "Accept-Encoding, Origin",
            "Content-Type" : "application/json"
            },
            body : null
        }
        context.done();
    }

However, Azure now errors out with this. The only available work around is to return an empty object, which in turn actually displays that empty object.
Repro steps

Utilizing node.js create a response that does not return a body element.

NOTE: The page will show your HTTP Request as XML rather than as actual headers and a blank body.

Add a body of null (See description for an example).

NOTE: Azure will now error out for you.

Set the body to {}

NOTE: It will work fine, but will literally display {}
Expected behavior
Empty body or null body results in a normal response, but with nothing in the body of the response.
Actual behavior
Empty body results in some weird XML where the HTTP Headers and everything else returns as XML.
Null body errors out and returns a generic error.
Known workarounds
Set the body to an empty string or object:
e.g.
{}
or
""
Related information

NodeJS

As noted, the behavior used to be different with a "null" body than it is now.
What is the proper way in NodeJS to have a blank body response?

@mamaso Is this related to an issue you're working on?

@lindydonna not that I know of. I can't repro on live bits or in with tests on the latest bits.
@securityvoid are you still seeing this issue?

I'm still repoing this.
See XML Output:
http://azure-bug.azurewebsites.net/api/1.0/xml
Null body throwing error:
http://azure-bug.azurewebsites.net/api/1.0/test
Source Code:
https://github.com/securityvoid/azure-bug

Logging from above:
Null body call:
Host Log:
2017-02-27T18:39:01.679 Executing 'Functions.app-function-test' (Reason='This function was programmatically called via the host APIs.', Id=c1152b4e-6d98-4d7b-858c-c64706102422)
2017-02-27T18:39:01.679 Function started (Id=c1152b4e-6d98-4d7b-858c-c64706102422)
2017-02-27T18:39:01.679 Boogie
2017-02-27T18:39:01.679 Function completed (Failure, Id=c1152b4e-6d98-4d7b-858c-c64706102422)
2017-02-27T18:39:01.679 A ScriptHost error has occurred
2017-02-27T18:39:01.679 Object reference not set to an instance of an object.
2017-02-27T18:39:01.772 Exception while executing function: Functions.app-function-test. Microsoft.Azure.WebJobs.Script: Object reference not set to an instance of an object.
2017-02-27T18:39:01.882 Exception while executing function: Functions.app-function-test
2017-02-27T18:39:01.882 Object reference not set to an instance of an object.
2017-02-27T18:39:01.882 Executed 'Functions.app-function-test' (Failed, Id=c1152b4e-6d98-4d7b-858c-c64706102422)
2017-02-27T18:39:01.882 Object reference not set to an instance of an object.
2017-02-27T18:39:01.882 Function had errors. See Azure WebJobs SDK dashboard for details. Instance ID is 'c1152b4e-6d98-4d7b-858c-c64706102422'
2017-02-27T18:39:01.882 Object reference not set to an instance of an object.

Function Log:
2017-02-27T18:39:01.679 Function started (Id=c1152b4e-6d98-4d7b-858c-c64706102422)
2017-02-27T18:39:01.679 Boogie
2017-02-27T18:39:01.679 Function completed (Failure, Id=c1152b4e-6d98-4d7b-858c-c64706102422)
2017-02-27T18:39:01.772 Exception while executing function: Functions.app-function-test. Microsoft.Azure.WebJobs.Script: Object reference not set to an instance of an object.

XML Call:
Host Log:
2017-02-27T18:39:05.752 Executing 'Functions.app-function-xml' (Reason='This function was programmatically called via the host APIs.', Id=cf96e0ae-dfc7-4702-b64d-82a91b882070)
2017-02-27T18:39:05.752 Function started (Id=cf96e0ae-dfc7-4702-b64d-82a91b882070)
2017-02-27T18:39:05.752 Boogie
2017-02-27T18:39:05.752 Function completed (Success, Id=cf96e0ae-dfc7-4702-b64d-82a91b882070)
2017-02-27T18:39:05.752 Executed 'Functions.app-function-xml' (Succeeded, Id=cf96e0ae-dfc7-4702-b64d-82a91b882070)

Function Log:
2017-02-27T18:39:05.752 Function started (Id=cf96e0ae-dfc7-4702-b64d-82a91b882070)
2017-02-27T18:39:05.752 Boogie
2017-02-27T18:39:05.752 Function completed (Success, Id=cf96e0ae-dfc7-4702-b64d-82a91b882070)

Ok, there is an issue here: we don't support setting a content type for responses with no content.
Errors are being thrown from the HttpBinding header handling logic
I'll work on a fix, in the meantime the null body should work if there are no content related headers.

I believe this is related to https://github.com/Azure/azure-webjobs-sdk-script/issues/1268?

Closing this as it no longer applies.


Bug when trying this test method

Hi,
When running this test scenario from my wrapper I would expect it to output at least something but nothing gets returned.
All my other methods just return data but not this one. When switching back to a qpdf version from a year ago I get output so I wonder if this is a bug or if something else has been changed in qpdf so that this does not return anything anymore.

When doing it like this

It will dump the data ... but here I'm using the internal name... so did I use it wrong in the first post in this issue?

The internal name, as you call it, is the only correct way to do it. If it worked before, I'm not sure why. Perhaps it picked up 20 and parsed it less strictly and was dumping the output of object 20.

Ok I understand that this is the way it works.

Since all my tests now worked as expected I released a new C# wrapper with the latest version in it --> https://www.nuget.org/packages/QPdfNet

Thanks. I assume you're subscribed to qpdf-announce so you'll know when I release 11.4.

pdf-

Uh no... where do I do that?

Visit https://qpdf.sourceforge.io/ -- there is a button to join the mailing list. Let me know if you have any trouble. I set it up millions of years ago using sourceforge's antiquated mailman-based distribution list stuff.


idea/pycharm: Fonts not rendering properly

Issue description
Pycharm and its IDEA siblings are unusable on my system, as there is an issue with the font rendering

Steps to reproduce
nix-shell -p idea.pycharm-community --run pycharm-community
produces a window that does not show most of the letters correctly.
Technical details

System: openSUSE 13.2 (Harlequin) (x86_64)
Nix version: nix-env (Nix) 1.11.8
Nixpkgs version: "17.09pre105089.e94437d1ed"

Ok. This was a little premature. It seems this problem is more of an openSUSE problem than a nixpkgs problem.
Going to:
"Font Settings" and changing "Use anti-aliasing" from "System Settings" to "Enabled" resolved the problem.


Introduce fluent arbitrary builder group

Summary
related #628
Introduce fluent ArbitraryBuilderGroup for creating a arbitrary builder group instead of reflection.
(Optional): Description

ArbitraryBuilderCandidate

contains class type and arbitrary builder registerer

ArbitraryBuilderGroup

interface to register builder group

ArbitraryBuilderSpecs

provide fluent method for registering candidate
store candidates

How Has This Been Tested?

add two actual values in the existing test method registerGroup

There are three cases for ArbitraryBuilder. (fixed value, Class<?> , TypeReference)

add the test method registerBuilderGroup for newly created registerGroup

감사합니다! 머지해주시면 문서도 반영해보겠습니다


[#159986104] Continue on with the remaining metrics on error

What
At the current state, the for loop would stop the collection and return
error at any time when the error would occur.
This means, if the first metrics fails, due to timeout for instance,
none of the metric would be collected and dealt with.
Logging the error on the spot and not quitting, would assure these are
at least attempted and more errors would be printed to the log.
How to review

Code review
Make sure the tests pass.

Who
Anyone but me or @paroxp

@alext comment addressed.

Did code review, tests pass; LGTM


Forward/rel/6.2

forward rel/6.2 changes into master.

@ironman-machine work it

Hello @LaurenSpiegel,
Starting end to end procedure using the following payload:
{"DEFAULT_BRANCH":"master","SCALITY_S3_BRANCH":"forward/rel/6.2","REPO_NAME":"S3","PR_NUMBER":248,"ULTRON_URL":"connectore.ringr2.devsca.com:42000"}
Please follow http://ci.ironmann.io/gh/scality/Integration/4685 for circle status.

end to end passed


feat: map errors into an object

PR Type

[ X] Bugfix
[ X] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[ ] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:
What Is the Current Behavior?
At this moment when we have more than one error we are showing an warning on browser console. This is a problem in the quick order because when we have more than one product with error/errors we dont show feedback to the customer.
Also when we are showing the error we dont know which product we are having the error.
What Is the New Behavior?
With this change we are fixing two problems

Show error when we have more than one
Have the possibility to know which product is having an error.

We are adding a property named causes to the HttpError. This property will have the error message with more details and if it has will have the product sku.
Examples
Quick order when we are trying to add two products

Does this PR Introduce a Breaking Change?
[ ] Yes
[ X] No
Other Information

Thank you for your feedback. I see 3 variants to improve the error case behavior:
Var 1:
2 products could not be added. (--> general error)
The product quantity for these items in your cart... (--> reason summary for same errors)
Var 2:
2 products could not be added. (--> general error)
The product quantity for "Microsoft Surface Hub" in your shopping cart... (--> reason 1)
The product quantity for "Microsoft Surface Book" in your shopping cart... (--> reason 2)
Alternative: The product quantity for product with SKU "123456" in your shopping cart...
(Is this really helpful because we don't show SKUs in mini cart?)
Var 3:
If error handling is hard to overview in mini cart, we could display always shopping cart page in cases of errors or adjustments (see Wireframes).

We will check your solution and discuss if it's fits to our interaction guidelines.

I discussed the error behavior with @SGrueber.
We want to jump to the cart page if we get multiple product errors after adding products to the cart. There we can display the individual errors directly on the product and make it much clearer. It should be look like that:

We would continue to display error messages for a single product in the mini shopping cart. We would leave the behavior for this case as it is.
@ivopereira15 @dhhyi Is this behavior fine for you guys?

@M-Behr Yes, the main goal for us is that errors are mapped and available, so if that part of the PR is okay, we are good. We have customized the display in our project using toasts 😉
@SGrueber Will you take care of the behavior for the standard PWA?
cc @ivopereira15

Yes, I will

The error display in the mini basket looks like this now:

Hi @ivopereira15, can you let me know why you used the info basket substate to track the errors & causes? Instead of the error substate?
It would seem a bit cleaner that way but maybe that comes with some additional disadvantages. Could you provide some context?

Hi all. @MaxKless
The error substate its working only when you have a bad request. Like a Status Code: 422 Unprocessable Entity. This is a clear error message that will be handled by addItemsToBasketFail
Lets imagine in the quickorder (that was one the problems that we found) we are trying to add to cart two products. One that we will have an error and other will be success. The response is Status Code: 207 Multi-Status.
That means we are not mapping to an error. We are going to theaddItemsToBasketSuccess action and mapping to an info object.
here what we receive from the request.

What i did was put that error inside the infos object. Since we already were showing alert/info error using the info object, could be a good idea to show the error too.
With that infos object we have the info and the errors on the same place.
This works fine for us but might was not the best approach.

has been merged by #1230


Whitespace changes

I did the following

No more trailing spaces (white space after the last visible character on the line)
Every file finishes with a new line
No more mixed tabs and spaces
Indentation is now 4 spaces

I did not do:

Any code modification at all

Code Tested: yes Chrome 47.0.2526.80 (64-bit) Linux version
Reason:

Adhering to industry standards
I have a couple more features which you might like in the future, but code needs to be clean first.

I am happy to amend anything, in particular indentation

Ping, checking if this repository is still maintain, otherwise I'll continue to maintain my own fork only.
Thanks!

Looks good, thanks for cleaning it up!


[improve](group commit) Group commit support max filter ratio when rows is less than value in config

Proposed changes
if a load rows is less than group_commit_memory_rows_for_max_filter_ratio(default 10000), will check if the load meet the max_filter_ratio.
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall


ccache: 4.4 -> 4.4.1

Built on platform(s)

[X] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
21.11 Release Notes (or backporting 21.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@trofi This has already been merged in https://github.com/NixOS/nixpkgs/pull/137387.

Ah, nice! Closing.


Using frb with main executable

Is your feature request related to a problem? Please describe.
I want to use flutter_rust_bridge with a project that uses the Flutter embedder API. The Rust code to be called by Dart is located in the executable directly, rather than a dynamic library.
Describe the solution you'd like
I'm using ExternalLibrary.process(iKnowHowToUseIt: true) right now. Ideally, this is all that's needed, but unfortunately it's not. The problem is that while building the executable, the linker strips out all of the symbols that are looked up dynamically by frb via DynamicLibrary.lookup, like frb_get_rust_content_hash.
Describe alternatives you've considered
I've been able to make this work on Linux by adding the file .cargo/config.toml with the following content:
[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "link-arg=-Wl,--export-dynamic"]

This stops the linker from stripping any unused symbols.
However, it also stops it from stripping everything else in the binary, making it unnecessarily large (and more vulnerable to reverse engineering, which might be a problem). In addition, this approach doesn't work on Windows, because there the linker expects an explicit symbol name to include. ld also supports supplying an explicit list of symbols to include, which would fix this problem.
Now the problem is that the list of symbols seems to be an implementation detail. It seems to be generated based on some C header files in frb_dart_source_code.rs.
Summary
I think this basically boils down to the following request: Please add a command or flag (on generate) to flutter_rust_bridge_codegen to export a list of symbols that are required to be used in the final binary (text file, one symbol per line). This list could then be picked up by my build system to be passed to the linker.

export a list of symbols that are required to be used in the final binary

frb can be configured to generate C code (indeed a .h file). Is that what you need?

I just tried generating that header file using the -c flag, but it doesn't contain frb_get_rust_content_hash, so that can't be it?

For those, please refer to https://github.com/fzyzcjy/flutter_rust_bridge/tree/master/frb_dart/lib/src/ffigen_generated/intermediate. They are not generated during frb codegen phase, but pre-generated and be a part of frb binary.

Another thought: Do all symbols prefix with frb_? (It should be; if you find anything that is not, feel free to ping me and we should fix it). If so, maybe we can firstly check list all symbols in your binary, and then simply filter with that prefix.

Would it be possible to funnel all symbol lookups through a custom Rust function instead of dart:ffi's lookup, which then is generated in frb_generated.rs to handle all symbols needed?

Are you using full_dep: true or false? The latter enables SSE codec by default and thus less generated symbols.
As for whether it can be static: A large part may not be hard; but e.g. the native finalizers of the rust opaque objects may needs some work.
Anyway, if everything has the same prefix, then it is just a line of grep and we can get every symbol.

A simple grep on symbols is easy on Linux, but my code also has to run on Windows, and there’s it’s much more complicated.

but my code also has to run on Windows, and there’s it’s much more complicated.

Do you mean there is no grep or Windows symbols are different? For the former, I guess you can write several lines of Dart/Python/etc scripts to extract the symbols.

Ok, so I tried generating the C header as the first step, but this doesn't work in the first place, making that approach not useful.
I think I should create new tickets for the stuff I ran into there.


Add syntax highlighting to README

This PR is add syntax highlighting to README.

Before submitting the PR make sure the following are checked:

[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[-] Added tests.
[-] Updated documentation.
[-] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
[x] The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

Thank you!


resource: file support for SAML is broken

The path to the file is not properly computed when using the resource: prefix.
Caused by: org.pac4j.saml.exceptions.SAMLException: Could not create keystore
	at org.pac4j.saml.client.SAML2ClientConfiguration.createKeystore(SAML2ClientConfiguration.java:472)
	at org.pac4j.saml.client.SAML2ClientConfiguration.<init>(SAML2ClientConfiguration.java:131)
	at org.pac4j.saml.client.SAML2ClientConfiguration.<init>(SAML2ClientConfiguration.java:95)
	at org.pac4j.config.client.PropertiesConfigFactory.tryCreateSaml2Client(PropertiesConfigFactory.java:223)
	at org.pac4j.config.client.PropertiesConfigFactory.build(PropertiesConfigFactory.java:115)
	at org.apereo.cas.support.pac4j.config.Pac4jConfiguration.builtClients(Pac4jConfiguration.java:218)
....
Caused by: java.io.FileNotFoundException: /Users/bidou/sources/cas-pac4j-oauth-demo/ile:/Users/bidou/sources/cas-pac4j-oauth-demo/cas-pac4j-oauth-client-demo/target/cas.war!/WEB-INF/classes!/samlKeystore.jks (No such file or directory)
	at java.io.FileOutputStream.open0(Native Method)
	at java.io.FileOutputStream.open(FileOutputStream.java:270)
	at java.io.FileOutputStream.<init>(FileOutputStream.java:213)

@mmoayyed this is a show stopper for RC3 release: I will work as soon as possible.

So I have a fix for this issue: https://github.com/pac4j/pac4j/pull/688
This problem proves you right on the fact we should use Spring: using the File object for resources inside JARs does not work.
The best I can do is disable the Keystore creation to avoid blocking the CAS startup. Then, the SAML authentication delegation will only work if you define a file path (no resource: or classpath:). For me, it's fairly acceptable until we work on that for pac4j v2.0.0.
I just added this future change in the pac4j roadmap I'll share soon.
If we agree, I'll release the pac4j 1.9.3 version and  the spring-webmvc-pac4j 1.1.3 version to upgrade CAS 5.0.0.RC3.

How would you "disable the Keystore creation" ? We might document this shortcoming that if one wishes to let pac4j create the keystore, then there may be a few problems until such as such gets fixed. Is there more to it than that?

I mean that the keystore creation is now defined by a boolean property. Though, I'm not sure this is the right approach because even if it doesn't block the CAS server startup, the SAML authentication delegation is still broken.
I guess I should keep the keystore creation as it is and add some warning on the CAS documentation to say that the keystore path must be specified as a relative or absolute file, not as a resource file.
Until we fix that in 2.0.0 (or why not in 1.9.4).

add some warning on the CAS documentation to say that the keystore path must be specified as a relative or absolute file, not as a resource file.

Agreed. I suspect most would want to define it as an absolute path anyway.

My conclusion is there is no emergency to fix that. I'll add a better error message in pac4j 1.9.3.
I'll submit a PR to add a warning on CAS documentation as well.
Maybe we'll remove the resource: or prefix: prefixes for the 2.0.0 release.

PR: https://github.com/apereo/cas/pull/2016

I have another issue:
java.lang.NullPointerException
	at org.pac4j.saml.client.SAML2ClientConfiguration.getServiceProviderMetadataPath(SAML2ClientConfiguration.java:339) ~[pac4j-saml-1.9.2.jar!/:?]
	at org.pac4j.saml.metadata.SAML2ServiceProviderMetadataResolver.<init>(SAML2ServiceProviderMetadataResolver.java:59) ~[pac4j-saml-1.9.2.jar!/:?]
	at org.pac4j.saml.client.SAML2Client.initServiceProviderMetadataResolver(SAML2Client.java:155) ~[pac4j-saml-1.9.2.jar!/:?]

If the service provider metadata path is not set (like cfg.setServiceProviderMetadataPath), it generates a NullPointerException.
I will provide a simple fix for pac4j v1.9.3: https://github.com/pac4j/pac4j/issues/690 and retest the SAML delegation authentication in CAS.


Start a Dialog from bot to user

Hi guys,
instead of triggering the bot via a command / message I want to trigger the Bot via an API to send a Dialog or FormFlow to the User. (c#)
thanks! best chris

We would call that a proactive bot, where an IConnectorClient is instantiated (indirectly through the container) to send messages.  I will be checking in an IBotToUser implementation that always uses IConnectorClient to send the messages to the develop branch soon.  The oauth sample also does something similar since the callback is driven by an external system.

You're awesome, thanks! I just checked the oauth sample and looking forward to your sample. thanks!

Fyi, this is the "always send direct through IConnectorClient" implementation:
https://github.com/Microsoft/BotBuilder/commit/2409b4d8c7c3d9784eaf9c8d61df380b378d256e

What's the nodejs equivalent to IConnectorClient or IBotToUser?  I'm looking to send a new message using the node sdk.

I believe it's just Session.send:
https://github.com/Microsoft/BotBuilder/blob/master/Node/lib/Session.js#L74

@willportnoy Session.send would be perfect in this case, but it's not clear how to instantiate a Session object for a specific conversation outside of a reply to an incoming message.

@Stevenic or @msft-shahins - what is the proper pattern for a proactive bot to instantiate a session in nodejs?

I also tried something like this, which seems like it should start a new conversation
bot.beginDialog({
    text: "I'm sending you a proactive message!",
    language: "en",
    to: { address: "User1", channelId: "emulator" , id: "2c1c7fa3"},
    from: { address: "stuffbot", channelId: "emulator", id: "stuffbot" }
},
    "/"
);

I don't get any errors, but I also don't get a message sent to me.

@mattdot I managed to get that working! In addition to the format you used, I also specified isBot on both from and to. I'm using the sms channel.

Sorry... I can answer this for the Node side... @mattdod... Your close but you need to actually use a dialog to compose your reply.
bot.add('/notify', function (session) {
   session.endDialog("I'm sending you a proactive message!");
});
bot.beginDialog({
     to: { address: "User1", channelId: "emulator" , id: "2c1c7fa3"},
     from: { address: "stuffbot", channelId: "emulator", id: "stuffbot" }
 }, '/notify');

Currently you need to setup a dialog to compose your outgoing message. You then start that dialog with the call to bot.beginDialog(). In many respects your example is a bit more intuitive and we were just talking about adding a bot.send() method that would do what you're suggesting which is to send a proactive message without starting a whole new dialog. The current method is technically more flexible because it lets you start a whole proactive conversation with the user but in the case where you just want to send a message its a little overkill. We'll add that to the todo list.

Sorry... I can answer this for the Node side... @mattdod... Your close but you need to actually use a dialog to compose your reply.
bot.add('/notify', function (session) {
   session.endDialog("I'm sending you a proactive message!");
});
bot.beginDialog({
     to: { address: "User1", channelId: "emulator" , id: "2c1c7fa3"},
     from: { address: "stuffbot", channelId: "emulator", id: "stuffbot" }
 }, '/notify');

Currently you need to setup a dialog to compose your outgoing message. You then start that dialog with the call to bot.beginDialog(). In many respects your example is a bit more intuitive and we were just talking about adding a bot.send() method that would do what you're suggesting which is to send a proactive message without starting a whole new dialog. The current method is technically more flexible because it lets you start a whole proactive conversation with the user but in the case where you just want to send a message its a little overkill. We'll add that to the todo list.

Sorry... I can answer this for the Node side... @mattdod... Your close but you need to actually use a dialog to compose your reply.
bot.add('/notify', function (session) {
   session.endDialog("I'm sending you a proactive message!");
});
bot.beginDialog({
     to: { address: "User1", channelId: "emulator" , id: "2c1c7fa3"},
     from: { address: "stuffbot", channelId: "emulator", id: "stuffbot" }
 }, '/notify');

Currently you need to setup a dialog to compose your outgoing message. You then start that dialog with the call to bot.beginDialog(). In many respects your example is a bit more intuitive and we were just talking about adding a bot.send() method that would do what you're suggesting which is to send a proactive message without starting a whole new dialog. The current method is technically more flexible because it lets you start a whole proactive conversation with the user but in the case where you just want to send a message its a little overkill. We'll add that to the todo list.

Sorry... I can answer this for the Node side... @mattdod... Your close but you need to actually use a dialog to compose your reply.
bot.add('/notify', function (session) {
   session.endDialog("I'm sending you a proactive message!");
});
bot.beginDialog({
     to: { address: "User1", channelId: "emulator" , id: "2c1c7fa3"},
     from: { address: "stuffbot", channelId: "emulator", id: "stuffbot" }
 }, '/notify');

Currently you need to setup a dialog to compose your outgoing message. You then start that dialog with the call to bot.beginDialog(). In many respects your example is a bit more intuitive and we were just talking about adding a bot.send() method that would do what you're suggesting which is to send a proactive message without starting a whole new dialog. The current method is technically more flexible because it lets you start a whole proactive conversation with the user but in the case where you just want to send a message its a little overkill. We'll add that to the todo list.

So I figured out that the equivalent to IConnectorClient is actually in the 'botconnector' module.  (as documented here http://docs.botframework.com/connector/libraries/node/#navtitle ).  Sorry if I missed it, but is the code for botconnector on github somewhere?

Hi guys,
I think the main question is more than answered and even node has a sample. Thanks Will for the commit.

@mattdot The code is only on npm because it's auto-generated from a Swagger file. It's just a simple wrapper around the REST API for the connector.

@willportnoy do you have a sample of using your piece of code? I checked the oauth sample, but can't mix it both together.. sorry..

hey guys,
do somebody has an example of starting a FormFlow with a proactive bot? I'm struggeling to get it working with the code above. Anybody can help?
thanks, best chris

I'm having the same problem with @chriswoj . I can send the initial message without any problems. However, when the user answers, how can I receive the message as a FormFlow.
For example, the user's dialog stack can be at any state. And if the proactive bots send a message like "How are you?". How can I grab the reply with the appropriate handler, rather then the current dialog stack. Is there a way to change the users active dialog proactively also?

Program.Interactive is an example of a proactive bot:
https://github.com/Microsoft/BotBuilder/blob/master/CSharp/Tests/FormTest/Program.cs

hi guys, @bloudermilk @Stevenic - on your solutions - from where do you get the id value? i'm looking for a very similar solution, at the end of my waterfall to start a dialog on another channel, but can't get it to work (can be anything like sms, email, facebook).
thanks!

@bogdanfer you usually save the recipient id from previous conversations with that user.
You may want to open an issue dedicated to your question.
https://docs.botframework.com/en-us/technical-faq/#how-can-i-get-access-to-the-user-id is related

In the latest api version, all you need to do is save the address from any past conversation:
// Inside some dialog
var savedAddress = session.message.address;

And then set it on any message to target it to same conversation, like so:
someAsyncProcess().then(function () {
 var msg = new builder.Message()
  .text('This is a Proactive message')
  .address(savedAddress);
 bot.send(msg);
});

Faced this issue during a recent hackathon and the solution in Node using LUIS as the AI back-end, was to mock a message that would trigger the intended dialog and take it from there.
It is a workaround but we could not find an official way to do this in Node:
var connector = /* connector init */;
var bot = new builder.UniversalBot(connector);
var dialog = new builder.IntentDialog({/* options & recognizers});
var savedAddress = /* load this from a previous message's session.message.address */;

/* ... */

/* Dialog for /initiateContact, called from below Intent matcher */
bot.dialog('/initiateContact', [
  (session, args, next) => {
    session.send('First message that user sees.');
    next();
  },
  () => {/* ... */}
]);

/* Configure an Intent named InitiateContact activated by an Utterance 'Initiate Contact' */
dialog.matches('InitiateContact', (session) => {
  // call Dialog /initiateContact
  session.beginDialog('/initiateContact');
});

/* Text field should be the Utterance that triggers the InitiateContact Intent */
var msgTrigger = new builder.Message()
  .text('Inititate Contact')
  .address(savedAddress);

// mock the receiving of the message that triggers intent InitiateContact
bot.receive(msgTrigger.toMessage());

I am trying to schedule a message without success.
var job = new cron.CronJob({
cronTime: '00 20 2 * * 0-6',
onTick: () => {
console.log('-- CRON IS BEING EXECUTED --');
bot.beginDialog({
to: { address: 'Luis Santos', channelId: "facebook" , id: 09282893, isBot: false },
from: { address: "enchain", channelId: "facebook", id: "23867491", isBot: true }
}, '/trendingDialog');
});
},
start: true,
});
Error: Invalid address at ChatConnector.startConversation.
Any help? :(

We have this feature in our bot @Wingify -> https://github.com/wingify/heybot Checkout api.js if it helps.

Hi @willportnoy. Thanks for the update to the SDK which makes this possible. Could you kindly indicate a sample use of the AlwaysSendDirect_BotToUser class?

@adekola Stack Overflow might be a more appropriate forum for asking general questions - in this case, we use AlwaysSendDirect_BotToUser as the default service for outgoing messages to the user from the bot.

I found a good snippet on stackoverflow.
(https://stackoverflow.com/questions/43048088/microsoft-bot-framework-sending-message-on-connect#answer-43050305)
// Send welcome when conversation with bot is started, by initiating the root dialog bot.on('conversationUpdate', function (message) {     if (message.membersAdded) {         message.membersAdded.forEach(function (identity) {             if (identity.id === message.address.bot.id) {                 bot.beginDialog(message.address, '/');             }         });     } });

This issue is closed. If you have a question or problem, please open a new issue here: https://github.com/microsoft/botbuilder/issues/new


generic RoleSoundComponent system

About the PR
made tator and ninja sound use same thing
more stuff can use it in the future (malf, nukies but its a bit sus so idk)
Why / Balance
good
Technical details
added RoleSoundComponent and system
this plays the sound for the players session when the role is added
Media
it works trust

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes
no
Changelog
no cl no fun

This is better than the random sprinkling of _audioSystem.PlayGlobal() throughout the code as it exists now,
but this does not need to be decoupled from the RoleSystem and RoleComponents in it's own system and component.
I bet we can just notify the players from the existing MindAddRole() function and RoleComponents :v

i dont think adding a role should require a greeting sound, or that role system should even care about greetings. this way its independent of it

That's also fair, this makes sense.
I was however under the impression that every role change in the game almost definitely notifies the player with message and/or sound and should do in almost all cases.
We could just put sound files and messages in the RoleComponent passed to MindAddRole() and have a notify function in
SharedRoleSystem that makes the player aware of their role IF the sound/message is non-null in their role component (all of which already exist for each role).
More components and systems is more clutter for ppl adding roles in the future, and besides, you didn't patch all the
roles to use this and I might :trollface:
I'll have a crack at my thing tomorrow and link the PR if it doesn't suck.

yeah idk about nukie or zombie since theyre not as clear cut

Yeah I was scratching my head looking at the nukie code for a minute.
They run a notify function with sound+message on round start instead of on role assignment
like the traitor for example :shrug:

yeah thats why i left it out its a bit sus

So far this is literally just boilerplate to call PlayGlobal()


Incorrect transformation: typeof require.resolve

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
This is from project dependencies: https://github.com/canjs/can-fixture
If you import this module:
import fixture from 'can-fixture';

Webpack transforms this line:
https://github.com/canjs/can-fixture/blob/master/fixture.js#L68
to:
if(typeof window !== "undefined" && function !== "function") {
    window.fixture = fixture;
}

This cause JS fail:
Uncaught SyntaxError: Unexpected token !==

because fucntion !== "function" - invalid statement
screenshot
If the current behavior is a bug, please provide the steps to reproduce.

You will see the issue if install the package and import it.
I've created a repo that demonstrates the issue as well:
https://github.com/Lighttree/webpack-canjs-fixture-issue
just run npm install, npm run serve.
What is the expected behavior?
This should return "function" as string.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

 Revert back to the old "imports-loader?define=>false" hack  to workaround.
I'm not sure why this works, other than perhaps "imports-loader" is doing something else to it.
Hopefully this helps to narrow down issue. I'm guessing there is a regression in the commonjs transpiler or something, but I'm not familiar enough with the codebase to figure it out.


Add basic tests for space_shooter classes

Adding additional tests for space_shooter classes

Codecov Report

Merging #99 (b83e6ff) into main (ed3a783) will decrease coverage by 7.81%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main      #99      +/-   ##
==========================================
- Coverage   54.19%   46.38%   -7.82%
==========================================
  Files          75       13      -62
  Lines        2192      470    -1722
  Branches      228       64     -164
==========================================
- Hits         1188      218     -970
+ Misses        999      252     -747
+ Partials        5        0       -5

Impacted Files
Coverage Δ

...o/src/seagulls/space_shooter/_game_over_overlay.py

...-demo/src/seagulls/space_shooter/_score_overlay.py

...er-demo/src/seagulls/space_shooter/_ship_button.py

...er-demo/src/seagulls/space_shooter/_cli_command.py

...-demo/src/seagulls/space_shooter/_score_tracker.py

...ter-demo/src/seagulls/space_shooter/_cli_plugin.py

seagulls-engine/src/seagulls/app/_plugin_client.py

...src/seagulls/space_shooter/_ship_destroyed_rule.py

seagulls-engine/src/seagulls/engine/_game_clock.py

...gulls-engine/src/seagulls/engine/_game_controls.py

... and 52 more

Continue to review full report at Codecov.

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


Add provider for validating foreign keys

Update the services with a new provider
The validation needs to be updated to avoid local validators.
implement a validator that follows this features:

Capability to be a provider.
Non-local behavior.
Use the count function of prisma.
Can be used across all app

 Adición de validador de foreign keys a nivel global

Functionalitie, no longer needed


feat(cross-compile): create tools to cross compile blink and multipass

What this PR does 📖
to make this work, you need to download ndk r25c for linux https://developer.android.com/ndk/downloads/ and put the zip file in the root of Warp.
You also need to cross compile opus https://github.com/xiph/opus as follows:
unzip the android-ndk (doesn't have to be in Warp). For this example, call it call it MY_ANDROID_NDK_PATH.
cd to the opus repository
./autogen.sh
export PATH=$MY_ANDROID_NDK_PATH/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
export CC=aarch64-linux-android33-clang
export CXX=aarch64-linux-android33-clang++
export AR=llvm-ar
export LD=llvm-ld
./configure --host=aarch64-linux-android
this will create a folder called .libs. copy .libs/libopus.a into Warp/libs/libopus.a (you have to create the Warp/libs folder.
at this point, you can do the following
docker build . -t aarch64-builder -f Dockerfile.aarch64-android
docker run --rm -ti -v pwd:/root/build aarch64-builder
cd extensions/warp-blink-wrtc
cargo build --target aarch64-linux-android
Which issue(s) this PR fixes 🔨

Special notes for reviewers 🗒
Additional comments 🎤

tauri mobile needs the Android SDK, which can be added to a docker container like this: https://github.com/docker-android-sdk/android-30/blob/master/Dockerfile.


native_build not building

Hello,
native_build not building.
build/libs/curl4j-3.0.8.jar file is generated. However, there are no native files inside this file.
What should I do?

Natives must be built manually via the Makefile inside native_build prior to running Gradle.
The CI is the best example of this, it requires some env vars to know which OS/Arch you are building for to enable/disable certain options.
If you just want the jni libraries built and plan to BYO libcurl, you can use the build-libcurl4j make target.


TVDB Cloudflare Error

Expected behaviour:
thetvdb_list returns the series favourited
Actual behaviour:
Error with certificates, probably because of Cloudflare
Steps to reproduce:

Step 1:
Just run the config.

Config:
    configure_series:
      settings:
        timeframe: 6 hours
        target: 720p+ h265
        quality: 720p+ h264+
      from:
        thetvdb_list:
          strip_dates: no
          username: ***
          account_id: ***

Log:
2016-12-13 13:49 WARNING  requests.packages.urllib3.contrib.pyopenssl TV_download     A problem was encountered with the certificate that prevented urllib3 from finding the SubjectAlternativeName field. This can affect certificate validation. The error was Codepoint U+002A at position 1 of u'*' not allowed
2016-12-13 13:49 ERROR    requests.packages.urllib3.connection TV_download     Certificate did not match expected hostname: api.thetvdb.com. Certificate: {'subjectAltName': [], 'subject': ((('commonName', u'ssl418142.cloudflaressl.com'),),)}
2016-12-13 13:49 WARNING  configure_series TV_download     Error during input plugin thetvdb_list: Error retrieving favorites from thetvdb: hostname 'api.thetvdb.com' doesn't match u'ssl418142.cloudflaressl.com'
2016-12-13 13:49 INFO     configure_series TV_download     Did not get any series to generate series configuration

Additional information:

Flexget Version: 2.8.3
Python Version: 2.7.12
Installation method: Pip
OS and version: Windows 8.1

not sure what can be done about this...

this is a tvdb problem with their cloudflare service. It happens on occasion. Closing as there's nothing we can do about it.


⚠ Bofrost.de has degraded performance

In d23278f, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1826 ms

Resolved: Bofrost.de performance has improved in fe8f88a after 20 minutes.


update wheel to rm cached libs

https://app.shortcut.com/tiledb-inc/story/51618/update-install-wheel-to-override-cache

@JohnMoutafis I added one small change, it's ready to merge now


Add Pingdom data

I want to create a special endpoint that will serve uptime data per provider.
The data will be pulled from Pingdom's API every 4 minutes.
We need to extract the status of each provider and format it in a way Cedexis can eat it. (Example Fusion apps http://developers.cedexis.com/)
The point is to add an additional monitoring level to jsDelivr.
Our load balancing will use these endpoints to pull data every 5 minutes and will use it to remove providers if Pingdom detects downtime.
An example:
api.jsdelivr.com/v1/uptime/pingdom/CloudFlare
api.jsdelivr.com/v1/uptime/pingdom/MaxCDN
...
We also need a way to configure which tests to pull from Pingdom.

@UnbounDev Please have this task in mind when rebuilding api-sync. Same goes for https://github.com/jsdelivr/api/issues/62

Btw this endpoint is going to be used inside cdn.jsdelivr.net which means that it has the power to impact the whole service. Thats why we need to make sure it works and serves the latest possible data without running into rate-limits.

@jimaek do you have any examples of the Pingdom api endpoints we'd want to use for this? Also, there are a lot of applications listed on http://developers.cedexis.com - which one am I looking for as a reference to desired format?

examples of the Pingdom api endpoints

Not sure what you mean.
Here are some examples using Fusion.
https://github.com/cedexis/openmixapplib/blob/master/apps-javascript/load-external-config/app.js
https://github.com/cedexis/openmixapplib/blob/master/apps-javascript/ortt%2Bfusion-health/app.js
https://github.com/cedexis/openmixapplib/blob/master/apps-javascript/fusion-custom-get-json/app.js

Sorry - I meant do you know which Pingdom api endpoints to hit for that data (before I go digging through their docs)?

Should be this one https://www.pingdom.com/features/api/documentation/#ResourceChecks

Would it be better to have a different app/server, to make things easier to develop & uptime?
The URL can be redirected, I'm just thinking there should be a separate repo (jsdelivr/api-pingdom) & Docker image.

An other App to monitor and debug... I think its simple enough to get this data into our existing API.

@UnbounDev or @megawac Can we start this? A simple json as output is enough, we can parse it out on the Cedexis side. The important is to have live data without hitting Pingdom limits.
GET api.jsdelivr.com/v2/uptime/pingdom/MaxCDN

{
status: "up" //or "down"
}

Btw its only for v2

@jimaek we're close to being able to start this task; the physical code would go inside of the tasks/sync portion of the API, that code is currently being worked on for the new sync process - after we deploy that code to production (along w/ the corresponding api-sync code) we should be able to tweak the tasks to accommodate this feature.

Cedexis Fusion will be pulling our API every minute. This means that every time they pull we need to have a new live value from Pingdom.
Format:
GET api.jsdelivr.com/v2/uptime/pingdom/CloudFlare

[
    {
        "health": "5"
    }
]

5 = online
0 = down
Question
Should we pull the uptime info ourselves from Pingdom or use their webhook functionality? https://support.pingdom.com/Knowledgebase/Article/View/94/0/users-and-alerting-end-points

I'd say webhook, but either is fine

Note to self: Make sure we dont cache these values on the CDN.


HBASE-22857 Fix the failed ut TestHRegion and TestHRegionWithInMemoryFlush

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
37
Docker mode activated.

_ Prechecks _

+1
dupname
0
No case conflicting files found.

+1
hbaseanti
0
Patch does not have any anti-patterns.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 1 new or modified test files.

_ branch-2.2 Compile Tests _

+1
mvninstall
305
branch-2.2 passed

+1
compile
49
branch-2.2 passed

+1
checkstyle
75
branch-2.2 passed

+1
shadedjars
230
branch has no errors when building our shaded downstream artifacts.

+1
javadoc
34
branch-2.2 passed

0
spotbugs
175
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
173
branch-2.2 passed

_ Patch Compile Tests _

+1
mvninstall
279
the patch passed

+1
compile
54
the patch passed

+1
javac
54
the patch passed

+1
checkstyle
71
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
shadedjars
233
patch has no errors when building our shaded downstream artifacts.

+1
hadoopcheck
876
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1
javadoc
31
the patch passed

+1
findbugs
192
the patch passed

_ Other Tests _

+1
unit
7902
hbase-server in the patch passed.

+1
asflicense
23
The patch does not generate ASF License warnings.

10940

Subsystem
Report/Notes

Docker
Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/495

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux c98a769d0fcf 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-495/out/precommit/personality/provided.sh

git revision
branch-2.2 / 413508ab49

Default Java
1.8.0_181

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/2/testReport/

Max. process+thread count
4853 (vs. ulimit of 10000)

modules
C: hbase-server U: hbase-server

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/2/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
73
Docker mode activated.

_ Prechecks _

+1
dupname
0
No case conflicting files found.

+1
hbaseanti
0
Patch does not have any anti-patterns.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 1 new or modified test files.

_ branch-2.2 Compile Tests _

+1
mvninstall
295
branch-2.2 passed

+1
compile
54
branch-2.2 passed

+1
checkstyle
77
branch-2.2 passed

+1
shadedjars
243
branch has no errors when building our shaded downstream artifacts.

+1
javadoc
34
branch-2.2 passed

0
spotbugs
166
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
165
branch-2.2 passed

_ Patch Compile Tests _

+1
mvninstall
282
the patch passed

+1
compile
53
the patch passed

+1
javac
53
the patch passed

+1
checkstyle
79
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
shadedjars
238
patch has no errors when building our shaded downstream artifacts.

+1
hadoopcheck
885
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1
javadoc
32
the patch passed

+1
findbugs
164
the patch passed

_ Other Tests _

-1
unit
15802
hbase-server in the patch failed.

+1
asflicense
34
The patch does not generate ASF License warnings.

18876

Reason
Tests

Failed junit tests
hadoop.hbase.replication.multiwal.TestReplicationSyncUpToolWithMultipleWAL

Subsystem
Report/Notes

Docker
Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/495

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux aa1e6a631bbb 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-495/out/precommit/personality/provided.sh

git revision
branch-2.2 / c04dcc49e7

Default Java
1.8.0_181

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/1/artifact/out/patch-unit-hbase-server.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/1/testReport/

Max. process+thread count
4130 (vs. ulimit of 10000)

modules
C: hbase-server U: hbase-server

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/1/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
79
Docker mode activated.

_ Prechecks _

+1
dupname
0
No case conflicting files found.

+1
hbaseanti
0
Patch does not have any anti-patterns.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 1 new or modified test files.

_ branch-2.2 Compile Tests _

+1
mvninstall
454
branch-2.2 passed

+1
compile
62
branch-2.2 passed

+1
checkstyle
95
branch-2.2 passed

+1
shadedjars
300
branch has no errors when building our shaded downstream artifacts.

+1
javadoc
41
branch-2.2 passed

0
spotbugs
237
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
233
branch-2.2 passed

_ Patch Compile Tests _

+1
mvninstall
373
the patch passed

+1
compile
67
the patch passed

+1
javac
67
the patch passed

+1
checkstyle
96
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
shadedjars
315
patch has no errors when building our shaded downstream artifacts.

+1
hadoopcheck
1198
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1
javadoc
36
the patch passed

+1
findbugs
228
the patch passed

_ Other Tests _

-1
unit
17691
hbase-server in the patch failed.

+1
asflicense
33
The patch does not generate ASF License warnings.

21797

Reason
Tests

Failed junit tests
hadoop.hbase.snapshot.TestMobFlushSnapshotFromClient

Subsystem
Report/Notes

Docker
Client=19.03.1 Server=19.03.1 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/3/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/495

Optional Tests
dupname asflicense javac javadoc unit spotbugs findbugs shadedjars hadoopcheck hbaseanti checkstyle compile

uname
Linux 51ee83b3fb2e 4.4.0-143-generic #169-Ubuntu SMP Thu Feb 7 07:56:38 UTC 2019 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-495/out/precommit/personality/provided.sh

git revision
branch-2.2 / b4734e7667

Default Java
1.8.0_181

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/3/artifact/out/patch-unit-hbase-server.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/3/testReport/

Max. process+thread count
5041 (vs. ulimit of 10000)

modules
C: hbase-server U: hbase-server

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-495/3/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z) findbugs=3.1.11

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

Let me merge while Guanghao is sleeping so we can get some nightly runs in before he wakes.

Signed-off-by: Peter Somogyi<EMAIL_ADDRESS>Signed-off-by: stack<EMAIL_ADDRESS>


Add syntactic sugar for tuples

So in SML, tuples desugar into records with numeric fields consecutively increasing from 1. Ie.
$ sml
Standard ML of New Jersey v110.78 [built: Thu Aug 20 19:23:18 2015]
- {1 = 2, 2 = 3} : int * int;
val it = (2,3) : int * int
- (2, 3) : {1 : int, 2 : int};
val it = (2,3) : int * int

Not sure if we would want to go down this route, or add them as a separate type.
In Idris, tuples are sugar for nested Pairs, so you can implement things over them generically:
Idris> (1, (MkPair 2 3))
(1, 2, 3) : (Integer, Integer, Integer)
Idris> (1, (2, 3))
(1, 2, 3) : (Integer, Integer, Integer)
Idris> (1, (MkPair 2 3))
(1, 2, 3) : (Integer, Integer, Integer)
Idris> :doc Pair
Data type Builtins.Pair : (A : Type) -> (B : Type) -> Type
    The non-dependent pair type, also known as conjunction.
    Arguments:
        A : Type  -- the type of the left elements in the pair

        B : Type  -- the type of the left elements in the pair

Constructors:
    MkPair : (a : A) -> (b : B) -> (A, B)
        A pair of elements
        Arguments:
            a : A  -- the left element of the pair

            b : B  -- the right element of the pair

I will just add that Rust tuples are currently mapped to records with the fields { _0: ..., _1: ..., _2: ... }. This allows indexing on 'tuples' but may not be intuitive. Rust allows tuples to be indexed directly as t.0 but then you run in to problems when parsing things such as t.0.1 which have to be written as (t.0).1

Yeah. SML uses #label, which removes the integer ambiguity, eg. #2 (1, 2) - but I think we want to stick to using the dot operator for record projection.
Another problem with using natural indexes would be:
let { 0 = x, 1 = y } = (1, 2);

Implemented in #265


add pycharm .idea directory to python gitignore

add pycharm environment files (.idea) to gitignore
https://rider-support.jetbrains.com/hc/en-us/articles/207097529-What-is-the-idea-folder-
I prefer ignoring the files that could be not ignored but maybe i'm wrong.

Thanks, but see Global\JetBrains.gitignore as that has more detailed rules.

Ok, thank you.


Extra space added when rendering checkboxes with labels

In field.html template, when rendering a checkbox with form_show_labels, the mb-3 class is present twice (here and here)
Because of this duplicate mb-3 classes, checkbox fields have more space at the bottom than other fields.
The second mb-3 should be removed for consistent rendering with other fields (the same way the duplicated "row" class was removed in https://github.com/django-crispy-forms/crispy-bootstrap5/pull/83/files#diff-9ffc7ba2df774d7f6f3de63e6d8c32576620d52105dcf1d0683ed5f03bfdd4a6)
This line should be replaced by
   <{% if tag %}{{ tag }}{% else %}div{% endif %} id="div_{{ field.auto_id }}" class="{% if field|is_checkbox and form_show_labels %}form-check{% else %}mb-3{% if 'form-horizontal' in form_class %} row{% endif %}{% endif %}{% if wrapper_class %} {{ wrapper_class }}{% endif %}{% if field.css_classes %} {{ field.css_classes }}{% endif %}">

Thanks for the report, would be great if you could turn your suggestion into a pull request. 🙏

Hi @smithdc1 , I just created pull request. Please, let me know if some improvements are expected.

Fixed in #119


Automatically fill in bit pattern

The Go equivalent using iota looks like:
const (
    flagA = 1 << iota,
    flagB,
    flagC,
    flagD,
)

Is this something you would consider supporting in a better way in bitflags? We only need to support it for a finite number of values (at most 128) so I don't foresee any problems writing the macro logic.

I've got an example of this in another crate which does +1 instead of <<1, but it may serve as an example at least

I have a proof of concept in iota. In hypothetical bitflags syntax it would looks something like:
bitflags! {
    struct Flags: u32 {
        const FLAG_A = 1 << iota;
              FLAG_B
              FLAG_C
        const FLAG_ABC = FLAG_A.bits | FLAG_B.bits | FLAG_C.bits;
    }
}

This seems too elaborate for bitflags.


Add auto-resolution for machine name

Config hard-codes the machine name which is fine for most use-cases, but network mounted file-systems shouldn't use a hard-coded machine name.
Perhaps allow the user to set a special value like "auto" to allow for just-in-time machine name resolution.
I think I would need to modify get_config from get_config.py

just-in-time machine name resolution has been implemented :)


AI

VS Code with AI

https://marketplace.visualstudio.com/items?itemName=Blackboxapp.blackbox
https://marketplace.visualstudio.com/items?itemName=DanielSanMedium.dscodegpt
https://marketplace.visualstudio.com/items?itemName=Bito.Bito

https://github.com/EthPrague-2023/saunabound-contracts/tree/main