Add HTTP Rewrite and Redirect Filter guide

What type of PR is this?
/kind documentation
What this PR does / why we need it:
Adds a guide for GEP-726 features, including the changes currently under review in #1124
It is a WIP for two reasons:

For HTTP->HTTPS redirects, are implementations expected to not redirect requests that are already HTTPS, or does the spec allow misconfigurations that result in redirect loops? If so, how should users properly set up their HTTPRoutes and Gateway Listener configuration to only match these redirect rules on HTTP requests? I expect this generalizes to path/hostname/etc. also, but this was the most prominent case I could think of.
Do we care about path types for path modifiers? It seems that you can use prefix modifiers for exact paths, though it's probably pointless (if harmless), and I'm not sure whether RegularExpression paths would be considered prefixes here (i.e. ReplacePrefixMatch changes only the path segment matching the regex).
I added the text suggested in #928 mostly as-is, but it raises the question "what status must we set?". It seems like we need a new RouteConditionType for filter-related statuses if we want this, or a new RouteConditionReason (it doesn't seem like it'd fit under any of the existing types unless we reject routes with invalid filters entirely, and I wouldn't expect to since they're per-rule and since the text indicates this should just be a warning, not an error).

As a side note, I have bad timing and will be out from 5/18-5/28, so it may make sense to use this as a starting point for someone else if review takes time or it needs significant changes. Edit: then I forgot this is the week that a bunch of people are at Kubecon :slightly_smiling_face: I should actually be able to check things on the 26th even though I'm still technically out.
Which issue(s) this PR fixes:
Fixes #1038
Fixes #928
Does this PR introduce a user-facing change?:
NONE

/ok-to-test

examples/experimental/http-redirect-rewrite/httproute-redirect-https.yaml is technically already valid under v1alpha2, but I expect it's easier to not split hairs and just call the whole thing experimental, assuming it'll imminently become not experimental and we'll move the whole directory back.

/lgtm
Nice work @rainest, this is very clear.

@robscott do we indeed want the backref comments in examples? Those do actually render in the guide:

The other examples don't include the same; their usage is just loosely indicated by the directory name, though I'm not sure others have the same quality where the guide is under v1alpha2 and the examples are under experimental. I removed the original commit from the PR, backrefs.diff.txt if we want to re-add it.

@rainest any chance you checked that after https://github.com/kubernetes-sigs/gateway-api/pull/1186 merged? I had to change the prefix characters to #? to avoid hiding all subheadings. If that doesn't work, I think it's fine to just leave that part out of this PR. This is a great improvement and would love to get it in.

Alright, preview properly stripping the new header (albeit only after the second try for some reason), so this should be all good to go.

LGTM, I'll just approve though.
/approve


Quest reset button for each individual quest

When someone try to complete a quest and facing disconnection afterwards, the tracker shows error: the completed quest will not disappear from panel. This will stay for a whole day for daily quests, until the reset timer runs out and resets all the daily quest tracker:

I assume, when this error happened to weekly quest, then it'll last for a whole week, then a whole month for monthly quest. When this happened to one-time-only quests.... well, I do not want to imagine that...
My latest pull was 0f6f52f.

This bug has existed in some form since at least version 8. You can get similar effects by using the API link and having two computers running and completing the quest on another computer and it will get stuck in the quest log.

Then it's adding more reason to find a way to fix this.....
When happens on recurring event, this bring less harm, but just imagine if it happens on the one-time quest. It'll be troublesome and rendering the tracker useless.

The temporary solution is manually resetting the quest in strategy room. We still can get the quest list again by navigating the quest page but not their trackers. In a long term, ideally, we should have a mechanism to clear the quest individually on the panel.

ah individual quest reset should be on strategy room. we have more room there.
for now, changing this issue entry to "Quest reset button for each individual quest"

Added 4 new buttons to strategy room.

Manual counting overrides (+ and -)
Quest status override (double arrow) to toggle: disabled, open, active, complete
Clear quest which will remove the quest from list therefore clearing both status and count

Revisiting quest page will refill the quest list


Blocks do not highlight

With methane https://modrinth.com/mod/methane/version/1.4.5 alone and with other mods - As pictured, breakable block even in survival mode don't have the grey outline you expect from targeting a block. Breaking blocks and placing work as normal but without the target indicator.

I believe that this was a change I left over from an older build. Should be an easy fix

issue fixed as of https://github.com/AnOpenSauceDev/Methane-mod/commit/a27378a06a7344bcd6d60c370620aad68acd8ab3


Xamarin

Is there an implementation for Xamarin.forms?

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

ID: 7e71a428-6213-e0e1-cfba-76964353e0a2
Version Independent ID: ef27b609-4c88-3a11-35ad-709df9c51861
Content: Push notifications to specific Android devices using Azure Notification Hubs and Google Cloud Messaging
Content Source: articles/notification-hubs/notification-hubs-aspnet-backend-android-xplat-segmented-gcm-push-notification.md
Service: notification-hubs
GitHub Login: @dimazaid
Microsoft Alias: dimazaid

@IeuanWalker Thanks for the feedback! We are currently investigating and will update you shortly.

@IeuanWalker I believe the below doc is what you are looking for. If not, please tag me in your reply and we can dig deeper.
https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-push

@BryanTrach-MSFT thanks for the fast response, but the linked document still doesn't explain how to register new tags  or remove old ones whilst the app is running

@conceptdev Could you please review this feedback and determine if it's necessary to include details on how to register new tag and remove old tags while the app is running?

@conceptdev @BryanTrach-MSFT There are guides to do this within Android, iOS and UWP application just not for Xamarin (which i find odd :/)

Yes, there are no complete documentation on xamarin.forms. this is really bad

We have no plans to add Xamarin.Forms docs for Notification Center. Because Xamarin exposes the native platform APIs, any examples available for iOS or Android would be applicable to Xamarin, just modified to C#. In this case, perhaps the UpdateRegistrationAsync method in Windows Step 15 might be useful.
In addition, a lot of Notification Hub capabilities are now available in App Center Push, including using audiences with custom properties. App Center has documentation available for Xamarin platforms.

@conceptdev is there any guide on how to java to C#.
Also, the android guides are still using GMS rather than FMC

@BryanTrach-MSFT please close this.


Vendor in latest container/storage for devicemapper support

container/storage now supports devicemapper options that allow you to
configure it.  This might be useful to katacontainers.
Signed-off-by: Daniel J Walsh<EMAIL_ADDRESS>

/test all

/test kata-containers

Changes LGTM, kata-jenkins still isn't hip though.

/test kata-containers

Not something that needs to block this PR, but with the configuration options still developing, we may want to mention which version of container/storage we're using here, were users will be able to easily discover it.  Although by using a vendored package (vs. a system package), it's not clear to me who will be in charge of installing the system storage.conf(5).  It looks like we're currently assuming that another package will install the storage.conf(5) that corresponds to the version of container/storage we vendor.

@mrunalp @sboeuf Does Kata Containers testing run with devicemapper for storage on loopback devices.  The current code in containers/storage is turning off loopback support.  We need to either specify an actual device for your system to run your tests on, or figure out a way to pass Test=1 into containers storage to allow loopback support.

@chavafg could you answer @rhatdan about the storage driver used for Kata Containers testing ?

I guess we can but we would have to improve the script to create other devices than simple loopback ones. @amshinde @chavafg is that something you can look into ?
/cc @mcastelino

Well actually I am working on a change to containers-storage to allow you to modify it.  So we might have to disable this check to allow us to get the fix in, and then you could reenable it using a real device.

@rhatdan nice ! But I am actually thinking it would be also good for us to have support for real devices. How does CRI-O test with real devices in case of runc ?

@chavafg We used to run tests using a real device in clear-containers. See these storage options:
https://github.com/clearcontainers/tests/blob/3c3bed5046fb460a33b98d3402da20e2024a13ad/Azure/cloud-init.txt#L197
Basically,
export STORAGE_OPTIONS="--storage-driver devicemapper --storage-opt dm.directlvm_device=/dev/sdd, dm.thinp_percent=95, dm.thinp_metapercent=1, dm.thinp_autoextend_threshold=80, dm.thinp_autoextend_percent=20, dm.directlvm_device_force=true"

@amshinde thanks, this would be easier to actually avoid having to workaround containers/storage.
@chavafg let us know if you can make this work ;)

sure, will test and open a PR if everything goes well with that options.

My patch will allow you to put all of that configuration data into storage.conf rather then having to understand the underlying layout.  But you could do that now.

That's cool :), we'll have the choice ! Thank you @rhatdan

I created  /dev/sdb device in my host, and passed to the STORAGE_OPTIONS
export STORAGE_OPTIONS="--storage-driver devicemapper --storage-opt dm.use_deferred_removal=false, dm.directlvm_device=dev/sdb1 dm.directlvm_device_force=true"

But, now I got:
not ok 1 ctr not found correct error message
# (from function `start_crio' in file helpers.bash, line 225,
#  in test file ctr.bats, line 10)
#   `start_crio' failed
# time="2018-05-21T21:36:26Z" level=error msg="must set --root and --runroot, or neither"
# 2018/05/21 21:36:26 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial unix /tmp/tmp.31mUjsIKJt/crio.sock: connect: no such file or directory"; Reconnect
ing to {/tmp/tmp.31mUjsIKJt/crio.sock <nil>}
# time="2018-05-21T21:36:26Z" level=fatal msg="listing containers failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable"
# 2018/05/21 21:36:26 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial unix /tmp/tmp.31mUjsIKJt/crio.sock: connect: no such file or directory"; Reconnect
ing to {/tmp/tmp.31mUjsIKJt/crio.sock <nil>}
# time="2018-05-21T21:36:26Z" level=fatal msg="listing pod sandboxes failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable"

any idea?

@chavafg Looks like a malformed option line. Try this :
sed -i 's/storage_option = \[/storage_option = \["dm.directlvm_device=\/dev\/sdb", "dm.thinp_percent=95", "dm.thinp_metapercent=1", "dm.thinp_autoextend_threshold=80", "dm.thinp_autoextend_percent=20", "dm.directlvm_device_force=true"/' "/etc/crio/crio.conf"

@chavafg any chance you re-tried based on @amshinde comment ?

@sboeuf @amshinde what about if I change our tests to run with overlay so that we can unblock this and when we figure out how to run with a block device I can change it again?

I was able to start crio and run the first test successfully. After that, the cri-o tests are failing because they ask for another 'clean' block device.
1..32
ok 1 ctr not found correct error message
not ok 2 ctr termination reason Completed
# (from function `start_crio' in file helpers.bash, line 225,
#  in test file ctr.bats, line 19)
#   `start_crio' failed
# time="2018-05-22T15:35:02Z" level=error msg="error opening storage: /dev/sdc is already part of a volume group "storage": must remove this device from any volume group or provide a different device"
# 2018/05/22 15:35:02 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial unix /tmp/tmp.utctYelsKY/crio.sock: connect: no such file or directory"; Reconnect
ing to {/tmp/tmp.utctYelsKY/crio.sock <nil>}
# time="2018-05-22T15:35:02Z" level=fatal msg="listing containers failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable"
# 2018/05/22 15:35:02 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: dial unix /tmp/tmp.utctYelsKY/crio.sock: connect: no such file or directory"; Reconnect
ing to {/tmp/tmp.utctYelsKY/crio.sock <nil>}
# time="2018-05-22T15:35:02Z" level=fatal msg="listing pod sandboxes failed: rpc error: code = Unavailable desc = grpc: the connection is unavailable"
# 0

I am providing these STORAGE_OPTIONS:
export STORAGE_OPTIONS="--storage-driver devicemapper --storage-opt dm.directlvm_device=/dev/sdc --storage-opt dm.directlvm_device_force=true --storage-opt dm.thinp_percent=95 --storage-opt dm.thinp_metapercent=1 --storage-opt dm.thinp_autoextend_threshold=80 --storage-opt dm.thinp_autoextend_percent=20"

any idea of how can I make the whole tests work using the same device?

Try dm.directlvm_device_force=True

/test all

Opened #1576 to see if someone can help us with the bin2img failure.

@chavafg any progress there ?
If not, we might need to consider running overlay testing for CRI-O Jenkins job (as you suggested @chavafg ) until we figure out this properly. But I don't want to lower the priority on this and forget that we're not testing on devicemapper anymore. That's why it'd be cool to be able to solve this instead of switching.
/cc @egernst

/test all

/test e2e_rhel

@chavafg @sameo I have added a cleanup_lvm section to the test suite which will be called on each cleanup. If you set the LVM_DEVICE environment variable to the device you are using, this should execute @nalind suggested fix.  If this passes all of the tests other then Kata could you guys add it to your kata tests so that we can finally get this PR merged.

great, thanks @rhatdan, I need to add the $LVM_DEVICE variable in our test script, will add the fix right away and let you know when you can restart the kata jobs and hopefully everything willl work now.

Fixed

/test all

@rhatdan can you restart the kata job? Now everything should be fine.
Thanks

/retest

\o/ kata worked now :)

@mrunalp @runcom @wking @giuseppe PTAL

@chavafg Nice work.

Thanks @chavafg, @rhatdan and @nalind for solving this ;)

@rhatdan LGTM

@mrunalp PTAL I believe this can be merged to also unblock PRs failing at kata-containers job

@runcom Merging.


Error while importing source code: Value cannot be null. Parameter name: key

Create a release pipeline with Azure Pipelines
Set up a continuous delivery (CD) pipeline that automates the process of deploying your application.
Lab URL: Create a release pipeline

Error while importing source code: Value cannot be null. Parameter name: key

AB#3565

Hi @kwiecien Thank you for reaching us.
We unable to reproduce this error? If the issue still persists, please add your comment below.


[StoriesIGBridge] Use getName() to create custom feed titles

Use getName() to create custom feed titles, instead of always using the bridge name.

Thanks !


Cutset likelihood switches between scientific and double formats

Cutset likelihood is represented in scientific notation for likelihoods < 1e-5 but as doubles otherwise. The notation effects MBAS output which maps likelihood levels to severity levels where doubles are not expected and default to passing "E" severity.

Soteria ++ output should format likelihood in long-E scientific notation always


Change localization for additional renderer (ex. c3, d3, plotly)

Dear author,
I have followed the guideline for changing UI language of the pivot table. However, it seems works only with the standard renderer.  For plotly, c3 or d3 renderer, it cannot. As I understand because there is lack of translation file for those renderers. In this case, how can I revise your code for using the additional translation file such as plotly_renderer.jp.js
Thank you very much.

You could create your own locale file with the specific translations you like :)


Key Bindings Issue

Hi,
I came across a problem with key bindings in datetime picker.
To reproduce,  open http://eonasdan.github.io/bootstrap-datetimepicker/#no-icon-input-field-only.
Then click inside a datepicker. A popup shows up. I can now use left-right-up-down keys to select date and then hit Enter to confirm the choice. So far is perfect. Now, click the field again.
Problem --> Note that now you can not use your keyboard.
General question. Is it somehow possible to set date/time using only keyboard? (I noticed that in a couple of other examples it often does not work. For example, left-right keys won`t work in case popup is hidden.
Thanks in advance,
Anton

Hi, for this bug please refer to #1690, if not wrong there's a fix there
You can close this as is a duplicate

Hi,
Yes, this is what I've got in my case as well.
(namely this https://github.com/Eonasdan/bootstrap-datetimepicker/issues/1690#issuecomment-284269985)
So I can indeed close this one as duplicate


Per User

So if I design a PowerApp using an SQL On-Premises Gateway connector (really, this is considered Premium instead of Standard?!?) with my fancy new per app or per user plan, does the end users of my PowerApp also need to have a per app or per user plan? Or can they use the app with their Office 365 E5 subscription?
This is not at all clear in the documentation above - and it really needs to be...

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

ID: a2cad5bd-4ffa-3671-0364-95e5b6f65256
Version Independent ID: 6d0cc055-b7be-02d7-3ba8-55e400ccd21b
Content: Power Apps and Power Automate licensing FAQs - Power Platform Admin center
Content Source: power-platform/admin/powerapps-flow-licensing-faq.md
Service: power-platform
GitHub Login: @dileepsinghmicrosoft
Microsoft Alias: dileeps

Hi @HairyDrumroll ,
I have the same question with no answer so far. If you got news, let me know.
Only intersting clue I found may indicates that GUEST users of Premium Power Apps may need per app ou per user plan.
It seems to be described this way on this Microsoft document :
https://docs.microsoft.com/fr-fr/powerapps/maker/canvas-apps/share-app#what-license-must-be-assigned-to-my-guest-so-they-can-run-an-app-shared-with-them
It would still certainly by risky to guass a final answer based on this ...

Seems I found clear answer, it depends on the execution context of the flow.
If it is an automated flow, it runs only on one context, only one per app or per user licence.
If it is a manually trigerred flow for example, it runs on the user context, the user needs per app or per user licence.
https://powerusers.microsoft.com/t5/Connecting-To-Data/HTTP-Request-for-Graph-Connector-Moving-to-Premium-Licence/m-p/322712#M5940


chore: Upgrade deps and fix minor changes from upgrades

Bumping wgpu was the main focus.  Couple of changes in the texture file from bumping. Just switched from NonZeroU32 to u32

Thx, side question: what plugin modifies your toml formatting?

Oh i apologize. I always forget to disable auto-formatting when working in other repositories. I can fix if you would prefer.
The plugin comes from vscode. https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml

better to fix it :). I like the non modified toml. Until I figure out a plugin for CLion.

Sounds good :) should be updated now! appreciate your work on this

Just realized wgpu 0.16 may not work with egui (optional with this), so that should be updated too. I dont mind a github rev version for egui.
did you try running all the examples?
I’ll be able to better test & merge after monday, pretty busy this weekend :)

You are right, the egui is still on wgpu 15 which breaks.
Running all the examples shows no discrepancies, except for egui example.


update dialer's writer to use the new :writeinto_iovec(iov) interface

I actually do have this, I just added the wrong file to the commit. Oops, fixing now. :/

Sweet!

This makes sense right? https://github.com/imgix/levee/pull/22/commits/85c2d85a4e6d465f2ef9582fe4112733aadb5147

Yep, it does. This already looks like a pattern we might be able to capture. W:send takes a ... .. it might be able to effectively translate to this.  85c2d85 seems good though until we do this sort of thing a few more times.

Ah, yeah. I was thinking Message could capture a full array as a general purpose iovec writer, but that would be nicer. I suppose I could have done this with the nested Iovec too. Good for now though.

Yeah, it's nice to let things stew a bit, before committing to it.

Fixed by #22


Add CORS support to python and golang runtimes

similar to issue #250 it would be nice to have cors support for python or golang.  For python, if I could at least have my function return a bottle.Response that would work but the runtime doesn't seem to allow it.  Here is my code:
def list(event, context):
  return bottle.Response("foo", 200, {"Access-Control-Allow-Origin" : "*"})

Hi @vallard, that'd be great. Right now we don't have the resources to work on that, would you mind giving it a try? We are open to pull requests :)

@andresmgot This fix does not seems to best approach for solving CORS. As sometime a user may not want to enable CORS or one may wants to enable CORS only for a specific domain.

Better way to fix CORS support to enable or disable CORS in Ingress resource when Kubeless creates Ingress from HttpTrigger. @andresmgot , do you think this is proper approach. As while creating http trigger, we can give options for enabling cors and domain like below.
kubeless trigger http create get-python --function-name get-python --path hello --cors true --cors-domain "*.subdomain.com"
We will like to work on this, which will add CORS support for all runtimes.

We would require those flags be something we could put in a serverless config file as well.  The default node implementation just enables it by default. The ingress approach though seems pretty good.
There are also issues I have as the default golang only returns a string when we’d like to also return JSON or different status codes other than 200.  That is probably for another issue though.

On Oct 29, 2018, at 7:10 AM, imishravmw<EMAIL_ADDRESS>wrote:
Better way to fix CORS support to enable or disable CORS in Ingress resource when Kubeless creates Ingress from HttpTrigger. @andresmgot , do you think this is proper approach. As while creating http trigger, we can give options for enabling cors and domain like below.
kubeless trigger http create get-python --function-name get-python --path hello --cors true --cors-domain "*.subdomain.com"
We will like to work on this, which will add CORS support for all runtimes.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

I am not sure how that would work at the ingress level (I am not sure if you can configure that in an ingress object). In the function, if that is a feature you need, I would just define an env var for that purpose. For example ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_ALLOW_METHODS... In the function, if those variables are not set, we can set the default to "allow all". That way it wouldn't be necessary to add a new flag.

We would require those flags be something we could put in a serverless config file as well. The default node implementation just enables it by default. The ingress approach though seems pretty good. There are also issues I have as the default golang only returns a string when we’d like to also return JSON or different status codes other than 200. That is probably for another issue though.
…

yes certainly, we need to make changes to serverless to provide that, one draw back in server less is it only provides cors "true" or "false", it should also support cors domain when cors is true.

I am not sure how that would work at the ingress level (I am not sure if you can configure that in an ingress object). In the function, if that is a feature you need, I would just define an env var for that purpose. For example ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_ALLOW_METHODS... In the function, if those variables are not set, we can set the default to "allow all". That way it wouldn't be necessary to add a new flag.

Kubbernetes nginx Ingress does support CORS annotations, please refer nginx-ingress-doc.
Adding env to function has a drawback, that I might create two HTTP trigger, with one I want CORS, but with another I don't want. That will not be solved by doing only at function level. as CORS is handled by Ingress controller. But certainly we could something like, if cors is defined at function level, that gets applied to all triggers by default and if cors is not set at function level, then one can define at a individual trigger level.

Do you have any target for when you are going to put this PR in?  We are
getting along fine with our custom images at present but I could submit the
changes as suggested by Andres tomorrow for golang and python.
On Tue, Oct 30, 2018 at 2:52 AM imishravmw<EMAIL_ADDRESS>wrote:

I am not sure how that would work at the ingress level (I am not sure if
you can configure that in an ingress object). In the function, if that is a
feature you need, I would just define an env var for that purpose. For
example ACCESS_CONTROL_ALLOW_ORIGIN, ACCESS_CONTROL_ALLOW_METHODS... In
the function, if those variables are not set, we can set the default to
"allow all". That way it wouldn't be necessary to add a new flag.
Kubbernetes nginx Ingress does support CORS annotations, please refer
nginx-ingress-doc
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/annotations/
.
Adding env to function has a drawback, that I might create two HTTP
trigger, with one I want CORS, but with another I don't want. That will not
be solved by doing only at function level. as CORS is handled by Ingress
controller. But certainly we could something like, if cors is defined at
function level, that gets applied to all triggers by default and if cors is
not set at function level, then one can define at a individual trigger
level.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kubeless/kubeless/issues/934#issuecomment-434236911,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAKVTWhWLebm4FVIaJDK9nfxygo1RzfNks5uqCFCgaJpZM4X7DTQ
.

@vallard you can go ahead with your changes since it would be useful to handle CORS in the function anyway. As far as I understood we can do it in both places, the function and the Ingress controller. @imishravmw can follow up with further PRs if needed. I would not include the env vars for the moment, just the accept-all policy that we have right now.

I have got two PR ,one in http-trigger repo https://github.com/kubeless/http-trigger/pull/10 , which needs to get first done to pass another PR which is in kubeless repo https://github.com/kubeless/kubeless/pull/1008 ,
second PR is failing CI checks because it depends upon first PR.
Even first PR https://github.com/kubeless/http-trigger/pull/10 is failing with circleci errors, but not sure why ,can someone help for this. @andresmgot

@imishravmw this repo is now using the latest release of the http-triggger with your changes. You can update the PR in this repository.

@imishravmw this repo is now using the latest release of the http-triggger with your changes. You can update the PR in this repository.

I could not understand, what you want me to do by saying "update the PR"
There is related issue https://github.com/kubeless/kubeless/issues/819 , both of these could be closed.

I meant that at that point you could update #1008 (that is now closed). Thanks for your contribution!


guile-json: 4.7.1 -> 4.7.2

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/guile-json/versions.
meta.description for guile-json is: "JSON Bindings for GNU Guile"
meta.homepage for guile-json is: "https://savannah.nongnu.org/projects/guile-json"
meta.changelog for guile-json is: ""
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 4.7.2 in filename of file in /nix/store/wklc22sfjvj93bwi2lwiibv45gzrds4n-guile-json-4.7.2

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
guile-json

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/wklc22sfjvj93bwi2lwiibv45gzrds4n-guile-json-4.7.2 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A guile-json https://github.com/r-ryantm/nixpkgs/archive/f3573d373f6ec9fc9f37c54b84d522377ca36ebb.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/wklc22sfjvj93bwi2lwiibv45gzrds4n-guile-json-4.7.2
ls -la /nix/store/wklc22sfjvj93bwi2lwiibv45gzrds4n-guile-json-4.7.2/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

guile-json

Maintainer pings
cc @ethancedwards8 for testing.

Result of nixpkgs-review pr 193377 run on x86_64-linux 1

1 package built:

guile-json


Add delegations to registration service

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 221 (0.0%)  changed or added relevant lines in 20 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.08%) to 2.195%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

registration-service/src/cardano/cli/command/transaction/id.rs
0
3
0.0%

registration-service/src/cardano/cli/command/transaction/submit.rs
0
3
0.0%

registration-service/src/cardano/data.rs
0
3
0.0%

registration-service/src/config/mod.rs
0
4
0.0%

registration-service/src/utils.rs
0
4
0.0%

integration-tests/src/common/registration/starter.rs
0
5
0.0%

registration-service/src/cardano/cli/command/stake_address/build.rs
0
6
0.0%

registration-service/src/cardano/cli/command/stake_address/registration.rs
0
6
0.0%

registration-service/src/cardano/cli/command/address/build.rs
0
9
0.0%

registration-service/src/cardano/cli/command/query.rs
0
9
0.0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.08%

Covered Lines:
101

Relevant Lines:
4601

💛  - Coveralls


net/http: memory leak due to a large number of items in transport.reqCanceler

net/http:  memory leak due to a large number of items in transport.reqCanceler
What version of Go are you using (go version)?

$ go version
go version go1.19.10 linux/amd64

Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN="/home/xxx/codes/go/bin"
GOCACHE="/home/xxx/.cache/go-build"
GOENV="/home/xxx/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/xxx/codes/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/xxx/codes/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.10"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/xxx/codes/transport-memory-leak/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3608446700=/tmp/go-build -gno-record-gcc-switches"

What did you do?

When using http.ReverseProxy  to build http ReverseProxy,  We found memory leak in http.Transport in certain case.
There is a client , proxy and server as bellow, :
client ----->  proxy -----> server

reproduce condition:

client concurrently visit proxy（maybe 200+ concurrency）.
server receive request head  and return response immediately(server response before receive entired request body).

proxy code:
https://go.dev/play/p/dRzdohisHy5?v=goprev
server code:
https://go.dev/play/p/iyBuNbJWKVi?v=goprev
client code:
https://go.dev/play/p/7gPDzt9vrkw?v=goprev
What did you expect to see?
http.ReverseProxy  perform well and has no memory leak.
What did you see instead?
proxy error logs:
2023/08/02 10:37:52 httputil: ReverseProxy read error during body copy: read tcp <IP_ADDRESS>:53946-><IP_ADDRESS>:9090: use of closed network connection

PProf file shows that memory leak in transport:

dlv debug info shows the memory leak is caused by reqCanceler.  1900+ items in the reqCanceller map should be gc  after we stop client, but after a long time, they are still there.

a sample request(proxy -> server) diagram of tcpdump.

Source code and some files for further debug:
transport-memory-leak.zip

Issue https://github.com/golang/go/issues/51354 also claims leaks in reqCanceler under certain conditions
If you get the chance try to reproduce the issue with this patch, I believe this is the fix the author of the other issue suggested:
diff --git a/src/net/http/transport.go b/src/net/http/transport.go
index c07352b018..d30eb79508 100644
--- a/src/net/http/transport.go
+++ b/src/net/http/transport.go
@@ -2248,7 +2248,7 @@ func (pc *persistConn) readLoop() {
 			}
 		case <-rc.req.Cancel:
 			alive = false
-			pc.t.CancelRequest(rc.req)
+			pc.t.cancelRequest(rc.cancelKey, errRequestCanceled)
 		case <-rc.req.Context().Done():
 			alive = false
 			pc.t.cancelRequest(rc.cancelKey, rc.req.Context().Err())

I've created #61724 to fix #51354
The test TestCancelRequestWithBodyWithChannel I added with such change
diff --git a/src/net/http/transport.go b/src/net/http/transport.go
index d30eb79508..fb3f9e168d 100644
--- a/src/net/http/transport.go
+++ b/src/net/http/transport.go
@@ -26,6 +26,7 @@ import (
        "net/textproto"
        "net/url"
        "reflect"
+       "runtime"
        "strings"
        "sync"
        "sync/atomic"
@@ -2248,6 +2249,9 @@ func (pc *persistConn) readLoop() {
                        }
                case <-rc.req.Cancel:
                        alive = false
+                       for _, v := range pc.t.reqCanceler {
+                               fmt.Printf(">> %v\n", runtime.FuncForPC(reflect.ValueOf(v).Pointer()).Name())
+                       }
                        pc.t.cancelRequest(rc.cancelKey, errRequestCanceled)
                case <-rc.req.Context().Done():
                        alive = false

outputs >> net/http.(*persistConn).cancelRequest-fm which matches the description so there are chances it will fix this one as well.

@mauri870 @AlexanderYastrebov Thanks a lot for your great work. I test the solution you mentioned above, but it doesn't work.
The result shows:

Maybe my case is much more complicated. My team members and I read go net http source code, the memory leak could happen in src/net/http/transport.go:2230.
		// Before looping back to the top of this function and peeking on
		// the bufio.Reader, wait for the caller goroutine to finish
		// reading the response body. (or for cancellation or death)
		select {
		case bodyEOF := <-waitForBodyRead:
			replaced := pc.t.replaceReqCanceler(rc.cancelKey, nil) // before pc might return to idle pool
			alive = alive &&
				bodyEOF &&
				!pc.sawEOF &&
				pc.wroteRequest() &&
				replaced && tryPutIdleConn(trace)
			if bodyEOF {
				eofc <- struct{}{}
			}
		case <-rc.req.Cancel:
			alive = false
			pc.t.CancelRequest(rc.req)
		case <-rc.req.Context().Done():
			alive = false
			pc.t.cancelRequest(rc.cancelKey, rc.req.Context().Err())
		case <-pc.closech:  // memroy may leak here. pc closed, rc.cancelKey would never be removed.
			alive = false
		}

there could be a unexpected case： case bodyEOF := <-waitForBodyRead is still blocked(the caller goroutine is reading the response body.)， pconn is closed by somewhere. Thus, rc.cancelKey would never clean.
pc.closech would be set here:  src/net/http/transport.go:2716 which is called by src/net/http/transport.go:2696. There several callers call pc.close, which one could cause the problem?
we guess that in src/net/http/transport.go:2418 calls pc.close(err).  In a rare case(or special timings),  there is a writeErr(http: invalid Read on closed) , the request body not completely send to server, meanwhile the caller goroutine is reading the response body, pc.close(err) is called(could it be possible?).
			pc.writeErrCh <- err // to the body reader, which might recycle us
			wr.ch <- err         // to the roundTrip function
			if err != nil {
				pc.close(err)
				return
			}

In addition，we found a possible solution to solve this memory leak problem, bu we are not sure the impact(would it impact normal request?). Maybe it is safe to remove rc.cancelKey here,  for pconn has already been closed.
		// Before looping back to the top of this function and peeking on
		// the bufio.Reader, wait for the caller goroutine to finish
		// reading the response body. (or for cancellation or death)
		select {
		case bodyEOF := <-waitForBodyRead:
			replaced := pc.t.replaceReqCanceler(rc.cancelKey, nil) // before pc might return to idle pool
			alive = alive &&
				bodyEOF &&
				!pc.sawEOF &&
				pc.wroteRequest() &&
				replaced && tryPutIdleConn(trace)
			if bodyEOF {
				eofc <- struct{}{}
			}
		case <-rc.req.Cancel:
			alive = false
			pc.t.CancelRequest(rc.req)
		case <-rc.req.Context().Done():
			alive = false
			pc.t.cancelRequest(rc.cancelKey, rc.req.Context().Err())
		case <-pc.closech: // memroy may leak here. pc closed, rc.cancelKey would never be removed.
			alive = false
                        pc.t.replaceReqCanceler(rc.cancelKey, nil) // remove rc.cancelKey when pconn has been closed
		}

In out test, this change indeed help to solve the problem,  but it is really ok or is there other better solutions?

I encountered the same issue while writing a forward HTTP proxy. using transport.DisableKeepAlives = true temporarily resolved the memory leak issue.

memory leak of transport may has several cause, you could use gcore  to get core dump file of the process. And use dlv core <app_binary> core. to analyse the memory problem, to find which objects has great numbers and it is unusual.
In this issues(in my case), I have test the DisableKeepAlives:     true, option of http.Transport, the memory still keep growing.

@hzzzzzb

In a rare case(or special timings), there is a writeErr(http: invalid Read on closed) , the request body not completely send to server, meanwhile the caller goroutine is reading the response body, pc.close(err) is called(could it be possible?).

I think you are right.
I've modified your proxy to print reqCanceler
func getUnexportedFieldLen(field reflect.Value) int {
	return reflect.NewAt(field.Type(), unsafe.Pointer(field.UnsafeAddr())).Elem().Len()
}

func countReqCanceler(t *http.Transport) int {
	return getUnexportedFieldLen(reflect.ValueOf(t).Elem().FieldByName("reqCanceler"))
}

...
	reverseProxy.ErrorLog = log.New(io.Discard, "", 0)
	var requests atomic.Int64

	http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
		reverseProxy.ServeHTTP(w, r)

		n := requests.Add(1)
		if n%1000 == 0 {
			fmt.Println("proxy: reqCanceler:", countReqCanceler(t))
		}
	})
...

and the number grows even with #51354 fix but stops growing with
		case <-pc.closech:
			alive = false
			pc.t.cancelRequest(rc.cancelKey, errRequestCanceled)
                        // pc.t.replaceReqCanceler(rc.cancelKey, nil) // or this

I've added a second channel to send close error, it is indeed ErrBodyReadAfterClose, I correlated it to
https://github.com/golang/go/blob/ed8cbaf6ac58120c7171dadaaa091f031712c6d2/src/net/http/transport.go#L2422-L2424
where it calls pc.close
https://github.com/golang/go/blob/ed8cbaf6ac58120c7171dadaaa091f031712c6d2/src/net/http/transport.go#L2444-L2449
I think the problem could be reverseproxy specific due to the way it works similar to #46866
I could not come up with a reproducer test yet that we'd need to make a proper fix.

memory leak of transport may has several cause

Indeed, see e.g. #50798 and #43966

CC @neild @bradfitz

any update on this ?


Upgrade org.apache.maven.plugins:maven-gpg-plugin 3.0.1 -> 3.1.0

This PR contains the following updates:

Package
Type
Update
Change

org.apache.maven.plugins:maven-gpg-plugin
build
minor
3.0.1 -> 3.1.0

[ ] If you want to rebase/retry this PR, check this box

Suggested commit message:
Upgrade maven-gpg-plugin 3.0.1 -> 3.1.0

See https://github.com/apache/maven-gpg-plugin/compare/maven-gpg-plugin-3.0.1...maven-gpg-plugin-3.1.0


ScribusGenerator to recognise filepaths as vars and then trigger import of assets from external resources.

I have successfully used ScribusGenerator (SG/Python 3) on Ubuntu 20.04.
I now want to integrate SG into a workflow where variables are not just short strings or integers but include filepaths to external assets such as long blocks of text which can be imported. I remember reading somewhere about "longtext" but I intend to pull in large blocks of text which cannot go into a csv cell. However filepaths can.
Where do you suggest I break into the SG code to ..

check if a csvData element is a filepath string
read the remote asset
write long text blocks into Scribus document (textframes) as like other SG vars.

Break point to call a helper python script for this import seems to be somewhere after line 142 #generation
...
To explain further.
I aim to keep content production (Atom) separate from layout (Scribus).
Although I can write text directly into textframes using Scribus GUI my plan is to create textblocks externally in Atom editor and write the absolute filepaths to these assets into the csv file. Then SG will be called through command line from Atom through process-palette package.
In other words a toolchain.
[P.S.] I have read this closed issue on SVG import and I offered an idea I might now use for such "non text" imports.

I would personally be wary about automatically turning all filepath-like CSV into loading external assets... as you may want such values to be displayed as text as well in other cases (eg with a user guide)
How about rather establishing a convention on the VAR name that would trigger this behaviour instead?
For instance, with a CSV commun named 'file', %VAR_file% would display the file path, and %VAR_LOAD_file% would parse the file at the given address.
I like this approach more as it seems to not impact the usual generator behaviour for other users.
If that works for your case, then you could have a look at extending the table of substitutions (replacements) computed in 'substituteData': https://github.com/berteh/ScribusGenerator/blob/ScribusGeneratorBackend.py#L491
Detecting the variables with a given keyword (LOAD in my example above), and creating and extra table entry with the variable name and file content... the rest should be automatic unless I miss smthg.
You'd need to handle missing file case (would the path displayed instead for instance?), access rights and maybe some border cases (Scribus errors in using the file content?)... but I see no reason why that would not work.
Good luck!
Kindly update the README accordingly in your choice push

I would personally be wary about automatically turning all filepath-like CSV into loading external assets... as you may want such values to be displayed as text as well in other cases (eg with a user guide)
How about rather establishing a convention on the VAR name that would trigger this behaviour instead?
For instance, with a CSV commun named 'file', %VAR_file% would display the file path, and %VAR_LOAD_file% would parse the file at the given address.
I like this approach more as it seems to not impact the usual generator behaviour for other users.
If that works for your case, then you could have a look at extending the table of substitutions (replacements) computed in 'substituteData': https://github.com/berteh/ScribusGenerator/blob/ScribusGeneratorBackend.py#L491
Detecting the variables with a given keyword (LOAD in my example above), and creating and extra table entry with the variable name and file content... the rest should be automatic unless I miss smthg.
You'd need to handle missing file case (would the path displayed instead for instance?), access rights and maybe some border cases (Scribus errors in using the file content?)... but I see no reason why that would not work.
Good luck!
Kindly update the README accordingly in your choice push

Thank you. The naming convention you propose seems a good plan to add to default VAR behaviour.
I have also read the problems about importing SVG (I added a P.S. to my initial post) and I will now think through how to use SG and UI automation in tandem.

Thank you. The naming convention you propose seems a good plan to add to default VAR behaviour.
I have also read the problems about importing SVG (I added a P.S. to my initial post) and I will now think through how to use SG and UI automation in tandem.

That being said I can't imagine Scribus-compatible long text, as long as you'd imagine, that could not be included in a CSV file, provided proper escaping of line jumps and other brackets... just in case.

That being said I can't imagine Scribus-compatible long text, as long as you'd imagine, that could not be included in a CSV file, provided proper escaping of line jumps and other brackets... just in case.

I have approached this requirement by embedding PHP snippets as variables using SG.
Then in a second pass I use PHP local server to expand the SG embedded PHP snippets.
Credit to carto.net for the original idea. I can expand further if you wish. This seems a good spot to record it. A parallel approach I explored was driving Scribus UI through an automation script.

I have approached this requirement by embedding PHP snippets as variables using SG.
Then in a second pass I use PHP local server to expand the SG embedded PHP snippets.
Credit to carto.net for the original idea. I can expand further if you wish. This seems a good spot to record it. A parallel approach I explored was driving Scribus UI through an automation script.

Glad you found a solution.
Yes indeed I'm interested in more, if you can post an example along with your php script that would be nice. attached files can simply be dropped here (sometimes adding a .txt suffix if the system rejects your extension).
Afterwards we can copy-paste the text to the wiki for  a bit more visibility.

Glad you found a solution.
Yes indeed I'm interested in more, if you can post an example along with your php script that would be nice. attached files can simply be dropped here (sometimes adding a .txt suffix if the system rejects your extension).
Afterwards we can copy-paste the text to the wiki for  a bit more visibility.

My experiments are at an early stage - work in progress - so I will take more time in tweaking.
Meanwhile, I post here the references I followed to arrive at my experimental workflow.
Basically I require to curate various external assets into a Scribus template document - dynamically - and then publish to either PDF or Web - or both.  My external tool is Atom editor which creates the raw assets which Scribus "includes" through PHP script (there is no PHP script to publish).
I have taken some ideas I first read some years ago in carto.net (now archived).
This paper below refers to injecting PHP variables into SVG files - but then I realised that I can apply the same scripting process to SLA files which are also XML like SVG. Or even SVG template imported into SLA.  Dynamic SVG fonts for example using Raphael.js.
https://old.carto.net/papers/svg/samples/mysql_svg_php.shtml
and here ...
https://old.carto.net/papers/svg/samples/serverside_svg_php.shtml
However this is where it becomes quite tricky to follow. Note that my workflow is in Ubuntu 20.04 and Windows/Mac readers will have to adapt.
This archived example will not work in your browser since the archive links (showing dynamic changing of SVG elements on each refresh of browser) are broken .. but observe the blocks of PHP embedded in the code.  These php blocks use the short notation  but I suggest using the longer notation .
Now the second link gives a good explanation.
https://old.carto.net/papers/svg/samples/serverside_svg_php.shtml
Lines 01-06 are the required PHP header and a list of variables to be expanded. In this case SVG attributes width and height.
Lines 08-19 contain SVG source code which use variables $svgwidth and $svgheight.
The final point to note is that the second pass of SLA document requires the document to have extension *.pxml and loaded through PHP local server > view source,
For this, as written in the references, you have to go to /etc/mime.types
Where you see see .svg add the custom mime type .psvg.
Do the same for .xml adding .pxml.
image/svg+xml					svg svgz psvg
application/xml					xml xsd pxml
A PHP header in the document *.xml will be required for each of these types.
The next hack is to go to /etc/apache2/apache2.conf and
AddType application/x-httpd-php .php .phtml .psvg .pxml
The bottom line is that this second stage translation pass allows PHP variables to be expanded in Scribus SLA (document extension first changed from *.sla to *.pxml).
Equally the process can be run on SVG files, either alone or (to be tested) imported into SLA document.
As another refinement I am defining variables as json format and then converting json to csv to be processed by ScrbusGenerator, Using the json method I can introduce long strings such as filepaths for files/assets to be "included".
One point to note is that a PHP header is required at the top of the *.pxml document (aka *.sla). In that header I define all the variables in a block. Then the embedded snippets (placed in textframes in *.pxml) can simply be ..

...
where contents of $chapter01 and $chapter02 are first defined in the PHP header by loading external files..
It is a rather complicated workflow to setup. The aim is to emulate some of the features seen in InDesign. For example I can introduce footnotes in Atom markdown blocks to be reflected into the final document.

My experiments are at an early stage - work in progress - so I will take more time in tweaking.
Meanwhile, I post here the references I followed to arrive at my experimental workflow.
Basically I require to curate various external assets into a Scribus template document - dynamically - and then publish to either PDF or Web - or both.  My external tool is Atom editor which creates the raw assets which Scribus "includes" through PHP script (there is no PHP script to publish).
I have taken some ideas I first read some years ago in carto.net (now archived).
This paper below refers to injecting PHP variables into SVG files - but then I realised that I can apply the same scripting process to SLA files which are also XML like SVG. Or even SVG template imported into SLA.  Dynamic SVG fonts for example using Raphael.js.
https://old.carto.net/papers/svg/samples/mysql_svg_php.shtml
and here ...
https://old.carto.net/papers/svg/samples/serverside_svg_php.shtml
However this is where it becomes quite tricky to follow. Note that my workflow is in Ubuntu 20.04 and Windows/Mac readers will have to adapt.
This archived example will not work in your browser since the archive links (showing dynamic changing of SVG elements on each refresh of browser) are broken .. but observe the blocks of PHP embedded in the code.  These php blocks use the short notation  but I suggest using the longer notation .
Now the second link gives a good explanation.
https://old.carto.net/papers/svg/samples/serverside_svg_php.shtml
Lines 01-06 are the required PHP header and a list of variables to be expanded. In this case SVG attributes width and height.
Lines 08-19 contain SVG source code which use variables $svgwidth and $svgheight.
The final point to note is that the second pass of SLA document requires the document to have extension *.pxml and loaded through PHP local server > view source,
For this, as written in the references, you have to go to /etc/mime.types
Where you see see .svg add the custom mime type .psvg.
Do the same for .xml adding .pxml.
image/svg+xml					svg svgz psvg
application/xml					xml xsd pxml
A PHP header in the document *.xml will be required for each of these types.
The next hack is to go to /etc/apache2/apache2.conf and
AddType application/x-httpd-php .php .phtml .psvg .pxml
The bottom line is that this second stage translation pass allows PHP variables to be expanded in Scribus SLA (document extension first changed from *.sla to *.pxml).
Equally the process can be run on SVG files, either alone or (to be tested) imported into SLA document.
As another refinement I am defining variables as json format and then converting json to csv to be processed by ScrbusGenerator, Using the json method I can introduce long strings such as filepaths for files/assets to be "included".
One point to note is that a PHP header is required at the top of the *.pxml document (aka *.sla). In that header I define all the variables in a block. Then the embedded snippets (placed in textframes in *.pxml) can simply be ..

...
where contents of $chapter01 and $chapter02 are first defined in the PHP header by loading external files..
It is a rather complicated workflow to setup. The aim is to emulate some of the features seen in InDesign. For example I can introduce footnotes in Atom markdown blocks to be reflected into the final document.


preserveCompilationContext causing failed references for runtime compilation

Hi,
I am having some issues performing an upgrade from RC2 and RTM. I have a set of libraries deployed to an internal NuGet feed, they have preserveCompilationContext set to true. This is mostly because we don't have any clear indication as to whether we are supposed to include that in all projects, or just host projects? preserveCompilationContext generates a .deps.json file describing the dependency tree for that library.
Now, in my host MVC application, the MetadataReferenceFeatureProvider is generating metadata references for the Roslyn-based Razor compiler.
So, given an example dependency My.Application.Abstractions, what I am finding, is that for those assemblies that exist in packages, it is trying to load the DependencyContext for each one. Because of the preserveCompilationContext setting in the project.json project file of the source dependency, there is an entry in the .deps.json file:
{
  // .deps.json shorted for brevity
  "libraries": {
    "My.Application.Abstractions/1.0.0-master": {
      "type": "project",
      "serviceable": false,
      "sha512": ""
    }
  }
}

Now, when iterating through the DependencyContext.CompileLibraries property to resolve the reference paths, because the type key is set to project, it means the PackageCacheCompilationAssemblyResolver is skipped (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.DependencyModel/Resolution/PackageCacheCompilationAssemblyResolver.cs#L39) and in the AppBaseCompilationAssemblyResolver (https://github.com/dotnet/cli/blob/rel/1.0.0/src/Microsoft.Extensions.DependencyModel/Resolution/AppBaseCompilationAssemblyResolver.cs#L93) the only directory specified is the application output ./bin/debug/netcoreapp1.0 which doesn't contain the package assembly. Additionally the PackageCompilationAssemblyResolver returns false because the compilation library is of type project. This has a the net result of failing to obtain a reference at all, giving this lovely exception:
Can not find compilation library location for package My.Application.Abstractions'
So I have a couple of questions:

When using preserveCompilationContext in a library, should it be generating project as the type value?
Should we be using preserveCompilationContext at all, what are the exact scenarios this should be used and for what types of projects?
How do I solve my current issue.

It's difficult to try and generate a working example that I can upload, but if I can, I'll update this issue.
I've cross-posted this over at dotnet/CLI (https://github.com/dotnet/cli/issues/4047) as I am unsure as to where this belongs.
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64

/cc @pranavkm

The preserveCompilationContext option is used to when your app needs to do runtime compilation, and therefor needs to know what to compile against. This option is not needed at all for libraries.
Can you share with us your solution so that we can take a look at what you are trying to do?

When using preserveCompilationContext in a library, should it be generating project as the type value?
Most likely not. Seems like a bug and https://github.com/dotnet/cli/issues/4047 could be used to address this.

Should we be using preserveCompilationContext at all, what are the exact scenarios this should be used and for what types of projects?
preserveCompilationContext has two purposes -

It's used to detect what libraries reference Mvc. By default, we specifically look for Mvc specific types, such as Controllers and ViewComponents, in these libraries.
It's used to detect the closure of libraries used to compile the application assembly. This is used to compile views.

In the most common cases, you shouldn't be using preserveCompilationContext in class libraries, just the main application. There might be scenarios around runtime loaded assemblies that require this flag, but it shouldn't be entirely common.

How do I solve my current issue.
Does removing preserveCompilationContext help?

@danroth27  @pranavkm
Thanks for your feedback. It's now clear to me the use cases for preserveCompilationContext and removing it corrects my issue.
I'm using DependencyContext in a similar way to MVC, but instead of locating application parts I am using it to locate modules.
Perhaps the project type flag should be driven by the presence of emitEntryPoint in the build options?

Perhaps. The alternative might be for DependencyContext to fallback to packages when type is project.


Add historian

A microservice that continuously generates hashes, only stopping to
tag messages with the latest hash.
Fixes #8

Codecov Report

Merging #9 into master will decrease coverage by 6.76%.
The diff coverage is 91.17%.

@@            Coverage Diff             @@
##           master       #9      +/-   ##
==========================================
- Coverage     100%   93.23%   -6.77%
==========================================
  Files           2        3       +1
  Lines          61      133      +72
==========================================
+ Hits           61      124      +63
- Misses          0        9       +9

Impacted Files
Coverage Δ

src/lib.rs
100% <ø> (ø)
:arrow_up:

src/event.rs
93.93% <50%> (-6.07%)
:arrow_down:

src/historian.rs
92.42% <92.42%> (ø)

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 3550f70...831e2cb. Read the comment docs.


Do you accept PRs?

I downloaded this repo and compiled the project on raspberry pi. :smile: Dude, it's awesome!
I fixed few things:

make the vertical move speed lower (because of the terminal font size) which means that the user will have the impression it's the same speed
make the init speed lower (100000) -- if you don't agree I will not submit it. I needed this change because of fps values of my lcd screen. :tv:

Nice project! :dizzy:

This particular project is fairly abandoned, but I'll happily accept any PR's if they make sense and make the experience a little better. The changes you have suggested are fair and I would most likely accept them.
Sorry for the slow reply.

@Tiehuis Stable doesn't mean abandoned. :smile: Glad you merged my little changes. It shows to the world that this project is still maintained. :dizzy:


Parallel filter

Change the filter to be parallel verb in chunks

This looks great - can you update the pyproject.toml file with a new version and cut a release with this?


fix(release-automation): add node info to long-running cluster alerts

Description
With multiple long-running clusters in parallel, for alerts on PagerDuty it is not always clear which cluster they origin from.
This PR aims to improve this by adding cluster information to the alert.
Labels added based on https://prometheus.io/docs/prometheus/latest/configuration/configuration/#pod information.
Checklist

[ ] Investigated and inspected CI test results
~- [ ] Unit test and regression tests added~
~- [ ] Evaluated and added CHANGELOG entry if required~
~- [ ] Determined and documented upgrade steps~
~- [ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)~

If any of these don't apply, please comment below.
Testing Performed
Created a test cluster, triggered alert with a crashlooping pod:

Node name visible as one of the alert labels.

/retest


import collection from  postman lose name

I have checked the following:

[X] I use the newest version of bruno.
[X] I've searched existing issues and found nothing related to my issue.

Describe the bug
import collection from  postman, name is replaced by "--------------------"
.bru file to reproduce the bug
No response
Screenshots/Live demo link
sorry i can not upload img

Hey @962163445 can you please share an example .bru file that causes this issue?


x/vgo: go.mod: For git, date in pseudo-version should be AuthorDate instead of CommitDate

Mainly because git log, by default, shows only the AuthorDate. This is so that it will be easier for a human to verify that the date specified in go.mod matches the date shown in plain git log, barring timezone differences. Otherwise you have to run git log with --format=fuller in order to show CommitDate so that you can tally it with the one in go.mod.
$ cat go.mod
module "rsc.io/sampler"

require "golang.org/x/text" v0.0.0-20170915032832-14c0d48ead0c

See how the date shown below could seem to not match what is recorded in go.mod (superficially the time looks different, which could raise an eyebrow or two):
$ cd $GOPATH/src/golang.org/x/text
$ git log -1 --date=iso 14c0d48ead0c
commit 14c0d48ead0cd47e3104ada247d91be04afc7a5a
Author: namusyaka<EMAIL_ADDRESS>Date:   2017-09-15 10:46:53 +0900

    docs: fix article typos

    a -> an

    Change-Id: Ia55603f09303598a1b0051606e83f018b3525c24
    Reviewed-on: https://go-review.googlesource.com/63993
    Reviewed-by: Ian Lance Taylor<EMAIL_ADDRESS>
You'd have know that git commit has two associated dates (author date and commit date) in order to not be confused by the date specified in go.mod:
$ git log -1 --format=fuller --date=iso 14c0d48ead0c
commit 14c0d48ead0cd47e3104ada247d91be04afc7a5a
Author:     namusyaka<EMAIL_ADDRESS>AuthorDate: 2017-09-15 10:46:53 +0900
Commit:     Ian Lance Taylor<EMAIL_ADDRESS>CommitDate: 2017-09-15 03:28:32 +0000

    docs: fix article typos

    a -> an

    Change-Id: Ia55603f09303598a1b0051606e83f018b3525c24
    Reviewed-on: https://go-review.googlesource.com/63993
    Reviewed-by: Ian Lance Taylor<EMAIL_ADDRESS>

Including the date in a version makes it easier to understand if one version is newer than another (especially for untagged commits). Using the AuthorDate would remove this important property.
The commit ID a much better way to identify the commit in use.

The commit date is the date it landed in the public repo. That's the last time it was revised, which is what matters for approximate ordering. The date it was first written is much less relevant.


Improved Serach bar UI

Describe the bug
There was no search button and enhanced look in #14
Fix

Added CSS and button

Hello, I would love for you to describe the improvements you want to add to the component. Could you share some images of the changes you've made, before and after? Thanks!


[17.06.1] CLI reference docs cherry-picks (and 1 completion fix)

cherry-picks of;

https://github.com/docker/cli/pull/223 https://github.com/docker/cli/commit/e4c70d390de72bfa9bbb6d016a47a08141295bf3 ("Update the cp command docs to include archive")
https://github.com/docker/cli/pull/308 https://github.com/docker/cli/commit/4f3a8aecad56cf27191004b40aa2cd6a42fc9ce6 ("Fix typo (proceed -> precede)")
https://github.com/docker/cli/pull/314 https://github.com/docker/cli/commit/8639c9baf8252ccdcfb3360e0d5568c01a3942ce ("docs: add filter scope for command events and more cluster events")
https://github.com/docker/cli/pull/331 https://github.com/docker/cli/commit/bd64ad25fb73aeff9a51ad7168904253569447c0 ("Fix filters displaying for docker search")
https://github.com/docker/cli/pull/333 https://github.com/docker/cli/commit/2880030814986e71010b573899b1f986e5be8405, https://github.com/docker/cli/commit/ad5d0359886a09196e6070aa9a2aa1acd5834f55 ("Improve docs about ARG in FROM")
https://github.com/docker/cli/pull/338 https://github.com/docker/cli/commit/5cc7ac29901f5ca08ca089d2e8ff1b8858c75470("Service privileges: CLI reference docs & completion")
https://github.com/docker/cli/pull/375 https://github.com/docker/cli/commit/f5bca7af10b378453376ebf7428de1c3c064547b

ping @mstanleyjones @tiborvass

LGTM ping @mstanleyjones


fix typo in uploader.php

init.php sets up different variables than the one used in here. ( 'IMG_' is missing )

Thanks!


One PO per MARC file w/ updated field mappings

resolves #5
resolves #9
resolves #17
This PR resolves the above three issues.  A separate PR will be created to address questions regarding duplication of currency (it is still hardcoded to USD) and whether the selector field should be a concatenation of the email address and person name.

I don't know  the status of this PR is now.  The quantityNo typo has been fixed.

Sorry @fereira there was some question about where the notes were ending up. I'll review where I left off on that and post a comment.


(BKR-414) install_pe_on assumes hosts will be an array

ensure that we only confine to an array of hosts

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/1179/
Test FAILed.

retest this please

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/1185/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/1190/
Test FAILed.

Failure unrelated to patch.

retest this please

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/1213/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
http://jenkins-beaker.delivery.puppetlabs.net//job/qe_beaker_btc-intn/1217/
Test FAILed.


[Feature/extensions] Read from extensions.yml

Description
Adds method and structure to read from extensions.yml file
Issues Resolved
3084
Check List

[ X] New functionality includes testing.

[X ] All tests pass

[ X] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

-----------
* What went wrong:
Execution failed for task ':plugins:repository-azure:yamlRestTest'.
> There were failing tests. See the report at: file:///var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/plugins/repository-azure/build/reports/tests/yamlRestTest/index.html

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':server:test'.
> There were failing tests. See the report at: file:///var/CITOOL/workflow/OpenSearch_CI/PR_Checks/Gradle_Check/search/server/build/reports/tests/test/index.html

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================

Server tests are expected to fail due to #2772
But plugin tests are failing too, could you take a look.


[staging] "^" button not working at click in Configure Download dialog

Steps to Reproduce

Click on "Download..." button in Single Run page
Click on '⌄' button in "Download all run data via our API" section

Actual Results
Button is not responsive
Expected Results
Section should close or open accordingly. See designs here:  https://www.figma.com/file/AELEVptBVyqp0vvFrzgfK6/4---Single-Run?type=design&node-id=32-27920&mode=design&t=gkw21C24JTsEOTlK-0
Evidence
https://github.com/chanzuckerberg/cryoet-data-portal/assets/63799148/8d23a82b-081f-44ce-9456-e7fbbb11fa45

@codemonkey800 to add points once you look into the SDS component

This defect is no longer relevant with the new download modal


Proper TypeScript definitions

Fixes https://github.com/23/resumable.js/issues/262.

Wonderful -- thanks for pushing!


App to send data from one phone to NFC device

Hi,
I'd need to create an app to use NFC to receive and send data to a device.
I want to detect the device, read its ID , do a process in the app, and send a OK message to that device. Can I do it with this package with a flutter app?
please let me know
thanks so much for your help

@mavbcn
I don't know exactly what you want to do.
Please consider referring to API reference or StackOverflow for issues such as "How to"

Hi @mavbcn , did you found any solution? My requirement is similar to you.


Allow to positively confirm the presence or absence of all Eco-Score labels

Problem

[ ] Create a label input screen for the Eco-Score with an option to mention that the user has checked the presence or absence of all of the Eco-Score labels. This will require a server upgrade.
[ ] Blocked on https://github.com/openfoodfacts/openfoodfacts-server/issues/7612

Mockups

[ ]

Part of

#1379
#518
Product edition

If I understand, the goal is to add an extra screen to ask if a label is on the package?

But I would suggest not to rush any feature, and think more about how it fits in the overall product data entry. e.g. we could just ask people to add photos of all logos, and then have robotoff detect them instead.

@stephanegigandet That wouldn't be too hard to develop as we've already added a similar "add other pics" to the "origins" edit widget in #4863.
Could do the same for "labels".

The broader solution would be to revive the Taxonomy Picker from Greg.
https://github.com/openfoodfacts/smooth-app/pull/565

If I remember well:

the "labels" taxonomy is full of highly improbable items like "Best AAAAA andouillette 2014"
the taxonomy picker is not at all user-friendly, given that the hierarchies are not always self-explanatory and that we potentially need to display several branches at the same time


refactoring test suite

refactored auth tests

Is this for issue #270 ?
This looks like a good start!

I think it might actually be for #82, but I agree, it's a great start. I'd like to see this get over the finish line. Let me know if you need any help @rooshs481


non-sotck items not included

once published. The analysis does not calculate the entire project cost/margin if there are non-stock items in the project.

We had limitation in earlier versions where non-stock items with Cost Accrual were considered for pricing analysis. With 2023 R2, we are including all non-stock items.


[Expo 48] Plugin causes iOS build issues in combination with pushNotification

Issue:
After I upgraded to Expo SDK 48, I receive an build issue on iOS.
Without the plugin option pushNotification: {} for iOS the build is working.
❌  (/Users/reichhartd/workspace/***/ios/***/AppDelegate.mm:34:42)

  32 |
  33 |   // Register for push notifications
> 34 |   [pnHandlerObj registerPushNotification:self];
     |                                          ^ cannot initialize a parameter of type 'id<UNUserNotificationCenterDelegate> _Nonnull' with an lvalue of type 'AppDelegate *const __strong'
  35 |
  36 | }
  37 |

Steps to reproduce:

Create a new expo app npx create-expo-app my-app
Follow the plugin installation steps
Set the following plugin config:

            [
                "customerio-expo-plugin",
                {
                    "android": {},
                    "ios": {
                        "pushNotification": {}
                    }
                }
            ]

Run the expo prebuild command
Run an iOS build

My plugin config:
        [
            'customerio-expo-plugin',
            {
                android: {
                    googleServicesFilePath: './assets/google-services-stage.json',
                },
                ios: {
                    pushNotification: {
                        useFrameworks: 'static',
                        useRichPush: false,
                    },
                },
            },
        ],

My environment:
  expo-env-info 1.0.5 environment info:
    System:
      OS: macOS 13.2.1
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 18.14.2 - /opt/homebrew/opt/node@18/bin/node
      Yarn: 1.22.19 - /opt/homebrew/bin/yarn
      npm: 9.5.0 - /opt/homebrew/opt/node@18/bin/npm
    Managers:
      CocoaPods: 1.11.3 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
      Android SDK:
        API Levels: 31, 32, 33
        Build Tools: 30.0.3, 31.0.0, 32.0.0, 33.0.0
        System Images: android-33 | Android TV ARM 64 v8a, android-33 | Android TV Intel x86 Atom, android-33 | Google TV ARM 64 v8a, android-33 | Google TV Intel x86 Atom, android-33 | Google APIs ARM 64 v8a, android-33 | Google APIs Intel x86 Atom_64, android-33 | Google Play ARM 64 v8a, android-33 | Google Play Intel x86 Atom_64
    IDEs:
      Android Studio: Electric Eel 2022.1.1 Patch 1 Electric Eel 2022.1.1 Patch 1
      Xcode: 14.2/14C18 - /usr/bin/xcodebuild
    npmPackages:
      expo: ~48.0.5 => 48.0.5
      react: 18.2.0 => 18.2.0
      react-native: 0.71.3 => 0.71.3
    npmGlobalPackages:
      eas-cli: 3.5.2
      expo-cli: 6.3.0
    Expo Workflow: bare

        [
            'expo-build-properties',
            {
                ios: {
                    useFrameworks: 'static',
                },
                android: {
                    enableProguardInReleaseBuilds: true,
                    extraProguardRules: '-keep public class com.horcrux.svg.** {*;}',
                },
            },
        ],

Hi @reichhartd
Thanks for bringing this to our attention; we are working on Expo 48 support, but currently, we support 45 and 46 ( unofficially 47)
I followed your reproduction steps and got the error. To unblock you, try setting disableNotificationRegistration to true
        [
            'customerio-expo-plugin',
            {
                android: {
                    googleServicesFilePath: './assets/google-services-stage.json',
                },
                ios: {
                   disableNotificationRegistration: true,
                    pushNotification: {
                        useFrameworks: 'static',
                        useRichPush: false,
                    },
                },
            },
        ],

This would disable notification registration, and you would need to use expo-notifications to request permissions only, and our SDK to handle the notifications.
We are working on ironing out these kinks and give a smooth experience soon.

Do you have an ETA on this "smooth" experience ?


Files with no ses entity in a ses folder not indexed when relying on schema

sub-01/ses-01/anat/sub-01_t1w.nii
Should be indexed when not relying on schema but it does not seem to be.

I would say that they shouldn't be indexed -- BIDS impose sub-123_ses-456 for files with session. This is not related to a schema of a given modality.

BIDS impose sub-123_ses-456 for files with session.

yes but the way bids-layout behaves when not relying on the schema is to ignore these rules and just parse index files as long as their filenames follow the pattern
entity-label[_entity-label]*_suffix.extension

without query about the nature or the order of the entities.


What is the relationship between a service bus namespace resource and a relay resource?

What is the relationship between a service bus namespace resource and a relay resource?

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

ID: 56e4bcb2-e585-af85-8abd-0bc37b2b7992
Version Independent ID: 1ce8abec-50fc-cd5b-2853-7ba2dbd01149
Content: How to create a Service Bus namespace in the Azure portal - Azure Service Bus
Content Source: articles/service-bus-messaging/service-bus-create-namespace-portal.md
Service: service-bus-messaging
GitHub Login: @spelluru
Microsoft Alias: spelluru

Hello @v-kydela,
Thank you for your feedback! We will review and update as appropriate.

In a Service Bus namespace, you can create queues and topics/subscriptions. Please see quick starts in the Service Bus documentation. For example: https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quickstart-portal.
In a Relay namespace, you can create WCF relays and hybrid connections. Please see the tutorial for an example.

Thank you @spelluru, for the response.
@v-kydela, we will now proceed to close this issue out. Please tag me in your response if there are any additional concerns. Thank you!


python3.pkgs.nbclient: always disable tests, fixes #171493

Overriding a Python package in propagatedBuildInputs is a bad idea as
you may end up with multiple versions in your closure. This happened,
and when installing to $out the package for which the tests were run,
the site packages folder was empty.
Possible improvement is to add the tests as a separate derivation.
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[ ] Fits CONTRIBUTING.md.

I would normally prefer to just disable the failing test that requires nbconvert

You would need to disable the entire file because the import will fail.

it sounds like you have a more permanent fix in the works already?

https://github.com/NixOS/nixpkgs/pull/171573/files#diff-f7dcb3d342bcf7ef08c6084830b7b0301bb726c51d3303d53ee5b4e6cd8766cd

You would need to disable the entire file because the import will fail.

Yes, that's what I meant. Presumably there are other test files though?


Add session state when impersonating tenant

Closes #548
Problem
When impersonating a tenant, there is no indication of whether we are impersonating. A common use case shows a banner saying "Impersonating" and a button to stop/leave impersonation.
Solution
This PR adds the session key tenancy_impersonation when impersonating a tenant. Now this session key can be used to show banner etc. There are also new methods added.

isImpersonating() to check if the tenant is being impersonated
leave() to leave impersonation. It logout the user and remove the session impersonation state. You need to handle redirection here, leave() doesn't enforce any redirection.

Usage
Setup Impersonation same as you do in V3. You can use the impersonation state as follows:
// TRUE if you are impersonating.
UserImpersonation::isImpersonating();

// Logout from the current domain and forget impersonation session.
UserImpersonation::leave();

You need to handle redirection when leaving impersonation. Something like this in tenant routes:
Route::get('impersonantion/leave', function() {
  UserImpersonantion::leave();

  return redirect()->to(config('app.url') . '/dashboard') // redirect to central domain dashboard.
})

Important points you should know about the Impersonation feature in this package.

When using domain/subdomain identification, the central or admin user auth session will be preserved because each tenant has a different domain. I'm simple words, You can have two tabs side by side one with an admin logged-in user and one with tenant impersonation.
When using path/request data identification, the central or admin user auth session will be destroyed because it's on the same domain. In simple words, the admin will be logged out because we are starting another auth session on the same domain.
Setting the SESSION_DOMAIN env var can change the behavior of this feature, e.g., sharing sessions with subdomains will destroy auth sessions from other domains.

Working when using domain/subdomain
https://user-images.githubusercontent.com/54532330/207320271-65501f21-751d-4b8c-b5dd-d8cdb744f653.mov
Working when using path identification
https://user-images.githubusercontent.com/54532330/207322104-656cd932-ad90-419d-a6e7-c3c36d7c2817.mov

Codecov Report

Merging #1029 (f507483) into master (7d3298c) will increase coverage by 0.65%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master    #1029      +/-   ##
============================================
+ Coverage     88.02%   88.67%   +0.65%
- Complexity      534      536       +2
============================================
  Files           132      132
  Lines          1478     1687     +209
============================================
+ Hits           1301     1496     +195
- Misses          177      191      +14

Impacted Files
Coverage Δ

src/Features/UserImpersonation.php
100.00% <100.00%> (ø)

.../Contracts/TenantCouldNotBeIdentifiedException.php
56.25% <0.00%> (-12.99%)
:arrow_down:

src/Resolvers/RequestDataTenantResolver.php
44.44% <0.00%> (-12.70%)
:arrow_down:

src/Resolvers/PathTenantResolver.php
71.42% <0.00%> (-11.91%)
:arrow_down:

src/helpers.php
62.96% <0.00%> (-5.04%)
:arrow_down:

src/Commands/Up.php
100.00% <0.00%> (ø)

src/Commands/Run.php
100.00% <0.00%> (ø)

src/Commands/Down.php
100.00% <0.00%> (ø)

src/Jobs/SeedDatabase.php
100.00% <0.00%> (ø)

src/Jobs/CreateDatabase.php
100.00% <0.00%> (ø)

... and 61 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@stancl Related PR and issue should be closed.
https://github.com/archtechx/tenancy/issues/548
https://github.com/archtechx/tenancy/pull/917


ci: downstream check for native image tests

For reference: https://github.com/googleapis/gax-java/pull/1681

@meltsufin there may be a couple more changes needed. I realized that the graal checks are passing but skipping the native compilation step which is usually represented by the following output:
Executing: /opt/hostedtoolcache/GraalVM/java11-linux-amd64-21.3.2/x64/bin/native-image @/tmp/native-image4009276204974001490args org.graalvm.junit.platform.NativeImageJUnitLauncher
Warning: Ignoring server-mode native-image argument --no-server.
[native-tests:4109]    classlist:  11,413.77 ms,  1.69 GB
[native-tests:4109]        (cap):     874.27 ms,  1.69 GB

Downstream native image checks are running as expected:


Switching from String to anyhow::Error for error type in multi-test

Closes #361

Looks good, please merge once you rename to AnyResult. The other comments are just me understanding anyhow

Looks good, please merge once you rename to AnyResult. The other comments are just me understanding anyhow

I think that could be a good idea for now, but once we migrate all of cw-plus, and perhaps, all of cosmwasm to anyhow, that wouldn't be necessary anymore.

I think that could be a good idea for now, but once we migrate all of cw-plus, and perhaps, all of cosmwasm to anyhow, that wouldn't be necessary anymore.

We do not want that. We have clear type info and only turn to String on the wasm boundary (where anyhow would not work)

I agree with @ethanfrey. anyhow is not substitution of thiserror, it is it complement for cases where type erased error are needed. Rule of thumb is - make your errors strongly typed in your libraries so one can handle it when needed, and make your errors type erased for binaries, as if you don't handle them immediately, you would probably just log them. Testing framework is somewhere in between, but the most issues with erased errors are not applicable here - runtime overhead is not an issue with test, and if error type doesn't match expected (when downcasting), you basically don't care and fail (unwrapping).

This looks good, agree with the design.
Just the AnyError rename and please merge.
Happy if you open a new issue (for the v0.9.0 milestone) about cleaning up the bounds in contracts.rs. We now use these tests enough places that if it breaks something, the CI will complain, so it is safer to clean up and simplify.

Sure, later today (at evening).


upload 3.0.0 to conda

I don't know if you are the guys but could you upload to the newest 3.0.0 python not only to pip but also to conda.
Thanks!

I thought this was going to be done yesterday. Hopefully it's there tomorrow :-)

Still not available via conda.
Would you consider uploading a copy locally to install via
conda install -c spyder-ide spyder==3.0.0
or similar?

it is available. BUT you have to install
conda install qt=5.*
manually and see what are the conflicts that you get.
I got conflict with the previous spyder (which is them conda remove spyder) and another useless library

When trying to install Qt 5.x, I got the following message:

conda install qt=5.*
UnsatisfiableError: The following specifications were found to be in conflict:

anaconda-navigator -> pyqt 4.*
qt 5.*

Uninstalling anaconda-navigator allowed me to install Qt 5.x (I hope other things don't break).

They have fixed it. now anaconda-navigator can be updated as well

What is the proper way to proceed after you get:
conda install qt=5.*
Fetching package metadata .......
Solving package specifications: ....
UnsatisfiableError: The following specifications were found to be in conflict:
  - qt 5.*
Use "conda info <package>" to see the dependencies for each package.

Do I have to remove qt4? It's a dependency for a lot of other packages.

Try running the command again today. anaconda-navigator with Qt 5.x support was just released. Otherwise, try:
conda remove anaconda-navigator
conda update qt pyqt
conda install spyder
conda install anaconda-navigator

I actually didn't have anaconda-navigator installed. I had to do
conda remove qt
conda install qt=5.*

then reinstall everything that depended on qt (including spyder). But everything worked out.

the idea of uninstalling qt v4, and then reinstalling worked for me, too.

This is fixed now.


x/pkgsite: reflect.Kind-type constants do not appear in Constants section of reflect docs

(Note -- the more I think about this, the more I think that it might actually be an issue with the source code for the reflect package not being correctly commented, so the doc parser is failing. However, I noticed the issue on the website, so I figured I'd log it as a site issue.)
What is the URL of the page with the issue?
https://pkg.go.dev/reflect#pkg-index
What is your user agent?
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
What did you do?
I was looking at the encoding/json/decode.go source code here: https://cs.opensource.google/go/go/+/refs/tags/go1.17.1:src/encoding/json/decode.go;l=164;drc=refs%2Ftags%2Fgo1.17.1
I noticed that reflect.Ptr is struck out, which I assume means deprecated.

This seemed weird to me, because it's in the standard library, calling another standard library package. I clicked on the reflect.Ptr link, which took me here: https://cs.opensource.google/go/go/+/refs/tags/go1.17.1:src/reflect/type.go;drc=refs%2Ftags%2Fgo1.17.1;l=274

This was unhelpful to me, so I went to pkg.go.dev to try to find what reflect.Ptr is, and why it might be crossed out. I could not find it listed in the index for the reflect package, and the "Constants" section of the documentation was empty.

I used my browser's Find functionality to look for it, and it turned out that it, along with a huge list of reflect.Kind constants, was buried in the documentation for the reflect.Kind type.

What did you expect to see?
Since reflect.Ptr is a constant, I would have expected to see it in the "Constants" section.
By way of example, the os.Stdin constant appears in the "Constants" section of that page:
<EMAIL_ADDRESS>What did you see instead?

The reflect.Kind constants were listed with the documentation for reflect.Kind. This really does not help someone who is trying to understand what those types are -- if I had known that reflect.Ptr was a reflect.Kind, then I probably would not have had to look it up, because that's exactly the question I was trying to answer.
It was confusing to me that reflect.Ptr did not show up in either the "Constants" section or the "Index" section.
Having to use my browser's Find functionality was inconvenient.

Postmortem / bonus weirdness
I later discovered that reflect.Ptr is deprecated in favor of reflect.Pointer on the master branch as of right now, so that explains why reflect.Ptr would be crossed out... except that I was specifically looking at the 1.17.1 code, NOT the master code. This seems to suggest that there's also an issue with the code introspection functionality available in the code browser -- the deprecation information and link to the definition of reflect.Ptr were targeting master, but I was looking at 1.17.1. In the screenshot below, you can see that reflect.Ptr is actually deprecated, and does exist on line 274 (like in the previous screenshot) -- but on the master branch, not for Go 1.17.1.
https://cs.opensource.google/go/go/+/master:src/reflect/type.go;l=274?q=Kind&ss=go%2Fgo

I think this is a consequence of the way the go/doc package works: it groups constants with their type if the type is defined in the package, and other constants in the "Constants" section (which explains os.Stdin). I don't think there's anything pkgsite can do to "fix" that, if indeed it should be fixed.
On the bright side, pkgsite's new symbol search feature finds it: https://beta.pkg.go.dev/search?q=%23Ptr+reflect.

Thanks for looking into this! I still find the behavior to be pretty inaccessible, especially putting myself in the shoes of a newcomer, but I agree that it's out of your scope if all you're doing is parsing output of another tool.


Remove Sabre's manual insertion-order iteration and unnecessary sorts

Summary
The manual insertion-order tracking was initially added in 02a1939 (gh-9012) during a complete rewrite of the scoring algorithms for Sabre to demonstrate that the new algorithm could be made fully RNG compatible.  It maintained the identical iteration order to the previous iteration once the front-layer data structure was swapped from being a raw list to hash-based.
The new data structure doesn't require the manual tracking to be reproducible as long as the iteration order is independent of the hash seed.  This swaps the relevant places over the IndexMap to be able to remove a lot of the manual tracking.  In casual testing, this didn't appear to have much effect on performance, but the resulting code is much simpler.
The sorts (and deliberate canonicalisation of the swaps) was necessary to match RNG compatibility in the pre-relative-score Sabre, but since the swaps are now iterated through in a deterministic order and guaranteed to be generated only once each (the previous version used a hashset to remove duplicates), neither step is necessary.
For a QV circuit of depth 5 at 1081 qubits on heavy hex, this is worth almost a 2x speedup in routing performance.

Details and comments
I've still got some fun ideas for improving the handling of the extended set by a more data-structure-explicit segregation into layers within it.  I don't know at what point we should stop calling this "Sabre", because with all the changes we've made to the algorithm, the router only really bears a passing resemblance to the original paper.

Oops, I forgot to sort out the testing changes because of the new RNG patterns.  Not sure what's going on with the gate-direction stuff, but I suspect it's related to a swap [x, y] no longer being strictly ordered to have x < y in the output.

254fc51 fixes the RNG-related tests.  The remaining ones could be fixed by changing the CouplingMaps in those tests to be bi-directional, but I think more properly the fix is #9561, which correctly registers swap as a symmetric gate in the GateDirection transpiler pass.
This PR now depends on #9561.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

8 of 8 (100.0%)  changed or added relevant lines in 2 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.008%) to 85.265%

Files with Coverage Reduction
New Missed Lines
%

src/sabre_swap/layer.rs
2
97.32%

Totals

Change from base Build<PHONE_NUMBER>:
-0.008%

Covered Lines:
67145

Relevant Lines:
78749

💛  - Coveralls

I don't know at what point we should stop calling this "Sabre", because with all the changes we've made to the algorithm, the router only really bears a passing resemblance to the original paper.

Since you've made it so much more efficient, maybe it should be called Lightsabre?

Test non-determinism is fixed by #9568, but I'll need a new commit after that merges to update the chosen fixed layout in the currently flaky test to whatever that PR causes it to settle on.


Fix version command

Fixing broken version command

Codecov Report

Merging #5 (ae540b5) into main (ba1b21b) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #5   +/-   ##
=======================================
  Coverage   75.60%   75.60%
=======================================
  Files           1        1
  Lines          82       82
=======================================
  Hits           62       62
  Misses         16       16
  Partials        4        4

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 ba1b21b...ae540b5. Read the comment docs.


Build Deformable Convolution cd mm_modules/DCN python setup.py build install

Hello, when I set up a compilation environment for LITv2, I followed your steps and ran python setup.py build install. I encountered an error that there is no cuda, but there is CUDA in the environment. How to solve this?

Hi @renqi1998, it seems like your python environment cannot find the path to CUDA. E.g. CUDA_HOME in your system-level configuration. You can check your CUDA installation by using nvcc -V in your terminal. Please make sure you have successfully installed cuda in your operating system.

Thank you, I used this statement “python3 setup.py install” to compile successfully