fix(ssr): clone node support Set and Map

close #9981

The original clone logic was causing issue because it clones Set into empty objects, but since scopeIds is the only thing and it doesn't need to be cloned, the simpler fix is to make sure the object clone logic only applies to real plain objects (a4bcbe8). Set and Map can be reused as-is assuming they are immutable on the ASTs.
Also, there are faster ways to clone Sets and Maps, because both are iterable and both accept interables as the constructor argument:
const clonedSet = new Set(originalSet)
const clonedMap = new Map(originalMap)


Order of item_image and item_comment does not match table columnns

The definition of the items array should list item_image before item_comment in the record structure:
     items DYNAMIC ARRAY OF RECORD
        name, text, item_image, item_comment STRING
     END RECORD

thanks


Minimal RBAC policies

Allow cluster services to talk with apiserver with minimal rbac policies
Fix #230

Codecov Report

Merging #316 into master will not change coverage.

@@           Coverage Diff           @@
##           master     #316   +/-   ##
=======================================
  Coverage   54.96%   54.96%
=======================================
  Files           6        6
  Lines        1390     1390
=======================================
  Hits          764      764
  Misses        508      508
  Partials      118      118

Continue to review full report at Codecov.

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

@mumoshu I did all the changes.
BTW I bootstrapped my cluster withe the new node pools feature. All the resources are successfully created, congrats!

Thanks so much for your kind words and quick turnaround 👍


Improvements to the 3rdparty build process

Build both a debug and a release version of 3rdparty libraries; use the build variable $(CONFIGURATION) to set LIBRARY_SEARCH_PATHS. This is important so that Little Go no longer needs to set the preprocessor macro NDEBUG in a debug build (with NDEBUG set, assert() does not work; possibly there are other effects as well)

Research wether the build variable $(EFFECTIVE_PLATFORM_NAME) exists and what values it may take, especially if there are different values for iPhoneOS and iPhoneSimulator builds (suspected values are iphoneos and iphonesimulator). A list of all official build variables is this: http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/XcodeBuildSettingRef/1-Build_Setting_Reference/build_setting_ref.html

Check out the following article to see whether it would make sense to add more visible references to external libraries to the Xcode project: http://wiki.remobjects.com/wiki/Linking_Custom_Static_Libraries_from_your_iPhone_Xcode_Projects

Fix build scripts so that configure-based projects can store multiple platform builds, so that distclean before a build becomes an option instead of a requirement (Boost already supports this)

Check to see if it makes sense (and is feasible) to create a single universal library for Boost in the same way as it is done for Fuego

Check to see if there is a better way to create the single universal library for Fuego than the current clunky way. Possible requires libtool support.

Check to see whether the compiler options -mmacosx-version-min and -miphoneos-version-min may replace usage of the environment variables MACOSX_DEPLOYMENT_TARGET and IPHONEOS_DEPLOYMENT_TARGET (note: from studying an Xcode compilation command it appears that the iPhoneSimulator platform uses -mmacosx-version-min, or MACOSX_DEPLOYMENT_TARGET)

bjam clean does not work

Fix the following issue: IPHONE_SIMULATOR_BASESDK_VERSION at the moment (with Xcode 3.2.5) cannot be 4.2, must be 4.1, because with 4.2 there are problems with symbols in 3rdparty libraries. The symptom is that the application crashes with the following output in the debug console:
Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
pthread_cond_wait$UNIX2003 called from function _ZN5boost18condition_variable4waitERNS_11unique_lockINS_5mutexEEE in image Little Go.
If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first.

Find a way in Xcode how to specify different base SDKs for the iPhone (Device) and the iPhoneSimulator builds. Without this, 1) it's impossible to reference such builds of 3rdparty libs in an elegant way; and 2) linking a 4.2 simulator Xcode build against a 4.1 simulator 3rdparty build is a mismatch that is asking for trouble. If a solution is found, remove the hack in function INSTALL_STEPS_SOFTWARE() in build-fuego.sh which creates an SDK directory symlink as a workaround for this Xcode limitation.

Closing this issue, for two reasons:

The 3rdparty build process has been revamped to some degree since this issue was opened (e.g. the Fuego and Boost builds are now maintained in the fuego-on-ios repo).
In the face of Apple's relentless forward-pressing pace it seems pointless to try and maintain a clean and stable build system that is backwards compatible, i.e. that works across several versions of Xcode. The only thing that is desirable is a build system that won't break in the future, but I have experienced too many surprises in the past to expect anything else but trouble when upgrading to new Xcode versions.


Addressing #10.

This closes #10 - just take a glance and make sure it still makes sense.

request_trust and issue_trust should be opposite contains_key

request_trust and issue_trust should be opposite contains_key

revoke_trust as well

request_trust and issue_trust should be opposite contains_key

revoke_trust as well

Good catch - somehow this passed tests.

request_trust and issue_trust should be opposite contains_key

revoke_trust as well

Good catch - somehow this passed tests.

do tests need to be added/changed?

request_trust and issue_trust should be opposite contains_key

revoke_trust as well

Good catch - somehow this passed tests.

do tests need to be added/changed?

I was just looking at that. I think they're okay?


Using filepath instead of path

Fixes #69.
the path package is not dealing with Windows and needed to be replaced
with filepath. https://pkg.go.dev/path#pkg-overview
Also fixed a few linting errors from my golang-ci parser:
https://github.com/golang/go/wiki/CodeReviewComments#error-strings

@kathrynallan successfully tested it on Windows (in #69)


mj-column stacked on desktop GMX / WEB.DE

Hello!
When using the german webmail clients gmx.de and web.de, mj-column items get stacked on desktop.
The reason for this is that the !important tag is stripped from these instructions:
So
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 { width:100%!important; }
.mj-column-per-40 { width:40%!important; }
.mj-column-per-20 { width:20%!important; }
.mj-column-per-50 { width:50%!important; }
.mj-column-per-48 { width:48%!important; }
.mj-column-per-4 { width:4%!important; }
}
</style>

becomes
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 { width:100%; }
.mj-column-per-40 { width:40%; }
.mj-column-per-20 { width:20%; }
.mj-column-per-50 { width:50%; }
.mj-column-per-48 { width:48%; }
.mj-column-per-4 { width:4%; }
}
</style>

So the inline styles override those media queries.
A solution to this problem is to provide max-width values additionally. So we can get a good result also on desktop without breaking the mobile first approach with this code:
<style type="text/css">
@media only screen and (min-width:480px) {
.mj-column-per-100 { width:100% !important; max-width:100%; }
.mj-column-per-40 { width:40% !important; max-width:40%; }
.mj-column-per-20 { width:20% !important; max-width:20%; }
.mj-column-per-50 { width:50% !important; max-width:50%; }
.mj-column-per-48 { width:48% !important; max-width:48%; }
.mj-column-per-4 { width:4% !important; max-width:4%; }
}
</style>

Do you agree? Should I make a pull request for that?

Hi @vielhuber thanks for investigating this !
I thought it was only because gmx didn't support any media queries, so we skipped it
Well why not to add them, but we need to check the compatibility everywhere to see if it doesn't break anything in other clients.

GMX supports media queries.
The good thing about the addition to that is that it is logical to do so.
It should not break something.
Do you prefer a pull request or do you update the code on your own? It would be nice to have that feature also in MJML v3.

Well MJML3 is now legacy, we won't introduce anything new in this branch (only bug fixes for breaking stuff), you can totally do a PR on MJML4 for that ! I think it need a (big?) litmus test to see across the clients how it behave with this max-width

Off topic: Do you already recommend MJML4 for production use? There's no documentation or am I wrong?

All information available on new features (gutter etc.) I'm currently find on the medium articles, correct?

Exactly :)


use native mm instead of inches

This PR represents a reprocessing and re-ingest of the snowfall data that drive the snowfall plate in the Arctic-EDS. The motivation was to serve SI units over the API and to do some validation to be sure that the numbers coming out of the client and the API match the values directly extracted from the GeoTIFF sources. It may be hard to see the diffs in the processing notebook, but the key changes are:

I’ve changed the GeoTIFF format to float32 from Int16
I’ve removed the code snippet that converted from mm to inches.
I extracted the min-max-mean historical and projected values for Fairbanks, Anchorage, (using GVV coordinates) and the example lat-lon used in the API documentation. These values can easily be referenced as changes are made to the Arctic-EDS client.

Notes

these data are ingested as 'mean_annual_snowfall_mm' on Apollo
the API has already been updated to reflect the changes in this PR
XREF #34
XREF https://github.com/ua-snap/data-api/pull/200
XREF https://github.com/ua-snap/arctic-eds/pull/73
Closes #35

Things are looking good now! Merging.


Erasing line breaks

Hi, I just tried this plugin with a text box that had a line break and then a line of text that started with "How to". So I tried to find/replace it with the words "Learn to" and it replaced the "How to" but also erased the preceding line break. I would have expected it to ignore the line break and only replace the text I wanted replaced?

This video shows what I'm talking about: http://cl.ly/3S2L1y2j3X2A . All the text jumps up a line after I do the replace because line break got erased.

Fixed this - was trimming the result where it didn't need to


[CI] Add autodiscovery rules to rector-ci.php

interface in Contract namespace
etc.

See https://github.com/rectorphp/rector/blob/master/docs/rector_rules_overview.md#autodiscovery

I was looking into this and it would require lot of effort to make it work corretcly.
It would be better to wait for a real-life project, that will require private refactoring Rector.


‘this.Client.Endpoint’ cannot be null. - For all my LG referenced responses after publishing

Describe the bug
After publishing the project, the conversation update works fine. But Post that  all my responses, i get "‘this.Client.Endpoint’ cannot be null."

But locally it works perfectly

Thanks for reporting this! 😊
Is it possible for you to share your project set up (minus any secrets)? We need more info to investigate this further. Ideally, if you could provide a repro, we'd be able to quickly diagnose the issue. 🔎

Sure, rather than my actual dialog, I also tried publishing some of the examples. But getting the same issue after publishing. I will send you the repo of one of the tutorial examples that I have published.
Weather_Bot.zip

@benbrown @luhan2017 - @AditBot is having issues with deploying the samples. Could one of you please take a look at what might cause the error they shared?

@AditBot this is because luis is not correctly set. You need to make sure you have run luis publish before you publish your bot.
{
"luis": {
"Main_en-us_lu": ""
}
Please let me know if this still not works.

@luhan2017 , Yes i published the luis application before publishing to azure. As I had mentioned earlier..this is happening for all the tutorial examples for me. I am now trying to start over and do a fresh install.

Does "Generated files" within composer dialogs get generated after the deploy ps script? The files disappeared.
Also While doing a fresh deployment, now I am getting a new error Post error while adding LUIS APP ID, the published luis app id is different and and one in the deployment script is different.

oes "Generated files" within composer dialogs get generated after the deploy ps script? The files disappeared.

Yes, it is generated after we publish luis. it will generate some configs in generated folder also in appsettings.json to make sure the bot works.
So please double check your appsettings.json and generated files, if all the required fields are set:
such as:
luis.endpoint
luis.endpointKey
luis.Main_en-us_lu
"‘this.Client.Endpoint’ cannot be null." this error happens when the luis.endpoint is missing.

My generated files have disappeared, I tried re publishing ps script as well.
And I am getting a new issue, In the Deploy ps script, the app id of luis that it is picking is different compared to the actual published luis application. This is causing my end point POST  method to fail.

@AditBot did you run create.ps1 before deploy?
We supported two scenarios:

run the bot locally, which will prompt up a window to input luis authoring key and it will help you publish luis and run the bot locally. Note: in this case, the luis app is created in the luis portal instead of in an azure resource group.

run create.ps1 to create a resource group and all the resources needed to bot deployment. such as ABS, Luis.Authoring and Luis.Prediction, in this process, a new luis authoring and prediction service is created and the key will be written in you appsettings.json.

Then run deploy.ps1 to deploy your lu model to luis prediction service using the luis authoring key.  the script will write the appid and endpointkey in your appsettings.json.
Is there any chance you missed any steps? for example, create.ps1? I am happy to help you debug this issue if you can provide more details of your deployment steps. Thanks.

I am always getting this random APP ID and it fails at POST.
These are the steps I followed:
Start Bot locally
Published LUIS
Publish script
Deploy script

It looks like you got an error in this part in the deploy.ps1
# Assign each luis id in luisAppIds with the endpoint key
foreach ($k in $luisAppIds.Keys) {
	$luisAppId = $luisAppIds.Item($k)
	Write-Host "Assigning to Luis app id: $luisAppId"
	$luisAssignEndpoint = "$luisEndpoint/luis/api/v2.0/apps/$luisAppId/azureaccounts"
	try {
		$response = Invoke-WebRequest -Method POST -ContentType application/json -Body $luisAccountBody -Uri $luisAssignEndpoint -Headers @{"Authorization" = "Bearer $token"; "Ocp-Apim-Subscription-Key" = $luisAuthoringKey } | ConvertFrom-Json
		Write-Host $response
	}
	catch {
		Write-Host "Return invalid status code while assigning key to luis apps: $($_.Exception.Response.StatusCode.Value__), error message: $($_.Exception.Response)"
		exit
	}
}

Could you try "Assign a resource to an app" in this doc manually to see what will happen?
https://docs.microsoft.com/en-us/azure/cognitive-services/LUIS/luis-how-to-azure-subscription#assign-runtime-resource-without-using-luis-portal

I did this as well But it keeps attaching "Assigning to Luis app id: a4f68576-34ef-47f8-b79d-223eb129ede9". I don't have any application ID like this. Its always taking this instead of the one from the JSON

I changed the "luis.setting.env.region.json"
Main_en-us_lu -> applicationId,
lubuild succeeded
Getting Luis accounts...
Assigning to Luis app id: 3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@{code=Success; message=Operation Successful}
Assigning to Luis app id: a4f68576-34ef-47f8-b79d-223eb129ede9
Return invalid status code while assigning key to luis apps: 400, error message: StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.HttpConnection+HttpConnectionResponseContent, Headers:

@AditBot that is really weird, could you share your folder again? the luis app id are read from luis.setting.*** files. or could you search that id under your folder?

you can find the folder in the above conversation. https://github.com/microsoft/BotFramework-Composer/files/3862062/Weather_Bot.zip

could you search that id under your folder?

I did, could not find it anywhere

I hard coded in the deploy script :
$luisAssignEndpoint = "$luisEndpoint/luis/api/v2.0/apps/f98xxxxxxxxxxxxxxxxxxx/azureaccounts"
Now it deployed successfully: But still facing ‘this.Client.Endpoint’ cannot be null.

Ok..so I found something..all these issues are because of code.zip

I am still getting the same: I re downloaded the repo, installed yarn again and did a fresh sample. Same problem : ‘this.Client.Endpoint’ cannot be null.

@AditBot , can you describe you whole process of "did a fresh sample". did you run the bot locally? or did you run create.ps1 and deploy.ps1.
by hardcodeing, you should hard coding on the luis:endpoint and luis.Main_en-us_lu, the appid is not used for the luis.

Yes it ran locally perfectly.
I ran both the create and deploy scripts.

After deploy, I published the luis app. and published the code
It gave "this.endpoint" cannot be null, I hardcoded the endpoint (within the .zip and master folder)
Now it gave "app.id" cannot be empty, I hardcoded the app ID

I have literally hardcoded all the missing files in all the secrets, still failed.

@AditBot do you still need assistance?


Add pre-commit hook for tidy

Add hook for tidy, an HTML linter (among other things).

Sorry, by "use" I meant developer adoption.
After digging into this tool a bit, it does indeed look interesting. However, it looks like you need to be running a very recent version of it to get some benefits (like HTML5 support).
Given that most operating systems ship with an old version by default (my Mac comes with a version of from 2006, and my CentOS Linux machine comes with one from 2009 after I install via yum), it should probably be an opt-in as it seems like a pretty high bar to require people to compile code on their system to start using a package required by a hook.

Fair enough! I've pushed the change.
For your own enjoyment, you can install the HTML5 version with brew install --head tidy :smile:

Merged in 0f8d160.


Continued Sage 10 cleanup

Changelog
Enhancements

Add name configuration to config/app.php (defaults to theme name).
Move default cache location to storage/.
Add a ServiceProvider stub.
Add missing trailing commas to configs.
Remove/revert automatic Blade cache removal action as it is no longer necessary.
Clean up .gitignore.
Clean up JavaScript docblocks.
Remove home.js example leaving about.js to give an example of camelCase.
Remove leftover Sage 9 information from the readme.

Todo

Move the DOM-based router to it's own package.
Change Acorn's manifest/asset class to handle leading slashes.
Figure out a solution to handle images and fonts versioning (attempt a PR into Laravel Mix?)
Decide on a solution for changing cache busting from args to filenames (laravel-mix-versionhash or attempt a PR into Laravel Mix).
Update documentation for Sage 10.
Write a changelog.
Bump #2167 for when 5.2 releases.
Sage CLI (probably after release?)

Figure out a solution to handle images and fonts versioning (attempt a PR into Laravel Mix?)
Decide on a solution for changing cache busting from args to filenames (laravel-mix-versionhash or attempt a PR into Laravel Mix).

👍
I have been compiling assets via laraval-mix for years now, even for Sage based projects, and file-versioning is the main drawback.
In both case I would support you opening a PR on the Laraval Mix repo, but the maintainer is difficult to convince for this kind of option.
See:

https://github.com/JeffreyWay/laravel-mix/pull/1470
https://github.com/JeffreyWay/laravel-mix/issues/934
https://github.com/JeffreyWay/laravel-mix/issues/1241
https://github.com/JeffreyWay/laravel-mix/issues/1022

For standalone images, we can use mix.version([...paths]).


Add Validation support for Application Namespace specified in ChaosEngine

FEATURE REQUEST

Need to validate the namespace existence, provided in ChaoEngine AppInfo struct
For reference on how to define the function around this, PTAL at this PR Description: https://github.com/litmuschaos/admission-controllers/pull/10

Tracking this here: https://github.com/litmuschaos/litmus/issues/2182

What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:

https://github.com/litmuschaos/litmus/issues/2182

Hey @rahulchheda I am new to the world of kubernetes, would like to give this a try!

Sure, go ahead! @DarthBenro008

Let me know if any details are missing here, would fill the issue up.

Any updates on this @DarthBenro008 ?

Hey @rahulchheda , was just taking some time going through the code and also had a few queries.
By validation of namespace, does it mean to check existence of the namespace in the ChaosEngine?
The appns param specified in the appinfo of YAML?

So, the namespce for the ChaosEngine is validated by k8s itself, we need to validate the one specified in app params.

Oh that's awesome. Just a confirmation, by validation its just checking the existence , right? or is there any norms (regex?) to be followed and validated? As mentioned earlier, pretty new to the world of Kubernetes. Thank you for your response!

No, it just a simple GET request for the namespace, if no error, them go ahead, or else append the errors.

That makes it clear. Will work on it and send a PR soon!

@rahulchheda apologies for the delay, PR #23 closes this issue, please let me know if there are scope of further improvements.


playing around with unicity "groups" - can we localize infinite unicity taxonomically for Staph aureus?

In https://github.com/ctb/2022-sourmash-sens-spec/issues/1#issuecomment-1320896787, we saw that species s__Staphylococcus aureus had 8367 genomes all with infinite unicity. A basic hypothesis to test is whether all of these genomes are confused with each other, or if instead there are hashes outside of Staph that are required to reach infinite unicity.
 You get to 82% with phylum Firmicutes, but there are 6 hashes in Staph aureus genomes that are shared with Archea! (that's what the last row means)

I looked at GCA_019115945.1, Candidatus Borkfalkia excrementavium, ASM1911594v1, which was a singleton genome with infinite unicity - saw:

count
total_counts
percent
superkingdom
phylum
class
order
family
genus
species

0
137
147
93.2
d__Bacteria
p__Firmicutes_A
c__Clostridia
o__Christensenellales
f__Borkfalkiaceae
g__Borkfalkia
s__Borkfalkia excrementavium

1
142
147
96.6
d__Bacteria
p__Firmicutes_A
c__Clostridia
o__Christensenellales
f__Borkfalkiaceae
g__Borkfalkia
nan

2
144
147
98
d__Bacteria
p__Firmicutes_A
c__Clostridia
o__Christensenellales
f__Borkfalkiaceae
nan
nan

3
145
147
98.6
d__Bacteria
p__Firmicutes_A
c__Clostridia
o__Christensenellales
nan
nan
nan

4
147
147
100
d__Bacteria
p__Firmicutes_A
c__Clostridia
nan
nan
nan
nan

5
147
147
100
d__Bacteria
p__Firmicutes_A
nan
nan
nan
nan
nan

6
147
147
100
d__Bacteria
nan
nan
nan
nan
nan
nan

so, I think "unicity groups" as a concept are not really a useful thing, since there are hashes all over the place (taxonomically)... at any rate I have an easy way to explore them now, if we are interested.

and charcoal didn't detect GCA_019115945.1 as contaminated 🤔

I don't think it is contaminated - it shares hashes with some higher taxonomies, but that's all. For gather to detect is at contaminated it would have to share multiple hashes with a specific genome in another taxonomic unit. But yeah we should look into this 😆
I'm also wondering if we need to do something different here where we look for disagreeing hashes a la kraken rather than this. putting a pin in it.


Unable to verify headers using @sendgrid/eventwebhook lib

Issue Summary
When attempting to use the @sendgrid/eventwebhook methods to verify Sendgrid signed event headers the method verifySignature() always returns false. Below code is written as an expressJS middleware function to run when the webhook sends a POST call to our endpoint.
Steps to Reproduce

Set up a server to receive POST data from the Sendgrid webhooks and enable signed event headers
Send a Webhook test event to your handler and note the false result

Expected response from method is true
Code Snippet
const { EventWebhook, EventWebhookHeader } = require('@sendgrid/eventwebhook');

const pubkey = 'string pubkey';

const verifySendgridWebhook = (req, res, next) => {
  console.log('Verifying webhook headers...')

  const webhook = new EventWebhook();
  const webhookHeaders = new EventWebhookHeader();

  const headers = req.headers;
  const headerSig = headers[EventWebhookHeader.SIGNATURE().toLowerCase()];
  const headerTimestamp = headers[EventWebhookHeader.TIMESTAMP().toLowerCase()];

  const buffer = Buffer.from(JSON.stringify(req.body));
  const ecpk = webhook.convertPublicKeyToECDSA(pubkey);
  const verified = webhook.verifySignature(ecpk, buffer.toString(), headerSig, headerTimestamp)

  if (verified) {
    console.log('Verified headers');
    next();
  } else {
    console.log('Invalid headers. 401 unauthorized.');
    res.status(401).send("Unauthorized");
  }
}

Technical details:

sendgrid-nodejs version: "@sendgrid/eventwebhook": "^7.4.5"
node version: v12.18.2 OR v16.13.1 (tried both)

I am having this same problem - I am on the same version of sendgrid-nodejs and I used the sample code from https://www.twilio.com/docs/runtime/quickstart/validate-webhook-requests-from-sendgrid

Has anyone found a fix for this? I'm also having the same issues.

Do the changes in the linked PR help to validate the payload?

From my experience, it is very important that the request body is not parsed as JSON or string, and is the raw Buffer!
This is the reason that the "hack" with JSON.stringify() from the linked pr seems to work, but it is not 100% correct!
The signature sent by the server is computed on the raw body. Any json parsing and stringify operations are not guaranteed to produce identical results!
The correct way to do it is to make sure that body-parser.json does not parse this webhook endpoint at all.
For example, this is the setup I have and is working 100% (I cleaned it up a bit to share it here).
Note: I use express-unless to make sure that body-parser.json does not process this endpoint, and I use body-parser.raw instead.
const unless = require("express-unless");
const bodyParser = require("body-parser");
const { EventWebhook, EventWebhookHeader } = require("@sendgrid/eventwebhook");

// Important: apply body-parser json for all endpoints EXCEPT the webhook!
const parse_json = bodyParser.json();
parse_json.unless = unless;
app.use(
  parse_json.unless({
    path: ["/api/webhooks/sendgrid"],
  })
);

app.post(
  "/api/webhooks/sendgrid",
  bodyParser.raw({ type: "application/json" }), // Important: parse body as raw Buffer
  (req, res) => {
    console.log("Is Buffer?", Buffer.isBuffer(req.body)); // must return true !

    const signature = req.get(EventWebhookHeader.SIGNATURE());
    const timestamp = req.get(EventWebhookHeader.TIMESTAMP());
    const eventWebhook = new EventWebhook();
    const key = eventWebhook.convertPublicKeyToECDSA(pubkey);

    if (eventWebhook.verifySignature(key, req.body, signature, timestamp)) {
      const events = JSON.parse(req.body);
      // TODO: handle events
      res.sendStatus(204);
    } else {
      res.status(401).json({ message: "Invalid signature" });
    }
  }
);

Hi, just a question,
Is bodyParser.raw({ type: "application/json" }) the middleware supposed to override app.use(bodyParser.json())that was used before the endpoint?
And also do we have to use the body-parser package? It seems it is deprecated and is now included in express package.express.raw() could be used as well, I guess?
Could close the PR if you create a new one with your solution, but seems they are not really checking it.

@Eroo36
Yes, we are in fact "overriding" the middleware for the webhook.
This is a global middleware that applies to all paths, except the webhook - see unless.
Most people use incorrectly app.use(bodyParser.json()) which applies it to all routes, and is impossible to override. you should use this instead:
app.use(
  parse_json.unless({
    path: ["/api/webhooks/sendgrid"],
  })
);

This is a middleware applied just to the webhook path (nothing to override as we excluded this path from the global middleware using unless).
app.post(
  "/api/webhooks/sendgrid",
  bodyParser.raw({ type: "application/json" }), // Important: parse body as raw Buffer

Yes you can replace bodyParser.json() with express.json() and bodyparser.raw() with express.raw().
In fact, that's what I'm using, I just figured most people were still using the old version (which is not wrong in any way)


Question for get stable frame

Hello ,thans for your implementation!
Your code have many comments on it, which is helpful when I read it. But I still have trouble understanding "final matrix" here
function write_ourput
Here we get the final matrix by multiply scale, shift_to_center and shitft_back. I don't understand why we need to shift the frame.
I tried to remove the shift_to_center and shit_back matrix, and the final_matrix is scale @ inv(B). The result video  end up showing some black border and  losing the content, so these matrix are very important for stabilization.
what puzzle me most is , the shift_matrix ,to my intuition,is move all pixels by shape[0] / 2.0 in both x and y directions. similiar to scale_back, which is negtive shape[0]/2.0 so  when we multiplt a point(0,0) by these two matrix, the point will go back to (0,0).
I know I was wrong, could you explained to me?

Hi,
Am busy with something at the moment and can only get back late this week/the weekend

Hi,
Am busy with something at the moment and can only get back late this week/the weekend

Don't mind, I am glad you reply


Add default page editor mode info & update images

Hi docs heroes, here is the change regarding the new setting to configure the default Page Editor mode in 9.19. I also updated some outdated screenshots

@takumagott , thank you for the PR.
Please next time do not call your branch "development", it is the best practice to call your local branches any other name but "development" or "production". This name prevents me from checking out your branch on my PC and working on it locally. For example, I am not able to edit new images easily and will have to wait till this PR is merged and change them afterwards.

@takumagott , thank you for the PR. Please next time do not call your branch "development", it is the best practice to call your local branches any other name but "development" or "production". This name prevents me from checking out your branch on my PC and working on it locally. For example, I am not able to edit new images easily and will have to wait till this PR is merged and change them afterwards.

Ah, thanks for letting me know, I didn't know. I'll try to think of it next time 🙂


[Urgent] Custom ToolTip

Hi All!!
I need some help about the ToolTip!
I want for every point In the Graph, when hovering, to show custom list of data, like:
for point X, on Hover, instead of showing the current Y-Axis Value, to show custom data.
I want for every point to have it's own custom tooltip data.
data = [100,200,300,400,500];
Point(100) -> {david, salmon, shmulik}
Point(200) -> {Jack, Eve, Rolling}
.
.
.
Thanks A lot !!
David.

Hi!
I would really appreciate any help!!
It's very important for me, It's big part from a Big Project at University!
Thanks,
David.

@DaviehS you can use the tooltip callbacks to change the data.
Sample
Docs


Add "log" field to answer

It can contain arbitrary data in JSON (what buttons did user click on etc.). It could be also used for storing wrong answers of "type anything" questions.

There is already metainfo field in Answer object which can hold this kind of information (JSON). You can already use "meta" argument in javascript service which will save the info under "client_meta" key in database.


Test travis ci jobs

Codecov Report

Merging #2 into master will increase coverage by 15.47%.
The diff coverage is 90.47%.

@@             Coverage Diff             @@
##           master       #2       +/-   ##
===========================================
+ Coverage      75%   90.47%   +15.47%
===========================================
  Files           1        3        +2
  Lines           8       42       +34
===========================================
+ Hits            6       38       +32
- Misses          2        4        +2

Impacted Files
Coverage Δ

src/models/lead.js
100% <100%> (ø)

src/service/finntech.service.js
78.57% <78.57%> (ø)

src/index.js
90% <90%> (+15%)
:arrow_up:

Continue to review full report at Codecov.

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


Fix apostraphe characters in strings

Just curious, where do I find apostraphe character on the keyboard ? the one I have is called prime symbol = '.

@miankhalid Most keyboards don't have it. This web site has keyboard shortcuts for some platforms, or you can just copy-and-paste: http://www.rsquo.net/


Support Accept-Language

copy/paste from https://github.com/matrix-org/synapse/issues/3037
Might be able to just proxy the header as well, or possibly use a per-domain value.

Should really do this:


Element to highlight not found, There are no steps defined to iterate

Implemented in an ionic app.
HTML:
TabTitle
Script:
const driver = new Driver();
driver.defineSteps([
{
element: "#tab1",
popover: {
title: "Title on Popover",
description: "Body of the popover"
}
},
{
element: "#tab2",
popover: {
title: "Title on Popover",
description: "Body of the popover"
}
}
]);
driver.start();
Errors while running:

Element to highlight #tab2 not found
There are no steps defined to iterate

Thank you for opening the issue. I am not able to reproduce it. Please submit a codesandbox example so that we may help you better.

I am also encountering this issue once in a while. http://guided-tour.uat.coverfox.com/term-insurance/quotes/b52b36d7-e3a0-470e-b574-797d83efd07d/?type=std

Maybe all your "steps" invalid.
Code:
`
for (let counter = 0; counter < steps.length; counter++) {
const element = this.prepareElementFromStep(steps[counter], steps, counter);
if (!element) {
continue;
}
  this.steps.push(element);
}

`
maybe "prepareElementFromStep" return null, your steps be ignored.

I am also facing the same issue which @mohithkovela has highlighted.
I have a loop using *ngFor in html and append id using index, Eg -
<ion-icon slot="icon-only" name="arrow-redo-outline" [id]="'share'+i">
In Ts file -
driver.defineSteps( [
{
element: "#share0",
popover: {
title: "Share Your Soup",
description: "Share any Soup on social media or by email.",
position: "left",
},
}
]);
driver.start();
But this is giving Element to highlight #share0 not found.
How to resolve this?

why occur this error is  forget the browser DOM  Loading mechanism and learn the  Lifecycle Hooks of Vue.
u should write this code block in "onMounted". wait for the DOM loaded.

Implemented in an ionic app.
HTML: TabTitle
Script: const driver = new Driver(); driver.defineSteps([ { element: "#tab1", popover: { title: "Title on Popover", description: "Body of the popover" } }, { element: "#tab2", popover: { title: "Title on Popover", description: "Body of the popover" } } ]); driver.start();
Errors while running:

Element to highlight #tab2 not found
There are no steps defined to iterate

why occur this error is forget the browser DOM Loading mechanism and learn the Lifecycle Hooks of Vue.
u should write this code block in "onMounted". wait for the DOM loaded.


length would be nice

hi rushil,
we were happy to find your module, to implement a small magic card trick with it. But for that we need to calculate with different deck sizes. And unfortunately there is no length method in your lib, which forces us to turn each deck into List Cards with getCards to get the length of the deck.
So a length method would be nice. Maybe I will fork your lib and create that function myself.
Thanx
Regards fonzerelly

I've added the length function to release 3.2.0.

Great ! :D Thanx a lot


Inference and Learner-based Importance

In this PR I add statistical tests to compute confidence intervals for importance values, and furthermore add learner-based feature importance methods.

Closes Issue #29


Refresh resources cache when the file changed

Fixes #82

@ByZhouhang can you try this PR
FYI I need to do some PERF before merge this


Different numbers of alleles in input VCF and output treeSequence files

Hi, @YunDeng98,
I have three questions about the usage of SINGER:

I have simulated a very short sequence (2Kb) and want to run the ARG inference for the entire sequence instead of a specific region. Would it be OK to call singer_master and set the -start and -end parameters as 0 and 2e5, respectively? My rationale for this is that, for such a short sequence, cutting it into windows and parallelizing the running (as parrallel_singer does) may be unnecessary.

My VCF data comprises 10 individuals, each with 2 alleles for one SNP. I expected that each marginal tree in the output tree sequence would have 10 tips (each tip corresponds to 1 individual) or 20 tips (each tip corresponds to 1 chromosome). However, I found that there are 40 tips in each marginal tree. I inspected the variants in the tree sequence and observed that the first 20 alleles correspond to the alleles shown in the VCF file, and all the latter 20 alleles are 0, indicating potential auto-filling with 0. Any insights into what might be causing this discrepancy? Here is the command I used:

singer_master -Ne 10000 -m 2e-8 -ratio 1.25 -start 0 -end 2e5 -vcf singer -output singer -n 700 -thin 10 -polar 0.99

convert_to_tskit -input singer -output singer -start 200 -end 699 -step 10

This is how the VCF and variant in tree sequence look like:

#CHROM
POS
ID
REF
ALT
QUAL
FILTER
INFO
FORMAT
Sample 1
Sample 2
Sample 3
Sample 4
Sample 5
Sample 6
Sample 7
Sample 8
Sample 9
Sample 10

1
199680
snp505
A
C
.
.
.
GT
0
0
1
1
1
1
1
1
0
1

Variable site 504 at genome position 199680.0 : ['0', '0', '1', '1', '1', '1', '1', '1', '0', '1', '0', '1', '1', '0', '1', '0', '0', '0', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0']

Could you provide a guidance on the number of iterations and burn-in? Débora Brandt's evaluation shows that running ARGweaver with 1200 iterations with burn-in of the first 200 iterations is sufficient for convergence. Is there a special reason behind running SINGER for 10,000 iterations with burn-in of the first 4,000 iterations?

Thank you for the help : )

Hi @dandanpeng here are my thoughts on your questions:
(1) Here you mention 200kb since you use -end 2e5? It is definitely no problem to use singer_master directly instead of parallel_singer. One thing to note is that SINGER needs at least >100 mutations in the region to work, otherwise you probably don't want to trust the results anyways.
(2) The VCF file you provided looks like it is haploid VCF file, instead of diploid. It is supposed to look like Sample 1 with 0|1 to work for SINGER. But here Sample 1 appears only with 0. I think I will write a new parser for haploid VCF later, but before that happens, you can change the simulation to output diploid VCF.
(3) Ah the number of burn-in and thinning. It is rather subtle, and heavily depends on the sample size (My real data is much larger than Debora's test simulation data). The reason for Debora's setting is mainly the runtime constraints for running ARGweaver. I think for <50 haplotypes it is more than enough for run 2000 iterations with 1000 as burn-in (from my own experience).
Let me know if I mis-interpret any of your questions or you have any follow-up questions!

Thank you for the explanation!
For the second question, sorry I messed up the table with the pipe in MARKDOWN. I did use the diploid data and just fixed the input in the original post. And now you can see that the correspondence between the VCF file and variants in tree sequence.

Can you share the vcf file with me? Or maybe show 20 lines or so in the markdown?

Sure! Here is the vcf file I ran with. Since GitHub doesn't support the VCF file type, I changed the suffix to TXT, hope it still works on your side.
singer.txt

Oh I know what is wrong! The program interprets Sample 1 as 2 names, one for Sample and another for 1. Could you try naming them Sample_1, Sample_2 instead?

That solves the issue! Thank you for the help!


IntelliSense does not properly recognize with block context

When a complex variable type, such as Record, is used with a with-do block, IntelliSense does not show functions/methods of such variable.
For example:
procedure WithIntelliSense();
var
    Cust: Record Customer;
begin
    with Cust do begin
        // IntelliSense does not show functions for Cust variable here
    end;
end;

So, if you try to type e.g. SetRange inside the with block, IntelliSense will not show it. It will show fields of the Customer record and also any global functions defined on Customer record, but not built-in AL functions (e.g. SetFilter, SetRange, ...)
I am using April build.

Thanks for reporting, that's a bug.


Update default tag to 2021-10-01-preview in the readme.md

Choose a PR Template
Switch to "Preview" on this description then select one of the choices below.
Click here to open a PR for a Data Plane API.
Click here to open a PR for a Control Plane (ARM) API.

https://github.com/Azure/sdk-release-request/issues/2889

Hi @qiaozha @tadelesh please help review SDK breaking change.


preparation for mathlib

This repository is intended for personal use and exploration of the Lean theorem prover. Why don't you open a PR in mathlib directly?

I am working on it now.


Toolchain file breaks cross compilation

If this is used as a dependency of a project that uses a cmake toolchain file, this may not compile. The toolchain file used by h3 is cmake/toolchain.cmake and it supersedes the default toolchain file.
I don't know about cmake enough to be able to submit a pull request, but for me the fix was simple: remove cmake/toolchain.cmake and make sure my toolchain file has the C99 requirements.

It looks like in CMakeLists.txt the intention is that we provide a default that can be overridden. Does your project set CMAKE_TOOLCHAIN_FILE or do you set that when calling cmake? It would be very helpful if you could share a smallCMake example that demonstrates this issue.

It looks like in CMakeLists.txt the intention is that we provide a default that can be overridden. Does your project set CMAKE_TOOLCHAIN_FILE or do you set that when calling cmake? It would be very helpful if you could share a smallCMake example that demonstrates this issue.

I know close to nothing to cmake. Can you explain if this code below is optional or sets something only if it doesn't exist?
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/toolchain.cmake"
    CACHE FILEPATH
    "Toolchain to use for building this project")

I call the main project compilation with CMAKE_TOOLCHAIN_FILE defined, but there are several nested build system calling one another, so the problem might be that the environment variable is not passed.

I know close to nothing to cmake. Can you explain if this code below is optional or sets something only if it doesn't exist?
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/toolchain.cmake"
    CACHE FILEPATH
    "Toolchain to use for building this project")

I call the main project compilation with CMAKE_TOOLCHAIN_FILE defined, but there are several nested build system calling one another, so the problem might be that the environment variable is not passed.

I have read the cmake doc and see that CACHE means "don't overwrite if user has set it". So you're right, it's exactly what's needed.
Now my problem is that the env variable is set! I don't know if this is a problem related to cmake, to how I invoke cmake, or to this project code.
I did this modification (add commands & logging):
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
execute_process(COMMAND bash "-c" "echo CMAKE_TOOLCHAIN=$CMAKE_TOOLCHAIN")
execute_process(COMMAND bash "-c" "echo env=$(env | grep ^CMAKE_TOOLCHAIN)")
message(STATUS "toolchain file = ${CMAKE_TOOLCHAIN_FILE}")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/toolchain.cmake"
    CACHE FILEPATH
    "Toolchain to use for building this project")

The execution result is:
===> Verifying dependencies...
===> Compiling h3
-- Using upstream h3 tag v3.6.4 based on local tag v3.6.4-12-g8541da4
-- Configuring done
-- Generating done
-- Build files have been written to: /miner/_build/default/lib/h3/_build/c_src
make[1]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
make[2]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
make[3]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
make[3]: Leaving directory '/miner/_build/default/lib/h3/_build/c_src'
make[3]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
[ 10%] Performing update step for 'external-h3'
[ 20%] Performing configure step for 'external-h3'
CMAKE_TOOLCHAIN=
env=CMAKE_TOOLCHAIN_FILE=/toolchain/cmake-toolchain
-- toolchain file = /miner/_build/default/lib/h3/_build/c_src/external-h3/src/external-h3/cmake/toolchain.cmake

As you can see, the env contains the appropriate toolchain file, but cmake seems to be unable to read the variable from env? Or perhaps the ${VAR} syntax isn't supposed to read env vars (but $ENV{VAR} is?).
Again this perhaps comes from my lack of knowledge of cmake. I appreciate your time helping me.

I have read the cmake doc and see that CACHE means "don't overwrite if user has set it". So you're right, it's exactly what's needed.
Now my problem is that the env variable is set! I don't know if this is a problem related to cmake, to how I invoke cmake, or to this project code.
I did this modification (add commands & logging):
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
execute_process(COMMAND bash "-c" "echo CMAKE_TOOLCHAIN=$CMAKE_TOOLCHAIN")
execute_process(COMMAND bash "-c" "echo env=$(env | grep ^CMAKE_TOOLCHAIN)")
message(STATUS "toolchain file = ${CMAKE_TOOLCHAIN_FILE}")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/toolchain.cmake"
    CACHE FILEPATH
    "Toolchain to use for building this project")

The execution result is:
===> Verifying dependencies...
===> Compiling h3
-- Using upstream h3 tag v3.6.4 based on local tag v3.6.4-12-g8541da4
-- Configuring done
-- Generating done
-- Build files have been written to: /miner/_build/default/lib/h3/_build/c_src
make[1]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
make[2]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
make[3]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
make[3]: Leaving directory '/miner/_build/default/lib/h3/_build/c_src'
make[3]: Entering directory '/miner/_build/default/lib/h3/_build/c_src'
[ 10%] Performing update step for 'external-h3'
[ 20%] Performing configure step for 'external-h3'
CMAKE_TOOLCHAIN=
env=CMAKE_TOOLCHAIN_FILE=/toolchain/cmake-toolchain
-- toolchain file = /miner/_build/default/lib/h3/_build/c_src/external-h3/src/external-h3/cmake/toolchain.cmake

As you can see, the env contains the appropriate toolchain file, but cmake seems to be unable to read the variable from env? Or perhaps the ${VAR} syntax isn't supposed to read env vars (but $ENV{VAR} is?).
Again this perhaps comes from my lack of knowledge of cmake. I appreciate your time helping me.

How do you invoke the CMake process to build H3? From the command line I would expect it to look something like cmake h3 -DCMAKE_TOOLCHAIN_FILE=... I am not sure if CMake would actually read the environment variables since it doesn't seem to be listed here: https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html I believe you will need to more explicitly tell CMake where to find the toolchain file.

How do you invoke the CMake process to build H3? From the command line I would expect it to look something like cmake h3 -DCMAKE_TOOLCHAIN_FILE=... I am not sure if CMake would actually read the environment variables since it doesn't seem to be listed here: https://cmake.org/cmake/help/latest/manual/cmake-env-variables.7.html I believe you will need to more explicitly tell CMake where to find the toolchain file.

I invoke with cmake --build _build/c_src -- install but no matter where I put the -DCMAKE_TOOLCHAIN_FILE, cmake refuses to start. Example:
# cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE --build _build/c_src -- install
CMake Error: The source directory "/miner/_build/default/lib/h3/install" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

I invoke with cmake --build _build/c_src -- install but no matter where I put the -DCMAKE_TOOLCHAIN_FILE, cmake refuses to start. Example:
# cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE --build _build/c_src -- install
CMake Error: The source directory "/miner/_build/default/lib/h3/install" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.

I wish cmake would use the environment variable like this proposition: https://gitlab.kitware.com/cmake/cmake/-/issues/19842

I wish cmake would use the environment variable like this proposition: https://gitlab.kitware.com/cmake/cmake/-/issues/19842

OK I found out. My project (not mine, the one I'm building) is in Erlang and invokes a wrapper that includes h3.
This wrapper compiles with:
cmake -B_build/c_src -Hc_src
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE --build _build/c_src -- install

The first step is able to receive -DCMAKE_TOOLCHAIN_FILE. I'll work on that, thanks for the hint.

OK I found out. My project (not mine, the one I'm building) is in Erlang and invokes a wrapper that includes h3.
This wrapper compiles with:
cmake -B_build/c_src -Hc_src
cmake -DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE --build _build/c_src -- install

The first step is able to receive -DCMAKE_TOOLCHAIN_FILE. I'll work on that, thanks for the hint.

OK I found out the real issue, cmake is invoked twice (nested) and the first didn't pass the option to the second.
=> https://github.com/helium/erlang-h3/pull/26
Thanks for your help!!!

OK I found out the real issue, cmake is invoked twice (nested) and the first didn't pass the option to the second.
=> https://github.com/helium/erlang-h3/pull/26
Thanks for your help!!!


[1.12] Bump cosmos to latest version

High-level description
Backport of #5039
Corresponding DC/OS tickets (obligatory)
These DC/OS JIRA ticket(s) must be updated (ideally closed) in the moment this PR lands:

DCOS-49256 Retry on ALL upstream exceptions in cosmos (even 4xx's). Also addresses DCOS-51139
DCOS-49941 dcos-jenkins does not update constraints in marathon
DCOS_OSS-5013 Remove zip based universe metrics from cosmos code.

Related tickets (optional)
Other tickets related to this change:

DCOS_OSS- Foo the Bar so it stops Bazzing.

Checklist for all PRs

[x] Added a comprehensible changelog entry to CHANGES.md or explain why this is not a user-facing change: No user facing changes.
[x] Included a test which will fail if code is reverted but test is not. If there is no test please explain here: Some tests are included in cosmos repo but no such tests in DC/OS repo.
[x] Read the DC/OS contributing guidelines
[x] Followed relevant code rules Rules for Packages and Systemd

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[x] Change log from the last version integrated (this should be a link to commits for easy verification and review): example
[x] Test Results: link to CI job test results for component
[x] Code Coverage (if available): link to code coverage report

PLEASE FILL IN THE TEMPLATE ABOVE / DO NOT REMOVE ANY SECTIONS ABOVE THIS LINE
Instructions and review process
What is the review process and when will my changes land?
All PRs require 2 approvals using GitHub's pull request reviews.
Reviewers should be:

Developers who understand the code being modified.
Developers responsible for code that interacts with or depends on the code being modified.

It is best to proactively ask for 2 reviews by @mentioning the candidate reviewers in the PR comments area. The responsibility is on the developer submitting the PR to follow-up with reviewers and make sure a PR is reviewed in a timely manner. Once a PR has 2 ship-it's, no red reviews, and all tests are green it will be included in the next train.

Ping @alenkacz @kaiwalyajoshi @kvish please review :)

@mesosphere-mergebot label Ready For Review

No user facing changes.

Are we sure that these were no user-facing changes? To me it sounds like we enhanced reliability/stability here and there.

I will add a changelog entry in an editorial overhaul.


HTML

HTML
User Story
As a bootcamp student
I want the prework notes to be structured on a webpage
so that i can easily find and read the information
Acceptance Criteria
GIVEN a Prework Study Guide website
WHEN I visit the website in my browser
THEN I see four boxes titled HTML, CSS, Git, and JavaSctipt with associated notes listed

Finished the code!


[AppBar] Composability and the muiName property

Nested children inside AppBar obtain different themes
Steps to reproduce
Works as expected:
class NavbarInstance extends React.Component {
    constructor(props) {
        super(props);
    }

    returnHome() {
        FlowRouter.go('landing-page');
    }

    render() {
        return (
            <AppBar
                title="Title"
                onTitleTouchTap={this.returnHome}
                iconElementRight={<FlatButton eventKey={1} label="Login" icon={< UserIcon />} href={FlowRouter.path('users.login')}/>}
            />
    );
    }
}

Doesn't work as expected:
class NavbarInstance extends React.Component {
    constructor(props) {
        super(props);
    }

    returnHome() {
        FlowRouter.go('landing-page');
    }

    render() {
        return (
            <AppBar
                title="Title"
                onTitleTouchTap={this.returnHome}
                iconElementRight={< NavRightContent user={this.props.user} />}
            />
    );
    }
}
 //------------------------
class NavRightContent extends React.Component {
    constructor(props) {
        super(props);
    }
    render() {

        return(<FlatButton eventKey={1} label="Login" icon={< UserIcon />} href={FlowRouter.path('users.login')}/>)
    }
}

As it can be seen the color, margins and padding are different.
Versions

Material-UI: v0.15.4
React: v0.15.3

@PolGuixe This issue isn't limited to the <AppBar />. It's a much broader issue.

We should document this approach as we are going forward with the composability approach.
You need to apply a static muiName = 'FlatButton' property to your NavRightContent component.
We don't support stateless functional component. I have just tried it and it crash.

@oliviertassinari you mean to have something like this:
<AppBar
title="Title"
onTitleTouchTap={this.returnHome}
iconElementRight={< NavRightContent muiName='FlatButton' user={this.props.user} />}
/>

I have tried this and it doesn't work, any idea or work-around?

@PolGuixe No, that's the react-bootstrap approach. I'm talking about: https://github.com/callemall/material-ui/blob/master/src/FlatButton/FlatButton.js#L17.

@oliviertassinari Now I am testing with this code:
class NavRightContent extends React.Component {
	static muiName = 'FlatButton';

	constructor(props) {
		super(props);
	}

	render() {
		const {user, context} = this.props;
		const {FlowRouter, Roles, Meteor} = context();
		return (
			<FlatButton label="Login" icon={< UserIcon />} href={FlowRouter.path('users.login')}/>
		)
	}
}

export default NavRightContent;

But it still doesn't work. Probably I am missing something.

@PolGuixe Sorry, I was previously wrong.

It's working with stateless as with class component.
Here is an example with a stateless functional component:

const MyFlatButton = (props) => (
  <FlatButton {...props} label="Save" />
);

Component.muiName = 'FlatButton';

const AppBarExampleIconButton = () => (
  <AppBar
    title="Title"
    iconElementRight={<MyFlatButton />}
  />
);

Here is an example with a class component:

class MyFlatButton extends Component {
  static muiName = 'FlatButton';

  render() {
    return <FlatButton {...this.props} label="Save" />;
  }
}

MyFlatButton.muiName = 'FlatButton';

const AppBarExampleIconButton = () => (
  <AppBar
    title="Title"
    iconElementRight={<MyFlatButton />}
  />
);

@oliviertassinari cool it works. However I can't solve it in some more complex elements, where what it renders depend in some props. Like in the example below:
class NavRightContent extends Component {
  //TODO:  not always the same type.....
  static muiName = 'FlatButton';

  render() {
   const {user} = this.props
    return user
      ? <IconMenu> /*Other stuff*/ </IconMenu>
      : <FlatButton {...this.props} label="Save" />;
  }
}

const AppBarExampleIconButton = () => (
  <AppBar
    title="Title"
    iconElementRight={< NavRightContent />}
  />
);

I have realised that way I am trying to do is different and a bit more complex. Hence iconElementRight may not be the best way. I think I should be using a different approach.
I have created a different issue to discuss it: https://github.com/callemall/material-ui/issues/5231

Right now I am handling the logic inside the AppBar's components. Like:

Yeah, that's the best approach you can use as the component is designed right now.
IMHO, that's good enough.
The other way I can think of to improve this point would be to use the context.

How about when the component is connect-ed with redux?
Here's my code:
// LoginContainer.js

class Login extends React.Component {
  constructor(props) {
    super(props)
  }

  render() {
    return (<FlatButton onClick={this.props.onLoginClick} label='Login' />)
  }

  static muiName = 'FlatButton'
}

Login.propTypes = {
  isAuthenticated: React.PropTypes.bool,
  isAuthenticated: React.PropTypes.object,
  onLoginClick: React.PropTypes.func.isRequired,
  onLogoutClick: React.PropTypes.func.isRequired
}

const mapStateToProps = (state) => {
  const { isAuthenticated, profile } = state.auth
  return {
    isAuthenticated,
    profile
  }
}

const mapDispatchToProps = (dispatch) => {
  return {
    onLoginClick: () => dispatch(loginRequest()),
    onLogoutClick: () => dispatch(logoutSuccess())
  }
}

const LoginContainer = connect(
  mapStateToProps,
  mapDispatchToProps
)(Login)

export default LoginContainer

And the AppBar is simply <AppBar title='Timed' iconElementRight={<LoginContainer />} />
I still have wrong paddings, margins and color, even after putting static muiName = 'FlatButton':

@amaurymartiny Try the following. That should work.
const LoginContainer = connect(
  mapStateToProps,
  mapDispatchToProps
)(Login);
LoginContainer.muiName = 'FlatButton';

export default LoginContainer

I have the same problem as the original poster @PolGuixe and tried to use muiName like @oliviertassinari explained above, but it didn't work for a more complex component such as an IconMenu. What would be the correct way to solve the theme issues below?
I have these components:
class ClickMeButton extends Component {
    static muiName = "FlatButton";

    render() {
        return (
            <FlatButton {...this.props} label="Click me" />
        );
    }
}

class MyMenu extends Component {
    static muiName = "IconMenu";

    render(){
        return (
            <IconMenu {...this.props} iconButtonElement={<ClickMeButton />}>
                <MenuItem primaryText="Item 1"/>
                <MenuItem primaryText="Item 2"/>
                <MenuItem primaryText="Item 3"/>
            </IconMenu>
        );
    }
}

Now, when I create an AppBar doing this:
class MyAppBar extends Component {
    render() {
        return (
            <AppBar
                title="My App Bar"
                iconElementRight={<ClickMeButton />}
            />
        );
    }
}

the theme is picked up correctly:

However, when I do this:
class MyAppBar extends Component {
    render() {
        return (
            <AppBar
                title="My App Bar"
                iconElementRight={<MyMenu/>}
            />
        );
    }
}

the theme is NOT picked up for the button:

How can I make Material-UI use the correct theme for my ClickMeButton in the AppBar?

@oliviertassinari , as to the code example:
const MyFlatButton = (props) => (
  <FlatButton {...props} label="Save" />
);

Component.muiName = 'FlatButton';

const AppBarExampleIconButton = () => (
  <AppBar
    title="Title"
    iconElementRight={<MyFlatButton />}
  />
);

Did you mean MyFlatButton.muiName = 'FlatButton' ?
Thanks for your help.

@norpoint It's an old issue. I don't remember, but you sounds like on the right track.


[sol2] rename port sol to sol2 and fix the full port

the name of the library is sol2 and not sol, sol is the old library that belongs to someone else.

Thanks for the PR!
I restored upstream's include/sol/ include directory (in addition to the include/ directory) to avoid breaking compatibility with projects that might previously have used upstream directly. That said, I completely agree that upstream should strongly consider not doing that :). However, we should follow whatever upstream decides here.

@ras0219-msft

You break the port ! :3

I wanted to transition to include/sol for sol3, since it is technically a breaking change.
I'm on board with changing from sol to sol2, albeit sol2 is supposed to be the direct successor and replacement of the original sol...


Fix small things

Affected Components

[x] Tests
[x] Docs

Style

[x] Go code is formatted with go fmt

Hi, I read the contribution notes and found a few inconsistent things that I fixed. For example, CONTRIBUTING.md mentions make fmt that missing and there were a few typos. You mentioned the minimum go version as 1.18.x and tests using 1.15 that I fixed too.

@abtris thanks for your contribution


chore(main): release 1.8.0

:robot: I have created a release beep boop
1.8.0 (2024-12-02)
Features

proxy group hide & config for automatic disconnection (8b48f45)
source ip filter (4a09d25)
upgrade core for mihomo (cd0f65b)

Bug Fixes

dl speed (0d09a78)
proxy group style (7c2841c)
source ip filter (4ca1a89)
stable sourceips opts (8836dd8)
style fix & config for mobile (a59fac2)

This PR was generated with Release Please. See documentation.

:robot: Created releases:

v1.8.0
:sunflower:


⚠ RPC server - Infura Mainnet has degraded performance

In 1a3ffa3, RPC server - Infura Mainnet ($INFURA_MAINNET_RPC_URL) experienced degraded performance:

HTTP code: 429
Response time: 320 ms

Resolved: RPC server - Infura Mainnet performance has improved in 1a1037f after 27 minutes.


Files added to compilation.compilationDependencies don't trigger a rebuild via --watch

reopening closed issue: #10674 with more info
Bug report
When adding dependencies to webpack manually using compilation.compilationDependencies and then using  --watch when you change the file you added a dependency for Webpack does not trigger a rebuild.
This is also an issue with contextDependencies and using fileDependencies
According to @evilebottnawi it should be supported.
What is the expected behavior?
For all the dependencies you've added it should trigger a rebuild whenever you change those files.
Example code
const path = require('path');

/**
 * Manually list dependencies here to automatically rebuild if any of these files change.
 * This is useful for files in the chain that webpack isn't aware of.
 */
const addDepPaths = [
	'some_external_dep_webpack_doesnt_know_about_due_to_external_tooling.js'
];

module.exports = {
	entry: {
		site: './test.js'
	},

	output: {
		path: __dirname + '/test',
		filename: 'js/[name]-[contenthash].js'
	},

	mode: 'development',

	plugins: [{
		apply: function(compiler) {
			compiler.hooks.compilation.tap('add-deps:compilation', function(compilation) {
				addDepPaths.forEach(function(depPath) {
					compilation.compilationDependencies.add(path.join(compiler.context, depPath));
				});
			});

			compiler.hooks.afterEmit.tap('add-deps:afterEmit', function(compilation) {
				addDepPaths.forEach(function(depPath) {
					compilation.fileDependencies.add(path.join(compiler.context, depPath));
				});
			});

			compiler.hooks.afterEmit.tap('add-deps-using-contextDependencies:afterEmit', function(compilation) {
				addDepPaths.forEach(function(depPath) {
					compilation.contextDependencies.add(path.join(compiler.context));
				});
			});
		}
	}]

};

https://github.com/garygreen/webpack-dep-problem

Note: this is example code, please don't comment about how you should be using import some_external... in test.js because we have a need to add a dependency in our plugin/workflow that Webpack simply doesn't see due to external tooling.
Other relevant information:
webpack version:  4.41.5

You example still use compilationDependencies, do you check contextDependencies and fileDependencies?

Copy webpack plugin uses this code for adding deps - https://github.com/webpack-contrib/copy-webpack-plugin/blob/master/src/index.js#L99

I've added some more examples including the one you linked to which copy-webpack-plugin uses - it doesn't seem to work.
Can you clarify, if you add those depdencies should the --watch command rebuild when you make any changes to those depdencies? That is my understanding, though I could be mistaken.
Here's a reproducable repository with everything you need: https://github.com/garygreen/webpack-dep-problem

It works with your repro.
Note that you won't see anything in the console as the build produced exact the same result and the cli doesn't print stats output again if it's identical.
The file should have influence on the build to see updated stats output.

Note that you won't see anything in the console as the build produced exact the same result and the cli doesn't print stats output again if it's identical.

When updating some_external.. js file in our app that SHOULD result in a different build output but as you can see from that example repo it doesn't even re-create the bundle.
Try:

Deleting the test folder
npm run watch
Edit some_external... file and notice how nothing happens in Webpack. Test folder is empty, the bundle isn't even created.

We even use [contenthash] as our output filenames so if the contents changed as a result of changing the external dependency file (that is tracked with fileDependencies) then webpack SHOULD rebuild, show stats and create a new file. Unfortunately it currently doesn't seem to do anything - could be due to internal mechanisms in webpack for caching?
It's almost like webpack needs a new API externalFileDependencies and whenver those files are changed webpack will ALWAYS rebuild, as it can't possibly know if the bundle have changed or not by that third party tool.

When updating some_external.. js file in our app that SHOULD result in a different build output

Why should it? The file not not used in any way in your plugin.

We even use [contenthash] as our output filenames so if the contents changed as a result of changing the external dependency file

the some_external.. js file is not part of the content of the output file, so contenthash is unaffected.

It's almost like webpack needs a new API externalFileDependencies and whenver those files are changed webpack will ALWAYS rebuild, as it can't possibly know if the bundle have changed or not by that third party tool.

By adding it to file/compilationDependencies it will rebuild, but as nothing has changed to the bundle it won't print stats.
You can verify this by adding a console.log to the compilation hook.

PS: I'm on Windows. Not sure if that makes a difference to the watcher...

Me to, but this doesn't make a difference.

the some_external.. js file is not part of the content of the output file, so contenthash is unaffected.

In our application it is. I have simplified the example repo but basically this is our use case:
postcss.config.js
// This is the "external" file that webpack doesn't know about.
// So we want to track it with ".file/.compilationDependencies"
import siteTheme from './site-theme.js';

module.exports = {
   plugins: [
       siteTheme.postcssPlugin()
   ]
}

site-theme.js
// This file is responsible for helpers and utilities in building our site theme.
// It exports a postcss plugin.
// Any changes to this file SHOULD be tracked, but currently it doesn't seem easily possible with webpack.
var variables = {
   'text-blue': '#0000ff',
   // ....
};

function postcssPlugin() {
   // .... reads the variables, performs various mutations to css for our theme, etc.
}

export default postcssPlugin;

Because Webpack doesn't know about our imported site-theme.js file it won't re-build anything. What we're looking to achieve is a way to tell webpack that dependency and any changes to that file (such as adding new variables, etc) for it to rebuild our bundle.
We could possibly achieve this by creating our own loader, but I don't see why that is nesscary when all we want to do is track a file and have it rebuild when it's changed....
Hopefully you can see our problem and use case more clearly now. If you need more information let me know

Now it's something different. Your problem is not that it's not rebuilding. Your problem is that the modules processed with postcss are cached, because webpack doesn't know to invalidate the cache for them when the file changes.
You need to add the file as fileDependency to the module. A loader can do that.
Here is a loader that would do it:
const path = require("path");
module.exports = function(source) {
  this.addDependency(path.resolve("site-theme.js"));
  return source;
}

Chain it with the postcss-loader:
module.rules: [
  {
    test: /\.css$/,
    use: ["postcss-loader", "./my-postcss-dependencies-loader.js"]
  }
]

A postcss-plugin could also do it like this:
module.exports = postcss.plugin("postcss-dependencies-plugin", function () {
    return function (root, result) {
      result.messages.push({
        type: "dependency",
        file: path.resolve(site-theme.js")
      });
    };
});

I would recommend to use the loader, otherwise a syntax error in site-theme.js would break watching as the config file can't be read at all.

@sokra thank you so much for you help on this, it's much appreciated 💑
The examples you provided are of great help. In addition I've discovered that Node caches any require statements so that meant any changes to those files that were required/imported were only being processed once even though Webpack was trying to rebuild as it was added as dependency.
So for anyone else stumbling across this issue the below helper should come in handy:
dep-plugin.js
// It's possible to tell Node to remove a module from it's cache.
// This function allows you to require without using the cache.
function requireUncached(module) {
    delete require.cache[require.resolve(module)];
    return require(module);
}

module.exports = postcss.plugin("postcss-dep-plugin", function (configPath) {
    return function (root, result) {
      var theme = requireUncached(configPath);

      // do whatever you want with the theme

      result.messages.push({
        type: "dependency",
        file: configPath // this needs to be a exact path, including `.js` I believe.
      });
    };
});

site-theme.js
function theme() {
   return {
       'text-blue': 'blue',
   }
}

module.exports = theme;

postcss.config.js usage:
const path = require('path');

module.exports = {
    plugins: [
       require('./dep-plugin')(path.resolve(__dirname, './site-theme.js')) // make sure to provide exact path.
   ]
}


webpack: Compiled with warnings.

when
npm start
I stoped here:
Child html-webpack-plugin for "index.html":
chunk    {0} index.html 542 kB [entry]
+ 4 hidden modules
Child extract-text-webpack-plugin:
chunk    {0} extract-text-webpack-plugin-output-filename 67.8 kB [entry]
+ 6 hidden modules
webpack: Compiled with warnings.
npm 3.10.10
node 6.9.5
webpack 2.2.1

manual input  http://loaclhost:3000


Does not work with SecuGens feature extractor

I tested matcher with iso files, generated from our private fingerprint database and it does not work with SecuGens free SDK. I tried finding a match in a large database of roll prints using a flat print from the same database (a different print from one of those fingers). The sample application was consistently finding a wrong image from a different person.

Hi Aleksey,
Thanks for your interets in OpenAFIS.
I presume you're not having problems using the library to match the isos included in the repo - i.e. it's just when making isos from your existing raster files?
That being the case, the most likely cause of the issue is resolution of the raster files vs the configuration passed to SecuGens SDK. This is particularly likely if your input raster file resolutions vary. Are you using the python script in the repo as a starting point?
Neil

I presume you're not having problems using the library to match the isos included in the repo - i.e. it's just when making isos from your existing raster files?

Yes, samples work fine. However in the example you are searching using a file from the same database. You do not need a complicated algorithm to match two exact files. Real life tasks involve matching fingerprints from different takes. More advanced tasks require latent fingerprint search, which is even more complicated, because the print quality may be low and one usually has only a small part of the minutiae.

That being the case, the most likely cause of the issue is resolution of the raster files vs the configuration passed to SecuGens SDK. This is particularly likely if your input raster file resolutions vary. Are you using the python script in the repo as a starting point?

Yes, I am using the script. However I was not able to start the extractor using lib.SG_DEV_FDU05 settings. It complained that it was not able to initialize the device. Obviously I do not have a device. I changed this to lib.SG_DEV_FDUSDA. Most fingerprint images are in 500 ppi 8 bit grayscale. The image dimensions may vary.
I was able to run the matching algorithm using data, generated by mindtct minutia extractor, but using real life images similarity score is very low - usually around 3%, very rarely it goes above 10%. Also the algorithm often gives false positives, even when a real match present in candidate database.

Hi Aleksey. Apologies, my time has been focussed elsewhere recently. Were you able to resolve the issues you were experiencing or did you have to move on?
I've only used this library with SecuGens SDK. I haven't tried any other minutia extractors; it's quite possible there are issues in the ISO template importing that don't show up with SecuGens output. It might be possible to visualise this using the render feature.
To reasure you though, this library is used in several large-scale production environments. It's well able to reliably match prints in a live environment.

To reasure you though, this library is used in several large-scale production environments. It's well able to reliably match prints in a live environment.

Hi @neilharan! Thanks for publishing this library. We tested the example and it works. My company is interested in obtaining commercial support for OpenAFIS. If you or someone you know might be interested, please email me at<EMAIL_ADDRESS>(My apologies for co-opting this issue. Feel free to delete this comment if you see fit.)


CU-9m18fr - Fix issues for verifying upgrade did 2.0.

Task linked: CU-9m18fr Release new version for hive node.


Search contact by phone number

Can you add the function findContactsByNumber or add a search by number to getContactsMatchingString?

Agreed. This would be so helpful.

Yes, email address also.

dupe https://github.com/rt2zz/react-native-contacts/issues/137


Version 3.1.0

Description
Bump minor release version
Proposed release notes:
# 3.1.0

## Added
### luigi
* Documentation guidance around release version increments #3074
* Add support for naming tasks in `@requires` #3077
* Add `traceback_max_length` parameter for error email notifications #3086
* Document cause of `Unfulfilled dependency` error #3105
* Add additional `OptionalParameter` datatype options #3079
* UI: Add rerun command snippet on "show error" modal #3117
* Add support for updating default config parser after loading luigi #3135
* Allow `batch_email.email_interval` to be set in config as `email-internal-minutes` #3125
* Allow `TimeDeltaParameter` to accept input as "seconds" #3125
* Add `EnumListParameter` to top-level attribute imports #3144
* Enable `metrics_custom_import` for `MetricCollectors` #3146
* Improve warning when a parameter is not consumed by a task #3170

### luigi.contrib
* Add `configure_job` BigQuery property #3098
* Add parquet support to BigQuery #3099
* Add network retry logic to BigQuery #3088
* Add `run_task_kwargs` property to ECS #3083
* Add `pickle_protocol` attribute and configuration option to Spark #3001
* Add `pg8000` driver support to Postgres #3142

## Fixed
### luigi
* Fix default value for `task.disable_window` #3081
* Fix deconstructor of `LocalTarget` when `is_tmp` attribute dne #3085
* Improved documentation reference to `luigi.format.Nop` import #3047
* Fix Python 3.10 deprecation warnings #3150
* Remove unnecessary extra call to `cls.get_task_namespace()` #3129
* Fix documentation typo in `notifications_test.py` #3151
* Fix docs ci #3158
* Fix task history rendering #3153
* Move `max_shown_tasks` and `max_graph_nodes` documentation to correct section #3156
* Fix ability to subclass `Task`'s `Register` metaclass #3154
* Replace legacy TravicCI readme badge with GithubActions #3159

### luigi.contrib
* Fix apache ci
    * #3091
    * #3113
* Fix documentation typo in sqla #3110
* Fix spark cluster mode error for missing path #3111
* Fix connection object passed to `rdbms.CopyToTable`'s `_add_metadata_columns()` #3011

## Removed
### luigi
* Remove `@Tarrasch` from codeowners #3127

## Changed
### luigi
* Update license copyright year #3108
* Improve error message on parsing default parameter value #3115
* Group tasks by task class in svg graph #3122
* Upgrade `tenacity` version #3147
* Enable task search to be case insensitive #3157

### luigi.contrib
* Update ExternalPythonProgramTask parameters to `OptionalParameter` #3130
* Allow newer versions of `prometheus-client` package #3163

Motivation and Context
There hasn't been a Luigi release since April 2021
Have you tested this? If so, how?
(release only)

@honnix , could i get a review in order to put out another release?

Thank you for preparing this. To double check, there is no breaking change, right?

Any update on this? As far as I can see there is no breaking change in this release.


IAM resources fail in isolated AWS partitions (e.g. AWS GovCloud) unless AWS_DEFAULT_REGION set

What happened?
I attempted to create IAM resources in us-gov but the resources were never created and resulted in the following STS error:
managed/iam.aws.upbound.io/v1beta1, kind=role  cannot run refresh: refresh failed: configuring Terraform AWS Provider: validating provider credentials: retrieving caller identity from STS: operation error STS: GetCallerIdentity, https response error StatusCode: 403, RequestID: 638c6984-99a6-45d6-b2d3-1edc0ea00017, api error InvalidClientTokenId: The security token included in the request is invalid.:

I believe this has to do with the fact that IAM resources do not have a region field in their forProvider configuration and it ends up falling back to a hardcoded default of us-east-1
I found this issue: https://github.com/crossplane-contrib/provider-aws/issues/596 and attempted to use the custom endpoint configuration for the ProviderConfig to specify a specific endpoint signing region with the following configuration but the STS error remained.
apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: aws-creds
      key: creds
  endpoint:
    partitionId: aws-us-gov
    signingRegion: us-gov-west-1
    source: Custom
    url:
      dynamic:
        host: 'iam.us-gov.amazonaws.com'
        protocol: https
      type: Dynamic

Finally, I used a ControllerConfig to set AWS_DEFAULT_REGION in the AWS provider deployment at which point I was able to successfully provision the resources.
I would have expected the custom endpoint to be sufficient, but I think the STS error was being thrown before the custom endpoint could be used.
How can we reproduce it?

Install the AWS provider

apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
  name: provider-aws-iam
spec:
  package: xpkg.upbound.io/upbound/provider-aws-iam:v0.36.0

Create a ProviderConfig with AWS credentials for a user with permissions in non aws partition (e.g. aws-gov)

apiVersion: aws.upbound.io/v1beta1
kind: ProviderConfig
metadata:
  name: default
spec:
  credentials:
    source: Secret
    secretRef:
      namespace: crossplane-system
      name: aws-secret
      key: creds

Attempt to create an IAM role

apiVersion: iam.aws.upbound.io/v1beta1
kind: Role
metadata:
  name: crossplane-cluster-role
spec:
  forProvider:
    assumeRolePolicy: |
      {
        "Version": "2012-10-17",
        "Statement": [
          {
            "Effect": "Allow",
            "Principal": {
              "Service": "eks.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
          }
        ]
      }

What environment did it happen in?

Crossplane Version: v1.12.2
Provider Version: v0.36.0 (using static credentials in k8s secret)
Kubernetes Version: v1.27.3
Kubernetes Distribution: KinD (Kubernetes in Docker)

Possible area of investigation:

the region falls back to us-east-1 if not set: https://github.com/upbound/provider-aws/blob/b09b073c081a48c9b4411ebfbd283387f6c722b9/internal/clients/aws.go#L227
here is where the provider pulls the endpoint config https://github.com/upbound/provider-aws/blob/b09b073c081a48c9b4411ebfbd283387f6c722b9/internal/clients/provider_config.go#L186

any update on this issue? the same is also applicable to china (cn-north-1)

Any updates or workaround for this issue? @sidpalas your workaround does not seem to work for me.

I did find a workaround. Essentially I did what was mentioned above, but instead of putting the endpoint config in the default providerconfig I created a new one called "gov" and used that instead of default for any resources that needed it.


style: add ellipsis to chip

Pull Request Test Coverage Report for Build 2045

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 75.714%

Totals

Change from base Build 2031:
0.0%

Covered Lines:
1863

Relevant Lines:
2349

💛  - Coveralls


Emit a helper for default imports based on if __esModule is specified

I think I'm running into a small bug here.
import React from 'react';
export = React;

With allowSyntheticDefaultImports: true and module: commonjs it compiles fine but I get the following output:
var react_1 = require('react');
module.exports = react_1.default;

I believe it should be:
var react_1 = require('react');
module.exports = react_1;

The idea is that your module loader (e.g. SystemJS) is going to do some special work to re-jigger your modules and give you the full module when you do a default import. Because this is the case, you might want to use a default import and have TypeScript understand that it's going to be the full module. However, our emit will not change, because the assumption is that the module loader will do this.
If your module loader doesn't do this, the flag should not be used.
See https://github.com/systemjs/systemjs/blob/master/docs/module-formats.md#inter-format-dependencies.

So babel does this (i.e. the _interopRequireDefault helper.) I thought Typescript would do the same.

We could potentially do that. I'll change the issue to reflect that.

I think just emitting the correct value (require().default vs require()) as it was described in the issue is better than using a helper because typescript already knows how the other module looks like. it's much cleaner and we have an advantage over babel here.

so we can just use the same type interference logic that's used when allowSyntheticDefaultImports is enabled to decide whether .default should be added or not

We have had a long discussion around the use of __esmodule a while back when the ES6 module support was being implemented. you can see this discussion in https://github.com/Microsoft/TypeScript/issues/2242.
The flag allowSyntheticDefaultImports, is there to allow you to use old-style modules if the loader messes generates a default export for you. otherwise there is no way to use these modules correctly with such loaders (i.e. system js).
if you are using commonJS, the module loader does not do any magic around default, so your import should not use import r from "react" instead you should use import * as r from "react".


[Direct Message] Start chat with himself from member details create an empty room with error toast

To reproduce:

From a DM room with user1 and user2 (you are user1)
Hit your profile (user1) and click on DIRECT CHATS / Start New Chat
A toast appears "user1 is already in the room"

I expected a new room won't be created. However when I go back in the rooms list, an Empty room is created.

We follow the iOS behaviour:  an empty room is created but the message error is now removed

Done, waiting for validation

Approved in 0.6.4


lis25ba no example

lis25ba
lis25ba
Describe the bug
lis25ba no example

OK, I may add something. Is there an example of reading data enough or do you require other examples as well?

Thanks, I don't have special data, a general example will suffice

OK, I may add something. Is there an example of reading data enough or do you require other examples as well?

Thanks, I don't have special data, a general example will suffice


Register uninstaller

Fixes #7.
Questions/comments:

This registers the uninstaller for the current user only, for the simple reason that the install is user-local.
Do we have an icon we could add to both the installer and uninstaller?
Peruse the other options to see if anything sticks out at you that we should add.

Testing
I tested with default configuration.

I have no experience with uninstallers. @ndmitchell could I ask you to review this?

Thoughts and comments:

The typical uninstall icon setup is uninstallIcon "$NSISDIR/contrib/graphics/icons/win-uninstall.ico". That's worth doing unless you have a better icon.
withReg is just flip uncurry, so I'd probably inline it everywhere and just write uncurry - but entirely your choice.
Would be easier to use constantStr than constant with a type signature - but you're copying the line before, so probably best to change either both or neither.

As for the actual uninstall stuff, that all looks thoroughly reasonable. Assuming you tested it once and it worked, that's enough for me. Thanks for the work!
The README improvements are also very good, well worth doing.

@ndmitchell Great points. I'm on it.

Looks like there's a bug in the uninstaller where it messes up the path pretty bad. It's preexisting though. I'll fix that while I'm at it.

@ndmitchell Ready for another look. I did a bit of refactoring too.

@ndmitchell Looks like the icon file is not available on Travis CI.

Perhaps we can embed our own, from some free source: https://www.iconfinder.com/icons/62114/delete_garbage_remove_trash_icon#size=128

Looks fine by me. I guess Linux doesn't include the icons. There are lots of free ones, so whichever you want. I think some of the MS ones are also licensed to allow use here, although not sure. What the uninstall icon looks like isn't too important :)

@ndmitchell I haven't found any uninstall icons that look good. So here are our options:

Leave it as is, but builds only work on Windows and Travis CI is useless from now on [not recommended]
Copy the icon files from the Windows install and embed them
Someone look harder than I did for a good icon and embed it
Revert to not specifying icons at all

Pick your poison!

Then again, the problem could be related to case-sensitive file systems....

Looks like NSIS flattens casing anyway. How can I embed these icons? My attempts have failed so far.

Or I forgot to change both paths. All green. Hope you enjoyed the annals of my struggling.

Greetings,
I have made a few icons, hopefully the links work.
Uninstall
Regular
For Windows, I believe you need the .ico.

@Tralen Sweet! Very nice work. @ndmitchell How would I embed these? I couldn't quickly figure out how to refer to local files from within the overall setup section.

@3noch I think the trick is to put them in the release directory, you have to distribute them. I have full details but won't have access until tonight, let me know if you need more.

@ndmitchell I didn't see any place where we were distributing the built-in NSIS icons, so I would be surprised if we were forced to distribute this. The exes will embed them.

I have just used installIcon "./Icon.ico". Not sure if the ./ is required or not. You are right, I didn't seem to have to bundle them either.

@ndmitchell Ok, I think it's finally ready.

Fine by me. I'll leave @snoyberg to hit merge so the timing doesn't conflict with his other stuff.

I've got nothing in-flight right now, if you're good with it, we can merge now.

Thanks for all your work on this @3noch

My pleasure; just waiting on a release with builds.

Now that we have the Github-based releases, I think anyone should be able to generate the builds. @3noch you interested in becoming a maintainer of this project too and getting access for creating releases?

+1!

I'd be quite honored.

Invite sent, welcome to the team!

I'm happy to be a part of this. Anything I need to know about the PGP signatures?

Anything you need to know, I probably need to know too :) - I certainly don't know anything about them yet.

If you ever need new icons, I will be pleased to help.

@Tralen Thank you!


Tx details - No stepper for 1/x safe tx creation and execution

There is no stepper at all when a tx is being created and executed right away (1/x safes).
The reason for this is that so far the backend is not returning the list of owners (in this case single owner) to fill the stepper, which leaves the tx all stretched out until it finally succeeds
To get this tx Go to a safe 1/x, create any tx and execute it right away.

Suggestion
Maybe the tx can be shown like this, with the empty block until it is done processing:

Originally posted by @francovenica in https://github.com/gnosis/safe-react/pull/3373#issuecomment-1029014371

Maybe just show this empty block for any outgoing txns with requiredSignatures?


[BUG] keydb 6.3.2 active-active queue race conditions

Describe the bug
Hey! In release 6.3.2, I saw a mention that race conditions were fixed, but they are still present.
To reproduce
I use 2 instances of keydb in active-active mode as queue with laravel horizon.
One job insert one record to mysql table. I setup 80 workers, so they can process 80 jobs in parallel.
Then i push 100.000 jobs and got 100.358 records in database.
If i use keydb without active-active mode as single instance, i got 100.000 records in database
Config
--active-replica yes
--appendonly no
--stop-writes-on-bgsave-error no
--save ""
--repl-diskless-sync yes
--server-threads 1
--tcp-backlog 65535"

HI @fannyfan414 can you provide more details, what specific RESP commands are you sending to KeyDB, are you sending them in parallel to both instances or just one? You mentioned "100.000 jobs and got 100.358 records" if the jobs are sending 1 key each there are 100.000 unique keys sent to KeyDB so there cannot be more than 100.000 records, how are you getting the number of records?

It seems to me that the number of records in the database turns out to be greater than the number of jobs, since several workers try to take on the same job, send requests to different keydb instances and keydb gives each of them this job without having time to synchronize between active-active instances

Do you know how "keydb gives each of them this job", do these workers run a get command against keydb, does this use pubsub?

@fannyfan414 it looks like the issue is that 2 parallel workers will pop the same list at the same time on 2 different keydb servers, unfortunately there will always be a delay in synchronization, thus there is no way to support this behaviour with active-active replication. I would suggest either using cluster mode or partitioning the jobs across workers such that no 2 parallel workers will attempt to pop the same list.

@fannyfan414 unfortunately we cannot synchronize in the middle of executing a command, in this case both servers would be in the middle of executing the lpop and thus would not be able to accept the synchronization request from the other. If you were to try syncing on each command performance would be completely unreasonable.

And if i try to change the logic so that the workers wait until one takes the task, then performance will suffer greatly ..
Is it possible to partition the workers over the queues, for example worker 1 only takes from queue "a" and worker 2 only takes from queue "b", this way each worker does not need to wait and also will not interfere with other workers.

@fannyfan414 unfortunately I don't think active-active is the correct solution, syncing on every command would result in worse performance than just running a single server... perhaps you could try cluster mode with a proxy that will abstract the cluster topology away from horizon, such as https://github.com/RedisLabs/redis-cluster-proxy.

@fannyfan414 If you the main concern is fault tolerance, the solution is to simply only write to 1 server at a time, unfortunately it is not an analogue of galera/percona, active-active simply allows masters to sync with each other using time stamps to resolve conflicts, there is no guarantee that all writes will be fully synchronous. The main purpose of active-active was to simplify failover(no need to promote a new master when the master fails, just switch writes to another node).
In cluster mode each queue will be owned by 1 master so this race condition does not exist. Each master can have replicas which can take over as master if the master becomes unavailable, the proxy will handle routing queries so the failover process will become transparent to the client.

Going to close this issue as there is no bug in KeyDB, and it seems you have a solution for your use case


Add topic for Eclipse Vert.x

Thank you for contributing! Please confirm this pull request meets the following requirements:

[x] I followed the contributing guidelines: https://github.com/github/explore/blob/master/CONTRIBUTING.md
[x] I have no affiliation with the project I am suggesting (as a maintainer, creator, contractor, or employee).

Which change are you proposing?

[ ] Suggesting edits to an existing topic or collection
[x] Curating a new topic or collection

Curating a new topic or collection

[x] I've formatted my changes as a new folder directory, named for the topic or collection as it appears in the URL on GitHub (e.g. https://github.com/topics/[NAME] or https://github.com/collections/[NAME])
[x] My folder contains a *.png image (if applicable) and index.md
[x] All required fields in my index.md conform to the Style Guide and API docs: https://github.com/github/explore/tree/master/docs

Motivation:
Eclipse Vert.x is a very popular toolkit for building reactive applications on the JVM. The core project has 10K+ stars on the https://github.com/eclipse-vertx/vert.x.

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.

/cc @vietj


Jenayah: Watch up4pc.com

Jenayah requests the watch of the watch_keyword up4pc\.com. See the MS search here and the Stack Exchange search here.

up4pc\.com has been seen in 0 true positives, 0 false positives, and 0 NAAs.

Approved by Machavity in Charcoal HQ


Update ADOPTERS.md

Move Yahoo! Japan in adapters ordering to match alphabetical order
Add Vinted to Falco adapters

Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Welcome @arudinskis! It looks like this is your first PR to falcosecurity/falco 🎉

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: arudinskis, jasondellaluce
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: a53220ef934bff00c49f29bdf52379862812c73f

/milestone 0.36.0

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: arudinskis, FedeDP, jasondellaluce
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP,jasondellaluce]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Add aggregation_alert_time_compared_with_timestamp_field documentation

Description
Adds documentation for option aggregation_alert_time_compared_with_timestamp_field, as discussed in #1555.
Checklist

[x] I have reviewed the contributing guidelines.
[ ] I have included unit tests for my changes or additions.
[ ] I have successfully run make test-docker with my changes.
[ ] I have manually tested all relevant modes of the change in this PR.
[x] I have updated the documentation.
[x] I have updated the changelog.

Questions or Comments

Thanks for submitting this!