/connect/register returns http status 401 given unauthenticated request instead of 200

Expected Behavior
Returns http status 401 when calling /connect/register given unauthenticated request, as this endpoint is called from backend.
Current Behavior
Returns http status 302 and then 200 after the redirection when calling /connect/register given unauthenticated request
Context
.oidcClientRegistrationEndpoint("url") provides the ability to use /connect/register and reigster oauth2 client.
It currently redirects to the endpoint defined as the following:
        http
            .exceptionHandling { exceptions ->
                exceptions.authenticationEntryPoint(LoginUrlAuthenticationEntryPoint("/$ROUTE"))
            }

It creates false alarm in the tool OWASP API scan (https://www.zaproxy.org/docs/docker/api-scan/) as it returns 200.
my idea would resolve the issue as the following:
class OAuth2LoginUrlAuthenticationEntryPoint(loginFormUrl: String, settings: AuthorizationServerSettings) : LoginUrlAuthenticationEntryPoint(loginFormUrl) {
    override fun commence(
        request: HttpServletRequest,
        response: HttpServletResponse,
        authException: AuthenticationException
    ) {
        if (request.requestURI.contains(settings.getOidcClientRegistrationEndpoint()) {
            response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException.message)
        } else {
            super.commence(request, response, authException)
        }
    }
}

do you think this class should be supported in the library? if so, I can opend a PR.

@HungUnicorn

Returns http status 302 and then 200 after the redirection when calling /connect/register given unauthenticated request

The reason 302 is being returned is because you are attempting to access http://localhost:9000/connect/register directly from the browser. Dynamic Client Registration is not designed to be called by a browser agent. Instead the OAuth2 Client is meant to send a POST request to the http://localhost:9000/connect/register endpoint. Please review the spec for more details.

not quite. if the request is sent using curl, it returns 302 without following redirect or 200 following redirect.

not quite. if the request is sent using curl, it returns 302 without following redirect or 200 following redirect.

@HungUnicorn

Returns http status 302 and then 200 after the redirection when calling /connect/register given unauthenticated request

The reason 302 is being returned is because you are attempting to access http://localhost:9000/connect/register directly from the browser. Dynamic Client Registration is not designed to be called by a browser agent. Instead the OAuth2 Client is meant to send a POST request to the http://localhost:9000/connect/register endpoint. Please review the spec for more details.

not quite. if the request is sent using curl, it returns 302 without following redirect or 200 following redirect.


CARDS-2058 - PREMs: Survey instructions improvements

Specs:

CARDS-2058

Suggestion: For the sake of consistency, we may consider doing center alignment on the "Thank you" page as it is done here:

Suggestion: For the sake of consistency, we may consider doing center alignment on the "Thank you" page as it is done here.

Done in 09ac8db.

Question 1: Should we use bold fonts in the last sentence "Your response have been..." on the "Thank you" page?

Agreed on and done in 09ac8db.

Question 2: The last 2 pages seem to say the same thing. Should we remove some text from the last one?

After #1322 is merged, there won't be a Close button and the user won't advance to that 2nd page.


Deployment URL not loading Viya

------------UPDATE------------
After further troubleshooting, we have found the problem, however unsure of the solution still.
The problem is that - for some reason - the number of pods on the stateless VM is being scaled up to the max amount specified of 110. This is the default number that comes with the IAC repository.

There are 110 Network interfaces associated with this VM scale set, and only 1 actually works. When using the correct IP address, we can in-fact get a SAS Logon screen, the other 109 don't work. There should only be one though. Why is this VM scale set maxing out the pods when we've done nothing but deploy the environment?
------------END UPDATE------------
I have just finished the deployment script for the environment. All pods and nodes are running and appear to be in a healthy state.
Problem:
After deployment, the URL we would use to access the web application is not returning anything. The DNS record resolves to the IP address properly as expected; however the SAS Logon page does not load
Troubleshooting:
I have uninstalled / reinstalled Viya. We have compared the Azure Marketplace environment to the environment in question here. We noted that each Kubernetes node was taking 100+ IP addresses, where the Marketplace environment only used 1 per node.:

We also noticed that the Marketplace environment, as well as my own test environment, both had their health probes return from the AKS-SYSTEM node as healthy, whereas in this environment it does not.
Marketplace:

Problematic Environment:

This suggests some discrepancy in the customer environment that the marketplace deployment / my personal deployment don’t contain. We can use both environments to compare against as needed.

I've setup a cluster myself and only see the 1 interface we create not an interface per pod count. Is this an instance where you've altered the configuration values for the pods?  It's kinda hard to tell. If needed reach out and set up a 30 minute meeting and we can go over the setup. I'll be OOTO on 12.2.2022 but check my calendar for Mon/Tue of next week.

We fixed it – the guy we were working with who was hosting the infrastructure said there was some mismatch with the infrastructure settings. They were bringing their own network rather than having the code deploy it all.
I will get up with him at a later date and hopefully add some details on the issue/fix as I don’t fully understand what was wrong yet.
From: Thomas S. Pangborn @.>
Sent: Thursday, December 1, 2022 2:28 PM
To: sassoftware/viya4-deployment @.>
Cc: Thomas Lehman @.>; Author @.>
Subject: Re: [sassoftware/viya4-deployment] Deployment URL not loading Viya (Issue #347)
EXTERNAL SENDER
I've setup a cluster myself and only see the 1 interface we create not an interface per pod count. Is this an instance where you've altered the configuration values for the pods?  It's kinda hard to tell. If needed reach out and set up a 30 minute meeting and we can go over the setup. I'll be OOTO on 12.2.2022 but check my calendar for Mon/Tue of next week.
—
Reply to this email directly, view it on GitHubhttps://github.com/sassoftware/viya4-deployment/issues/347#issuecomment-1334250411, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AL4R74JLVMPRMUXZOAJALBDWLD34BANCNFSM6AAAAAASO3SSAI.
You are receiving this because you authored the thread.Message ID<EMAIL_ADDRESS>

Based on the last comment, user was able to resolve the issue. Closing this issue.


Roll engine cd858489cc4a..381307b5b70d (1 commits)

git@github.com:flutter/engine.git/compare/cd858489cc4a...381307b5b70d
git log cd858489cc4a..381307b5b70d --no-merges --oneline
2019-08-31<EMAIL_ADDRESS>Roll src/third_party/skia c2ec9bfe1bb5..6e637472ebf3 (1 commits) (flutter/engine#11809)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

Auto-roller completed checks. About to merge.


[Feature Request] Hide on Media Size based on settings in el-col media queries

Existing Component
Yes
Component Name
el-col
Description
When specifying :sm="6" or :md="12" for example, then :lg="0" should hide the el-col, or have some other means of hiding or showing items based on screen size. Somewhat like Bootstrap's hide-on-sm-down etc.
Example:
https://jsfiddle.net/pj71jkyw/497/

Fixed in #7541


Visual feedback while making a screenshot

I we use the latest versions of html2canvas library, screenshot generation can take a lot of time (some seconds). Is it possible to show a spinner or a message "Generating a screenshot..." before opening the final modal window?

+1


RE-699: Swap 'return 42' line to Carp::croak()

RE-699: die() instead of return 42 within _ssystem().

Works for me - I took the “extremely literal” approach 😂
Get Outlook for iOShttps://aka.ms/o0ukef

From: Travis Holloway @.>
Sent: Monday, September 23, 2024 4:47:34 PM
To: cpanel/elevate @.>
Cc: David Lanning @.>; Author @.>
Subject: Re: [cpanel/elevate] RE-699: Swap 'return 42' line to die() (PR #514)
@cPholloway requested changes on this pull request.

 if $args[0] !~ '^/' || !-x $args[0];

Let's use Carp::confess so that we get a backtrace.
—
Reply to this email directly, view it on GitHubhttps://github.com/cpanel/elevate/pull/514#pullrequestreview-2323540661, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ARWT3JYZ43K5NYR6FTBVYADZYCD7NAVCNFSM6AAAAABOWYQLPWVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDGMRTGU2DANRWGE.
You are receiving this because you authored the thread.Message ID: @.***>

make test?


fix(info): hide starting message if no command is set

@dmbch travis is green - just the status report has not arrived at GitHub.
Please merge and release :)


Add TaskGraphExpandCommandHandler

Added

Added TaskGraphExpandCommandHandler

Codecov Report

Merging #145 (b002b1a) into master (f0b95c5) will increase coverage by 4.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   95.11%   99.17%   +4.05%
==========================================
  Files         107       11      -96
  Lines        1761      241    -1520
  Branches      260       54     -206
==========================================
- Hits         1675      239    -1436
+ Misses         83        2      -81
+ Partials        3        0       -3

Flag
Coverage Δ

cuaktask
99.17% <ø> (ø)

iocuak
?

porygon
?

porygon-typeorm
?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

...s/iocuak/src/binding/models/domain/BindingScope.ts

...CreateCreateInstanceTaskGraphNodeCommandHandler.ts

...crud/modules/iocuak/DomainCreateContainerModule.ts

...s/porygon/src/crud/models/domain/CrudModuleType.ts

...ata/utils/api/isContainerModuleClassMetadataApi.ts

...es/iocuak/src/binding/models/domain/BindingType.ts

...tainerModule/utils/api/convertToContainerModule.ts

packages/iocuak/src/common/utils/chain.ts

...a/services/api/MetadataServiceApiImplementation.ts

...stanceDependenciesTaskGraphExpandCommandHandler.ts

... and 86 more

Continue to review full report at Codecov.

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


Cleanup module dependencies pt2

Codecov Report

Merging #948 (7371286) into devel (e142cb4) will increase coverage by 0.03%.
The diff coverage is 98.42%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##            devel     #948      +/-   ##
==========================================
+ Coverage   92.11%   92.14%   +0.03%
==========================================
  Files          41       43       +2
  Lines        4948     4968      +20
==========================================
+ Hits         4558     4578      +20
  Misses        390      390

Impacted Files
Coverage Δ

hahomematic/const.py
100.00% <ø> (ø)

hahomematic/helpers.py
100.00% <ø> (ø)

hahomematic/platforms/device.py
93.58% <90.00%> (ø)

hahomematic/platforms/__init__.py
93.54% <93.54%> (ø)

hahomematic/platforms/support.py
98.52% <98.52%> (ø)

hahomematic/central_unit.py
87.14% <100.00%> (-0.02%)
:arrow_down:

hahomematic/client.py
59.73% <100.00%> (ø)

hahomematic/decorators.py
98.68% <100.00%> (ø)

hahomematic/parameter_visibility.py
95.26% <100.00%> (+0.29%)
:arrow_up:

hahomematic/platforms/custom/__init__.py
100.00% <100.00%> (ø)

... and 30 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


SOLR-16968: The MemoryCircuitBreaker now uses average heap usage

https://issues.apache.org/jira/browse/SOLR-16968
Introduced a new utility class AveragingMetricProvider that will cache the average for a double value provided by the breaker. Uses a scheduled executor every 5 seconds, which is shared by all instances of this class. This same utility can be used by other CBs to achieve the same, but I started with MemoryCircuitBreaker.
As this requires some cleanup of executor threads, CircuitBreaker now implements Closeable and the registry will close all CBs on close, which is also called from CoreContainer#doClose. I also added some synchonization on the map, which isn't really necessary in normal runtime, but I figured useful for tests.
NOTE that this may conflict with other in-flight CB PRs...

@atris feel free to weigh in here. The intention is to get fewer "false positive" request rejections due to short spikes. Now there will be some delay (0-30s) from heavy memory pressure starts until the breaker starts tripping, and likewise some time before we allow requests again after cooling down. So if the client implements some kind of exponential backoff logic on receipt of HTTP 429 errors, the system will stabilize right under the memory threshold. If they don't, it will be an oscillating pattern on and off, but hopefully give Solr time to recover in between.

Planning to merge this on friday...


Update fem99.jl

For Taichi 1.4, the matmul operator @ should be replace with the x.matmul(y) function.

Thanks!


Pair filtering

when pdr-predictoor starts, we need to be able to filter what pairs to act upon.
ie:  We want to predict  for btc-tusd on binance and eth-usdt on kraken.   We are not interested in eth-usdt on binance (and other pairs)

correct, but if you take a look at the code, it only does a filtering on dt name.
Since then, we have added a full spec of describing pairs in https://github.com/oceanprotocol/pdr-private/issues/19#issuecomment-1591330040  and it was implemented in https://github.com/oceanprotocol/pdr-publisher/blob/main/publish.py#L61-L65
So we need to update the code logic to take erc725 keys from graph and do additional filtering


Allow building ghc-shake with stack

I've found stack to be more reliable than cabal sandboxes.
This PR adds build.stack.sh based on build.cabal.sh

Thanks @joehillen! I spotted a typo which seems to have come from build.cabal.sh: absoltueRoot. Could you fix this in both scripts?
I can't test this myself, but I hope @ndmitchell could test it when he is back as he is also keen on using Stack. It would be nice to have .bat equivalents for all .sh scripts too, but this could be done separately.

Not sure I'll be able to test much as I'm on Windows and using the .bat, but it all looks plausible. I have been using stack as the installed environment, but global cabal packages to build this project.

@snowleopard I fixed the typos
@ndmitchell It should work in cygwin (or whatever people use nowadays).

@joehillen Thanks again! This is now merged.


Http error with final release of angular2

I'm trying to make an http request (post or get) but as soon as the functions is called the app closes and shows the error:
JS ERROR Error: Error in login/login.component.html:9:51 caused by: null is not an object (evaluating '_angular_platformBrowser.__platform_browser_private__.getDOM().getCookie')
I am injecting the http object in the constructor, I'm importing it in the NgModule, I don't know what could it be..
I have done this before in Angular2 rc4 but I'm not being able to do it now.
EDIT: I made a little improvement, I changed the HttpModule in the NgModule for NativeScriptHttpModule and now it doesn't crash but enters in the function when an error occurs and shows: Response with status: 200 for URL: null

We had the exact same problem, you actually need to use this:
import { NativeScriptHttpModule } from "nativescript-angular/http";
Add that to your app.module.ts and into your imports

Thank you for your response. I found the main reason of the problem. iOS emulator doesn't work with local server. I was using mamp but it gives the URL: null error. I tried with a https demo api and it worked... So i have to upload my api to a https server!

By default iOS doesn't allow requests over non https, but you can enable it.
You can add the following to your Info.plist under app_resources/iOS.
Note changing this file means you need to re build your app with tns build ios --emulator
See this issue https://github.com/NativeScript/NativeScript/issues/1881

I'm still have this problem on android.. any help?

Hi @productank, do you get any log?
Share it so I can help you.

thanks for the fast response, it works on ionic serve doesn't work on android
import {Component,NgZone,Injectable} from '@angular/core'; import {Platform, NavController, NavParams, ViewController,AlertController} from 'ionic-angular'; import {Http, Headers, RequestOptions,Response} from '@angular/http'; //import { FormsModule, ReactiveFormsModule } from '@angular/forms'; //import {Observable} from 'rxjs/Observable'; import 'rxjs/Rx'; import { Observable } from 'rxjs/Observable'; import { ErrorObservable } from 'rxjs/observable/ErrorObservable'; import 'rxjs/add/operator/map';
   let link = 'https://gamerholic.com/server/v2/app_get_start.php';     let data_post = JSON.stringify({user_id:this.user_id,device:this.device_id});     let options = new RequestOptions({ headers: this.headers });     return this.http.post(link,data_post,options)             .map(response => response.json())             .subscribe(                 data => this.get_start_data = data,                 err => this.logError(err),                 () => console.log('get actual visits complete')              );
 logError(error){     console.log(error)   }
Http.post error Response with status: 0 for URL: null
is all I get

Try this:
Instead of:
let data_post = JSON.stringify({user_id:this.user_id,device:this.device_id});
Do this:
let data_post = {user_id:this.user_id,device:this.device_id};

same error result

Can you try it without the headers and without the stringify, just to see if shows any errors. I'll check something meanwhile

works without stringify and headers... big thanks

Niicee!! You are welcome!

will say though, this new way doesn't work on ionic serve which is slowing down development DRASTICALLY since live reload rarely works on android...

Hi, I have this same issue. I'm trying to get some information using a service and when I run the iOS emulator for testing the service, and I get this message: Response with status : 200 for URL: null. Now I'm using the 2.4.2 Nativescript current and latest version.
And also I changed the Info.plist file. Here is my service code:
getRecords(stringUrl:string){`
//Asign Headers
let headers = new Headers();
headers.append("Content-Type", "application/json");
headers.append("Authorization", "Bearer: "+ this.config.loginToken);
// Returns observable with API answer
return this.http.get(
this.config.qqcURL +"/records?from_date=2016-11-22T00:00:00&to_date=2016-12 22T23:59:59&tags=Testing&durop=>=&startduration=00:00:00",
{headers : headers}
)
.map(response => response.json())
.map(data => {
let searchList = [];
data.Result.forEach((item) => {
if(item.session_status==1){
searchList.push(new Record(item.startdate,
item.duration, item.inbound,item.outbound,
item.common_id, item.score_avg, item.my_score,
item.id,item.tags));
}
});
return searchList;
},
err => console.log(err))
}
And my Info.plist file here:

Please, If you could help I would be so gratefull.


ng-repeat of objects uses $$hashkey, but i declare 'track by'

Hi, i got a problem, i declare the ng-repeat of lists of objects using track by uniqueid, but the ui-select still uses '$$hashkey' like he cant reconognize the track.
<ui-select
                               multiple
                               ng-init= "typeDocumentsAll= listTypeDocs()"
                               ng-model="searchParams.typedocs"
                               theme="select2"
                               style="width: 200px;">
                      <ui-select-match placeholder="Select the type of document.">
                                {{$item.code}}
                      </ui-select-match>
                      <ui-select-choices
                            repeat="typedoc in (typeDocumentsAll | filter:$select.search)
                                                                                track by typedoc.code "
                      >

                          name:

                      </ui-select-choices>
                    </ui-select>

This is relationed to #665

I think this is a dupe of #665 so closing.


[system-probe] Make port mapping code network namespace aware

What does this PR do?
This set of changes makes the port mapping code in system-probe network namespace aware. Before we were only getting the ports for the system-probe process, which runs in the root network namespace. This has implications for containers that have listening ports, with traffic to them being marked incorrectly as outgoing (since system-probe is not aware of the listening ports), when it should be incoming, resulting in failed address resolutions.
Changes to port mapping code:

ports are stored prefixed with network namespace's inode number
new methods to do lookup by (network ns, port), instead of just (port)
store pid as well as the port in bpf maps; the pid is then used to lookup the network namespace inode when adding to the port mappings in go code
we check both the port and nat'd port when determining the connection direction

Motivation
Failed resolutions in istio specifically. Traffic directed to an istio sidecar'd pod is redirected to 15006 inside the pod, and is marked as outgoing, when it should be marked as incoming. This is because port 15006 was not being picked up by the port mapping code (the initial dump).
Additional Notes
Describe your test plan

make sure the agent and system-probe are not running
run a local container: docker run -d -p 8081:80 nginx
start the system-probe only
run curl localhost:8081; wait a second or two
run curl localhost/connections --unix-socket /var/run/sysprobe/sysprobe.sock | jq '.conns[] | select(.laddr.port==80 and .direction=="incoming")'; you should see some json printed out (exactly one object), if not this is a test failure
run another local container: docker run -d -p 8082:80 nginx
run curl localhost:8081
run curl localhost:8082; wait a second or two
run curl localhost/connections --unix-socket /var/run/sysprobe/sysprobe.sock | jq '.conns[] | select(.laddr.port==80 and .direction=="incoming")'; you should see some json printed out (exactly two objects this time, with different laddr.ip fields), if not this is a test failure

It would be helpful to have a more detailed test plan come QA time.

It would be helpful to have a more detailed test plan come QA time.

Added a more manual test.

@leeavital regarding getting the net namespace for udp connections, we can use inet_bind and inet6_bind instead of sys_bind to get the listening ports for udp. Those do have a sock object: https://elixir.bootlin.com/linux/latest/source/include/net/inet_common.h#L37

@hmahmood that sounds like a great idea to me! We should make sure the address info is not missing the way it was for udp_sendmsg though.

@hmahmood that sounds like a great idea to me! We should make sure the address info is not missing the way it was for udp_sendmsg though.

Do you want to do this as a follow up?

Let's include it here since scraping procfs in the hot path is not ideal

Let's include it here since scraping procfs in the hot path is not ideal

So I have removed the procfs code from the hot path since we're always including the net ns for connections (0 for udp). I think we should do this as a follow up, since it would be easier to review on its own.


Tidy sweep

This adds support for node 5.x (in a very safe way that doesn't break 0.10.x) and makes the tapkick sample more robust.

lgtm :+1:


⚠ Bofrost.fr has degraded performance

In aaa9a3b, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 906 ms

Resolved: Bofrost.fr performance has improved in 15225af.


Postgres id not marked as Generated field

Hey, first of all, thanks for creating this package! Super awesome, exactly what I was looking for. I tried it out on my prisma schema, but the types don't come out quite right for what I'm expecting. Here's a simple example:
model Transaction {
  id        String   @id @default(uuid())
  createdAt DateTime @default(now())

  foo String?
}

Generates:
export type Transaction = {
  id: string;
  createdAt: Generated<Timestamp>;
  foo: string | null;
};

Whereas I'd expect the actual result to be:
export type Transaction = {
  id: Generated<string>; // id should be marked as generated
  createdAt: Generated<Timestamp>;
  foo: string | null;
};

I'll work on a PR to get this change included if you think it's a fit.

Oh, I see now, uuid is done in the JS level (thanks for the comment in the source code). Since I'm using Postgres, I can change the model to use postgres' dbgenerated instead, like:
model Transaction {
  id        String   @id @default(dbgenerated("gen_random_uuid()"))
  createdAt DateTime @default(now())

  foo String?
}

Which marks it as Generated.

@Joshuabaker2 Yes exactly! I should probably mention this in the README. I really appreciate the issue though, let me know if there's anything else that's weird that you come across.

It would be great to mention this in the README because users of this library probably want to opt out of all the js-runtime stuff Prisma does to columns.

@jokull I've added a section to the README explaining this 🤝


[Issue #376] Filter Expired Scholarships

Description of changes
Create an 'Unexpired Scope' which filters out expired scholarships based on close_time. Then use this scope for the scholarships#index
Issue Resolved

Fixes #376

@robbkidd I'm happy to rebase in that change once it's merged in. Otherwise, I can pluck out the VCR changes.

@colto The changes look good and #413 merged to master branch, so this could be rebased for removing the cassettes.

@robbkidd is this good to merge with the changes?


Use ophyd edge detection on i03

As of https://github.com/DiamondLightSource/dodal/pull/143 we can do pin tip centring in ophyd instead of EPICS. We should soak test this on i03.
Acceptance Criteria

It is possible to switch between ophyd and EPICS edge detection implementations for the pin tip centring algorithms
This switch can be done via a property in GDA
A preliminary test is done with this on i03

Need to change switch to be a property and soak test

Waiting on https://gerrit.diamond.ac.uk/c/gda/gda-mx/+/40986

Gerrit change merged, closing this issue


warnings in build vulnerabilities and out of date nuget

Helllo, just an FYI, running the ef migrate and build commands
The Entity Framework tools version '6.0.1' is older than that of the runtime '8.0.0'. Update the tools for the latest features and bug fixes. See https://aka.ms/AAc1fbw for more information.
Done.

Also mediator extensions complains its deprecated

So when I tried to update to latest..

@fasteddys For now you go into Templates > _Layout and edit the template, but #182 for menu management is next up on the roadmap now that #177 is ready.

Bunch of nuget package clean up and upgraded all packages for v1.2.0.


feat: Add better error handling [#108]

Adds better error handling via a new macro -- map_try.
Error handling in Thruster at the moment is painful to say the least. It usually involves multiple levels of error handling and far too much indentation, or it involves layers of enums and implementations of contexts.
Ideally, we'd be able to simply have the solution:
async fn endpoint(context: BasicContext, next: MiddlewareNext<BasicContext>) -> Result<Ctx, ThrusterError> {
  let s = some_call()?;

  context.body(s);

  Ok(context)
}

However, in order for the error to be properly mapped down the line, the resulting calls to next need access to a context, as the context they were supplied with as an argument is moved when next(context) is called. This means we need a thruster specific error, ThrusterError, that contains a context. Naively we would think that this should work:
async fn endpoint(context: BasicContext, next: MiddlewareNext<BasicContext>) -> Result<Ctx, ThrusterError> {
  let s = some_call()
    .map_err(|_| {
      Error {
        context,
        message: "Parsing failure!".to_string(),
        status: 400
      }
    })?;

  context.body(s);

  Ok(context)
}

However, the compiler isn't clever enough to see that if map_err is called, then context.body is not thanks to the ? operator.
If we are explicit about this using a match, like the expansion of try!, however, the compiler sees the code paths and is able to adjust accordingly. This PR adds map_try!, which does just that and allows for a mapping block to correctly convert the error type.
async fn endpoint(context: BasicContext, next: MiddlewareNext<BasicContext>) -> Result<Ctx, ThrusterError> {
  let res = "Hello, world".parse::<u32>();
  let non_existent_param = map_try!(res, Err(_) => {
      Error {
        context,
        message: "Parsing failure!".to_string(),
        status: 400
      }
    }
  );

  context.body(&format!("{}", non_existent_param));

  Ok(context)
}

Full example:
extern crate thruster;

use thruster::{MiddlewareNext, MiddlewareReturnValue, MiddlewareResult};
use thruster::{App, BasicContext as Ctx, Request, map_try};
use thruster::server::Server;
use thruster::errors::ThrusterError as Error;
use thruster::ThrusterServer;
use thruster::thruster_proc::{async_middleware, middleware_fn};

async fn plaintext(mut context: Ctx, _next: MiddlewareNext<Ctx>) -> MiddlewareResult<Ctx> {
  let val = "Hello, World!";
  context.body(val);
  Ok(context)
}

async fn error(mut context: Ctx, _next: MiddlewareNext<Ctx>) -> MiddlewareResult<Ctx> {
  let res = "Hello, world".parse::<u32>();
  let non_existent_param = map_try!(res, Err(_) => {
      Error {
        context,
        message: "Parsing failure!".to_string(),
        status: 400
      }
    }
  );

  context.body(&format!("{}", non_existent_param));

  Ok(context)
}

async fn json_error_handler(context: Ctx, next: MiddlewareNext<Ctx>) -> MiddlewareResult<Ctx> {
  let res = await!(next(context));

  let ctx = match res {
    Ok(val) => val,
    Err(e) => {
      let mut context = e.context;
      context.body(&format!("{{\"message\": \"{}\",\"success\":false}}", e.message));
      context.status(e.status);
      context
    }
  };

  Ok(ctx)
}

fn main() {
  println!("Starting server...");

  let mut app = App::<Request, Ctx>::new_basic();

  app.use_middleware("/", async_middleware!(Ctx, [json_error_handler]));

  app.get("/plaintext", async_middleware!(Ctx, [plaintext]));
  app.get("/error", async_middleware!(Ctx, [error]));

  let server = Server::new(app);
  server.start("<IP_ADDRESS>", 4321);
}

Delivers [#108]

@CKarper @kjvalencik sound reasonable to you gents?

Gonna go ahead and merge this in, will also publish the release.

Sorry for the lack of feedback.   Busy week this one.  :-)
This is pretty great, I like it!  Thanks for seeing this through.

Also -- false alarm on publishing a new version, we'll have to wait until Tokio publishes a release, as crates.io doesn't allow you to publish git repos as dependencies.

Thanks @trezm! This looks nice. Interestingly, if the ;postfix-macro RFC](https://github.com/rust-lang/rfcs/pull/2442) gets through, this could have very similar syntax to ?.
I tried to see if there were any open issues around the borrow checker not being able to tell the map_err ownership is mutually exclusive with the remainder of the body, but couldn't find anything. I believe that the issue doesn't stem from the ? itself, but, from the fact that nothing guarantees map_err doesn't retain ownership.

@trezm I have a couple of different examples that don't require adding an additional type parameter. When you are ready for a major revision, I think it would be a good idea to make the error type a generic, but in the meantime I have a couple of ideas for improvements.
The more complicated version is to make the error type Box<dyn Error> instead of ThrusterError.
https://github.com/kjvalencik/Thruster/commit/7a94b7e7a861980564e17b9b6a289e34c93bfb2c
The more simple version is to add a cause: Option<Box<dyn std::error::Error>> to ThrusterError.
https://github.com/kjvalencik/Thruster/commit/7b6ff9eac473960b9c828f40191a5f2463983aa8
In both cases it allows downcasting to your concrete error type for more detailed handling.
Thoughts?

Honestly, I thought I'd prefer the first solution, but definitely prefer
the second. It feels slightly more idiomatic than the magic underlying the
downcasting of the first solution.
That being said, the ideal solution in my mind would be to have the return
type be Result<Context, dyn Error>, but obviously this fails to compile
because the error size isn't known at compile time.
I'll keep thinking on this, but I'm leaning towards the second option at
the moment.
On Fri, May 24, 2019, 10:20 AM K.J. Valencik<EMAIL_ADDRESS>wrote:

@trezm https://github.com/trezm I have a couple of different examples
that don't require adding an additional type parameter. When you are ready
for a major revision, I think it would be a good idea to make the error
type a generic, but in the meantime I have a couple of ideas for
improvements.
The more complicated version is to make the error type Box
instead of ThrusterError.
kjvalencik@7a94b7e
https://github.com/kjvalencik/Thruster/commit/7a94b7e7a861980564e17b9b6a289e34c93bfb2c
The more simple version is to add a cause: Option<Box> to ThrusterError.
kjvalencik@7b6ff9e
https://github.com/kjvalencik/Thruster/commit/7b6ff9eac473960b9c828f40191a5f2463983aa8
In both cases it allows downcasting to your concrete error type for more
detailed handling.
Thoughts?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/trezm/Thruster/pull/110?email_source=notifications&email_token=AAJWOLJZYVASDGRARQSV5NTPW72RXA5CNFSM4HNFTZTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWFQMYY#issuecomment-495650403,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJWOLOYSTTTHPVAEDK5ZYLPW72RXANCNFSM4HNFTZTA
.

Included the changes in #112


platformio: 2.10.3 -> 3.4.1

Motivation for this change
platformio was too old to build https://github.com/arendst/Sonoff-Tasmota
bump as deps:
pyserial: 2.7 -> 3.4
semantic_version: 2.4.2 -> 2.6.0
add patch for fixing broken PYTHONPATH detection function. Without this patch the chrooted platformio will crash when forking itself and trying to import requests afterwards. We know how the search path looks like because we prepare it in the .platformio-wrapped executable.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ONGOING] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.
[x] split commit

Broken Deps

[x] Octoprint - pinned deps
[x] Tiros - equires requests2, seems to have never built correctly

@FRidh okay done, mind having a look?

thanks!

@abbradar We have unpinned some dependencies from octoprint; pinging you as the maintainer: https://github.com/NixOS/nixpkgs/pull/29911/commits/7bc1d331e536b0abe5bc40a517045835bf691e8c


Updates for running tests with managed identity

Also can you remove the comment in SharedTimerTest::32,33.


apps: update dependencies & syscfgs as per mcumgr

Changing dependencies and syscfgs as per mcumgr changes based on changes for
mcumgr: https://github.com/apache/mynewt-mcumgr/pull/27
mynewt-core: https://github.com/apache/mynewt-core/pull/1917
This is a change that is part of unifying effort for MCUmgr and SMP

@utzig thanks, updated


Can't complete route53 challenge when requesting 7 SANs

I'm able to request 4-5 SANs reliably before it starts failing. I'm not able to complete this 7 SAN request.
I've tried adding a time.Duration(15000) delay to the route53 provider but it still fails.
Any tips?
2016/07/27 14:18:23 [INFO][bizops-queue.tools.production.domain.com, cross-storage.tools.production.domain.com, bizops.tools.production.domain.com, supportal.tools.production.domain.com, customers.tools.production.domain.com, bizops.tools.production.domain.com, merchant.tools.production.domain.com] acme: Obtaining bundled SAN certificate 2016/07/27 14:18:24 [INFO][bizops-queue.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:18:58 [INFO][bizops-queue.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:18:59 [INFO][bizops-queue.tools.production.domain.com] The server validated our request 2016/07/27 14:19:29 [INFO][cross-storage.tools.production.domain.com] acme: Could not find solver for: tls-sni-01 2016/07/27 14:19:29 [INFO][cross-storage.tools.production.domain.com] acme: Could not find solver for: http-01 2016/07/27 14:19:29 [INFO][cross-storage.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:19:58 [INFO][cross-storage.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:20:00 [INFO][cross-storage.tools.production.domain.com] The server validated our request 2016/07/27 14:20:29 [INFO][bizops.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:20:58 [INFO][bizops.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:21:06 [INFO][bizops.tools.production.domain.com] The server validated our request 2016/07/27 14:21:35 [INFO][supportal.tools.production.domain.com] acme: Could not find solver for: http-01 2016/07/27 14:21:35 [INFO][supportal.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:22:04 [INFO][supportal.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:22:08 [INFO][supportal.tools.production.domain.com] The server validated our request 2016/07/27 14:22:37 [INFO][customers.tools.production.domain.com] acme: Could not find solver for: tls-sni-01 2016/07/27 14:22:37 [INFO][customers.tools.production.domain.com] acme: Could not find solver for: http-01 2016/07/27 14:22:37 [INFO][customers.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:23:06 [INFO][customers.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:23:08 [INFO][customers.tools.production.domain.com] The server validated our request 2016/07/27 14:23:37 [INFO][bizops.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:24:10 [INFO][bizops.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:24:40 [INFO][merchant.tools.production.domain.com] acme: Could not find solver for: http-01 2016/07/27 14:24:40 [INFO][merchant.tools.production.domain.com] acme: Could not find solver for: tls-sni-01 2016/07/27 14:24:40 [INFO][merchant.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:25:13 [INFO][merchant.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:25:16 [INFO][merchant.tools.production.domain.com] The server validated our request 2016/07/27 14:25:49 [bizops.tools.production.domain.com] Could not obtain certificates         acme: Error 400 - urn:acme:error:malformed - Unable to update challenge :: Response does not complete challenge

I installed and ran the binary from #190
2016/07/27 14:58:51 [INFO][cross-storage.tools.production.domain.com, bizops.tools.production.domain.com, supportal.tools.production.domain.com, bizops.tools.production.domain.com] acme: Obtaining bundled SAN certificate 2016/07/27 14:58:51 [DEBUG] Attempting to post {"resource":"new-authz","identifier":{"type":"dns","value":"bizops.tools.production.domain.com"},"expires":"0001-01-01T00:00:00Z"} to https://acme-v01.api.letsencrypt.org/acme/new-authz 2016/07/27 14:58:51 [DEBUG] Attempting to post {"resource":"new-authz","identifier":{"type":"dns","value":"cross-storage.tools.production.domain.com"},"expires":"0001-01-01T00:00:00Z"} to https://acme-v01.api.letsencrypt.org/acme/new-authz 2016/07/27 14:58:51 [DEBUG] Attempting to post {"resource":"new-authz","identifier":{"type":"dns","value":"bizops.tools.production.domain.com"},"expires":"0001-01-01T00:00:00Z"} to https://acme-v01.api.letsencrypt.org/acme/new-authz 2016/07/27 14:58:51 [DEBUG] Attempting to post {"resource":"new-authz","identifier":{"type":"dns","value":"supportal.tools.production.domain.com"},"expires":"0001-01-01T00:00:00Z"} to https://acme-v01.api.letsencrypt.org/acme/new-authz 2016/07/27 14:58:51 [INFO][cross-storage.tools.production.domain.com] acme: Could not find solver for: http-01 2016/07/27 14:58:51 [INFO][cross-storage.tools.production.domain.com] acme: Could not find solver for: tls-sni-01 2016/07/27 14:58:51 [INFO][cross-storage.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 14:59:25 [INFO][cross-storage.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 14:59:25 [DEBUG] Attempting to post {"resource":"challenge","type":"dns-01","token":"zswOObQ8hJ2XXXXXVt_HFITTYnWAI","keyAuthorization":"zswOObQ8hJ2KbQASnlzGrm2ivqW0B_Vt_HFITTYnWAI.XXXX9p3q6re4Y4evsTNLDUfy0","error":{"type":"","detail":""}} to https://acme-v01.api.letsencrypt.org/acme/challenge/5EsnJPsTIC_MPxxxxyqcbnVhRKqw/199933539 2016/07/27 14:59:26 [INFO][cross-storage.tools.production.domain.com] The server validated our request 2016/07/27 14:59:56 [INFO][bizops.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 15:00:25 [INFO][bizops.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 15:00:25 [DEBUG] Attempting to post {"resource":"challenge","type":"dns-01","token":"dnus7o4P3sQPGXVcxxxxmnkr8","keyAuthorization":"dnus7oxxxxI9mWbwJ7ggNQP5iPpUKrzGmnkr8.ZzKx8rxxxxQ6Y9p3q6re4Y4evsTNLDUfy0","error":{"type":"","detail":""}} to https://acme-v01.api.letsencrypt.org/acme/challenge/TrBkHWNf_p9ly_rkTzns-CZgTnzXtq3rY7xxxxxGk/199933534 2016/07/27 15:00:26 [INFO][bizops.tools.production.domain.com] The server validated our request 2016/07/27 15:00:51 [INFO][supportal.tools.production.domain.com] acme: Could not find solver for: tls-sni-01 2016/07/27 15:00:51 [INFO][supportal.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 15:01:25 [INFO][supportal.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 15:01:25 [DEBUG] Attempting to post {"resource":"challenge","type":"dns-01","token":"EgLZbdlOrTYexxxxch7eznzeAf2rZ7OAkTYkCI","keyAuthorization":"EgLZbxxxxiAAnAWch7eznzeAf2rZ7OAkTYkCI.ZzKx8rD4CrzqkWMVOkPQ6Y9p3q6re4Y4evsTNLDUfy0","error":{"type":"","detail":""}} to https://acme-v01.api.letsencrypt.org/acme/challenge/oMMSI09FxxxxpfznqhvA3e9BJQNEpnDmx7I/199933527 2016/07/27 15:01:27 [INFO][supportal.tools.production.domain.com] The server validated our request 2016/07/27 15:01:56 [INFO][bizops.tools.production.domain.com] acme: Trying to solve DNS-01 2016/07/27 15:02:26 [INFO][bizops.tools.production.domain.com] Checking DNS record propagation... 2016/07/27 15:02:26 [DEBUG] Attempting to post {"resource":"challenge","type":"dns-01","token":"dnus7o4P3sQxxxxJ7ggNQP5iPpUKrzGmnkr8","keyAuthorization":"dnus7o4xxxxxVcI9mWbwJ7ggNQP5iPpUKrzGmnkr8.xxxxOkPQ6Y9p3q6re4Y4evsTNLDUfy0","error":{"type":"","detail":""}} to https://acme-v01.api.letsencrypt.org/acme/challenge/TrBkHWNf_p9ly_rkTzns-CZgTnzXtq3rY7pSADWRfGk/199933534 2016/07/27 15:03:00 [bizops.tools.production.domain.com] Could not obtain certificates         acme: Error 400 - urn:acme:error:malformed - Unable to update challenge :: Response does not complete challenge

Problem was between keyboard and chair. :-(
Lego should warn you about duplicate SAN names.


Looks like this repo is not being maintained?

I'd like to make some PRs to advance this repo but it looks like you are not maintaining it. If you'd like to add me as an owner I can be a maintainer if you are no longer interested in keeping up with it.

I created a fork with the fix for newer Angular versions and some error handling: https://github.com/CMiksche/ng-rn
I also maintain my fork and published it as "ng-rnc" to npm. Feel free to contribute.

I created a fork with the fix for newer Angular versions and some error handling: https://github.com/CMiksche/ng-rn

Thanks, this worked perfectly, no more RangeError: Maximum call stack size exceeded errors.
It renamed the files correctly, it even updated references to the component in HTML and modules.
Nice :)


fix: type declarations don’t depend on internal typings

We prevent typescript from generating declarations that reference the @paypal/sdk-constants package. This package does not provide types, instead we use our own type declarations in ./src/types.d.ts. These declarations are not available to users of the library.
Fixes https://github.com/paypal/react-paypal-js/issues/125

Awesome work @geigerzaehler! 💯 🥇 👍
I tested locally and the generated types no longer reference sdk-constants. Here's what I get for index.d.ts:
export * from "./components/PayPalButtons";
export * from "./components/PayPalMarks";
export * from "./components/PayPalMessages";
export * from "./ScriptContext";
export declare const FUNDING: Record<string, string>;

PR looks great! I appreciate you leaving a comment in the code explaining what's going on. There's one change request for a typo fix. After that's fixed, I'll merge it up.


Add support for http/type/union

Fixes https://github.com/microsoft/typespec/issues/3995

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


Calculate height of the wave from the bottom of the container instead of from the top

This is going to be a more controversial request because it does dramatically change the behavior of how height is currently calculated. Currently, the height attribute determines the amount of space from the top of the container to the bottom of the wave at it's lowest point. I believe it should calculate the amount of space of the wave from the bottom of the wave to its highest peak.
This is also an extension of #3 and #4, so those should be approved before this one is looked at.

Hello,
Thanks for your PR dude, really appreciated !
What is the purpose of this one, I understand that it change the calculation method but could you explain me why you want to change it.
Thanks


Access to Rake::Task

Is there a way to access the current instance of Rake::Task from within rake or ruby methods which are defined in rake?

You can call Rake::Task[:task_name] from anywhere that has the code loaded. If you wanted to load the Capistrano recipes from pure Ruby, you might have success simply loading (you might also try requireing it, but the semantics can be different with rake under some circumstances) and calling Rake::Task[:'deploy:starting'].invoke
https://github.com/ruby/rake might be a better place to ask


Key does not exist for 'telescope .actions': get_selected_entry

Nice work on this plugin, it's awesome!
I have an import with 2 tags, using the default UI works fine
Select file to import:
1) bar.ts - /^export const hello = "hello-bar"$/
2) foo.ts - /^export const hello = "hello-foo"$/
3) Enter path to file or package name manually for word "hello"
Type number and <Enter> or click with the mouse (q or empty cancels):

But with telescope, when I select an entry, I get this
E5108: Error executing lua ...im/plugged/telescope.nvim/lua/telescope/actions/init.lua:29: Key does not exist for 'telescope
.actions': get_selected_entry

nvim version v0.5.1
:PlugSnapshot shows that I have commit 7294924 for telescope, and commit 2bc10f for vim-js-file-import.
MacOS Big Sur, 11.2 (Apple M1)

I haven't used telescope in a while, so it's probably outdated. I'll take a look.

Should be fixed now.

Sweet, taking a look 😃

Yep, you got it.
Thank you!


Job错误  WARNING set(:164): failed to set events[fd=44#0, type=28, events=1024], Error: No such file or directory[2]

贴错误trace


Move user docs to docs/user-guide/

Fixes #11093
@bgrant0607

LGTM. Thanks!

cc @erictune

Need to update examples tests.

cc @RichieEscarez

fixed tests

Thanks. LGTM once Shippable passes.


Enhance slack posting to be a graphic

Currently the slack messages is simple text we should look at improving the format.

Obsolete addressed by #20


feature: define the interface SupernodeLocator

Signed-off-by: lowzj<EMAIL_ADDRESS>
Ⅰ. Describe what this PR did
issues: #1293
This pull request just defines the SupernodeLocator interface, I will open another pull request to refactor the dfclient to use this interface to get supernode.
Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

Codecov Report

Merging #1294 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1294   +/-   ##
=======================================
  Coverage   51.10%   51.10%
=======================================
  Files         122      122
  Lines        8082     8082
=======================================
  Hits         4130     4130
  Misses       3622     3622
  Partials      330      330

Continue to review full report at Codecov.

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

Please have a rebase for this PR. 😄

LGTM.


Suggestion : Raw label

Hi,
I think it is not possible to add a label containing html (some fa icon for example). We can do it in rows, using raw parameter, but not in labels, right ?
Well, that's a suggestion !
( Thanks for this project...! )

Yes, great idea - I'll add this on the next release (2.0.6). Currently, only the content can be set as raw html.

Thanks!
I have a lot more if you want :D

Yeah, keep em coming


In GUI sample, cannot type in multibyte characters in input box

As title.

Duplicates https://github.com/xamarin/urho/issues/161


Support multiple project switching

What would you like to be added:
Why is this needed:

Resolved by https://github.com/pipe-cd/pipecd/pull/3843 and https://github.com/pipe-cd/pipecd/pull/3846


Add number input

I saw that slack blockit support number input but can not find it in this gem

Hi @dongvv-2538! You're right that element is missing. I think it should be a change relatively similar to #166 / #167 / #164. If no one else gets to it i'll try and get to it this weekend.


fix: Music of Genesis Plaza keeps playing on the log in screen

What does this PR change?
Fix #1355
How to test the changes?

Log in and stay in Genesis Plaza.
Log out and return to the log in screen.
Check that Genesis Plaza music is off while the log in scren is open.

Our Code Review Standards
https://github.com/decentraland/unity-renderer/blob/master/docs/code-review-standards.md

🔴 I can still hear the music after logging out:
https://github.com/decentraland/unity-explorer/assets/139157886/d34ace2c-327a-4e0f-b484-62a899b7e718

🔴 I can still hear the music after logging out:

Hmmm... I'm seeing that the reason why it's not working, is because the changes in the volume of the "World SFX" channel are not working in the build (it works from editor), I don't know why...
In fact, if you go to the settings menu and try to change the "World SFX" slider, you will see that the the volume of the background music in Genesis Plaza doesn't change:

@anicalbano This is effectively a different issue. I'm not sure if we should create a different ticket for that or try to fix it directly in this one. In any case I'm gonna investigate why is it happening.

@anicalbano issue created: https://github.com/decentraland/unity-explorer/issues/1395

@anicalbano after talking with Ash, we decided to create a new issue for this: #1395
In my opinion we should merge this fix (although it doesn't still work because it depends on the other issue) and leave the responsibility to the other issue.

Agreed, then let's merge this and check with the fix of #1395 , thanks, Santi!


Bug: Environment variable not found: DATABASE_URL.

What happened?
When starting I am receiving the following error

Invalid `prisma.user.findMany()` invocation:

error: Environment variable not found: DATABASE_URL.
  -->  schema.prisma:3
   |
 2 |   provider = "postgresql"
 3 |   url      = env("DATABASE_URL")
   |

Validation Error Count: 1
    at ni.handleRequestError (\zipline\node_modules\@prisma\client\runtime\library.js:124:7090)
    at ni.handleAndLogRequestError (\zipline\node_modules\@prisma\client\runtime\library.js:124:6206)
    at ni.request (\zipline\node_modules\@prisma\client\runtime\library.js:124:5926)
    at async l (\zipline\node_modules\@prisma\client\runtime\library.js:129:10023)
    at async c (\zipline\.next\server\pages\api\auth\login.js:1:2814) {
  clientVersion: '5.6.0',
  errorCode: undefined
}

Version
latest (ghcr.io/diced/zipline or ghcr.io/diced/zipline:latest)
What browser(s) are you seeing the problem on?
Chromium-based (Chrome, Edge, Brave, Opera, mobile chrome/chromium based, etc)
Zipline Logs
Invalid `prisma.user.findMany()` invocation:

error: Environment variable not found: DATABASE_URL.
  -->  schema.prisma:3
   |
 2 |   provider = "postgresql"
 3 |   url      = env("DATABASE_URL")
   |

Validation Error Count: 1
    at ni.handleRequestError (C:\Users\klvoe\Desktop\zipline\node_modules\@prisma\client\runtime\library.js:124:7090)
    at ni.handleAndLogRequestError (C:\Users\klvoe\Desktop\zipline\node_modules\@prisma\client\runtime\library.js:124:6206)
    at ni.request (C:\Users\klvoe\Desktop\zipline\node_modules\@prisma\client\runtime\library.js:124:5926)
    at async l (C:\Users\klvoe\Desktop\zipline\node_modules\@prisma\client\runtime\library.js:129:10023)
    at async c (C:\Users\klvoe\Desktop\zipline\.next\server\pages\api\auth\login.js:1:2814) {
  clientVersion: '5.6.0',
  errorCode: undefined
}

Browser Logs
:3000/api/user:1

        Failed to load resource: the server responded with a status of 401 (Unauthorized)
:3000/api/user:1

        Failed to load resource: the server responded with a status of 401 (Unauthorized)
:3000/api/auth/login:1

        Failed to load resource: the server responded with a status of 500 (Internal Server Error)
login:1  Uncaught (in promise) SyntaxError: Unexpected token 'I', "Internal S"... is not valid JSON

Additional Info
No response

Not able to reproduce this, make sure if this isn't running on docker to build with environment variables present, or you may be able to bypass this by having the ZIPLINE_DOCKER_BUILD=true environment variable present.

Closing as stale.


Datagrid appending rows to table on pagination

Describe the bug
Rows are appending on pagination instead of navigation
How to reproduce
Kindly follow these links to reproduce
https://stackblitz.com/edit/angular-kqi9nq
https://angular-kqi9nq.stackblitz.io/
Steps to reproduce the behavior:
Click on pagination buttons to see the behavior
Expected behavior
Pagination must paginate according to row count
Versions
App

Angular 8.3
Node 10.16.0
Clarity: 2.2.2

@gnomeontherun @mathisscott

Facing same issue in 8.2.9 and clarity 2.2.0
Cannot replicate in 8.0.1 and clarity 2.0.1

It appears the demo is not setup fully. Clarity depends on the BrowserAnimationsModule and it appears adding that is solving the problem.
What is confusing to me is that there are no errors like I might expect, but that does appear to be a fix for it. I'll leave this open for now to dive a little deeper into why.

Thanks, @gnomeontherun it works. I had missed the required dependency.
But if it's required then it has to throw some error to intimate the user as you are also expecting.

I'm not sure why there is no error or exactly why it happens without the animations module, but I'm going to close this as resolved since that is the issue.


Improve Interface Type Annotations

What does this PR do?

Create custom type definition for update fields to better encapsulate the variety of options with UpsertResult. It's import to have both List[Union["UpsertResult", str]] along with List[str] and List["UpsertResult"] to have proper support for type checkers such as Pyright, which differentiate these. See here for details.
Change model_objs to an Iterable types, we sort on it immediately, so it's fine to pass in any iterable. This is mainly to more clearly support passing in a queryset.

Thanks!


Update ServiceMonitor version to <IP_ADDRESS>

The latest release of IIS ServiceMonitor contains a fix for https://github.com/microsoft/IIS.ServiceMonitor/issues/32, which is very annoying issue. @gislikonrad even ported ServiceMonitor to .NET to have it fixed: https://github.com/SOLIDSoftworks/iis-service-monitor

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: vitaliitylyk sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

@vitaliitylyk - Thanks for your contribution.  There's a new version of Service Monitor available.  Could you please update your changes to reference <IP_ADDRESS> instead?

@mthalman done, also rebased on latest master

Thanks @vitaliitylyk.  We'll roll this out for April's servicing update.


Setting receptive field size for music training samples

I am trying to apply WaveNet to music samples, and per the WaveNet paper I should be training with a larger receptive field. I feel that ideally the receptive field size should be in the tens of seconds so that WaveNet can keep it coherent across a longer time frame. To keep it simple let's say I just want the receptive field to cover around 5 seconds for now, which translates into 80000 samples in the fields, which then translates into around 16 dilation layers (80000 ~= 2**16.288), which appears to be prohibitively expensive to run.
Does anybody have experience try using a fairly large receptive field size on music samples? Do you have anything to share?

I think extending the receptive field to anywhere near that large will require a context stack.

@jyegerlehner Good point. The idea of 'context stacks' was mentioned only briefly in the paper in terse terms, and my understanding is that it roughly amounts to using multiple smaller WaveNet stacks to handle components of the training data at different frequencies, possibly including polling.
I am leery of this approach because: while the beauty of WaveNet is that it works directly on raw audios, there is only so far that you can push it. Pooling works well with images, but with audios (and without converting data to the frequency domain) it will destroy vital information in the data. Using much lower sampling rate also grossly distorts the training data. On the other hand, if  training data is converted to the frequency domain first (say, using Fourier Transform) then fed into a variation of the WaveNet, then applying pooling and/or lower sampling rate (in the frequency domain) could actually work much better.
Would love to be proven wrong with the above. So far I have not been able to find any detailed discussion over the Internet regarding the viability of the "context stacks" idea as mentioned in the paper.

I think the pooling bit is optional. And it would only be performed on the longer-range wavenet.
Well, if you don't want to try context stacks, another alternative to just adding more dilation stacks, is to have each dilation stack grow to a larger size. Instead of:
1 2 4 ... 256 512 1 2 4 ...'
in a stack, you could do:
1 2 4 ...<PHONE_NUMBER> 2048 4096 1 2 4 ...
It's shallower than just piling up more dilation stacks that only go up to 512. Might require increasing the number of channels. No idea  how doing that compares with a context stack. There are plenty of hyper parameters to make comparison difficult. And then there's the fact we haven't written the code to do context stacks yet, at least in this project.

So far I have not been able to find any detailed discussion over the Internet regarding the viability of the "context stacks" idea as mentioned in the paper.

I expect the only ones who have tried it yet are DeepMind.

One way to increase your effective receptive field without increasing your model size is to decrease the sample rate.  For example 8 KHz is often used in telephone systems, since most vocalizations are bunched at the low end (see G.711).
Likewise, piano keys peak around 4 KHz, which means 8 KHz is a fair choice according to Nyquist's theorem.
Does anyone have insight into the paper's 16KHz choice?

@dunnevan  Good point. Indeed 8KHz should be sufficient for my purpose (i.e., using it as a basis for discovering naive musicality). I have down-sampled some piano music from 44.1K to 8K and it sounds reasonable (though kind of dry due to the lack of higher frequency harmonics, but it will do). Now we shall see how it turns out when cranked through WaveNet.
As to the paper's 16KHz choice, my guess is that 16KHz used to be treated as non-audiophile's hifi-ish sample rate (i.e., good enough for most people), so the paper just pick it up as good enough for its setup too. Most people can tell 8KHz audio as telephone-ish type of lower quality stuff.

For some reason, GitHub doesn't like me replying from email.... Most of my points are now irrelevant since I see we're all in the same page.
A new contribution: my bet is they chose 16 kHz because they had it already set up for speech. 16 kHz is the standard for wide-band voice applications (most current telephones and VoIP), but has never been widely used in music. Below the 44.1 kHz standard you can find 32 kHz, maybe 22.05 kHz, for low-quality and very compressed music, but I haven't seen it go as low as 16 for applications other than analysis.
Now, what I meant to send a few hours ago:
Well, 8 kHz is enough for speech and used to be common in telephony, but it doesn't sound very clear, especially in the "s" sounds. With 16 kHz you can get decent quality for speech. Using 8 kHz would still be a good idea to speed up the model and see how it performs.
For music it's too low. The highest key of a piano has a fundamental frequency of 4 kHz, but this "frequency" is completely unrelated to the frequency in Nyquist. The frequency in Nyquist includes partials, noise and transients, which go up to 10 kHz easily (the transients go higher). But again, if we are just testing whether the net can figure out "notes" and "pitches" it's a completely viable option.

I think it'd be extremely useful if the group found a way to 44.1k with a long receptive field possible, while magically keeping it viable for small memory GPUs (aka top of the line consumer gaming Titan XP etc). Even if it means obscene training times.
I've done a number of experiments training it on full mixes of music at 44.1k, but with the settings commonly used in the repo for 16k. That means my receptive field winds up being really small, and the output just sounds like large grain granular synthesis / timestretching. Which is not especially exciting (to me anyway).

Combining input from @jyegerlehner and @dunnevan  I am now testing with the following model:
{
"filter_width": 2,
"sample_rate": 8000,
"dilations": [1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536,
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536,
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536],
"residual_channels": 32,
"dilation_channels": 32,
"quantization_channels": 256,
"skip_channels": 512,
"use_biases": true,
"scalar_input": false,
"initial_filter_width": 32
}
This is with the aim of having a rather longish receptive field size (~8 seconds?), so that the generated samples from a trained model will exhibit some level of coherence  across a good stretch of time interval.
I am testing this on an 8 vCPU instance on Google Cloud, which at this time would appear that it will take many days to converge. Stay tuned.
@paperkettle @lemonzi   FYI, I am okay with 8KHz sample rate  because I am simply trying to have WaveNet learn the most basic musical elements, such as the simplest form of note progression, rhythm, and perhaps harmony.  In its current form I don't believe that WaveNet can do much more than that (if at all), but I have hope that a more advanced version of WaveNet could be the core component of a much more sophisticated music composition system one day.

@kaihuchen, if you are interested in taking into account a receptive field as long as tens os seconds so you can compose congruent music pieces, you will probably need to make use of some attentional interfaces http://distill.pub/2016/augmented-rnns/#attentional-interfaces.
You probably will need to use WaveNet with the higher receptive field possible, but modify also the model so you can take into account (focus) on very old segments of the current song. I don't thing WaveNet can be extended (just setting up its parameters) enough to be able to generate a full congruent song. You will probably need to modify the model greatly if you want to get something really better than the piano sound that DeepMind already show in here: https://deepmind.com/blog/wavenet-generative-model-raw-audio/.
Regards,
Samu.

@kaihuchen
With that dilation stack, you'll need to set --sample_size. It defaults to 100000, so you won't fill that whole field. You could either set sample_size to the receptive field size, or I think 0 to turn off chunking.

@Zeta36 I completely agree with your assessment. I have no illusion that WaveNet in its current form will be able to produce full congruent music. I look at WaveNet's generative capability merely as a way to create useful low-level 'audio features' (conceptually somewhat similar to how CNN uses unsupervised learning to generate useful low-level visual features), and the purpose of my tests here is only to find out how useful such audio features are going to be. There are a lot more work that need to be done in order to produce full congruent music, possibly including the attention interfaces stuff that you mentioned.

Well, 8 kHz is enough to decipher what someone is saying and used to be
common in telephony, but try it yourself and you'll see it doesn't sound
very clear. With 16 kHz you can get decent quality for speech. Using 8 kHz
would still be a good idea to speed up the model and see how it performs,
only don't expect very high quality at the output.
For music it's too low. The highest key of a piano has a fundamental
frequency of 4 kHz, but this "frequency" is completely unrelated to the
frequency in Nyquist. The frequency in Nyquist includes partials, noise and
transients, which IIRC in a piano go up to 10 kHz easily (the transients go
higher); 16 kHz is a compromise for speed and works well enough when there
is only piano present, 22 kHz would be enough for low fidelity. But again,
if we are just testing whether the net can figure out "notes" and "pitches"
it's a viable option.
El dl., 24 oct. 2016 a les 15:03, dunnevan<EMAIL_ADDRESS>va
escriure:

One way to increase your effective receptive field without increasing your
model size is to decrease the sample rate. For example 8 KHz is often used
in telephone systems, since most vocalizations are bunched at the low end
(see G.711).
Likewise, piano keys peak around 4 KHz, which means 8 KHz is a fair choice
according to Nyquist's theorem.
Does anyone have insight into the paper's 16KHz choice?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ibab/tensorflow-wavenet/issues/161#issuecomment-255834220,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADCF5vbvIUdtQs0pQz3i35H5FIN0Mgcbks5q3QEEgaJpZM4KeC3c
.

Just curious, what would happen if you increased the filter_width to 3? You may be able to pick up more features with less layers and therefore, less cost.

@kaihuchen Just curious but how did your experiment with those settings go?

@materialvision It seems that he used cpu only experiement. (8 vCPU instance)

@materialvision Even after days of computation it never did converge. I am gradually reducing the receptive field size, tweaking other parameters,  as well as reverting to use the VCTK dataset to see if I can do any better. Perhaps it's time for me to spend a little effort to get a GPU instance going.

I've tried with 4 titan x's with large field sizes  (10k), and I've found gating to be crucial for convergence.

@LeavesBreathe Have you implemented model parallelism on multiple gpu devices?

@nakosung Right now I have probably the worst model parallelism design. I'm taking separate layers and placing them on different gpus so I'll have one  1,2,4....10k block on one gpu and the next block on another. Timewise, this is the least efficient as only one gpu runs at a time. However, it does allow all memory usage, which I was interested in (using a big model).

@LeavesBreathe    Could you share some details regarding what kind of gating worked for you? Thanks!

by gating I simply mean the sigmoidal dilated causal conv that is multiplied by the tanh activated dilation. Was anyone else able to do model parallelism on gpus?

I tried to extend the receptive field with dialtion 1, 2, ..., 8192 and has 5 stacks. But the loss is always around 3.5, on my set of 480 pieces of absolute music, even when I trained 130K steps. @kaihuchen Maybe similar results to yours


Fix typo of "File file" for encoding configuration

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@jhult thanks for the PR.


Write path tuning

Required for all non-trivial PRs

[ ] Rebased/mergable
[ ] Tests pass
[ ] CHANGELOG.md updated

This PR has a few small optimizations for code in the write path.  It mostly avoids some allocations and reduces the time locks are held when not necessary.  Locally, I see about ~5% improvement in write throughput with influx_stress and fewer allocations in the profiles.

Not sure how easy it would be, but on PR's like this it would be nice to also see any graphs/outputs used to identify what changes were made.  Mostly I'm interested in this to continue learning how to spot more performance tuning opportunities.
:+1:


Fix example code relating to v0.0.7

👋
I've been trying to get the example code working with 0.0.7 as I'm currently stuck on a lower version of React Native and have been going around in circles as to why it wasn't working.
After resorting to checking the source code, scrollToFocusedInput takes the node as the 2nd argument, not the first as per the README.md. I know it's only minor, but it may save someone else a little time in the future if they also can't be on the later versions of RN.
Code for reference from 0.0.7.
scrollToFocusedInput: function (event: Object, reactNode: Object, extraHeight: number = _KAM_DEFAULT_TAB_BAR_HEIGHT)

Hello @nouveller !
The event is no longer necessary, it was an unused parameter I introduced by mistake in older versions. I prefer to maintain the docs updated to the latest version, so if you feel it's necessary, please add a note for older versions (https://github.com/APSL/react-native-keyboard-aware-scroll-view/blob/master/lib/KeyboardAwareMixin.js#L93). The parameter was removed in 0.10.0.

Hmm... Unless I'm mistaken, I believe my edit is specially referring to the old versions and not conflicting with the latest examples. As the edit is for the code examples under this line:

For versions v0.0.7 and older you can do the following.

I could be misunderstanding though. 😊

Ok, I see.
Let's wait for RN 0.32, which includes a PR that solves all the issues with automatic scroll and please change the docs to specifically handle both +0.1.0 and 0.0.7 in order to be less confusing. You could want to manually handle the scroll in upper versions too, and that would introduce some confusion.

You could want to manually handle the scroll in upper versions too, and that would introduce some confusion.

Good point. I'll see if I can come up with a clear way to communicate both versions.
👍


Too much JS downloaded with simple starter app

Hello team, so happy to find Waku and start experimenting with it!!
When I build and start up the simple starter example, I am surprised to see almost 0.5 MB of JS downloaded to the client. One of the compelling features of RSC for devs is smaller app client bundle size.
I wanted to ask about and index.js file of 170kb (first line) being downloaded on page start/refresh.
But even more surprising is the last line, 234kb of testing-library.js being shipped to the browser.

I ran yarn build > yarn start > open localhost:8080
I am still working on my machine only, I guess its different when deployed on a server...?
I might certainly be off track completely, but could you please explain the above points?

Hi, thanks for trying it out! Feedback is very appriciated.
What's contentScript.js? It doesn't seem related to Waku.
I guess 170kb is mostly due to react libraries. Even with RSC, we still load the full react library. (We really wish react library becomes code splittable...)

Apologies, that second weird thing comes from a browser extension.
A Next.js template app costs only about 70kB on the client. I will be eager to see if Waku can be compressed a bit more.

is it because of compression on transfer? or do you compare the content size?
On our discord server, someone compared the minimal apps similarly.


Add "Who is using Hapi" section to readme?

Should we add a section stating who is using hapi to the readme?
http://hapijs.com/community

Done.


make develop fails when using release zip/tar.gz

[genadi@localhost www]$ tar -zxf 0.3.0.tar.gz
[genadi@localhost www]$ virtualenv lemur-0.3.0
New python executable in /home/genadi/Documents/www/lemur-0.3.0/bin/python
Installing setuptools, pip, wheel...done.
[genadi@localhost www]$ source lemur-0.3.0/bin/activate
(lemur-0.3.0) [genadi@localhost www]$ cd lemur-0.3.0/
(lemur-0.3.0) [genadi@localhost lemur-0.3.0]$ make develop
--> Installing git hooks
git config branch.autosetuprebase always
fatal: not in a git directory
Makefile:28: recipe for target 'setup-git' failed
make: *** [setup-git] Error 128

It fails because develop make target depends on setup-git target , while .git directory does not exists inside tar.gz release.
develop: update-submodules setup-git
        @echo "--> Installing dependencies"

setup-git:
        @echo "--> Installing git hooks"
        git config branch.autosetuprebase always
        cd .git/hooks && ln -sf ../../hooks/* ./
        @echo ""

Putting setup-git under comment solves the problem.
develop: update-submodules #setup-git

Or release make target should be added?

Thanks for pointing this out, I think adding a release make target is the best fix for this.


support for local files as input videos

fixes #25
BEFORE: the video cli argument must be a youtube url
AFTER: the video cli argument must be a youtube url or local file

Is this meaningfully different from #28 ?

Yes, there is different this and #28 . With this, you dont get the  this error ModuleNotFoundError: No module named 'utils'

A friend would like to use this. Can we merge it or should I tell him to work from my fork?


Automated Package Upgrade

:tada: This PR is included in version 7.7.389 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Extract & improve Serbian translation

Hello @Infiland Great Job! I'm really happy to see that you decided to put your game as an open-source game. Honestly, I didn't play this game, but I came across your announcement about open-sourcing.
I've officially translated 15 Steam games earlier (including Octodad: Dadliest Catch) with my friend and I immediately checked whether this game supports multiple languages. I was quite surprised that some version of Serbian translation is already here.
Since the existing translation is a mix of Serbian, Croatian and Bosnian language, I wanted to extract and slightly improve Serbian translation as a standalone language.
I hope that you (and initial translator(s)) can find my solution as a reasonable.
As I mentioned earlier, I didn't play the game because I don't have it on the Steam, so some phrases/sentences can be out of order or imperfect. It would be great if there is a way to test translations without buying the game.
Also, I'm not sure if I changed all the files that includes language information, so please let me know if I need to change/revert something.

Hello! Thanks for contributing. I am serbian myself too, tako da zdravo! :D
But yeah, the translations are odd because funny enough, I didn't add the serbian translations myself which is why it was mixed, it was a bunch of other people who did the translations
To clarify translations in the game are translated here to keep track of what's been translated and what isn't: https://docs.google.com/spreadsheets/d/1sO2gPX9AtXJVg1b7byPOB_xi-h8dwmZt5X0aZ08_LOo/edit#gid=0
Then they are manually added in the game, just like you added them yourself!
One thing that needed to be done is add the button which changes to the serbian language in settings, because it currently looks like this

But I have tested the new serbian translation and it works flawlessly, I'll do the UI bit myself so that players can choose the language (the codebase is in a bit of a mess at the moment!). I'll merge this pull request since it looks good. If you want to further help with contributing, join this discord https://discord.gg/bNTWYUypVP . Thanks!

Oh I wasn't aware that you're Serbian as well. I'm really glad to hear that, brate! 😍
I just saw place where you put language strings in the main menu. I guess you can cover all that stuff in the guide, so that future translations will be faster and less error prone. I also saw that you're working on new features so translations are going to be extended as well.
I will join the Discord channel gladly, and hopefully I will add more contributions in the future.
Thanks for the chance to improve the game. Živ bio! 💪


Trouble typing object whose values are of a particular type while maintaining the names of its keys

I'm trying to create an object and I want type checking to work in two different scenarios but I can't get both scenarios to pass the type checker at the same time.
I have an object that I'm essentially treating as a set of key-value pairs. Each of these values is of the same type. Here are the two scenarios I want to achieve with this object:

When accessing properties on the object, I want the type checker to be aware of the particular keys on the object that have been defined.
I want to be able to pass the object to a function which accepts any object whose value are all of a particular type (it doesn't care about the names of the keys).

Here's a complete example:
class Person {
	constructor(public age: number) {
	}
}

// If you use the commented out version of people, Goal 2 is achieved
// but Goal 1 breaks.
//var people: { [name: string]: Person } = {
var people = {
	john: new Person(10),
	pete: new Person(20),
	tim: new Person(30),
	sam: new Person(40),
};

// Goal 1: I want to get intellisense on people
var somePerson = people.john;

// Goal 2: I want to have a function which accepts an object whose values are all
// of type Person.
function inspectPeople(people: { [name: string]: Person }) {
}
inspectPeople(people);

Here's a link to this example in the TypeScript Playground.

And you do not want to specify the "known" properties on the type?
var people: { [name: string]: Person; john: Person, pete:Person, tim:Person, sam:Person} = {
	john: new Person(10),
	pete: new Person(20),
	tim: new Person(30),
	sam: new Person(40),
};

Thanks for the suggestion! I was not aware of this solution and it does fix the type errors.
However, I wish there was a less verbose/repetitive solution where something closer to my original definition of people would work:
var people = {
    john: new Person(10),
    pete: new Person(20),
    tim: new Person(30),
    sam: new Person(40),
};

Here are some more concise solutions I had in mind that don't seem to currently exist in TypeScript:

Allow the { [name: string]: Person } signature of inspectPeople to accept an object like people.
Instead of changing the meaning of  { [name: string]: Person }, introduce an alternative notation for expressing a type that would match any object whose properties are all of type Person (e.g. like people).
Allow developers to specify that, in addition to the key-value pairs defined, people supports an indexer so it can be passed to a function like inpsectPeople.

If there's no more concise way to express this scenario in the current version of TypeScript, are there thoughts on how it might be expressed in future versions or is the current solution considered to be good enough?

You could do the following:
function makePeople<T extends { [name: string]: Person }>(people: T): T {
    return people;
}

var people = makePeople({
    john: new Person(10),
    pete: new Person(20),
    tim: new Person(30),
    sam: new Person(40)
});

This will give people an inferred type that includes both the indexer and the explicitly specified members:
var people: {
    [name: string]: Person;
    john: Person;
    pete:Person;
    tim:Person;
    sam:Person;
};

Plus it will verify that the argument passed to makePeople is indeed an object that contains only properties of type People.

I like that solution. Thanks!

What if we wanted to have additional properties that are not of type Person? How do we do that?
interface IPeople {
    [name: string]: Person;
    count: number;
}

This gives an error of

Property 'count' of type 'number' is not assignable to string index type 'Person'.

@litera that is correct. Observe:
let x: string = "cou" + "nt";
let a: IPeople = ...;
let p = a[x]; // typeof p === 'number', but we would think it was 'Person'

@RyanCavanaugh That can be yes, but what if you'd want to add many properties of various types? That would just make it a mess, don't you think?

That would just make it a mess, don't you think?

But how to propose to properly represent the index access then?  Messy or not.

Agreed.  On the other hand, some people don't choose that as self inflected pain.  I ran across a situation the other day that I tried to model in TypeScript, a POJO DSL (Mongo DB) where objects combined arbitrary field names with "special" properties that had a different valid type.  It is still an unsafe mess because of this in TypeScript, but it is still better than just praying to the gods of the sever to properly parse the POJO.


Added support for on change event.

Coverage remained the same at 55.824% when pulling f045966ccfcfa108313125f2f0af1d6325b34762 on GerardoHP:master into ba2c3dda65035b4bf40403509ecc7cb94fe6739e on unosquare:master.


CB-20925 Add default constructor for UpgradeImageInfo so it's can b…

…e initialized on flow retry
See detailed description in the commit message.

retest this please


Grad-CAM extended for ConvNet-RNN structures (optionally)

Can you explain the use-case for this? I can't glean much info from the commit.

For example ConNet-RNN looks like this:
model_target.add(TimeDistributed(Conv2D(32, (8, 8), strides=(4, 4), kernel_initializer=glorot_uniform(seed=init_seed), padding='same', activation='relu',
                                        input_shape=(high_dimensions_width, high_dimensions_height, high_dimensions_channels)), input_shape=(params['frames_back'], high_dimensions_width, high_dimensions_height, high_dimensions_channels)))
model_target.add(TimeDistributed(Conv2D(64, (4, 4), strides=(2, 2), kernel_initializer=glorot_uniform(seed=init_seed), activation='relu')))
model_target.add(TimeDistributed(Conv2D(64, (3, 3), kernel_initializer=glorot_uniform(seed=init_seed), padding='same', activation='relu')))
model_target.add(TimeDistributed(Reshape((-1,))))
model_target.add(LSTM(512, kernel_initializer=glorot_uniform(seed=init_seed), recurrent_initializer=orthogonal(seed=init_seed), input_shape=(params['frames_back'], low_dimensions_state), return_sequences=True, dropout=params['dropout'], recurrent_dropout=params['dropout']))
model_target.add(LSTM(512))
model_target.add(Dense(dimensions_actions,kernel_initializer=glorot_uniform(seed=init_seed), name='DenseLinear

This how it can be used:
seed_img = Image.fromarray(env.getScreenRGB())
seed_img = seed_img.convert('L').convert('RGB')
seed_img_arr = np.asarray(seed_img).astype('uint8')

action_idx = np.argmax(raw_q_values)

# x_input.shape = (1, 5, 48, 48, 3) (batch_size, time_steps, pixels_width, pixels_height, pixel_channels)

heatmap = visualize_cam(model_target, layer_idx, [action_idx], seed_img_arr, alpha=0.3, input_data_rnn=x_input)
heatmap_img = Image.fromarray(np.transpose(np.array(heatmap), axes=[1, 0, 2]))
timestamp = time.time()
seed_img = Image.fromarray(np.transpose(np.array(env.getScreenRGB()), axes=[1, 0, 2]))

composite_img = Image.new("RGB", (seed_img.size[0] * 2, seed_img.size[1]))
composite_img.paste(heatmap_img, (0, 0))
composite_img.paste(seed_img, (seed_img.size[0], 0))

This is how output looks like in 3D maze where agent focuses on red doors

Nice. Looks like the model is trained using reinforcement learning. It would be really cool to have an example for this in examples/ if your code is not confidential or proprietary.
So whats the difference between model.input and input_data_rnn? From the code, it appears that you are using it to do this.
model_input = input_data_rnn[-1]
heatmap = heatmap[-1]

I dont quite understand what that does. Also, there was an API change. You should rebase. The code no longer tries to overlay heatmap since folks can use this to find heatmap on non-images or video frames as well.
With the new code, the heatmap will have the same shape as x_input and the overlaying part can be done outside.


Encrypt and decrypt the email and user in the cookie

Description
This change does one thing:

if a cypher is provided, it encrypts also the email and user with the same logic and algorithm as the rest of the fields from the session state.

Motivation and Context
This is the PR for the issue #60 .
Don't expose any information part of the cookie, information that can be easily retrieved if not encrypted.

How Has This Been Tested?

All the test from session_state_test are passing.
Testing in our environments.
Checklist:

[x] My change requires a change to the documentation or CHANGELOG.
[x] I have updated the documentation/CHANGELOG accordingly.
[x] I have created a feature (non-master) branch for my PR.

You may want to hold on this as there will be massive conflicts with https://github.com/pusher/oauth2_proxy/pull/63

#63 Has now been merged, @costelmoraru do you think you could modify the PR to work with the new changes that are in master?

Hi @JoelSpeed , I had a very busy week, but sometime this week I'm make time to adapt the changes and modify the PR.


Enhancement: ‘q’ or ‘Esc’ to quit

Please, can we have q (and possibly Esc) to quit? Right now I press 0 and phetch will exit qith a stack trac, as mentioned in #1, but q and Esc will feel more intuitive.
PS: I really like the navigation in phetch, it feels like a huge improvement compared to gild.

Oh, the first time I ran phetch I have it a gopher URL, so I didn't notice that there is a help page.

Please, can we have q (and possibly Esc) to quit?

Yes, great suggestion. You can now quit with Esc. If you've entered text in a search field or there's a message of some sort pending it'll first act as a "cancel " and clear the message/text. But if there's nothing pending, it'll quit. ctrl-c will work the same way, andctrl-q will quit the app immediately.

PS: I really like the navigation in phetch, it feels like a huge improvement compared to gild.

Great, thank you! Your ideas contributed a lot.

Oh, the first time I ran phetch I have it a gopher URL, so I didn't notice that there is a help page.

Ah yes, I think I would probably launch any new gopher app with a URL as well. Maybe I can flash a status message advertising ctrl-h on first launch or something.

ctrl-h

Or you can add it as an epilog to the standard help text:
$ phetch --help
Usage
    phetch                           # Launch and show start page.
    phetch <gopher-url>              # Open Gopherhole at URL.
    phetch -r, --raw <gopher-url>    # Print raw Gopher response.
    phetch -h, --help                # Show this screen.
    phetch -v, --version             # Show phetch version.

Press ‘ctrl-h’ at any time during a session to go to the
builtin help page.
$

Oh, and btw: I really like that the builtin help pages are gopher pages. I had to check that I weren't at an external site. Looks very slick. :+1:

Or you can add it as an epilog to the standard help text:

Great, added! I'm pushing a new release soon.

I really like that the builtin help pages are gopher pages.

Thanks! I thought it was a good fit, plus it kind of doubles as a "" to play around with the app without hitting someone's innocent server.

Well done!


Speed up User PUT and PATCH Methods by modifying User properties [OSF-5338]

https://openscience.atlassian.net/browse/OSF-5338
Purpose
PUT and PATCH methods are very slow on the OSF API at the moment. @brianjgeiger noticed that was because the contributor_to method was a list comprehension relying on a previous property and not a faster ModularODM Query. This PR changes the contributor_to property to return a ModularODM query with the appropriate nodes.
Changes

Move the  contributed property to be closer to the others
Update the contributor_to property to return a ModularODM queryset instead of relying on the contributed property

Side Effects

The places that use those properties right now don't seem to be affected by this change, but these properties are now returning query sets instead of acting as generators so I might have missed something....

We'll need visible_contributor_to() as well.
Also, I presume these are covered by tests, yes? Could you verify that and comment or make new tests if, by chance, these are untested? They don't necessarily need to be directly tested, but at least a view test that calls these methods eventually.

Oh, and this is for 0.67.0, so please target the release branch instead of develop. Sorry for not mentioning earlier.

Closing this PR to open on a new branch against the release!


Deploy FHIR server on an existing SQL managed instance

Question
Is there any reference to deploying the FHIR server on an existing SQL managed instance with an endpoint?

Hi @msmtctaiwan
We do not have any documentation on this because it is easy to mess up a FHIR server by changing or removing certain resources in the database, but if you want to connect the OSS FHIR server to your own SQL instance it is doable.
After deploying an instance using one of our quickstart methods with the SQL options you can go into the key vault that was made for the FHIR server. Inside it is a secret called SqlServer--ConnectionString. Update this secret with the connection string for the SQL server you wish to connect to and the FHIR server will use it instead of the one it was provisioned with.
You will need to restart the webapp for this change to take effect, and I would recommend the webapp be stopped while making this change.
When the webapp is restarted it will start making changes to the SQL database to enable FHIR to work. This will include making tables, data, and stored procedures. So long as there isn't a name collision this shouldn't affect your existing data. After this startup is complete your FHIR server should be ready to use, and you can delete the SQL server that was provisioned with the FHIR server.
@rbans96

Hi @LTA-Thinking
Thanks for your kind support and fast response. I still have a few questions.
Is it possible to deploy FHIR on Azure stack HCI and migrate with Arc enabled SQL Managed instance? To the best of my knowledge, Arc-enabled SQL managed instance does not provide a connection thus it is infeasible to change the connection string in the key vault we just deployed using quickstart.
I would be grateful if you could provide some thoughts/comments on deploying the FHIR server on Azure Stack HCI.
Thanks!

Hi @msmtctaiwan
I'm afraid this is outside the scope of the our open source solution. Integration with HCI may require a new database connection type, or a more complicated service setup. Either of these is outside the limited support we offer for the open source solution. My best recommendation would be to reach out to someone more familiar with Azure Stack HCI and Arc enabled SQL to see if a workaround could be setup to get a connection string.

Hi Robert-
I will reach out to the HCI team for more information. Thanks!


Benchmarking eureka service discovery performance

Can someone point me to the documentation/blog where eureka performance is measured? In specific, I want to know the answer for the following questions

What is the response time from server when eureka client makes a read/write request?
How many service instances can be supported by Eureka?
How many concurrent requests can be supported from eureka client to server?
How much memory/CPU is consumed by Eureka host?
What are the network bandwidth constraints/limits of Eureka?

I believe above are the important questions to be answered and included in the documentation for comparing performance against other service discovery solutions out there.

Hi @sahith since this question refers rather to the actual Eureka server and client implementations than the Spring Cloud integration for Eureka, it should probably be asked in https://github.com/Netflix/eureka.

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.


[EAGLE-872]  Transform counter metric to rate metric

Add transform bolt using counterToRateFunction in HadoopMetricMonitorApp's storm topology.

https://issues.apache.org/jira/browse/EAGLE-872

@r7raul1984 would you convert all counter metric to rate?

@haoch  If metric name endswith "count" , it will be converted to rate.

@r7raul1984 how do you think expose CountMetricFilter  as a parameter to choose which metric to convert as count, and the current hard-code behavior should only be some kind of default implementation?
@FunctionInterface
interface  CountMetricFilter extends Function<Map, Boolean>

DefaultCountMetricFilter = (metric) -> metric["metric"].endsWith("*.count")

LGTM

@haoch  Thanks. I will merge.


max_content_length can't be set

Hello,
I am building a flask app with a backend spyne webservice and getting "Request too long" error. I checked the code and it seems one cannot set it on the Spyne initialization nor does it propagate max_content_length from it's parent wsgi app (here, the flask app itself), as can be seen on SpyneController.register_service method ! This is annoying as the default limit is set to 2MB.
Is there any elegant way of setting this limit other than monkey-patching the initialization (example: wsgi_app = WsgiApplication(spyne_app, max_content_length=10 * 1024 * 1024) ) ?
Thank you !

Try this:
...
spyne = Spyne(app)
spyne.controller.services['/soap/someservice'].max_content_length = 10 * 1024 * 1024
...


project devx added

Hackathon Submission: DevX
Name of Team Lead
Ankit Kumar
GitHub handles of Team Members
@ankit-0369
Are all of your team members registered on our Hackathon Signup page?
This is a mandatory step for all participants to be considered eligible for judging

[x] Yes
[ ] No

Rules and Code of Conduct
By submitting this PR, you agree to follow our Rules and Code of Conduct.

[x] Yes

Anything Else?
Any other feedback, queries or information you would like to share with us?

Hii, I have added my project details as instructed, here open for review and merging.


Jakarta constraint @PositiveOrZero overwrites @Digits resulting in invalid objects

Describe the bug
After generating a bean with the @Given annotation with bean validation enabled, some constraints will be ignored depending on the order in which the annotations are written.
This one respects the constraints:
@PositiveOrZero
@Digits(integer = 2, fraction = 5)
private BigDecimal goodExample;

This one will not:
@Digits(integer = 2, fraction = 5)
@PositiveOrZero
private BigDecimal badExample;

Expected result
Generate two BigDecimals with two integer digits and five fraction digits
Actual result
The Integer digits of the second Example will exceed the limit of two. Fraction digits are generated correctly.
Additional information
The order of annotations should be irrelevant for validation
Link to a minimal sample project reproducing the issue or runnable sample code
sample project
Run the InstancioValidationBugTest to see the issue

Java version: 21
Instancio version: Instancio-junit-5.0.1

@philipp-mueller-exxeta thanks for raising this issue and the sample project! I agree that ideally it should behave consistently, regardless of the order in which these annotations are declared. I'll look into it once I have some time.

Hi @philipp-mueller-exxeta, sorry about the delay. After looking into it, I don' t see a simple solution to this issue. The problem is that there are a lot of possible combinations of annotations such as Digits, Min, Max, Positive, Negative, etc. It's tricky to handle all possible combinations of these annotations to generate valid values. This will require some extensive (potentially breaking) changes.
I'll keep this issue open in case somebody wants to take this on and submit a PR.

@philipp-mueller-exxeta I just released version 5.2.1 containing a fix for this bug. Please let me know if you run into any other issues.