Cannot generate code from specific swagger 2.0 spec. Not sure why it's failing

I am having an issue parsing this spec: https://webapidemo.rentalworks.net/swagger/accountservices-v1/swagger.json
In fact, pretty much every spec from this site has issues with this generator. I am assuming there is something wrong with the spec itself but I'm having a hard time figuring out what since I'm not familiar with how these code generators currently work. It looks like it is incorrectly parsing. Any help would be appreciated. Thanks!
Build runner output:
[INFO] Generating build script completed, took 246ms
[INFO] Reading cached asset graph completed, took 30ms
[INFO] Checking for updates since last build completed, took 247ms
[WARNING] swagger_dart_code_generator:swagger_dart_code_generator on lib/swagger/account_services.swagger:
[WARNING] Code formatting failed.
          Please raise an issue on https://github.com/epam-cross-platform-lab/swagger-dart-code-generator/issues/
          Reason: Could not format because the source could not be parsed:

line 1867, column 28 of .: Expected a class member.
     ╷
1867 │     factory Func<Task<string>>.fromJson(Map<String, dynamic> json) => _$Func<Task<string>>FromJson(json);
     │                               ^
     ╵
line 1449, column 20 of .: A function body must be provided.
     ╷
1449 │     final Func%3CTask%3Cstring%3E%3E? jtiGenerator;
     │                       ^
     ╵
line 1449, column 32 of .: Expected a class member.
     ╷
1449 │     final Func%3CTask%3Cstring%3E%3E? jtiGenerator;
     │                                   ^^
     ╵
line 1449, column 13 of .: A function body must be provided.
     ╷
1449 │     final Func%3CTask%3Cstring%3E%3E? jtiGenerator;
     │                ^
     ╵
line 1449, column 29 of .: Expected a class member.
     ╷
1449 │     final Func%3CTask%3Cstring%3E%3E? jtiGenerator;
     │                                ^^
     ╵
line 1867, column 14 of .: Constructors can't have type parameters.
     ╷
1867 │     factory Func<Task<string>>.fromJson(Map<String, dynamic> json) => _$Func<Task<string>>FromJson(json);
     │                 ^^^^^^^^^^^^^^
     ╵
line 1449, column 20 of .: Expected a class member.
     ╷
1449 │     final Func%3CTask%3Cstring%3E%3E? jtiGenerator;
     │                       ^
     ╵
line 1449, column 36 of .: A function body must be provided.
     ╷
1449 │     final Func%3CTask%3Cstring%3E%3E? jtiGenerator;
     │                                       ^^^^^^^^^^^^
     ╵
line 1867, column 28 of .: A function body must be provided.
     ╷
1867 │     factory Func<Task<string>>.fromJson(Map<String, dynamic> json) => _$Func<Task<string>>FromJson(json);
     │                               ^
     ╵
line 1449, column 32 of .: A function body must be provided.
     ╷
1449 │     final Func%3CTask%3Cstring%3E%3E? jtiGenerator;
     │                                   ^^
     ╵
(44 more errors...)
[SEVERE] chopper_generator:chopper_generator on lib/generated_code/account_services.swagger.dart:

This builder requires Dart inputs without syntax errors.
However, package:rentalworks/generated_code/account_services.swagger.dart (or an existing part) contains the following errors.
account_services.swagger.dart:1889:40: Unexpected text 'on'.
account_services.swagger.dart:1449:31: Operator declarations must be preceded by the keyword 'operator'.
account_services.swagger.dart:1449:14: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
And 51 more...

Try fixing the errors and re-running the build.

[SEVERE] json_serializable:json_serializable on lib/generated_code/account_services.swagger.dart:

This builder requires Dart inputs without syntax errors.
However, package:rentalworks/generated_code/account_services.swagger.dart (or an existing part) contains the following errors.
account_services.swagger.dart:1889:40: Unexpected text 'on'.
account_services.swagger.dart:1449:31: Operator declarations must be preceded by the keyword 'operator'.
account_services.swagger.dart:1449:14: Variables must be declared using the keywords 'const', 'final', 'var' or a type name.
And 51 more...

Try fixing the errors and re-running the build.

[INFO] Running build completed, took 543ms
[INFO] Caching finalized dependency graph completed, took 20ms
[SEVERE] Failed after 569ms

Hi @point-source ,
I will check this issue ASAP

@point-source  I can't open this link
https://webapidemo.rentalworks.net/swagger/accountservices-v1/swagger.json
Can you please share this swagger file?

Strange, I seem to be able to access it without any credentials/auth. What kind of error do you get?
I have also added it as a gist here: https://gist.github.com/point-source/5ac94a577ff56c6d48de0682b3739d53

@point-source  thanks, I'll check it tomorrow!

THis one fails because your models has "+" symbols in names :D
Working on fix

I actually noticed this and did a quick find/replace and replaced them with '-'. I also filed a bug report with the provider of this spec since it is non-compliant with the openapi official spec.
This fix allowed the models to build (with the build only models option) but the chopper classes still fail if I disable that option.

@point-source I'll let you know when this file will generated without errors. Just wait a little. Already working ot in

Sure thing. Thank you so much for the excellent support here!

Ok now your file generated well!
I will check my changes on all my beatifull collection of swaggers and if everything is OK - release 2.0.9
Now you can use git ref in pubspec.yaml
swagger_dart_code_generator:
git:
url: https://github.com/epam-cross-platform-lab/swagger-dart-code-generator.git
ref: version/2.0.9

Testing now. Generation looks good, no errors. Trying to actually test against the api right now and getting a decode error. Trying to figure out if that's on my side or not.
Just for info, the error is: _TypeError (type '_InternalLinkedHashMap<String, dynamic>' is not a subtype of type 'FwCoreControllersFwJwtControllerJwtResponseModel?')
Occuring on the return line (copyWith) of decodeJson method of the chopper JsonConverter class.

Ah yep, looks like the replacement of the JsonSerializableConverter() with chopper.JsonConverter() is the culprit. Specifically the removal of this code from generation:
typedef JsonFactory<T> = T Function(Map<String, dynamic> json);

class CustomJsonDecoder {
  CustomJsonDecoder(this.factories);

  final Map<Type, JsonFactory> factories;

  dynamic decode<T>(dynamic entity) {
    if (entity is Iterable) {
      return _decodeList<T>(entity);
    }

    if (entity is T) {
      return entity;
    }

    if (entity is Map<String, dynamic>) {
      return _decodeMap<T>(entity);
    }

    return entity;
  }

  T _decodeMap<T>(Map<String, dynamic> values) {
    final jsonFactory = factories[T];
    if (jsonFactory == null || jsonFactory is! JsonFactory<T>) {
      return throw "Could not find factory for type $T. Is '$T: $T.fromJsonFactory' included in the CustomJsonDecoder instance creation in bootstrapper.dart?";
    }

    return jsonFactory(values);
  }

  List<T> _decodeList<T>(Iterable values) =>
      values.where((v) => v != null).map<T>((v) => decode<T>(v) as T).toList();
}

class JsonSerializableConverter extends chopper.JsonConverter {
  @override
  chopper.Response<ResultType> convertResponse<ResultType, Item>(
      chopper.Response response) {
    if (response.bodyString.isEmpty) {
      // In rare cases, when let's say 204 (no content) is returned -
      // we cannot decode the missing json with the result type specified
      return chopper.Response(response.base, null, error: response.error);
    }

    final jsonRes = super.convertResponse(response);
    return jsonRes.copyWith<ResultType>(
        body: jsonDecoder.decode<Item>(jsonRes.body) as ResultType);
  }
}

final jsonDecoder = CustomJsonDecoder(LassoJsonDecoderMappings);

Not saying we need to bring that code back but it does seem that they are not equivalent substitutes at the moment.

Additionally, out of the 9 swagger files I have from this application, your fix has worked on 3 of them. Here are all of them so you can add them to your testing collection: https://www.dropbox.com/sh/2t3s99zsmgf89ar/AACGJzjw3cPRCCEMDMvn6is9a?dl=0
The ones that are working are:

account_services
exports
plugins

Let me know how I can help here. Thanks again

Cool, I'll check it


support postSubscribe as configuration for useAsyncState

after subscription to an async state, we should allow the user to invoke some code
this code should allow attaching event handlers in the used environment

postSubscribe arguments to be defined


Add libjemalloc-dev to ruby-base

Using jemalloc can reduce Ruby memory usage by 30%.
It makes sense to include this in the base image.
Ref: https://medium.com/@adrienjarthon/ruby-jemalloc-results-for-updown-io-d3fb2d32f67f

I signed it!

The library jemalloc is not something new, it's powered many apps and even being used as default memory allocator by data stores Redis, Percona server where performance is crucial. Jemalloc has proven and tested in production.
To bring jemalloc to Ruby docker base image we either link is statically or dynamically and we benchmarked all three options: malloc, LD_PRELOAD=jemalloc and compile with jemalloc (what this PR is about). Based on benchmark results we can say that compiling jemalloc-dev brings substantial difference to performance characteristics, memory fragmentation and how much time GC spend.
Why is this PR required? Our current Ruby based images has jemalloc-dev included, but we are moving to GCP, so our docker build command fail due to missing library. This PR should help to unblock us.
P.R. It's proposed to be used with another Ruby project GoogleCloudPlatform/fluent-plugin-google-cloud where you can find the technical details, benchmarks and reason why this makes a difference.

cc @igorpeshansky

Thanks! List alphabetized.


containerd runtime support?

What would you like to be added:
containerd runtime
Why is this needed:
Clarification on the status of this pull request https://github.com/kontena/pharos-cluster/pull/431

Containerd runtime is much needed with kata containers.


multi-day events

I feel sure that a multi-day event used to show 'from' and 'to' date but now it just shows 'from' date, but maybe it is a change to the information provider.
It only affects events that are multi-day 'All Day' events.
I only want one entry showing the start and end date - same as a single day one showing start and end times, not the multi-day option which gives me an entry per day.
Any chance you could adjust ?

you want one event showing the start and end date for a multi day event? I think that's the default behavior if you turn off multiday option

See two events shown in image. It works fine wuth a start and end TIME. Bur ALLDAY events spanning more than one day just shows start date.

Same issue here, a ALLDAY event that is multiple days shows only on the startday.
If i have a multiday ALLDAY event that lasts an entire week, i'd prefer it to show on all days.

I moved to atomic-calendar. Works nicely for me.

since March i have not had as much free time to work on these projects but hopefully things can settle down in the next few months. The next release of HA will include a new calendar card built in so whether that card will replace this one is up in the air.


Build errors are not shown in Error List window

Current master:

yes this looks like a regression to VS2015

@vasily-kirichenko @forki Does anyone have any hint? I think the integration between FSC errors  and VS error list goes wrong, but I have no idea where.

@dungpa I'm aware about two points where errors are reported to Roslyn: https://github.com/Microsoft/visualfsharp/tree/master/vsintegration/src/FSharp.Editor/Diagnostics

I don't think that is it. The error comes from MSBuild, it should be related to https://github.com/Microsoft/visualfsharp/blob/baebacb434a084853c57023750695279ae61898c/vsintegration/src/FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs

Sorry I have no idea
Am 16.12.2016 8:36 nachm. schrieb "Anh-Dung Phan"<EMAIL_ADDRESS>
:

I don't think that is it. The error comes from MSBuild, it should be
related to https://github.com/Microsoft/visualfsharp/blob/
baebacb434a084853c57023750695279ae61898c/vsintegration/src/
FSharp.ProjectSystem.Base/Project/IDEBuildLogger.cs
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/visualfsharp/issues/1988#issuecomment-267677982,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AADgNLb133gpQ81ZvaS394uUWhE84Wdfks5rIuhOgaJpZM4LJ4Nj
.


[SPARK-18986][Core] ExternalAppendOnlyMap shouldn't fail when forced to spill before calling its iterator

What changes were proposed in this pull request?
ExternalAppendOnlyMap.forceSpill now uses an assert to check if an iterator is not null in the map. However, the assertion is only true after the map is asked for iterator. Before it, if another memory consumer asks more memory than currently available, ExternalAppendOnlyMap.forceSpill is also be called too. In this case, we will see failure like this:
[info]   java.lang.AssertionError: assertion failed
[info]   at scala.Predef$.assert(Predef.scala:156)
[info]   at org.apache.spark.util.collection.ExternalAppendOnlyMap.forceSpill(ExternalAppendOnlyMap.scala:196)
[info]   at org.apache.spark.util.collection.Spillable.spill(Spillable.scala:111)
[info]   at org.apache.spark.util.collection.ExternalAppendOnlyMapSuite$$anonfun$13.apply$mcV$sp(ExternalAppendOnlyMapSuite.scala:294)

This fixing is motivated by http://apache-spark-developers-list.1001551.n3.nabble.com/java-lang-AssertionError-assertion-failed-tc20277.html.
How was this patch tested?
Jenkins tests.
Please review http://spark.apache.org/contributing.html before opening a pull request.

Test build #70538 has started for PR 16387 at commit 03d4dc0.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/70538/
Test FAILed.

Merged build finished. Test FAILed.

retest this please.

Test build #70543 has started for PR 16387 at commit 03d4dc0.

Test build #70543 has finished for PR 16387 at commit 03d4dc0.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/70543/
Test PASSed.

cc @JoshRosen Can you take a look? Thanks.

cc @rxin @zsxwing too

ping @rxin @zsxwing @JoshRosen @davies

Test build #71068 has started for PR 16387 at commit 5645533.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71068/
Test FAILed.

retest this please.

Test build #71072 has started for PR 16387 at commit 5645533.

Test build #71072 has finished for PR 16387 at commit 5645533.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71072/
Test PASSed.

@vanzin Is this looking good for you now? Thanks.

Test build #71208 has started for PR 16387 at commit 5ebf079.

Test build #71208 has finished for PR 16387 at commit 5ebf079.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71208/
Test PASSed.

LGTM, I'll leave it open a bit in case someone else has comments.

@vanzin ok, thanks for review.

I have tested this, but I found a very strange observation. GC frequency has increased many folds...and majority of the time is spend in GC.

@samkum Thanks for testing this. I think it is because every time forceSpill is called now, it will spill the map anyway. I will add a check to only spill the map if the map is not empty.

Test build #71425 has started for PR 16387 at commit b1ef9ec.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71425/
Test FAILed.

retest this please.

Test build #71429 has started for PR 16387 at commit b1ef9ec.

Test build #71429 has finished for PR 16387 at commit b1ef9ec.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/71429/
Test PASSed.

The fix is better but still produces visible GC issues. After removing the fix, GC is no longer a problem.

@samkum I've expected this and your testing inspired me to change how the memory consumers are spilled in order. I've submitted a PR #16603 for this.
Simply said, even I added a check and only spill the map if it has elements. Currently, the map will be chose to spill even it has few elements added since last time it spilled.
Because of that, I will hope #16603 can be reviewed and merged first before this. So we won't see the GC issue.
Can you test #16603 and see if it helps GC issue of this PR? Thanks.

@samkum  can you reply to the questions above? This PR is basically blocked on your feedback that it makes things worse.

@samkum did you try this patch without the "spill map on every call" behavior (basically returning "false" instead of spilling the in-memory map when the iterator doesn't exist)?
If that case also results in increased gc, maybe your app just needs more memory. That would be the case where the assert would trigger before.

Hi,
No, I havent test this with out the ExternalAppendOnlyMap fix if this is
what you are asking. I tested it with changes to both the classes:
TaskMemoryManager and ExternalAppendOnlyMap.
-Sameer.
On Tue, Jan 24, 2017 at 3:17 AM, Marcelo Vanzin<EMAIL_ADDRESS>wrote:

@samkum https://github.com/samkum can you reply to the questions above?
This PR is basically blocked on your feedback that it makes things worse.
@samkum https://github.com/samkum did you try this patch without the
"spill map on every call" behavior (basically returning "false" instead of
spilling the in-memory map when the iterator doesn't exist)?
If that case also results in increased gc, maybe your app just needs more
memory. That would be the case where the assert would trigger before.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/16387#issuecomment-274627803, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARBhqyMAq1IRIMLHFwU5atf2IYdWs88ks5rVSALgaJpZM4LUlyt
.

No the question is whether you tested without @viirya commit b1ef9ec (the last one that forces spills of in-memory maps), or just the very last version of the patch.

Nope, I didn't tested it in isolation.
-Sameer.
On Jan 24, 2017 10:09 PM, "Marcelo Vanzin"<EMAIL_ADDRESS>wrote:

No the question is whether you tested without @viirya
https://github.com/viirya commit b1ef9ec (the last one that forces
spills of in-memory maps), or just the very last version of the patch.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/16387#issuecomment-274859256, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARBhjRZruTZJcLIkrBMF-x9tQ6GcF-_ks5rVilUgaJpZM4LUlyt
.

Nope, I didn't tested it in isolation.

Could you do that? To make sure that it's really caused by this change?

ok..I will get back to you in next couple of days.
-Sameer.
On Thu, Jan 26, 2017 at 3:56 AM, Marcelo Vanzin<EMAIL_ADDRESS>wrote:

Nope, I didn't tested it in isolation.
Could you do that? To make sure that it's really caused by this change?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/16387#issuecomment-275252690, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARBhtcSjke249vrHE-oOyZXKTPSbob3ks5rV8wmgaJpZM4LUlyt
.

@mridulm https://github.com/mridulm - need one clarification: if I test
it with out ut @viirya https://github.com/viirya commit b1ef9ec,wouldnt
the commit fail at the assertion.( assert(readingIterator != null). Would
the taskManager change take care of this.
On Thu, Jan 26, 2017 at 10:43 AM, Sameer Kumar<EMAIL_ADDRESS>wrote:

ok..I will get back to you in next couple of days.
-Sameer.
On Thu, Jan 26, 2017 at 3:56 AM, Marcelo Vanzin<EMAIL_ADDRESS>wrote:

Nope, I didn't tested it in isolation.
Could you do that? To make sure that it's really caused by this change?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/16387#issuecomment-275252690, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARBhtcSjke249vrHE-oOyZXKTPSbob3ks5rV8wmgaJpZM4LUlyt
.

wouldnt the commit fail at the assertion

No. We want to know if testing without that commit shows the same GC behavior you saw with that commit. There's no assert in the code when you just remove that commit.

@samkum Any update?

Hi liang,
I got pulled into another project. Will need few more days to catch up on
bandwidth.
Just for confirmation, I will testing with changes just to TaskManager
class.
-Sameer.
On Feb 6, 2017 7:29 PM, "Liang-Chi Hsieh"<EMAIL_ADDRESS>wrote:

@samkum https://github.com/samkum Any update?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/16387#issuecomment-277688500, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARBhjWvXCEKp7lqrStBywqNjY35BL8aks5rZyc9gaJpZM4LUlyt
.

I will testing with changes just to TaskManager class.

No, we're asking you to test without the last two commits in this PR. Alternatively, if possible, you could post the code somewhere so that we don't have to depend on you to try things out.

Please share the commit id...i think that will make it clear. I can't share the code as its propriety to organization,. but i am just reducing a map phase, reduce by key and reducebykeyandwindow.

@samkum the code is in this PR! Just revert the last two commits.

Hi Marcelo,
Are you referring to following commit.
5645533(
https://github.com/apache/spark/pull/16387/commits/5645533ede8bb37aa316afbc0d003d042bf5d52d
)
-Sameer.
On Wed, Feb 8, 2017 at 11:35 PM, Marcelo Vanzin<EMAIL_ADDRESS>wrote:

@samkum https://github.com/samkum the code is in this PR! Just revert
the last two commits.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/16387#issuecomment-278411836, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARBhrLi2YaA1B6C8a203ComRgZ5mMgPks5ragP-gaJpZM4LUlyt
.

Go to the top of this page. Click on the "commits" tab. Look at the last two on the list. Remove those ("git reset" or "git revert" or whatever you prefer). Build, test.

@samkum if you can't get back to us with the information we asked for, I'll just assume that the problem is on your side and push this change. It's been sitting here already reviewed for long enough.

I can't commit on the timelines. I don't want to block things at my end.
-Sameer.
On Thu, Feb 16, 2017 at 1:23 AM, Marcelo Vanzin<EMAIL_ADDRESS>wrote:

@samkum https://github.com/samkum if you can't get back to us with the
information we asked for, I'll just assume that the problem is on your side
and push this change. It's been sitting here already reviewed for long
enough.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/apache/spark/pull/16387#issuecomment-280119943, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AARBhsYxfqSP4u5z5F2Iad_-84ufK-ZSks5rc1fRgaJpZM4LUlyt
.

Alright. I'm merging this to master, we can always fix things later if there's an issue.
Sorry for the delay @viirya

Thanks! @vanzin
Yes we can always come back to fix things later if there is an issue.


Add DecoratingProtocol

If you want to stay closer to thrift I can rename the class to ProtocolDecorator.
closes #64

Hi @gabrielittner, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement. It's all electronic and will take just minutes. I promise there's no faxing. https://cla.microsoft.com.

TTYL, MSBOT;

@gabrielittner, Thanks for signing the contribution license agreement so quickly! Actual humans will now validate the agreement and then evaluate the PR.
Thanks, MSBOT;

Everything  should be tested now. I had to add a package private ctor to DecoratingProtocol so that I can pass in a mocked Transport.

Awesome, thank you!


Move GA tracking into  tag

There's contradictory information about where GA tracking should be added. In GA admin they say to the beginning of <body>, in GA help they say to the end of </head>.
AdWords support recommended to put it into <head>.
@fauvel please review

Lgtm, and both versions probably work equally well "in the wild".


client connection - commands do not respond

Hi.
I have a Redis server running on a machine with the descriptions below and have 5 servers on separate machines requesting to it.
After a while , say 24 hours, some of the Redis clients goes into a mode which they show connected: true in the client object but no response comes back for any command, it doesn't even throw an error , it just keeps waiting.
I'm guessing there are many factors which can cause this problem but I appreciate it if you could shine some light on this matter.
if you needed more details about the environment or something I will provide.
Environment:

Node.js Version: 16.13.0
Redis Server Version: v=5.0.14 sha=00000000:0 malloc=jemalloc-5.1.0 bits=64 build=20357126fbf912e0
Node Redis Version: 3.1.2
Platform: Debian GNU/Linux 10

@kooshafo Can you check in redis log file if it's present a module "fork" starting message in that time window?


autoprefixer: Replace color-adjust to print-color-adjust.

Prerequisites

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

Describe the issue
autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
_form_check.scss, line 28
color-adjust: exact; // Keep themed appearance for print
has to be
print-color-adjust: exact; // Keep themed appearance for print
in the future i think. it is depreceated.
Reduced test cases
no test link
What operating system(s) are you seeing the problem on?
Windows, macOS, iOS, Linux
What browser(s) are you seeing the problem on?
Chrome, Firefox
What version of Bootstrap are you using?
v5.1.3

same issue. and with postcss-fail-on-warn  message failed my build :(
fix: npm install<EMAIL_ADDRESS>--save-exact

Same issue here. Builds failing because of this.
The fixed proposed by @dkrnl didn't help me.

I ran into the same issue for Bootstrap 4.6.1

I'm experiencing the same issue:
Using laravel-mix v6.0.43 which depends on autoprefixer v10.4.7.
Bootstrap will compile, but produces a warning:
1 WARNING in child compilations (Use 'stats.children: true' resp. '--stats-children' for more details)
Once I update webpack.mix.js with the following, I'll get a bit more details:
mix.webpackConfig({  stats: {  children: true  }  });
WARNING in ./resources/sass/app.scss (./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[5].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[5].use[2]!./node_modules/resolve-url-loader/index.js??ruleSet[1].rules[5].use[3]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[5].use[4]!./resources/sass/app.scss)
Module Warning (from ./node_modules/postcss-loader/dist/cjs.js):
Warning
(2603:3) autoprefixer: Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.

I encountered the same issue when I created a project with create react app.
Bootstrap version: v5.1.3

I think this is not related to bootstrap itself. Happens to me using Tailwind also, this directive in app.css:
@tailwind base;

The fixes proposed by @dkrnl and @NicoAdrian didn't help me
Fixed it by forcing the version of the peer dependency in my package.json, note: I use node 16.15.0
"overrides": {
    "autoprefixer": "10.4.5"
 }

"autoprefixer": "10.4.5" seem ignore the warning.
it is a temporary fix for me.
https://github.com/postcss/autoprefixer/blob/10.4.6/CHANGELOG.md

All the above solution did not work for me :(.

Deleting and reinstalling fixed the issue for me. Currently on autoprefixer 10.4.7

This worked

Replace color-adjust to print-color-adjust. The color-adjust shorthand is currently deprecated.
Below solution didnt't work
add in package.json
"overrides": {
"autoprefixer": "10.4.7"
}
npm install

You gotta use 10.4.5.
  "overrides": {
    "autoprefixer": "10.4.5"
    }
    ```

Still not working after setting it to 10.4.5.

npm install<EMAIL_ADDRESS>--save-exact

This worked

This most certainly didn't work for me.

npm install<EMAIL_ADDRESS>--save-exact

But following helped remove the warning.
In the package.json of the top level directory of the react app, add the following section after the dependencies: {..}
"overrides": {
    "autoprefixer": "10.4.5"
  }

delete package-lock.json
\rm -rf node_modules
npm install
restart the react app with "react-scripts start"

The warning is no more. For more information about "dependencies", see following
https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/

I ran into the same problem you have to change all dep
<img width="516" alt="Screen Shot 2022-05-05 at 9 30 48 PM" src="https://user

-images.githubusercontent.com/94384875/167067329-b44e1ea8-c5b0-4bb3-af37-d31046008a89.png">
endencies I found about 21 in my package-lock.json file in the url and version most of them were 10.4.7 while the very top one was 10.4.5 just CMD F "autoprefixer" and make sure they're all the same versions.

@vineetdigit
can you explain "\rm -rf node_modules" ? thx:)

I'd suggest to move these things to a discussion since they do not really add value to the issue here. The issue is well-described and there's even a PR to fix it.

I am receiving this error after forcing "autoprefixer" to 10.4.5 .
"Loading PostCSS "postcss-preset-env" plugin failed: Cannot find module 'fraction.js'"

Fixed in v5 by #36258.

Have this issue using tail wind , I have Tried the above methods but non seem to work, getting stuck is always annoying

after setting the stat to true in webpack.mix.js, It was resolved by running the 'npm install<EMAIL_ADDRESS>--save-exact" command  and updating my tailwind form to '0.5.0'.... thanks

Have this issue using tail wind , I have Tried the above methods but non seem to work, getting stuck is always annoying

As @achur00 mentions tailwindcss users can upgrade tailwindcss form plugin to 0.5.0 to squelch this error per https://github.com/tailwindlabs/tailwindcss/issues/8277#issuecomment-1118726171

overrides

Not able to fix it by following all these instructions.

same issue. and with postcss-fail-on-warn message failed my build :(
fix: npm install<EMAIL_ADDRESS>--save-exact

it worked for me^^thanks

@demateu can you plz let me know about the steps you followed ?
I am using React version 18.0.0 and react-bootstrap version 2.2.3.

After many tries, only this worked for me:

Install force-resolutions
npm install force-resolutions --save-dev
Add preinstall to your scripts on package.json:
"preinstall": "npx force-resolutions"
Add resolutions to your package.json

"resolutions": {
      "autoprefixer": "10.4.5"
},

Clean your node_modules and package-lock

rm -rf node_modules
rm -rf package-lock.json

Install again
npm install

Check your package-lock and see if correct versions were installed.

Make sure to have package-lock pushed to your repository.

@demateu can you plz let me know about the steps you followed ? I am using React version 18.0.0 and react-bootstrap version 2.2.3.

I have fixed it manually by going in node_modules/bootstrap/dist/css/bootstrap.min.css
and search for color-adjust
just replaced it by print-color-adjust and it's fixed

Not quite solving the issue since it works locally

Along with adding an overrides entry, I had to perform the rest of the steps in this answer on Stack Overflow. No more warning! 🎉

I tried all the above fixes and none worked.  But this did:
npm install<EMAIL_ADDRESS>

I tried your way and it worked properly
On Tue, 17 May 2022, 02:08 lfernandez55, @.***> wrote:

I tried all the above fixes and none worked. But this did:
npm install @.***
—
Reply to this email directly, view it on GitHub
https://github.com/twbs/bootstrap/issues/36259#issuecomment-1128222959,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AWQQD6X4XMY62MOUGU3B6EDVKLIPDANCNFSM5U3KKJVA
.
You are receiving this because you commented.Message ID:
@.***>

I tried all the above fixes and none worked. But this did:
npm install<EMAIL_ADDRESS>
This worked perfectly fine for me! no more warning. Thanks

To fix this issue for bootstrap 4.6.1 users who do cannot or do not want to upgrade yet to bootstrap beta 5.2.0 I managed to fix the issue by doing the following:

Delete package-lock.json file
Delete node_modules folder
Set "autoprefixer": "10.4.5" in your dependencies (add it when it is not there)
Set "postcss-preset-env": "7.0.0" in your dependencies (add it when it is not there)
Run npm install

The postcss-preset-env package uses autoprefixer to validate the bootstrap css. With a clean install postcss-preset-env was set to 7.0.1 for my application. I am not sure missing out on fixes from 7.0.0 to 7.0.1 will cause other issues, but my application ran fine with this setup.

Stop promoting downgrading dependencies as a fix or solution. It is not. You don't fix the problem of using something that is deprecated, you are just suppressing a warning and ignoring it.
There is already a PR for fixing the warning in 4.7: https://github.com/twbs/bootstrap/pull/36283
But it looks like there isn't an agreement about it.

Sorry mate, but breaking changes like this one in autoprefixer should not be introduced in a minor/patch version, but should always be a major version. This gives everybody the time to upgrade their dependecies accordingly. npm run build now fails because of this warning halting production on our CI/CD servers. We cannot wait untill 4.7 is released to fix this issue.
Can you please explain how we can suppress and ignore only this warning? We want clean code, so we are not going to disable warnings for npm run build completely.

Wasn't the problem initiated by autoprefixer?
On Thu, 19 May 2022, 14:25 jobwttraining, @.***> wrote:

Sorry mate, but breaking changes like this one in autoprefixer should not
be introduced in a minor/patch version, but should always be a major
version. This gives everybody the time to upgrade their dependecies
accordingly. npm run build now fails because of this warning halting
production on our CI/CD servers. We cannot wait untill 4.7 is released to
fix this issue.
Can you please explain how we can suppress and ignore only this warning?
We want clean code, so we are not going to disable warnings for npm run
build completely.
—
Reply to this email directly, view it on GitHub
https://github.com/twbs/bootstrap/issues/36259#issuecomment-1131621043,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAE7SAPIF5HFMIEKHB7N4STVKYXLDANCNFSM5U3KKJVA
.
You are receiving this because you commented.Message ID:
@.***>

@jobwttraining
I wasn't targeting you in my comment, just wanted to state, that ignoring a problem is not a solution (maybe a tmp patch)
A deprecation is exactly the type of thing that happens in minor releases before the new major completely remove support for that functionality and introduces a real breaking change.
This is a complex issue

color-adjust is a deprecated (https://www.w3.org/TR/css-color-adjust-1/#propdef-color-adjust) and not well supported (https://caniuse.com/?search=color-adjust) css property
autoprefixer deprecated it's support too, to remove it eventually
there shoud be a difference between deprecation warnings and other usage warnings, but there isn't

something similar happened when sass deprecated the division with "/". The "solution" was then a switch to sass or sass-loader to to be able to ignore warnings from node-modules and eventually bootstrap released their fix.
If you use webpack you can try to suppress only that message/file (still better than being on outdated libs) https://webpack.js.org/configuration/other-options/#ignorewarnings (I didn't try this, it's just a possibility)
The real solution should come from bootstrap by merging https://github.com/twbs/bootstrap/pull/36283

I tried all the above fixes and none worked. But this did:
npm install<EMAIL_ADDRESS>
Only this work for me thanks))

I tried everything discussed above and nothing worked
but one thing to make sure of, is there any specific place where we put overrides key in package.json ? I've added it after the dependencies and at the end of the file and nothing seems to work

I tried everything discussed above and nothing worked but one thing to make sure of, is there any specific place where we put overrides key in package.json ? I've added it after the dependencies and at the end of the file and nothing seems to work

I tried everything discussed above and nothing worked but one thing to make sure of, is there any specific place where we put overrides key in package.json ? I've added it after the dependencies and at the end of the file and nothing seems to work

same problem

Is there any way to hide the warning message logged by autoprefixer?

It's not working in my React app with Typescript:
I tried all the above but it's not solving this issue anymore.

Package.json file:

{
  "name": "177_react_and_ts",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.16.4",
    "@testing-library/react": "^13.2.0",
    "@testing-library/user-event": "^13.5.0",
    "@types/jest": "^27.5.1",
    "@types/node": "^16.11.36",
    "@types/react": "^18.0.9",
    "@types/react-dom": "^18.0.4",
    "autoprefixer": "10.4.5",
    "bootstrap": "^5.1.3",
    "react": "^18.1.0",
    "react-dom": "^18.1.0",
    "react-scripts": "5.0.1",
    "sass": "^1.52.1",
    "typescript": "^4.6.4",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "overrides": {
    "autoprefixer": "10.4.5"
  }
}

I tried all the above fixes and none worked. But this did:
npm install<EMAIL_ADDRESS>
thanks, this work for me

Add this to your custom scss file: /* autoprefixer: off */
It will disable autoprefixer.

./node_modules/bootstrap/dist/css/bootstrap.min.css
Access on the link with cmd + click or crtl + click
And just change color-adjust to print-color-adjust (cmd + f or crtl f)
npm install && error was fixed

I'm not sure, but it seems<EMAIL_ADDRESS>doesn't work
After package installation got an error about undefined variable - values: $utilities-border-colors

@palyvodaBoi , and why you didn't check if there is a new SCSS file introduced there, and whether you need that file to be included in your SCSS files too? Little bit effort please :)

@shehi lol what?!

To fix  $utilities-border-colors issue:
The new beta has added maps.scss, in a custom build you need to import it after variables:
https://blog.getbootstrap.com/2022/05/13/bootstrap-5-2-0-beta/
My custom scss:
// =========== BOOTSTRAP FUNCTIONS & CORE ===============================
@import "~bootstrap/scss/functions";
// =========== VARIABLES  ===================================
// Optional variable overrides here
@import "./commonVariables";
@import "~bootstrap/scss/variables";
@import "~bootstrap/scss/maps";

To fix this issue for bootstrap 4.6.1 users who cannot or do not want to upgrade yet to bootstrap beta 5.2.0 I managed to fix the issue by doing the following:

Delete package-lock.json file
Delete node_modules folder
Set "autoprefixer": "10.4.5" in your dependencies (add it when it is not there)
Set "postcss-preset-env": "7.0.0" in your dependencies (add it when it is not there)
Run npm install

The postcss-preset-env package uses autoprefixer to validate the bootstrap css. With a clean install postcss-preset-env was set to 7.0.1 for my application. I am not sure missing out on fixes from 7.0.0 to 7.0.1 will cause other issues, but my application ran fine with this setup.

Thats the only fix working for me with admin lte

This worked perfectly for me
npm install<EMAIL_ADDRESS>

I tried all the above fixes and none worked. But this did:
npm install<EMAIL_ADDRESS>
Only this work for me thanks))

Thanks, only this works for me too.

This worked perfectly for me
npm install<EMAIL_ADDRESS>

I bet the reason i faced some issues earlier was that i was using a older version of bootstrap
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Lee David @.>
Sent: Monday, June 6, 2022 7:31:16 PM
To: twbs/bootstrap @.>
Cc: Brian Murimi @.>; Comment @.>
Subject: Re: [twbs/bootstrap] autoprefixer: Replace color-adjust to print-color-adjust. (Issue #36259)
This worked perfectly for me
npm install @.***
—
Reply to this email directly, view it on GitHubhttps://github.com/twbs/bootstrap/issues/36259#issuecomment-1147644435, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AWQQD6RV2V7FUNLDSJPM4F3VNYRVJANCNFSM5U3KKJVA.
You are receiving this because you commented.Message ID: @.***>

same issue. and with postcss-fail-on-warn message failed my build :(
fix: npm install<EMAIL_ADDRESS>--save-exact

Thanks @dkrnl I can now sleep in peace. I have "bootstrap": "^4.5.3", My build always fail before applying this fix.

It is true that installing the npm install<EMAIL_ADDRESS>package fixes the warning not being displayed, but in my case many bootstrap styles are affected.
It's not a solution for me, I'm still waiting for another solution.

@osunaintarcon did you try #36259 (comment)?
This worked for me without updating the package in question

Hello, if I tried this too and it had no effect on my project, I still have the same warning.

I confirm that installing the new beta version (5.2.0-beta1) removed that "color-adjust" warning in my app.

Working on a react project and using bootstrap. Installing the new beta version (5.2.0-beta1) removed that "color-adjust" warning in my app. But, in browser, is showing nothing but a blank page!

npm install<EMAIL_ADDRESS>that worked for me

I tried all the above fixes and none worked. But this did:
npm install<EMAIL_ADDRESS>
After so much trouble this is working for me

My solution for npm:
I addet overrides in package.json like this:
  "overrides": {
    "autoprefixer": "10.4.5"
  },

npm install<EMAIL_ADDRESS>--save-exact
delete node_modules and package-lock.json
npm install

This worked perfectly for me
npm install<EMAIL_ADDRESS>
This worked for me too Thanks

npm install<EMAIL_ADDRESS>
Finally something that works!

This most certainly didn't work for me.

npm install<EMAIL_ADDRESS>--save-exact

But following helped remove the warning.
In the package.json of the top level directory of the react app, add the following section after the dependencies: {..}
"overrides": {
    "autoprefixer": "10.4.5"
  }

delete package-lock.json
\rm -rf node_modules
npm install
restart the react app with "react-scripts start"

The warning is no more. For more information about "dependencies", see following
https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/

this works

all the practice mentioned above not work for me
me environment is using nvm for node 16.13.2
and dev deps:
"dependencies": {
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
"autoprefixer": "10.4.5",
"bootstrap": "^5.1.3",
"dayjs": "^1.11.3",
"react": "^18.2.0",
"react-bootstrap": "^2.4.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},

This most certainly didn't work for me.

npm install<EMAIL_ADDRESS>--save-exact

But following helped remove the warning.
In the package.json of the top level directory of the react app, add the following section after the dependencies: {..}
"overrides": {
    "autoprefixer": "10.4.5"
  }

delete package-lock.json
\rm -rf node_modules
npm install
restart the react app with "react-scripts start"

The warning is no more. For more information about "dependencies", see following
https://www.stefanjudis.com/today-i-learned/how-to-override-your-dependencys-dependencies/

This worked for me thanks

me too

Install this latest release:
npm i<EMAIL_ADDRESS>

same issue. and with postcss-fail-on-warn message failed my build :(
fix: npm install<EMAIL_ADDRESS>--save-exact

This works for me!!

Didn't work for me

This worked for me.
I added the following after dependencies
"overrides": {
    "autoprefixer": "10.4.5"
  }

then run the following command:
npm install

This steps worked for me
1- Add the following lines to the packages.json
"overrides": {
    "autoprefixer": "10.4.5"
  }

2- Then  run the command npm install


Load agents v2

Loading_agents_v2

Description
Updated the loading function for models, so that it supports the newest models from floringogianu (https://github.com/floringogianu/atari-agents/blob/main)

What was added/changed:

load_agents now returns the agent itself as well as a policy function which is used to get an action from a state observation (in form of a buffer)
Updated run_agent. script so it uses the new load_agent method

Why this is necessary:

Different model implementations are using different methods to call for prediction (draw_action, predict, forward, ...)

Issue(s)

No open issues solved, its an quality fix

Type of Change

[ ] 🐛 Bug fix
[ ] ✨ New feature
[ ] 🚨 Breaking change
[ ] 🛠 Refactor
[ ] 📪 Tests
[ ] 📝 Documentation update
[x] ✨Enhancement
[ ] 🛠 Other (please specify):

How Has This Been Tested?

Tested manually with 5 models from florin as well as 5 models from ourself in 5 atari games in the obs_modes dqn and obj (ours).  Testing script was run_agent.py.
I wrote to local tests, where the model_path has to be set and the env have to fit the models. This is an exemplary test to test yourself, not for the CI process (see tests/2_models)

[x] Unit tests
[ ] Integration tests
[ ] Manual testing

Checklist

[x] I have reviewed my changes.
[x] I have added tests to cover my changes (if applicable).
[ ] I have updated the documentation (if applicable).
[x] I have followed the project coding style.
[x] My changes pass all tests.

Tests are done.
Need to upload some models and upload the README for easy downloading them.

First models can be found under: https://hessenbox.tu-darmstadt.de/getlink/fiMp3RajkfxCvHXY8zFGC8VW/
For more information I added a new readme, regarding models


Separate routing from dispatching

I have a middleware that needs a matched route param to perform some pre-dispatching logic, therefore this middleware should run after routing and before the "action" middleware.
Currently this can be achieved by injecting the router instance into a pre-routing middleware and calling $router->match($request) just to get the matched route params, but I think this is a very common use case and could be achieved more elegantly with a middleware registered between routing and dispatching.
It's possible to break the Application#routeMiddleware() into 2 middlewares?

Have you looked at the RouteResultObservers?
http://zend-expressive.readthedocs.org/en/latest/router/result-observers/

Here is a recipe that uses it:
http://zend-expressive.readthedocs.org/en/latest/cookbook/setting-locale-depending-routing-parameter/

@RalfEggert RouteResultObserver will not work for me because I need access to the ServerRequestInterface instance. =\
Also, RouteResultObserver does not allow us to stop middleware pipeline by returning the Response instance without calling $next.

I think it would be nice to have events built in the core. May be that will help ?

@harikt — The only place events are needed are between routing and dispatching, which is something we've attempted to solve with the route result observers. I have no desire to add any events at this time, as you can typically solve the same problems by layering middleware.
@danizord — Are you aware that you can add a list of middleware to dispatch when defining a route? As an example:
[
    'name' => 'guarded',
    'route' => '/api/resource[/{id:[a-f0-9]{8}}]',
    'allowed_methods' => ['GET', 'POST'],
    'middleware' => [
        ValidateIdentifierMiddleware::class,
        ResourceMiddleware::class,
    ],
]

In the above example, if the route is matched, Expressive will create a MiddlewarePipe with the various middlewares listed. As a result, your ValidateIdentifierMiddleware could verify the id provided in the route result to determine if it's valid, use the server request, etc., and return a response if something is wrong; if all is well, it would call $next(), and delegation would pass on to the ResourceMiddleware.
If that won't work, perhaps you can explain the workflow you want to achieve in more detail?

I also need this functionality. While your solution works @weierophinney, the problem is now I have to register the same middleware on every route.

@nesl247 There are ways to automate that.
If you're using a factory for your middleware already, you can modify the factory to return an array with both middleware instances. As an example, instead of this:
return new SomeMiddleware($container->get(Foo::class));

you'd instead do this:
return [
    $container->get(AuthenticationMiddleware::class),
    new SomeMiddleware($container->get(Foo::class)),
];

Another approach is to use delegator factories (zend-servicemanager) or extension (Pimple). In the case of delegator factories, you'd create a delegator factory as follows:
use Zend\ServiceManager\DelegatorFactoryInterface;
use Zend\ServiceManager\ServiceLocatorInterface;

class AuthenticationMiddlewareDelegator implements DelegatorFactoryInterface
{
    public function createDelegatorForName(ServiceLocatorInterface $container, $name, $requestedName, $callback)
    {
        return [
            $container->get(AuthenticationMiddleware::class),
            $callback(),
        ];
    }
}

Then, for any service that needs the Authentication middleware, you add a delegator definition in your configuration:
return [
    'dependencies' => [
        'delegator_factories' => [
            SomeMiddleware::class => [ AuthenticationMiddlewareDelegator::class ],
            OtherMiddleware::class => [ AuthenticationMiddlewareDelegator::class ],
        ],
    /* ... */
];

With Pimple, you use the extend() method:
$pimple->extend(SomeMiddleware::class, function ($instance, $container) {
    return [
        $container->get(AuthenticationMiddleware::class),
        $instance
    ];
});

Unfortunately, the above is not something we support via configuration yet; I'm considering adding some features for that in 1.1. However, it can be done in your config/container.php class, before returning the container instance.
My point is that this can be done in automated fashion. I'd even argue that using delegator factories/pimple extension is a cleaner way of doing it as it allows re-use, and makes explicit how instance creation works.

I'm not quote sure I'm following there. Seems like a lot of wasted effort for something that should be easily done like all other middleware.
I'd honestly expect the pipeline to be more like pre_routing, on_route_match, post_routing, or whatever the names would be exactly. I was kinda shocked it wasn't like this already.
The annoyance is I need the route name for middleware that is executed on every single request. I actually have several of these already. For now, I'm just gonna use the easy route of registering the middleware a bunch of times.

Can you explain the use case? I'd like to understand what you're trying to
accomplish, so I can determine if new features are required, or if I can
provide a solution that works with the current feature set.
On Jan 10, 2016 12:13 PM, "Harrison Heck"<EMAIL_ADDRESS>wrote:

I'm not quote sure I'm following there. Seems like a lot of wasted effort
for something that should be easily done like all other middleware.
I'd honestly expect the pipeline to be more like pre_routing,
on_route_match, post_routing, or whatever the names would be exactly. I
was kinda shocked it wasn't like this already.
The annoyance is I need the route name for middleware that is executed on
every single request. I actually have several of these already. For now,
I'm just gonna use the easy route of registering the middleware a bunch of
times.
—
Reply to this email directly or view it on GitHub
https://github.com/zendframework/zend-expressive/issues/259#issuecomment-170376623
.

While I'm sure everyone is going to have different use cases, and I'm sure having the route configuration for middleware is something that would be commonly used, mine is for logging, validation, and binding. I create classes based on the route name and they are automatically used by my middleware.

@danizord and/or @nesl247 — would passing the request and/or response to the route result observers solve your use cases?
In terms of short-circuiting, you can do that already from route result observers: throw an exception, and create corresponding error middleware that would return a response based on that exception type. I would consider short-circuiting from route result observers an exceptional case, which is why I suggest that approach. You could even have a special exception type that wraps the response you want to return, and the error handler middleware could simply extract and return that.
To re-iterate: would passing the request and/or response to the route result observers solve these use cases? If so, I'll work up a patch. It won't be in time for 1.0, but we can add to a 1.1 version to release very soon after the 1.0 version.

In my opinion, it is not an acceptable solution. By doing that, we are breaking out of the already defined pattern of using middleware, and replacing it with observers for certain functionality. Maybe I'm being a stick in the mud here or something, but it seems odd to split this functionality out.

@nesl247 Your observer would use middleware in this case.
Alternately, we go down the road of having the routing middleware separate. This is possible in a later release as it's currently an internal implementation detail. However, there were a number of design considerations we had that led to keeping it internal to the Application instance that we'll have to resolve before doing so. As such, this has to be a 1.1 or later change if we decide to implement it.

Can you explain the use case? I'd like to understand what you're trying to
accomplish, so I can determine if new features are required, or if I can
provide a solution that works with the current feature set.

Most authorization middlewares would need data from both request attributes and route result:
function ($req, $res, $next) {
    $routeResult = $req->getAttribute(RouteResult::class);
    // Yes I can fetch route attributes from $req but should happen after routing anyway
    $documentId  = $routeResult->getMatchedParams()['documentId'];
    $document    = $this->documentService->findDocumentById($documentId);

    if ($document->getOwnerId() ==! $request->getAttribute('userId')) {
        // You're not allowed to access this document!
    }
}

@weierophinney Having middlewares piped after router middleware and before routed middleware is way better than "route result observers" IMHO, because it's much more easier to understand while it brings the advantages of middlewares (short-circuit, onion-style, request/response access).
I think if we split routing from dispatching the route result observers would become useless after all (@weierophinney can you confirm?).

Alternately, we go down the road of having the routing middleware separate

Yes I think this is the best road :+1: Tell me if I can help :)

@danizord and @nesl247 — please see #270, which attempts to address this. I still have a few things to work out (route(), for instance, injects the pipeline middleware still), but when complete, this approach will allow you to inject your own routing middleware.
I do not plan on splitting routing from dispatching at this time, as dispatching uses the results of routing; however, by making it possible for you to use your own routing middleware, you can choose your own workflow for this.
One note: right now, the routeMiddleware() relies on functionality that's internal to the Application class; I'll be separating that out to a trait, which will allow re-use in your own routing middleware.

@weierophinney

I do not plan on splitting routing from dispatching at this time, as dispatching uses the results of routing

Yeah, but you can fetch it from $request->getAttribute(RouteResult::class); - just like the way ZF2 works, which is great btw.
I'm not sure what's the advantage of doing routing and dispatching together as it only reduces flexibility and forces us to introduce other patterns like "route result observers" to do things that could be achieved with middlewares.

@danizord — On reflection, I like the idea of removing the route result observers. I'm going to see if I can make that work on #270, after I figure out a solution for ordering middleware.

@weierophinney nice! Let me know if I can help in something :D

@weierophinney
How about priorities like we have in the event manager? Maybe that might the solve the issue when merging config files?
return [
    'middleware_pipeline' => [
        /* ... */
        100 =>  Helper\ServerUrlMiddleware::class,
        /* ... */
        200 =>  Helper\UrlHelperMiddleware::class,
        /* ... */
        500 => Zend\Expressive\Container\ApplicationFactory::ROUTING_MIDDLEWARE,
        /* ... */
        600 =>  My\Authentication\ServerMiddleware::class,
        /* ... */
        700 => Zend\Expressive\Container\ApplicationFactory::DISPATCHING_MIDDLEWARE,
        /* ... */
        800 =>  Just\Another\Logging\Middleware::class,
        /* ... */
    ],
]

Or will that be too simple?

@RalfEggert That's likely the route I'll be taking. :wink:

Fixed with #270.


Browse button is not clickable

I try to use the latest version (1.13.21) in my project, but I can not browse files.  If I click on the div nothing happens. (Dropzone works fine).
I wrapped ember-plupload in to a component
uploader-button.hbs
{{#pl-uploader class="top20" multiple=true name="pu" for="file-attachement" onfileadd="uploadLocalAttachments" as |queue dropzone|}}

Upload

{{/pl-uploader}}

The generated HTML:

Console:

EDIT
uploader-button
  click() {
    console.log('element clicked')
    this.$('div.moxie-shim input[type=file]').trigger('click');
  },

Triggering the browse button through the wrapper component opens the file browsing window, but there are some weird errors in the console.

I think the id needs to be on the div.

@knownasilya thanks for answering! sorry, I do not really get it. Which id should be on which div? In uploader-button.hbs I have an id on a div (file-attachement), the same value which the puploader component's for attribute has.

Something like this
Upload


Guess CIDFontType0 subtype based on font file contents (issue 5751)

This patch is inspired by PR #4671.
Fixes #5751.
Fixes #4293.
The problem with the PDF file in the issue, is that it claims the font is CIDFontType0 instead of the correct CIDFontType0C.
The most logical solution would be to check if the font has CFF file, but since the header of those begins with a version number, that seemed complicated in general.
In contrast Type1 fonts have a much simpler structure, see http://partners.adobe.com/public/developer/en/font/T1_SPEC.PDF#page=18, hence adding a isType1file function seemed easiest.
Note: Unsurprisingly, I've come across one Type1 file (bug860632.pdf) that contains "junk" at the start of the file, hence I've tried to account for that case too with a simple workaround for now.
(I wanted to avoid having to read a larger chunk of the font file, and using e.g. a state machine to try and find the Type1 file header.)

/botio-windows preview

/botio-window preview

/botio-linux preview

/botio-windows preview

/botio test

/botio test

/botio makeref
Good to merge when makeref passes ...


Annotation is rendering behind map

The annotation line is rendering behind the map, any help is appreciated.

https://codesandbox.io/s/peaceful-thunder-jk7dj?file=/src/App.js

Hi @willb335,
It seems that you are rendering the annotations (line + text) in the same iteration as the geographies, based on the geography data. That's perfectly fine to do in react-simple-maps. The only issue is that this will put certain annotations under the geographies that are rendered later. If you want the annotations to be above the geographies altogether, you need to map over the geographies data twice, and render the annotations after (i.e. further down in the code than) the geographies. It would roughly look something like this:
<Geographies>
  {({ geographies }) => {
    return (
      <React.Fragment>
        {geographies.map(geo =>
          <Geography key={geo.rsmKey} geography={geo} />
        )}
        {geographies.map(geo => {
          return // annotations go here...
        })}
      </React.Fragment>
    )
  }
</Geographies>

Let me know if this works for you.

Worked great, thank you!


loader-utils vulnerability

Command
other
Is this a regression?

[X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
13
Description
when running npm audit after upgrading angular version to 16 or 17, received the following vulnerability about loader-utils.
on npm ls loader-utils it's seem like it's in used of @angular-devkit/build-angular -><EMAIL_ADDRESS>Minimal Reproduction
npm audit & npm ls loader-utils
Exception or Error
npm audit report:

loader-utils 2.0.0 - 2.0.3
Severity: critical
loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS) - https://github.com/advisories/GHSA-hhq3-ff78-jv3g
Prototype pollution in webpack loader-utils - https://github.com/advisories/GHSA-76p3-8jx3-jpfq
loader-utils is vulnerable to Regular Expression Denial of Service (ReDoS) via url variable - https://github.com/advisories/GHSA-3rfm-jhwj-7488

### Your Environment

```text
16.2.12

Anything else relevant?
No response

These issues have all been fixed upstream. The issue likely stems from an outdated and unmaintained lock file. Please ensure it's updated.


can't work with less-loader-4.0.0

some how less-loader updated, the whole project goes down.

Hello!
Please, open the issue on the relevant template repo (I think you're using the webpack one) and provide some steps to reproduce the problem.
Thanks!


Update periodic GW init and add example

This should improve the PBC GW interface in response to, e.g., issue #1966. But I think the KUGW is broken and might need to be looked at by @zhutianyu1991 or someone else. I get the below error if I try KUKS + KUGW,
Traceback (most recent call last):
  File "/Users/tberkelbach/bin/pyscf/examples/pbc/22-k_points_gw.py", line 36, in <module>
    mygw.kernel()
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/gw/kugw_ac.py", line 705, in kernel
    kernel(self, mo_energy, mo_coeff, orbs=orbs,
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/gw/kugw_ac.py", line 89, in kernel
    vk = uhf.get_veff(gw.mol,dm_kpts=dm)
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/scf/kuhf.py", line 442, in get_veff
    vj, vk = self.get_jk(cell, dm_kpts, hermi, kpts, kpts_band)
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/scf/khf.py", line 529, in get_jk
    vj, vk = self.with_df.get_jk(dm_kpts, hermi, kpts, kpts_band,
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/df/df.py", line 443, in get_jk
    vk = df_jk.get_k_kpts(self, dm, hermi, kpts, kpts_band, exxdiv)
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/df/df_jk.py", line 611, in get_k_kpts
    make_kpt(ki, kj, True)
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/df/df_jk.py", line 444, in make_kpt
    for LpqR, LpqI, sign in mydf.sr_loop((kpti,kptj), max_memory, False):
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/df/df.py", line 355, in sr_loop
    with _load3c(self._cderi, self._dataname, kpti_kptj) as j3c:
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/df/df.py", line 692, in __enter__
    return self.getitem(*self.kpti_kptj)
  File "/Users/tberkelbach/bin/pyscf/pyscf/pbc/df/df.py", line 746, in getitem
    raise KeyError(f'Key {key} not found')
KeyError: 'Key j3c/2 not found'

Yes we can take a look at kugw (should be a simple fix).

Adding the following lines after https://github.com/tberkel/pyscf/blob/157c5564353dd82684705af8159deda72be58fe4/pyscf/pbc/gw/kugw_ac.py#L88
should solve this KUKS+KUGW problem
if uhf.with_df._j_only:
logger.debug(gw, 'Rebuild CDERI for exchange integrals')
uhf.with_df.build(j_only=False)

Adding the following lines after https://github.com/tberkel/pyscf/blob/157c5564353dd82684705af8159deda72be58fe4/pyscf/pbc/gw/kugw_ac.py#L88 should solve this KUKS+KUGW problem
if uhf.with_df._j_only: logger.debug(gw, 'Rebuild CDERI for exchange integrals') uhf.with_df.build(j_only=False)

Please submit a PR

This error has been fixed in PR #1968


feature: automatically create plain-text version from html template to reduce spam score

Low-spam email should always include a plain-text version. I had some issue with that, so I created this feature. It depends on Node html-to-text and works awesome. Turned on by default but can be turned of if required. See updated readme.

Thanks so much! This is awesome, I'll take a look asap.


Simplify ServiceMetricEvent.Builder

Description
Building a ServiceMetricEvent using a ServiceMetricEvent.Builder is a little confusing right now because we need to chain two build() calls to get the final ServiceMetricEvent. This is because the ServiceMetricEvent.Builder is a builder of a builder.
Existing
ServiceMetricEvent event
  = ServiceMetricEvent.builder()
                      .setDimension("dataSource", "wiki")
                      .setDimension("tier", "cold")
                      .build("segment/unavailable/count", 100)
                      .build(serviceDimensions)

Proposed
ServiceMetricEvent event
  = ServiceMetricEvent.builder()
                      .setDimension("dataSource", "wiki")
                      .setDimension("tier", "cold")
                      .setMetricAndValue("segment/unavailable/count", 100)
                      .build(serviceDimensions)

Changes

Make ServiceMetricEvent.Builder extend ServiceEventBuilder<ServiceMetricEvent> and thus convert it to a plain builder rather than a builder of builder.
Add methods setCreatedTime , setMetricAndValue to the builder

This PR has:

[x] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] been tested in a test Druid cluster.

WDYT of renaming the method that adds the metric as .setMetric("segment/unavailable/count", 100) instead of .setMetricAndValue("segment/unavailable/count", 100) due to following reasons:

The other methods in the builder don't specify andValue at the end, i.e. they are named as setDimension instead of setDimensionAndValue, and setMetric` seems more consistent.
It is kinda implicit that the second arg would be a value, and setMetric seems cleaner.

Yeah, I had originally used setMetric, but later changed to this. I can revert to using setMetric if it seems more consistent with the rest of the methods.

Thanks for the review, @LakshSingla !


Updating stormpath dependencies

Coverage remained the same at 69.759% when pulling 6b030ac90a007f5c13623e5531ebb4085136ca08 on update-stormpath-deps into 685864e823d973525fa91e7b1d9f69bcfe42d409 on master.


Bugs with portals of worlds

(My English is bad. Sorry if I explained it very confusing)
I have a problem with portals and I don't think it's related to the Multiverse-Portals module.
Server. properties level-name=spawn (where the players initially appear). The game world is "world"
For example, I want to go to the nether portal in the world "world" I appear in "world_nether", but when I want to exit from there I appear already in "spawn_nether" and if I exit from there, I will appear already in the world "spawn"
I want the player from " world_nether" to go back to "world " or not to interact with the world "world_nether" at all, but to go to "spawn_nether" came out in "world".
I understand that can do level-name=world and then such a problem will disappear, but when the player first enters the server, he is teleported from the game world to spawn (the player sees it) and it is terrible

Install mv-netherportals and see https://github.com/Multiverse/Multiverse-Core/wiki/Basics-(NetherPortals)


Power BI consuming DWC Data error

We are trying to pull data from DWC to Power BI for some reporting needs.  We are using the SAP Data Warehouse Cloud-Data 1.40 Beta connector from GitHub to make the connection to DWC using OData.   After previewing the data and clicking Load to push the data to a Power BI page we are getting a formatting error.  We are able to pull data using Power Query and again when pushing the data to a Power BI page the same formatting error occurs.   Attached are screenshots of the error.
We have also tested using the views using API OData calls via MS Edge.  Those work without issue.
Opened SAP case 217744 / 2023 it has led us to open issues here on this GitHub.
Dev side has shared :
- The error message talks about ODBC/SQL: PowerBi uses a local sql server to store the replicated data. The insertion shows the error message of expected content. This would match the idea of having DWC Odata returning values/characters that are not accepted by the PowerBi data base.
=> Root cause for error is a specific record or data set in the returned data.

Let me rephrase your current sitatuation to check if I understand it correctly:

the dialog for tenant, space and name shows up
the authentication, where typically an intermediate browser windows open, works without an issue
PowerBI opens the data previews and shows a data sample
=> This intermediate step indicates, that we can connect and retrieve data from the SAP Data Sphere.

The next step of importing the data into MS PowerBI fails with the error message of an "unexpected charactor" followed by ODBC error details.
At this point of time, the custom connector is not involved any more. The task of the connector is to perform the authentication and provide this - together with the service URL - back to PowerBI. For all subsequent steps (e.g. data preview and import of data) only native standard PowerBI and the SAP Data Sphere OData API is involved.
The ODBC Error:
PowerBI uses a local client side ODBC database to store imported data. I assume that the ODBC error message is triggered by the PowerBI ODBC database and not by an error message of the OData request. Reading that you tried the OData call from the browser itself without an issue reconfirms this.
Proposed Next Steps
Elaborate, if the OData response of SAP Data Sphere is somehow technically incorrect or if the PowerBI local database has an issue accepting correct values. For the latter, incorrect encoding could explain such errors.

Some hints for response verification:

Call the OData API via browser and download response. Open it in a json editor and check if malformed json is detected.

Filter response before data import

The preview dialog offers the option e.g. to configure the columns returned and the number of rows return. Select just columns with normal ascii content and check if the import works. If yes, add additional columns until the error occurs - then you have found the column of concern.

Hi bweberKS,
Some question to better understand your problem description:
ad 1.) Does "json looks good" mean that you used a json tool/editor to validate the format of JSON?
ad 2.) In your previous problem description you mentioned "clicking Load" on the preview screen triggers the error - in the previous summary you describe it as "convert query to a Power BI table". Does this refer to the same step?
Towards resolution:
ad 3.) Do I get it right that you have a procedure in PowerBI to remove the error?
I am referring to the following description: "If I copy a DWC view that is causing an error in Power BI, the copied view works but the original view still is generates error.". Could you please elaborate on this procedure and describe the steps you are performing? Reading the short phrase you provided I conclude:

You connect to the OData API of DWC, preview the data and click load
The loading steps creates the error message and no data is replicated
As a result a data source (without data) is part of the PowerBI Document
You copy this data source
You trigger a refresh on this copy and it retrieves the data without any issue.

ad 4.) You didn't provide feedback to the proposed approach of adding columns one-by-one to check if there is specific column causing the error message in PowerBI.
Best regards, Olaf

As there was no feedback for the past 3 three I will close the issue.
Please re-open if still relevant.


router plugin: cmdDel中对策略路由的删除处理有待提高

What happend:
如果策略路由没有及时的回收删除，会导致新pod创建失败(使用已删除pod的ip)
What you expected to happen:
正确的处理策略路由
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
image path and image ID (from 'docker images')

Kubernetes version (use kubectl version):
Primary CNI for Kubernetes cluster:
NetworkAttachment info (use kubectl get net-attach-def -o yaml)
Target pod yaml info (with annotation, use kubectl get pod <podname> -o yaml)

/kind bug
/assign @cyclinder

error adding container to network "macvlan-overlay": failed to add rule table for underlay interface: file exists

https://github.com/spidernet-io/cni-plugins/pull/158
/close


App manifest size limit ?

Is there a size limit to the application manifest ?. When we try to add more than 1255 application roles to the manifest, we get the following error.
"Failed to update application SDMC(DEV). Error details: The size of the manifest has exceeded its limit. Please reduce the number of values and retry your request."

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

ID: 3f7ced07-0b71-715f-749b-180567591c72
Version Independent ID: 8c533d7b-a058-3f1a-c296-9c0305f85f13
Content: Understanding the Azure Active Directory app manifest
Content Source: articles/active-directory/develop/reference-app-manifest.md
Service: active-directory
GitHub Login: @CelesteDG
Microsoft Alias: celested

@KS76 Thank you for your query . We will investigate and update this conversation.

@KS76 An application manifest has multiple attributes which are referred to as collections. For example approles , keycredentials, knownClientApplications, identifierUris, rediretUris, requiredResourceAccess , oauth2Permissions etc .
So within the complete manifest the total number of entries in all the collections combined has been capped at 1200. So lets say you already have 100 redirect URI's specified in the manifest then you are only left with 1100 remaining entries to use across all other collections combined which make up the manifest . Hope that clarifies your doubts.
This is the reason you are getting the error because there is a hard limit on the number of entries in the application manifest . Thank you for providing this error . We have submitted a pull request and the change should go live specifying the same by EOD tomorrow. We will close this issue now . Please tag me to your reply in case you have any further query on this.
Closing Related #27559


Boolean filtering/search a la Taskpaper

Feature Request
One feature I'd request if it's at all possible, would be what I think (for me, at least) makes Taskpaper -- the ability to filter in place the taskpaper list via a nice little query:
(ie @week = 43 and not @done in the search)
Imagine that is by no means trivial, but it is the key thing that makes taskpaper so powerful for me as a GTD app.  =]
thanks for all your hard work!

This is a duplicate of #19! I'm definitely interested in exploring this more, though time has been limited :)

Closing this particular issue in favor of keeping the conversation in one place


fix SSL verification using a custom certificate for GuzzleHttpClient

We should use 'verify' key according to http://docs.guzzlephp.org/en/stable/request-options.html#verify

Thanks! The guzzle client is still under testing, but I am glad you find out the typos.


Devfile 2.2.0 Proposal

Devfile 2.2.0
The outer-loop guidance for tools would be added in devfile 2.2.0. This is a work-in-progress epic.
Package files with a stack

Introduce the STACK_ROOT variable #46

Image Build guidance

Support component: dockerfile  https://github.com/devfile/kubernetes-api/issues/51

Image Deployment guidance

component: workload https://github.com/devfile/kubernetes-api/issues/57
component: podTemplate https://github.com/devfile/kubernetes-api/issues/52
component: helm Chart https://github.com/devfile/kubernetes-api/issues/53
component: objects ( Template-style ) https://github.com/devfile/kubernetes-api/issues/54

Examples in the doc

cc @l0rd @kadel @davidfestal @gorkem

Issues to track explicit CI and CD guidance yet to be created - though tools can derive it partially from image build and image deploy guidance.

Is there an issue opened for the Worload component?

@EnriqueL8 Had missed creating one for it. Here you go https://github.com/devfile/kubernetes-api/issues/57 .

Renaming this to devfile 2.2 since devfile 2.1 is now being used for dev workspace compatibility work.

Community call discussion 3/28:

This item will be closed and we'll track the work with the issues listed in the original issue.
Items 1-2 are part of devfile 2.2, we'll track them using those individual items.
Items 3-6 (#57,52,53,54) in the original description are not included as part of devfile 2.2.


Out of box set-up fails with an uncaught exception when an existing Cognito IDP is used

Hi,
I'm setting up aws-rum-web via npm into a React Typescript project that has an existing Cognito user pool.
Steps so far:

npm i aws-rum-web
In AWS Console, I followed the bouncing ball to configure a RUM application and pointed it to an existing Cognito user pool + identity pool
I copied the generated JS into my app
I've adjusted CSP headers to allow the traffic
I've read the READMEs and TROUBLESHOOTING docs

When I run the app, I get this error:
Uncaught (in promise) Error: CWR: Failed to retrieve credentials from STS: TypeError: Cannot read properties of undefined (reading 'split')
    at StsClient.eval (StsClient.js?0019:98:1)
    at step (StsClient.js?0019:43:1)
    at Object.eval [as next] (StsClient.js?0019:24:46)
    at fulfilled (StsClient.js?0019:15:43)

This is caused by not properly handling an STS error payload, with the root cause to this being at Cognito with something-something basic auth flow. What I see happening is this:

cognito-identity is called and returns an error such as "Basic flow not enabled" (there are two variants, see below)
sts is called next with a payload containing WebIdentityToken: undefined, so it returns "The ID Token provided is not a valid JWT."
The JS in StsClient.eval() doesn't correctly parse this response and generates the above error, and suppresses the actual error

The root error to this is about basic auth flow, which I see is part of Cognito Identity Pools.

If I don't enable Basic Auth Flow, I get the error "Basic (classic) flow is not enabled, please use enhanced flow"
If I do enable it, I instead get the error "Basic (classic) flow is not supported with RoleMappings, please use enhanced flow"

I've read the troubleshooting guide which talks to this, and I've also read open issue 172 where that user is in a similar position. I've also read of people using proxies, and that'd be great if there's an example I can run with.
However, while open issue 172 is asking you to implement the enhanced flow, all I'm after is for the out-of-box experience to work. I figure it works on your machine, so I'm wondering what I've done wrong, or what I need to do in Cognito in order to get this all working?
Many thanks, Scott

As an experiment, I set up a new RUM application via the AWS console with defaults, and got it to create a new identity pool as part of its setup. I'd think that would at least get me going, if there's something incompatible with my current Cognito setup.
Steps I followed:

In AWS Console > CloudWatch > RUM, click Add App Monitor
Set everything as default
Copy the revised auth role and application ID into my app
Sign out of my app and clear all session data, cookies, etc.

But then I get these network responses in my console, and nothing is successful in RUM.

"AccessDeniedException:http://internal.amazon.com/coral/com.amazon.rumcontrolplane/" (from dataplane)
"Invalid identity pool configuration. Check assigned IAM roles for this pool." (from cognito-identity)
"Caller principal does not have permissions for that resource." (from dataplane)

I'm guessing it's getting confused with my app's Cognito sign-in — which would mean I can't use RUM's identity pool for logging RUM events, along with my app's own identity pool?
To reiterate my initial point, all I'm after is a working out-of-box experience, and I've tried everything I can at this point.
Hope you can point me in the right direction.
Thanks again, Scott

Hi @sc0ttdav3y , if your application's Cognito Identity Pool uses authenticated identities (it probably does), you must create your own CredentialProvider and pass it to the RUM web client.
The default Cognito Identity Pool created by RUM contains an "unauthenticated" identity. This means that unauthenticated users can send data to your CloudWatch RUM app monitor. When using the default identity, there is no interaction between your application's authentication and RUM -- it should "just work".
This article might help explain CloudWatch RUM's authentication and authorization strategy.
A few things you can try:

Check that there are no copy/paste errors in the RUM code snippet you copied into your application
Delete cwr_c from localStorage
Check that the identity pool created by RUM has Cognito's "basic" authentication enabled

Thanks for the followup @qhanam. I'll take a read of the linked article.
I got RUM going for now using a second identity pool and anonymous reporting.
But I was with an AWS support engineer and we were unable to get it going with my application's user pool, due to "Basic (classic) flow is not supported with RoleMappings, please use enhanced flow". My application's user and identity pool mirrors the configuration set in Amplify, so I'd expect it to be fairly common.
I presume all amplify projects will only support anonymous RUM collection at present until the classic/enhanced flow issue is sorted out. Is that your expectation, or would you expect Amplify projects to work with RUM using their own identity pool?
Thanks again... Scott

Incompatibility with enhanced authflow only applies to the unauthenticated identity. Cognito does not currently support RUM for its enhanced authflow when using the unauthenticated identity.
For authenticated identities, you must be pass a credential, or a credential provider, to RUM by calling setAwsCredentials. Cognito's enhanced authflow can be used in this case.
In this blog post we demonstrate an Amplify application using both authenticated and unauthenticated identities with CloudWatch RUM.

Thanks @qhanam, that's a useful blog post!
Looks like the TL;DR is to call setAwsCredentials() and pass in my user's credentials, and disable the auth role in the RUM config. I'll give that a go and report back.
Thanks again.


Issue with Properties and Interpretations tools not finishing

SSURGO properties and interpretations tools not loading. Left it running for a day and tried 2 times. I selected a feature in the AOI
I have ArcGIS Pro 3.0.2
Inputs: AOI polygon (extracted CLU layer)
Selected small field
Aggregation Method: Dominant condition
*Soil property: Hydrologic group
Left defaults for Update attribute table and retain individual tables and message.

I will look into it, but it might take a day or 2.  I am having issues getting arcgis pro installed on a recently reimaged computer.

With a fresh install of Pro 3.0.2 I was able to complete what you were not.  Perhaps you have bad geometry in you AOI?  Did you try running the repair geometry tool or trying a different AOI altogether?

Tried with  a different AOI this morning. There may have been an issue with the old one. Both were PLU boundaries from CD.
It worked this morning with the new AOI.


Add Bist missing files

Add bist files to address internal build issues.

Coverage remained the same at 80.74% when pulling c9424415a83591e5c1f60ef7d563354561b354ed on jabuie/bist_missing_files into 7b416b4d204a65ebadbf3f2c41b2441a0613bbb0 on master.

Hey @buie1, this commit is causing an error on external master.  Could you have a look?
https://jira.devtools.intel.com/browse/OPAE-1067
error: File not found: /home/lab/workspace/tswhison/opae-sdk/build/_CPack_Packages/Linux/RPM/opae-1.3.0-2.x86_64/usr/bin/bist
error: File not found: /home/lab/workspace/tswhison/opae-sdk/build/_CPack_Packages/Linux/RPM/opae-1.3.0-2.x86_64/usr/bin/bist_def.py


fix: fix multiple client module lifecycle issues

Motivation
Fix #3399. Client modules suffer from the issue of firing too early—before React even renders. In this case, people who use client modules to modify DOM on every page, or simply reading from it (like the route announcer in #7074) will not be able to do so without using a timeout hack.
This PR also addresses a long-standing issue of hash links not working in development. The problem is that the scroll-to-anchor happens in shouldComponentUpdate, so if there's no pre-rendered HTML, there will be no DOM element to read from. This is solved through deferring it to after the initial render as well.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
I added a dogfooding client module. When switching between routes, note how the lifecycle now logs the new title instead of the old one:

useEffect or useLayoutEffect?

If we are talking about firing analytics, then it doesn't really matter, because the effect doesn't affect UI anyways, it just leaves.
If we are talking about manipulating DOM (for example, someone has presented a weird use-case to me where they have an external script that needs to manipulate a particular DOM element on every page transition), then it certainly needs to be synchronous. I can't think of a compelling case where it unacceptably blocks render.

If we are talking about firing analytics, then it doesn't really matter, because the effect doesn't affect UI anyways, it just leaves.

Actually it can happen UI:

the analytics SDK could fail, leading to the page transition never completing
the analytics SDK could be slow, serialize synchronously a lot of JSON or whatever, leading to a delayed page transition UX

That's why I think useEffect is a better default. This is also why the React team created useEffect and useLayoutEffect and we use useEffect in most cases by default. They could have given us useLayoutEffect only and told us to use setTimeout but they didn't for good reasons: help us do the right thing by default.

someone has presented a weird use-case to me where they have an external script that needs to manipulate a particular DOM element on every page transition

Then we need to understand better this use-case

Then we need to understand better this use-case

I remember it was attaching event listeners.
import ExecutionEnvironment from '@docusaurus/ExecutionEnvironment';

export default (function () {
  if (!ExecutionEnvironment.canUseDOM) {
    return null;
  }

  return {
    onRouteUpdate({location}) {
      if (location.pathname.startsWith('/acs/')) {
        const labels = document.getElementsByTagName("label");
        for (let a = 0; a < labels.length; a++)
          labels[a].addEventListener("click", (e) => e.target.classList.add("worngans"));
        document.querySelector('input,textarea').attr('autocomplete', 'off');
      }
    },
  };
})();

@slorber After some more careful investigation, I think the current code is good enough. Anything manipulating the DOM in onRouteDidUpdate needs to be fired synchronously anyways, so putting it in componentDidUpdate makes more sense. This lifecycle is needed in the first place because some users use it to get hold of the page's DOM. We can't do that with useEffect because we can't cleanup. Analytics and other things that are purely side-effects do not block render, and therefore, whether promise- or callback-based, do not matter if we put them in an async or sync context. Could you give a concrete example where the current sync handling would be problematic?
We are implementing lifecycles anyways, not hooks. Lifecycles are always meant to be called "at a certain point", just like React lifecycles. I think the semantics are quite clear, we just need documentation about error handling, etc.

@slorber I implemented what you had in mind in https://github.com/facebook/docusaurus/pull/6732/commits/a4e16b9307345f9b6fb556fc13e33eca6e54cd80. Tell me what you think and if that's the current direction we should go in.
I realized because useLayoutEffect still fires after React renders, even if we put onRouteUpdate in useLayoutEffect, the lifecycle is able to get the latest DOM on the new page. Therefore I think it's not necessary to make another lifecycle. If we are to continue supporting this lifecycle firing before React re-render, we have to put it in shouldComponentUpdate.

@slorber There are a few more ideas on my mind. Not necessarily have to be in this PR, but just to ask if you are interested:

Can we make nprogress a client module, and move it to theme-classic? This way, we can make the nprogress more configurable than it currently is (because the core is not configurable), and it can also utilize the site's theme color to provide consistent styles.
If we are to make nprocess a client module, we have to have a "clean up" function for onRouteUpdateDelayed. nprogress.start() is called along with onRouteUpdateDelayed, but nprogress.done() is called when the route finished loading, and we don't have a lifecycle from it yet. What about returning a clean up function like effects do?

export function onRouteUpdateDelayed({ location }) {
  nprogress.start();
  return () => nprogress.done();
}

We could even extract this as a plugin and provide configuration options.
Gatsby does so: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-plugin-nprogress/src/gatsby-browser.js
Not sure the cleanup callback is really needed, as it somehow becomes duplicated with onRouteUpdate which is supposed to always fire after onRouteUpdateDelayed. Cf Gatsby implementation, they don't need it either.

Now, we could eventually rethink the whole thing and only have a single lifecycle to handle everything, but that may not be very intuitive for plugin authors, and also a more complex breaking change:
export function onRouteUpdate({ location }) {

  console.log("route transition triggered")

  const timeout = setTimeout(() => {
    console.log("route transition delayed")
    nprogress.start();
  },200)

  return () => {
    console.log("route transition completed")
    clearTimeout(timeout);
    nprogress.done();
  }

}

Ah, that makes sense as well. Looking back, the entire timeout is only used for the nprogress.
And yes, VuePress also extracts nprogress to a separate plugin, that's why I'm asking...
Will merge it shortly after

👍
Actually thinking about it, that wouldn't even be a breaking change considering onRouteUpdate already fires too early today 😄
maybe it's the best time to decide on whether we want 2 lifecycles or just 1 more powerful with a cleanup function?

Let's move nprogress to theme-classic, shall we? This way we can make the core even more lightweight.

Let's move nprogress to theme-classic, shall we? This way we can make the core even more lightweight.

ok for that 👍

We agreed on Discord to try this API:
// fire early
export const onRouteWillUpdate = () => {

  const nprogressTimeout = setTimeout(() => {
    NProgress.start()
  }, 200); // timeout can be configured

  // cleanup function is fired when the update is ready to be done (ie next page bundles have been fetched etc...)
  return () => clearTimeout(nprogressTimeout);
}

// fire after React renders in useLayoutEffect
export const onRouteUpdate = () => {
  NProgress.done()
}

Also, don't we want ga/gtag plugin events to trigger only after React renders the next page? I think it would be better to wait, and not send any analytics event if the page transition never completes

Also, don't we want ga/gtag plugin events to trigger only after React renders the next page?

Migrated to onRouteDidUpdate. Impact should be minimal. There's a nuance: onRouteUpdate only fires when route changes, but onRouteDidUpdate would fire on initial render as well. Do you think that's a good thing, or it doesn't really matter?

There's a nuance: onRouteUpdate only fires when route changes, but onRouteDidUpdate would fire on initial render as well. Do you think that's a good thing, or it doesn't really matter?

😭 I don't know 😅
It looks like it does have an impact and lead to duplicate events being send on site first load 😓
Before/prod:

After:

Maybe both lifecycles should never fire on the very first render when previousLocation is null?
I feel like having this difference between the 2 lifecycles will be confusing for users, and we should rather make the best choice now because this change later can also be painful for the plugin ecosystem.
Note that client module authors can still add some inline JS that will be executed immediately after load:
if (ExecutionEnvironment.canUseDOM) {
  console.log("on first load, document title is " + document.title);
}

Note that Gatsby seems to fire both lifecycles on first load:

https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/#onPreRouteUpdate
https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/#onRouteUpdate
https://www.gatsbyjs.com/docs/reference/config-files/gatsby-browser/#onInitialClientRender

We can fire it as frequently as we want, and ask client module authors to filter out unwanted triggers. For example, here we can add a simple if (previousLocation === null). The only problem is I don't really know which is better off for the user: is it useful for analytics to know the first page the user is on, or should it only track navigations?

I guess it's more powerful to let the users figure out the filtering on their side in case duplicate events are fired on initial load.
Some analytics may send events automatically to their endpoint on js load, while others need to be triggered manually with a JS API. Giving the opportunity to trigger this API seems better to me 👍
Now we should probably make both lifecycle consistent, and it's not very clear to me when/where onRouteUpdate should be fired in the app. It could be something like this?
      if (previousLocation === null) {
        const cleanup = dispatchLifecycleAction('onRouteUpdate', {
          previousLocation,
          location,
        });
        cleanup();
      }

      dispatchLifecycleAction('onRouteDidUpdate', {previousLocation, location});

Okay, why not

seems good now 👍
just need to filter first call on gtag/google-analytics plugins

tested locally, analytics work as before 👍
great 🎉

Cool!


Updated address view URL as Blocktrail has ceased operations

The existing links to Blocktrail now display a page informing users that Blocktrail has ceased operations. This PR switches to using blockchain.com instead.

Removed HHVM from .travis.yml as per #53.


Any idea how to animate box-shadow?

It's a silly rule since it doesn't have box-shadow-radius, spread, color, etc.
        boxShadow: anim.interpolate({
          inputRange: [ 0, 1 ],
          outputRange: [
            '0px 0px 0px hsla(0, 0%, 0%, 0.5)',
            '0px 0px 40px hsla(0, 0%, 0%, 0.5)'
          ]
        }),

That would be cool! but seems heavy to have to dig in and find every possible number that could be interpolating :\
Any ideas?

@ryanflorence there is a PR open for it

Ah has a conflicting issue, needs a rebase.

If targeting the web, you could be using the Animated.template function to support it. Something like this would yield the result in your first post, but you could add other values to interpolate the other properties as well:
boxShadow: Animated.template `0px 0px ${value}px hsla(0, 0, 0, 0.5)`

Nothing that specific is actually needed. Just need to fix the interpolation to understand multi-values.
https://github.com/animatedjs/animated/pull/47

Sure, in this specific case it's only a workaround :)

Yeah good point, I believe Leland Richardson had ideas about all of this. Although mostly in the form of building out new Animated.Value abilities w/ Animated.Shape
Lots of use cases to be covered, especially SVG paths which I think is a huge one.

I'd love to help out with SVG interpolation if it's still needed :) I've been looking at a lot of libs that support this. I'm guessing it would need to work in both React Native and React Web? I should be able to handle the web side or at least start it, I'd be willing to look into RN as well and try to learn some things.