WriteAsJsonAsync throws exception when using NewtonsoftJson serializer

Description
In Azure Functions isolated model an exception is thrown when overriding the serializer from ConfigureFunctionsWebApplication() and response.WriteAsJsonAsync() is used: System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.
I followed the Microsoft guide for migrating an in-process Azure function to the isolated model which clearly states that I need to override the Json serializer in ConfigureFunctionsWebApplication and use services.AddMvc().AddNewtonsoftJson().
While searching for a fix to my issue I found issue1  and issue2
Steps to reproduce

Create an Azure Function

 [Function("MyIsolatedFunction")]
        public async Task<HttpResponseData> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequestData request)
        {
            var response = request.CreateResponse(HttpStatusCode.OK);
            await response.WriteAsJsonAsync(new { Name="Error"});
            return response;
 }

Override Json serializer in Program.cs

public static class Program
{
    public static void Main(string[] args)
    {
        var host = new HostBuilder()
                .ConfigureFunctionsWebApplication((IFunctionsWorkerApplicationBuilder builder) =>
                {
                    builder.Services.Configure<WorkerOptions>(workerOptions =>
                    {
                        //<PackageReference Include="Microsoft.Azure.Core.NewtonsoftJson" Version="1.0.0" />
                        var settings = NewtonsoftJsonObjectSerializer.CreateJsonSerializerSettings();
                        settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
                        settings.NullValueHandling = NullValueHandling.Ignore;

                        workerOptions.Serializer = new NewtonsoftJsonObjectSerializer(settings);
                    });
                })
                .ConfigureServices(services =>
                {
                    services.AddApplicationInsightsTelemetryWorkerService();
                    services.ConfigureFunctionsApplicationInsights();
                    services.ConfigureSerializer();
                })
                .Build();

        host.Run();
    }
    public static IServiceCollection ConfigureSerializer(this IServiceCollection services)
    {
        services.AddMvc().AddNewtonsoftJson();
        return services;
    }
}

Exception is thrown: System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.

If I remove this line the exception disappears but the serialization is wrong because I'm using NewtonsoftJson attributes.
workerOptions.Serializer = new NewtonsoftJsonObjectSerializer(settings); also this breaks the swagger definition.
Another workaround is to serialize the object myself and use the WriteAsync method instead of WriteAsJsonAsync

I'm having thesame exception when using:
        public async Task<HttpResponseData> HttpStart(
        [HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequest req,
        HttpRequestData reqData,
        [DurableClient] DurableTaskClient client)
        {
            var request = await reqData.ReadFromJsonAsync<MyModel>();

A bug for sure.

Hi, I wasn't able to repro the issue you reported. Could you try again with all the latest packages?
Here is what I tried which ended up working without issues (v1 of the worker):
csproj (functions version v4 | .net8)
  <ItemGroup>
    <PackageReference Include="Microsoft.Azure.Core.NewtonsoftJson" Version="2.0.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="1.23.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="1.18.1" />
  </ItemGroup>

Program.cs
    public static void Main(string[] args)
    {
        var host = new HostBuilder()
                .ConfigureFunctionsWorkerDefaults((IFunctionsWorkerApplicationBuilder builder) =>
                {
                    builder.Services.Configure<WorkerOptions>(workerOptions =>
                    {
                        var settings = NewtonsoftJsonObjectSerializer.CreateJsonSerializerSettings();
                        settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
                        settings.NullValueHandling = NullValueHandling.Ignore;

                        workerOptions.Serializer = new NewtonsoftJsonObjectSerializer(settings);
                    });
                })
                .Build();

        host.Run();
    }

MyHttpFunction.cs
        [Function("MyIsolatedFunction")]
        public async Task<HttpResponseData> Run([HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequestData request)
        {
            var response = request.CreateResponse(HttpStatusCode.OK);
            await response.WriteAsJsonAsync(new { Name="Error"});
            return response;
        }

Core Tools
Azure Functions Core Tools
Core Tools Version:       4.0.6610 Commit hash: N/A +0d55b5d7efe83d85d2b5c6e0b0a9c1b213e96256 (64-bit)
Function Runtime Version: 4.1036.1.23224

[2024-11-14T22:17:04.539Z] Found /Users/likasem/source/repros/dni-newtonsoft-exception-repro/dni-newtonsoft-exception-repro.csproj. Using for user secrets file configuration.
[2024-11-14T22:17:08.219Z] Worker process started and initialized.

Functions:

        MyIsolatedFunction: [GET,POST] http://localhost:7071/api/MyIsolatedFunction

For detailed output, run func with --verbose flag.
[2024-11-14T22:17:11.409Z] Executing 'Functions.MyIsolatedFunction' (Reason='This function was programmatically called via the host APIs.', Id=7cf54d0c-a0a9-4599-a546-7cde2d241c0c)
[2024-11-14T22:17:11.934Z] Executed 'Functions.MyIsolatedFunction' (Succeeded, Id=7cf54d0c-a0a9-4599-a546-7cde2d241c0c, Duration=551ms)
[2024-11-14T22:17:13.356Z] Host lock lease acquired by instance ID '000000000000000000000000303B82C0'.

New Model
It's also worth noting we have a new model we suggest folks update to:
csproj (functions version v4 | .net8)
  <ItemGroup>
    <FrameworkReference Include="Microsoft.AspNetCore.App" />
    <PackageReference Include="Microsoft.Azure.Core.NewtonsoftJson" Version="2.0.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker" Version="2.0.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.0" />
    <PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" Version="2.0.0" />
  </ItemGroup>

Program.cs
using Azure.Core.Serialization;
using Microsoft.Azure.Functions.Worker;
using Microsoft.Azure.Functions.Worker.Builder;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;

var builder = FunctionsApplication.CreateBuilder(args);

builder.ConfigureFunctionsWebApplication();

builder.Services.Configure<WorkerOptions>(workerOptions =>
{
    var settings = NewtonsoftJsonObjectSerializer.CreateJsonSerializerSettings();
    settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
    settings.NullValueHandling = NullValueHandling.Ignore;

    workerOptions.Serializer = new NewtonsoftJsonObjectSerializer(settings);
});

builder.Build().Run();

MyHttpFunction.cs
        [Function("MyHttpFunction")]
        public IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
        {
            _logger.LogInformation("C# HTTP trigger function processed a request.");
            return new OkObjectResult(new { Name="Error"});
        }

@liliankasem thank you for the response, unfortunately it doesn't work for me.
First version, doesn't even compile because there is a missing package: HostBuilder doesn't contain a definition for ConfigureFunctionsWorkerDefaults.
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="2.0.0" />
If I use the packages from the New Model then I get the exception: System.InvalidOperationException: Synchronous operations are disallowed. Call WriteAsync or set AllowSynchronousIO to true instead.
Can you attach the full project?
The New Model version doesn't use the Newtonsoft.Json serializer.
If I override the property name from the response it's ignored: name instead of responseType
      public class ResponseDto
      {
          [JsonProperty("responseType")]
          public string Name { get; set; }
      }
        [Function("MyHttpFunction")]
        public IActionResult Run([HttpTrigger(AuthorizationLevel.Function, "get", "post")] HttpRequest req)
        {
            _logger.LogInformation("C# HTTP trigger function processed a request.");
            return new OkObjectResult(new ResponseDto { Name = "Error" });
        }

What should I change?

Can you compare your project with this sample and see what is different?
https://github.com/liliankasem/dni-function-newtonsoft-sample/tree/main

@liliankasem your sample project proves that my previous statement was right.
I've made a few changes to your project: https://github.com/CSharpBender/dni-function-newtonsoft-sample

Added a function that uses HttpRequestData and WriteAsJsonAsync (throws exception)
Fixed Newtonsoft.Json serializer by adding services.AddMvc().AddNewtonsoftJson(); in Program.cs

When using AspNetCore integration, the default is to disallow synchronous IO. This default comes from AspNetCore, not functions. It also so happens the NewtonsoftJsonObjectSerializer is completely synchronous, meaning these are not compatible by default.
To enable synchronous IO, please add the following to your startup. This will enable Newtonsoft.Json usage:
services.Configure<KestrelServerOptions>(options => options.AllowSynchronousIO = true);

@jviau I'm not satisfied with your response because this is not mentioned in the Microsoft Guide
I appreciate your suggestion, but this approach is widely discussed online, and I was already aware of it. However, it didn't feel right to me, perhaps because I had too much faith in Microsoft to document such a significant issue properly.

@CSharpBender thank you pointing out the gap in the docs, we will add this information ASAP.

Wait, how is this considered closed? the method is literally called WriteAsJsonAsync, and is essentially exactly what the error message is saying to do to resolve itself, but the solution to making WriteAsJsonAsync work without errors is to AllowSynchronousIO?  That may be considered a workaround, but is certainly not a resolution.

@ewillman we do not own the NewtonsoftJsonObjectSerializer - if you have an issue with it writing synchronously, please open an issue with team/repo that owns it: https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Microsoft.Azure.Core.NewtonsoftJson/src/NewtonsoftJsonObjectSerializer.cs

The synchronous issue also only applies to HttpRequestData and HttpResponseData. If using AspNetCore and sticking to aspnetcore bindings (using IActionResult and [FromBody] attributes, etc), then you can get Newtonsoft in an asynchronous compatible fashion via:
// need <PackageReference Include="Microsoft.Azure.Core.NewtonsoftJson" Version="2.0.0" /> for this
services.AddMvc().AddNewtonsoftJson();


[VS Code] [Audio] HTTPS request failed for SkypeToken: Parse Error: JS Exception

Error:
HTTPS request failed for SkypeToken: Parse Error: JS Exception
Steps to Reproduce:
1.
2.

Version Data

extensionName
VSLS-Audio

extensionVersion
0.1.84

applicationName
VSCode

applicationVersion
1.44.2

platformName
MacOS

platformVersion
19.4.0

@CelsoSantos : thanks for reporting this issue! We have a fix that will be released shortly. I'm resolving this issue as a duplicate of #3432 to consolidate the communication.


 of documentation link it is not closed

http://<IP_ADDRESS>:8000/config/instance-add

fixed at c6c07d1


Implement Product CLI

This PR implements the CLI for Grid Product.
Actions included are:

Create
Update
Delete
List
Show

This PR is awaiting unit tests. Also going to create a Dockerfile to add to the docker-compose.

One initial piece of feedback I would like on this is my extraction of common Yaml parsing methods to a dedicated file, yaml_parsers.rs.
A lot of these methods from actions/schema.rs, such as 'parse_value_as_string', 'parse_value_as_boolean', etc. were needed for Product CLI, and I anticipate other future CLIs. Some of the parsing logic is unique to the CLI, (e.g. 'parse_value_as_property_values' for Product), but I thought that it would be useful to have the generic type parsers in a shared file.

I also see the following errors when I try to test it manually (note i had to rebase on master to pick up some fixes that have gone in since this PR was created, can you rebase it?)
product show<PHONE_NUMBER>88  and product list returns the following error
invalid type: map, expected a tuple of size 2 at line 1 column 250


[build] Update to latest revisions of upstream layers

Merged to other branch as well:
407bc66e8..37445f606  build -> build-next


Idea: extract component generator to separated package

I like your idea about dom-express so much. This is an excellent idea!!!
But i like the way svelte detect dirty more than dom-expression dependencies tracking.
If you don't mind, can i refactor your source code to extract component generate logic to separated package (or helpers inside this repo).
`babel-plugin-jsx-dom-expressions' can accept component generator as options.
So I can create other component generator for my purpose.
Thanks for reading.

I'm gathering you are talking about the compilation rather than a way of providing a different runtime function. A runtime method would be easy. The challenge, of course, is dealing with a divergence of features supported, as admittedly I've been only accounting for dependency tracking reactive approaches like S, Knockout, MobX, Solid etc... I've been improving my understanding of generalizing even those library approaches. But the resulting dom-expressions wrapper isn't exactly vanilla MobX etc... It's shaped to fit details like hierarchal disposal patterns and context. My next set of large changes I'm planning for this repo is revamping how hydration works (and possibly modifying SSR).  Which I can see adding other bits of these custom layers.
In theory, I'm not opposed. I'd be interested in how you would picture this working. I only understand Svelte's approach high-level but if only the component code that needed adjustment I'd be surprised. I guess the wrap function is generalizable.  But my understanding is that Svelte takes a more Component-based holistic way of laying out the update function that extends beyond just the view code this library handles including the $ expressions as well. Anyway if you can share a few more details I think that'd help.

Sorry for my bad english.
What i wan't to do is compile to something like this
// code.js
export function Counter() {
  let count = 1;

  function inc() {
    count += 1;
  }

  return (

Counter: {count}

      <button onClick={inc}>inc</button>

  );
}

// output.js
import { createComponent, ComponentOptions } from './internal/createComponent';
import { createTemplate } from './internal/createTemplate';

function createOptions(): ComponentOptions {
  const createElement = createTemplate(
    '

Counter:
<button>inc</button>
',
  );

  let el, /* text_1 */el_1, /* button_1 */ el_2;

  function create() {
    el = createElement();
    el_1 = document.createTextNode('');
    el.firstChild.appendChild(el_1);
    el_2 = el.firstChild.nextSibling;
    return el;
  }

  function mount(ctx) {
    el_2.addEventListener('click', /* el_2: onClick */ ctx[2]);
  }

  function render(dirty, ctx) {
    if (dirty & /* count */ 1) {
      el_1.data = ctx[1];
    }
  }

  function instance(setState) {
    let count = 1;

    function handleClick() {
      setState(/* count */ 1, (count += 1));
    }

    return [count, handleClick];
  }

  return {
    create,
    mount,
    render,
    instance,
  };
}

export const Counter = createComponent(createOptions);

Hmm.. yeah that looks like Svelte. It's also considerably different from what I'm doing here. Like it has to detect things are components and handle them appropriately. And involves manipulating more than just JSX. Basically you are looking for a single file component structure that uses JSX instead of a string, faux HTML DSL.
Whereas this library isn't nearly as structurally strict. However, it is specific on how it handles bindings matching them to the dom-expressions runtime. There are no Components it just converts JSX. You can have 8 Components in a file, or 0. I just look for JSX entry and spit out real DOM nodes with wrapped binding expressions. Then creating a Component is just call a function. createComponent is a create instance wrapping just isolates reactive scope and wraps props.
This would have to probably look for the default export function decide if that's a Component parse the JS body to pull into the instance. Parse through the bindings to assign them to generated lifecycle functions. Look for variables that are listened to by those bindings declared in local scope and augment all instances of mutation with an invalidator function.
Let's compare the current output:
import { template as _$template, insert as _$insert, delegateEvents as _$delegateEvents } from "runtime"

const _tmpl$ = _$template(`<div><p>Counter: </p><button>inc</button></div>`);

export function Counter() {
  let count = 1;

  function inc() {
    count += 1;
  }

  return function () {
    const _el$ = _tmpl$.cloneNode(true),
          _el$2 = _el$.firstChild,
          _el$3 = _el$2.firstChild,
          _el$4 = _el$2.nextSibling;

    _$insert(_el$2, count, null);

    _el$4.__click = inc;
    return _el$;
  }();
}

_$delegateEvents(["click"]);

I'm thinking these are too different, The overlap is actually pretty small. If I'm wrong that'd be great. But I think as you play with it you might come to the same conclusion.

@ryansolid Do we have group chat for this library? Can I join with you to work on ssr and hydrate parts?

I can get one up. So far most people have talked through the Solid community since it is the project that is really driving this development. But it also has a lot of specific talk about Solid APIs and questions. The one thing that I've been working through is how much of the approach should be runtime or compiler. The thing that I've realized over time is both parts are important. There are some big limits to compiler only approach, but you can almost always use compilation to make the code more efficient at runtime.
I've set up this gitter for dom-expressions which I think is probably the right genericity for this right now as both parts are intertwined. There are people looking and testing this from the Solid side but I imagine they are more going to drive the requirements(expectations) and the finesse of the final API. But the generalization and actual core implementation probably needs its own focus. There are just a decent number of touch points. Since for example on the Solid side, Suspense is a big part of the picture but this library at its core doesn't have the concept. I'm currently getting the feeling runtime is a big part of this.
In any case I'd love help even if just to work through some ideas with. This area is definitely a challenge for this approach as there aren't "components" to act as boundaries.
Anyway I just made this: https://gitter.im/dom-expressions/community
And you might want to see this thread: https://github.com/ryansolid/solid/issues/109


No way to create a container of polymorphic-open records.

There is currently no way to create a list (or other container) of records with a restricted/open row type.  It appears that a 'subtyping' cast operator is needed.  This sample illustrates the problem:

(include "lib/basis.scm")

(typealias ralias (rproduct (rlabel f0 (pre int) 'a)))

(define (cast r)
  (%%cexp ((ralias 'a) -> (ralias 'b)) "%0" r)
  )

(define (dump-poly pl)
  (for-range i (length pl)
    (let ((item (nth pl i)))
      (printf (int i) " = " (int item.f0) "\n")
      )))

(define poly-list
  (cons (cast {f1=1})
        (cons (cast {f0=2 xyz=2})
              (cons (cast {f0=3 abc="hi"})
                    (list:nil)))))

(dump-poly poly-list)

I intend to revisit this issue later.

This mechanism below seems to work. By using %%cexp and casting both sides of it it to the desired cast-type, it forces the inference to unify both sides with the cast-type yet keeps a "boundary" in the middle across which the unification doesn't pass.
However, I can't seem to formulate a macro which accepts the type as an argument. Even if I could, the compile error if the macro wasn't used properly would be pretty bad, so it justifies something better.

In theory I think it should be possible to do this hetro-unification automatically. It requires the parametric list type to be a type instance (is it already?) and encoding field-extend as (pre) and field-access as (abs).

In english, if either row has an abs a field, the both rows must have a and the resulting type is (abs a); if both rows have (pre a)then the resulting type has(pre a), and if only one row has (pre a)then the resulting type has noa` field.

'''scheme
(include "lib/basis.scm")
(typealias generic_row {field=int ...})
;; runtime polymorphic existential list
(typealias generic_list (list {field=int ...}) )
;; instantiate a runtime polymorphic ( existential ) list
(define a_var : (list {field=int ...})
(list:nil))
;; these objects need to be "boxed" into something that is
;; runtime compatible with the generic list, because...
(defmacro cast (cast x) ->  (%%cexp ( 'generic_row -> 'generic_row ) "%0" x))
; this does not work
; (defmacro cast-to (cast-to x to-type) ->  (%%cexp ( to-type  -> to-type ) "%0" x))
(set! a_var (list:cons (cast {field=1 extra=2} ) a_var))
(set! a_var (list:cons (cast {field=2 bar=3}   ) a_var))
(set! a_var (list:cons (cast {field=3 zed="fo"} ) a_var))
;; (set! a_var (list:cons (cast {error="error"} ) a_var))
;; ...there is only going to be one parametric instantiation
;; of this function, which is going to be called on any data
;; placed in the list
(define (with_list a_list)
(match a_list with
(list:nil) -> #u
(list:cons data next) ->
(begin
(printf (int data.field) "\n")
;      (printf (int data.foofield) "\n") ;; error
(with_list next))
)
)
(with_list a_var)
'''


Updating Telerik, Infragistics, ESET and MSFT offers information

Updating Telerik, Infragistics, ESET and MSFT offers information.

You're on a roll! Thanks for these contributions! :rocket:


Multiple joins

I'd have something like:
SELECT * FROM table_a
JOIN table_b ON table_a._id = table_b.a_id
JOIN table_c ON table_b._id = table_c.b_id;

and retrieve the full tree (a contains a list of b that contains a list of c).
Is it possible to define a sql query with multiple joins currently?

yes that query is possible, it will return to you an object like
interface YourQuery {
  A a();
  B b();
  C c();
}

we wont generate an instance of A containing references to B though. You will have to create that object yourself. All SQLDelight is doing is returning you a POJO that reflects the underlying row in SQLite, we don't do any relational logic.

Sorry to dig this only closed issue up... But, is this still possible? @AlecStrong
When I try
CREATE TABLE A(
    id INTEGER PRIMARY KEY,
    aaa TEXT
);
CREATE TABLE B(
    a_id INTEGER,
    bbb TEXT
);
CREATE TABLE C(
    b_id INTEGER,
    ccc TEXT
);

testMultipleJoin:
SELECT * FROM A
JOIN B ON A.id = B.a_id
JOIN C ON B.a_id = C.b_id;

Instead of generating something like:
interface testMultipleJoin {
  val a: A
  val b: B
  val c: C
}

the following is generated:
interface TestMultipleJoin {
    val id: Long

    val aaa: String?

    val a_id: Long?

    val bbb: String?

    val b_id: Long?

    val ccc: String?

    data class Impl(
        override val id: Long,
        override val aaa: String?,
        override val a_id: Long?,
        override val bbb: String?,
        override val b_id: Long?,
        override val ccc: String?
    ) : TestMultipleJoin {
        override fun toString(): String = """
        |TestMultipleJoin.Impl [
        |  id: $id
        |  aaa: $aaa
        |  a_id: $a_id
        |  bbb: $bbb
        |  b_id: $b_id
        |  ccc: $ccc
        |]
        """.trimMargin()
    }
}

I know the following doesn't work:
testMultipleJoin:
SELECT * FROM A
JOIN B ON A.id = B.a_id AS B
JOIN C ON B.a_id = C.b_id AS C;

To get something like
interface TestMultipleJoin {
    val id: Long

    val aaa: String?

    val a: A

    val b: B

}

But is there anyway I can achieve something like that? Or would writing complicated custom column type adapters be the only way?

this issue could be helpful.
https://github.com/square/sqldelight/issues/1320
Also, you can provide custom mapper function to queries.

https://stackoverflow.com/questions/3639861/why-is-select-considered-harmful


Textures in /kits

Textures in /kits are all Leather Icons and not obtainable

e

This bug is now fixed, thank you for the report :)


Personal python updates backlog

I'm a bit behind on these packages, so bundling them up for updates here.
Description of changes

Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Estimating rebuild amount by counting changed Hydra jobs (parallel=unset).
   2403 x86_64-darwin
   3527 x86_64-linux

Meh, gonna split them up.


OpenAPI Suggestion: do not set .host when serving over *4, !4, *6 or !6

Hello,
It might come from my inexperience in networking, but setting the config's server-host value to anything other than a bindable, local address fails (as per expected, I guess), this means that the OpenAPI .host value returned always results in a local address, making it impossible to use with online tools.
I suggest to remove the field when the config's server-host value is set to the special values, this will force tools to use the host used to retrieve the documentation json (described here: http://swagger.io/specification/#schema-13).
Then again it could be a failure on my part, and please do tell me if so, I tried setting server-host to the IP of my server and I was met with
Listening on port 3000
postgrest: bind: unsupported operation (Cannot assign requested address)

when launching the app.
EDIT:
Looking at the source code, it seems a simple conditional would be required at https://github.com/begriffs/postgrest/blob/master/src/PostgREST/OpenAPI.hs#L270, it would also make escapeHostName a few lines higher deprecated.
Thanks!

that setting is meant to specify the ip address postgrest should listen not, it's not a setting for openapi.
in order of external tools to access your local running postgrest, that ip needs to be public on the internet
if you need openapi response to have something else then the ip that postgrest listens on, you can use server-proxy-uri
(if it does not work, post your complete config here)

Oh wow, my bad, I had looked at the option but failed to understand. Thanks !

In your opinion are the roles of these config parameters explained clearly enough in https://postgrest.readthedocs.io/en/v0.4/admin.html ?
(I know these docs are not yet advertised so you perhaps did not see them, but I'd like your opinion about the clarity of the docs.)

Oh, I had no idea of these existing, I only knew from the --help option of the binary. I think it could be good to link the config documentation there.
The docs themselves seem to be explained clearly.


Migrating the Chatbot from Dialogflow to something else.

I won't be able to keep the Dialogflow agent running for long as it is just an example project. I'm thinking of making use of the chat interface that @michellejslei had already created and connecting it with a backend (not Dialogflow).
By doing this I wish to keep this project running for longer, else it would be useless if I just shut down my Google Cloud project. Let me know what you guys think about this.

That sounds good to me, the chat interface I created is still in index.html, just commented out.

How long does the free trail we have with Google Cloud last? Depending on our usage, we could continue to keep the agent running as long as we don't exceed on hours? Was it a month trail or a flat usage fee?
For longer term, I think it's also worth just to comment out the Date selectors for flying out, since there isn't any functionality associated with them. We should also put the video link of the demo on the site so people can see what it does :)

My free credits are valid for 90 days. And about the demo video, we already have one in the GitHub repo README.md
Do you want to make another one?

It would be nice to make a demo video without the drop down menus that
aren't usable, if you don't mind doing that.
Thanks Sahil!
On Fri, May 5, 2023 at 12:41 PM Sahil Sagwekar @.***>
wrote:

My free credits are valid for 90 days. And about the demo video, we
already have one in the GitHub repo README.md
Do you want to make another one?
—
Reply to this email directly, view it on GitHub
https://github.com/michellejslei/chathacks_travelbot/issues/6#issuecomment-1536696671,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMU3G6E2OC65WC2I7M2RP7LXEVJWVANCNFSM6AAAAAAXSC6LXU
.
You are receiving this because you were assigned.Message ID:
@.***>

--
Thanks,
Scott Henderson
(650) 815-9307
@.***


Default all async support to std::future

This commit defaults all crates in-tree to use std::future by default
and none of them support the crates.io futures 0.1 crate any more.
This is a breaking change for wasm-bindgen-futures and
wasm-bindgen-test so they've both received a major version bump to
reflect the new defaults. Historical versions of these crates should
continue to work if necessary, but they won't receive any more
maintenance after this is merged.
The movement here liberally uses async/await to remove the need for
using any combinators on the Future trait. As a result many of the
crates now rely on a much more recent version of the compiler,
especially to run tests.
The wasm-bindgen-futures crate was updated to remove all of its
futures-related dependencies and purely use std::future, hopefully
improving its compatibility by not having any version compat
considerations over time. The implementations of the executors here are
relatively simple and only delve slightly into the RawWaker business
since there are no other stable APIs in std::task for wrapping these.
This commit also adds support for:
#[wasm_bindgen_test]
async fn foo() {
    // ...
}

where previously you needed to pass (async) now that's inferred
because it's an async fn.
Closes #1558
Closes #1695

I could go either way on that I think. I do think that we'll want to use async/await in crates like wasm-bindgen-futures and wasm-bindgen-test, although it's technically possible that we don't have to. The current series of crates on crates.io should continue to work with the futures crate and whatever the latest version of wasm-bindgen is published, though.
In that sense if we were to publish/merge this now it means that local testing of this requires nightly (not that big of a deal) but the latest versions of wasm-bindgen-{test,futures} would not compile on stable Rust (but would compile on nightly), but the current versions on crates.io would continue to work.
I'm curious if others using these crates have thoughts on whether it'd be nice to land sooner rather than later given all this, I could personally go either way.

Can we have support for async fn foo() -> Result<(), JsValue> (or better yet, Result<(), js_sys::Error>)?
That's a lot more idiomatic than using unwrap.

I haven't done a super thorough review, but it looks like you took the 0.1 code and ported it to 0.3.
I think it would be better to go the other way around: take the 0.3 code and add atomic support to it.
I had made a lot of improvements to the 0.3 code, which this PR gets rid of.

@Pauan

Can we have support for async fn foo() -> Result<(), JsValue>

I think we definitely should! I added enough support for that to tests, but I'd like to work a bit more yeah to get that working as well for futures. I think it may be best to file an issue for that and track in a follow-up PR though.
(or do here if I or anyone else gets time!)

I had made a lot of improvements to the 0.3 code, which this PR gets rid of.

Oh oops, sorry didn't mean to lose all that! Can you elaborate a bit on what optimizations the 0.3 implementation had we want to be sure to preserve?

Can you elaborate a bit on what optimizations the 0.3 implementation had we want to be sure to preserve?

future_to_promise should be implemented using spawn_local, not the other way around.

Rather than creating a Promise per Task per wakeup, it should generate 1 cached Promise for all Tasks.

I took a look at the multi-threading code:

future_to_promise accepts non-Send Futures, which seems wrong.

It doesn't seem to actually execute the Future on multiple threads, the only thing that happens on other threads is the wakeup (is that actually useful?)

Can we punt the multithreading implementation to a future PR while we work out these issues?

(In the interest of getting this merged, we can merge this as-is and I can send a follow-up PR which adds back in the optimizations)

Out of curiosity, was there data showing that the optimizations were necessary? I could imagine that hundreds/thousands of promises is probably worse than one, but I'm not sure if that practically really comes up that often.

future_to_promise accepts non-Send Futures, which seems wrong.

This is fundamentally required because futures produce JsValue which isn't Send. The returned value, Promise, is also pinned to exactly one thread since it can't leave the context of a JS thread. Basically the implementation is just ensuring that we can source events happening from any thread (any wakeup anywhere), but the final value is pinned to a particular thread.

It doesn't seem to actually execute the Future on multiple threads, the only thing that happens on other threads is the wakeup (is that actually useful?)

That's correct, and intended. (it's also a fallout of the previous point). This is useful when your computation is, for example, being produced on a foreign rayon thread. When the final notification comes in that a value is ready some small work is done to convert it to a JsValue and then it's resolved on a JS thread.

(In the interest of getting this merged, we can merge this as-is and I can send a follow-up PR which adds back in the optimizations)

That sounds good, I checked in with @fitzgen and I think the procedure here is going to be:

We'll merge this now
We'll publish new versions when necessary
If necessary to backport changes to the older versions we'll make a new branch and maintain them there. As soon as async/await hits stable I think we'll drop support for the current crates.io tracks of wasm-bindgen-{test,futures}

Out of curiosity, was there data showing that the optimizations were necessary?

Yes. It's common for dominator to spawn hundreds (or even thousands) of Futures simultaneously, and the situation is even worse with animations (because hundreds of Futures can run on every frame).

Basically the implementation is just ensuring that we can source events happening from any thread (any wakeup anywhere), but the final value is pinned to a particular thread.
This is useful when your computation is, for example, being produced on a foreign rayon thread.

Ah, okay, I see. I had wrongly assumed that it was a proper multithreading implementation (like futures::executor::ThreadPool).

Yes. It's common for dominator to spawn hundreds (or even thousands) of Futures simultaneously, and the situation is even worse with animations (because hundreds of Futures can run on every frame).

Nice! If you've got time to look into reapplying the optimization that'd be great, otherwise I can try to find time as well to reimplement it.

If you've got time to look into reapplying the optimization that'd be great

I already did, I'll send the PR tomorrow.

I already did, I'll send the PR tomorrow.

Thanks!

Can we have support for async fn foo() -> Result<(), JsValue>

https://github.com/rustwasm/wasm-bindgen/pull/1754 now!


Have AMBASSADOR_NAMESPACE default to the pod's namespace if unset.

Please describe your use case / problem.
Currently, if the AMBASSADOR_NAMESPACE environment variable is unset, then Ambassador defaults to default.
Describe the solution you'd like
It would be good if it instead defaulted to the pod's namespace, which it can determine by reading /var/run/secrets/kubernetes.io/serviceaccount/namespace.
Additional context
Please make sure I'm aware if/when you make this change, because I should probably modify Pro's behavior to match OSS's behavior.

notstale

notstale

@kflynn Should I do a PR for this (that will look a lot like https://github.com/datawire/ambassador/pull/2087/commits/08ad0c0288244ebeaa75ccba96ec8c7794635057) ?

Not stale

not stale


fix progress download for blobs

The previous PR #1110 added full support for downloading individual blobs in content trees, but lost progress beyond 0% and 100%. This restores it by sending updates with each blob.
This is a little more complex than before. The old version had a single file, so the progress was one single stream. With blobs, there can be 1, 2 or many blobs being downloaded. This restores the download progress to each blob. The logic to aggregate them to the ContentTreeStatus with each update already was added in #1110, but might still have issues.
As long as this adds progress updates for individual blobs without breaking anything else, this should get merged in. If we need additional fixes on how the blob progress elements get merged together in doUpdateContentTree(), those should be handled separately.

Responding to @eriknordmark's earlier comments.
This PR specifically is not about restricting or controlling sizes, but reporting them. So I 100% agree that we need to do a better job of controlling sizes on OCI downloads, but that is not the purpose of this PR.
Moving on to the substance of controlling the sizes and maxsize. I am going to move this to a new issue so we can track it and eventually close it when it is done.

See #1164


cache files included in repo

Cache directories are found in main:
.jython_cache
pycache
And are not included in .gitignore

Thank you for noticing! It's fixed now


Update forge_userdata to install libffi-dev

Satisfies requirement for paramiko 2.0.0 (released today).
Raw contents:
#cloud-config
repo_update: true
repo_upgrade: all

packages:
 - python-dev
 - python-pip
 - git
 - libffi-dev
runcmd:
 - curl https://raw.githubusercontent.com/telusdigital/forge/master/bootstrap.py | python

Can verify with echo LONG_BASE64_ENCODED_STRING_HERE | base64 -D.

Team approved


Allow functions to be given to insert/update/delete/insert_or_update in Ecto.Multi

The function should receive the changes so far and return a struct/changeset. They should be equivalent to calling run/3.
We also need to change the module docs for Ecto.Multi to make it clear that we only pre-validate functions that explicitly receive a changeset when the changeset is built.

Something like this:
def insert(multi, fun) when is_function(fun, 1) do
  run(multi, fn repo, changes -> repo.insert(fun.(changes)) end)
end


Add a Codacy badge to README.md

Clicked create badge by mistake and was in my codacy view instead of project view. Just ignore pull request.


Is it possible to get path to VS2017 from Powershell or Python

Especially without additional files with script

See https://github.com/microsoft/vssetup.powershell.

Ty

Check out https://github.com/node4good/get-vs7-path
Pure scripts, no external tools or installation needed


Trying to always set conclusion to skipped

Current dependencies on/for this PR:

main

PR #704

PR #707

PR #708   👈

PR #709

This comment was auto-generated by Graphite.


[AVM Module Issue]: Load balancer idempotency

Check for previous/existing GitHub issues

[X] I have checked for previous/existing GitHub issues

Issue Type?
Bug
Module Name
avm/res/network/load-balancer
(Optional) Module Version
0.4.0
Description
I am unable to reach idempotency when associating a loadbalancer loadBalancerBackendAddresses property using a NIC association. The initial deployment is working however subsequent deployments I will receive the error ..."not allowed since it adds/modifies/deletes backend address pool members that are specified with a network interface IP configuration." I am aware that deploying via IP address is idempotent however, I am trying to achieve this using the NIC association.
(Optional) Correlation Id
No response

Thanks @christianfelix162 for your issue. Let me take a look.

Hey @arnoldna,
this seems related to #2512 & #3395. At least they all share the same error message and whatever the solution is, it may solve all 3 issues.

Hey @arnoldna, this seems related to #2512 & #3395. At least they all share the same error message and whatever the solution is, it may solve all 3 issues.

Potentially. I am working with the product group and with my Terraform counterpart on this issue.

We are facing the same issue that is outlined here. This is an important requirement for us to have reliable deployment of our IaC.
Please let us know if we can expect an update.
Thank you


Add a backtrack option to save time in case of clustered leaks.

Scenario in which this is useful:
A large codebase, with multiple leaking tests that all affect a single target.
It's likely (though not guaranteed) that the tests that are leaking resources that affect the one target test are clustered together. In that case, after finding one problematic test and skipping or fixing it, it can be helpful to run the same set of tests under pytest-leak-finder again to find if there are other leaks.
With this PR, you can for instance run pytest --leak-finder --backtrack=2 to rerun after finding a failing test in path abbbab, starting with path abbb.

Actually, this doesn't work as is, because the (de)selected tests are part of the state, and we have no easy way of resetting that to the previous value.


Unable to get outlook add-in scopes or user identity

Hi,
I have used repository at https://github.com/OfficeDev/PnP-OfficeAddins/tree/main/Samples/auth/Outlook-Add-in-SSO to develop my first ever outlook web add-in. I have taken all steps suggested to register app to Azure as well with necessary changes to code.
The add-in requires to identify user without logging-in (similar to what Dynamics 365 outlook add-in does) and allow me to interact with microsoft graph api. This repository serves the purpose to some extent, but I am unable to sign-in silently.
All I need is to hit and execute Post function on SaveAttachmentsController.
With current [Authorize] attribute, my code won't hit the breakpoint set on Post function on SaveAttachmentsController.
If I remove [Authorize] attribute, my code will hit the breakpoint, but it won't be able to get list of scopes as ClaimsPrincipal.Current throws exception. User would then have to follow fallback login method which I would like to avoid.
Has anyone ever encountered this issue?
What should I change in code so I can keep [Authorize] attribute and still able to authorize the User silently to authenticate/communicate with Graph API?
Please help.
Regards,
Jay

Hi @kudecha,
Sorry this hasn't been working properly for you. I saw you also asked this same question on #178. The most likely scenario is that there is a configuration problem. I'd go through the readme steps again for the app registration and just double-check it is all configured as expected. Also double-check the manifest that it has the correct client id. Office uses the configuration information to construct the token it returns to you from getAccessToken().
Another thing to check is the auth token itself. When you get the value from getAccessToken, you can paste it here: https://jwt.ms/ which will decode and show you all the claims. You'll want to be sure for example the audience is set to your client id. If not it's most likely a value in the manifest or app registration not set correctly. You can check all the claims there to be sure they are being set as expected.
Hope this helps,
David

+1 on this exact issue! I've triple checked the app registration and the add-in manifest and the JWT decode. I've done something very similar in a different project for a PowerPoint add-in and never got this issue. But still not sure how this issue could be specific to this repo yet.  Note that I have not previously granted the app registration admin consent to the Graph scopes - I want the user to do that (it's all delegated permissions that I want anyway).
One odd thing to add: I earlier cancelled the initial dialog to login and grant consent for the first-run scenario, as I knew the end-result will fail as I didn't complete the controller actions and I wanted to re-test this entire flow later. But...I haven't seen that login popup again - the JS code is going straight to the Ajax call for the controller action with the token retrieved from getAccessToken. I may have altered the scopes in the registration and add-in manifest later, but I've unregistered the manifest and re-added it several times.  Perhaps @kudecha and I are dealing with some weird caching issue with a bad token that isn't getting reset??

Some questions and thoughts: isn't there a requirement that any domain used in an App ID URI for SSO purposes be a valid, owned domain (like using azurewebsites.net for an Application Service)? Is localhost exempt from this somehow? Could this be related to this issue?
Similarly, debugging an SSO add-in seems to require providing pre-consent to the App Registration in advance. The side-loading steps seem to differ between Yeoman generated and Visual Studio projects. In this case (the latter), I was testing a no-consent scenario and cancelled the consent screen the first time I saw it and haven't been able to get it back. But I'm still not sure if this is related to the "401 Unauthorized" issue for the controller call...
Then there's the matter of using the forMSGraphAccess option for the getAccessToken() call, but that Office apparently can only prompt the user for consent for the AAD profile scope. I need additional Graph scopes. I'm also hoping to debug - and develop - an end-to-end multi-tenant solution that covers ALL scenarios: admin or user consent previously or not granted. Handling these variations in the flow is a bit of a nightmare! I'm still not certain if there are limitations for debugging this kind of an end-to-end solution using localhost vs. code and deploy and test to an Azure App Service tied to a valid domain for SSO usage in the related App Registration.
It gets confusing real fast, every single time I do an auth solution with M365, whether it's Outlook, PowerPoint or Teams. The samples are great, but the pitfalls are real and there are very many traps!

After thinking more about this issue over the weekend, and moreso in the context of the Outlook-Add-in-SSO project, the answer is clear as to why calls to SaveAttachmentsController with the Authorize attribute are failing: it is because there is no ASP.NET Identity integration in the project.  So, a previously authorized user is expected, but never actually signed in.  Until code for that is implemented, remove the Authorize attribute so this sample can be tested as is.

Ugh - correction: there IS Identity integration.  It's in the AzureADAuthController; it's Login method has to be called from the client script in MessageRead.js.  However, the conditions for calling Login() is entirely based on whether the dialogFallback() method is called in the script.  As the comments say: "For all other AAD errors, fallback to non-SSO sign-in".  I'm not certain that's true though: doesn't the Login() method always have to be called - even in SSO scenarios - so the user can be authorized and protected controller actions can be called?  So the problem seems to be that the user is never authorized if the sample is run in a first-run scenario where SSO is enabled?

Hi Eric,
The Login method on AzureADAuthController is used when SSO has failed and you have to fallback to popping up a dialog to log in the user yourself. In the SSO success scenario it won't be called because the user is already signed in to Office and you get their user token from Office (thus no need to login again.)
The [Authorize] attribute is configured in Startup.Auth.cs. You can see for example where it sets to check for ida:Audience. This is why you need to be sure the audience is set to your app registration GUID in the web.config. The token Office provides will contain this audience, and the [Authorize] attribute will enforce this check.
I'm not sure why this is failing for you so I'm still looking into this.
Cheers,
David

Hi Everyone,
Thanks for your valuable inputs throughout this period.
I have finally figured out what's wrong and applied the change.
It's to do with the App Registration within Azure.
Here is the fix:
Update App Registration manifest file attribute 'accessTokenAcceptedVersion' with value '2' (it should be 'null' as default value).
Even though 'null' value is supposed to be used as v2 of SSO token (as per https://github.com/MicrosoftDocs/azure-docs/issues/19304), it does not.
I had to manually update manifest 'accessTokenAcceptedVersion' to '2' to receive correct token.
It would be great if documentation is updated with this information, to help other developers in future where they might be stuck forever like me.
Once again,
Thank you everyone.
Regards,
Jay

Thanks @kudecha, this is super helpful!
I was able to reproduce this behavior by changing the registration type to "Accounts in any organizational directory (Any Azure AD directory - Multitenant)". The issuer and audience claims will change in the token causing the authorization failure in the sample. Then I edited the App Registration manifest to set 'accessTokenAcceptedVersion' to '2' as you said. Yep, now the token is correct.
I'll add a note to the docs and sample about this. Thanks!


Using silo-specific content breaks formatting

Not sure if this is a bridgy thing or a granary thing!
I'm attempting to use the p-bridgy-mastodon-content to append hashtags to the end of posts on Mastodon only. The relevant bit of the template looks like this:

    {{ .Content }}

  {{ if .Params.hashTags }}

    {{ .Content }}

    {{- $hashTags := .Params.hashTags -}}
    {{- range $idx, $tag := $hashTags -}}
      #{{- $tag -}}
      {{if (lt $idx (sub (len $hashTags) 1))}} {{end}}
    {{- end -}}

  {{ end }}

For this example post, putting it into Bridgy publish results in the following:

The image's alt-text gets embedded into the rendered text in place of the image, though the actual image does still get embedded properly.  I would expect the alt text to not be included as text here.
I tried this by just putting the tags directly into the normal p-content after the {{ .Content }} and it does work as expected.
Happy to try and fix this myself if I'm pointed in the right direction!

Hmm perhaps because it's outside the p-content?

The ? It's inside e-content, right? And yeah evidently this is what mf2 parsing does for e-* elements. https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property :

replacing any nested  elements with their alt attribute, if present; otherwise their src attribute, if present, adding a space at the beginning and end, resolving the URL if it’s relative;

Well the mastodon-specific one is not in e-content, it's in p-bridgy-mastodon-content, but I tried it with both and it didn't change things.
Per the spec - does that mean this behaviour is correct, and we can't actually publish stuff like this - text with an image in the middle of it somewhere - to Mastodon without the image being substituted for alt-text? How is it then that an image at the end of the text doesn't get replaced by its alt?

Oh sorry, I focused on the alt text part and forgot p-bridgy-mastodon-content, let me see...

Ah, but the mf2 parser is parsing out p-bridgy-mastodon-content, and it's doing the same thing as with e-content, replacing imgs with their alt or src: https://microformats.org/wiki/microformats2-parsing#parsing_a_p-_property
Hrm. Not new, I guess, but still an odd surprise.

How is it then that an image at the end of the text doesn't get replaced by its alt?

I'm not seeing that? Here's an example with the img moved to the end, it still gets replaced: https://pin13.net/mf2/?id=20230727165239993

Ah ok my mistake - I got confused because for this post, for example, the alt text does get interpolated in, as shown: https://pin13.net/mf2/?url=https://www.joelotter.com/notes/2023/05/17-slack/
But! When I pop that into the publish preview on Bridgy, I get:

And indeed that post did get published on Mastodon correctly: https://otter.garden/@joel/110383642556046216
Is Bridgy/Granary doing something clever to make this work?

Ahhh yes. Bridgy uses the parsed html value for normal e-content, https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property , which doesn't have this problem. It leaves the img etc tags intact, and then Bridgy/granary use their own logic to convert HTML to text, trying to preserve formatting but otherwise dropping imgs.
p-* parsing doesn't generate the html/value composite object, so it can't currently do that for p-bridgy-*-content. Reasonable feature request though, if you want it! And should be pretty straightforward.

Gotcha! I’d be very happy to add it myself if you point me in the right
direction.
On Thu, 27 Jul 2023 at 18:17, Ryan Barrett @.***> wrote:

Ahhh yes. Bridgy uses the parsed html value for normal e-content,
https://microformats.org/wiki/microformats2-parsing#parsing_an_e-_property
, which doesn't have this problem. It leaves the img etc tags intact, and
then Bridgy/granary use their own logic to convert HTML to text, trying to
preserve formatting but otherwise dropping imgs.
p-* parsing doesn't generate the html/value composite object, so it can't
currently do that for p-bridgy-*-content. Reasonable feature request
though, if you want it! And should be pretty straightforward.
—
Reply to this email directly, view it on GitHub
https://github.com/snarfed/bridgy/issues/1527#issuecomment-1654060216,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAVDELD3OL6VOSFW6OQCH6LXSKPB5ANCNFSM6AAAAAA22KMNAM
.
You are receiving this because you authored the thread.Message ID:
@.***>

It's here...but looking at this, I think it might actually work as is if you just switch to e-bridgy-mastodon-content. Feel free to try!
https://github.com/snarfed/bridgy/blob/8550bc286411bc4cfd6b541211cc4daa023c62db/publish.py#L130-L136
(and then later https://github.com/snarfed/granary/blob/8d786232143d466c23beecd9193a98ddafb8fa25/granary/microformats2.py#L527 )

Ah that seems to work, thank you! Might it be worth updating the docs to use e- instead of p-?

If it works, definitely, please do! Thank you!

Does this require any work on the mf2py side @snarfed?

@capjamesg thanks for the nudge! Yeah there may be a small whitespace bug here, I've filed https://github.com/microformats/mf2py/issues/202


[JSTC-5] Add flag for mapping table prefix to ENS subdomain in table creation

This pull request introduces a new flag that allows users to map a table's prefix to an existing Ethereum Name Service (ENS) subdomain when creating a table on the Tableland network.
Please note that this feature does not enable users to simultaneously register an ENS domain or subdomain. The wallet provided must already be the controller of an existing domain or subdomain in order to register a prefix with it.
Example usage:
> tableland create --ns myapp.foo.eth "id integer primary key, item text, count int" inventory

In this example, the command creates a table with the specified schema. Once the table is successfully created on the Tableland network, it registers the text record "inventory" to, for example, "Inventory_1_414" on the Tableland network, associating it with the specified ENS subdomain. In tableland, inventory.myapp.foo.eth will now refer to Inventory_1_414.

Just for clarification, this isn't adding any significant new underlying functionality to the ENS experiment, right? As in, the mapping from ens name to tableland still happens essentially on the client, and what gets sent to the validators is actually the tableland table names, correct? From the description here, it seems like something more deeply integrated into tableland?

Just for clarification, this isn't adding any significant new underlying functionality to the ENS experiment, right? As in, the mapping from ens name to tableland still happens essentially on the client, and what gets sent to the validators is actually the tableland table names, correct? From the description here, it seems like something more deeply integrated into tableland?

That is correct. This is simply a shortcut in the create command for what the namespace command already allows the user to do; tell ENS from the command line to update a text record value to reflect a given table name. (In this case, the table that the user is simultaneously creating)

Cool, last question: did we figure out a way to test this new functionality that doesn't require some crazy deploying ENS to local-tableland kinda backflips?

Cool, last question: did we figure out a way to test this new functionality that doesn't require some crazy deploying ENS to local-tableland kinda backflips?

The other option is mocking the ensjs functions. That is what I'm leaning toward. It's a hassle but not as much as the deploy ENS to local-tableland option.

Yeh let's go with mocks for now. It is the shortest path to at least some confidence that we aren't going to break things with subsequent PRs etc.

Yeh let's go with mocks for now. It is the shortest path to at least some confidence that we aren't going to break things with subsequent PRs etc.

Quick update on this:
Because of how the ENS library is set up, this is a little tough. Long story short, .mjs exports can't be directly stubbed/mocked? I have an idea for a workaround, but it's ugly. Stay tuned.
https://javascript.plainenglish.io/unit-testing-challenges-with-modular-javascript-patterns-22cc22397362

Alright, I've added some tests for the ENS stuff using mocks. This PR is ready for review.


wrapError not compatible with jQuery's passed arguments

When jQuery calls the error callback, is passes three arguments - error(jqXHR, textStatus, errorThrown). wrapError only uses the first argument (treating it as resp, which is somewhat wrong as its not the response, its an jQuery XMLHttpRequest-compatible object),  making textStatus and errorThrown inaccessible.
Zepto passes two arguments - xhr and status, which is also not compatible with wrapError.
The simplest solution that won't break backward compatibility and work with both jQuery and Zepto would be to just pass everything after the first argument as additional arguments to the wrapped onError, something like:
onError.apply(null, [model, resp, options].concat(Array.prototype.slice.call(arguments, 1)))
Than one would use function(model, jqXHR, options, textStatus, errorThrown) to access everything.

I believe that we pass the complete response object now, to wrapError ... you should be able to access everything you need.


Large overhead when py_function returns tuple of lists

Please make sure that this is an issue related to performance of TensorFlow.
As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:performance_template
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): YES
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux Ubuntu 20.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): v2.4.0-49-g85c8b2a817f 2.4.1
Python version: 3.8.8 (verified in 3.6.9 as well)
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: N/A
GPU model and memory: N/A

Describe the current behavior
Given the code in the gist https://gist.github.com/kretes/02dc479ab7a63a8b5a559c5e7df89598 - I see that the version of the py_function that return a tuple of lists with data is introducing some large overhead on top of the actual operation. It takes ~10 seconds to finish the iteration in this code, while the other two versions (returning just tuple, or returning tuple of ndarrays) is done within ~2 secs.
Describe the expected behavior
There should be no difference between returning a tuple with data, or wrapping them up with one more nesting level.
Standalone code to reproduce the issue
https://gist.github.com/kretes/02dc479ab7a63a8b5a559c5e7df89598 - code and logs from run on my side. I verified this in multiple installations, the recent one in jupyter/tensorflow docker image

This might be a duplicate of https://github.com/tensorflow/tensorflow/issues/44555

Hi,
I'm not sure if this is correct, but hear me out. As stated here, and here

Note that irrespective of the context in which map_func is defined (eager vs. graph), tf.data traces the function and executes it as a graph. To use Python code inside of the function you have a few options: ...

Thus, the map function traces the graphs if the input/output has a python object. numpy arrays work similar to Tensors and result in similar performance when a graph is traced.
But, as mentioned in your last call,

In [10]: %%time
...: for _ in make_ds(return_list):
...:     pass
...:
CPU times: user 11.4 s, sys: 345 ms, total: 11.7 s
Wall time: 11.7 s

Returning the list causes the function to retrace the graph every time and thus the time drastically increases.
I think the solution to issue 44555 is on similar lines.  Prefer to continue discussion there.
Hope this helps.


nativeDroid2 panel bug with long page

Scrolling to Top when Panel Opens.

Scrolling when panel is open.

It seems that this is a general jQM-Issue. I'll fix it according to this solution:
http://stackoverflow.com/questions/22672236/jquery-mobile-panel-open-scrolls-page-to-the-top-how-to-change-this

Fixed:
https://github.com/godesign/nativeDroid2/commit/dfba674fea493c783a7120f57b3015bcba9c9ad4


Ollama "ollama show --modelfile" shows license instead of modelfile

What is the issue?
When the command 'ollama show --modelfile llama3:70b' is entered, it should have displayed information about the model's modelfile, but instead, it displayed license information.
The "--modelfile: parameter for "ollama show" command seems not working.
OS
Linux
GPU
Nvidia
CPU
AMD
Ollama version
0.1.36

Hey @omegatao It shows the complete file, you just need to scroll up (or pipe it to something like more/less).

Hey @omegatao It shows the complete file, you just need to scroll up (or pipe it to something like more/less).

According to what you said, I tried it and there's no problem. Thank you for your patient response.👍


feat: content tile

DCMAW-10074: Content Tile
Created a reusable UI framework for the content tile, expanded design attached below.
Checklist
Before raising your pull request:

[x] Ran the app locally ensuring it builds
[x] Ran the tests locally ensuring they pass on Build
[x] Pull request has a clear title with ticket ID and a short description about the feature or update
i.e. DCMAW-222: Added ReadID SDK to iOS app
[x] Created a draft pull request if it is not yet ready for review

Before your pull request can be reviewed:

[x] Met all of the acceptance criteria specified in the user story on Jira

[x] Reviewed your own code to ensure you are following the style guidelines

[x] Ran the app and tested the feature on a range of device sizes
Please include iPod Touch, iPhone SE and iPhone 11 as a minimum.

[x] Written Unit and Integration tests if needed

[x] Met all accessibility requirements?

[x] Checked dynamic type sizes are applied
[x] Checked VoiceOver can navigate your new code
[ ] Checked a user can navigate only using a keyboard around your new code

Before merging your pull request:

[x] Ensure that the code coverage and SonarCloud checks have passed
[ ] Actioned and resolved all comments, reaching out to reviewers for clarifications if necessary.
[ ] Ran the app to ensure that no regressions have been caused by changes during code review.
[x] Targeted the correct branch; develop, release or main

@Magdaline-A : I can't approve because I originally raised the pull request on your behalf. You can take this comment as my approval; hopefully you should be able to add an approval yourself?


Add support for custom regex

The regex generically derived from the markup is sometimes not right. E.g. for markup @__id__ and value "@johndoe " it would only match "@j". In such situations, the user should be able to provide a customized regex, such as /@(\w+)/g.

As JavaScript does not support lookbehind, we probably also need to support customizing the replace function for markup matches.
This would enable users to use, for instance, a regex like this /(^|\s)@(\w+)($|\s)/g and replace matches with $1$2$3, effectively only stripping out the @.

Hi @jfschwarz !
Thanks for your work :) This repo is really cool.
At Zenchef we wanted our markup to be :__id__, so we ended up forking this project.

The tests about id, display, and type positions don't pass, but that makes sense since I did applied the same changes it as you did here : https://github.com/signavio/react-mentions/commit/3a7d7d1af407cf57c91e6a3605c82b3876dcddb4#diff-cf3a264059d2124ecf13cd8a659e780dR812
The code is at https://github.com/zenchef/react-mentions/tree/feature/custom-regex, do you want me to create a PR ?
Thanks

I was quite busy during the last days, but today finally got around looking at you branch. It would be cool to support custom regex, so thanks for picking up the work on this feature. 👌 It would be great if you could submit a PR!

I want to support<EMAIL_ADDRESS>(similar to google mentions) and this fix for custom regex would help here too.

Hey,
I was a little busy lately but I will try to provide a PR today :)
Hopefully it should work for<EMAIL_ADDRESS>


added option to use history.replaceState() to not break browser history

Thanks, i merged this manually as PR shouldn't touch dist/ files and renamed parameter to hashnavReplaceState


PARTUUID and PARTLABEL support

Wouldn't supporting these, which would clear a TODO item, only require adding 2 matching lines after
		[ "${UUID}" ] && create_uuid_label_symlink 'uuid' "${UUID}"
		[ "${LABEL}" ] && create_uuid_label_symlink 'label' "${LABEL}"

That are identical except for adding PART/part in front of the relevant places?

I think i opted out of that because busybox's blkid does not support that, but looking at the code, since it already unset PARTLABEL and PARTUUID there's no harm in adding it. Will push code for that tomorrow.

Hi,
I dropped PARTLABEL after realizing it's generic and not unique, nothing good will come from using it.

That makes sense, PARTUUID was all I cared about anyway.

Out of curiosity, what's your usecase for mdev? I do not think a lot of people uses it apart from embedded.

I wanted to get rid of udev and it's the only alternative I know of. I'm using https://skarnet.org/software/mdevd/index.html instead of busybox mdev.

I was not aware mdevd was a thing, I need to support it in OpenRC init then. I have on TODO list to integrate busybox's mdev with uevent helper, so it would use the events rather than hotplug agent interface.

For myself, most of the stuff in mdev.init was already in the devfs initscript, and I dealt whatever I needed that wasn't in mdev.conf, so this is the initscript I use for mdevd, I'm pretty sure I took some of it from elsewhere:
#!/sbin/openrc-run

supervisor='supervise-daemon'
name='Kernel Device Manager'
description='A netlink-listening device manager similar to mdev'

extra_started_commands='reload'
description_reload='Reload the configuration file'

: "${cfgfile:=/etc/mdev.conf}"

required_files="${cfgfile}"

command='/usr/bin/mdevd'
command_args="-f ${cfgfile} ${command_args:-}"

start_post() {
    mdevd-coldplug
}

depend() {
    provide dev
    need sysfs dev-mount
    before checkfs fsck
    keyword -containers -lxc -vserver
}

reload() {
    ebegin "Reloading ${name} configuration"
    supervise-daemon --signal HUP
    eend "$?"
}


Draft comms for Prototype Kit release v12.1.0

What
Tell users about GOV.UK Prototype v12.1.0 (feature release)
Why
So users know what feature has been released and impact on prototypes
Who needs to work on this
Content designer
When
Done when:

[ ] Content designer drafts content for
• Slack (#govuk-design-system and #prototype-kit on x0-gov Slack
[ ] comms has been reviewed by team

Related documentation

Suggestion

Evidence (where applicable)

draft https://docs.google.com/document/d/1QFDoZRNwfWYnwuW5z63JdVSdLdECSjSQV4sdbgeRlBs/edit#heading=h.8dy7lw4inlmb


Store GitHub API token locally

From @cboulanger on December 20, 2017 7:25
This is how PHP's composer does it:
Could not fetch https://api.github.com/repos/RobinHerbots/Inputmask/commits/6fcd2cf28ee111f8aadcd42a1b8d43d6f7a5c0ba, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+MB05-RiK.local+2017-12-20+0720
to retrieve a token. It will be stored in "/Users/cboulanger/.composer/auth.json" for future use by Composer.

Copied from original issue: qooxdoo/qooxdoo-cli#73

@johnspackman @hkollmann https://www.npmjs.com/package/dotenv seems to be a simple and effective solution

the problem with .env is that its content is bound to end up in the actual environent. not a place where you would want your github tokens to reside since stuff that is in the environment of a process is easily stolen

True. First thing I did was to put .env into .gitignore (I use it in another context), but of course that is easily forgotten. As said before, I am happy with exporting environment variables in the shell resource file, but if you can come up with a better solution, that would be great.

It is not about the file ending up in git ... that can happen to any file ... the problem is data stored in environment variables is not well protected from prying eyes of other users on the same system while the process with the environment variables is running
$ cat /proc/$$/environ

for example

Ok, I see. I actually didn't know that, thank you. I wonder why this was never fixed, but that's a different question.

one mans bug is another man's feature ... I would not want to miss this one

Well anyways :-), on my dev machine it's just me. But we SHOULD have a better option, just that I will work on the other issue todo-list and leave this one to you :-)

are there other 'settings' that should get stored, or is this the only one ?

some - eg answers for the qx create or other defaults.  I imagine that there will be a benefit in having structured storage


add tags

I think some of these are already changed on master. Can you rebase the branch?

Thanks for covering these!


_cas/casdprocessmanager.py: Assert minimal required version of buildbox-casd

Here we pass along the Messenger object to the casdprocessmanager so that
we can issue a warning on startup in the case that we are unable to properly
determine the installed buildbox-casd version.
An error is raised if we successfully identify the installed version and
it is less than the required version.
Fixes #1189

It is difficult to add tests for the various failure modes in CI as this would require installing various versions of buildbox-casd, but I have tested insufficient versions, sufficient versions and undetermined ("unknown") versions locally.

Can we do something similar about buildbox-fuse?

Some of this requires addressing more of https://gitlab.com/BuildGrid/buildbox/buildbox-casd/-/issues/86, buildbox-run for instance I believe does not yet expose a --version argument, it would be best to have the command line parsing code in buildbox-common automatically support a --version argument and update all the binaries to provide a version (this might require updating the relevant components with similar CMake foo to derive their versions from git tags, falling back to "unknown").
For buildbox-fuse I'm not sure it makes sense to do anything about this, as we do not directly invoke buildbox-fuse - I guess that this is more of an implementation detail of buildbox and we don't really have any business knowing that it exists.
That said, on the one hand it seems unimportant since buildbox binaries should generally be distributed/updated together, but on the other hand if this is the case, it leaves us open to problems which occur when buildbox-fuse/buildbox-run are updated but buildbox-casd has not been updated and so there is no new version to test for.
Probably it is best to at least:

Have a separate version check for buildbox-run
Expect that buildbox-run will bump it's own version number if an important change is introduced in the buildbox-fuse implementation detail

For buildbox-fuse I'm not sure it makes sense to do anything about this, as we do not directly invoke buildbox-fuse - I guess that this is more of an implementation detail of buildbox and we don't really have any business knowing that it exists.

The thing is currently buildbox-fuse is an implementation detail of buildbox-casd and buildbox-run doesn't really have any business knowing that it exists. I agree that buildbox-run, as part of the buildbox project, has more business with this than buildstream.

* Expect that `buildbox-run` will bump it's _own_ version number if an important change is introduced in the `buildbox-fuse` implementation detail

Or possibly print the version number of buildbox-fuse if it is using it. But as I said, buildbox-fuse is currently an implementation detail in the LocalCAS protocol, and there is no real way to know that it is being used.


Suspend active Firewall after download to avoid time of downtime

First at all, thanks for your great work !
Is your feature request related to a problem? Please describe.
when we have a HA pair of firewall, the active one is suspended just before downloading image, so it's in this state during all the download time. I think it could still be passive during the download in case something went wrong. It seems to occur when you donwload a base image and then download a second image.
Describe the solution you'd like
Suspend the active one only after all image are downloaded
Describe alternatives you've considered
Check the action of suspend active firewall and move it after all download action.
Additional context

you're absolutely right, I changed the workflow for the web upgrade version but will revisit the CLI version too. thanks for bringing this up!


A refresh_token is not available

Hello all,
me again 😞
I'm getting A refresh_token is not available.
So, this happens once the OAuth has been authenticated, and we try to hit the endpoint on Google again.
I've debugged the code and tried to run client.refresh_token, no luck here.
Any ideas?

Hi, and thanks for reporting. Could you share a snippet of the code you're using (or at least the code you're using to debug the issue?)
Thanks.

Hi there,
I have this
client = CloudPrint::Client.new(client_id: Settings.google.cloudprint.key, client_secret: Settings.google.cloudprint.secret)
redirect_url = Settings.urls.root + "/cloudprint/callback"
token = client.auth.generate_token(params[:code], redirect_url)

When running the last line is when I get the error.

OK, so I take it that the third line is in a separate controller under the callback action for CloudPrint. Have you confirmed that params[:code] is not nil when you try to generate the token?
Also, I'm not sure what you mean by 'we try to hit the endpoint on Google again.' Generating the refresh token can only be done once -- after the very first time users sign in, when they are redirected back to your application. You have to save the token there and then and reuse it from that point on.

The params[:code] is not nil, I've checked.
So, a User in my application can have multiple Organization, for each Organization I need to allow access to Google Cloud Print, but since they already gave access for, lets say, the first Organization, it doesn't work for the second one.

OK, so are you trying to generate more than one refresh token from the same code? Because that won't work. If that's what you're trying, you should share the refresh token between multiple orgs instead.
If not, I'm afraid I'll need to see a minimal example that I can run on my end to reproduce this bug.

Ok, I'll change the code on my end and try a different approach, thanks 👍

For future reference, since I spent some time figuring this out: If you try to re-auth, it will fail, because you already have received a valid authentication previously. To work around this, append &prompt=consent to the auth_url. E.g.:
client.auth.generate_url(redirect_url) + "&prompt=consent"

We might want to make this default behaviour and/or document it in the readme.


Generated code for swagger2csclient only returns first response

For the code generated by swagger2csclient if you have more than one response only the first response block gets a generated return result_;
For example:
"responses": {
"200": {"description": "OK", "schema": { "$ref": "#/definitions/Booking" } },
"201": {"description": "Created", "schema": { "$ref": "#/definitions/Booking" } },

Generates this for the 200:
if (status_ == "200")
{
	var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
	var result_ = default(Response);
	try
	{
		result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Response>(responseData_);
		return result_;
	}
	catch (System.Exception exception)
	{
		 ...

And this for the 201
if (status_ == "201")
{
	var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
	var result_ = default(Response);
	try
	{
		result_ = Newtonsoft.Json.JsonConvert.DeserializeObject<Response>(responseData_);
	}
	catch (System.Exception exception)
	{
		 ...

_result is returned for 200 while 201 generates an exception.  Is this expected behavior?

We need a mechanism which merges 2xx responses with the same response schema, so that this problem can be avoided...

Thanks,  we can work around by catching any exception that returns a booking:
//catch 201 code and return response data instead of exception
catch (SwaggerException<Booking> e)
{
	return e.Response;
}

Thought it was a matter of generating the missing return result_; for all 2xx responses but I see they could be different return types...

Yes, all such bugs at this stage of the project are not that simple to solve... :-)

I think this is now properly supported (if success responses 2xx have the same type, then they are returned instead of only one and the others thrown). Please test this with the latest CI artifacts.

@RicoSuter Are you sure that its been resolved ?
I got the same issue on .NetCore 6.0 and Swagger 6.2.3.


build: correct the build type for XCTest

Use the correct variable for the build type for XCTest.  We would
previously use the build type specified for dispatch to build XCTest.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

@swift-ci please test and merge


Amplify codegen generates the wrong GraphQL type for _lastChangedAt

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
7.6.14
What operating system are you using?
N/A
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
N/A
Amplify Categories
api
Amplify Commands
codegen
Describe the bug
When using DataStore, the field _lastChangedAt is created with the scalar type AWSTimestamp
_lastChangedAt is defined to be:

A numeric value that stores the timestamp, in epoch milliseconds, when an item was last modified.
https://docs.aws.amazon.com/appsync/latest/devguide/conflict-detection-and-sync.html

AWSTimestamp is defined to be:

An integer value representing the number of seconds before or after 1970-01-01-T00:00Z.
https://docs.aws.amazon.com/appsync/latest/devguide/scalars.html

These do not match. In particular, the AWSTimestamp is meant to be for storing seconds, whereas _lastChangedAt stores milliseconds.
This mismatch against the spec resulted in confusion / lost time for me, as my timestamp management code assumed that AWSTimestamp type fields represent the number of seconds since the unix epoch, as described in AWS Documentation.
Expected behavior
_lastChangedAt should be generated with the scalar type Int or something equivalent.
Reproduction steps
Run amplify codegen
GraphQL schema(s)
No response
Log output
No response
Additional information
No response

Thanks for raising this @ThomasRooney. Could you share the minimum reproduction of the issue?

Added -- essentially this field gets generated on any project with DataStore enabled.
https://github.com/aws-amplify/amplify-cli/blob/aedf45d9237812d71bb8b56164efe0222ad3d534/packages/amplify-graphql-model-transformer/src/graphql-model-transformer.ts#L1130
This doesn't actually break anything, unless the project is doing something custom with these type names. In my case, I interact with my data outside of AppSync interactions, and this type mismatch ended up causing a bunch of code that assumes this field is an AWSTimestamp (instead of a UTC Time) to behave oddly.

Ah, this looks like an issue contained in the CLI repo. We'll transfer this back and someone there should be able to help you.


I67 setup pwa

Change Summary
[Briefly summarise the changes that you made. Just high-level stuff]
Change Form
Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.

[ ] The pull request title has an issue number
[ ] The change works by "Smoke testing" or quick testing
[ ] The change has tests
[ ] The change has documentation

Other Information
[Is there anything in particular in the review that I should be aware of?]
Related Issue

Resolve #67

It was more so to do with the PWA recommended icon sizes. But also have changed the image reference path as suggested.


When i run one task twice by dist_train , the error appears: RuntimeError: Address already in use at /data1/bryanleoliu/pytorch/torch/lib/THD/process_group/General.cpp:17 how to deal with it

@hellock How to assigngpus 2,3 if I have 0,1,2,3 total four gpus?

CUDA_VISIBLE_DEVICES=2,3


[Untested] Modified display of results

Some small modifications to the results screen.
Currently untested (haven't opened VM in a month, so it might be fun getting back on track with that)

Changes

Graphics: 414 (2.778 average in 29 ratings)
to something more like
Graphics: 414th (2.778 average from 29 ratings)

It looks correct to me, it took me a turn of thinking before I understood the k was eliminating 11, 12, 13 on each 100.


Increase verbosity, fix black-hole startup, try to restore LD_LIBRARY_PATH for startup_script

is this tested and working?

Well...
I converted it back to a draft.
black-hole seems to be borked: starting it with black-hole causes an animation on interacting with the launcher but closes it immediately.
The logging and env var migration seems to works.
(I set a fake LD_LIBRARY_PATH, since it is not set natively on my machine)
Test by running:
LD_LIBRARY_PATH=/test nix run --impure

I build it before opening the PR, it did not interact with it much...
My bad.

i'll be honest... it might just be better to get the newer setup i have working where i have a script and CI manually build the appimage in an appdir then package it up.... wanna talk about it in discord?

This PR works!
Though "fixing" black-hole makes it hard to impossible to launch the hexagon-launcher in 2d mode.


Increased Resource Usage

There appears to be an increase in the resources (memory and processor) used when editing and saving sql files. The behavior has been observed with with VS2017 and VSCode. In the case of VS, there is often the need to restart it when the memory increases and causes the machine to slow down.
Is this a known issue? Are there any workarounds?

Can you describe the precise steps to repro?
How much is memory increasing on each save?

I'll try and monitor the changes. Usually, it goes up to over 1.5GB. Will report back with further details.

Been thinking about this a bit more and I'm worried that the problem may be fundamental to it being a generative type provider. This involves generating a dynamic assembly and as far as I know, those can't be garbage collected unless they are created in a separate app domain which is then unloaded. I don't see any app domain creation code in the ProvidedTypes code or in the F# compiler so I suspect the generated assemblies never get freed.
If that's true, then every time you change your migration scripts all the types for your queries get regenerated and added to the memory usage of the compiler service. When you have a lot of SQL queries (which is absolutely an intended use of the type provider in my opinion) the incremental jump on each type-regeneration could be significant.
This has me thinking it may be best to make an early breaking change and switch to an erasing type provider. This would make it impossible to directly reference the generated types from C# or VB.NET, so you'd have to write a mapping layer to create real types for use in other languages, but practically speaking that layer will exist in a lot of apps anyway. Of course another big downside is that it would be a pain to rewrite the type provider to be erasing -- it's not a trivial change.
A significant upside of making this change would be that it would make it much easier to target .NET Core. I think in general erasing type providers are better supported since they are by far the majority in the F# ecosystem. It feels like generative type providers -- while I personally prefer them in concept -- are an afterthought.

The ability to use this from non F# languages is certainly a plus for having it as a regenerative type. However, if having it as erasing type will help fix the memory issues, then I would say that might be the way to go. I have currently used it for four applications (2 large - tsql, 2 small - sqlite) in production and this is not really an issue for the small ones.
The flexibility that Rezoom provides make it trivial to add additional scripts and this slows the process down. Particularly since the db is being designed with the application. Everything is fine however if there are very little changes to the script afterwards. It is not very ideal but certainly not a show stopper.
That said, if converting to erasing will help make the experience better, I think it will be the best way to go with it. I'm unfortunately not sure of how much a change this will be. Also, introducing breaking changes now might be ideal.

I think erasing is the way to go forward. It will be a big change though
and I can't say when I will get around to it.
Thank you so much for your feedback and interest in this project!
On Sat, Sep 23, 2017 at 9:43 PM, rkosafo<EMAIL_ADDRESS>wrote:

The ability to use this from non F# languages is certainly a plus for
having it as a regenerative type. However, if having it as erasing type
will help fix the memory issues, then I would say that might be the way to
go. I have currently used it for four applications (2 large - tsql, 2 small

sqlite) in production and this is not really an issue for the small ones.

The flexibility that Rezoom provides make it trivial to add additional
scripts and this slows the process down. Particularly since the db is being
designed with the application. Everything is fine however if there are very
little changes to the script afterwards. It is not very ideal but certainly
not a show stopper.
That said, if converting to erasing will help make the experience better,
I think it will be the best way to go with it. I'm unfortunately not sure
of how much a change this will be. Also, introducing breaking changes now
might be ideal.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rspeele/Rezoom.SQL/issues/16#issuecomment-331680848,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABj-WnToeVnWYpnNvVPymNaSr2UDXiqhks5slbPFgaJpZM4O8fdb
.


[stable/datadog] chart v2 doesn't checksum of ClusterAgent configMap

Describe the bug
ClusterAgent pods aren't restarted if confd has been changed.
What you expected to happen:
Restart ClusterAgent pods to reload configuration when config has been changed.
How to reproduce it (as minimally and precisely as possible):
clusterAgent:
  confd:
    http_check.yaml: |-
      cluster_check: true
      init_config:
      instances:
        - min_collection_interval: 86400
          name: Example com
          url: https://example.com/
          days_warning: 30
          days_critical: 7
          tags:
            - env:prod

Hi @bubalush
Thank you for reporting this issue. We have included a fix in the pull request #22006.
Cedric


Add an additional check to prevent NRE

Fixed: #78
I'm thinking maybe it can be simplified somehow

Can be further simplified to switching on GetScript(prevAtom) with null and var script.

Now there are duplicate cases.


Fixed hover issue in features page of contact info section. Issue #804

Fixed hover issue in features page of contact info section.

Created PR for issue #804

there are few changes done, like translate option is removed etc. can you check you code again

its is there and I have not removed that. I have  just fixed hover issue on features page.
Kindly merge my pull request. As all the things are there up to date.


tsn.ca/video error - 9c9media extractor

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting that a supported site is broken
[X] I've verified that I'm running yt-dlp version 2023.03.03 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[ ] I've read about sharing account credentials and I'm willing to share it if required

Region
Canada
Provide a description that is worded well enough to be understood
yt-dlp seems to be attempting the download so I'm running under the assumption tsn.ca is supported under the 9c9media extractor but if this assumption is false, my apologies and I'll instead open a new site support request.
Anyway, I run into the error in the next section with any video on tsn.ca/video, whereby it says video is DRM protected, then doesn't download.
Example:
https://www.tsn.ca/video/strength-in-numbers-bruins-get-richer-at-deadline~2639214
https://www.tsn.ca/video/gane-vs-jones-upset-alert-or-fool-s-gold~2639887
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', 'https://www.tsn.ca/video/strength-in-numbers-bruins-get-richer-at-deadline~2639214']
[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.03.03 [934496428] (win_exe)
[debug] Python 3.8.10 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1k  25 Mar 2021)
[debug] exe versions: ffmpeg N-109165-g9f5a9a7499-20221122 (setts), ffprobe N-109165-g9f5a9a7499-20221122
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1782 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>Current Build Hash: e46f99d497641d7bdb9180691e78a9d4a3525b964ed918c1a0a3a66a97b11ae1
yt-dlp is up to date<EMAIL_ADDRESS>[BellMedia] Extracting URL: https://www.tsn.ca/video/strength-in-numbers-bruins-get-richer-at-deadline~2639214
[debug] Using fake IP <IP_ADDRESS> (CA) as X-Forwarded-For
[9c9media] Extracting URL: 9c9media:tsn_web:2639214
[9c9media] 2639214: Downloading JSON metadata
[9c9media] 2639214: Downloading JSON metadata
ERROR: [9c9media] 2639214: This video is DRM protected
  File "yt_dlp\extractor\common.py", line 694, in extract
  File "yt_dlp\extractor\ninecninemedia.py", line 33, in _real_extract
  File "yt_dlp\extractor\common.py", line 1128, in report_drm
  File "yt_dlp\extractor\common.py", line 1172, in raise_no_formats

Do you have any reason to believe the video is actually not DRM protected?

I don't. If it's not something that is possible to bypass, that's fine - feel free to close the issue.

Sadly, bypassing DRM is illegal in most countries and will be supported - https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#is-the-website-primarily-used-for-piracy


Can't get FlexPWM working for imxrt1060

I'm trying the blinky_pwm sample for the teensy4 using the onboard LED. I've added an dt overlay to add the pwm bits which look like:
/ {
	pwmleds {
		compatible = "pwm-leds";
		external_pwm_led: external_pwm_led {
			pwms = <&flexpwm1_pwm1 0>;
		};
	};

	aliases {
		pwm-led0 = &external_pwm_led;
	};
};

&flexpwm1_pwm1 {
	status = "okay";
};

But i'm getting the following error on the console:
*** Booting Zephyr OS build v2.7.0-rc2-54-g2160e0fc364d  ***
PWM-based blinky
Calibrating for channel 0...
[00:00:00.009,000] <err> pwm_mcux: Too long period (1171875), adjust pwm prescaler!
[00:00:00.017,000] <err> pwm_mcux: Too long period (585937), adjust pwm prescaler!
[00:00:00.026,000] <err> pwm_mcux: Too long period (292968), adjust pwm prescaler!
[00:00:00.034,000] <err> pwm_mcux: Too long period (146484), adjust pwm prescaler!
[00:00:00.042,000] <err> pwm_mcux: Too long period (73242), adjust pwm prescaler!
Error: PWM device does not support a period at least 62500

@ric96 I'm assuming you're using an external pin and LED for the teensy board, as the onboard LED is routed to GPIO_B0_03, which does not have a MUX option for the PWM module:

In that case, you will need to add a function call to IOMUXC_SetPinConfig to select the correct flexPWM module, based on what you define in your dts overlay.
Regardless of your specific setup for PWM on the teensy, the blinky PWM sample does not work on RT series SOCs (I reproduced the issue on an RT1064 EVK), because the pwm sample does not attempt to calibrate PWM with a short enough period. The RT series flexPWM module's source clock is too fast to support PWM at any frequency lower than roughly 18 Hz, and the blinky sample never tries to set up PWM with a frequency that is this high. The linked pull request increases the maximum frequency the sample will try to use from 16 Hz to 32 Hz, allowing it to run.


Fix detector sync

Before you submit this PR: make sure to put all operations-related information in a wiki-note, a PR should be about code and is publicly accessible
What does the code in this PR do / what does it improve?
PR which fixes the time synchronization between TPC and neutron-veto.

Fixes a float64 to int64 conversion bug
Changes different delay settings for the detector offset plugin.

See the following cutax PR for more information.

Coverage increased (+0.02%) to 93.918% when pulling d88491f6298814a7e7edcf430a089b87d4562d29 on fix_detector_sync into a8402c46053105ad5c60b38ae91ef9b8a1571aa7 on master.