feat: Replace the local-exec script with a http datasource for waiting cluster

PR o'clock
Description
In this PR we drop the usage of local-exec. But we need https://github.com/hashicorp/terraform-provider-http/pull/29.
We decided to fork the terraform-provider-http provider (the PR is almost a year) into the terraform-aws-modules organization for internal usage only. The provider is published at https://registry.terraform.io/providers/terraform-aws-modules/http/latest
Related also to https://github.com/terraform-aws-modules/terraform-aws-eks/pull/1253
Test
This is still a proof of concept. I tested it locally and so far so good.

It took 2m32s for module.eks.data.http.wait_for_cluster[0] to clomplete.
Todo

[x] Add terraform-aws-module/terraform-prodiver-http in examples
[x] Document why we fork the http provider
[x] Publish provider into terraform registry

@shoekstra @daroga0002 can you please help me to test this ?

Maybe @xavfernandez could help to review and test this ?

@barryib yes that's what I mean. Although in the context of the module it's the control plane not the cluster that's ready which is why I suggested the output name be changed.

@barryib yes that's what I mean. Although in the context of the module it's the control plane not the cluster that's ready which is why I suggested the output name be changed.

Normally when you use cluster_id or kubeconfig outputs, you don't need bother yourself with another control_plane_ready because those outputs depend already on data.http.wait_for_cluster.

@barryib we don't use the kubeconfig output and prefer to use aws_eks_cluster_auth to get a token. We need to know when the control plane is ready as we need to remove config (due to https://github.com/aws/containers-roadmap/issues/923 not being completed yet) before the workers are started. We were using curl and now have a beta version of our internal implementation using your http datasource. An output would be a tidier implementation.

I guess we could use cluster_id to achieve this.

This now shipped in v16.0.0

@barryib the Forked http module does not have a darwin_arm64 release, I can't use this module on my M1 MacBook, I've created a PR to build releases with Go 1.16.  Please take a look https://github.com/terraform-aws-modules/terraform-provider-http/pull/5

I was using the wait for cluster cmd for Windows compatibility. Now that the variable is removed I cannot finish my terraform with the new http module. Upon removing the wait for cluster command in favor of the new method.

I was using the wait for cluster cmd for Windows compatibility. Now that the variable is removed I cannot finish my terraform with the new http module. Upon removing the wait for cluster command in favor of the new method.

I have the same problem.


Feat/query body parsing

Implements #34
Let me know what you think of the API for disabling. Tried to keep to vandium's styling.
Let me know as well if more testing is needed!

Merging by hand


Problem with string type resolution from callback functions

declare type LibertasFd = number;
declare type LibertasNetDataCallback = (tag: any, fd: LibertasFd, data: string, addr?: string) => void;
declare function Libertas_SetOnNetData(fd: LibertasFd, func: LibertasNetDataCallback, tag?: any): void;

    Libertas_SetOnNetData(socket, (tag, fd, data)=>{
        const c = data.charCodeAt(0);
        for (let i=0; i<data.length; i++) {
            onIncoming(data.charCodeAt(i));
        }
    });

The Lua translation is not correct. Both literal and non-literal calls are translated as plain "charCodeAt" call.
    Libertas_SetOnNetData(
        socket,
        function(tag, fd, data)
            local c = data:charCodeAt(0)
            do
                local i = 0
                while i < #data do
                    onIncoming(data:charCodeAt(i))
                    i = i + 1
                end
            end
        end
    )

Revert to version 1.4.3 works as expected.
    Libertas_SetOnNetData(
        socket,
        function(tag, fd, data)
            local c = string.byte(data, 1) or 0 / 0
            do
                local i = 0
                while i < #data do
                    onIncoming(__TS__StringCharCodeAt(data, i))
                    i = i + 1
                end
            end
        end
    )

Version 1.6.0 works. This bug was introduced in 1.6.1.

I was wrong. Version 1.6.0 does not work. Only 1.4.3 works! Sorry.

Thanks a lot for your help. I found out the reason. I did not update standard libraries in monaco.ts.


Use custom dispatcher for Array.prototype routines

Binary size reduction:

Intel: ~2.5KB (gcc-7.3)
Arm: ~1.2KB (arm-linux-gnueabi-gcc-7.3)

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik<EMAIL_ADDRESS>

@rerobika I don't see how is this PR related to #2640. Could you explain it to me?

@LaszloLango #2640 Adds 4 new Array.prototype routines here, but currently it uses the general dispatcher. If it lands, this patch must be updated with these 4 functions custom dispatcher related bindings.

@rerobika as I see it can be done the other way as well.

Indeed, no matter what PR lands first, the other must be updated as well.

@LaszloLango I've updated the PR after #2640 has landed. Could you take an other look at it?

@rerobika, are measurement results the same after the rebase?

@LaszloLango Yes they are, these are the new results:

Binary (bytes)
master(f22eea5c6e)
patch(cec478847b)
Gain

size
132664
132664
0 bytes

.text
115636
114444
-1192 bytes

.rodata
11256
11255
-1 bytes

.bss
1575168
1575168
0 bytes

Performance is still unchanged, mostly noise due to the new code layout.


Issue 140: MLP binary classifier

Resolves #140
Marked as WIP while #141 is solved.

pipeline added @csala


As an OtuPicker component user, I'd like a common interface for returns from get-item

Feature or enhancement
When I use the OtuPicker component and set a @get-item on it, the keys of the return object depend on whether the otu that was picked in the picker was one that already existed or that the user created just now within the picker.
If the otu chosen in the picker already existed then the return object looks like this (pardon the garbage data):

If the otu chosen in the picker was one the user just created from within the picker, the return object looks like this:

The only overlapping key in the two cases is id, everything else would need to be checked on a case by case basis. Is it reasonable to expect the keys in the two cases to be the same, at least when their values exist?
Location
OtuPicker
Screenshot, napkin sketch of interface, or conceptual description
No response
Your role
No response

(There's at least one (minor) bug as a result of the non-overlap, here:
https://github.com/SpeciesFileGroup/taxonworks/blob/7356222b4de4ff0c6dc7f568ec21c999fab170ba/app/javascript/vue/tasks/loans/new/components/dateDetermination.vue#L32-L41
where the new otu case doesn't display when selected (otuSelected assigns from the wrong key on $event). I haven't checked everywhere else.)


add Europeana to the creativity list

Hiya! I'm proposing to add the gallery functionality for Europeana to this list of creative tools. The experience will probably speak for itself, a user would just have to go to the 'get started' button on the europeana homepage. I am aware that there is some minor friction here as users will be asked to create an account to start publishing galleries, but they can browse and access all content on europeana without the need to create an account.

Hey @Hobbesball, thanks for the PR. This is a cool project, but it doesn't meet the criteria if an account is required in order to do "the creativity part" (in this case, making galleries). A similar example mentioned in the contribution docs is Scratch, which I've also excluded because it requires an account in order to create projects (even though you can browse projects anonymously).
Sorry!


[AzureMonitorExporter] Collect AKS attach rate numerator

Based on https://github.com/Azure/azure-sdk-for-java/pull/37123

API change check
API changes are not detected in this pull request.


Not getting actual universal link

Consider universal link www.example.com/samplePath.
When we create an email template with  this link, Iterable check for AASA details and creates
mapping links2.example.com/12345 -> www.example.com/samplePath.
On clicking the rewritten link from email, app should be opened and we should get a call back in iterableURLDelegate method with original Url ie www.example.com/samplePath.  As of now getting the mapped URL only, not the original one.

checked the code and URLSessionDelegate implementation in IterableDeeplinkManager, not executing redirect link

@rashidbinlatheef We need more information to debug this issue.
Here the comment from our engineer to you in our Slack channel. "What is the rewritten link URL? Could you send it to me through direct messages (not in this thread)?"

Ah, we've resolved this as being related to allowing arbitrary loads (HTTP links) in your app, sorry for the confusion!


Setup failed after updating Home Assistant Core to 2023.5 beta

Description
I am getting this error in Home Assistant Core log after updating to beta version 2023.05:
Setup failed for custom integration tapo_control: Unable to import component: cannot import name 'NotificationManager' from 'onvif.client' (/usr/local/lib/python3.10/site-packages/onvif/client.py)
Reproduction Steps
Just updated and got the error.
Expected behavior
Not getting the error.
If applicable, add error logs.
No response
Device Firmware
Not related to any camera
Using stream component
No
Does camera work via official integrations?
No
Camera has all attributes filled out in developer tools
Yes
HASS Environment
HA OS
Search for similar issues
Yes
Additional information
No response

Integration works without any issues both on 2023.6.0.dev20230430 and 2023.5.0b5.
Make sure to use the latest version from releases or use 5.1.2 with the latest stable version of HA (as per today).

Sorry to ask but:

how do I know which is the Tapo integration version I have installed?, and
how do I force to install 5.1.6 release?
Thanks and best regards,

José

By the way, when tried to add the integration I get error message:
Config flow could not be loaded: {"message":"Invalid handler specified"}

Integration works without any issues both on 2023.6.0.dev20230430 and 2023.5.0b5. Make sure to use the latest version from releases or use 5.1.2 with the latest stable version of HA - april release (as per today).

After updating to 5.1.6 it is working. Thanks!


CurlGitHubPackagesDownloadStrategy: revert allowing timeouts

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew style with your changes locally?
[ ] Have you successfully run brew typecheck with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

Follow up to #10922
I noticed that these were added separately and should also be reverted before the new tag.

Review period skipped due to critical label.

==> /usr/bin/sudo /usr/sbin/chown -R umeshsaravane:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
Checking out files: 100% (2558/2558), done.
HEAD is now at ed87211da Merge pull request #10923 from Rylan12/revert-more-timeouts
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git  [...] -- [...]'


Tests after each deployment/update on a node

It would be a good practice to make some test after an deployment/update is made on an existing node.
Test could include the capability to check if the node is able to communicate with other besu/orion nodes, also testing over private transactions and so on.

Once you are permissioned, you start connecting to the nodes in LACChain's network. Checking that you are connected to other nodes is a good way of verifying that you have been permissioned. In order to do so, access your node and follow the next steps:

sudo -i
cd lacchain
vi config.tml

Now you need to add the "ADMIN" word in the line "rpc-http-api" as shown in the capture below. This will allow you to access your API via RPC from your localhost so you can get the information on the nodes you are connected to.

In order to get that information, run the following now:

service pantheon restart

curl -X POST --data '{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}' http://<IP_ADDRESS>:4545

As you are restarting the pantheon service as part of the process, you are re-connecting to all the nodes. Take this into account if you are already registering transactions in the network.
If instead of granting access to your local host you want to grant access to an external IP, for example for the technical team of LACChain to check your connections, you have to uncomment the lines that are commented in the capture above. For granting access to a specific IP, type it inside the brackets. You shouldn't allow this permanently.


Add marker orientations

Expose the orientation of markers (their rotation relative to the camera)
This change is based on #33,
https://github.com/sourcebots/sb-vision/pull/34/files/504f4b51993b8c17cf9bc15172d4cdc6b3ac326e..4b46eac9c00b4f4043113dbd937f21918a94542b is the diff you'll want to look at for specifically the changes added in this PR

I'm just going to add another test with an image with 45 degrees in more than one axis, otherwise this is ready for review. Obviously this won't merge until #33 is merged

is it not better to have this as a PR into #33? It means not only the diff looks nicer, but seeing as it's dependant anyway, it means it can't be merged without its dependant?

I would normally, but #33 is already massive

So Github doesn't really have a good way of showing this sort of thing. I think the idea would be having some built-in way of saying "this depends on $branch, but will be merged to master once that merges" which would then block the merge (at least in the web UI) until the relevant branch had merged.
For this PR, I think it makes most sense to point it at #33 until just before that merges, then to switch it to master. Unfortunately if you point a PR at another PR and then the target PR (e.g: #33) gets merged, then the second-layer PR (e.g: this one) gets closed.
I can't remember whether you can then re-open it (I've a recollection that the UI doens't like it, since the target branch might not still exist). This also plays particularly badly with the deletion of branches which are now merged (as we tend to do, and seems reasonable on its own).

Please review this, it's blocking a release


Installer kubeadm

Hello there !
I've noticed an issue in the documentation. Since major version 1.18 the installation documentation is not accurate. The URL "https://raw.githubusercontent.com/kubernetes/kubernetes/${RELEASE}/build/debs/kubelet.service" found on page https://kubernetes.io/fr/docs/setup/independent/install-kubeadm/ returns a 404. It was working on major version 1.17.

/language fr
/kind bug
/priority backlog


Can you connect to bluetooth speaker via mac address

Problem Description
Hey,
in a2dp source, while connecting a bluetooth speaker if there are multiple with same name, is there a way to connect via mac address of the speaker.
Device Description
ESP32 development board
Sketch
a2dp_send example

Other Steps to Reproduce
No response
Provide your Version of the EP32 Arduino Core (or the IDF Version)
3.0.0
I have checked existing issues, discussions and online documentation

[X] I confirm I have checked existing issues, discussions and online documentation

I don't understand why you think this is a bug.
So I am converting this to a discussion...


region_isos needs to map regions to isos, but also countries to isos

I have just found a couple cases in which the "scenario region" is actually just a country (in the case of big countries such as US or Brazil etc.).
In this case, our pipeline won't join in any data, as it won't recognize the country as a "region".
One possible solution would be to simply append country_codes to region_isos (one time for every source) basically making an identity map from a country to itself.
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#>     filter, lag
#> The following objects are masked from 'package:base':
#>
#>     intersect, setdiff, setequal, union
library(r2dii.data)

data <- tibble::tribble(
          ~region,    ~source,
         "brazil", "etp_2017",
  "united states", "etp_2017",
         "brazil", "weo_2019",
  "united states", "weo_2019"
  )

# this will happen internally in r2dii.analysis
left_join(data, region_isos, by = c("region", "source"))
#> # A tibble: 4 x 3
#>   region        source   isos
#>   <chr>         <chr>    <chr>
#> 1 brazil        etp_2017 <NA>
#> 2 united states etp_2017 <NA>
#> 3 brazil        weo_2019 <NA>
#> 4 united states weo_2019 <NA>

# would be ideal to have an output similar to this
left_join(data, iso_codes, by = c(region = "country")) %>%
  rename(isos = country_iso)
#> # A tibble: 4 x 3
#>   region        source   isos
#>   <chr>         <chr>    <chr>
#> 1 brazil        etp_2017 br
#> 2 united states etp_2017 us
#> 3 brazil        weo_2019 br
#> 4 united states weo_2019 us

Created on 2020-06-23 by the reprex package (v0.3.0)

Another possible alternative would be to do this internally when we call region_isos in .analysis.
@maurolepore let's discuss today

library(dplyr, warn.conflicts = FALSE)
library(r2dii.data)

# Fix name so that the same variable has the same name everywhere
countries <- rename(iso_codes, isos = country_iso)

# Is this the ideal output?
unique(left_join(countries, region_isos))
#> Joining, by = "isos"
#> # A tibble: 1,493 x 4
#>    country     isos  region                                       source
#>    <chr>       <chr> <chr>                                        <chr>
#>  1 afghanistan af    asia pacific                                 weo_2019
#>  2 afghanistan af    developing asia                              weo_2019
#>  3 afghanistan af    other asia pacific countries and territories weo_2019
#>  4 afghanistan af    global                                       weo_2019
#>  5 afghanistan af    developing economies                         weo_2019
#>  6 afghanistan af    non oecd                                     weo_2019
#>  7 afghanistan af    non opec                                     weo_2019
#>  8 albania     al    europe                                       weo_2019
#>  9 albania     al    global                                       weo_2019
#> 10 albania     al    developing economies                         weo_2019
#> # … with 1,483 more rows

Created on 2020-06-24 by the reprex package (v0.3.0)

No, we actually need to have the country name in the column region. In analysis, we join scenarios to ald by region, and in some cases, the region is a single country itself (it's usually only the case for very large countries).
ie. whereas region == "europe" may have c("de", "fr", ...), region == "united states should have only "us.
I don't know which countries this applies for, so it's safest to just do it for all countries, and the annoying part is we will have to duplicate it for every source.

I understand this only  in part, but it seem that -- as you suggested elsewhere -- the solution may be better implemented wherever the data is used -- not here. Here we seem to have the data in a normalized -- space efficient -- way, with all the components you need. The challenge seems to be to relate those components where the data is used.

Hey @maurolepore, no we have not addressed it yet.
And given your most recent comment, I would agree that this should be solved downstream in r2dii.analysis. I will move the issue there now.


why the name prop compulsory?

using "label" as "displaykey" doesn't work. Why make "name" prop is compulsory? If it's compulsory why "displaykey" exists? The standard is always "value"-"label" set.

Yes. This is also something that I also noticed. It totally ignores the displayKey property when used. Took me about an hour to figure this out. Please update the documentation or the functionality. :)


Adding start_as_group and stop_as_group

Today at work we realized the lack of gid support for the Chef-based monit configs was actually having an affect on our production environment. Your stop_as commit was extremely clear (I'm really, REALLY new to github) so I used that as an example to put it all together and see if I could get it setup properly as an actual pull request.
Thanks!

thanks @mattadair ! this looks good, and is a welcome addition (sorry the lack caused you trouble).
I'm going to merge it as is, and make a couple quick updates based on some preferences, and to avoid a possible bug related to the following:
one of the impacts of the template changes made here is that it will produce an invalid syntax if someone were to specify start_as or stop_as without also specifying the new start_as_group and stop_as_group. as such, i'm going to update the start_as_group and stop_as_group methods in the resource to be required if start_as/stop_as are specified.
as a result of making that change, this'll end up being a minor version update, as it'll no longer be backwards compatible, which leads to the final comment here, which is that, in general, it's preferable to leave the version incrementing to the maintainers and keep your PRs as minimal as possible. no big, just a tip (i've been corrected on this myself ;) ).
so this'll be out in 1.6.0, which should be released to the supermarket within a couple of hours. thanks again!

Makes perfect sense, thanks for the help!


Able to create aid package with quantity of medicine in excess of max quantity available from supplier

[ ] Able to create aid package with quantity of medicine in excess of max quantity available from supplier

Needs to be checked on the BE as well.

In the BE we have already added the check to avoid this. https://github.com/LSFLK/MedicinesforLK-AdminAPI/blob/main/service.bal#L104

We need to add a validation to assure that the Goal amount is still greater or equal than the received amount after an edit (decrease) in the quantity of an aid package item.

@udda1996 @jayasanka-sack @anjula-sack  can we close this

We have avoid creating packages with amounts more than the remaining quantity form the supplier.


Fix integration test for client base url

Fixes regression introduced by https://github.com/zorkian/go-datadog-api/pull/261

Thanks for the review, merging.


Update the README to avoid confusion during 1 -> 2 migration

Per #662 , we're going to be merging next into master and forging ahead with Ignite 2 as fast as possible. Yay.
But people coming to the repo in the meantime may get confused.
Let's get the README polished up really nice and have an Ignite 1 and Ignite 2 section, clearly showing the roadmap.

Love it!


Ability to view site reputation or screenshot of a link when viewing the share page

This is just an idea at the moment, to help people decide if a link is safe, what mechanics can be added to protect them when a link is not clearly unsafe.
Ideas at the moment include querying the site reputation with a third party, or having the ability to view a screenshot of a page without having to navigate there.

This one is blocked pending the Proof of Concept created for https://github.com/tommcclean/cmpct.io/issues/27


Polymer.dart is not working in javascript modus

This issue was originally filed by<EMAIL_ADDRESS>
What steps will reproduce the problem?

Create basic application with polymer.dart in dart editor
Open the application in js mode

What is the expected output? What do you see instead?
Expected: seeing the component on the page
Instead: page is empty
What version of the product are you using? On what operating system?
Dart 1.4.2
polymer.dart 0.10.1+1
Please provide any additional information below.
When I serve a html page with dart serverside, it also doesn't work.

This issue has been moved to dart-lang/polymer-dart#208.


camera service manager: fix missing service type reference

The camera service manager prefab lost the reference to the concrete service type. this change repairs the issue.

What did this manifest itself as? i.e. a failure to start the camera service entirely?

What did this manifest itself as? i.e. a failure to start the camera service entirely?

Failure to instantiate the service.

/azp run mrtk_pr

What did this manifest itself as? i.e. a failure to start the camera service entirely?

Failure to instantiate the service.

Thoughts on maybe expanding @railboy's tests here:
https://github.com/microsoft/MixedRealityToolkit-Unity/pull/5266
To just make sure we can grab all of the services? It would prevent these types of super simple and also super critical regressions going forward.

This was separate from the mrtk object. it was related to the experimentatl standalone service work. i'll write some simple tests shortly


Enable all features for nested Rules

Currently certain features are limited to only top level Rules. Expectation is to allow all features to be available even when Rules are nested

[x] Local Params
[x] #178

this feature is available in v3.3.0


Add stability warning to README & book (ref #117)

@mwilliammyers How do you feel about this warning? Definitely looking for ways to improve it.

Thank you. 😂

Sorry, I didn't get the suggestions added before this got merged. I will get those addressed in another PR.


403 error while downloading from pluralsight

From windows powershell/cmd
youtube-dl --username<EMAIL_ADDRESS>--password "" --verbose --sleep-interval 200 "https://app.pluralsight.com/library/courses/building-custom-github-actions"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--username', 'PRIVATE', '--password', 'PRIVATE', '--verbose', '--sleep-interval', '200', 'https://app.pluralsight.com/library/courses/building-custom-github-actions']
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] youtube-dl version 2021.06.06
[debug] Python version 3.9.1 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: none
[debug] Proxy map: {}
[pluralsight:course] building-custom-github-actions: Downloading JSON metadata
[download] Downloading playlist: Building Custom GitHub Actions
[pluralsight:course] playlist Building Custom GitHub Actions: Collected 28 video ids (downloading 28 of them)
[download] Downloading video 1 of 28
[pluralsight] Downloading login page
ERROR: Unable to download webpage: HTTP Error 403: Forbidden (caused by <HTTPError 403: 'Forbidden'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "c:\program files\python39\lib\site-packages\youtube_dl\extractor\common.py", line 634, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "c:\program files\python39\lib\site-packages\youtube_dl\YoutubeDL.py", line 2288, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "c:\program files\python39\lib\urllib\request.py", line 523, in open
response = meth(req, response)
File "c:\program files\python39\lib\urllib\request.py", line 632, in http_response
response = self.parent.error(
File "c:\program files\python39\lib\urllib\request.py", line 561, in error
return self._call_chain(*args)
File "c:\program files\python39\lib\urllib\request.py", line 494, in _call_chain
result = func(*args)
File "c:\program files\python39\lib\urllib\request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)

Duplicate of #29776.


[Discord] Search discord comments from DMs and allowed channels

Search Feature - Not officially documented
Search through with hit & try to get the discord search api endpoint right
Add it along with All Search Results which currently has only github search results
UI work for discord search (TBD)

Closed until discord feature out of alpha https://discord.com/developers/docs/topics/rpc


Move to RBAC authorization when moving broker to 3.7

Currently, our template uses openshift authorization API versions in the deployment template. When moving to 3.7 we should upgrade these to use the correct RBAC API versions.
Current:
- apiVersion: v1
  kind: ClusterRoleBinding
  metadata:
    name: asb
  roleRef:
    name: admin
  subjects:
  - kind: ServiceAccount
    name: asb
    namespace: ansible-service-broker

Needs To Look Like:
- apiVersion: rbac.authorization.k8s.io/v1beta1
  kind: ClusterRoleBinding
  metadata:
    name: asb
  roleRef:
    name: admin
    kind: ClusterRole
    apiGroup: rbac.authorization.k8s.io
  subjects:
  - kind: ServiceAccount
    name: asb
    namespace: ansible-service-broker

roleRef for RBAC has stronger validation so you will need the group and kind.

Updated the original issue to capture need for apiGroup and kind in theroleRef section for a ClusterRoleBinding


--color seems to not do anything

--color is passed to rustc , but this doesn't affect the final output since its generated by this crate.
so currently --color translates to rustc --color always --metadata-format=json which actually has no effect.
To actually force color the user currently needs to set FORCE_COLOR=1 to make owo-colors actually force the colors.

Thank you for the report, I think it's a regression caused by #70 - I need to pay more attention to such details. Fixed and released 0.2.2


Update name in readme

Typo in my surname. Should read Ron Togunov

Fixed in the latest PR which Phil is reviewing now


Prepare release 0.11.0

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Please upload report for BASE (main@bb84b9e). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #532   +/-   ##
=======================================
  Coverage        ?   90.47%
=======================================
  Files           ?      148
  Lines           ?    10838
  Branches        ?      511
=======================================
  Hits            ?     9806
  Misses          ?      868
  Partials        ?      164

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚨 Try these New Features:

Flaky Tests Detection - Detect and resolve failed and flaky tests


How to add markers with different sizes.?

I was searching on google and wiki, but i don't find nothing, i want to add markers with different sizes using LayoutParams, there is any way?
I am changing the size using images with different pixels. But I want to use one icon with 100x100 on a ImageView with 40dp.
Thanks.

markers by default will only be their measured dimensions, so you'll need to either wrap them in an intermediate or override onMeasure for your marker's view class


Missing data in Kinetics 400

Thanks much for the great work.
I found there are about 10% of missing data in the train set of Kinetics-400.
Is it consistent with your findings, or should I look into improving my download scripts ? :)
Thanks.

Thanks.
10% should be about right..
Joao
On Tue, Feb 12, 2019 at 10:05 AM jhagege<EMAIL_ADDRESS>wrote:

Thanks much for the great work.
I found there are about 10% of missing data in the train set of
Kinetics-400.
Is it consistent with your findings, or should I look into improving my
download scripts ? :)
Thanks !
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/deepmind/kinetics-i3d/issues/51, or mute the thread
https://github.com/notifications/unsubscribe-auth/AO6qasvjUOEK8vBcJ3oErOoN4WZostcFks5vMpIFgaJpZM4a2B7w
.


Feature: Password policy

There where options to define a password policy via env variables. Could you please add them back or better provide a settings page for it?

V2 still has them there however the docs have been removed for them because it was confusing for some people, The same is true for V3 you can set the password policy using these variable:
MIN_PASSWORD_LENGTH
MIN_PASSWORD_UPPERCASE
MIN_PASSWORD_NUMBERS
MIN_PASSWORD_SPECIAL
we encourage people to use the defaults though because of security concerns.

I have them set, but they don't work. I can easily use a password like "test" with setting a min length of 12

Is this on V3


flops of deformable convolution

thank you for your release project!
Is there any reference document or code for the flops calculation method of deformable convolution?

Hi, I use pytorch-OpCounter in another work.


[microTVM] Zephyr: Fix option name in PROJECT_OPTIONS

Fix option name for using an extra tarball when creating a new project
directory: it should read 'extra_files_tar', not 'extra_files'.
Signed-off-by: Gustavo Romero<EMAIL_ADDRESS>

Retriggering CI since https://github.com/apache/tvm/pull/8927 workaround is in place.

@leandron Hi, I'm wondering if you could collect it now that CI is happy with it.


Component declaration variations

I'm still trying to wrap my head around Mantra and the new React syntax with ES2015. What's the difference between these components? Why is one declared normally with extends React.Component and the other is not.
mantra-sample-blog-app/client/modules/core/components/newpost.jsx
import React from 'react';

class NewPost extends React.Component {
  render() {
    const {error} = this.props;
    return (
      <form className="new-post" onSubmit={this.createPost.bind(this)}>

Add New Post

        {error ?
{error}
 : null}

        <input ref="titleRef" type="Text" placeholder="Enter your post title." />

        <textarea ref="contentRef" placeholder="Enter your post content." />

        <button type="submit">Add New</button>
      </form>
    );
  }

  createPost(event) {
    // Becaus the test cannot get event argument
    // so call preventDefault() on undefined cause an error
    if (event && event.preventDefault) {
      event.preventDefault();
    }

    const {create} = this.props;
    const {titleRef, contentRef} = this.refs;

    create(titleRef.value, contentRef.value);
  }
}

export default NewPost;

mantra-sample-blog-app/client/modules/core/components/postlist.jsx
import React from 'react';

const PostList = ({posts}) => (

      {posts.map(post => (

          <a href={`/post/${post._id}`}>{post.title}

      ))}

);

export default PostList;

Quote:
You may also define your React classes as a plain JavaScript function:
https://facebook.github.io/react/docs/reusable-components.html#stateless-functions

const PostList = ({posts}) => (  ......... )
is the syntax for a stateless functional component. It doesn't allow you to do as much as creating a React component object of type class, but it saves keystrokes and React may optimize for it in the future.
From the React blog:
https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html
Stateless functional components
In idiomatic React code, most of the components you write will be stateless, simply composing other components. We’re introducing a new, simpler syntax for these components where you can take props as an argument and return the element you want to render:
// A functional component using an ES2015 (ES6) arrow function:
var Aquarium = (props) => {
var fish = getFish(props.species);
return {fish};
};
// Or with destructuring and an implicit return, simply:
var Aquarium = ({species}) => (

{getFish(species)}

);
// Then use:
These components behave just like a React class with only a render method defined. Since no component instance is created for a functional component, any ref added to one will evaluate to null. Functional components do not have lifecycle methods, but you can set .propTypes and .defaultProps as properties on the function.
This pattern is designed to encourage the creation of these simple components that should comprise large portions of your apps. In the future, we’ll also be able to make performance optimizations specific to these components by avoiding unnecessary checks and memory allocations.

I see. Thanks for the clarification!


Updated assimp to commit 1d565b0 with iFire

Signed-off-by: RevoluPowered<EMAIL_ADDRESS>Signed-off-by: K. S. Ernest (iFIre) Lee<EMAIL_ADDRESS>

                 from thirdparty/assimp/include/assimp/types.h:58,
                 from thirdparty/assimp/include/assimp/Logger.hpp:49,
                 from thirdparty/assimp/include/assimp/DefaultLogger.hpp:48,
                 from modules/assimp/editor_scene_importer_assimp.h:47,
                 from modules/assimp/register_types.cpp:34:
thirdparty/assimp/assimp/config.h:651:1: error: "/*" within comment [-Werror=comment]
  651 | /** @brief  Set wether the importer shall not remove empty bones.
      |
cc1plus: all warnings being treated as errors```

Thanks!


RuntimeError: Triton Error [CUDA]: invalid argument

Describe the bug
Hi, I encountered a problem while using the fused_chunk_gla function. My input data has a relatively short sequence length of 20, but the batch size can go up to 40960, with 2 attention heads and a dimension of 64. When I use such input, the function throws an error as shown above. However, when I reduce the batch size to 1024 or 256, it runs fine. It seems to be a memory issue, but I haven't observed any memory overuse on either the CPU or GPU. Do you have any idea why this might be happening?
Steps to reproduce the bug
q = torch.randn([40960,2,20,64]).cuda()
k = torch.randn([40960,2,20,64]).cuda()
v = torch.randn([40960,2,20,64]).cuda()
gk = torch.randn([40960,2,20,64]).cuda()
o, new_hidden_states = fused_chunk_gla(q, k, v, gk, output_final_state=True)
Expected behavior
I still hope that the input data can maintain a batch size of 40960 and run the function successfully.
Environment info

torch: 2.4.1
triton: 3.0.0

@TiminHu Hi, thank you for reporting this bug. However we're not going to maintain this kernel in the future, and fused_chunk will be marked as deprecated in the next release.
You're recommended to use chunk, which is faster than fused_chunk in most scenarios.

In your case I suggest using fused_recurrent

In your case I suggest using fused_recurrent

But when I use fused_recurrent, the error still exists

@TiminHu Hi, refer to https://github.com/triton-lang/triton/issues/580
40960 is too large to launch.


Creates a servlet that tells a user if they are logged in or not.

Some of the examples in the walkthrough file allowed you to log in and out and it carried over to my portfolio because it was being run on the same server.


[Bug] Create Signature UI

What happened?
When signing with an NFT in the GUI, the user interfaces behaves poorly. In order to be able to sign a message, you must first fill in the message field, THEN the NFT field and press enter in order to sign. Clicking "Sign" has no effect otherwise.
If you fill in the NFT field first, it clears as soon as you want to fill in the message field...
Version
2.3.0
What platform are you using?
Linux
What ui mode are you using?
GUI
Relevant log output or stacktrace
No response

Thanks! Will fix

Fixed by https://github.com/Chia-Network/chia-blockchain-gui/pull/2404


Support for asymmetric JWT validation (e.g. Auth0 or Clerk)

The existing JWT middleware validates tokens where the secret is available (i.e. symmetric validation) but services like Auth0, Clerk and others use asymmetric tokens signed by the service using a secret key that is not made available for validating the token. These tokens need to be validated with the public key.
Should validating asymmetric tokens be supported in Hono? It seems like it would be very useful for anyone who wants to build an API accessible by end users.
I put together a quick proof of concept middleware for Clerk tokens, which grabs the public key(s), caches them in a Cloudflare workers KV and uses them to validate the token. The token's claims are made available to the context using the c.set() function. This code could be refined if it's something that should be supported, and note that the code as drafted introduces a dependency on the jose library for key import and validation.
import type { MiddlewareHandler } from "hono"
import { Context } from "hono"
import { KeyLike, importJWK, jwtVerify } from "jose"

const getPublickKeys = async (
  c: Context
): Promise<{ keys: KeyLike[] } | null> => {
  const cache: KVNamespace = c.env.PUBLIC_JWK_CACHE
  const cachedKeys: string | null = await cache.get("public-keys")
  if (cachedKeys != null) {
    return JSON.parse(cachedKeys)
  } else {
    try {
      const res = await fetch(`${c.env.AUTH_DOMAIN}/.well-known/jwks.json`)
      const freshKeys: { keys: KeyLike[] } = await res.json()
      try {
        await cache.put("public-keys", JSON.stringify(freshKeys), {
          expirationTtl: 432000,
        })
      } catch (e) {
        // don't fail as the validation can still occur if keys can't be cached
        console.log("Error caching public keys: ", e)
      }
      return freshKeys
    } catch (e) {
      console.log("Error getting fresh keys: ", e)
      return null
    }
  }
}

export const asymmetricJwt = (): MiddlewareHandler => {
  return async (c, next) => {
    let jwt: string
    let errors: string[] = []
    const authorization = c.req.header("Authorization")
    if (authorization == null) {
      return c.json({ error: "No auth token found" }, 401)
    } else {
      jwt = authorization.replace(/Bearer\s+/i, "")
    }

    // get public keys from cache, or get new keys and cache them (5 day TTL)
    const publicKeys = await getPublickKeys(c)
    if (publicKeys == null) {
      return c.json({ error: "Failed to fetch public keys" }, 500)
    }

    const [token] = await Promise.all(
      publicKeys.keys.map(async (key) => {
        const parsedKey = await importJWK(key)
        try {
          const valid = await jwtVerify(jwt, parsedKey, {
            issuer: c.env.AUTH_DOMAIN,
            audience: c.env.AUTH_AUDIENCE,
          })
          if (valid) {
            return valid
          }
        } catch (e) {
          // there can be multiple keys, so just collect the errors
          errors.push(`JWT validation failed: ${e}`)
        }
      })
    )

    if (!token) {
      return c.json({ errors: errors }, 401)
    } else {
      c.set("token", token)
      await next()
    }
  }
}

Thanks for your comments - I believe I can rewrite to use browser APIs like crypto.subtle to avoid the dependence on Jose. I'll work on doing this.

I wanted to use jose recently, but it did not work out of the box on cloudflare workers for me. I guess because of some "subtle" crypto module difference. However, I found https://github.com/tsndr/cloudflare-worker-jwt which worked out of the box for me and was lighter.

J/W - did you open an issue with panva? He seems very responsive. If you were testing on miniflare prior to September, you may have run into this.

I found some time to work on this and put together a quick proof of concept to demonstrate that this works without external dependencies, as below:
import type { MiddlewareHandler, Context } from "hono"

// modified from swansontec/rfc4648.js
const parseBase64Url = (string: string): Uint8Array => {
  const encodingChars: string =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"
  const encodingBits: number = 6
  // reduce encoding chars to codes using reduce
  const encodingCodes: { [key: string]: number } = {}

  encodingChars.split("").reduce((acc, char, index) => {
    acc[char] = index
    return acc
  }, encodingCodes)

  // Count the padding bytes:
  let end = string.length
  while (string[end - 1] === "=") {
    --end
  }

  const output = new Uint8Array(((end * encodingBits) / 8) | 0)

  // Parse the data:
  let bits = 0 // Number of bits currently in the buffer
  let buffer = 0 // Bits waiting to be written out, MSB first
  let written = 0 // Next byte to write
  for (let i = 0; i < end; ++i) {
    // Read one character from the string:
    const value = encodingCodes[string[i]]
    if (value === undefined) {
      throw new SyntaxError("Invalid character " + string[i])
    }

    // Append the bits to the buffer:
    buffer = (buffer << encodingBits) | value
    bits += encodingBits

    // Write out some bits if the buffer has a byte's worth:
    if (bits >= 8) {
      bits -= 8
      output[written++] = 0xff & (buffer >> bits)
    }
  }

  // Verify that we have received just enough bits:
  if (bits >= encodingBits || 0xff & (buffer << (8 - bits))) {
    throw new SyntaxError("Unexpected end of data")
  }

  return output
}

const parseJwtPayload = <T extends object = { [k: string]: string | number }>(
  token: string
): T | undefined => {
  // convert token from base64url to base64
  token = token.replace(/-/g, "+").replace(/_/g, "/")
  try {
    return JSON.parse(atob(token.split(".")[1]))
  } catch {
    return undefined
  }
}

const verify = async (jwsObject: string, jwKey: JsonWebKey, c: Context) => {
  const jwsSigningInput = jwsObject.split(".").slice(0, 2).join(".")
  const jwsSignature = jwsObject.split(".")[2]
  const key = await crypto.subtle.importKey(
    "jwk",
    jwKey,
    {
      name: "RSASSA-PKCS1-v1_5",
      hash: { name: "SHA-256" },
    },
    false,
    ["verify"]
  )
  return await crypto.subtle.verify(
    { name: "RSASSA-PKCS1-v1_5" },
    key,
    parseBase64Url(jwsSignature),
    new TextEncoder().encode(jwsSigningInput)
  )
}

const getPublicKeys = async (
  c: Context
): Promise<{ keys: JsonWebKey[] } | null> => {
  const cache: KVNamespace = c.env.PUBLIC_JWK_CACHE
  const cachedKeys: string | null = await cache.get("public-keys")
  if (cachedKeys != null) {
    return JSON.parse(cachedKeys)
  } else {
    try {
      const res = await fetch(`${c.env.AUTH_DOMAIN}/.well-known/jwks.json`)
      const freshKeys: { keys: JsonWebKey[] } = await res.json()
      try {
        await cache.put("public-keys", JSON.stringify(freshKeys), {
          expirationTtl: 432000,
        })
      } catch (e) {
        // don't fail as the validation can still occur if keys can't be cached
        console.log("Error caching public keys: ", e)
      }
      return freshKeys
    } catch (e) {
      console.log("Error getting fresh keys: ", e)
      return null
    }
  }
}

export const asymmetricJwt = (): MiddlewareHandler => {
  return async (c, next) => {
    let jwt: string
    const authorization = c.req.header("Authorization")
    if (authorization == null) {
      return c.json({ error: "No auth token found" }, 401)
    } else {
      jwt = authorization.replace(/Bearer\s+/i, "")
    }

    // get public keys from cache, or get new keys and cache them (5 day TTL)
    const publicKeys = await getPublicKeys(c)
    if (publicKeys == null) {
      return c.json({ error: "Failed to fetch public keys" }, 500)
    }

    const validationResponses = await Promise.all(
      publicKeys.keys.map(async (key) => {
        return await verify(jwt, key, c)
      })
    )

    if (!validationResponses.includes(true)) {
      return c.json({ error: "Invalid token" }, 401)
    } else {
      const payload = parseJwtPayload(jwt)
      if (payload == null) {
        return c.json({ error: "Invalid token payload" }, 401)
      }

      // validate claims
      if (payload.exp < Date.now() / 1000) {
        return c.json({ error: "Token expired" }, 401)
      } else {
        console.log(
          `Token expires in ${Math.floor(
            (payload.exp as number) - Date.now() / 1000
          )} seconds`
        )
      }
      if (payload.aud !== c.env.AUTH_AUDIENCE) {
        return c.json({ error: "Invalid audience" }, 401)
      }
      if (payload.iss !== c.env.AUTH_DOMAIN) {
        return c.json({ error: "Invalid issuer" }, 401)
      }

      c.set("claims", payload)
      c.set("user_id", payload.id)
      c.set("org_id", payload.org_id)
      c.set("org_role", payload.org_role)

      await next()
    }
  }
}

I need to do some work to tidy this up (e.g. moving the claims validation to options) but need to do some research on the various auth providers to make it more durable. Thoughts welcome on the general direction here.

@AlexErrant Sorry for the late reply. Indeed, it is looks like an issue with Miniflare rather than jose.

Hey @cd-slash, thank you for raising this issue. Any updates by change on your draft?

Hey @cd-slash, thank you for raising this issue. Any updates by change on your draft? I'm evaluating using Clerk in an app and it would've been great to have a built-in or third-party Hono middleware to use for auth with Clerk.
@yusukebe do you have any recommendations on how to use Clerk with Hono from Cloudflare Workers? Thanks!

Hello, @cd-slash @uicrafts - I created (this project)[https://github.com/wataruoguchi/verify-rsa-jwt-cloudflare-worker] to address the issue. The project includes a Hono Middleware. Can you test it when you have a chance?
The library should work for any authentication servers. I tested with Auth0 RS256. Cheers!


Remove Extra Margin in SQL Lab

Address #2901.
Removes extraneous whitespace from SQL lab by adding CSS to superset.css that removes the extra margin at the bottom of the form.

please add before/after screenshots of the update ui.

The UI before this change:

After:

Coverage remained the same at 69.349% when pulling 6a66ef666c78e9124a422a6943bfdacb5480cf63 on SalehHindi:remove-whitespace-3 into 219f33f0d1fcd05db1807f5b95caea8b0edd92f7 on apache:master.

Coverage remained the same at 69.349% when pulling 3ef63fb3fd89e881eb7bc832caff8a3df6503c7f on SalehHindi:remove-whitespace-3 into 219f33f0d1fcd05db1807f5b95caea8b0edd92f7 on apache:master.

Coverage remained the same at 69.349% when pulling 3ef63fb3fd89e881eb7bc832caff8a3df6503c7f on SalehHindi:remove-whitespace-3 into 219f33f0d1fcd05db1807f5b95caea8b0edd92f7 on apache:master.

https://github.com/apache/incubator-superset/pull/3363


Fix root group for FreeBSD

FreeBSD needs wheel to be the root group, so this module would not work correctly until that was accounted for.

Thanks for this.
However, it appears to break most/all of the tests.
Can you please investigate why?

This should pass now.  hourly required a "require" to get variables from ::logrotate and I had to fix hourly_spec to test on all OSs since it couldn't see $::osfamily without it.  FYI: I'm working on making the FreeBSD support a little better (cron support, specs, etc.), so I'll be committing to this again today.

Actually, I didn't see that someone else had already started this work - #33.  So, I'm actually going to try fixing up that branch instead since the person who pushed that seems to have dropped it since June.

OK, I shall await something with tests that pass! :)
Thanks.
R.


Fix naming in "Where art thou" challenge

Pre-Submission Checklist

[x] Your pull request targets the staging branch of FreeCodeCamp.
[x] Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
[x] You have only one commit (if not, squash them into one commit).
[x] All new and existing tests pass the command npm run test-challenges. Use git commit --amend to amend any fixes.

Type of Change

[x] Small bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would change existing functionality)
[ ] Add new translation (feature adding new translations)

Checklist:

[x] Tested changes locally.
[x] Closes currently open issue (replace XXXX with an issue no): Closes #9239

Description

Changed the challenge title to

Wherefore art thou?

Changed the challenge function to

whatIsInAName

Verified change with command npm run test-challenges.  Result -

total : 775 / passing: 775

closes #9239

LGTM :+1:

The only thing I can see is an issue number in the commit message.
Can you please git commit --amend -m "Fix/Where Art Thou"
then git push -f don't worry about any advisory messages.
Great first FreeCodeCamp PR!
Thanks for contributing :tada:

Sure thing, thanks for pointing it out! Will get back to it as soon as I return home.

It looks like the branch against which I made the change is now 6 commits behind the FCC staging branch.

This branch is 1 commit ahead, 6 commits behind FreeCodeCamp:staging.

How do I make my branch up to date before submitting the new PR, without having to discard this branch and redo the process again against another branch?
Thanks for the help!

@Manish-Giri try git pull --rebase upstream staging


[BUG] Use the correct default SENDER_EMAIL

Description
The default SENDER_EMAIL in the configuration is<EMAIL_ADDRESS>Steps to Reproduce
NA
Expected Behavior
Default value should be<EMAIL_ADDRESS>based on best of my knowledge
Actual Behavior
Default value for SENDER_EMAIL is<EMAIL_ADDRESS>Additional Context
No response
Affected Area
Backend
Version
No response
Browser (if frontend)
No response
File Affected:
https://github.com/djangoindia/djangoindia.org/blob/main/backend/djangoindia/settings/base.py

@ankanchanda I would like to fix this bug. Please assign this issue to me.

@DevilsAutumn need your assistance here to validate the issue.
Post validation @Vaidehi0207 can take it.

I don't think this is an issue, its<EMAIL_ADDRESS>because we haven't setup our mailing functionality yet.

Got it. Thank you.


Partition Generation not performant for very large tables in MySQL

Partition generation operation nor performant and freezes for large tables and the execution has to be manually killed

Closing this as we've updated our generate partitions logic with PR #889
We're also working on our Dataflow distributed code (multiple issues open already) which will address this issue.


Added some android libraries

Both for Java and Kotlin

Hi @sergey48k ,
Unfortunetely Crashlytics is closed library and i'm not sure if this will change.
The Room library is open source, but it's hosted by google here https://android.googlesource.com/platform/frameworks/support/+/master/room . I'm not sure if your parsers will be able to get to this.
Both Kotlin libraries are open sourced on github, i set up their repo names

@sergey48k for closed source libraries the field "examples" should be filled with the list of repositories  using it.

I added 2 of my repositories that are using crashlytics. Maybe that will be enough


How Get User Info such as name and email

How Get User Info such as name and email

You can find the solution in the closed issues. 👍


Generated AuthStore needs to verify authenticated connection after login/register

Expected Behavior
After login or register, the authenticated connection should verified by retrieving the me Query.
Current Behavior
The session is not verified. When a login success but somehow the cookie does not get set, the session is invalid and will not work. This should be prevented by checking the session.
Steps to Reproduce (for bugs)

Deploy a generated app on Heroku
By default, cookie will not be set because of missing API_COOKIE_DOMAIN env var.
Register: the UI will let you in, you won't have a session

+1

+1

Fixed here.

Fixed here.


[libcap] curl failed to download with exit code 22

Operating system
gcc (Debian 10.2.1-6) 10.2.1 20210110
Compiler
gcc (Debian 10.2.1-6) 10.2.1 20210110
Steps to reproduce the behavior
[DEBUG] 1000: execute_process(curl --fail -L https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz --create-dirs --output /home/bha/pro/vcpkg/downloads/libpcap-2.69.tar.gz.4190190.part)
[DEBUG] 1000: cmd_execute_and_stream_data() returned 22 after    67473 us
error: Failed to download from mirror set
error: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz: curl failed to download with exit code 22
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

curl: (22) The requested URL returned error: 403 Forbidden

Failure logs
Installing 1/65<EMAIL_ADDRESS>Building<EMAIL_ADDRESS>/home/bha/.cache/vcpkg/registries/git-trees/23bb9f2743e684bacba57b8cc8a931756f0e7447: info: installing overlay port from here
-- Downloading https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz -> libpcap-2.69.tar.gz...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from /home/bha/pro/vcpkg/vcpkg-bundle.json
[DEBUG] Failed to open: /home/bha/pro/vcpkg/vcpkg-bundle.json
[DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt
[DEBUG] Metrics enabled.
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Feature flag 'dependencygraph' unset
[DEBUG] 1000: execute_process(curl --fail -L https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz --create-dirs --output /home/bha/pro/vcpkg/downloads/libpcap-2.69.tar.gz.4190190.part)
[DEBUG] 1000: cmd_execute_and_stream_data() returned 22 after    67473 us
error: Failed to download from mirror set
error: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz: curl failed to download with exit code 22
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
curl: (22) The requested URL returned error: 403 Forbidden
[DEBUG] /source/src/vcpkg/base/downloads.cpp(997):
[DEBUG] Time in subprocesses: 67473us
[DEBUG] Time in parsing JSON: 2us
[DEBUG] Time in JSON reader: 0us
[DEBUG] Time in filesystem: 408us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 68.5 ms (67780us)
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:32 (message):
  Failed to download file with error: 1
  If you are using a proxy, please check your proxy setting. Possible causes are:

  1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
     to `https://address:port`. This is not correct, because `https://` prefix
     claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
     , etc..) is an HTTP proxy. Try setting `http://address:port` to both
     HTTP_PROXY and HTTPS_PROXY instead.

  2. If you are using Windows, vcpkg will automatically use your Windows IE Proxy Settings
     set by your proxy software. See https://github.com/microsoft/vcpkg-tool/pull/77
     The value set by your proxy might be wrong, or have same `https://` prefix issue.

  3. Your proxy's remote server is out of service.

  If you've tried directly download the link, and believe this is not a temporary
  download server failure, please submit an issue at https://github.com/Microsoft/vcpkg/issues
  to report this upstream download server failure.

Call Stack (most recent call first):
scripts/cmake/vcpkg_download_distfile.cmake:270 (z_vcpkg_download_distfile_show_proxy_and_fail)
/home/bha/.cache/vcpkg/registries/git-trees/23bb9f2743e684bacba57b8cc8a931756f0e7447/portfile.cmake:1 (vcpkg_download_distfile)
scripts/ports.cmake:175 (include)
error: building libcap:x64-linux failed with: BUILD_FAILED
Elapsed time to handle libcap:x64-linux: 83.6 ms
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libcap
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[libcap]+Build+error+on+x64-linux&body=Copy+issue+body+from+%2Fhome%2Fbha%2Fbld%2Fevs-hwfw-sb-xts-lin%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md
-- Running vcpkg install - failed
CMake Error at /home/bha/pro/vcpkg/scripts/buildsystems/vcpkg.cmake:899 (message):
vcpkg install failed.  See logs for more information:
/home/bha/bld/evs-hwfw-sb-xts-lin/vcpkg-manifest-install.log
Call Stack (most recent call first):
/usr/local/share/cmake-3.28/Modules/CMakeDetermineSystem.cmake:170 (include)
CMakeLists.txt:47 (project)
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
bha@fw-build-01:~/pro$ ^C
Additional context
No response

Currently, libcap has been updated to 2.69#5, please pull the latest vcpkg.
monica@monica003:/mnt/vcpkg$  ./vcpkg version
vcpkg package management program version 2024-04-23-d6945642ee5c3076addd1a42c331bbf4cfc97457

See LICENSE.txt for license information.

monica@monica003:/mnt/vcpkg$ ./vcpkg install libcap
Computing installation plan...
The following packages will be built and installed:
<EMAIL_ADDRESS>Detecting compiler hash for triplet x64-linux...
Compiler found: /usr/bin/c++
Restored 0 package(s) from /home/monica/.cache/vcpkg/archives in 7.6 us. Use --debug to see more details.
Installing 1/1<EMAIL_ADDRESS>Building<EMAIL_ADDRESS>-- Downloading https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz;https://www.mirrorservice.org/sites/ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz -> libcap-2.69.tar.xz...
-- Extracting source /mnt/vcpkg/downloads/libcap-2.69.tar.xz
-- Using source at /mnt/vcpkg/buildtrees/libcap/src/libcap-2-46d2f5c326.clean
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Installing x64-linux-dbg
-- Building x64-linux-rel
-- Installing x64-linux-rel
-- Fixing pkgconfig file: /mnt/vcpkg/packages/libcap_x64-linux/lib/pkgconfig/libcap.pc
-- Fixing pkgconfig file: /mnt/vcpkg/packages/libcap_x64-linux/lib/pkgconfig/libpsx.pc
-- Fixing pkgconfig file: /mnt/vcpkg/packages/libcap_x64-linux/debug/lib/pkgconfig/libcap.pc
-- Fixing pkgconfig file: /mnt/vcpkg/packages/libcap_x64-linux/debug/lib/pkgconfig/libpsx.pc
-- Installing: /mnt/vcpkg/packages/libcap_x64-linux/share/libcap/copyright
-- Performing post-build validation
Failed to store binary cache /home/monica/.cache/vcpkg/archives/ae/ae13fb267afd657212e4ba63687e4de6cc632a955f7c2aa2ae4fa9f0c892cda9.zip
No such file or directory
Stored binaries in 0 destinations in 16 ms.
Elapsed time to handle libcap:x64-linux: 3.2 s
libcap:x64-linux package ABI: ae13fb267afd657212e4ba63687e4de6cc632a955f7c2aa2ae4fa9f0c892cda9
Total install time: 3.2 s
libcap provides pkg-config modules:

  # libcap - linux capabilities library
  libcap

  # libpsx - linux posix syscall API for pthreads
  libpsx

Thank you for your fast answer (I really appreciate it) and you're right it works in INSTALL mode as you can see below BUT (see below)
bha@WL2100156:~/pro/vcpkg$ ./vcpkg version
vcpkg package management program version 2024-04-23-d6945642ee5c3076addd1a42c331bbf4cfc97457
See LICENSE.txt for license information.
bha@WL2100156:~/pro/vcpkg$ ./vcpkg install libcap
Computing installation plan...
The following packages will be built and installed:
<EMAIL_ADDRESS>Detecting compiler hash for triplet x64-linux...
Compiler found: /usr/bin/c++
Restored 0 package(s) from /home/bha/.cache/vcpkg/archives in 9 us. Use --debug to see more details.
Installing 1/1<EMAIL_ADDRESS>Building<EMAIL_ADDRESS>-- Downloading https://www.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz;https://www.mirrorservice.org/sites/ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2/libcap-2.69.tar.xz -> libcap-2.69.tar.xz...
-- Extracting source /home/bha/pro/vcpkg/downloads/libcap-2.69.tar.xz
-- Using source at /home/bha/pro/vcpkg/buildtrees/libcap/src/libcap-2-46d2f5c326.clean
-- Getting CMake variables for x64-linux-dbg
-- Getting CMake variables for x64-linux-rel
-- Configuring x64-linux-dbg
-- Configuring x64-linux-rel
-- Building x64-linux-dbg
-- Installing x64-linux-dbg
-- Building x64-linux-rel
-- Installing x64-linux-rel
-- Fixing pkgconfig file: /home/bha/pro/vcpkg/packages/libcap_x64-linux/lib/pkgconfig/libcap.pc
-- Fixing pkgconfig file: /home/bha/pro/vcpkg/packages/libcap_x64-linux/lib/pkgconfig/libpsx.pc
-- Fixing pkgconfig file: /home/bha/pro/vcpkg/packages/libcap_x64-linux/debug/lib/pkgconfig/libcap.pc
-- Fixing pkgconfig file: /home/bha/pro/vcpkg/packages/libcap_x64-linux/debug/lib/pkgconfig/libpsx.pc
-- Installing: /home/bha/pro/vcpkg/packages/libcap_x64-linux/share/libcap/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 12.4 ms.
Elapsed time to handle libcap:x64-linux: 19 s
libcap:x64-linux package ABI: 0b899be2f26cc23e17fcf37ae97d51f3f56fb0737a215a1fa76b55adce180027
Total install time: 19 s
libcap provides pkg-config modules:
libcap - linux capabilities library
libcap
libpsx - linux posix syscall API for pthreads
libpsx
bha@WL2100156:~/pro/vcpkg$
========> on the SAME computer in MANIFEST mode i got: <=======================
Installing 38/102<EMAIL_ADDRESS>Building<EMAIL_ADDRESS>/home/bha/.cache/vcpkg/registries/git-trees/23bb9f2743e684bacba57b8cc8a931756f0e7447: info: installing overlay port from here
-- Downloading https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz -> libpcap-2.69.tar.gz...
[DEBUG] To include the environment variables in debug output, pass --debug-env
[DEBUG] Trying to load bundleconfig from /home/bha/pro/vcpkg/vcpkg-bundle.json
[DEBUG] Failed to open: /home/bha/pro/vcpkg/vcpkg-bundle.json
[DEBUG] Bundle config: readonly=false, usegitregistry=false, embeddedsha=nullopt, deployment=Git, vsversion=nullopt
[DEBUG] Metrics enabled.
[DEBUG] Feature flag 'binarycaching' unset
[DEBUG] Feature flag 'compilertracking' unset
[DEBUG] Feature flag 'registries' unset
[DEBUG] Feature flag 'versions' unset
[DEBUG] Feature flag 'dependencygraph' unset
[DEBUG] 1000: execute_process(curl --fail -L https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz --create-dirs --output /home/bha/pro/vcpkg/downloads/libpcap-2.69.tar.gz.25970.part)
[DEBUG] 1000: cmd_execute_and_stream_data() returned 22 after   157249 us
error: Failed to download from mirror set
error: https://git.kernel.org/pub/scm/libs/libcap/libcap.git/snapshot/libcap-3c7dda330bd9a154bb5b878d31fd591e4951fe17.tar.gz: curl failed to download with exit code 22
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
curl: (22) The requested URL returned error: 403 Forbidden
[DEBUG] /source/src/vcpkg/base/downloads.cpp(997):
[DEBUG] Time in subprocesses: 157249us
[DEBUG] Time in parsing JSON: 4us
[DEBUG] Time in JSON reader: 0us
[DEBUG] Time in filesystem: 208us
[DEBUG] Time in loading ports: 0us
[DEBUG] Exiting after 158 ms (157618us)
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:32 (message):
  Failed to download file with error: 1
  If you are using a proxy, please check your proxy setting. Possible causes are:

  1. You are actually using an HTTP proxy, but setting HTTPS_PROXY variable
     to `https://address:port`. This is not correct, because `https://` prefix
     claims the proxy is an HTTPS proxy, while your proxy (v2ray, shadowsocksr
     , etc..) is an HTTP proxy. Try setting `http://address:port` to both
     HTTP_PROXY and HTTPS_PROXY instead.

  2. If you are using Windows, vcpkg will automatically use your Windows IE Proxy Settings
     set by your proxy software. See https://github.com/microsoft/vcpkg-tool/pull/77
     The value set by your proxy might be wrong, or have same `https://` prefix issue.

  3. Your proxy's remote server is out of service.

  If you've tried directly download the link, and believe this is not a temporary
  download server failure, please submit an issue at https://github.com/Microsoft/vcpkg/issues
  to report this upstream download server failure.

Call Stack (most recent call first):
scripts/cmake/vcpkg_download_distfile.cmake:270 (z_vcpkg_download_distfile_show_proxy_and_fail)
/home/bha/.cache/vcpkg/registries/git-trees/23bb9f2743e684bacba57b8cc8a931756f0e7447/portfile.cmake:1 (vcpkg_download_distfile)
scripts/ports.cmake:175 (include)
error: building libcap:x64-linux failed with: BUILD_FAILED
Elapsed time to handle libcap:x64-linux: 442 ms
Please ensure you're using the latest port files with git pull and vcpkg update.
Then check for known issues at:
https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libcap
You can submit a new issue at:
https://github.com/microsoft/vcpkg/issues/new?title=[libcap]+Build+error+on+x64-linux&body=Copy+issue+body+from+%2Fhome%2Fbha%2Fbld%2Fevs-hwfw-sb-xts-lin%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md
-- Running vcpkg install - failed
REMARK: This last test has been made on WSL2 ubuntu 20.4. My previous test was on a native pc with ubuntu 20.4
bha@WL2100156:~/pro/vcpkg$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.6 LTS
Release:        20.04
Codename:       focal
bha@WL2100156:~/pro/vcpkg$

This is not caused by the mode, but by your manifest using an old baseline or override version.

It seems that the very last base line 37630acd98740f98d7e51da78c9630758835037f does no more include the linenoise-ng lib but i need this one to build my app ??!!???
Do you know why this one has been removed and/or can you put it back in the official repository ?
{
"name": "linenoise-ng",
"version-string": "4754bee2d8eb3",
"port-version": 3,
"description": "A small, portable GNU readline replacement for Linux, Windows and MacOS which is capable of handling UTF-8 characters.",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
]
}

https://github.com/microsoft/vcpkg/pull/37492#issuecomment-2008192503 says: Port needs fixes, upstream is gone.
Note that you can still use the existing version in manifest mode.

Ok
Le jeu. 30 mai 2024 à 11:13, Kai Pastor @.***> a écrit :

This is not caused by the mode, but by your manifest using an old baseline
or override version.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vcpkg/issues/38981#issuecomment-2139116218,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACFBQV2S3T62ENMB5XN6QTTZE3UVLAVCNFSM6AAAAABIMYMEASVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZZGEYTMMRRHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Great work, thank you for the help. I'm now struggling with my system to validate all this

All is ok now, thx !
Have a nice week end


Fix 502 Bad Gateway + Fix html files no data

#356 https://github.com/r0oth3x49/udemy-dl/issues/359

@brundidge thank you so much for your contribution can you please tell me how can i reproduce so that i can merge the request because i 'm not able to reproduce with the courses i have but i will check again.

@r0oth3x49 Check your email nas**292 @ gmail.com, please

@brundidge thank you so much for your contribution :smiley:


Add C++ Solution for Problem Of The Day | 11 November 2022

@ImSaMPro assign this

@ImSaMPro  will add till 5:30


Options at "The End" of a story

When you reach the end of a story...

The option to give feedback is not clickable.
Each option could use an icon, something to make them distinct.
** Circular arrow for "replay"
** Pencil for feedback
** Back arrow or search for "find another"

Fixed all. Feedback is now linked to Contact form. Contact form uses mailto to send feedback. It'll do for now. Also added icon to Sign component and signs at "The End."


Integration not working anymore, failed to start

Starting from 2nd october the integration is not able anymore to start

Checking debug log this is relevant lines:
2023-10-06 22:13:28.819 DEBUG (MainThread) [custom_components.toyota] The car is reporting data in metric
2023-10-06 22:13:31.965 ERROR (MainThread) [custom_components.toyota] Error fetching toyota data: HTTP: 400 - {"timestamp":1696623211942,"status":400,"error":"Bad Request","message":"No device associated with VIN","errorCode":"CMA400"}
2023-10-06 22:13:31.966 DEBUG (MainThread) [custom_components.toyota] Finished fetching toyota data in 7.722 seconds (success: False)
Please let me know if you need more details, I'm glad to help :)
Best regards

Same issue

Same issue

+1

Any feedback on this one? This integration is completely broken in my setup.

Just few people encounter this trobuble?

Same. It works very unstable, constantly losing connection.

+1, stopped working 2-3 weeks ago.

+1, same problem here!

Same for me...
2023-10-25 20:54:40.786 ERROR (MainThread) [custom_components.toyota] Error fetching toyota data: Update canceled! Toyota's API was too slow to respond. Will try again later...

Again ...
Logger: custom_components.toyota
Source: helpers/update_coordinator.py:322
Integration: Toyota Connected Services (documentation, issues)
First occurred: 9:40:29 AM (6 occurrences)
Last logged: 9:48:19 AM
Error fetching toyota data: Update canceled! Toyota's API was too slow to respond. Will try again later...

I am still receiving this error even on the latest master. "HTTP: 400 - {"timestamp":1700492682007,"status":400,"error":"Bad Request","message":"No device associated with VIN","errorCode":"CMA400"}"
However if debug logging is enabled, the car details and sensors data are shown for only one of my cars registered on the new MyToyota app.

It doesn´t work for me either, but with a different message :
Source: custom_components/toyota/init.py:89
Integration: Toyota Connected Services (documentation, issues)
First occurred: November 22, 2023 at 16:31:26 (928 occurrences)
Last logged: 10:42:58
Please setup Connected Services if you want live data from the car. (********)

It doesn't work for me to.
I installed the last version 1.3.0, i'm able to do the login but the integration doesn't work with this message "failed to setup"
I tryed to reinstall the intergration and to restart HA with the same issue.

HA Version

Same here!

+1.
Getting "Failed to setup" after completing setup process and entering username/password.
No additional info in logs this time.

Presumably the old API endpoints are gradually being switched off or neglected by Toyota. It is unlikely that we will make a fix for this.
The next goal is to switch to the new Toyota API endpoints.

That is funny, since I have been migrated to new Toyota App at least month ago. The old one doesn't work anymore for me.

That is funny, since I have been migrated to new Toyota App at least month ago. The old one doesn't work anymore for me.

Sorry, I don't understand. What's so funny about that?

Well, I would expect it to work as intended after migration on Toyota side and new version of component here, but it fails, and are bit confused what might be the cause.

Well, I would expect it to work as intended after migration on Toyota side and new version of component here, but it fails, and are bit confused what might be the cause.

Why should that work? We are in no way officially affiliated with Toyota and there is no official documentation of the API endpoints.
For these reasons, the Home Assistant component has not yet been converted to the new API endpoints.
We are currently still gaining our knowledge through trial and error and will probably only be able to start adapting the Home Assistant component to the new endpoints in the next few weeks.

I just add myself to the list with my Toyota Corolla :) Version 1.3 -> new app.

same issue, yaris cross - v 1.3 - new app

chiming in...RAV4, new app

Same. CH-R  v1.3

Same here, RAV4
2024-01-02 13:15:22.909 DEBUG (MainThread) [custom_components.toyota] Finished fetching toyota data in 0.947 seconds (success: False)
2024-01-02 13:15:29.719 DEBUG (MainThread) [custom_components.toyota] Finished fetching toyota data in 1.037 seconds (success: False)
2024-01-02 13:15:42.132 DEBUG (MainThread) [custom_components.toyota] Finished fetching toyota data in 1.467 seconds (success: False)

Same issue with yaris cross - v 1.3 - new app

Same for me with v 1.3. …..failed to setup.
Authentication works because if I use the wrong password I get an error message.

From my side, the pull request with the changes for the new Toyota API would be ready for merging: https://github.com/DurgNomis-drol/ha_toyota/pull/198
Currently I'm just waiting until @DurgNomis-drol has time for a review to approve the PR.
But if you want, you can already test it manually. 😊

Unfortunately also with v2.0.0 still not working

 Unfortunately also with v2.0.0 still not working

I had the same issue. I resolved it by first deleting the old integration from integrations and HACS, then rebooted HA fully and once done added the addon to HACS again and then in the integration and now it completely works fine.

Unfortunately also with v2.0.0 still not working

Someone else who hasn't read the changelog properly https://github.com/DurgNomis-drol/ha_toyota/releases/tag/v2.0.0 😉 😛


Optimize Headers put and ++ using ListBuffer

I'm opening this as a draft for now, as I have some questions.

There's some repetition here, which is done to optimize for performance. Is it worth the added lines? I'd like to think so, as this file hasn't been changed much over time, and the functionality is fairly basic, but if you disagree, I can remove some of it.
Is changing "appended to "prepended" in Message.addHeader actually a non-breaking change? As far as I can tell, the order doesn't actually matter, and prepending that is more efficient (the number of header values we already have are likely to be larger than the number of header values we're adding), but...
We could keep track of header names in a mutable set internally, which would remove the need for an extra traversal in !headers.exists(_.name == thatHeaderName), but would that be worth doing, in terms of added code, memory usage, and mutable state? I haven't done any benchmarks on this, yet.
Not directly related to this PR, but I'm wondering if there's any interest in considering something different than a List for val headers: List[Header.Raw], as it's not a great choice if we want efficient append while also replacing previous values. Maybe a multimap or other data structure would be more appropriate, as the order doesn't seem to actually matter?

As for the benefit, this improves plaintext performance on Techempower benchmarks from 308k req/s to 314k req/s, which isn't huge but not insignificant for that benchmark, as it's using almost no headers.
The result matches my expectations based on profiling, where this headers stuff take a small, yet surprisingly large amount of time (about 2% of total CPU time).
EDIT: Test failures may have answered question 2. Might still be worth considering for 1.x if we don't go for 4.

Looks like some tests rely on the order of the headers, but maybe they shouldn't, so I'm awaiting feedback before making any further changes.

Is changing "appended to "prepended" in Message.addHeader actually a non-breaking change?

I'm not as familiar with the HTTP specs as other folks here, but I'm pretty sure this is a breaking change and the order matters

The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.

https://www.rfc-editor.org/rfc/rfc2616#section-4.2

The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.

https://www.rfc-editor.org/rfc/rfc2616#section-4.2

That's with the same field name, though. That could be done with a Map[String, List[String]], for example, right? vert.x, Netty HTTP, Undertow, and many other frameworks use maps to store headers, so I think http4s should be able to do so as well.

@wjoel in light of https://github.com/http4s/http4s/pull/6578#discussion_r942508403 seems the preference is to preserve header order. Can we still do some optimizations here with that restriction?

@armanbilge it might be possible to rework this PR to preserve order while still using ListBuffer, at least.
But for 1.0 I'd really, really like to move away from using a List to represent headers, and instead use something like Map[String, List[String]] (or at least something map-like), and not give any guarantees about the order. I don't think lists are particularly nice for this purpose, and searching through it over and over again to find certain headers is really inefficient. And it's really inefficient to search through it to the end to append headers as well.
At work we have a lot of headers on requests that have passed through an API gateway and auth service, and I think that's only going to be more common in the future (as API gateways and microservice architectures become more popular), so I think efficiency does matter here.

Please excuse a humble question from a random person on the internet:

move away from using a List to represent headers, and instead use something like Map[String, List[String]]

Is it really either/or? Could we have

List[Header.Raw] as the underlying, order preserving representation of headers (or Vector or something else sequence-like, whatever comes up good in benchmarks)
Map[String, List[String]] (or Map[String, Vector[String]] or ...) as a lazy val, which will get computed only at the first time somebody want to search for particular header names(s)
?

There's nothing to excuse, I'm just a random person as well. :)
The problem with keeping List as the underlying representation is that http4s searches for headers like Keep-Alive on every request, and any non-trivial use of http4s will use middlewares like CORS which searches for Vary on every response, so in reality that lazy val would practically always be computed.
In addition, if the List was the underlying representation, all the "add this header" operations would still be O(n) (and there are many of those in our middlewares).
Some of the searches could perhaps be removed, and some of the appends be aggregated in middlewares like CORS, but that's just working around the use of List and it would require every middleware author to be aware of the implementation of headers and the cost or various operations. The need for such work arounds is, in my opinion, an indication that List isn't a good choice here. If Map (or something with similar operation costs) was used instead, there would be less to worry about.

OK, so if I understand the issue correctly, we often need to append to headers (at the end), which is O(n) with List. So why not then use Vector[Header.Raw]? And have the Map as a lazy val as I've described above.

Or, as per https://www.rfc-editor.org/rfc/rfc2616#section-4.2

The order in which header fields with differing field names are
received is not significant. However, it is "good practice" to send
general-header fields first, followed by request-header or response-
header fields, and ending with the entity-header fields.

have just Map[String, Vector[String]]...
:shrug:

Or, as per https://www.rfc-editor.org/rfc/rfc2616#section-4.2

The order in which header fields with differing field names are
received is not significant. However, it is "good practice" to send
general-header fields first, followed by request-header or response-
header fields, and ending with the entity-header fields.

have just Map[String, Vector[String]]... shrug

Indeed, why not just use Map so we get efficient lookups and adds, is what I'm saying. :)

Yep, you and the RFC have convinced me :smile_cat: So Map[String, Vector[String]] in the end?

That makes two random people on the Internet who thinks that would be a good idea (at least for 1.0, where we can still make breaking changes until it's released), but I don't know if there's any consensus among http4s maintainers on this. Doesn't seem like it, but I don't know.

FWIW I don't see why it's bad idea and it does match the spec, so I would approve such a PR targeted at main. I wouldn't feel confident enough to merge it though 😅

Hey, is there any way we can progress this and merge into 0.23.x? I've done some profiling and indeed it seems like adding headers is obscenely expensive 😅
We have this basic middleware that simply replaces the Server header that Jetty appends by default:
object ResponseHeaderCleanerMiddleware {

  final private[this] val ServerHeader = Server(ProductId("Permutive"))

  /**
    * Overwrites `Server` header to avoid Jetty filling it with its version.
    * This is to reduce risk of exploit based on known vulnerabilities of the HTTP server.
    */
  def apply[F[_]](app: HttpApp[F])(implicit f: Functor[F]): HttpApp[F] =
    app.map { response =>
      response.putHeaders(ServerHeader)
    }

}

And this one tiny putHeaders call results in the following stack trace and approx 16% of memory allocations in the span of 5 minutes:

Btw, maybe it should be Map[String, NonEmptyVector[String]], because if the header name is in the map, the values are guaranteed to be there. We do have NonEmptyVector available, right?

Hey @wjoel, is there any way we can progress this and merge into 0.23.x? I've done some profiling and indeed it seems like adding headers is obscenely expensive sweat_smile
...
And this one tiny putHeaders call results in the following stack trace and approx 16% of memory allocations in the span of 5 minutes:

Yes, it's pretty wild, isn't it? Thanks for confirming what I saw all those months ago, and for reminding me of just how bad this is. :)
I'll resume work on this PR today and/or tomorrow, and try to make it pass the tests as they are, perhaps creating another PR that removes the order preservation of the headers (which is controversial to some, but not me).

@CremboC did you try running that test with the changes in this PR, btw?

Since this no longer includes the potentially controversial reordering of headers, and passes all (non-flaky) tests, I believe it is ready for review.
I still believe the order in which headers are added shouldn't be respected by http4s (as it's not respected by the HTTP specification), and I don't think List is a good choice to model headers, but that can be discussed/changed in other PRs.

hey @wjoel unfortunately I cannot run the code in the same environment I ran earlier (where I provided the flamegraph). Best second thing I could do is running the benchmark I added in https://github.com/http4s/http4s/pull/6718, together with JFR enabled -prof jfr. It seems like in that particular test there isn't any noticable difference in performance or memory allocations unfortunately! It's perfectly plausible there is a difference in other tests, however.

hey @wjoel unfortunately I cannot run the code in the same environment I ran earlier (where I provided the flamegraph). Best second thing I could do is running the benchmark I added in #6718, together with JFR enabled -prof jfr. It seems like in that particular test there isn't any noticable difference in performance or memory allocations unfortunately! It's perfectly plausible there is a difference in other tests, however.

No worries, your benchmarks were still somewhat useful, I found a mistake on my part and made some minor improvements with their help. It's not surprising that you didn't see much of a difference on them as they are, but it gets slightly more interesting if you add more than one Content-Length (then the improved check to see if it must be replaced is useful), or even just moving that one to the end seems to make a difference.
I see quite a bit of variance on those benchmarks (in part, I believe, because it makes a difference depending on which Ryzen core ends up being used), even after I upped it to 10 warmups and 10 iterations, but:
main, single content-length (first):
[info] Benchmark                Mode  Cnt     Score    Error  Units
[info] HeadersBench.putHeaders  avgt   10  1032.155 ± 90.169  ns/op
main, single content-length (last):
[info] Benchmark                Mode  Cnt    Score    Error  Units
[info] HeadersBench.putHeaders  avgt   10  908.060 ± 11.742  ns/op
main, two content-length (first, and last):
[info] Benchmark                Mode  Cnt     Score     Error  Units
[info] HeadersBench.putHeaders  avgt   10  1329.752 ± 107.671  ns/op

This PR, single content-length (first):
[info] Benchmark                Mode  Cnt    Score    Error  Units
[info] HeadersBench.putHeaders  avgt   10  752.709 ± 16.718  ns/op
This PR, single content-length (last):
[info] Benchmark                Mode  Cnt    Score     Error  Units
[info] HeadersBench.putHeaders  avgt   10  872.468 ± 179.501  ns/op
This PR, two content-length (first, and last):
[info] Benchmark                Mode  Cnt     Score   Error  Units
[info] HeadersBench.putHeaders  avgt   10  1185.210 ± 4.789  ns/op

... and test failures tell me that .from isn't available on Scala 2.12, so I'll have to continue this another day. I'd like to re-run a full TFB test for plaintext, as well.

Going to have to run some more real-world(ish) benchmarks tomorrow, currently this isn't looking too great, although the lowered gc isn't bad, and might make a bigger difference on end-to-end benchmarks.
Using ++2.13 bench/jmh:run -i 10 -wi 5 -f 1 -t 1 -prof gc org.http4s.bench.HeadersBench in sbt shell with two content-length headers (first, and last):
This PR
Benchmark                                             Mode  Cnt     Score     Error   Units
HeadersBench.putHeaders                               avgt   10  1511.238 ± 224.235   ns/op
HeadersBench.putHeaders:·gc.alloc.rate                avgt   10  3942.249 ± 574.347  MB/sec
HeadersBench.putHeaders:·gc.alloc.rate.norm           avgt   10  6504.000 ±   0.001    B/op
HeadersBench.putHeaders:·gc.churn.G1_Eden_Space       avgt   10  3944.447 ± 574.498  MB/sec
HeadersBench.putHeaders:·gc.churn.G1_Eden_Space.norm  avgt   10  6507.717 ±  44.131    B/op
HeadersBench.putHeaders:·gc.churn.G1_Old_Gen          avgt   10     0.011 ±   0.003  MB/sec
HeadersBench.putHeaders:·gc.churn.G1_Old_Gen.norm     avgt   10     0.019 ±   0.004    B/op
HeadersBench.putHeaders:·gc.count                     avgt   10   475.000            counts
HeadersBench.putHeaders:·gc.time                      avgt   10   313.000                ms

main:
Benchmark                                             Mode  Cnt     Score      Error   Units
HeadersBench.putHeaders                               avgt   10  1215.887 ±  246.980   ns/op
HeadersBench.putHeaders:·gc.alloc.rate                avgt   10  4957.511 ± 1022.279  MB/sec
HeadersBench.putHeaders:·gc.alloc.rate.norm           avgt   10  6528.000 ±    0.001    B/op
HeadersBench.putHeaders:·gc.churn.G1_Eden_Space       avgt   10  4967.840 ± 1008.995  MB/sec
HeadersBench.putHeaders:·gc.churn.G1_Eden_Space.norm  avgt   10  6543.204 ±   93.237    B/op
HeadersBench.putHeaders:·gc.churn.G1_Old_Gen          avgt   10     0.011 ±    0.005  MB/sec
HeadersBench.putHeaders:·gc.churn.G1_Old_Gen.norm     avgt   10     0.015 ±    0.005    B/op
HeadersBench.putHeaders:·gc.count                     avgt   10   494.000             counts
HeadersBench.putHeaders:·gc.time                      avgt   10   356.000                 ms

Where "first, and last" means:
  @Benchmark
  def putHeaders: Response[IO] =
    baseMessage
      .putHeaders(`Content-Length`(1000L))
      .putHeaders(`Content-Encoding`(ContentCoding.gzip))
      .putHeaders(Server(ProductId("Benchmark")))
      .putHeaders(`Content-Length`(100L))

Some numbers from (sorry) TechEmpower Framework Benchmarks. Starting with 0.23 (main, this PR, 0.23.15), the results are:
main 0.23 0.23.16-26-6b0a05e-SNAPSHOT
512 json Requests/sec: 156496.53
4096 plaintext Requests/sec: 187207.02

faster-headers 0.23.16-30-c93c7a9-SNAPSHOT
512 json Requests/sec: 158389.16
4096 plaintext Requests/sec: 189174.36

0.23.15
256 json Requests/sec: 154661.20
4096 plaintext Requests/sec: 190817.51

Practically no difference, I'd say it's within the margin of error. Possibly a slight improvement.
Moving on to 1.0.0, and this pretty much https://github.com/wjoel/FrameworkBenchmarks/tree/actually-faster-http4s but adjusted to use ByteVector instead of Chunk.array:
1.0.0-M37
512 json Requests/sec: 231400.15
4096 plaintext Requests/sec: 263929.75
1.0.0-M37 faster-headers 1.0-23151b7-20220928T183554Z-SNAPSHOT
512 json Requests/sec: 234754.53
4096 plaintext Requests/sec: 261429.34

Basically a tie, running those benchmarks more than once could well change the numbers by a few thousands one way or the other.
In case we're limited by other things, I ran the benchmarks with http4s-netty-server (compiled from main, as it's not yet released for 1.0.0-M37):
1.0.0-M37 Netty faster-headers
512 json Requests/sec: 427374.49
1024 plaintext Requests/sec: 582823.48
4096 plaintext Requests/sec: 503303.61

1.0.0-M37 Netty
512 json Requests/sec: 435923.12
1024 plaintext Requests/sec: 581189.77
4096 plaintext Requests/sec: 507361.20

In this case, plaintext gets its best result on 1024 concurrent connections, but I'm including the result for 4096 for reference. Those results may hint at this PR making things slightly slower, but bigger numbers in general gives a bigger margin of error, so I'm not confident in calling a winner here, either.
Now, let's take a moment and appreciate how far we've come from 0.23, and the incredible raw potential of http4s-netty-server.
I think the next step would be to create a benchmark that uses more headers, by which I mean a realistic amount, as might be sent from a web browser or an API gateway, perhaps something like 10-30. The benchmarks above use only 2-3, so it's not too surprising that this PR doesn't make a big difference. It would also be interesting to see if combining this with #6718 changes the results in a significant way.
On the other hand, before reverting the change to use prepend for headers, this PR did make a big difference, so it might also be interesting to look at what bringing that back could do. If prepend was used, it would also allow for better optimizations if we had a Set of header names already added, as in those case we can completely avoid looping through the current list of headers (we just prepend the new one if its header name is not in that Set).
The current conclusion with regards to this PR, in my opinion, is that although it doesn't make performance worse, it doesn't make it demonstrably better either, so it's not worth the added complexity as it stands right now.

The current conclusion with regards to this PR, in my opinion, is that although it doesn't make performance worse, it doesn't make it demonstrably better either, so it's not worth the added complexity as it stands right now.

I appreciate the straightforward take. Basically we are going to need more drastic changes which have controversial compatibility implications 😕

Closing this as the proposed optimization didn't do much, if anything. More radical changes should be considered for 1.0.0.


Add comparisons and measurements to code quality tests

cc @sashavor :)

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint.


Removes duplicate ID in 'spo listitem' commands. Closes #2024

Removes duplicate ID in 'spo listitem' commands. Closes #2024

Merged manually


prepare_query/3 for Repo.one()

Hello,
I just noticed that prepare_query/3 does not support Repo.one().
Is there a reason for this? Is this something that could be supported?
Thank you for your very valuable work on Ecto!

Hi @dbi1. prepare_query should definitely be invoked for Repo.one. Can you please tell us why you think it does not and provide a way to reproduce the issue alongside your Ecto versions? Thank you!

Just tried this locally:
defmodule Bytepack.Repo do
  use Ecto.Repo,
    otp_app: :bytepack,
    adapter: Ecto.Adapters.Postgres

  def prepare_query(op, query, opts) do
    IO.inspect {op, query, opts}
    {query, opts}
  end
end

iex(1)> Bytepack.Repo.one Bytepack.Accounts.User
{:all, #Ecto.Query<from u0 in Bytepack.Accounts.User, select: u0>, []}

So it is working, please make sure you are on latest. :)

Ah, great, thanks :)
My question came from reading the documentation, and seeing this:
"when operation: :all | :update_all | :delete_all | :stream"
I assumed there was a limit to which Repo.xxx operations were allowed for prepare_query/3.
Would it be reasonable to assume that prepare_query/3 should work with all Repo.xxx operations that take a queryable as the first argument?

Hmm, I guess I misunderstood, my apologies.
Further down it says: "This callback is invoked for all query APIs, including the stream function, but it is not invoked for insert_all nor any of the schema functions."

Repo.one is ultimately a Repo.all. perhaps it is more intuitive to think about :all being the same as SELECT. :)

Ah, got it, thanks for the patient explanation :)