Issue a custom error message when trying to assign constraint type to generic type parameter

TypeScript Version: master
Search Terms: generic constrained type parameter error
Code
People are regularly confused why code like this doesn't work:
function fn1<T extends string>(x: T): T {
  return "hello world!";
}

function fn2<T extends HTMLElement>(obj: T): T[] {
  return [obj, new HTMLDialogElement()];
}

function fn3<T extends boolean>(obj: T = false) {
}

Actual behavior: Unelaborated error like "Can't assign false to T"
Expected behavior:
If the source type is assignable to the constraint of a type parameter, we should issue a more specific error that attempts to explain the situation:
🚲 🏠

Type "false" is not assignable to type "T"
  "false" is assignable to the constraint type "boolean", but "T" could be a different more-specific type during a call

Playground Link: Link

more-specific type during an invocation?

Agree with @jack-williams since this can happen in a class too. I think the following might cut to the chase though:
'{0}' is assignable to the constraint of type '{1}', but '{1}' could be instantiated with a different type.

Also, when not assignable, or when there's an implicit constraint, but the RHS is not instantiable, I could see an elaboraron like
Concrete types are never assignable to uninstantiated types.

Or something like that.

I think the problem with could be instantiated with a different type is that the user reaction would probably be "You mean the constraint doesn't do anything?".
What about:
'{0}' is assignable to the constraint of type '{1}', but '{0}' could be instantiated with a different subtype of `{1}`.

That's a good point @RyanCavanaugh. I'm not sure if I've substituted in the placeholders correctly; is this right?
'false' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of 'boolean'.

In that instance I would probably make it explicit that boolean is the constraint, as I feel it pops out of nowhere abit. So:
'false' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'boolean'.

'false' is assignable to the constraint of type 'T', but 'T' could be instantiated with a different subtype of constraint 'boolean'.

❤ !

@DanielRosenwasser Can I work on this issue?

Since you're just specializing the error, target.flags & TypeFlags.TypeVariable is probably a good first approximation. I haven't been deep in the codebase in a while, but others reviewing might be able to help you iterate on that.

@a-tarasyuk I think structuredTypeRelatedTois probably where you want to look.

@JoshuaKGoldberg your commit there is looking pretty nice; is there an associated PR?

Oh hey I forgot about this thread! Thanks for the reminder. Will send now and fix up merge conflicts soon.
Maybe "Although " should be prepended to the front of the message to make it more clear it's useful?

Is it relevant to include some sort of "you should consider doing X, Y or Z to resolve this problem" ?
It could speed up the process of finding a solution for new comers, as it is not really easy to understand, and there are not many available resources online,
I managed to found this : https://stackoverflow.com/a/56701587/6790372
Could you at least modify your first post in this issue, to explain why each case does not work, and what could be done instead ?

I find this error message undecipherable.  I have lots of this type of error message:

'A' is assignable to the constraint of type 'B', but 'B' could be instantiated with a different subtype of constraint '{}'.

The last placeholder is always, the {}.  I have no idea what this means or what the fix is.

@dagda feel free to help us iterate with that on https://github.com/microsoft/TypeScript/issues/33436

I have a question related to this error. I'm trying to implement "Slaying UI antipattern in...", but I'd like to have a separate state for pending but when we already have some data. It gives an error because I use two unrelated generic parameters. Could you help me a bit with how can I constrain Data param to be the same on both success and pendingWithData?
http://www.typescriptlang.org/play/#code/JYWwDg9gTgLgBAbzgEQKarAJVQQwCYQB2ANgJ4A0cAqoVLgMYAWOARsagMI4DOqAolCjQ4AXzgAzISDgAiGNwC0qbr0IxgOYtxkBuAFChIsRNhz0YAOQh5UYyRGkByOmZiO9e1AA8j8VIQBXaWwQCBhUZBwYHABlaJgA7kQ9ODgASUJgdU1gAC9UPDgAXlkMrI1iPIKZchS4AAV-PGBCAHNi2UbCZraauq6e1oAJHAA3CKicDpkBluGxiei+1IAxHGBiALpptY2t1GW4GID6emUkkplj0-OZPREPb184GFIwVHTM7Mr8wpKkFwEEikODceKJABccBCYUWsXB3AAdGVvlVCiJ9E9oPBXu8Gk05h0EHVAUQyKCEVCYeFItE4lFEojZm19BjPD5sS83h9mfNxrScAAeAUAPiJJNwQPJYIZ3CpqFCNMm9ISSN5I35k30qVJwLgeEmUIFrMxHOMuI+u02dEFAiEUDF-wl+DJIJlqvlirhKsZVv22rguvJqEE0ChdugJvZzwtRxOZxUwsmjuSOslropss9sIFPqR1wT3ADQZBBuiRq191NMe50IVOcmSeilAjUA6YKgc0ddQAPp9yjlfr38d05sP1QsBU2cCLh36ba3Z6k+wXztORfpo5zxAFCOZgEQ4C0Bz8CtOW6G2yUO12ABQASiN6Cw6eBgrq1Lh57gi70YuJaYJFAhCIJmHp1l6uYIsiXwVGioisluxg7nu6iHu8o5tN+rbtjAnZtCKD7Zkq0TYZe-4SkBIFIO6kIQQ2dLQbyCH3I8ZrwCh+7oQSbQal+AoXvauH4a0hF1GWOAVtEeiPvRJFCgJP7kamgaoFRoG0XKcnekxPF8nClASSxDxIRxu5cSB4jrNaqBkUJ154XedQhva4aXjJxH8ZMgnQBRgFbNRYF0Z+UGyoi86oJQLnCGyDxYsh5loSB3Dxmuik4Q5IliakElSTgtSpBhgxQiwEAQOwOCEB52lTulykAap6k0ZSNXKtBq4qIZkzGWxzycUlEjlXgdnCJlcyUNgKXEPAJSmOYVg2NloKpSoUK3rlKDeXARVzAA-CVZUVYQ97FGKk0BNNBVHrBg4FGtJ1FGdygXTAV07W092nXWU2vXUVl7HQa3RVAbn2g9T0-TJKl0Op62Gq1pF1faIqyed01fQ1qTcAA7lkTBwHD0SIppJ2Y6kcD0DwHwhW1YUonBvwQnU5PkzDAXXSeaIPgGLOU7wCPwmFvJMyzLNs8B216dzzPk3z1P1vJeZMnpfECiLov+RLKU3CohP5S8UABKg9487LVMC0rEXqxr4uWdZ+x64iwMmzLqRyxb7UrXKrus2p7Pa4WjsSZQVlaMbps5agVkvdboswIwQjY3AhCoEnNAuEwrDsFwvCtnrLssw8qSxb126JQeIF0F6ACyOBgIKaOvZtzZKcjt5-eZa0bQK4PfS9V0bTTiNbb+qMK1+jc+Q6KnAOIBMScTCLFEUs3j6FqqIh13CkzLtvLTr3C3pxQeTPeIeaLwBeiHAqBh0ec+O5py+r5BtMbxOmrRDvYt+1rXtH+ZE+X9KB4SNlfMQt9+Zkz3hJAMDwTLxTMqhCucAQA4FICwCez1LrN31ouduWNb6oHMGGee8Me5fUnuJKOOAXoADVNBG3lD9Ae8Mh4KRHuRaqjcZ4PwXk-FeL8GKCw3lvb+vt1K8HYCQqAQCcDgJvnfaBv8QI2GjtNBhmxUBwNYkAA

any workaround?

ARTICLE ABOUT THIS ERROR MESSAGE
I wrote a text decomposing and explaining each part of this error message. Hope the text can carry you up to the point.

@RyanCavanaugh says:

People are regularly confused why code like this doesn't work:
function fn1<T extends string>(x: T): T {
 return "hello world!";
}

function fn2<T extends HTMLElement>(obj: T): T[] {
 return [obj, new HTMLDialogElement()];
}

function fn3<T extends boolean>(obj: T = false) {
}

So, did confused reduce after https://github.com/microsoft/TypeScript/pull/30394? I highly doubt it.
Please describe this case in the documentation. At the moment you can find a sea of questions about this.

{1} is assignable to the constraint of type {2}, but {2} could be instantiated with a different subtype of constraint 'any'
Oh, really? Can you give me an example of how that's possible?

I'm bumping into this a lot recently, and I'm not quite sure how to solve it. Currently trying to do something on top of RESTDataSource.didReceiveResponse  from apollo-server:
class SomethingOutsideOfOurControl {
    didReceiveResponse<TResult = any>(): Promise<TResult> {
        return Promise.resolve({}) as Promise<TResult>
    }
}

class Implementation extends SomethingOutsideOfOurControl {
    // Property 'didReceiveResponse' in type 'Implementation' is not assignable to the same property in base type 'SomethingOutsideOfOurControl'.
    //   Type '<T>() => Promise<{ data: any; somethingElse: boolean; }>' is not assignable to type '<TResult = any>() => Promise<TResult>'.
    //     Type 'Promise<{ data: any; somethingElse: boolean; }>' is not assignable to type 'Promise<TResult>'.
    //       Type '{ data: any; somethingElse: boolean; }' is not assignable to type 'TResult'.
    //         'TResult' could be instantiated with an arbitrary type which could be unrelated to '{ data: any; somethingElse: boolean; }'.(2416)
    async didReceiveResponse() {
        const data = await super.didReceiveResponse()
        return {
            data,
            somethingElse: true,
        }
    }
}

What would be the correct way of going about things? Seems like I have to throw in a return ... as any in Implementation.didReceiveResponse

My 2cents on this matter is that TS seems to punish you for using default params. Makes sense to me for this to be a warning instead.

@tcodes0 I agree, there seems to be a TypeScript penalty prohibiting use of default values on parameters used to infer generic types (that e.g. then are used to determine a return type, or which are passed through as the generic type parameter to a called function).


Shuttle console TODO

Make the viewport rectangular and use a grid instead. The lines can also be some arbitrary distance (e.g. 50 metres) that changes as you zoom.
Use tickboxes for docking ports instead to toggle autodock so you can do multiple at once (if you select a camera it should turn that one on).
Have docking actually use cameras
Allow zooming out in docking mode

Make the viewport rectangular

Why rectangular? Won't it introduce issues like your effective mass scan range being depending on your angle relative to target? Spinning ship to search surroundings does not sound good.

It will be irrelevant when ship labels are still shown outside of the viewport range and I also do not feel like coding a shader to make the docking camera a circle.


The headlines are not centered and sorces are undefined

Heii there,
i have this code:
{
module: "MMM-NewsAPI",
header: "Nachrichten",
position: "bottom_bar",
config: {
apiKey: "xxx",
type: "horizontal",
choice: "everything",
pageSize: 10,
sortBy: "relevance",
drawInterval: 100030,
templateFile: "template.html",
fetchInterval: 100060*60,
query: {
country: "de",
category: "general",
language: "de",
domains: "tagesschau.de"
}
}
},

and I have the following problem. The headlines of the news are unfortunately not centered and the message "undefined" appears next to the domains you want to specify (separated with | ). I don't know how to fix this and I hope you can help me.
Thank you very much in advance.

Hi.  Thank you for your issue.
The Headline is centered to the bottom bar as that is the space it lives in. It is not centered to the news text that you see. Same applies to the news content. If I have to change this I have to change the layout and that would require a bit of testing. May look at it over the weekend as well.
Undefined is unfortunately returned by the API itself. Will see if I can replace it with just a blank space. Will have a look when I have some time over the weekend to fix that.

Hi @rebeccabrandt1101
I have managed to fix the issue of "UNDEFINED". You an do a pull and restart your mirror.
The second issue of the alignment of the text I will take a look at when I have more time. It requires reworking the template and content etc. which will take time.

Heii @mumblebaj
Thank you very much for your help.
The problem with the Undefined has been fixed. Hopefully it will also work with the text alignment.
But you've already helped me a lot with that


More flexible saving system

New functions !
dialog_node
The dialog_node has now two new functions:
get_current_state_info()
returns a dict with info such as

current timeline and event
current background
current background music
current portraits

resume_state_from_info(state_info)

that loads in all of the above and starts the timeline

These should NOT be used directly.
Dialogic Class
Instead the DIALOGIC CLASS has two new functions too (actually more):
save_current_state(save_name)
saves the state (of the last added dialog node) and the current definitions to the save with the name save name (replaces or creates the save folder)
resume_from_save(save_name, dialog_scene_path, debug_mode, use_canvas_instead)
is similar to start() but get's all info from the given save folder and also loads the definitions
there is also a get_save_names_array() function in the DialogicClass that is usefull for creating save/load menus.
I have yet to test all the problems that come with this.

Been wondering if changing how definitions are stored (as a Dictionary) and serialised (avoiding the restrictions with JSON) would make some of this more flexible, but at what cost.

This is old, so I restarted and there is a new pull request (a draft too, but largely updated).


Tests for PATCH endpoints do not run test steps

Describe the bug
Tests for PATCH endpoints do not run test steps. (Or so it appears.)
We have a set of tests that contain GET, POST and PATCH operations. All of these automated tests are green when we run them against a Microcks instance started via Docker Compose. If we instead run them against a Microcks instance running in testcontainers, the PATCH operations fail with:
[
    {
      "success": false,
      "elapsedTime": -1,
      "operationName": "PATCH /jobs/{jobId}/executions",
      "testStepResults": []
    }
  ]

I have also duplicated this by spinning up a Microcks server that is long running (i.e., not spun up by jest), and then used the Test API via curl, e.g., the following, the with same result (green against Docker Compose server, red against testcontainers server):
export TEST_RESULT_ID=$(curl $MICROCKS_URL/api/tests -d '{
  "serviceId": "nRF Cloud Device Job Service:0.0.1",
  "runnerType": "OPEN_API_SCHEMA",
  "testEndpoint": "'$TEST_ENDPOINT'",
  "timeout": 10000,
  "operationsHeaders": {"globals":[{"name":"x-auth-context","values":"eyJ0ZWFtSWQiOiI5NGJlZTE3MC0xN2IzLTQxN2ItOTQxMS05ZDUzMDI0YzBlMzUiLCJpc05vcmRpY2FuVGVhbSI6ZmFsc2UsInNvdXJjZUFwaVR5cGUiOiJyZXN0IiwicGxhblR5cGUiOiJQcm8iLCJjcmVhdGVkQXQiOiIyMDI0LTA2LTI3VDIzOjE1OjQ0LjY0M1oiLCJhdXRoZW50aWNhdGlvblRva2VuVHlwZSI6ImFwaV9rZXkiLCJjb3JyZWxhdGlvbklkIjoiYjE1MmFhNjktZjk4NS00MWQ5LTlmMjQtMjY0MDA5NTMzZDU5IiwicmVxdWVzdGVySWQiOiIyZDk3ZDc0Ny1hZjM3LTQ4NTgtYjQ4OS0xMzI4ZWNlZjhkMDciLCJyZXF1ZXN0ZXJUeXBlIjoiVGVhbU1lbWJlciIsInVzZXJBY2NvdW50SWQiOiI1YTg3NmJmNy1mMDIxLTQyYTYtOTNiMC02YjhhY2VmOTgxOTIiLCJyb2xlIjoiQWRtaW4iLCJkZXZpY2VHcm91cHMiOltdfQ=="}]},
  "filteredOperations": [
    "PATCH /jobs/{jobId}/executions"
  ]
}' -H "Content-Type: application/json" | jq -r '.id')

Expected behavior
All operations test the same, whether run against a Docker Compose-based server or testcontainers-based.
Actual behavior
See above.
How to Reproduce?
Not sure about the easiest way to test this, but here are two endpoints involved in the tests:
    "/jobs/{jobId}/executions": {
      "get": {
        "operationId": "listJobExecutions",
        "description": "Get a list of job executions for a device job\n",
        "tags": [
          "Job execution"
        ],
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Uuid"
            },
            "examples": {
              "1145cf7d-500f-4147-86eb-6a3b840c9d6a": {
                "value": "1145cf7d-500f-4147-86eb-6a3b840c9d6a"
              }
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/JobExecutionStatus"
            },
            "examples": {
              "inProgress": {
                "value": "IN_PROGRESS"
              }
            }
          },
          {
            "name": "pageLimit",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PageLimit"
            },
            "examples": {
              "limit100": {
                "value": 100
              }
            }
          },
          {
            "name": "pageNextToken",
            "in": "query",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/PageToken"
            },
            "examples": {
              "nextTokenExample": {
                "value": "def456eubdkw9038kdd93l"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobExecutionCollection"
                },
                "examples": {
                  "1145cf7d-500f-4147-86eb-6a3b840c9d6a": {
                    "description": "Example response for getting a list of job executions for jobId 1145cf7d-500f-4147-86eb-6a3b840c9d6a.",
                    "value": {
                      "items": [
                        {
                          "id": "52eb33a0-101b-4034-a515-dfbf43be754e",
                          "jobId": "1145cf7d-500f-4147-86eb-6a3b840c9d6a",
                          "deviceInfo": {
                            "deviceId": "d44ff5ee-c3eb-4ea7-ab14-c238793810a9"
                          },
                          "status": "IN_PROGRESS",
                          "retryable": true,
                          "createdAt": "2024-04-16T12:45:00Z"
                        }
                      ],
                      "total": 1,
                      "pageNextToken": "def456"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "bulkUpdateJobExecutionStatus",
        "description": "This operation only affects job executions that are in the following states: `QUEUED`, `TIMED_OUT`, `FAILED`.\nIf no device IDs are specified in the request body, all job executions will be updated.\n",
        "parameters": [
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/Uuid"
            },
            "examples": {
              "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca": {
                "value": "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca"
              }
            }
          }
        ],
        "tags": [
          "Job execution"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/merge-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/BulkUpdateJobExecutionStatusRequestBody"
              },
              "examples": {
                "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca": {
                  "value": {
                    "status": "CANCELED",
                    "deviceIds": [
                      "device1",
                      "device2"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Request to bulk update job execution statuses was accepted",
            "x-microcks-refs": [
              "66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca"
            ]
          }
        }
      }
    },

Aside from the two different HTTP methods, could the issue be related to the use of application/merge-patch+json for PATCH operations?
I see nothing in the Microcks testcontainer logs.
Microcks version or git rev
No response
Install method (docker-compose, helm chart, operator, docker-desktop extension,...)
No response
Additional information
No response

Hi @savvyintegrations,
I did a quick test and cannot reproduce it. I think I'd need further information to investigate on this...
What I've done so far:

Put your operations description into an OpenAPI file: nordic.json
Start a local Microcks instance using docker run -p 8585:8080 -p 8686:9090 -it --rm quay.io/microcks/microcks-uber:1.10.0-native and load the above OpenAPI file in it. This will be used as the backend under test
Test the endpoint itself from this instance to see if test is passing. I'm using http://host.docker.internal:8585/rest/Nordic+API/2.0.0 as the URL so that the container can reach itself. Go this result:

Right a Jest test that launches another instance of Microcks (using the latest version of the lib so poped-up container version is 1.10.0 as well) and launch a test on my backend running on port 8585.

import * as path from "path";

import { TestContainers } from "testcontainers";
import { MicrocksContainer, TestRequest, TestRunnerType } from "./microcks-container";

describe("NordicAPI", () => {
  jest.setTimeout(180_000);

  const resourcesDir = path.resolve(__dirname, "..", "test-resources");

  // start and contract test {
  it("should start, load artifacts and contract tets mock", async () => {
    await TestContainers.exposeHostPorts(8585);

    const container = await new MicrocksContainer().start();

    await container.importAsMainArtifact(path.resolve(resourcesDir, "nordic.json"));

    var testRequest: TestRequest = {
      serviceId: "Nordic API:2.0.0",
      runnerType: TestRunnerType.OPEN_API_SCHEMA,
      testEndpoint: "http://host.testcontainers.internal:8585/rest/Nordic+API/2.0.0",
      timeout: 2000,
      filteredOperations: [
        "PATCH /jobs/{jobId}/executions"
      ]
    }

    var testResult = await container.testEndpoint(testRequest);

    console.log('testResult: ' + JSON.stringify(testResult));
    expect(testResult.success).toBe(true);
  });
});

Got the final result where test is a success:
$ node 'node_modules/.bin/jest' '/Users/laurent/Development/github/microcks-testcontainers-node/src/nordic.test.ts' -t 'NordicAPI should start, load artifacts and contract tets mock'
=== OUTPUT ===
  console.log
    testResult: {"id":"66b9c697d1d67157accb05bd","version":2,"testNumber":1,"testDate":1723451031074,"testedEndpoint":"http://host.testcontainers.internal:8585/rest/Nordic+API/2.0.0","serviceId":"66b9c696d1d67157accb05b6","timeout":2000,"elapsedTime":46,"success":true,"inProgress":false,"runnerType":"OPEN_API_SCHEMA","testCaseResults":[{"success":true,"elapsedTime":46,"operationName":"PATCH /jobs/{jobId}/executions","testStepResults":[{"success":true,"elapsedTime":46,"requestName":"66a2afc3-ab5b-4437-ae7c-0bf0d79c72ca","message":""}]}]}

      at Object.<anonymous> (src/nordic.test.ts:33:13)

 PASS  src/nordic.test.ts (7.733 s)
  NordicAPI
    ✓ should start, load artifacts and contract tets mock (6957 ms)

Test Suites: 1 passed, 1 total
Tests:       1 passed, 1 total
Snapshots:   0 total
Time:        7.784 s

Can you help to confirm I understood the logic, and by providing additional information like versions and distros of the different Microcks instances?

Thank you very for taking valuable time to investigate this, and so thoroughly. I will look into this further at our end ASAP and get back with you. For now I think it's safe to say that we are doing something wrong.

It appears to have been our error. Many thanks again for your prompt attention, and apologies for the time waste.


Higher order derivatives return wrong results

When trying to compute higher order derivatives of a very simple function:
def inv(x):
    return 1/X

print(grad(grad(grad(grad(grad(grad(inv))))))(4.))

It prints -1.9560547 instead of the correct 0.0439453125.
It starts returning incorrect results at 4. It still gets it right with 3.999

Just a quick thought for now, though we should look at this more: it seems to be a 32bit numerical tolerance thing because enabling 64bit computation solves it:
from jax import grad
from jax import config
config.update("jax_enable_x64", True)

def inv(x):
  return 1/x

f = grad(grad(grad(grad(grad(inv)))))  # one fewer `grad`!

print((f(4. + 1e-5) - f(4. - 1e-5)) / (2 * 1e-5))
print(grad(f)(4.))

0.04394531249885674
0.0439453125

If we look at what's going on, this appears to be a case where the higher order gradient calculation is unstable and also rather inefficient:
>>> make_jaxpr(grad(grad(grad(lambda x: 1/x))))(4.)
{ lambda  ; a.
  let b = mul a a
      c = mul b b
      d = div -1.0 c
      e = mul d 1.0
      f = neg e
      g = mul 1.0 f
      h = mul 1.0 f
      i = add_any g h
      j = mul 1.0 a
      k = mul 1.0 a
      l = add_any j k
      m = neg l
      n = mul m 1.0
      o = mul c c
      p = div n o
      q = mul p -1.0
      r = neg q
      s = mul r b
      t = mul r b
      u = add_any s t
      v = mul u a
      w = add_any i v
      x = mul u a
      y = add_any w x
  in (y,) }

The source of the issue is that grad(inv) turns into -1/(x*x) instead of -1/x**2:
>>> make_jaxpr(grad(lambda x: 1/x))(4.)
{ lambda  ; a.
  let b = mul a a
      c = div 1.0 b
      d = mul c 1.0
      e = neg d
  in (e,) }
>>> make_jaxpr(grad(lambda x: x**-1))(4.)
{ lambda  ; a.
  let b = pow a -2.0
      c = mul -1.0 b
      d = mul 1.0 c
  in (d,) }

The later is much more efficient for higher order differentiation:
>>> make_jaxpr(grad(grad(grad(lambda x: x**-1))))(4.)
{ lambda  ; a.
  let b = pow a -4.0
      c = mul -3.0 b
      d = mul 2.0 c
  in (d,) }

It seems like we should consider defining the gradient derivative rule for division in terms of pow rather than square (which should perhaps also be written in terms of pow). The pow primitive in turn would also probably need to be rewritten to include special case logic for efficient integer powers.

Seems this may be related to https://github.com/google/jax/pull/1388?

https://github.com/google/jax/pull/3066 is @hawkinsp's fix that adding special logic for integer scalars to jax.numpy.power.
Peter notes:

I have somewhat mixed feelings about this, given its behavior isn't invariant to jit, but it does seem likely to improve cases like x ** 2 if pow has low precision.

So I guess the ideal fix might be to upstream some of this into XLA's pow.

It also be remiss not to mention jax.experimental.jet if you care about efficient high order differentiation. I'm sure jet handles this more efficiently than grad.

@shoyer I think we can get much the same effect by having a separate integer_power primitive at the lax level?

Yes, an integer_power primitive could work well. Possibly restricted to statically known powers?


Minecraft freezes when reloading textures and missing textures

Describe the bug
I have this problem when I just launch Forge version 1.16.1-32.0.108 with optifine, inspirations and mantel it freezes every time I try any sorts of reloading the textures (shaders,recourcepack,reloading textures manually etc.) and the texture of cauldrons different enchantet books and fireworks for example are missing.  Test by running the game with minimal mods.

Your crash says clearly Optifine is to blame. I do not support Optifine as no matter what I do, no matter how simple, it breaks my stuff. They do that by outright replacing major forge systems. Specifically, Optifine seems to have broken the system Forge uses to add mod resources. Obviously this will not work, and there is nothing I can do to fix that.


Open mongodb connection at start of function

currently we get long duration because the connection is only opened after everything is scraped. We could make it a lot faster if we 'preheat' the mongodb connection.

Didn't notice a performance increase, refactored async code and that did increase performance.


Failing to register with dtls support

Hi,
I've done every step that is mentioned in the readme file, but the lwm2mclient in wakaama/example/client folder keeps failing in the registration step.
I've tested it with the online leshan server instance. I have carefully declared a PSK security key with this information :

Client endpoint: rpi
Mode : PSK
Psk identity: rpi
Psk secret: 1234

When I execute the program as mentionned below, it fails with a 0xA3 error. So I've pulled out wireshark to see what's going on the network. And all I can see is a single encrypted CoAP packet going out.
Any idea on what the problem is ?
Thanks

./lwm2mclient -h leshan.eclipse.org -4 -n rpi -i rpi -s 1234
Trying to bind LWM2M Client to port 56830
LWM2M Client "rpi" started on port 56830
-> State: STATE_REGISTERING
-> State: STATE_REGISTERING
-> State: STATE_REGISTERING
-> State: STATE_REGISTERING
-> State: STATE_REGISTERING
-> State: STATE_REGISTERING
-> State: STATE_BOOTSTRAP_REQUIRED
lwm2m_step() failed: 0xA3

My bad, I forgot to add the port number. I should have launched it this way :
./lwm2mclient -h leshan.eclipse.org -p 5684 -4 -n rpi -i rpi -s 1234

Thank you for your information.!!


dependences in readme

Please, add to the README file information about software dependencies for this script. For example, about dsh.
Thanks.

Sure. Thanks! I'll do it as soon as possible.


Fedora-review can run on Copr builds seamlessly

fedora-review is the tool to run on newly added packages into Fedora Linux.
Though not many folks run it again after the package is part of Fedora. Let's provide fedora-review results to Packit users easily.
Details:
http://frostyx.cz/posts/running-fedora-review-after-copr-build
https://pagure.io/FedoraReview/pull-request/463

František to think about and probably close it. We don't see much benefit for the sure compared to the required setup.

After discussing with Jakub, the number of projects in review is interestingly high and we might help here. František plans to bring relevant people together and try to think about some improvements. We most probably won't have any action items soon. I am closing this issue and will create more specific ones when/if needed.


Dangling reference to DS version

The ntrboot guide has a paragraph:

Flashing ntrboot (NDS)
This method requires temporary access to a Nintendo DS or Nintendo DS Lite that is compatible with your flashcart. This method uses the flashcart to run the ntrboot flasher .nds file on your NDS. This means that your flashcart must support launching .nds files on your NDS’s version. See the flashcart table above for more information.

No such information is in the flashcart table above (and all flashcarts support launching .nds files on your NDS).

This is still a problem.  The above change fixes ir in https://3ds.guide/flashing-ntrboot-(nds) but it's still a problem in https://3ds.guide/ntrboot

https://github.com/Plailect/Guide/commit/4940c712e819bb835a16717ba55f0f58d8eeb03c


Implementation of secure boot

This affects UKI and non-uki.
UKI is basically done. Non-uki is ongoing

Blocked by https://github.com/kairos-io/kairos/issues/868

The merged PR fixes secure boot for all non-uki flavors except Alpine.
Let's keep this open for fix secure boot with uki. Despite what the description above says, secureboot with uki doesn't work (at least without importing any keys to UEFI). If it's working by importing our keys, then let's close this after trying it out first.

I added the "documentation" label and I'm keeping this open until this is documented.

Needs a secureboot part on docs where we explain how we are using the upstream artifacts for secureboot
Needs a UKI section. Like a full section explaining the whole thing.

UKI section of this is being done as part of https://github.com/kairos-io/kairos-docs/pull/133

secureboot docs at https://github.com/kairos-io/kairos-docs/pull/135


Crash: TypeError: Cannot read property 'make' of undefined

(Moved from https://github.com/rtfeldman/node-elm-test/issues/3)
I have a simple test in my project that crashes node-elm-test.  To reproduce, do
git clone https://github.com/akeeton/nickel-havana.git
cd nickel-havana
git reset --hard f62db33
cd test
elm-test src/TestMyList.elm

The output I get is
Compiling src/TestMyList.elm
Some new packages are needed. Here is the upgrade plan.

  Install:
    deadfoxygrandpa/Elm-Test 1.0.4
    elm-lang/core 2.1.0
    maxsnew/IO 1.0.1

Do you approve of this plan? (y/n)
y
Downloading deadfoxygrandpa/Elm-Test
Downloading elm-lang/core
Downloading maxsnew/IO
Packages configured successfully!
Success! Compiled 41 modules.
Successfully generated /tmp/elm_test_11571-14917-b21vna

Successfully compiled src/TestMyList.elm
Running tests...
Cannot read property 'make' of undefined
[stdin]:8147
				throw error;
				      ^
TypeError: Cannot read property 'make' of undefined
    at init ([stdin]:8134:20)
    at Object.Elm.worker ([stdin]:8032:11)
    at [stdin]:11615:22
    at [stdin]:11653:3
    at Object.exports.runInThisContext (vm.js:74:17)
    at Object.<anonymous> ([stdin]-wrapper:6:22)
    at Module._compile (module.js:460:26)
    at evalScript (node.js:431:25)
    at Socket.<anonymous> (node.js:164:11)
    at Socket.emit (events.js:129:20)

As a control, I have added your example test.
elm-test src/NodeTestExampleTest.elm

It works as expected:
Compiling src/NodeTestExampleTest.elm
Success! Compiled 1 modules.
Successfully generated /tmp/elm_test_11571-15007-1a36lod

Successfully compiled src/NodeTestExampleTest.elm
Running tests...
  1 suites run, containing 3 tests
  0 suites and 2 tests passed
  1 suites and 1 tests failed

Test Suite: A Test Suite: FAILED
  Addition: passed.
  String.left: passed.
  This test should fail: FAILED. not True

Can you try this again with the new node-elm-test version 0.16.0-beta? Or wait until @rtfeldman releases it publicly.


merge package from arlac77/npm-package-template

package.json

chore(package<EMAIL_ADDRESS>chore(scripts): cover@#overwrite c8 --temp-directory build/coverage ava && c8 report -r lcov --temp-directory build/coverage
chore(package): add main from template
chore(package): add nyc from template
docs(package): remove keyword null
chore(package): set $.ava.require='esm' as in template
chore(package): set $.ava.files='tests/-test.js,tests/-test.mjs' as in template
chore(package): set $.ava.extensions='js,mjs' as in template
chore(package): remove unknown value for main ({{main}})

Coverage remained the same at 53.059% when pulling 85fee45672572dc2ade0f50c4ff98968824f52d2 on template-sync-1 into 51d8886eb95f777b03b2cb02c37c0a0f66e00dc5 on master.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Edx Oauth2 provider support

I've added Oauth2 provider support, for the popular Edx learning platform. Would you be interested in looking at a pull request? :) Or is this perhaps out of the spirit of what you want to provide out of the box?

You mean auth code flow for Edx? That would probably be fine to add.

Yes :) I'll submit a pull request as soon as I have written some tests.


Fixes to work on Beta5.  Tested with 1.0.0-beta5-11781

Fixes problem noted occurring due to // in project.json, and then fixed caching APIs to work on latest.

Ping?

@MattGal - You might @mention the specific people who you would like to review your change. That usually works for me.

I @ctually tried but I can't resolve any of their names when I type @ :) I'll ask @xinshiMSFT ...

My apologies for the delayed response.  Code looks fine.  Thanks.


Proposal containing too many messages will cause an out of gas error

2022-06-06_Audit_Report_-_DAO_DAO_v0.1.pdf
Check issue 8 of the attached audit.

I'm inclined to mark this as do-not-fix. We could develop some heuristic around the number of messages that are normally executable, but it is doomed to be problematic as any of those messages could do something with a smart contract entirely out of our control.


getting an issue while using secrets object with deployment objects

I'm getting an issue while using secrets object with deployment objects.
repo >>
https://github.com/anup1384/arogcd-vault-demo.git

ComparisonError
rpc error: code = Unknown desc = Manifest generation error (cached): argocd-vault-plugin generate ./ failed exit status 1: Error: Error making API request. URL: GET http://vault.abc.com/v1/deployment Code: 403. Errors: * permission denied Usage: argocd-vault generate  [flags] Flags: -c, --config-path string path to a file containing Vault configuration (YAML, JSON, envfile) to use -h, --help help for generate -s, --secret-name string name of a Kubernetes Secret containing Vault configuration data in the argocd namespace of your ArgoCD host (Only available when used in ArgoCD) Error making API request. URL: GET http://vault.abc.com/v1/deployment Code: 403. Errors: * permission denied
<<<

Hi @anup1384, which version of the plugin are you using?

@werne2j  plugin version is v0.2.2

@anup1384 Please upgrade to at least 0.4.0. This is an issue that was solved in https://github.com/IBM/argocd-vault-plugin/pull/62

I have used 0.4.0 now and getting an error

Unable to create application: application spec is invalid: InvalidSpecError: Unable to generate manifests in .: rpc error: code = Unknown desc = argocd-vault-plugin generate ./ failed exit status 1: Error: Could not get data from Vault, check that kv-v2 is the correct engine Usage: argocd-vault-plugin generate  [flags] Flags: -c, --config-path string path to a file containing Vault configuration (YAML, JSON, envfile) to use -h, --help help for generate -s, --secret-name string name of a Kubernetes Secret containing Vault configuration data in the argocd namespace of your ArgoCD host (Only available when used in ArgoCD) Could not get data from Vault, check that kv-v2 is the correct engine
<<<

@anup1384 If you look at the error, there is one of two things that could be happening..

You are using Kv 1 as the Vault secret engine and if that is the case you will either need to set the KV_VERSION environment variable or the kv_version annotation to be 1. https://github.com/IBM/argocd-vault-plugin#full-list-of-supported-parameters
You are using Kv 2 and your path is wrong, which in that case may just need data to be included into your path Insurance-DevOps/test/data/secrets (A guess, as i don't know your vault structure)

Thanks, @werne2j
The path is correct and I'm using the KV 1 version.
I have added annotation in YAML . I have stored the key (testpass)at the path "Insurance-DevOps/test/secrets" in the vault.
kind: Secret
apiVersion: v1
metadata:
  name: test-secret
  namespace: default
  annotations:
    avp_path: "Insurance-DevOps/test/secrets"
    kv_version: 1
type: Opaque
data:
  test-secret: <testpass>

but still, I don't why getting a 403 error, I think the plugin is not fetching the correct vault path.

Unable to create application: application spec is invalid: InvalidSpecError: Unable to generate manifests in .: rpc error: code = Unknown desc = argocd-vault-plugin generate ./ failed exit status 1: Error: Error making API request. URL: GET http://vault.abc.com/v1/secret Code: 403. Errors: * permission denied Usage: argocd-vault-plugin generate  [flags] Flags: -c, --config-path string path to a file containing Vault configuration (YAML, JSON, envfile) to use -h, --help help for generate -s, --secret-name string name of a Kubernetes Secret containing Vault configuration data in the argocd namespace of your ArgoCD host (Only available when used in ArgoCD) Error making API request. URL: GET http://vault.abc.com/v1/secret Code: 403. Errors: * permission denied
✖
<<<

@anup1384 You must put quotes around the 1
kind: Secret
apiVersion: v1
metadata:
  name: test-secret
  namespace: default
  annotations:
    avp_path: "Insurance-DevOps/test/secrets"
    kv_version: "1"
type: Opaque
data:
  test-secret: <testpass>

Yes After passing as list working now.
Thanks

No problem, glad you got it to work! Will close this issue.


fix command run at preStop event

Add /host to directories in rm command because it is not run in chroot
environment.
Fixes: #24
Signed-off-by: Jens Freimann<EMAIL_ADDRESS>

This was fixed in release-4.6 by
commit 62a4b8ef5ce4072385a41f8553501b3a991e8450
Author: Jens Freimann<EMAIL_ADDRESS>Date:   Thu Oct 15 15:39:54 2020 +0200
add /host prefix to directories to be cleaned up

The preStop hook command is not run in a chroot environment, so we
need to delete /host/<dir> instead of just /<dir>

Signed-off-by: Jens Freimann<EMAIL_ADDRESS>

/approve
/lgtm
Thanks for the forward port, @jensfr!

Thanks for the review @fidencio!


Why do reads eat up a serial no?

Why is it that if you ReadAsync (or any method async) it creates the serial number for you and the non-async version allows you to give it anything? Why does ReadAsync consume a serialNo?
Shouldn't reads be passive? Couldn't you just take the timestamp of the read and say show me the state of the record before that timestamp rather than using a serial no?
Any help on this would be appreciated :).

We auto increment the serial number in order to simplify the async interface. Perhaps this should be added back in - not sure what's the use case though.
In general, users may want to increment the serial number for reads, as a commit (checkpoint) may declare one read as durable (i.e. the data returned by the read is durable) and the next read as not-yet-durable.

I was trying to synchronize multiple databases. The problem is that reads use a serial no, so I can
't use that to compare databases if one of them failed, to see how many records behind it is.
Maybe I am missing something about read then? Why would a checkpoint need to make a read durable? The read either happened or it didn't because it failed due to an exception. It doesn't affect data. What would a read look like that is "not-yet-durable"? How does it differ?

When you perform a read in FASTER, it might return data in the mutable region of the log (in memory). This underlying data is subject to loss in case of failure, so the read is not guaranteed to be a read of durable data. After a checkpoint/commit, the data becomes durable, and we report such durability to the used with a commit point (serial number) such that all operations (read and write) until that point correspond to durable data.


Add dump partition script

Allows dumping all kind of things.

The second free() call needs to be removed.  I think the script was originally written to separately call malloc() for the FS Access Header and for the FS Access Control structures.  But, it's currently written to malloc() a single combined buffer for both.  Therefore, only the first pointer is a valid allocation to be free()'d.


Provide a way of doing hard-coded server dates

I keep seeing things where people want to use DateFormat for a fixed format used to communicate with another program. It's very slow for that, and people may not realize that the format can change with different locales until they test in an unusual one. Maybe it would be worthwhile to provide some kind of constructor like
DateFormat.forServer(pattern)
where it create a different sort of format object that ignores the locale and is very limited with respect to the pattern. Basically only understands the letters y, m, and d, and only cares about how many digits you want for each, and does padding.

Perhaps just omit the pattern and assume ISO8601 standard: 2007-04-05T14:30Z

+1 for parsing exactly according to the specified format
The iso format can easily parsed with the DateTime class
DateTime.parse('2007-04-05T14:30Z')

DartPad

See #457 .


after git push, system appears that still erasing files

Hi,
you got 3 distinct commits , you may merge each one separately  .

First commit , just show error when they happened , if no errors output won't change

Latest commits is for https://github.com/gabrys/svn2github/issues/7 , I'm testing now

Why not use XZ compressed data

because the difference is almost zero (15%)
cd ~/src/svn2github/cache/
tarfile=cache.milahu.appwork-utils.tar
xz -k $tarfile
gzip -k $tarfile
du -sh *
46M     cache.milahu.appwork-utils.tar
42M     cache.milahu.appwork-utils.tar.gz
40M     cache.milahu.appwork-utils.tar.xz

https://unix.stackexchange.com/questions/108100/why-are-tar-archive-formats-switching-to-xz-compression-to-replace-bzip2-and-wha
BTW https://github.com/sergiomb2/svn2github you have my devel , unfortunately is not finished yet and is not much functional at first run , but I going close this PR to stop send notifications on every modification that I do in my repo
Best regards


Make -v actually enable verbose makefiles

-v wasn't allowing me to see the commands being run, and switching "V=1" to "VERBOSE=1" fixed that: https://stackoverflow.com/questions/5820303/how-do-i-force-make-gcc-to-show-me-the-commands#comment34121307_5820432

@jackhorton,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


Remove empty extra quotes on 2fa page

Coverage remained the same at 85.384% when pulling f4a48fb332c31b075550801236b9ffe40e8b1fd5 on bug/floating-quotes-on-2fa into 345079bc2b4d08150d069d7b6a73452161f06528 on master.


General data

I need to finish https://en.bitcoin.it/wiki/Comparison_of_cryptocurrencies

How many units are "hard-wired" in to the protocol?
Is the rest of the information correct or should I change anything?
Do you want to add something to the comment column?

@davidhedlund Anoncoin doesn't finish the zerocoin implementation as far as I know. Zcoin is the first and only cryptocurrency implemented zerocoin protocol for now.
And for Proof-of-work, we are the first that implements Merkle Tree Proof of Work or MTP, which intend to solving issues in Equihash. MTP is created by the same author of Equihash.

@nopslide Updated.
What is the mining fee?

Do you mean the block reward?
It follows the exact same schedule as Bitcoin except that for the first four years, 20% of the block reward (10 XZC per block) goes to the Founding wallets which include our funding for the team and the initial investors. After the four years, all the rewards go to the miners at least until we implement Znodes which will have a certain percentage given to Znode holders.


Anyone working on CKEditor 5?

I'm wondering if anyone has worked on a yjs solution for collaborative editing in CKEditor 5. It's supported by paid services but is extremely expensive.

Hi @archonic,
no, not yet. If there are interested parties who would like to fund the development, I'd love to write a Yjs extension for CKEditor.

Hi @archonic,
no, not yet. If there are interested parties who would like to fund the development, I'd love to write a Yjs extension for CKEditor.


ARC parser infinite loop reading body

On certain ARC files the parser may run into an infinite loop. So far, I've found the following ARC files which reproducibly cause the hang-up when running the "validate" tool:

IAH-20080430204825-00000-blackbook-truncated.arc - part of ukwa/webarchive-test-suite and also used by jwat as test resource. Note: when parsing the gzipped variant (also part of the test suite) the parser complains about an "invalid ARC trailer". The stack during the hang-up:
"main" #1 prio=5 os_prio=0 tid=0x00007f0e8400b800 nid=0x38450 runnable [0x00007f0e8908a000]
 java.lang.Thread.State: RUNNABLE
      at sun.nio.ch.NativeThread.current(Native Method)
      at sun.nio.ch.NativeThreadSet.add(NativeThreadSet.java:46)
      at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:155)
      - locked <0x000000071ab05d30> (a java.lang.Object)
      at org.netpreserve.jwarc.LengthedBody.read(LengthedBody.java:76)
      - locked <0x000000071ac21f30> (a org.netpreserve.jwarc.LengthedBody$Seekable)
      at org.netpreserve.jwarc.LengthedBody$Seekable$1.read(LengthedBody.java:236)
      at org.netpreserve.jwarc.LengthedBody.read(LengthedBody.java:76)
      - locked <0x000000071ac28738> (a org.netpreserve.jwarc.LengthedBody$Seekable)
      at org.netpreserve.jwarc.tools.ValidateTool.readBody(ValidateTool.java:83)
      at org.netpreserve.jwarc.tools.ValidateTool.validateCapture(ValidateTool.java:159)
      at org.netpreserve.jwarc.tools.ValidateTool.validate(ValidateTool.java:182)
      at org.netpreserve.jwarc.tools.ValidateTool.main(ValidateTool.java:283)
      at org.netpreserve.jwarc.tools.WarcTool.main(WarcTool.java:49)

the gzipped ARC<PHONE_NUMBER>711_14.arc.gz (Common Crawl 2010):
"main" #1 prio=5 os_prio=0 tid=0x00007f414400b800 nid=0x38c12 runnable [0x00007f414a6b8000]
 java.lang.Thread.State: RUNNABLE
      at java.util.zip.Inflater.inflateBytes(Native Method)
      at java.util.zip.Inflater.inflate(Inflater.java:259)
      - locked <0x000000071ab5fe10> (a java.util.zip.ZStreamRef)
      at org.netpreserve.jwarc.GunzipChannel.read(GunzipChannel.java:59)
      at org.netpreserve.jwarc.LengthedBody.read(LengthedBody.java:76)
      - locked <0x000000071abb4330> (a org.netpreserve.jwarc.LengthedBody)
      at org.netpreserve.jwarc.LengthedBody$1.read(LengthedBody.java:138)
      at org.netpreserve.jwarc.LengthedBody.read(LengthedBody.java:76)
      - locked <0x000000071abf55d8> (a org.netpreserve.jwarc.LengthedBody)
      at org.netpreserve.jwarc.tools.ValidateTool.readBody(ValidateTool.java:83)
      at org.netpreserve.jwarc.tools.ValidateTool.validateCapture(ValidateTool.java:159)
      at org.netpreserve.jwarc.tools.ValidateTool.validate(ValidateTool.java:182)
      at org.netpreserve.jwarc.tools.ValidateTool.main(ValidateTool.java:283)
      at org.netpreserve.jwarc.tools.WarcTool.main(WarcTool.java:49)

Fix for the infinite loop released as 0.16.5.
The invalid ARC trailer warning on<PHONE_NUMBER>711_14.arc.gz I think is correct. The length field for the filedesc:// record seems to be off by one, whereas the subsequent records it's correct. Although I suppose an argument could be made that the definition of the length field in the version block in the spec as "the rest of the version block" is vague and could possibly be interpreted to include the first newline or the trailer newline even though this is inconsistent the response records where it's clearly defined to exclude these.
The ARCs in our collection both those generated by Heritrix and others supplied by IA are all consistent with jwarc's definition of the length.


Cannot deploy at subscription scope from AZ CLI

Bicep version
Bicep CLI version 0.4.613 (d826ce8411)
Describe the bug
I'm trying to create a deployment that first create a resource group, then deploy other resources into this resource group, but the CLI requires a resource group to be specified even if my target scope is the subscription, and if I provide an empty resource group name I get the error The target scope "subscription" does not match the deployment scope "resourceGroup".
Did I missed something there?
To Reproduce
This is my CLI command:
az deployment group create --template-file main.bicep \
                           --parameters prod=true githubToken=${GITHUB_TOKEN} \
                           --query properties.outputs

And my main Bicep template:
param prod bool = true
param appName string = 'myapp'
param githubRepo string = 'myuser/myrepo'
param githubToken string
param domainName string = 'myapp.com'
param location string = 'West Europe'

var suffix = prod ? '' : uniqueString(subscription().subscriptionId)
var dashSuffix = prod ? '' : '-${suffix}'
var productionTag = prod ? 'true' : 'false'

targetScope = 'subscription'

resource resourceGroup 'Microsoft.Resources/resourceGroups@2020-10-01' = {
  name: '${appName}${dashSuffix}'
  location: location
  tags: {
    usage: appName
    production: productionTag
  }
}

module infra './infra.bicep' = {
  name: 'infra'
  scope: resourceGroup
  params: {
    prod: prod
    appName: appName
    location: location
    githubRepo: githubRepo
    githubToken: githubToken
    domainName: domainName
  }
}

The az deployment group create command is specifically only for resourceGroup-level deployments - you need to use az deployment sub create instead. Docs are available here.

Closing since Anthony provided the fix

Thanks for the alternative command. I think this issue can be reopened then to fix the CLI doc of az deployment group create, as this is the last example provided that misled me:
    Create a deployment at subscription scope from a template-spec
        az deployment group create --resource-group testrg --template-spec "/subscriptions/00000000-
        0000-0000-0000-000000000000/resourceGroups/testrg/providers/Microsoft.Resources/templateSpec
        s/myTemplateSpec/versions/1.0"

It says at subscription scope wheras every other example says resource group scope, so you might want to remove this example from the list.

It says at subscription scope wheras every other example says resource group scope, so you might want to remove this example from the list.

@sinedied Thanks for pointing this out! That is definitely misleading. Would you mind raising an issue against https://github.com/Azure/azure-cli for this? I think the help text is coming from here: https://github.com/Azure/azure-cli/blob/30e5997c7f78e026157fdfb1ce01048c01d66727/src/azure-cli/azure/cli/command_modules/resource/_help.py#L628-L630.

Since you already did the hard part pinpointing the text location, I'll directly send a PR to fix that 🙂
Thanks for your help!

Thanks @sinedied!


Using a single rs2::syncer to synchronize between devices?

Camera Model: D415
Firmware Version: <IP_ADDRESS>
OS: Ubuntu 18.04 with kernel 4.18.20-041820-generic
Platform: PC
SDK Version: librealsense-2.29.0
Segment: Telecommunications
https://github.com/IntelRealSense/librealsense/blob/master/doc/frame_lifetime.md
^^ The above doc states:
You can also use a single rs2::syncer to synchronize between devices, assuming it makes sense.
If you could please elaborate on this idea and how it might be utilized? Also, is there any documentation or example code related to the 'syncer' classes?
Thank you!

There is a user-contributed script here for using rs2::synced with multiple cameras:
https://github.com/IntelRealSense/librealsense/issues/4158#issuecomment-505559462
More documentation on syncer is here:
https://github.com/IntelRealSense/librealsense/wiki/Frame-Buffering-Management-in-RealSense-SDK-2.0#syncer

As long as frame timestamp domain equals global time (or system time), it should be possible to use syncer to bundle frames from different sensors. It is problematic when using raw hardware clocks.

Thank you @MartyG-RealSense and @dorodnic.
Is there a recommended queue size for the rs2::syncer? The constructor defaults to 1?

Have you seen the advice Dorodnic provided yesterday in your frame queue best practices post please?
https://github.com/IntelRealSense/librealsense/issues/5041#issuecomment-542241323

We fully understand this now, can close the ticket. Thank you to everyone for your help!


URL is different from the corresponding page address.

When I reopen the third level address, the corresponding address and page when the back returns to the previous level are incorrect, how to solve...

Your issue is closed because it is not filled correctly. Before you open an issue please review the contributing guideline.
Please fill the issue template correctly and:

Clearly describe the issue including steps to reproduce when it is a bug.
Make sure you fill in the earliest version that you know has the issue.
Provide live link or JSFiddle/Codepen or website with isssue

It will save a lot of time for other contributors to check your issue and fix it.


Christie: Sign and complete onboarding documents. Create a profile for HIVE2 and inform Jonathan

Told Jonathan that I signed up and I believe I already signed the onboarding documents.

The documents were signed and access was granted


test nagoya-university-conversation-corpus: reduce checking

GitHub: GH-188
Because text file is too big (134,555 rows in total).
Before this change:
$ time ruby test/run-test.rb -t NagoyaUniversityConversationCorpusTest --verbose=important-only
Finished in 3.65658 seconds.
4 tests, 4 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0
notifications

real    0m4.550s
user    0m3.723s
sys     0m0.568s

After this change:
$ time ruby test/run-test.rb -t NagoyaUniversityConversationCorpusTest --verbose=important-only
Finished in 0.060458 seconds.
4 tests, 4 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0
notifications

real    0m0.613s
user    0m0.428s
sys     0m0.096s

Thanks.

Thanks for your quick review!


Add Yeelight auto discovery, color temp

Description:

Adds auto discovery support for Yeelight bulbs
Adds color temperature functionality

Related issue (if applicable):

https://github.com/home-assistant/netdisco/pull/77

Checklist:
If user exposed functionality or configuration variables are added/changed:

[N/A] Documentation added/updated in home-assistant.github.io

If the code communicates with devices, web services, or third-party tools:

[x] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[N/A] New dependencies have been added to the REQUIREMENTS variable ([example][ex-requir]).
[N/A] New dependencies are only imported inside functions that use them ([example][ex-import]).
[N/A] New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
[N/A] New files were added to .coveragerc.

If the code does not interact with devices:

[N/A] Local tests with tox run successfully. Your PR cannot be merged unless tests pass
[N/A] Tests have been added to verify that the new code works.

Adding home-assistant support for the pending merge of https://github.com/home-assistant/netdisco/pull/77 -- we're waiting on linting issues to be fixed from the author. No documentation changes yet as the netdisco functionality isn't there.
Add support for color temperature functionality

I've submitted a PR for the netdisco repo with the required linting fixes (credit to @rytilahti)
https://github.com/home-assistant/netdisco/pull/81


button and swipe controls don't work after more than 4 pages added

I am using FragmentStatePagerAdapter, ViewPager, v4.Fragments and the CubeOutTransformer.
When I use the following code:
CubeOutTransformer ct = new CubeOutTransformer();
mViewPager.setPageTransformer(true,ct);
and add more than 4 pages the Button and gesture controls on the 5 page don't work. When I comment out the above code, the 5th page's controls work fine.
Am I missing something... possible max setting???
Thanks

It seems the Transformers that don't work are the ones that override:
protected boolean isPagingEnabled() {
return true;
}
The ones that override this method return true  and the base class's method returns false;
Guess I'll have to dig a little deeper

Duplicate of #45

same problem. Can you please give us some solution


labels is required and needs multiple values

It seems that create_plot and create_interactive_plot both make the assumption that:

The plot had labels at all
The plot had at least two labels

I was a bit surprised that labels was a required argument since I didn't have clusters in my data and just wanted to see the data visually with the raw hover information. So as an initial workaround, I created a dummy list of labels where all data was "Unlabelled" or all data had the same label, but either caused a runtime crash.
In the end, I used these dummy labels
all_pipe = ["not_pipe", "Unlabelled"]
for n in range(len(lines)-2):
	all_pipe.append("pipe")
labels_all_pipe = np.array(all_pipe)

To work around this (and #11). But it seems like it could make sense to in the future allow unlabelled plots with simply labels=None

When I started this was really about putting labels on a plot in a sensible way, and only meant static plots. This was because it was actually surprisingly hard to do right at the time. So that's why labels are a required argument. You do make a good point though -- now that there is interactive plotting, and in the case you just want to take advantage of the automated point-size/use of datashader etc. there is reason to allow for no labels. Do you have any thoughts as to the colour that should be used?

Should be resolved now. Between this and #11 I have decided to push a minor patch release, so that should be hitting PyPI (and eventually conda-forge) in the next little while. Hopefully that solves these problems for you. Feedback is welcome.

Should be resolved now.


⚠ Bofrost.at has degraded performance

In 6d91ef5, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 2100 ms

Resolved: Bofrost.at performance has improved in 5472dac.


Re-enable TLS 1.0

Re-enable TLS 1.0 for Server 2008
Fixes #267
Fixes #242

Sorry to ask but what we should do on 2008 R2 OS ? Do i have to change anything in the tunable HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols ?
I have TLS 1.0, 1.1 and 1.2 presents for client and server

Are you able to create a release build from this? as 1.9.1 is previous to this fix


Add wallet that connects to Breez SDK for use as main BTC/LN wallet

Features:

On creation of new Flash account, make a new wallet and display balance using the Breez SDK through GraphQL resolvers and store keys on client device.
Send and receive Bitcoin and Lightning using the Breez SDK through GraphQL resolvers
Transfer Bitcoin and Lightning to and from the Breez SDK wallet to the IBEX wallet on the app
Ability to set as default wallet in existing Flash settings

⚡⚡⚡Bounty is negotiable for completion of these features ⚡⚡⚡

I'm not using the Graphql resolvers for the Breez SDK wallet anymore.
The wallet code will be isolated to the front end application.
Only the wallet ID (or some other identifying key) will be passed to the flash backend for future backup and restore purposes.
@aliantjamaica an Idea we spoke about is using a hardware wallet, and having the password to that wallet backed up on the flash server. That way, even though the password is shared, only the physical holder of the hardware wallet can use it to restore the Breez SDK wallet on Flash.

Completed on https://github.com/lnflash/flash-mobile/pull/29


merge variable stack instead of replace

This will allow us to provide only partial hashes if we want to test certain settings for individual deployments.
e.g. if we wanted to tweak the coreshare variable:
ansible-playbook (...) -e '{ "invoker": {"coreshare": "4"}}'

instead of having to replace the entire object as it is without this PR:
ansible-playbook (...) -e '{ "invoker": {"port": "12001", "numcore": "2", "coreshare: "4", "serializeDockerOp": "true", "serializeDockerPull": "true}}'

greenish PG2 1012


[BE] Prisma Middleware Debug

[x] A Prisma Middleware was created on #14 but the prisma object that it was hooked up to is not used by the application
[x] There is inconsistent file location across dev branches and outdated migration files on /back/src/prisma (the current  location is /back/prisma)
[ ] The middleware itself needs to be proven to work
[ ] As the middleware was not working, workarounds were used that need to be replaced

Partially fixed by #58, but there are still workarounds.
The main problem is that the password cannot be passed to prisma.user.findUnique so the middleware can check if it matches the hashed stored password. There is a related issue open on Prisma but it is still open.
As an example, when calling findUnique like this:
const user = await prisma.user.findUnique({
    where: { dni: dniUpperCase as string },
    select: { id: true, password: true }
})

The middleware only receives the dni param. Also, the 'where' in findUnique only accepts one field. A possible solution could be using findFirst, which accepts more than one, to also pass the password  and then modify the query before executing next(). The field 'data' is also worth exploring, as is used in this example of the prisma docs.


Monitoring: kube-controller-manager metrics target down - rke2ControllerManager https on port 10257 instead of 10252

Hi,
I came across an issue with the default values of the rancher-monitoring helm chart.
In my rke2 cluster the kube-controller-manager prometheus target was down after an upgrade to kubernetes v1.22.6, because the pod was serving the metrics via https on port 10257 instead of the default port 10252 and http.
My solution was to change the rancher-pushproxy clients settings of the rke2ControllerManager on line 218 in the values of the monitoring chart to use https and also changed the metricsPort to 10257  like here:
rke2ControllerManager:
  enabled: true
  metricsPort: 10257
  component: kube-controller-manager
  clients:
    https:
      enabled: true
      insecureSkipVerify: true
      useServiceAccountCredentials: true
    port: 10011
    useLocalhost: true
    nodeSelector:
      node-role.kubernetes.io/master: "true"
    tolerations:
      - effect: "NoExecute"
        operator: "Exists"
      - effect: "NoSchedule"
        operator: "Exists"

I am still missing the ca certificate used for tls. I didn't know wich ca file to use from the rke2 deployment and none of the default seemed to work, so I used "insecureSkipVerify: true".
Any clues where I can find the correct ca for the kube-controller-manager metrics https endpoint?
Thanks!

Should have been fixed starting at 100.1.1+up19.0.3 in https://github.com/rancher/charts/pull/1766

Awesome! Thanks :)


Switching ip address when using rotating proxies

Instaloader heavily uses sleeps around the code, so if used with rotating proxies, the rate limiter does not consider the ip address from which the request was made, and it becomes really hard to catch the 429 errors and switch the ip address :)
How do you deal with that use case if that's appropriate?

Were you able to do this?

Yes... There shall be a way to change ip address per each request somehow.... This will bypass rate limitations plus we can multi thread a lot workload....


Mutate PDBs during a live-migration

What this PR does / why we need it:
Instead of creating an additional PDB for the duration of the migration,
the PDB will be expanded and later shrunk by the PDB controller when the VMIM has
completed.
Mutable PDBs have been implemented in k8s by https://github.com/kubernetes/kubernetes/pull/69867
which has been there since k8s 1.15, it just seems docs were not updated.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #
Special notes for your reviewer:
Release note:

mutate migration PDBs instead of creating an additional one for the duration of the migration.

/retest

/retest

/unhold

/test pull-kubevirt-e2e-k8s-1.21-sig-compute

@davidvossel @xpivarc please take a second look, all things discussed have been implemented, thanks!

/retest

@davidvossel @xpivarc can you take a second look?

/retest

/retest

/retest


Compiler generates mismatched text maps for "t:=b ifTrue: [x] ifFalse: [y]. ^t"

The compiler is able to spot and optimise away a redundant temp that is assigned to and then its value immediately returned. It can also optimise away unconditional jumps to a return message bytecode, by inlining a copy of the return bytecode in place of the jump. In combination this particular code form causes the compiler to generate text maps with different numbers of entries for release (optimized) vs debug (non-optimized) code. It is an invariant of the debugger that the text maps should have the same number of entries as these are used to map between debug/release representations of methods when de-optimizing methods on the stack for debugging.

This issue was moved to dolphinsmalltalk/Dolphin#533


Issues in the methodology

Hello,
I was going through your paper and code, and I found some  issues:

The paper mentions that the input vector is originally (1476 x 1) dimensional. May I know, what's the logic behind adding another dimension as '0' in the input. In my opinion, the only motive was to reshape the resulting (1477 X 1) vector to (211 x 7). And how does this corresponds to a single-channel image? I believe reshaping any 1-D vector to a 2-D matrix won't make it an image.

Other alternatives to reshape the original 1476 X1 vector could be (738 x 2) or (492 X 3) or (369 x 4) or (246 X 6 ). May I know, if you have tried the above transformations?

The use of 'softmax' as activations in the last layer: The paper mentions that the first network works as an autoencoder. Why not use 'linear' as activations in the last layer since you are trying to regenerate the output. I believe this is not a classification problem.

The original input feature set is of 1476 features. Why make it more sparse to 4096?

For the second network (FRnet predict), why rescale 4096 to (64 x 64)? Rescaling any 1-D matrix to a 2-D matrix doesn't make it an image. In my opinion, this was done again to project CNN as a solution.

As the output of the second network again a vector of length 1077 is mentioned. Why? This output should ideally be the list of drugs available which makes this problem a multilabel classification problem.

Adding to the above point, In my opinion, this problem corresponds to multilabel classification. One enzyme can have multiple drugs and hence a multilabel classification problem. Similarly, not justified to use, categorical cross-entropy as loss and the use of softmax as the activation in the last layer.

Hoping for a good response from your side.

reshaping any 1-D vector to a 2-D matrix won't make it an image but that was done to be able to use conv2d
Yes they were reported in the supplementary section
That was tried but we found better results using the way reported in the paper
1476 features are a lot for traditional machine learning algorithms but for CNNs, more features (up to a certain number) are usually better. We tried numbers such as 512, 1024, and 2048 and got the best result with 4096. We couldn't pick any higher number due to hardware limitation
Same as 1, it was done so conv2d can be used
6+7. We wanted to show our methodology and present that CNN-based methods are very capable of handling Drug target interaction using features that were generated initially for traditional machine learning algorithms

reshaping any 1-D vector to a 2-D matrix won't make it an image but that was done to be able to use conv2d
Yes they were reported in the supplementary section
That was tried but we found better results using the way reported in the paper
1476 features are a lot for traditional machine learning algorithms but for CNNs, more features (up to a certain number) are usually better. We tried numbers such as 512, 1024, and 2048 and got the best result with 4096. We couldn't pick any higher number due to hardware limitation
Same as 1, it was done so conv2d can be used
6+7. We wanted to show our methodology and present that CNN-based methods are very capable of handling Drug target interaction using features that were generated initially for traditional machine learning algorithms


VS Code editor hangs and extension host has to restart

Current specs
Macbook Pro 16-inch, 2021
Apple M1 Max
64GB
macOS Ventural 13.1

VS Code
Version: 1.76.2 (Universal)
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:54:09.061Z (1 wk ago)
Electron: 19.1.11
Chromium: 102.0.5005.196
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 22.2.0
Sandboxed: No
Issue

I'll get this error on startup and VS Code will randomly hang until the extension host terminates and auto-restarts.

When switching tabs (using the Vim plugin), this behavior happens the most frequently.

Hi,@bitfore. Thanks for your feedback. Could you provide the go version and the go.mod file?

Unfortunately; I cannot, but I can describe the usage. Our codebase is comprised of many go.mod files: one at the root of the directory and a go.mod many of our subdirectories. Example:
PROJECT
docker-compose.yml
go.mod
go.sum
Makefile

Okay, 'go env' can't provide it either, right? we need to know the version of go at least. Because this problem is roughly caused by the failure of parsing json. or will this error have any substantial impact, for example, a module is missing in go mod explorer, or there is no display at all.

I'll get this error on startup and VS Code will randomly hang until the extension host terminates and auto-restarts.
I'll keep looking into this issue.

Makes sense: go version go1.19.4 darwin/arm64

Hi, @bitforce! Sorry for the late reply... We use a new way to parse the modules json, but I still suggest you to open devtool and report this error(you can desensitize relevant data, we only want to check the specific location of the error in the json).
error messages like this:


Receive-only participants

A common use-case would be eg. a lecture/webinar, where only a limited number of users can broadcast, others are passive receivers only.
I can imagine managing these permissions is out of scope for this project, so my thinking was PC could just interact with an external API endpoint of whatever-service-managing-permissions, which would validate the request token to see if given user has the permission to broadcast (...or at least that's my current implementation of this feature).
Thanks for consideration.

Yeah I've been trying to keep the peer calls logic clean from the user management stuff.
That said, maybe we could add some sort of support for "permissions providers". For example it could be a service that would provide some sort of token and redirect back to Peer Calls page, and Peer Calls could validate it (kind of like OAuth bearer tokens, or a JWT that's simpler to validate).
I'm curious why would you prefer to have only a single person broadcasting vs everyone can broadcast, but only the broadcaster with permissions can be maximized. And then if people are causing trouble the broadcaster could mute them or terminate their session.

I'm curious why would you prefer to have only a single person broadcasting vs everyone can broadcast

the use case is one person having a presentation and others are just watching their stream. Allowing others to join with audio/video and handle the unruly can be distracting and time-consuming, and afaik Peer Calls does not allow muting/kicking anyone, does it?
Another aspect is the performance - I didn't do any benchmark yet, but I'm assuming that broadcasting from one2many, as opposed to many2many, will scale way better in terms of server CPU and bandwidth usage.

That said, maybe we could add some sort of support for an integration with a "permissions provider". For example, it could be a service that would provide some sort of token and redirect back to Peer Calls call page with ?auth_token=, and Peer Calls could validate it (kind of like OAuth bearer tokens, or a JWT that's simpler to validate). Upon successful validation, the user's WebSocket session would be granted a certain role for particular room and would last for the duration of the WS connection or a session.

Yes, something like that. Maybe, in order to make it token/auth format agnostic, PeerCalls wouldn't do any verification on its own, since for example token invalidation can get quite complicated. So it would only forward the token to the verification endpoint, and let PeerCalls know about the result?
# custom router endpoint to process the auth logic when token is present
router.Get("/call/{callID}/{speakerToken}/", ...)
...
# hit the verification endpoint
res_verified = http.get('verify.url/token/<callID>/<speakerToken>/', headers={'origin_ip': request.remote_addr})

# set a flag for the PeerID into... somewhere... `SetMetadata`? idk

# redirect back to normal URL to avoid leaking token through http referrer eg. in chat etc.
http.redirect('/call/{callID}'/)

I'm very likely getting too much into details here already

That would probably mean that the broadcaster would have to join the call through a different URL (the URL of the permissions provider service), but perhaps this URL could be made visible before Join Call is pressed.

yes

Yeah I think we're on the same page, more or less.
One thing that would make things easier is to use a different URL for these calls, and leave an option to disable the /call URL so that random people can't just connect.
For example, we could have a URL such as /org/<org_id>/call/<call_id>, and than the there could be an orgs section in the config YAML:
orgs:
  myorg:
    provider: https://provider.myorg.com
    default_permissions:
      - subscribe

and then when the users navigate to the https://mypeercallsinstance.com/orgs/myorg/call/123 they would be presented with two options:

Join
Host

Join
Join would behave similar to the way it currently does, but it would not allow the users to publish a track
Host
Host would redirect the users to https://provider.myorg.com?callurl=https://mypeercallsinstance.com/orgs/myorg/call/123 and let the user authenticate.
The Provider service would validate the URL, authenticate the user and redirect back with a token that can be validated by the Peer Calls instance by sending a request to the Provider like you described.
After a successful validation, the page would be rendered and the local user would have the permission to publish a video.

I might be biased here, since -as mentioned above- I have kinda' implemented this for myself, so what I'll be describing will be gravitating towards that. But implementation is more like a hack, so I don't see much value in sharing it, otherwise the MR would be created already.

For example, we could have a URL such as /org/<org_id>/call/<call_id>, and than the there could be an orgs section in the config YAML:

This sure offers an enterprise level of customizability, but it feels a bit like an overkill to me. If there would be multiple organizations with their own Auth Provider, wouldn't it be more reasonable to run separate PeerCalls instance for each of them?

One thing that would make things easier is to use a different URL for these calls, and leave an option to disable the /call URL so that random people can't just connect.

My thinking is if I choose to run PeerCalls with the Auth Provider enabled, I have to expect the random non-restricted calls created. In such case the default behaviour is that people can join and stream in any call, unless told otherwise by the Auth Provider.
Now that could cause a lot of needless requests to the Auth Provider, so a possible optimization is that only calls which start with <DEFINED_AUTH_PREFIX> would do the permissions checks. Since currently generated Call IDs are in format of UUID, there is a zero chance having a randomly generated ID colliding with the restricted rooms due to the custom prefix.
But again - that's just how I do it, and I dont have a strong opinion about the eventual proper implementation.

This sure offers an enterprise level of customizability, but it feels a bit like an overkill to me. If there would be multiple organizations with their own Auth Provider, wouldn't it be more reasonable to run separate PeerCalls instance for each of them?

Yeah they could host a separate instance. But I've worked at places where there's a single parent entity with smaller sub organizations that have different permissions. It doesn't really cost us anything to implement support for multiple orgs, even if 99% of the time a single one is used. Personally, I don't want to rule out ever offering a hosted "enterprise" solution that would support multiple organizations through different subdomains, so this would be a step in that direction.

My thinking is if I choose to run PeerCalls with the Auth Provider enabled, I have to expect the random non-restricted calls created. In such case the default behaviour is that people can join and stream in any call, unless told otherwise by the Auth Provider.
Now that could cause a lot of needless requests to the Auth Provider, so a possible optimization is that only calls which start with <DEFINED_AUTH_PREFIX> would do the permissions checks. Since currently generated Call IDs are in format of UUID, there is a zero chance having a randomly generated ID colliding with the restricted rooms due to the custom prefix.

I see your point. I was just thinking just from the code organization perspective. There's nothing particularly special about the /call/:callId endpoint, so we can just add another endpoint. If it were in the form of /call/:orgId/:callId, then it would tell us that it needs to invoke the auth provider handler. But we can also make this configurable, so that we don't needlessly invoke the Auth Provider when the users just want to join and subscribe to the audio/video stream.


Update suggestion of OpenSSHUtils

This page mentions installing OpenSSHUtils, which appears to be deprecated.
I'm also unable to install it from an elevated command prompt, which may or may not be related:
➜  ~ Install-Module -Force OpenSSHUtils -Scope AllUsers
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'OpenSSHUtils'. Try Get-PSRepository to see all available registered module repositories.
At C:\program files\powershell\6\Modules\PowerShellGet\PSModule.psm1:9508 char:21
+ ...          $null = PackageManagement\Install-Package @PSBoundParameters
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Microsoft.PowerShel\u2026lets.InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

➜  ~ Get-PSRepository

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2

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

ID: 4c89b7b3-c05f-b517-6109-04e6a97195c3
Version Independent ID: 1e4b742e-d999-2c1e-a396-dc149f7ac76b
Content: OpenSSH key management for Windows
Content Source: WindowsServerDocs/administration/OpenSSH/OpenSSH_KeyManagement.md
Product: windows-server
Technology: administration
GitHub Login: @maertendMSFT
Microsoft Alias: damaerte

Never mind, I see this is a duplicate

Fair point. Thanks for checking and closing.

https://github.com/MicrosoftDocs/windowsserverdocs/issues?utf8=✓&q="1e4b742e-d999-2c1e-a396-dc149f7ac76b"&in=body


Putting machine options in separate files?

I'd like to be able to define my machine options in separate files so I can swap out real/mock service implementations like the following:
interface HomePageProviderProps {
    machineOptions: any; // <-- How do I type this?
    children: React.ReactNode;
}

const HomePageProvider = ({ machineOptions, children }: HomePageProviderProps) => {

    const [state, send] = useMachine(homePageMachine, machineOptions)

    return <HomePageStateContext.Provider value={state}>
        <HomePageDispatchContext.Provider value={{}}>
            {children}
        </HomePageDispatchContext.Provider>
    </HomePageStateContext.Provider>
}

Is there an easy way to get the generated types for my machine options so I can replace this any?

Replacing any with HomePageMachineStateMachine<HomePageMachineContext, HomePageMachineEvent, "homePageMachine">["_options"] seems to do the job. I'm fine with this unless there is a more reader-friendly way of doing it which I'm overlooking.


Fixed repeated context path issue

Fixed issue #312

an enum seems a tad overkill here

It works.  It doesn't degrade performance.  It's a few lines.  What other option is there?

@davydotcom: Any way to merge this, since it fixes a known production bug?

ill merge and clean up. dont use \ newline fills.


Web - Markdown - When using Markdown, the app crashes and the submit button is inactive

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 1.4.59-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Issue reported by: Applause - Internal Team
Issue found when executing PR https://github.com/Expensify/App/pull/39259
Action Performed:

Open https://staging.new.expensify.com/
Navigate to any conversation
Enter the text in the Compose Box - , `test😁` &
Click on the button to send a message
Enter the text in the Compose Box - , `test:grin:`&

Expected Result:
When entering Markdown text, the application should not crash and the submit button should be active
Actual Result:
The send messages button is not active or the app crashes when you enter Markdown into a text field:

, `test😁` & - The send message button is not active and errors appear in the console
, `test:grin:`& - Application crash

Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/5459229e-a78a-479f-b70e-cb34aa952ec9
View all open jobs on GitHub

We think that this bug might be related to #vip-vsp

Agree, this would be VSB if we can repro crash

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

reviewing today!


Enable tracing in the shell using best practices for client code

Is your feature request related to a problem? Please describe.
In #2363, the TraceUtil class gained an enable() method and a disable() method to turn tracing on and off dynamically for the shell. However, this is not public API and this is not best practice for clients to enable tracing from the client side.
In #2611, a change was made that enables client side spans in Accumulo's own library when the user's client code encapsulates their calls to Accumulo APIs inside a valid span of their own. This is demonstrated in apache/accumulo-examples#96
A comment was made, https://github.com/apache/accumulo/pull/2611#issuecomment-1090806198 , suggesting that this is how the shell should operate as well.
Describe the solution you'd like
The shell should start a valid span when trace on is specified in the shell, and stop the span when trace off is specified. This should replace the TraceUtil enable/disable methods, and any other residual code that could be cleaned up as a result. Care should be taken to only start one new span in the shell, and not create more than one if one is already started and trace on is called multiple times. Likewise trace off called multiple times should not result in an error, even though there is no open span to close.
Describe alternatives you've considered
The alternative is to leave the code as-is, and explicitly enable and disable it inside the shell using non-public APIs.
Additional context
This should allow traces to be emitted on the client side, even if tracing is not set up on the server-side. The server-side should not break if tracing is not set up there. It is understood that traces on the server-side may not be sent to the same exporter as those on the client (or any at all), because tracing may be configured differently on the server-side than on the client. This may prevent clients from gaining insight into operations that occur on the server-side, but that's okay.

I'm marking this as a good first issue, only because there's already an example that shows client-side best practices for this. So, it should be relatively easy to implement.


Library stops project from building on linux

Any project that includes DefOS, including the example provided, does not launch a window when hitting Build with no error message from inside Defold, and it's unable to bundle for any platform with the following error message:
'<<Name of the target platform>>' could not be built. Sdk version: '6bfeea3b13d7b8920483ea2cba9c181a8650b84d'
Log: '<failed reading log>'

Running Defold from the terminal shows this error message when hitting Build:
java.net.MalformedURLException: no protocol:
        at java.base/java.net.URL.<init>(URL.java:627)
        at java.base/java.net.URL.<init>(URL.java:523)
        at java.base/java.net.URL.<init>(URL.java:470)
        at util.http_client$split_url.invokeStatic(http_client.clj:60)
        at editor.engine.native_extensions$make_cache_request.invokeStatic(native_extensions.clj:185)
        at editor.engine.native_extensions$query_cached_files.invokeStatic(native_extensions.clj:205)
        at editor.engine.native_extensions$build_engine_archive.invokeStatic(native_extensions.clj:246)
        at editor.engine.native_extensions$get_engine_archive.invokeStatic(native_extensions.clj:311)
        at editor.engine$get_engine.invokeStatic(engine.clj:197)
        at editor.app_view$async_build_BANG_$fn__45968$fn__45974.invoke(app_view.clj:769)
        at editor.app_view$async_build_BANG_$fn__45968.invoke(app_view.clj:767)
        at clojure.core$binding_conveyor_fn$fn__5739.invoke(core.clj:2030)
        at clojure.lang.AFn.call(AFn.java:18)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

... And this message when running Bundle for any supported system:
Build Remote Engine...
ERROR: unspecified:-1: 'com.dynamo.bob.CompileExceptionError: '<<Name of the target platform>>' could not be built. Sdk version: '6bfeea3b13d7b8920483ea2cba9c181a8650b84d'
Log: '<failed reading log>''

As soon as I remove the dependency from the game.project file and launch Fetch Libraries to remove it the project is able to build again.
I am using Defold Version 1.2.188
My system info:

Operating System: Manjaro Linux
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.2
Kernel Version: 5.13.19-2-MANJARO (64-bit)
Graphics Platform: X11
Processors: 6 × AMD FX(tm)-6300 Six-Core Processor
Memory: 7,7 GiB of RAM
Graphics Processor: AMD PITCAIRN

This honestly seems like a Defold bug. Maybe you should report it at https://github.com/defold/defold/issues
Nevertheless, how did you add the dependency? What URL did you use?

Tested bundling master for Linux on a Windows 10 host and it worked.
Please preserve a copy of the project where this breaks. The Defold team may be interested in inspecting it to see why it breaks.

Please share the URL you used, or a copy of your project.

What URL did you use?

I used https://github.com/subsoap/defos/archive/v2.6.0.zip. Note that the example provided with DefOS also does not run and it just depends on the dirty larry library.
Any newly created empty project will not build if you add DefOS as a dependency.
Libraries like rendercam work with no issues.
The library works as intended if I switch to Windows and use the Windows build of Defold.
I'll report this issue to Defold's oficial repo if you guys think it's appropriate to do so.

It seems like the editor for some reason fails to download the dependencies. Have you for some reason prevented the editor from making network requests? Can you use wget or curl to manually download the dependency in a terminal?
What if you try bob.jar instead?
java -jar bob.jar --verbose --archive --platform=x86_64-linux  resolve build bundle

Bob does build (lol) correctly every project I've tried (The example and a couple of projects with the dependency and functions set up for testing). That is something! :)
Any directions on how should I go about fixing my Defold installation? I have tried re-downloading from the official page several times while troubleshooting and also installing the current AUR package (it's not the latest version of the engine) with the same failed results. I don't seem to find where is that Defold is leaving the config files like the recently opened projects list in order to perform a true clean reinstall.
I can move this question to the discord if you guys want as it is not really a problem related to the library in the end. Thanks for your awesome work!

I have fixed the issue by removing the prefs.xml file on ~.java/.userPrefs/defold/. Unfortunately I did not save a copy of the file before removing it. Sorry about that. I'll be sure to report it back to the Defold team if the issue returns in the future. Thanks again for your hard work!

I have fixed the issue by removing the prefs.xml file on ~.java/.userPrefs/defold/. Unfortunately I did not save a copy of the file before removing it. Sorry about that. I'll be sure to report it back to the Defold team if the issue returns in the future.

Oh, that's interesting. I wonder what you had in prefs.xml that was causing a problem for you?


A new Feature for Fullscreen Themes

I think it would be perfect if we had a list or something in Fullscreen Themes that show's how many trophies we have in total and how much progress we have in different games.
that way we don't have to change into desktop mode every time.
Edit: sorry I accidentally put it into enhancement instead of Feature request and I don't know how to change it.

To add details, data are already here for desktop mode, but we need exposed bindings for total count of all games (best with separated rarity) so fullscreen theme creators can create summary of all games (really useful for example on my PS5 theme)
Also, if possible, on desktop theme its possible to have visible achievements in game list for each game alone, its not possible to do in fullscreen because it will always show data only for currently selected game, making all strings same (for example if we add string for unlocked count into cover image of game, it will show in all games same data of currently selected game)
Sending love from all theme creators ❤

Yeah this feature would especially look good on PS5reborn theme (which I'm currently using as my main theme)
And by the way thanks a lot for updating your theme so often, can't wait to see this feature on it.


Create e2e tests for workload viewer

This will require setting up metrics server in CI.

We talked about this and we are going to write a proposal about our goals and implementation for e2e testing.


Pool allows Individual Object to be freed multiple times.

I found this while writing Unit Tests for my project.
Issue details
Should a pool be able to add a single object multiple times with free(Object)?
I find I am able to add an Object to a pool twice by calling free(Object) twice.
Then when I try to obtain that object, I do, but it also remains in the pool available to
be obtained again.
This doesn't seem like the correct behavior to me.
Reproduction steps/code

Create an implemented class that extends Pool.
Obtain an Object from the Pool.
call Pool.free(Object) Twice in a row.
-The Pool's Array now contains two references to the Object, instead of the expected one reference.
call Pool.obtain() to get an Object for TaskA
call Pool.obtain() again to get an Object for TaskB

The Object for TaskA should NOT be the same Object for TaskB.
Yet it is.
Suggested Possible Fix
Don't allow Pool.free(Object) to add a specific object to it's array
twice. The Pools array should only have 1 reference to a free'd Object.
When it checks if(freeObjects.size < max)
    public void free (T object) {
        if (object == null) throw new IllegalArgumentException("object cannot be null.");
        if (freeObjects.size < max) {
            freeObjects.add(object);
            peak = Math.max(peak, freeObjects.size);
        }
        reset(object);
    }

You can just change the check to:
if(freeObjects.size < max && !freeObjects.contains(object, true))
as so:
    public void free (T object) {
        if (object == null) throw new IllegalArgumentException("object cannot be null.");
        if (freeObjects.size < max && !freeObjects.contains(object, true)) {
            freeObjects.add(object);
            peak = Math.max(peak, freeObjects.size);
        }
        reset(object);
    }

I'm using this modified version and everything is testing as expected.
Version of LibGDX and/or relevant dependencies
Occurs in the current Master branch
Please select the affected platforms
I didn't test them all, but it looks liket his will occur in any
platform that uses the Pool Class

[ x] Android
[ x] iOS (robovm)
[x ] iOS (MOE)
[x ] HTML/GWT
[ x] Windows
[x ] Linux
[ x] MacOS

I am not in favor of this change for two reasons. First is performance. Pools are widely used and doing these checks could bring severe performance penalty when freeing big amount of objects. Second reason is, that overfreeing is (AFAIK) never legal in other contexts. Applications should be written to not overfree.
I am not sure what is libGDX's stance on asserts, but something like assert !freeObjects.contains(object, true); would do just fine here.

I agree, it would be too much of a performance hit just to protect the class from misuse. Just don't free something multiple times.

Hello. I lost several hours due to this choice of design (which I support by the way). It's very time consuming to diagnose this kind of behavior without any previous clue.
Can this information be added to the documentation?? I only see there:
Frees an object from the {@link #get(Class) pool}
and
Puts the specified object in the pool, making it eligible to be returned by {@link #obtain()}. If the pool already contains {@link #max} free objects, the specified object is reset but not added to the pool.
Thank you.