Added setting to obtain the correct calendar ID autonomously.

Removed calendarId: users now should not need to enter the calendar ID manually anymore since the script tries to build it or to obtain it from the Calendar API.
Closes #89.

The "approve" was for the suggested changes from reading the commit only. I haven't done any battle-testing because especially if you already have, I think it is redundant. One last nitpick (extreme nitpick, so I won't mark "Changes Requested") -
s/enabled it  and that/enabled it and that/

(two spaces between it -> and).

I am running some more tests right now: if anyone wants to test it as well I'll take absolutely no offence 😉

FWIW: I am also running this (actually the v4.0.0 branch rebased on top of this, so it includes all recent commits) without problems. unitTests() passed, test() works fine. It worked fine with all the different setting.user.eventSource variations you tested, as per your comment (it correctly failed with RandomString). My calendar is set to contacts-only, I have no Google+.


vagrant install guide errors

The install guide contains the following errors:
Diagram reference is missing: https://github.com/stephenrlouie/gemini_images/blob/master/high-level.png
Move demo to a section near the bottom and add a reference to it. Although most dev's will not use the demo, but I think it's still important to have.
Create a table of contents for items in Overview to the associated item:
Ex>
##### Overview
[Headers](#headers)
[Emphasis](#emphasis)
...snip...
<a name="headers"/>
## Headers

A good reference: https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
Change Pull the cent image a to Pull the centos image. (specify the os details such as version).

We have to pull the cent image because that is the build image, I'll update the name so its cent6.7, We don't pull the coreos image, we only fetch the vmlinuz, and PXE files.

@stephenrlouie as you can see, I merged #10. Please review the vagrant readme. Looks like the diagram is still missing. Please add the diagram or remove the section. Thanks!

@danehans Can we close this?


Not able to Login in PacBot Dashboard

❔ Question
I have build source code in Development Dashboard but not able to log in using the Provided credential.
•	Admin User<EMAIL_ADDRESS>/ pacman
•	Readonly User<EMAIL_ADDRESS>/ user

It is giving me authentication failed error please help.

can you follow steps to resolve your issue
https://github.com/tmobile/pacbot/wiki/FAQS#how-can-i-add-a-new-user-
https://github.com/tmobile/pacbot/issues/19

Hi, I have installed PacBot successfully. But, not able to access the PacBot dashboard.
where I can check the login failed error logs?
Below you can see the services are created properly still facing the PacBot dashboard log-in issue.

I have installed all required dependencies and use requires polices still facing login issues.

How can I solve the above issues?

@c2c-engg-20170105
Normally after installation it would take a couple of minutes for APIs to start. So even after 10-15 minutes of installation, if you are not able to login then there might be some issue.
Steps to debug:

Go to ECS-> Pacbot-> Tasks
Click on Config and go to the bottom of the page to see the container details
Click on Cloud-watch log and check if there is any error
(You can also directly go to the CW log streams /pacbot/apis, and check config and auth tasks log)

If you are not finding any error in the logs, please take the url in the browser
http://{ALB domain}/api/admin/api.html
and check if you can access it or not.

Hi ,
I have cloned the PacBot source code from the GitHub again and try to install PacBot.
It is giving error.

I want to check the detail error But, the error log file is not available.
Kindly please help me.

Can you send me the terraform_install.log file?

I have deleted all resources the code is working fine and error log also generating.

so your problem solved?

yes, the problem is solved...

Good!
Thank you for contacting us. Please close this issue and feel free to reopen if you find any?

@sajeer-nooh Thank you for your reply
I have followed the below steps:
Go to ECS-> Pacbot-> Tasks
Click on Config and go to the bottom of the page to see the container details
Click on Cloud-watch log and check if there is any error
(You can also directly go to the CW log streams /pacbot/apis, and check config and auth tasks log)
If you are not finding any error in the logs, please take the url in the browser
http://{ALB domain}/api/admin/api.html
in pacbot task, I haven't got any error.
but when I hit the http://{ALB domain}/api/admin/api.html

@sajeer-nooh  If she still face issue, please get into call and help her in setting up PacBot.

@c2c-engg-20170105
Are you still facing issue with login other than this, https://github.com/tmobile/pacbot/issues/393?

Are you still facing issue with login other than this, #393?

Yes, unable to login in pacbot dashboard

The problem of login in dashboard is solved

I am facing the same issue, can you please provide some details how it was solved?


GZip error

I am getting the following error on running the train.py file:
File "train_models.py", line 110, in <module>
    train(MNIST(), "models/mnist", [32, 32, 64, 64, 200, 200], num_epochs=50)
  File "/users/btech/ananyag/Desktop/ugp/nn_robust_attacks/setup_mnist.py", line 49, in __init__
    train_data = extract_data("data/train-images-idx3-ubyte.gz", 60000)
  File "/users/btech/ananyag/Desktop/ugp/nn_robust_attacks/setup_mnist.py", line 23, in extract_data
    bytestream.read(16)
  File "/usr/lib/python3.8/gzip.py", line 292, in read
    return self._buffer.read(size)
  File "/usr/lib/python3.8/_compression.py", line 68, in readinto
    data = self.read(len(byte_view))
  File "/usr/lib/python3.8/gzip.py", line 479, in read
    if not self._read_gzip_header():
  File "/usr/lib/python3.8/gzip.py", line 427, in _read_gzip_header
    raise BadGzipFile('Not a gzipped file (%r)' % magic)
gzip.BadGzipFile: Not a gzipped file (b'<!')

Can anyone please suggest the solution?

Probably data/train-images-idx3-ubyte.gz is an HTML file if I had to guess. If you just cat data/train-images-idx3-ubyte.gz you'll probably see somethingl ike <!DOCTYPE html> given what those first two bytes are. Assuming this is the case, you'll want to get a correct version of this file. (Or, if the link used in this repo has now gone stale, please let me know and I'll update it.)

Yes, the file is an HTML file. I am using the file from your repo only, so if you could check the link once, it would be extremely helpful.


Consider supporting AWS spot instances for controller nodes

Currently we support AWS spot instances for worker pools but not for controller nodes.
We should consider whether supporting spot instances for controller nodes makes sense.

I don't think it makes sense for production. I've run 100% of workers on spot instances for several years, and cost-wise the trade-off was not worth it for controllers (you can just reserve those, you normally don't need to change the instance type of controllers, as you normally use the same controller instance type to handle clusters from 10 nodes to ~100 nodes).
It might make sense for our CI to use spot for controllers (specially if we use spot instance types that are guaranteed to live for at least X hours) or setups alike, but I honestly don't see it useful in production.
Also, this is not trivial to add for controllers now. For workers this is trivial because we are using ASG, but for controllers we aren't (we probably should, though), and therefore is not easy to add.
So, I'd say we don't add it now, if ourselves or other users see the need, they can re-open the issue or create a new one for this.
cc @invidian that suggested the issue in #149
PS: This maybe leads to an infinite loop in after X more issues are created, but it might make sense to create an issue to use ASGs for controllers on AWS :joy:

Created https://github.com/kinvolk/lokomotive/issues/178 for ASGs for controllers on AWS.
Thanks for the explanation @rata, I think it make sense to close it for now then, if @blixtra agrees, as he was the OP of spot-instances issue.

Let's close this for now.

It might make sense for our CI to use spot for controllers (specially if we use spot instance types that are guaranteed to live for at least X hours) or setups alike, but I honestly don't see it useful in production.

I was only referring to the CI scenario.


Fixing issue with beta == 0 in AutoGemm kernels

Fixes #201
Fixes #203
Fixes kernel compilation issues of trtri on Intel platform.

@TimmyLiu This was the only place I could find the issue. Let me know if I should be looking at any other places.

@TimmyLiu We are investigating other failures that are related to this. Please hold off from merging.

@TimmyLiu The other issues we are seeing seem to be unrelated to this. We'll try to send patches for those separately.


how to set cert and key to start in HTTPS ?

Hi thanks a lot for this project
I am trying to create a qpkg for QNAP NAS and integrate it to our qpkg repository ( https://www.myqnap.org )
all is compiled fine and running with :
./taxy start --webui <IP_ADDRESS>:49492
but credential do not passed, seems due I need to go under HTTPS
also because I am on a headless NAS, localhost with --web-insecure do not help (need to force it on <IP_ADDRESS>)
Unfortunately, I can't find a way to force ssl and run on https on <IP_ADDRESS>:49492
Any chance to get this option, adding my certs and key file to command line to be able to manage it locally over https ?
Thanks a lot for your help,

Hello Stéphane.

but credential do not passed, seems due I need to go under HTTPS
also because I am on a headless NAS, localhost with --web-insecure do not help (need to force it on <IP_ADDRESS>)

I can't figure out what you want to do here.
You can simply access port 49492 from a web browser using HTTP. The headless NAS has nothig to do with this.
How did you open the WebUI? What browser do you use?

Hello
Listen with --insecure-web listen to localhost opening a browser on my computer pointing to NAS ip and port 46492 won't display the web page... using --webui <IP_ADDRESS>:46492 display the web page credential (user is added previously) but entering credential, is in loop and can't by pass credential request... (look like i need https) according the setup guide and after reading :
https://github.com/picoHz/taxy/issues/2
i am searching to make listen  --webui <IP_ADDRESS>:46492 over https and not http, but I can provide a cert and key file in command line flag, to administrate Taxy on my LAN
hope i am clear :)

Listen with --insecure-web listen to localhost opening a browser on my computer pointing to NAS ip and port 46492 won't display the web page... using --webui <IP_ADDRESS>:46492 display the web page credential (user is added previously) but entering credential, is in loop and can't by pass credential request...

You need to specify --insecure-webui and --webui together like this:
taxy start --insecure-webui --webui <IP_ADDRESS>:46492

I feel stupid, thanks a lot  :)


Update module.yaml

Fix #4872
Description
Chart 8.5.0 is updating the api version from getambassador.io/v2 to getambassador.io/v3alpha1
Related Issues
#4872
Testing
A few sentences describing what testing you've done, e.g., manual tests, automated tests, deployed in production, etc.
Checklist

[ ] Does my change need to be backported to a previous release?

What backport versions were discussed with the Maintainers in the Issue?

[ ] I made sure to update CHANGELOG.md.
Remember, the CHANGELOG needs to mention:

Any new features
Any changes to our included version of Envoy
Any non-backward-compatible changes
Any deprecations

[x] This is unlikely to impact how Ambassador performs at scale.
Remember, things that might have an impact at scale include:

Any significant changes in memory use that might require adjusting the memory limits
Any significant changes in CPU use that might require adjusting the CPU limits
Anything that might change how many replicas users should use
Changes that impact data-plane latency/scalability

[x] My change is adequately tested.
Remember when considering testing:

Your change needs to be specifically covered by tests.

Tests need to cover all the states where your change is relevant: for example, if you add a behavior that can be enabled or disabled, you'll need tests that cover the enabled case and tests that cover the disabled case. It's not sufficient just to test with the behavior enabled.

You also need to make sure that the entire area being changed has adequate test coverage.

If existing tests don't actually cover the entire area being changed, add tests.
This applies even for aspects of the area that you're not changing – check the test coverage, and improve it if needed!

We should lean on the bulk of code being covered by unit tests, but...
... an end-to-end test should cover the integration points

[ ] I updated DEVELOPING.md with any any special dev tricks I had to use to work on this code efficiently.

[ ] The changes in this PR have been reviewed for security concerns and adherence to security best practices.

thanks @haq204.
Just to know, my PR now is correct and is following the contribution rules?

thanks @haq204. Just to know, my PR now is correct and is following the contribution rules?

@pie-r yea typically the main requirement is that your commits are signed. This is a CNCF thing.  I have now rebased so things are a good.
We're working on allowing CI run on community contributions (currently there is a permissions issue in our CI that prevents this) so hopefully we will be able to get that enabled soon.
Once CI is green in #4874 we should be good to go.

ok thanks!


Investigate missing MONDO xrefs

In reference to https://github.com/monarch-initiative/monarch-app/issues/652 -
MONDO identifiers don't appear to have their corresponding OMIM IDs, or at least they don't end up in the Monarch KG.
They appear to be populated in PHENIO as expected - see https://github.com/monarch-initiative/phenio/issues/67
Are they going missing in the KG-Phenio build?

Stats for the 20240313 KG build say that only 3 OMIM nodes are there, and they are these:
OMIM:has_inheritance_type       biolink:has_attribute                   Graph                   http://purl.obolibrary.org/obo/OMIM_has_inheritance_type
OMIM:has_manifestation  biolink:superclass_of                   Graph                   http://purl.obolibrary.org/obo/OMIM_has_manifestation
OMIM:manifestation_of   biolink:manifestation_of                        Graph                   http://purl.obolibrary.org/obo/OMIM_manifestation_of

Not even real nodes!
Strangely enough, a build from the same time last year (20230313) contains the same OMIM nodes and no more.
This is what MONDO:0026765 looks like in the most recent KG-Phenio:
MONDO:0026765   biolink:Disease congenital disorder of glycosylation, type IIr          Graph   CDG IIr|CDG2R|CONGENITAL DISORDER OF GLYCOSYLATION, TYPE IIr|congenital disorder of glycosylation, type IIr, X-linked recessive         http://purl.obolibrary.org/obo/MONDO_0026765

If I look at a build from waaaay back in 2022 - xrefs are there!
MONDO:0026765   biolink:NamedThing      congenital disorder of glycosylation, type IIr                  Graph   CONGENITAL DISORDER OF GLYCOSYLATION, TYPE IIr|CDG2R|CDG IIr                                                               OMIM:301045                                                                                owl:Class

For comparison, this is what that node looks like in the most recent KG-OBO version of MONDO:
MONDO:0026765   biolink:Disease congenital disorder of glycosylation, type IIr          OMIM:301045     mondo.json      CONGENITAL DISORDER OF GLYCOSYLATION, TYPE IIr|CDG IIr|CDG2R|congenital disorder of glycosylation, type IIr, X-linked recessive     http://purl.obolibrary.org/obo/MONDO_0026765    https://omim.org/entry/301045   rare|inferred_rare

So somewhere along the way, the xrefs (and also skos?) started being ignored.

I think the transform step in which node sources are added is not including xrefs.
See https://github.com/Knowledge-Graph-Hub/kg-phenio/blob/master/kg_phenio/transform_utils/phenio/phenio_node_sources.yaml

OMIM xrefs (and others) are back in kg-phenio:
$ grep MONDO merged-kg_nodes.tsv | grep OMIM | wc -l
10359


Customizable advertising data?

could we customize the broadcast device advertising data thru js?

It's a job of your device's firmware, so it's not possible to do with this library.


[BUG] No hooks except for beforeSubmit even though they are in the docs and in @formio/js

Environment
Please provide as many details as you can:

Hosting type

[x] Form.io
[ ] Local deployment

Version:

Formio.js version:
Frontend framework:
Browser:
Browser version:

Steps to Reproduce

Expected behavior
Observed behavior
Example
If possible, please provide a screenshot, live example (via JSFiddle or similar), and/or example code to help demonstrate the issue.
For code or form JSON, please enclose in a code block:
// your code here

Duplicate: https://github.com/formio/angular/issues/1107


PHPBB 3.1

Hi, nice job :)
This style works in phpbb3.1?

I will base the next update of my forum on this style.
Danke.

Thank you :)
I hope the version for 3.1 will be finished this month :)
More here:
http://comboot.de/blog/dev/phpbb-3-1/

I know the post :D No need to be quick for me, it has no priority for me atm. ;)

To install to phpbb 3.1.3 add to style.cfg this lines:
style_version = 3.1.3
phpbb_version = 3.1.3

Yes you can use it with that line, but many things are not compatible e.g. notifications, extensions ...

@sim2github
Thanks, didn't know that.
@TheZoker
Any plans on the release?

I hope at the end of march. Its a lot of work and I have many other projects, but I will do my best :)

Is a version of the 3.1 release available anywhere yet or are you still working on it?

Its still in development.
More information here: http://comboot.io/blog/dev/phpbb-3-1/
and current status here: https://trello.com/b/qDGdzDzU/comboot-3-1

Thanks. I think trello will be sufficient to see how far the development is at the moment.

Closed beta is available: http://comboot.io/blog/beta/beta-3-1/

So if anyone of you want to be part of the closed beta, just let me know :)
The most things are fixed now, there are only some little open issues.

Hi @TheZoker,
i would to test it, i’m already signed up “Beta” on your website, and now what's happening ?

thanks !

Hi Comboot !
I can't find the beta release for phpBB 3.1.
Is there a repository with actual code to test it ?


THRIFT-4825: Aligned the TTlsSocketServerTransport with the TSocketServerTransport

Updated the existing constructor to to use default values for buffering and replaced the simplified constructor with one that allows passing in a TcpListener instance.

[X] Did you create an Apache Jira ticket?  (not required for trivial changes)
[X] Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"?  (not required for trivial changes)
[X] Did you squash your changes to a single commit?
[X] Did you do your best to avoid breaking changes?  If one was needed, did you label the Jira ticket with "Breaking-Change"

As pointed out by jeking here, should I have simply created a TcpListener instance in the port only constructor? You wouldn't be able to rethrow an exception as a TTransportException, but is that a requirement?

In these cases I typically refactor the common initialization code to a single method and call that from both constructors.  It avoids future situations where someone modifies one constructor and not the other.  This typically happens when someone adds a variable and then forgets to initialize it in one of the constructors.  Some languages help protect against this, and it's been a while since I did any meaningful C#, so maybe that's not necessary and the compiler catches it?

Unfortunately .NET does not handle this for us. I could, however, pass null to the TcpListener parameter in the chain, and then use the existing code to set the _server value. It would fix the problem.
        public TTlsServerSocketTransport(
            int port,
            X509Certificate2 certificate,
            Buffering buffering = Buffering.None,
            RemoteCertificateValidationCallback clientCertValidator = null,
            LocalCertificateSelectionCallback localCertificateSelectionCallback = null,
            SslProtocols sslProtocols = SslProtocols.Tls12)
            : this(null, certificate, buffering, clientCertValidator, localCertificateSelectionCallback, sslProtocols)
        {
            try
            {
                // Create server socket
                _server = new TcpListener(IPAddress.Any, port);
                _server.Server.NoDelay = true;
            }
            catch (Exception)
            {
                _server = null;
                throw new TTransportException($"Could not create ServerSocket on port {port}.");
            }
        }

I'd think that you would want to raise an exception if someone passed in a null TcpListener though.  I see what you mean though.  Anyway, it was just a thought.  It doesn't have to be done.  This is still an improvement as-is, I was just thinking about how to consolidate the initialization.

@jeking3 the Initializer() way would be great, but we will have to sacrifice readonly then, since readonly vars can conly be set in a CTOR in C#. We could make it an R/O property though.


Update to Next.js 14

Just update https://github.com/ixartz/Next-JS-Landing-Page-Starter-Template to version 14 without any issue

Just waiting Storybook to add support for version 14


Reland: Migrate examples to the Android embedding v2

Relands https://github.com/flutter/flutter/pull/43643 since https://github.com/flutter/engine/pull/13423 was merged and it's contained in https://github.com/flutter/flutter/pull/43860.

This appears to have broken the devicelab.  Going to try to revert to fix.

Hard to tell from the logs. Wonder if
**Error -32601 received from application: Method not found
{request: {method: ext.flutter.didSendFirstFrameRasterizedEvent, params: {isolateId: isolates/2092348583434603}}}**

is relevant @matthew-carroll

Reverting it did make the devicelab green again.

...excepting the dumb mac machine that forgot how to sign.

...excepting the dumb mac machine that forgot how to sign.

what does this mean?

My revert PR has two codesigning related failures in the devicelab from mac11.

@xster that is a red herring.
In the success case,  the events Flutter.Frame and Flutter.FirstFrame are sent from the VM.  However, in the failure case, they are not. As a result, the future never resolves.

@godofredoc is looking into reproducing this issue. For some reason, this issue doesn't repro locally and when @godofredoc tried to trigger the test manually in the device lab, it didn't repro either.


add ss58 format for Anmol

The Anmol team wishes to register the 128 prefix for our testnet: ibtida & 92 prefix for our mainnet. This is to easily identify addresses and to prevent re-use across our imminently launching test net and future mainnet.
Please let us know of any feedback and thank you for your time.

The CLA is now signed!

CLA is now signed from my end as well.

Please move the pr over to: https://github.com/paritytech/ss58-registry


How to get url params? How to get client's unique id?

1、for wss://ws.acmcoder.com:6262/roomid=123456
In Server side, how to get param roomid's value?
2、How to get client's cookie?
3、How to get client's unique id?
In server side, when administrator want to talk with a client, whose name is LFB, and id is DF38KFC in my database, how to find out his socket to run sock.send(text)?

Hello @lifubang,
When a new connection is opened and onOpen() is called, the ClientHandshake contains some of the information you are looking for.
handshake.getResourceDescriptor() will give you /roomid=123456
handshake.getFieldValue("Cookie") will give you the cookies.

I have no clue how the client gets this name... That is a application specific implementation which I have no clue of...

Greetings
marci4

For the third question, I have no idea all. So I have to add a Dictionary in ChatServer, make a mapping from userid to websocket's unique id, but there are two problems:

I don't know this unique id is really one and only.
Although I remove the disconnected websocket from Dictionary in onClose event, but some disconnected websocket with some unknown errors will not be removed from the Dictionary for ever.

So I suggest the maintainer to add a clientid field in WebSocketImpl or WebSocket.
    //The dic of websocket
    //todo: I suggest the maintainer to add a clientid field in WebSocketImpl or WebSocket
    private Dictionary<String, WebSocket> conns = new Hashtable<String, WebSocket>();

    //get a socket's unique key
    //todo: I suggest the maintainer to add a clientid field in WebSocketImpl or WebSocket
    private String key(WebSocketImpl sock) {
        StringBuilder s  = new StringBuilder();

        s.append(sock.toString().substring(33))
                .append(sock.key.toString().substring(28))
                .append(sock.hashCode())
                .append(sock.getRemoteSocketAddress().getAddress().getHostAddress().replaceAll("\\.", ""))
                .append(sock.getRemoteSocketAddress().getPort());
        String str = s.toString();

        return str;
    }

    @Override
    public void onOpen( WebSocket conn, ClientHandshake handshake ) {
        //this.sendToAll( "new connection: " + handshake.getResourceDescriptor() );
        WebSocketImpl sock = (WebSocketImpl)conn;

        //todo: I suggest the maintainer to add a clientid field in WebSocketImpl or WebSocket
        String key = this.key(sock);
        this.conns.put(key, conn);

        //get from cookie
        ......

        //add to db
        ChatUser chatUser = new ChatUser();
        chatUser.userid = json.getString("userid");
        chatUser.clientid = key;
        chatUser.role = json.getString("role");
        chatUser.in_date = new Date();
        ChatUser chatUserSaved = this.chatUserDAO.repository.insert(chatUser);
        //then there is a map from userid to websocket's key id
        if (WebSocketImpl.DEBUG)
            System.out.println(key + " entered the room!" );
    }

Hello @lifubang,
I think what you are looking for is something which is proposed on a different issue #485.
The hashcode of a websocket is currently not overridden so it is the default java object hashcode.
When is onClose not called? Do you have any example?
Greetings
marci4

@marci4 in onOpen event, we can get ClientHandshake param, so we can get cookie value by handshake.getFieldValue("Cookie"). But in onMessage event, there are no ClientHandshake param, how to get cookie?
You may know, in web application, each controller may need cookie value to store the user's data. So I think in onMessage event, we may need cookie field.

Hello @lifubang,
what you are describing is just a feature reqest which is #485.
You are able to access these fields onOpen and if you need them later you may wanna save them in a separate map.
Closing issue since it is solved!
Greetings
marci4


Im trying to use with react and ts, so i use npm i --save-dev @types/sse.js but it is giving me a error

@PeterCastilloG Can you provide more information about the error you're getting?

Out of curiosity I tried this and it gives me:
→ npm i --save-dev @types/sse.js
npm ERR! code E404
npm ERR! 404 Not Found - GET<EMAIL_ADDRESS>- Not found
npm ERR! 404
npm ERR! 404  '@types/sse.js@*' is not in this registry.

Same here. I am trying to use the library in a typescript project and for import { SSE } from "sse.js I see the following error:
Could not find a declaration file for module 'sse.js'. '/home/daniel/dev/llm-ui-web/node_modules/sse.js/lib/sse.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/sse.js` if it exists or add a new declaration (.d.ts) file containing `declare module 'sse.js';`ts(7016)

I have tried to write some types yesterday for this project. I will open a PR, as soon as I know if they work (●'◡'●)

Added PR https://github.com/mpetazzoni/sse.js/pull/42

It seems to have solved the problem and you should be able to merge and release it.

@mpetazzoni thanks for the merge. I sadly was preoccupied with some work :-(

Thank you @dedalusMohantyMa !


[bug]  wrong exit code when running non-existing command

hyper run bosybox foo
$?

want exit code 127, get 255.
Related test code:  https://github.com/hyperhq/hypercli/blob/integration-test/integration-cli/todo/cli/docker_cli_run_test.go#L3882-L3919

@gao-feng


src: accept UTC dates in milliseconds

Add a new test.

fair enough :stuck_out_tongue: - same thing i was planning to do!


Testing out API

Hello! Love the work that's going on here, and love the documentation you have in place. Would it be possible to document how to start the server? I was able to do the following:
python bootstrap.py
./bin/buildout -N

successfully, but I'm not sure what command to run next to start the server up.
Thank you!

bin/circusd should bring all required processes up.
For API to start accepting data, you'd need extra auth.ini file with API
keys.
On Thursday, 4 February 2016, Jake Pruitt<EMAIL_ADDRESS>wrote:

Hello! Love the work that's going on here, and love the documentation you
have in place. Would it be possible to document how to start the server? I
was able to do the following:
python bootstrap.py
./bin/buildout -N
successfully, but I'm not sure what command to run next to start the
server up.
Thank you!
—
Reply to this email directly or view it on GitHub
https://github.com/openprocurement/openprocurement.api/issues/58.

--
....................................................................................................................................
Myroslav Opyr   ▪   CTO   ▪    Quintagroup   ▪   +1.917.475.4725   ▪
http://quintagroup.com
˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙˙

@myroslav, that's for https://github.com/openprocurement/openprocurement.buildout

auth.ini format:
[group_name]
user_name = api_key

[another_group_name]
another_user_name = another_api_key

For example:
[admins]
superuser = 26fda1ba49924ab29b91e14a7c22a586

[brokers]
bid.tenders.acme = 007db660944546b5b3a654dff274d229

You can give any names for users and groups, but only particular names will be effective. Here's a list (for ver. 0.12b2):
https://github.com/openprocurement/openprocurement.api/blob/0.12b2/src/openprocurement/api/traversal.py#L14-L32
We use 32-symbol UUIDs for API keys, but that is not a strict requirement too, e.g.: https://github.com/openprocurement/openprocurement.api/blob/0.12b2/src/openprocurement/api/tests/auth.ini

@selurvedu thank you for comments.
This repository buildout.cfg is only for testing API package itself.
Full dev-grade system can be built with openprocurement/openprocurement.buildout and our comments apply to software built that way.

Thanks for the help! Got it up and running


Handling 'unregistering' certificates from Venafi TPP

Is your feature request related to a problem? Please describe.
Currently, a user of Venafi TPP has no way to delete instances of certificates automatically when the user deletes the Certificate resource in Kubernetes.
This leads to potentially huge lists of every certificate in the Venafi admin console.
Describe the solution you'd like
We should explore:

what it means to 'delete' a certificate from TPP (should we delete them? how does this work/interact with revocation?)

do we always delete them from Venafi when the Certificate resource is deleted? Should we use a finalizer here?

is there any higher-level resource we could use to encapsulate functionality like this? i.e. VenafiCertificate resources, that in turn manages a Certificate resource

/kind feature
/area venafi

+1 to VenafiCertificate

/priority important-longterm

Is there any update on this request? If a deletion/revocation is not handled when a certificate is delete from Kubernetes it could increase the number of active certificates in TPP inventory to an unmanageable state.
Any workaround ?

Also depends on missing support in the API, see https://github.com/jetstack/cert-manager/issues/3096#issuecomment-658643481

Thanks. I have seen #3096(comment).
Venafi's end point APIs seem to support revocation of a certificate. Logically, does it make sense that a deletion of a certificate resource in Kubernetes be marked as "certificate revoked" in TPP inventory ?
If No, then what's the reasoning behind it ?

I don't think we should revoke a certificate on deletion, revocation is meant to mark a certificate as bad while just deleting it doesn't mean it can never be used anywhere else, cert-manager will not delete the secret thus an app can still use it, see for example when you re-install a chart. Revocation is currently not in cert-manager but if we add it it needs to be a special action to mark it as revoked.
Revocation also doesn't solve the manageability issue, the cert will stay listed in all UIs (I think) and worse: it gets distributed in CRLs

hi all, any news on this one?
We're currently using cert-manager and venafi to automatically generate, distribute and renew certificates in our clusters.
The volume of the applications we're managing would require extending the automation to the "decommissioning" phase as well (i.e, once an application is deleted from a cluster, its certificate is also deleted or "unregistered" from Venafi).

Venafi has the option to retire a cert, rather than revoking it. This moves the cert to Venafi's virtual recycling bin and all notifications, automated renewals, validation checks etc will stop on it. Unlike revocation it won't be added to any CRLs. This I expect would be most users' desired behaviour when deleting the certificate resource i.e. they are deleting the workload's resources and want to automate the tidy up of any artifacts associated with it. Would this be a potential approach? Leaving these certificates to expire in Venafi is a major headache for us as a lot of alerting and process is built around certs as they approach expiry - we only want to be concerned with those that users actual want to keep.

I built a basic operator that removes certificates in Venafi after the certificate object is deleted in k8s. It may be of help to other users or the developers here to reference - https://github.com/devonwarren/venafi-cleanup-k8s-operator

Any update on this feature?

We don't plan to fix this issue in the open-source Venafi issuer, since it has been solved by Venafi in other parts of their offering.
We would review a PR that implements this, but implementing this ourselves is not on our priority list.

Hello.
I am interested to work on this issue, can you please assign me this?

Reopening to assign to @shwejanraj

During yesterday's biweekly dev meeting, @sankalp-at-gh proposed to work on this feature.
The discussions points were:

Adding a retirement feature to the Venafi issuer goes beyond the "issuer" concept in cert-manager. In theory, an "issuer" only cares about signing, not revoking or retiring. I argued that it's OK to extend the definition of what an "issuer" means.
We talked about a field on the Issuer object, such as retireCerts: true.
We talked about the VenafiCertificate type that would manage the lifecycle of the Certificate resource. This would avoid mixing the "issuing" concerns with the "retirement" concern. I've argued that the ingress or gateway api shim would become unusable.
We talked about using a finalizer string on certificates and compared the approach to using a finalizer string on certificate requests. The certificate with finalizer string has been explored by @devonwarren in https://github.com/devonwarren/venafi-cleanup-k8s-operator, we could ask them how the experiment went and whether they were able to use it in prod environments.
About a finalizer string on Certificate requests doesn't have the same lifetime as the secret in which the certificate gets copied into; this approach needs investigating.
It was mentioned that this feature is already available in Venafi products: Kubernetes discovery job in TPP.

Next steps:

@sankalp-at-gh to share a diagram or textual description of the feature so that we can discuss its behavior before implementing it.

I haven't seen any activity from @shwejanraj in the past couple of months, so I'll go ahead and change the assignment.
/unassign @shwejanraj
/assign @sankalp-at-gh

Quick Q as an observer - does unregistering in Venafi imply untracked? How can someone be sure a certificate and its corresponding private key have been securely deleted/have not been copied elsewhere?
Waiting for expiry to unregister certificates has the benefit of being cryptographically proven (assuming accurate though clocks) that the certificate data is no longer useful/worth tracking.
Does Venafi distinguish between "unregistered" and "user says is no longer in use"? For example, a certificate that has been marked as not in use being 'found' by certificate scanning infra would be a datapoint that I can see a security team wanting to alert on.

I think there are 3 metrics that can be tracked:

what certificates were issued in the past (still useful for audits even after certificate expired)
what certificates were issued and are still valid (this is the current possible attack vector)
what certificates are currently actively in use (this can be used as a minimal subset of the attack vector)

NOTE: I work for Venafi, but I'm not a TPP expert, please contact your Venafi representative to get a better explanation.
In TPP, a certificate can be retired to stop receiving notifications, warnings, and renewal notices (see https://docs.venafi.com/Docs/current/TopNav/Content/Aperture/t-retire-cert-aperture-tpp.php?Highlight=retire certificate). I believe this feature lets someone indicate that a certificate that was issued previously is no longer in the "set of certificates that are actively in use".
Additionally, using Kubernetes discovery job in TPP, TPP can automatically detect certificates that are in use in the cluster (someone might still have copied the certificate elsewhere outside of the cluster, which is not tracked).
Like @munnerz mentioned, the goal of these features is to provide metrics that can be used to build alerts and automations. Eg. when you use cert-manager with Venafi you can monitor that none of the certificates that were issued by cert-manager and are still found eg. in a Secret in the cluster are about to expire.


Problem with myLocation

Hi. Thank you for  this great plugin.
I have a problem with myLocation property. When I set myLocation:true,  location service of phone starts blinking on the top bar, the blue dot appears in the map.  If I leave the page that contains map or close the app, blinking stops. But if  the page that contains map is active (even if the app is in the background) the blinking keep its active state. So the battery quickly discharge.
I want to stop the service's active state after find location. How can I do it?

Try map.setOptions()

Thanks. It solved my problem.  I use setOptions in Cordova's pause event to suspend location service.


TestCase:  AttributeError: 'str' object has no attribute 'popitem'

Describe the bug
Hello, i got an exception when i create the testcase for the API.
It works if i test directly the api file by adding the config in the api file, but if i use the testcase to call the external api file, i got the error. i tried to call the other api files, but always the same error.
Can you tell me how to solve this problem, please?
YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as t
he default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  yaml_content = yaml.load(stream)
ERROR    !!!!!!!!!! exception stage: load tests !!!!!!!!!!
**AttributeError: 'str' object has no attribute 'popitem'**

Versions
Please complete the following information:

OS: windows
Python 3.6
HttpRunner [e.g. 1.5.11]

Traceback
Traceback when bug occurs.
Project structure
File structure of your project. A good way is to run tree -a command.
Project files (If possible)
searchTestCase:
- config:
    name: searchApps
    base_url: http://localhost:8080
    variables:
        expected_status_code: 200
- test:
    name: search.
    testcase: api/local/searchApps.yaml

Api file searchApps.yaml:
name: searchApps
variables:
    expected_status_code: 200
request:
    headers:
        Content-Type: application/json
        User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
    json:
        birthDate: '1900-03-05'
        firstName: ''
        size: '100'
        startIndex: '0'
    method: POST
    url: /Gui/searchApps
validate:
  - eq:
    - status_code
    - $expected_status_code
  - eq:
    - headers.Content-Type
    - application/json
  - eq:
    - content.totalSize
    - 615
  - eq:
    - content.status
    - '0'
  - eq:
    - content.errorMessage
    - null

I find the reason, it's just a problem of key word testcases.

But another one is appeared:
Traceback (most recent call last):
KeyError: 'url'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
KeyError: 'request'


Finish up implementation of StgWeak

Currently, mkWeak# primop and the related primops/runtime objects are not fully implemented. In particular, finalisers aren't scheduled to be run in the RTS. mkWeak# underlies the implementation of ForeignPtr's which form the foundation of many Haskell libraries, so it's essential that this be finished to be able to use those libraries with decent perf/resource consumption.

This is working in the new MemoryManager - already in Eta v0.0.9b1.


Fix spelling mistake in assert_is_element

Fixes spelling mistake reported in https://github.com/cheezy/page-object/issues/422

Pull Request Test Coverage Report for Build 1934

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 97.329%

Totals

Change from base Build 1920:
-0.2%

Covered Lines:
2296

Relevant Lines:
2359

💛  - Coveralls

Pull Request Test Coverage Report for Build 1934

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 97.329%

Totals

Change from base Build 1920:
-0.2%

Covered Lines:
2296

Relevant Lines:
2359

💛  - Coveralls

Pull Request Test Coverage Report for Build 1934

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 97.329%

Totals

Change from base Build 1920:
-0.2%

Covered Lines:
2296

Relevant Lines:
2359

💛  - Coveralls

Pull Request Test Coverage Report for Build 1934

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 97.329%

Totals

Change from base Build 1920:
-0.2%

Covered Lines:
2296

Relevant Lines:
2359

💛  - Coveralls


Can't install some extensions behind a corporate proxy

VSCode Version: 1.4.0-insider
OS Version: Microsoft Windows [Version 6.1.7601](Windows 7)

Steps to Reproduce:

Open VS Code.
CTRL+P → ext install npm intellisense (for instance) → In the side menu, click install.
A clock icon appears on the extension icon in the left side of the window.
Nothing else happens.

I can, however, install some extensions like ESLINT. My guess is that some of those extensions are stored on a different address, and my proxy is blocking access to it. However, I can't determine the URL of the extension package so I'm unable to check if this is the case.
Thanks a lot.

Did you configure your proxy? https://code.visualstudio.com/docs/setup/setup-overview#_proxy-server-support

Yes, proxy is set on the settings JSON. That's why I can see the list of available extensions, but I can't download them.

Are you in China? Does it reproduce after restarting your machine?
All extensions come from the same place, so it doesn't make sense that some install and others don't.

No, I'm in Brazil. My proxy (websense) may be making something funny. Is there a log I can look into?
(my machine isn't the only one affected, everyone on my team is having the same trouble)

Can you show me how you configured the proxy settings?

My personal (user) settings.json contains the following lines:
	//-------- HTTP configuration --------
	// The proxy setting to use. If not set will be taken from the http_proxy and https_proxy environment variables
	"http.proxy": "https://bruleme:Accenture02@webproxy:8080",
	"https.proxy": "http://bruleme:Accenture02@webproxy:8080",
	// Whether the proxy server certificate should be verified against the list of supplied CAs.
	"http.proxyStrictSSL": false,

There has to be a reason why eslint installs and other stuff doesn't. If the packages comes from the same url, maybe it's the installation process that's failing. Do I need administrative permission to install extensions? Seems silly since I can just copy them, but might be something along these lines.

Can you figure out another extension that works? Maybe a theme...?

Tried some themes. As you can see, spacemacs and sourlick won't install, but Markdown Theme Kit did.

Do you get any information at all when opening the Developer Tools console (F1, Developer Tools)?

@joaomoreno  I have same problem. And I configured the proxy settings by same pattern. But Developer Tools concol is empty (without errors or warnings).
Also when I open View->Problems (Ctrl+Shift+M) on my settings.json, I get a warning message "String does not match the pattern of "^https?://[^:]+(:\d+)?$|^$""

@vborzykin You have another problem. What is the value you've put in http.proxy?

@joaomoreno No, pattern warning is second problem.
First problem is "Can't install extensions behind a corporate proxy" with same diagnostics.
my proxy setup is (from user's  settings.json):
"http.proxyStrictSSL":false,
"http.proxy": "http://user:pass@webproxy:3128/",
"https.proxy": "https://user:pass@webproxy:3128/",

@vborzykin Absolutely right about the regexp, pushed a fix.
Do you have the same problem as in you can install ESLint, but not other extensions?

@joaomoreno Yes, I have

But you can install ESLint from the product itself (not command line)?

No, I can't install ESLint

OK, you have another problem, since @HeavyStorm can install some extensions. Can you create another issue, showing us what exactly you see when you try to install an extension? Maybe a video recording? Thanks.

We also use Websense, but it isn't a proxy, it's a decrypting firewall. It functions as a MitM (manager-in-the-middle), which requires adding the Websense local cert as a trusted authority.
For some really dumb reason, VS and VS Code do not seem to use the Windows list of Trusted Authorities, where the certs were placed by group policy. Right now we can choose just not to use any SSL content (most extensions), or disable all SSL checking (strict-ssl=false in .atomrc), which would be wildly irresponsible. So that's a huge hassle.
We really need either VS Code to honor imported Trusted Authorities from the Windows cert store, or a way to import a trusted cert into VS Code's special, unique snowflake cert store.

@joaomoreno I found another extension that installs successfully: jscs.
Tomorrow I'll check developer tools.

@HeavyStorm The latest Insiders build has better error messages. Do you mind updating to that one?

@joaomoreno I installed the latest Insiders and now all extensions seems to be installing correctly. Was anything changed in the extensions code?

Not really... but maybe the fixes in the error handling case actually fixed something.
Glad to see you're unblocked. I'll close this, reopen pending if you see the issue again.

I've opened a new issue for my thing, issue #9790 .

i cant install or view any extensions behind a corporate firewall


MS Entra Validation

I'm using the SCIM validator provided by Microsoft for Entra (formerly Azure ActiveDirectory).
I select "Discover My Schema" and set the SCIM endpoint and a test token value.
(It seems there is a bug with this validator. If you try to sign in using a work account you won't have the permissions needed and the recommendation is to sign in using a personal account)
I then see a page with "Schema discovered!" at the top and a number of properties listed. I click the "Test Schema" button and am presented this error:
"SCIM Validation failed. The attribute password for User is not supported by the SCIM protocol. Please refer to the SCIM RFC"
Here is my code
const cors = require('cors');
const express = require('express');
const { default: SCIMMYRouters, SCIMMY } = require('scimmy-routers');

const app = express();
const PORT = 3030;

app.use(cors({origin: ['*']}));

app.use(function(req, res, next) {
  console.log(req.hostUrl,  req.url, req.rawHeaders);
  next();
});

SCIMMY.Resources.declare(SCIMMY.Resources.User)
  .ingress((resource, data) => {
    console.log(`Request to create/edit user ${JSON.stringify(resource)}, ${JSON.stringify(data)}`);
    let user = new SCIMMY.Schemas.User(data);
  })
  .egress((resource) => {
    console.log(`Request to read user ${JSON.stringify(resource)}`);
  })
  .degress((resource) => {
    console.log(`Request to delete user ${JSON.stringify(resource)}`);
  });

SCIMMY.Resources.declare(SCIMMY.Resources.Group)
  .ingress((resource, data) => {
    console.log(`Request to create/edit group ${JSON.stringify(resource)}, ${JSON.stringify(data)}`);
  })
  .egress((resource) => {
    console.log(`Request to read group ${JSON.stringify(resource)}`);
  })
  .degress((resource) => {
    console.log(`Request to delete group ${JSON.stringify(resource)}`);
  });

let authScheme = {
  type: "bearer",
  handler: (request) => {
    console.log("Inside auth check");
    if (!request.header("Authorization")?.startsWith("Bearer ")) {
      throw new Error("Authorization not detected!");
    } else {
      return 'WHATEVER';
    }
  }
};
app.use("/scim", new SCIMMYRouters(authScheme));

app.listen(PORT, (error) => {
    if (!error)
      console.log("Server is running on port " + PORT)
    else
      console.log("Server cannot start", error);
  }
);

Can I exclude the password from the schema?

Any pointers on fleshing my code out are welcome, too. It would lower the barrier to entry to have sample code showing ingress, egress and degress implementations.

Hi @AxeOfMen,
Apologies for the delay in getting back to you, I have been otherwise occupied.
It's possible to exclude the password attribute, or any other attribute, from the User schema using the schema definition's truncate method as below:
SCIMMY.Schemas.User.definition.truncate("password");

Whilst this fixes the immediate error, unfortunately the MS Entra ID SCIM Validator is itself actually not compliant with the SCIM RFC. When I attempted validation after excluding the password attribute from the default schema, it then complained that the emails[type eq "work"].display attribute is invalid, which is entirely incorrect (see RFC7643§8.7.1 for the actual specification).
Ok, no big deal, right? We just need to remove the display attribute from emails, like we did for the password attribute.
SCIMMY.Schemas.User.definition.truncate("password", "emails.display");

With that change, the validator then complains that the emails[type eq "work"].primary attribute is invalid, and to refer to the SCIM RFC again. This all starts to make sense when you consider that by default, MS Entra ID only actually uses a small subset of attributes from the default schemas. The trouble is, instead of ignoring the surplus attributes that aren't required, it complains that they aren't part of the SCIM RFC, which is confusing at least, and misleading at worst. Knowing this, if we remove the extra unsupported attributes, the validator no longer seems to take issue:
SCIMMY.Schemas.User.definition.truncate([
    "password", "groups", "ims",
    "entitlements", "photos", "x509Certificates",
    "emails.display", "emails.primary",
    "phoneNumbers.display", "phoneNumbers.primary",
    "roles.display", "roles.primary"
]);

Great! Validation now passes, so we can move on to testing compliance. Here, we run into the final issue with the Entra ID SCIM Validation tool.
To test compliance, the tool sends out several requests to your SCIM endpoint, to make sure that the handling of GET/PUT/POST/PATCH/DELETE requests meets its requirements. Presently, using SCIMMY, all of the tests will fail, because as it turns out, all of those primary attributes actually are part of the spec. Even though it just claimed they were invalid, the tool is now including the primary attribute with every email, phone number, and role.
Because we excluded them from our schema to pass the first step in the schema validator, SCIMMY will now reject every one of the User creation compliance test requests with a 400 Bad Request error, as they include the unknown attribute primary. This causes all of the subsequent User lookup/modification compliance test requests to also fail.
TL;DR: Microsoft's Entra ID SCIM Validation tool does not actually meet the SCIM RFC specification it so brazenly throws in your face. I would suggest raising the issue with Microsoft, but there doesn't seem to be any way to actually do this for the tool.
Solution...?
Alongside the tool, Microsoft does actually provide working and more comprehensive alternative means of testing your SCIM implementation via Postman, which is detailed here. This Postman collection was actually something I used initially to help understand the protocol when starting this project, and I highly recommend it.
Thanks for your patience,
Sam


Support for Intersection of multiple Sets at the same time

Currently the method intersection of HashSet and BTreeSet only support an intersection between two sets. If you want to intersect multiple sets, for example 3, you'll need to calculate the intersection between the first two, collect them into another set and calculate the intersection between that immediate result and the third set. This is very intense on computation, memory usage and lines of code.
I'd like to suggest the following:

Change the current implementations of the Intersection structs to contain a list of other sets to intersect with instead of a reference to a single other set. This applies to std::collections::btree_set::Intersection as well as std::collections::hash_set::Intersection.
Implement intersect_many (or intersect_multiple) on HashSet and BTreeSet which take a list of other sets to all intersect with the current one.
Add intersect and intersect_many (or intersect_multiple) to the Intersection structs as well. Those can only be called if the Intersection hasn't been iterated over yet. Otherwise, they'll panic.

If (3.) is implemented, the "list of sets to intersect with" will need to be a Vec in order to be growable after creation. For performance reasons, the third suggestion could be dropped and the "list" can instead be a reference to the provided slice.
The current implementation of {Hash,BTree}Set::intersection would need to be changed to pass &[other] instead of other.
While this request should be relatively easy to implement for HashSet (self.others.iter().all(|set| set.contains(elt)), implementing it for BTreeSet could result in a lot more code.
Unresolved Questions:

Naming: intersect_many vs intersect_multiple vs ???
Don't implement the third suggestion (functions on the Intersection struct) in favor of using an allocation free slice-reference instead of a Vec?

It might be cleaner to turn Intersection into an iterator filter that can be chained.

While that does seem pretty nice from the API perspective, iterators are meant to be iterated over only once. Given an arbitrary iterator, we'd need to create a new iterator with a buffer which we collect all items into, just to be able to perform a nested loop join. While this can be very optimized with specialization for sets, it is very heavy and imperformant for most other cases. So in my opinion it does not fit the nearly no-cost iterator operations we have currently.

Intersections speed can be optimized by using the same BuildHasher for both HashMaps and tweaking the intersection algorithm to dig into the guts of the HashMap and exploit that both use the same hasher.  It might be easier to express that dependence statically with dependent types, but doing so may go beyond even @ticki's proposals.  You can exploit it dynamically though and the multiple intersection case can exploit it even more :
Add Ord, Eq, etc. to RandomState.  Make your Intersect function ask for HashMap<K,V,B> where B: BuildHasher+Ord+Eq.  First it sorts the HashMaps according to their keys Bs and runs the fast intersection the HashMaps with equal Bs.  Next it runs the slower intersection on the remaining HashMaps with unequal Bs.  In principle, you might prefer trait objects &BuildHasher+Ord+Eq but that'd require changing HashMap itself.
Just fyi, this speedy intersection is completely trivial for Cuckoo tables, and O(n), but you can do a speedy one for Robin-Hood hash tables like HashMap too that should be amortized O(n).  I'd assume you get O(n log n) for intersections that do not exploit equality of B.

I guess currently the way to do it is with fold? But it looks rather ugly, note also the difference between union and intersection:
    let mut sets: Vec<HashSet<char>> = Vec::new();
    sets.push(['a', 'b', 'c', 'd'].iter().cloned().collect());
    sets.push(['c', 'd'].iter().cloned().collect());
    sets.push(['d', 'a'].iter().cloned().collect());

    let union = sets
        .iter()
        .fold(HashSet::new(), |acc, hs| {
            acc.union(hs).cloned().collect()
        });
    let intersection = sets
        .iter()
        .skip(1)
        .fold(sets[0].clone(), |acc, hs| {
            acc.intersection(hs).cloned().collect()
        });

    println!("Union: {:?}", union);
    println!("Intersection: {:?}", intersection);

Or is there a better way?

@Stannislav heh, doing Advent of Code? 😛
This is what I did:
            let mut lines = group
                .lines()
                .map(|line| line.chars().collect::<HashSet<_>>());
            let mut s = lines.next().unwrap();
            for line in lines {
                s = s.intersection(&line).copied().collect();
            }

I agree it's ugly though. I think the unstable fold_first method on iterators would make this nicer. That said, it would be nice not to have to continually collect back into a HashSet.

FWIW, I think what we're missing is iterator adaptors that work on already-sorted data. It should be possible to implement efficient N-way intersection on sorted iterators without introducing a HashSet at all.

@Stannislav heh, doing Advent of Code? 😛

Ha, got me 🎄 ! Here's my solution
Anyway, regarding the actual topic, I saw there's an external reduce crate, I haven't tried it though. I'm surprised there's no reduce in the standard library.


Cannot add folder to create workspace

code-server version: 1.1119-vsc1.33.1
OS Version: Ubuntu 18.04 LTS, AWS

Description

Steps to Reproduce

Open a folder
Add another folder to workspace

Looks like there is no error logs in console which is really strange.

Duplicate of #687


Provide option for 'one time payment' via Stripe

I am trying to adapt the Stripe code so instead of subscriptions, it is a one time price. I then can get a token back from Stripe for successful payment to my backend.
However if I try to setup a non subscription product in Stripe dashboard and then do all changes as per readme.md, in the end I get this error:

When I try to actually do the purchase. Pressing Get Basic button here:

Would love some help trying to get this working. Ideally this could be part of the template setup too. ♥

Hello @nikitavoloboev.
Have you checked Stripe Docs? about one time payments?
Template has been developed with Subscriptions in mind. Today I'm kinda bussy, but gonna look for it tomorrow.
Should be easy to implement, but for sure you will have to update the  /webhook API code.
Share with me some of the code changes you made if you want.

Going to check the docs, I read through some of them and was still confused, then found this stack and got excited but it uses recurring payments.
If you want to pair on this together perhaps, I'd be happy too. Can pm on Discord or similar. :)

Gonna look into it and send you a few examples.
The implementations should be kinda easy, usually the Docs got us covered.
I'm in the Remix discord server as: XO#9732 in case you wanna add me.


[azure-iot-sdk-c:x64-windows] Could not locate a valid Visual Studio instance

Host Environment

OS: Windows 11

To Reproduce
I'm following the steps that are defined here to prepare my system for IoT Edge development.
I have installed vcpkg and afterwards I need to execute this command:
.\vcpkg.exe install azure-iot-sdk-c:x64-windows --triplet=x64-windows

which results in this error:

Steps to reproduce the behavior:
.\vcpkg.exe install vcpkg.exe install azure-iot-sdk-c:x64-windows
Failure logs
Computing installation plan...
The following packages will be built and installed:
  * azure-c-shared-utility[core]:x64-windows -> 2022-09-15
    azure-iot-sdk-c[core]:x64-windows -> 2022-09-15#1
  * azure-macro-utils-c[core]:x64-windows -> 2022-01-21
  * azure-uamqp-c[core]:x64-windows -> 2022-09-15
  * azure-uhttp-c[core]:x64-windows -> 2022-09-15
  * azure-umqtt-c[core]:x64-windows -> 2022-09-15
  * parson[core]:x64-windows -> 2022-11-13
  * umock-c[core]:x64-windows -> 2022-01-21
  * vcpkg-cmake[core]:x64-windows -> 2022-10-30
  * vcpkg-cmake-config[core]:x64-windows -> 2022-02-06#1
Additional packages (*) will be modified to complete this operation.
error: in triplet x64-windows: Unable to find a valid Visual Studio instance
Could not locate a complete Visual Studio instance
The following paths were examined for Visual Studio instances:
    C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary/Build\vcvarsall.bat

Additional context
I have VS.NET 2022 Enterprise installed on my system.   The directory c:\program files\microsoft visual studio\2022\enterprise\VC\Auxiliary exists on my system, but it has no subdirectory 'Build', nor can I find the vcvarsall.bat file on my system.

Have you installed Desktop development with C++?

Indeed, I didn't have that installed.
After I installed that feature, it works.
Sorry for wasting your time.


configure modular import pattern for component efficiency

Issue: https://github.com/rhinolabs/rhino-ui/issues/48

Hi @gitaumoses4, checking the example I noticed the import is:
import Alert from '@rhino-ui/components/dist/alert'
needs be:
import Alert from '@rhino-ui/components/alert'

Yes, this is because we are to publish the dist folder. Hence the import will be without the dist path.


Fix #10050

Set selected default value to 'false'
Close #10050

Doesn't seem to work for me.

Sorry, this fixing method is not on the right way, so I'm going to close this PR for now.
This problem is actually because the first legend instance tried to find right1 but in fact only the second legend should try to find right1.


Adding income variable on a census tract level

Guide has "Income distribution" for the previous income data and "income (census tract)" with no reference in TOC. Please clean up and rethink document structure and make sure the TOC makes sense and links work.

'Income distribution' and 'Income' are distinct variables. The former consists of several categories of income, while the latter refers to the mean and median income.


TimePicker format with respect to device's context, fixes #374

TimePicker will show 24-hour format or 12-hour format based on device's context
Attached with test.apk which is the modified version TimePicker.

Thank you!
LGTM

@RudyChin This pull request is a bit hosed. It includes a bunch of commits that appear to checking pieces of the MIT App Inventor website into the source tree. That cannot be right! I assume that your actual change is just the last commit. Please let me know, I can extract just that commit so you don't have to do git magic to straighten out this PR (unless you know the incantations :-) ).

I checked this pull request the other day and it was fine; @RudyChin but you seem to be working off your master branch, so when you updated and pushed back to your fork, all the new commits are added here.
Try and work on feature branches instead, it will be a lot easier to manage!

Indeed, the commits in question were added between the time it was originally given the LGTM and now. That's an interesting mis-feature of doing reviews on GitHub. The PR isn't immutable but can change after an approval is given.

Ditto.  This looked ok when I looked at it the other day, too.
== Hal Abelson
<EMAIL_ADDRESS>Prof. of Comp. Sci. and Eng.
MIT Dept. of Elec. Eng. and Comp. Sci.
MIT Media Lab, Second Class Faculty
On Mon, May 4, 2015 at 4:22 PM, Jos<EMAIL_ADDRESS>wrote:

I checked this pull request the other day and it was fine; @RudyChin
https://github.com/RudyChin but you seem to be working off your master
branch, so when you updated and pushed back to your fork, all the new
commits are added here.
Try and work on feature branches instead, it will be a lot easier to
manage!
—
Reply to this email directly or view it on GitHub
https://github.com/mit-cml/appinventor-sources/pull/379#issuecomment-98838689
.

@jisqyv @josmas Thank you for your help! I think I did not understand Git clearly enough.
I tried that git magic and I will create another branch to do what I tended to do after fixing this issue. Big thanks.

Is this obsoleted by #449 ?

I don't believe so...
-Jeff
On Sat, Jul 11, 2015 at 3:07 PM, hal<EMAIL_ADDRESS>wrote:

Is this obsoleted by #449
https://github.com/mit-cml/appinventor-sources/pull/449 ?
—
Reply to this email directly or view it on GitHub
https://github.com/mit-cml/appinventor-sources/pull/379#issuecomment-120652877
.

--

Jeffrey I. Schiller
Information Systems and Technology – MIT App Inventor
Massachusetts Institute of Technology
77 Massachusetts Avenue  Room E17-110A, 32-392
Cambridge, MA 02139-4307
617.910.0259 - Voice
<EMAIL_ADDRESS>http://jis.qyv.name
http://appinventor.mit.edu

The branch is in good shape now. LGTM. Moving to Gerrit for the UCR branch.

@RudyChin MERGED into the "ucr" branch for the next App Inventor Component Release


feat(examples): add live chat example

TODO:

[x] Update README.md
[x] Update example landing page
[x] Clean up story around Communication lifecycle (timestamps for marking as read alongside completed status)
[x] Do a cleanup pass for all references / links

Closes #3713


Fix alignment of courseCard

ISSUE #247
fixes #247

Describe the changes you've made

I have added style for the 'li' component inside the useStyles object which can be found in - 'edu-client/src/pages/CoursePageViewWithVideo/index.js'.
The 'li' has been made flex and all the components inside the 'li' are now center-aligned.
The style of the 'li' are being used by the ListItem component which contains our CourseCards.
As a result the CourseCards are now center aligned for all screen sizes.

Describe if there is any unusual behavior (Any Warning) of your code(Write NA if there isn't)
NA

Additional context
Here are the images before and after the changes for reference.
Before the Changes

After Changes

Checklist

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] All new and existing tests passed.
[x] The title of my pull request is a short description of the requested changes.

Hey  @Abhishek-kumar09 , can you please review my pull request  .

Looks good! Thanks for your PR @samad-yar-khan

@Abhishek-kumar09 Thanks a lot for letting me work on the issue . First PR ever :)


include man pages for all components in full images

Enable the doc-pkgs image feature to automatically install man pages for
any package included in the image.
Increases the image size by about 11 MiB.

Nice, thanks for testing! I just noticed that the backported fixes were accepted, but didn't get around to test them (which is why I had it on draft).


RFC: New batch processing utility

Key information

RFC PR:
Related issue(s), if known:
Area: Batch processing util
Meet tenets: Yes
Approved by: ''
Reviewed by: ''

Summary
A new generic batch processing utility, which can process records from SQS, Kinesis Data Streams, and DynamoDB streams, and handle reporting batch failures.
Motivation
With the launch of support for partial batch responses for Lambda/SQS, the event source mapping can now natively handle partial failures in a batch - removing the need for calls to the delete api. This support already exists for Kinesis and DynamoDB streams.
Proposal
The new utility will be implemented in the namespace which already exists for the SQS Batch Processing utility - aws_lambda_powertools.utilities.batch. Rather than calling the SQS DeleteMessage api like the existing batch utility, this version will instead inject BatchItemFailures (or batchItemFailures for kinesis and ddb) into the Lambda response. We will expose at the least, a new decorator batch_processor, which will accept an event type depending on the integration (Kinesis, SQS or DDB Streams). This will look similar to the Event Handler design. There will be a boolean setting to handle partial failures, defaulting to True (users will still need to enable this in the event source mapping for it to work).

from aws_lambda_powertools.batch import KinesisStreamEvent, EventType

def record_handler(record):
    return do_something_with(record["body"])

@batch_processor(record_handler=record_handler, event_type=EventType.KinesisStreamEvent)
def lambda_handler(event, context):
    return {"statusCode": 200}

Proposed class/method names for the new api:
aws_lambda_powertools.utilities.batch.base.BatchProcessor
aws_lambda_powertools.utilities.batch.batch_processor
Any configuration or corner cases you'd expect?
Users will need to enable this in the event source mapping when configuring the Lambda trigger - reporting partial failures will not work with only changes to the Lambda code. Investigation is needed to better understand the consequences here, and how expensive it would be to enable a check in the code to see if it is enabled or not. If we don't implement this, we need to call this out front and center in the documentation.
Rationale and alternatives
The main consideration here is where the new functionality fits into the powertools package. It could be a new top level utility eg. aws_lambda_powertools.batchv2 - but we prefer not to add version numbers as it is confusing for users.
We could make a straight replacement of the implementation behind the existing API, which was the initial idea. However, the native functionality requires a setting when the event source mapping is created. That means we'd be introducing a breaking change if we did this - the utility would stop working for users who had not made this configuration.
Unresolved questions
Need to decide if we should add a context manager like the existing implementation has. It is simple to implement this, but it burdens the user with ensuring they store the return value and use it in their lambda response. I feel like this is too likely to be misunderstood, but would like opinions. Example:

from aws_lambda_powertools.utilities.batch import BatchProcessor

def record_handler(record):
    return do_something_with(record["body"])

def lambda_handler(event, context):
    records = event["Records"]

    processor = BatchProcessor(event_type=EventType.KinesisStreamEvent)

    with processor(records, record_handler) as proc:
        result = proc.process()  # Users will have to store the response from processor

   return result. # Users will have to return the result they stored from the processor

I think the batch_processor decorator name might already be taken by the following: Create your own Partial Processor. If I'm reading this incorrectly, I apologize and pls correct me.
Does it make sense to potentially leverage on that capability to implement the "new" batch processors?

You’re right Kim, missed that somehow when looking at top imports and
search.
As it expects a processor, there might be a way to make this non-breaking
change — make a default new Processor, and introduce an optional BatchType
argument.
If we can find a better name would be a better solution tho
https://github.com/awslabs/aws-lambda-powertools-python/blob/develop/aws_lambda_powertools/utilities/batch/base.py
On Tue, 30 Nov 2021 at 21:59, kimberlyamandalu @.***>
wrote:

I think the batch_processor decorator name might already be taken by the
following: Create your own Partial Processor
https://awslabs.github.io/aws-lambda-powertools-python/latest/utilities/batch/#create-your-own-partial-processor.
If I'm reading this incorrectly, I apologize and pls correct me.
Does it make sense to potentially leverage on that capability to implement
the "new" batch processors?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/aws-lambda-powertools-python/issues/858#issuecomment-983015247,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZPQBH5FAKZDILKGA3TOMDUOU3LTANCNFSM5JBLFF5A
.

What about @report_batch_failures(batch_type=, record_handler=)?
That is explicit enough and should help customers find it more easily if they've read the news, found somewhere and came looking for support.

I think that is a pretty good name for it since sqs/dynamodb/kinesis all refer to it as such.
The only thing I could think of that might be confusing is, it might make it look like it is just an error handling feature. Which I guess it kind of is, but more :)
I honestly cannot think of a better name, other than @partial_batch_processor maybe?
But I'm sure whatever becomes its name, it will be described clearly in the document and searches on google should return relevant results.

Hi folks, long time no see :).
I'm really thrilled seeing AWS finally provided such feature for SQS :rocket: .
Why not leverage current @batch_processor instead of creating a new decorator with "similar" behavior. Can't we achieve the same result by doing the following:

Adding a inject_batchitem_failures as an argument to @batch_processor;
Writing a new PartialProcessor extending BasePartialProcessor - not 100% sure we need it.

def batchitem_failure_handler(event_source: str, failed_records: List[Dict]) -> Dict:
    key = "batchItemFailures" if event_source in ("aws:kinesis", "aws:dynamodb") else "BatchItemFailures"
    failed_batch_items = [{"ItemIdentifier": failed_record["eventID"]} for failed_record in failed_records]
    return {key: failed_batch_items}

@lambda_handler_decorator
def batch_processor(
    handler: Callable,
    event: Dict,
    context: Dict,
    record_handler: Callable,
    processor: BasePartialProcessor,
    inject_batchitem_failures: bool = False,  # non-breaking change
):
    records = event["Records"]
    # Do we really need `event_type` as an argument ?
    event_source = event["eventSource"]

    with processor(records, record_handler):
        processor.process()

    result = handler(event, context)

    if inject_batchitem_failures:
        failure_response = batchitem_failure_handler(event_source, processor.fail_messages)
        result.update(failure_response)

    return result

I'm in a rush so sorry if I missed a critical point. Looking forward to hear from you :+1:

Yes, I mentioned that to @cakepietoast but he had a pretty good argument on the contrary -- can't remember what it was tho :/

@heitorlessa  other than automatic handling of error, this can already be achieved with the current Parser utility.
why not extend the parser instead of creating a new utility?

Ran, there’s one more aspect that we only implemented in Java - Move
non-retryable exceptions to the DLQ. We wouldn’t want to make API calls
underneath when using Parser.
That said, we could have a better integration with Parser but we haven’t
thought how Parser and the lightweight Data classes could coexist  here yet

it needs a RFC/ design session

On Sun, 5 Dec 2021 at 07:28, Ran Isenberg @.***> wrote:

@heitorlessa https://github.com/heitorlessa other than automatic
handling of error, this can already be achieved with the current Parser
utility.
why not extend the parser instead of creating a new utility?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/awslabs/aws-lambda-powertools-python/issues/858#issuecomment-986174977,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAZPQBB3PRV7H7GLPTD53DTUPMBATANCNFSM5JBLFF5A
.

We've made a decision - we'll create a new Processor that handles all 3 (SQS, DynamoDB Stream, Kinesis Data Streams) and have no additional arguments for the batch_processor to make it easier to get it right + deprecating things in v2 easier.
Gonna start working on the implementation now, and we should have it ready for the next release early next week

@heitorlessa  Do you think there should be a Parser equivalent?  I think it can easily to integrate the processing or failed processing that you write here and add it as an extra parameter to the parser.

Could you give an example @ran-isenberg ? I can see how we could have an extra parameter to receive a Pydantic model OR an event source data class (SQS), so the record handler receives a strongly typed record.

Everyone, this is how the initial UX is looking like now - We'll work on Kinesis/DynamoDB next, but the experience will be a simple toggle e.g., EventType.DynamoDB, everything else remains the same.
As a decorator
from aws_lambda_powertools.utilities.batch import batch_processor, BatchProcessor, EventType

processor = BatchProcessor(event_type=EventType.SQS)

@batch_processor(record_handler=record_handler, processor=processor)
def lambda_handler(event, context):
    return processor.report() # this is necessary to ensure Lambda returns the correct response

As a context manager, in case you need full access to the batch processed, or handle exceptions yourself
from aws_lambda_powertools.utilities.batch import batch_processor, BatchProcessor, EventType

processor = BatchProcessor(event_type=EventType.SQS)

def lambda_handler(event, context):
    with processor(records, record_handler) as batch:
        processed_messages = batch.process()

    return batch.report() # this is necessary to ensure Lambda returns the correct response

@heitorlessa fitting that into the lightweight event source classes would be neat

Really liked the decision you guys made. Writing a new processor that injects failed message is the best of both worlds. :rocket:
Just to give another :+1:, adding up event source classes to this new processor will be super neat. Can't wait to see the RFC ! :)

We've made a decision - we'll create a new Processor that handles all 3 (SQS, DynamoDB Stream, Kinesis Data Streams) and have no additional arguments for the batch_processor to make it easier to get it right + deprecating things in v2 easier.
Gonna start working on the implementation now, and we should have it ready for the next release early next week

Really liked the decision you guys made. Writing a new processor that injects failed message is the best of both worlds. :rocket:
Just to give another :+1:, adding up event source classes to this new processor will be super neat. Can't wait to see the RFC ! :)

@heitorlessa I think it makes a lot of sense to integrate this utility with any of the 2 input validation tools- parser/event source.
Maybe having 2 decorators -one in the extras package for the parser and one in the regular.
In the end, I think both decorators would be able to call a shared code part once they finish handling the event with either the parser/event source utilities.
I wrote something like that with the parser for SQS and dynamodb streams which iterates messages, catches processing exceptions, adds failed sqs messages to a list , continues the loop and in the end sends failed messages to a DLQ. So I know it can be done :)

We've made a decision - we'll create a new Processor that handles all 3 (SQS, DynamoDB Stream, Kinesis Data Streams) and have no additional arguments for the batch_processor to make it easier to get it right + deprecating things in v2 easier.
Gonna start working on the implementation now, and we should have it ready for the next release early next week

Really liked the decision you guys made. Writing a new processor that injects failed messages is the best of both worlds. 🚀 Just to give another 👍, adding up event source classes to this new processor will be super neat. Can't wait to see the RFC ! :) .
Just a small nit. I can't see to find BatchItemFailures - with capital B. Looks like someone corrected the typo on the documentation ? 🤔

They've corrected in the docs. The docs that went live as part of the launch had a capital B, they have been corrected after this RFC was created ;)

@heitorlessa I think it makes a lot of sense to integrate this utility with any of the 2 input validation tools- parser/event source. Maybe having 2 decorators -one in the extras package for the parser and one in the regular. In the end, I think both decorators would be able to call a shared code part once they finish handling the event with either the parser/event source utilities.
I wrote something like that with the parser for SQS and dynamodb streams which iterates messages, catches processing exceptions, adds failed sqs messages to a list , continues the loop and in the end sends failed messages to a DLQ. So I know it can be done :)

I'll think this through and get @cakepietoast @am29d thoughts too - Atm, I'd prefer to keep them separate (parser to parse & validate, batch to handle batch processing). Integration, however, I'd like Pydantic customers using Parser to be able to pass a subclass of SQS Record, DynamoDB Record, and Kinesis Record, so they can bring their own validations, methods, while having a single place to learn and tweak about batch processing.

@gmcrocetti @michaelbrewer integrated event source data classes as the default, and we will optionally support Parser Models for a richer validation experience.
This is how it looks like for data classes now:
from aws_lambda_powertools.utilities.batch import batch_processor, BatchProcessor, EventType
from aws_lambda_powertools.utilities.data_classes.sqs_event import SQSRecord

processor = BatchProcessor(event_type=EventType.SQS) # or, EventType.KinesisDataStreams, EventType.DynamoDB

def record_handler(record: SQSRecord): # or DynamoDBRecord, KinesisStreamRecord
    return "success"

@batch_processor(record_handler=record_handler, processor=processor)
def lambda_handler(event, context):
    return processor.response() # this is necessary to ensure Lambda returns the correct response

After some Mypy wrestling, this will also include support for Pydantic/Parser - This is how the UX will look like:
from aws_lambda_powertools.utilities.batch import batch_processor, BatchProcessor, EventType
from aws_lambda_powertools.utilities.data_classes.sqs_event import SQSRecord
from aws_lambda_powertools.utilities.parser.models import SqsRecordModel
from aws_lambda_powertools.utilities.parser import BaseModel

class Order(BaseModel):
    item = dict

class OrderSqs(SqsRecordModel):
    body = Order

    # auto transform json string
    # so Pydantic can auto-initialize nested Order model
    @validator('body', pre=True)
    def transform_body_to_dict(cls, value):
            return json.loads(value)

processor = BatchProcessor(event_type=EventType.SQS, model=OrderSqs)

def pydantic_record_handler(record: OrderSqs):
    print(record.body.item)
    return "success"

@batch_processor(record_handler=pydantic_record_handler, processor=processor)
# @batch_processor(record_handler=record_handler, processor=processor)
def lambda_handler(event, context):
    return processor.response()  # this is necessary to ensure Lambda returns the correct response

cc @ran-isenberg

After some Mypy wrestling, this will also include support for Pydantic/Parser - This is how the UX will look like:
from aws_lambda_powertools.utilities.batch import batch_processor, BatchProcessor, EventType
from aws_lambda_powertools.utilities.data_classes.sqs_event import SQSRecord
from aws_lambda_powertools.utilities.parser.models import SqsRecordModel
from aws_lambda_powertools.utilities.parser import BaseModel

class Order(BaseModel):
    item = dict

class OrderSqs(SqsRecordModel):
    body = Order

    # auto transform json string
    # so Pydantic can auto-initialize nested Order model
    @validator('body', pre=True)
    def transform_body_to_dict(cls, value):
            return json.loads(value)

processor = BatchProcessor(event_type=EventType.SQS, model=OrderSqs)

def pydantic_record_handler(record: OrderSqs):
    print(record.body.item)
    return "success"

@batch_processor(record_handler=pydantic_record_handler, processor=processor)
# @batch_processor(record_handler=record_handler, processor=processor)
def lambda_handler(event, context):
    return processor.response()  # this is necessary to ensure Lambda returns the correct response

cc @ran-isenberg

Amazing, love it!

Just deployed a stack with staged code and I can happily all of this works, including the undocumented SQS Report Partial Failure.
We'll get to the docs now, and once complete we are ready to release!
SQS

Kinesis

DynamoDB

Template used
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: partial batch response sample

Globals:
    Api:
        EndpointConfiguration: REGIONAL
        TracingEnabled: true
    Function:
        Timeout: 5
        MemorySize: 256
        Runtime: python3.8
        Tracing: Active
        Environment:
            Variables:
                # Powertools env vars: https://awslabs.github.io/aws-lambda-powertools-python/#environment-variables
                LOG_LEVEL: INFO
                POWERTOOLS_LOGGER_SAMPLE_RATE: 0.1
                POWERTOOLS_LOGGER_LOG_EVENT: true
                POWERTOOLS_SERVICE_NAME: hello

Resources:
    HelloWorldFunction:
        Type: AWS::Serverless::Function
        Properties:
            Handler: app.lambda_handler
            CodeUri: hello_world
            Policies:
                - SQSPollerPolicy:
                    QueueName: !GetAtt SampleQueue.QueueName
                - KinesisStreamReadPolicy:
                    StreamName: !Ref SampleStream
                # Lambda Destinations require additional permissions
                # to send failure records from Kinesis/DynamoDB
                - Version: "2012-10-17"
                  Statement:
                    Effect: "Allow"
                    Action:
                        - sqs:GetQueueAttributes
                        - sqs:GetQueueUrl
                        - sqs:SendMessage
                    Resource: !GetAtt SampleDLQ.Arn
            Events:
                Batch:
                    Type: SQS
                    Properties:
                        Queue: !GetAtt SampleQueue.Arn
                        BatchSize: 1
                        FunctionResponseTypes:
                            - ReportBatchItemFailures
                KinesisStream:
                    Type: Kinesis
                    Properties:
                        Stream: !GetAtt SampleStream.Arn
                        BatchSize: 100
                        StartingPosition: LATEST
                        MaximumRetryAttempts: 2
                        DestinationConfig:
                            OnFailure:
                                Destination: !GetAtt SampleDLQ.Arn
                        FunctionResponseTypes:
                            - ReportBatchItemFailures
                Stream:
                    Type: DynamoDB
                    Properties:
                        Stream: !GetAtt SampleTable.StreamArn
                        StartingPosition: LATEST
                        MaximumRetryAttempts: 2
                        DestinationConfig:
                            OnFailure:
                                Destination: !GetAtt SampleDLQ.Arn
                        FunctionResponseTypes:
                            - ReportBatchItemFailures

    SampleDLQ:
        Type: AWS::SQS::Queue

    SampleQueue:
        Type: AWS::SQS::Queue
        Properties:
            VisibilityTimeout: 30 # Fn timeout * 6
            RedrivePolicy:
                maxReceiveCount: 2
                deadLetterTargetArn: !GetAtt SampleDLQ.Arn

    SampleStream:
        Type: AWS::Kinesis::Stream
        Properties:
            ShardCount: 1

    SampleTable:
        Type: AWS::DynamoDB::Table
        Properties:
            BillingMode: PAY_PER_REQUEST
            AttributeDefinitions:
                - AttributeName: pk
                  AttributeType: S
                - AttributeName: sk
                  AttributeType: S
            KeySchema:
                - AttributeName: pk
                  KeyType: HASH
                - AttributeName: sk
                  KeyType: RANGE
            SSESpecification:
                SSEEnabled: yes
            StreamSpecification:
                StreamViewType: NEW_IMAGE

Outputs:
    HelloWorldFunction:
        Value: !GetAtt HelloWorldFunction.Arn

    Queue:
        Value: !Ref SampleQueue

    Stream:
        Value: !Ref SampleStream

    Table:
        Value: !Ref SampleTable

Docs finally done - @michaelbrewer @ran-isenberg could you have a quick pass before we release it tomorrow? All I need to do now is merge and start writing the release notes.
PR: https://github.com/awslabs/aws-lambda-powertools-python/pull/886
Here's what I've changed:

[x] Updated the docs to reflect the new BatchProcessor in favour of sqs_batch_processor and PartialSQSProcessor
[x] Added a Migration guide for those using sqs_batch_processor and PartialSQSProcessor
[x] Added Caveats section in case people use Tracer response auto-capture feature with this utility in large batch sizes
[x] Added sample event and sample response for each
[x] Added SAM infrastructure for SQS, Kinesis and DynamoDB along with DLQ and IAM Permissions
[x] Added an Extensibility section
[x] Added Pydantic section
[x] Updated Create your own processor
[x] Updated Key features
[x] Updated Intro
[x] Recreated Background
[x] Repurposed a few previous sections like Sentry integration under Legacy

Merged - it'll be out tomorrow with our Christmas release


Method to get the Idfa

So that e.g. links to website from app can be decorated.

What is the idfa?

From the mobile context...
On 5 Jun 2015 4:00 pm, "Josh"<EMAIL_ADDRESS>wrote:

What is the idfa?
—
Reply to this email directly or view it on GitHub
https://github.com/snowplow/snowplow-android-tracker/issues/121#issuecomment-109320612
.


Can't use token based authentication for artifact resolution

Hello, I'm having an issue injecting token headers for resolver.
For example::
I have this repo resplver:
resolvers += "gitlab" at "https://gitlab.com/api/v4/projects/11111111/packages/maven"
Then I try to change coursier config and attach header for repository:
csrConfiguration ~=   (_.withVerbosityLevel(1).withAuthenticationByRepositoryId(Vector(("gitlab", Authentication(Seq(("Deploy-Token", "XXXXXXXXXXXXXXXX")))))))
And this fails with the following error when performing sbt update:
[error] (update) sbt.librarymanagement.ResolveException: Error downloading com.test:gitlab-testing:1.0 [error]   Not found [error]   Not found [error]   not found: /home/env/.ivy2/local/com.test/gitlab-testing/1.0/ivys/ivy.xml [error]   not found: https://repo1.maven.org/maven2/com/test/gitlab-testing/1.0/gitlab-testing-1.0.pom [error]   not found: https://gitlab.com/api/v4/projects/11111111/packages/maven/com/test/gitlab-testing/1.0/gitlab-testing-1.0.pom
If I try disabling coursier and injecting the header through URLHandlerRegistry.setDefault(dispatcher), it is able to resolve the artifact.
Any pointers how can I correctly inject auth headers when updating with coursier enabled?

I'm not really sure, but FYI, this thread has some successful reports of using HTTP header based authentication with coursier.

@alexarchambault I have found out a bug on gitlab.com platform, they only support Private-Tokens at the moment, when trying to fetch dependencies using Deploy-Token, it fails with authorization error. This is all cleared up now.
But, can I ask another question? How about publishing artifacts, is this possible to achieve without hacking GigahorseUrlHandler and URLHandlerDispatcher in oder to set custom headers? I am not sure if this is in scope of this project or I should seek hints on sbt project