[Feature Suggestion] c.stream Response helper

Working on CF Workers and occasionally I find myself wanting to stream chunks of text down to cURL. There are a couple of steps to make it work, but I've wrapped it up in a little util that might make sense for inclusion into Hono?
app.get("/", async (c) => {
  return c.stream(async (stream) => {
    for (let i = 0; i < 3; i++) {
      stream.writeln(i).flush();
      await new Promise((res) => setTimeout(res, 1000));
    }
  });
});

https://user-images.githubusercontent.com/23264/220233752-98d2abe5-5f9a-4813-80ac-ec45fc23d933.mov

^ That's an example worker without Hono or Typescript. Source code, if you want to copy/paste it into the CF Workers editor:

class StreamingApi {
  constructor(writable) {
    this.bytesWritten = 0;
    this.writer = writable.getWriter();
    this.encoder = new TextEncoder();
  }

  write(str) {
    const bytes = this.encoder.encode(str);
    this.bytesWritten += bytes.length;
    this.writer.write(bytes);
    return this;
  }

  writeln(str) {
    return this.write(str + "\n");
  }

  flush() {
    const bytes_needed = 4096 - (this.bytesWritten % 4096);
    const BACKSPACE = 8;
    this.writer.write(new Uint8Array(bytes_needed).fill(BACKSPACE));
    this.bytesWritten = 0;
  }

  close() {
    this.writer.close();
  }
}

const textStream = (cb) => {
  const { readable, writable } = new TransformStream();
  const stream = new StreamingApi(writable);
  cb(stream).finally(() => stream.close());
  return new Response(readable, {
    headers: {
      "content-type": "text/plain",
      "Transfer-Encoding": "chunked",
    },
  });
};

export default {
  async fetch(request, env) {
    return textStream(async (stream) => {
      for (let i = 0; i < 3; i++) {
        console.log(i);
        stream.writeln(i).flush();
        await new Promise((res) => setTimeout(res, 1000));
      }
    });
  }
}

How does it work?
To do this kind of chunked-streaming from CF Workers, you need a couple of things:

To create a ReadableStream and WritableStream using new TransformStream()
Return a Response with the readable as the body, and Transfer-Encoding: chunked header.
Use writable.write() to push content onto the stream
🚨 DANK HAX ALERT 🚨 Pad out chunks to the nearest 4096 bytes so CF sends them immediately, otherwise they're buffered (thx this post). I send ASCII 8 (BACKSPACE) because cURL ignores this.
Remember to writable.close() to end the stream & close the response.
Hit it with cURL, potentially with -N flag. Browsers don't seem to stream things correctly, and also the backspaces make Chrome download it as a file and Firefox displays them as little hex chars. But curl works great.

I've made a textStream function that gives this API:
return textStream(async (stream) => {
  for (let i = 0; i < 3; i++) {
    stream.writeln(i).flush();
    await new Promise((res) => setTimeout(res, 1000));
  }
});

It sets up the TransformStream invokes the callback (without awaiting it) and returns the Response:
type TextStream = (cb: (stream: StreamingApi) => Promise<void>) => Response;
const textStream: TextStream = (cb) => {
  const { readable, writable } = new TransformStream();
  const stream = new StreamingApi(writable);
  cb(stream).finally(() => stream.close());
  return new Response(readable, {
    headers: {
      "content-type": "text/plain",
      "Transfer-Encoding": "chunked",
    },
  });
};

The stream property that's passed into the callback is an instance of this StreamingApi class, which provides helpers like .write, .writeln, .flush etc. This could be expanded with a bunch of helpers, but here is the implementation as-is:
class StreamingApi {
  private bytesWritten: number;
  private writer: WritableStreamDefaultWriter;
  private encoder: TextEncoder;

  constructor(writable: WritableStream) {
    this.bytesWritten = 0;
    this.writer = writable.getWriter();
    this.encoder = new TextEncoder();
  }

  write(str) {
    const bytes = this.encoder.encode(str);
    this.bytesWritten += bytes.length;
    this.writer.write(bytes);
    return this;
  }

  writeln(str) {
    return this.write(str + "\n");
  }

  flush() {
    const bytes_needed = 4096 - (this.bytesWritten % 4096);
    const BACKSPACE = 8;
    this.writer.write(new Uint8Array(bytes_needed).fill(BACKSPACE));
    this.bytesWritten = 0;
  }

  close() {
    this.writer.close();
  }
}

I'm going to wrap this up into its own little library and publish it, but thought I'd raise an issue here first as I'm curious what you think of the API?

FWIW, after a few more hours on this I made a couple of tweaks. For one, using BACKSPACE isn't great if you want to pipe it to JQ, but that swallows SPACEs anyway. So I added log to emit JSON and pipe if you want to compose streams together:
  log(obj: any) {
    return this.write(JSON.stringify(obj)).flush(SPACE);
  }

  async pipe(body: ReadableStream) {
    this.writer.releaseLock();
    await body.pipeTo(this.writable, { preventClose: true });
    this.writer = this.writable.getWriter();
  }

So you can do:
return textStream(async (stream) => {
  stream.log("Normal line of text")
  for (let i = 0; i < 3; i++) {
    stream.log({i});
    await new Promise((res) => setTimeout(res, 1000));
  }
});

Works beautifully!

Hi @geelen !
This is very interesting! I would like to consider this feature more deeply, so give me some time.
And I want to know some use cases for this c.stream in the real world. I know the renderToReadableStream() in React is effective, but if we want to do such "React Streaming SSR", we can use the React's function. I think you know other cases to use c.stream. Thanks!

chatGPT has a stream mode which sends a EventSource stream as response.

I am working on a project where I need to take an MJPEG video stream, crop it, and pass that along. Something like this may allow me to much more easily implement this.

eg: ChatGPT streaming proxy
import { Hono } from 'hono'

const app = new Hono()

const PROMPT = (message: string) => [
  {
    role: 'system' as const,
    content:
      'You are an Web developer. If you receive a question about Web-related technologies, you can answer it.',
  },
  {
    role: 'user' as const,
    content: message,
  },
]

app.post('/', async (c) => {
  const body = await c.req.json()
  const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY })

  return c.stream(async (stream) => {
    const chatStream = await openai.chat.completions.create({
      messages: PROMPT(body.message),
      model: 'gpt-3.5-turbo',
      stream: true,
    })

    for await (const message of chatStream) {
      stream.write(message.choices[0]?.delta.content || '')
    }
  })
})

Proxying ChatGPT streaming would allow for authentication, rate limiting, and other protections.

Hello, @yusukebe, @geelen
I agree with this issue as well.
Since I didn't write the code about c.stream, if geelen can afford it, he can submit a PR and I can actually create some use cases for it.
How about it?

+1
This is a must for any GPT-related project since streaming is expected by the user

The PR #1437 to implement a c.stream has been created.

Hi, @yusukebe
Shall I write a docs for the website about c.stream() and c.textStream?

@sor4chi
Yes, pleeeese! If you create the PR, I'll merge it after releasing v3.7.0.

We can fix this! Thanks!!!


M04_L07-Update pipelines names

M04-LAB "Controlling Deployments using Classic Release Gates": Pipeline to pick not stated #446
Related Issue
Link related Github Issue 🢂 Fixes #446.
Checklist

[x] Has related GitHub Issue 💥https://github.com/MicrosoftLearning/AZ400-DesigningandImplementingMicrosoftDevOpsSolutions/issues/446
[x] Tested it
[x] Read the PR collaboration guide 👓

Changes proposed in this pull request:

Add rename pipelines instructions
Update pipelines names

Great! Thanks, @fimdim for the hard work!


HV-520: Remove package cycle between "descriptor" and "aggregated" packages

Removed package cycle; each node of the aggregated model now is able to create a corresponding representation in the descriptor model
Descriptor model is created lazily in BeanMetaDataImpl
Pulled common attributes up to AbstractConstraintMetaData
Added missing JavaDocs

All good, except my comment about synchronization.

rebased and applied


fix(mui): broken <DataGrid /> sizing in <ThemedLayoutV2 />

PR Checklist
Please check if your PR fulfills the following requirements:

[x] The commit message follows our guidelines: https://refine.dev/docs/guides-concepts/contributing/#commit-convention

Bugs / Features

[x] Related issue(s) linked
[x] Tests for the changes have been added
[x] Docs have been added / updated
[x] Changesets have been added https://refine.dev/docs/guides-concepts/contributing/#creating-a-changeset

Changes
Due to the changes in CSS rendering in latest Google Chrome updates, <DataGrid /> components are not properly sized when used inside <ThemedLayoutV2 /> component. The overflow: clip property in the layout content is causing either miscalculations on the data grid width or causing an overflow on the container and overlapping with the sidebar.
This change replaces the overflow: clip property with min-height and min-width properties to ensure the layout content is properly rendered and responsive to the content inside it.
Resolves #6077

/deploy finefoods-material-ui


When dbt-osmosis encounters a character it can't process it leaves a whole .yml blank. It should only skip that char

"
ERROR    Error occurred while processing model        osmosis.py:940
model.myproj.mymodel: 'charmap' codec
can't encode character '\u2705' in position
0: character maps to
"
Leads to mymodel.yml being blank.
Ideally this should put in a standard placeholder char ? but continue raising a warning.

This should be resolvable via the DBT_OSMOSIS_ENCODING env var on main
I will cut a release soon

Ah nice! Thank you!
On Sun, 24 Dec 2023, 04:01 Alexander Butler, @.***>
wrote:

This should be resolvable via the DBT_OSMOSIS_ENCODING env var on main
I will cut a release soon
—
Reply to this email directly, view it on GitHub
https://github.com/z3z1ma/dbt-osmosis/issues/77#issuecomment-1868426847,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACVRBJKCFRPN4R62VHVZDFLYK6SKLAVCNFSM6AAAAAA23UQI4OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGQZDMOBUG4
.
You are receiving this because you authored the thread.Message ID:
@.***>


Proposal: script directive for executing a script rather than calling run/build

I find myself often writing scripts for calling docker-compose that pull the image from a previous build step. I'd love a way to automate some of the boiler plate of those. This is an example:
#!/bin/bash
set -eu

cleanup() {
  docker-compose kill || true
  docker-compose rm --force -v || true
  docker-compose down -v || true
}

trap cleanup EXIT

image_name=$(buildkite-agent meta-data get docker-compose-plugin-built-image-tag-blah)

export COMPOSE_PROJECT_NAME="buildkite$$"
docker pull "$image_name"

... do docker-compose stuff

What if this could be:
steps:
  - command: test.sh
    plugins:
      docker-compose:
        script: my_custom_compose_script.sh

and the script could just be the docker-compose bits? Possibly even with a docker-compose-with-config function that calls the config files from the config.
Would save much pain, and allows extending on the plugin functionality without losing all of the nice bits.

I wonder if it should be called command?
And sourced, so it has access to the functions? That will make the functions a public API then, which is not necessarily a problem but we probably want to be clear if there are any that we don't want people to depend upon.

Possibly, I guess that command sounds a lot like Docker's CMD.
I reckon if we did this we'd really limit what was exposed to the script, but yeah, it would be sourced I think.

This has come up again, would be a nice way of calling custom run params that haven't been implemented yet. How about run-script, which would be a script called instead of the docker-compose run command. It would specifically override this line https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/blob/3c1e578c636f7493cf65ac0c2302ec3eef6594e8/commands/run.sh#L141
  - command: test.sh
    plugins:
      docker-compose:
        run-script: my_custom_compose_script.sh

Then my_custom_compose_script.sh would look something like:
#!/bin/bash
set -euo pipefail

docker-compose -f docker-compose.yml -f "$BUILDKITE_DOCKER_COMPOSE_OVERRIDE" run --rm myservice

It would get invoked in a subshell with a specific set of ENV that it was passed from the parent plugin script, e.g BUILDKITE_DOCKER_COMPOSE_OVERRIDE with the override file generated.
It would be super "advanced users only", but would be a great way of customizing behaviour.

I haven’t checked, but I think you might still need the service name to ensure all the other bits work properly? Something like:
  - command: test.sh
    plugins:
      docker-compose:
        run: service
        command-override: my_custom_script.sh

This also means you can document it as a “run command only” options like the rest of them, rather than introducing another top-level key.

@toolmantim discussion in https://github.com/buildkite-plugins/docker-compose-buildkite-plugin/issues/155 around whether we should do interpolation on $BLAH passed into various plugin arguments made me want a way to customize the run command.

@toolmantim I reckon we'd need a separate one for build-script / build-command-override vs run-script / run-command-override.
I was thinking we'd set as much docker-compose env as we could so that invocation would be minimal, via https://docs.docker.com/compose/reference/envvars/ we could set COMPOSE_PROJECT_NAME and even COMPOSE_FILE.

Ugh, yeah #155 type issues pop up a bit now (wanting job-time env var interpolation, instead of pipeline-upload-time). I actually didn’t know about that no-interpolate on upload would cause it to be interpolated later.
Cool, well maybe something like this is the way to go?

We are doing some cleanup on this repos' issues and found that what is being discussed here appears to actually be implemented in some way or another. Not sure if there is anything in particular that could be extracted off this conversation into another issue, though.


python3Packages.python-gvm: 21.10.0 -> 21.11.0

Motivation for this change
Update to latest upstream release 21.11.0
Change log: https://github.com/greenbone/python-gvm/releases/tag/v21.11.0
Things done

Built on platform(s)

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

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

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 148071 run on x86_64-linux 1

4 packages built:

gvm-tools (python39Packages.gvm-tools)
python38Packages.gvm-tools
python38Packages.python-gvm
python39Packages.python-gvm


(URGENT) Failure to retrieve JIS B 0060(規格群)

[relaton-jis] (JIS B 0060(規格群)) Fetching from webdesk.jsa.or.jp ...
[relaton-jis] (JIS B 0060(規格群)) Not found.

@ronaldtse JIS B 0060(規格群), JIS B 0060 (規格群), or JIS B 0060 規格群 references are not searchable on the webdesk.jsa.or.jp

"Keyword searches that include half-width symbols are not possible."
The JIS B 0060 returns document
$ relaton fetch 'JIS B 0060'
[relaton-jis] (JIS B 0060) Fetching from webdesk.jsa.or.jp ...
[relaton-jis] (JIS B 0060) Found: `JIS B 0060-10`
<bibdata type="standard" schema-version="v1.2.5">
...

 (規格群) means "all parts". Don't we have support for "all parts"?

 (規格群) means "all parts". Don't we have support for "all parts"?

@ronaldtse sorry, I forgot that "all parts" can be in Japanese. Yes, we have support for "all parts", but a space should present between number and the "all parts" option:
relaton fetch 'JIS B 0060 (規格群)'
[relaton-jis] (JIS B 0060 (規格群)) Fetching from webdesk.jsa.or.jp ...
[relaton-jis] (JIS B 0060 (規格群)) Found: `JIS B 0060 (all parts)`
<bibdata type="standard" schema-version="v1.2.5">
...

@andrew2net can you please help update the README to indicate how to use this? Thanks!

Confirm this is fixed. Thank you @andrew2net !

A reminder.
The  metalanguage of Metanorma is English. If there are directives in Metanorma, including directives to be passed on to Relaton, they are going to be in English. That includes recognition of section titles (as we've just seen in ISO/IEC 2382). And it applies just as much here.
I am NOT going to recognise the "all parts" string in Japanese, French, Russian, or Klingon. Inasmuch as I part "all parts" as a part of a citation (and I do), I am only going to recognise it once, in English. Just as I recognise clause title type only by the value of the title string, or else the heading attribute, in English.
The request to recognise  JIS B 0060(規格群) should not be coming from Metanorma. Metanorma should only present JIS B 0060 (all parts), for consistency. If @andrew2net needs to translate that into a search for  JIS B 0060(規格群) on the JIS website, that's fine, but recognising different languages in markup is an unreasonable added burden.

@opoudjis There is a growing need in authoring standards in different languages, and it is up to our strategy to whether allow that or not. "Control languages" like [options...] or [strikethrough] is fine in English.
However, presentational things like Scope or (all parts) should be subject to internationalization.

translate that into a search for  JIS B 0060(規格群) on the JIS website

No, there is no such thing. Just like "ISO 9000 (all parts)" does not exist on ISO's website. It is Relaton that creates the bibliographic series for citation.

I'm disagreeing with you that "Scope" and "(all parts)" here are presentation. To me, they are part of the control language; and they are already being internationalised in presentation.


When docstrings contain something like "cirq.X", turn it into a hyperlink when generating docs

This is a pattern I've been using more and more when writing docstrings, and it would be great if it was actually a link on the documentation website.

This sounds like a great improvement. As far as I'm aware this doesn't exist in devsite yet, but would be cool. We should make sure that this gets solved with a devsite compatible way. @lamberta have you seen anything like this working on the TF devsite?

In fact this is working from docstrings already on the new site. 🎉  I thought first that this would be something picked up from regular text as well. I guess that would be a pretty large effort. Closing.

We support this when generating the prod site :) But doesn't work in previews, afaik.
If you wrap the complete symbol in backticks it will autolink to the reference page. The shortname for the module is defined in your build_docs.py script and should already be enabled: https://github.com/quantumlib/Cirq/blob/master/dev_tools/docs/build_api_docs.py#L46


[feat]: Implement an 'evaluator' service and controller

Extract the core evaluation logic from the 'submitter' into a separate 'evaluator' module. Add a controller to this 'evaluator' to be able to query the message relay profitability from third party applications (e.g. an underwriter).

Implemented via #48


[SPARK-35602][SS] Update state schema to be able to accept long length JSON

What changes were proposed in this pull request?

This PR fixes an issue that both key and value of state schema cannot accept long length (>65535 bytes) JSON.
To solve the problem explained below, JSON represented schema is divided into chunks whose maximum length is 65535 bytes, and each chunk is written by DataOutputStream.writeUTF.
As the solution changes the format of the schema, the version is also changes from 1 to 2 but old version schema is still acceptable to ensures backward compatibility.
Why are the changes needed?

In the current implementation, writing state schema fails if the length of schema exceeds 65535 bytes and UTFDataFormatException is thrown.
It's due to the limitation of DataOutputStream.writeUTF.
writeUTF writes a length field first and it's 2 bytes width, meaning the maximum content length is limited to 2^16-1=65535 bytes.
https://docs.oracle.com/javase/8/docs/api/java/io/DataOutputStream.html#writeUTF-java.lang.String-
Does this PR introduce any user-facing change?

No.
How was this patch tested?

New tests.

cc: @HeartSaVioR

Test build #139366 has started for PR 32788 at commit cf60c8a.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43888/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43888/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/43888/

Test build #139368 has started for PR 32788 at commit e85d4e6.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43890/

Test build #139366 has finished for PR 32788 at commit cf60c8a.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
sealed trait SchemaReader
class SchemaV1Reader extends SchemaReader
class SchemaV2Reader extends SchemaReader
class SchemaV2Writer extends SchemaWriter
trait SchemaWriter

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139366/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43890/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/43890/

Test build #139368 has finished for PR 32788 at commit e85d4e6.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139368/

Thanks for the fix! I'll look into this in a couple of days.

Test build #139406 has started for PR 32788 at commit e1f4b68.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43928/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43928/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/43928/

Test build #139406 has finished for PR 32788 at commit e1f4b68.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139406/

Test build #139449 has started for PR 32788 at commit d660573.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43972/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43972/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/43972/

Test build #139459 has started for PR 32788 at commit a5b05be.

Test build #139459 has finished for PR 32788 at commit a5b05be.

This patch fails to build.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139459/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43982/

Test build #139449 has finished for PR 32788 at commit d660573.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

retest this please.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139449/

Test build #139461 has started for PR 32788 at commit a5b05be.

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43982/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/43982/

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43984/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43984/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/43984/

Test build #139461 has finished for PR 32788 at commit a5b05be.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds no public classes.

retest this please.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139461/

Test build #139475 has started for PR 32788 at commit a5b05be.

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/43998/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/43998/

retest this please.

retest this, please

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/139475/

Test build #139492 has started for PR 32788 at commit a5b05be.

Kubernetes integration test unable to build dist.
exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/44016/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/44016/

Thanks @sarutak for the fix. I merged this to master/3.1 branches.

@HeartSaVioR Thanks!


Improve build checks explanations

Improve the errors the build checks generate by adding:

[ ] A link to where the configuration is supposed to be entered
[ ] A more detailed description

The goal is to make it easier for the user what exactly is wrong and how they can fix it, so that they don't have to come us to complain about it.
So the dialog should look something like this:
Please set or correct the following configurations and try again:

Sidebar custom translations

The sidebar item with action "<action goes here>"
contains "Invalid translation text goes here" as text, which is not in the custom translations.
Add it to the custom translations here

Repeat this template for every error.
So instead of just sending the names of each error like it is now, also send data related to that error so we can translate it

Was about to do this before but didn't know how to show it properly.
The way you described it means that every error will be shown separately?

Yeah I'd show them under each other
Not the prettiest solution but it'll work 😛

Yes, maybe with a scrollable dialog it will pretty :laughing:

Issue migrated to our-city-app/plugin-mobicage-control-center#12


Prevent number of remote write shards from going negative.

This can happen in the situation where the system scales up the number of shards massively (to deal with some backlog), then scales it down again as the number of samples sent during the time period is less than the number received.
(Cherry pick of 1d94eb8d into 1.7, see #2969)

Thanks. :+1:


Added nim-tiled

This is a simple yet really useful library I wrote to load tmx files generated by the very popular tiled tile map editor, https://www.mapeditor.org/

You created two PRs btw - https://github.com/nim-lang/packages/pull/811/files


BUG: Auto Color/Icon/Layout : copy rule "no tracks selected" error

Hi !
When creating new rules Auto Color/Icon/Layout, i often add a new rule, and copy/paste rule info from another rule into my new rule, as a starting point, and then tweak the new rule from there (changing the filter, etc).
However, it seems it doesn't work anymore...
Now when i select a line and then "Ctrl + C" to copy the info from this line, i get an "error" window with the following message :
"no tracks selected"
As a result, i can no longer copy-paste rules, and copy-pasting rules was a real time-saver.
FYI : i use the following :

computer : PC
OS : Windows 10 (latest update)
Reaper version : v6.09/x64
SWS version : v<IP_ADDRESS> #1

See screenshots below :

My bad, just realized that i had no track inserted in my project, and if i have at least one track, i don't have the error anymore...
I'm gonna close the issue then, and maybe open another issue that suggests a different error message (IMO, you should be able to edit your Auto Color/Icon/Layout without needing any tracks in your projects).


Nested functions are not added to AST

In python it is possible to nest functions in functions. For some reason, they do not end up in the AST at all. I stumbled across this once I tried to implement #1713

Seems to be an issue outside of the Python front-end. I can see the front-end handling nested functions and creating the appropriate nodes. Will investigate further...

Once resolved: remember to test this: https://github.com/Fraunhofer-AISEC/cpg/pull/1735#discussion_r1784834098, too.


Factory without storyboards

Guys i added to factory additional method for call ViewControllers from code without storyboards. See if u need it.

@bimawa thanks for contributing! Have a look at #15 - looks much easier to use. Closing this PR for now.

Yea Cool thank you!


chore: add online to modify table partition

Fix https://github.com/bytebase/bytebase/issues/14549

We compose the modify table partition and modify to table partition currently


Change arounded to surrounded in README.rst

Pretty sure arounded isn't a word… I'm assuming it should say surrounded.

:+1:

:+1:

Thank you @36degrees.


transitions: fix initial_loan

1/ Regarding the code, it seems to be OK for me
2/ For the commit message, I think that more explanation could useful (to understand why we do this change)
3/ In case of RERO circulation I need to make a test with my colleague today before validating this commit :pray:

1/ Regarding the code, it seems to be OK for me
2/ For the commit message, I think that more explanation could useful (to understand why we do this change)
3/ In case of RERO circulation I need to make a test with my colleague today before validating this commit

1/ and 3/ are OK :+1:
Could you please fix 2/ and possibly create a new invenio-circulation version (i.e 1.0.0a26)? Thanks a lot for this quick fix!


2.16.2

Description
Fixes a bug where '...' happened when '...'
Checklist

[ ] All tests passing
[ ] Created tests which fail without the change (if possible)
[ ] Extended the README / documentation, if necessary
[ ] Commits and PR follow conventions

"Fixes a bug where '...' happened when '...'" ➡ It'd be great if you could fill the blanks with content :D


subdirectory as grouping mechanism

First, thanks for a great program, I find it very useful. I am trying to think about a way to have the main web landing page allow for grouping of streamlit files so there can be some logical hierarchy. It seems to me that reaching into the subdirectories in the folder passed to the streamlit-launchpad makes the most sense, but to be honest I am not sure how to modify the code to make that work. Any pointers to start I would be happy to submit a PR.

This makes sense, and wouldn't be too difficult, but would affect a few different components across the codebase.
You would need the MainHandler class to be able to match different subfolders specified in the URL instead of just the root folder.
And DefaultProxyHandler would need to be able to match multiple subfolder levels here/... and there would be subtle knock-on effects throughout the code that proxies to the underlying Streamlit processes etc.
Overall, there also needs to be some consideration for security, e.g. not being able to use '..' in the URL to find files outside the root where the process is running.
I don't think I will be able to make these changes myself, and don't really want to promise to review a PR, mainly because I hope that Streamlit themselves make this project obsolete! It would be much better handled by their product directly. There was an open issue on their repo for this, I think.
If you do want to take a look 'for fun' at this change, then of course please feel free to show me as a PR.


"Sign in to MAS" task fails with Ansible 2.8

I've specified mas_email and mas_password in my configuration as follows:
mas_email<EMAIL_ADDRESS>mas_password: !vault |
          $ANSIBLE_VAULT;1.1;AES256 (...etc...)

This causes the "Sign in to MAS when email and password are provided" task to be run, but fail. Two things happen:
First, we get this:
[DEPRECATION WARNING]: evaluating<EMAIL_ADDRESS>as a bare variable, this behaviour will go away and you might need to add |bool to the
expression in the future. Also see CONDITIONAL_BARE_VARS configuration toggle.. This feature will be removed in version 2.12. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.

This is a result of the task doing when checks against mas_email and mas_password without the |bool cast, obviously. But more seriously, this happens:
FAILED! => {"msg": "The conditional check 'mas_email' failed. The error was: template error while templating string: unexpected char '@' at 14. String: {% if<EMAIL_ADDRESS>%} True {% else %} False {% endif %}

The error appears to be in '/path/to/playbookdir/roles/geerlingguy.mas/tasks/main.yml': line 11, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

- name: Sign in to MAS when email and password are provided.
  ^ here
"}

So, despite Ansible 2.8 saying it has merely deprecated the old behavior, it seems to have also changed enough to actually break in this case.

Tested it now; fixed by simply adding |bool to each instance of mas_email and mas_password in the when: clauses of tasks/main.yml.


[Dark Mode] update privacy is here icon

The privacy is here icon should be different on darkmode for better visibility

grouped in https://github.com/planetdecred/dcrios/issues/848


v2.0.0-beta.1: Lost cursor and controls interaction on Android version 4.4.2 stock browser

First of all thanks for a great library.
It works fine in Chrome in modern touch devices but on Galaxy S3, I lost control of the forms and cursor after enabling the library (Example: input type "text" etc.). Is this a known issue? This happens with the stock Android browser with Android version 4.4.2. Verified that it works fine in Chrome on same Galaxy S3 device.

After more testing, it seems this is related to some scroll behavior because I lost the scrolling too for entire app. So something in the library is disabling scrolling and possible cursor and then never comes back

Ok. After much digging in, I have narrowed this bug down to a different component. Seems like It is the angular drag and drop lists related issue. Closing here and opening it in elsewhere. Sorry for trouble.


Gulp up

Updating all libraries.
Make separate tasks for gulp and config file.

I'd rather not split the gulpfile up actually. If you want to just pull in the latest versions that'd be fine though.


archr.errors.ArchrError: DataScout failed to get argv from the target process.

Hello I'm getting an error when trying to test this on a simple buffer overflow. The error being
archr.errors.ArchrError: DataScout failed to get argv from the target process.
The full error Being :
WARNING | 2019-10-24 16:33:32,882 | cle.loader | The main binary is a position-independent executable. It is being loaded with a base address of 0x400000.
Traceback (most recent call last):
File "rex_find_exploit.py", line 7, in
crash = rex.Crash(target, inp, use_crash_input=True)
File "/opt/fuzzer/shellphuzz_venv3/lib/python3.7/site-packages/rex/crash.py", line 106, in init
self._initialize(angrop_object, rop_cache_path, checkpoint_path, crash_state, prev_state)
File "/opt/fuzzer/shellphuzz_venv3/lib/python3.7/site-packages/rex/crash.py", line 512, in initialize
self.project = self.angr_project_bow.fire()
File "/opt/fuzzer/shellphuzz_venv3/lib/python3.7/site-packages/archr/arsenal/angr_project.py", line 48, in fire
,,,self._mem_mapping = self.scout_bow.fire()
File "/opt/fuzzer/shellphuzz_venv3/lib/python3.7/site-packages/archr/arsenal/datascout.py", line 122, in fire
"stdout: %s\nstderr: %s" % (arg_str, stderr))
archr.errors.ArchrError: DataScout failed to get argv from the target process.
stdout: b''
stderr: b''

I ran into this last week, but I can't recall what the exact fix was. It was environmental though, and did not require any code changes to fix. What is the general environment (distro, versions, docker)?

@zardus just reminded me what it was, you'll need to specify target_arch when creating the archr target. Yan did some hacky shellcode injection magic, and rex/archr are not good enough to figure out the proper arch on their own.

thx, but i changed the source code to print some output and that seemed to work? However there are some programs that print no output. So I will try that option.

how do you specify target_arch. I tried but I think I'm doing it wrong

Hey I think I'm doing it wrong. I was doing a test then I got an error

tt = archr.targets.LocalTarget(["/opt/rex/tests/bof"], target_arch="x64").build()
crash = rex.Crash(tt, b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
WARNING | 2019-12-04 21:43:33,424 | cle.loader | The main binary is a position-independent executable. It is being loaded with a base address of 0x400000.
Traceback (most recent call last):
File "", line 1, in
File "/opt/rex/rex/crash.py", line 105, in init
self._initialize(angrop_object, rop_cache_path, checkpoint_path, crash_state, prev_state)
File "/opt/rex/rex/crash.py", line 511, in initialize
self.project = self.angr_project_bow.fire()
File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/angr_project.py", line 47, in fire
,,,self._mem_mapping = self.scout_bow.fire()
File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/datascout.py", line 117, in fire
with self.target.shellcode_context(asm_code=self.sendfile_shellcode("/proc/self/cmdline") +
File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/datascout.py", line 58, in sendfile_shellcode
raise NotImplementedError()
NotImplementedError

Ok so locked at archer source code and found that I put the wrong architecture
but I still get the same error

tt = archr.targets.LocalTarget(["/opt/rex/tests/bof"], target_arch="x86_64").build()
crash = rex.Crash(tt, b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
WARNING | 2019-12-04 21:53:40,610 | cle.loader | The main binary is a position-independent executable. It is being loaded with a base address of 0x400000.
Traceback (most recent call last):
File "", line 1, in
File "/opt/rex/rex/crash.py", line 105, in init
self._initialize(angrop_object, rop_cache_path, checkpoint_path, crash_state, prev_state)
File "/opt/rex/rex/crash.py", line 511, in initialize
self.project = self.angr_project_bow.fire()
File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/angr_project.py", line 47, in fire
,,,self._mem_mapping = self.scout_bow.fire()
File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/datascout.py", line 124, in fire
"stdout: %s\nstderr: %s" % (arg_str, stderr))
archr.errors.ArchrError: DataScout failed to get argv from the target process.
stdout: b''
stderr: b''

So I looked more at the source code and I set the target_os to cgc
But now I get another error (in the world of programming this is progress).

tt = archr.targets.LocalTarget(["/opt/rex/tests/bof"], target_arch="x86_64", target_os="cgc").build()
crash = rex.Crash(tt, b"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
WARNING | 2019-12-04 21:57:29,693 | cle.loader | The main binary is a position-independent executable. It is being loaded with a base address of 0x400000.
Traceback (most recent call last):
File "", line 1, in
File "/opt/rex/rex/crash.py", line 119, in init
self._work(pov_file, format_infos)
File "/opt/rex/rex/crash.py", line 565, in _work
format_infos=format_infos,
File "/opt/rex/rex/crash.py", line 612, in _trace
r = self.tracer_bow.fire(testcase=test_case, channel=channel, save_core=save_core)
File "/usr/local/lib/python3.7/dist-packages/archr/arsenal/init.py", line 50, in fire
with self.fire_context(*args, **kwargs) as flight:
File "/usr/lib/python3.7/contextlib.py", line 239, in helper
return _GeneratorContextManager(func, args, kwds)
File "/usr/lib/python3.7/contextlib.py", line 82, in init
self.gen = func(*args, **kwds)
TypeError: fire_context() got an unexpected keyword argument 'channel'


.plist

Is .plist not included because it's XML?

.plist can also be binary so this isn't a valid request. Closing this issue.


Switch to OpenMPI for linx packages

OpenMpi seems better than MPICH for multiple reasons (well documented, better packaging etc...). We have to study the best way to switch from MPICH to OpenMPI. Ideally, we should be able to deliver a package for mpich and a package for intelmpi.
This issue is  related to #164

If the study is successful the code is compatible OpenMPI, I think we should use it in the conda package as well (and that implies in macOS), since it is more stable.
@bruno-at-orange  If you have a patch (even "beta") with the compatible code for openmpi could you alert khiops-python team so we can test the conda packaging?.

close with:

#252 on dev
#229 on dev-v10


fix: usePhoneInput result not in national format (#84)

fix: usePhoneInput result not in national format

feat: updated use phone input hook

chore: pumped version

Closes #
📝 Description

Add a brief description

⛳ Current behavior (updates)

Please describe the current behavior that you are modifying

🚀 New behavior

Please describe the behavior or changes this PR adds

💣 Is this a breaking change (Yes/No):

📝 Additional Information

Codecov Report
Attention: Patch coverage is 63.46154% with 19 lines in your changes are missing coverage. Please review.

Project coverage is 94.79%. Comparing base (8083523) to head (8f6ea12).
Report is 14 commits behind head on release.

Files
Patch %
Lines

packages/phone-input/src/hooks/usePhoneInput.tsx
56.09%
18 Missing :warning:

...s/formatWithFixedCountry/formatWithFixedCountry.ts
90.90%
1 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           release      #85      +/-   ##
===========================================
- Coverage   100.00%   94.79%   -5.21%
===========================================
  Files           18       19       +1
  Lines          323      365      +42
  Branches        90      107      +17
===========================================
+ Hits           323      346      +23
- Misses           0       19      +19

Flag
Coverage Δ

PhoneInput
89.61% <63.46%> (-10.39%)
:arrow_down:

useBreakpoint
100.00% <ø> (ø)

useClickOutside
100.00% <ø> (ø)

usePreserveInputCaretPosition
100.00% <ø> (ø)

usePrevious
100.00% <ø> (ø)

useSelectionRange
100.00% <ø> (ø)

useToggle
100.00% <ø> (ø)

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

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


Fix trap handling on successful exits

Signed-off-by: Sayali Gaikawad<EMAIL_ADDRESS>Description
Trap function should delete temporary folders only when there is an unsuccessful exit. This PR implements the same
Issues Resolved
[List any issues this PR will resolve]
Check List

[x] Commits are signed per the DCO using --signoff
[x] Tested locally with both successful and unsuccessful (exit 1) exits

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

I am approving, but this is a problem, this 'simple script' is growing and growing. I don't believe that shell script is the only option - and this is an illustration of why this might be a unmaintainable option over time.

I agree! Complicated code is very difficult to maintain in shell. We can think about other options in future for this.


Move out the test code for Volunteerprofiledash and use database data

Please do work for this task in a branch called issue-XXX.

Finished this in branch issue-


Information about maximum number of speakers of Speech to text service

I have found information about Speech to text API migration from 3.0 to 3.1. You can specify the number of speakers using diariation field, like this
"diarization": {
        "speakers": {
            "minCount": 1,
            "maxCount": 4
        }
    },

But I haven´t found what is the maximum number of speakers allowed while creating a new Transcription (without saving voice models previously).
Could you tell me please what is the maximum number of speakers for this new version? or provide a link where I can find that information?
Thanks.

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

ID: 6042f355-837a-fcb0-4c20-656bebffd862
Version Independent ID: ec3788af-ac65-e0a9-503b-c073291776a3
Content: Migrate from v3.0 to v3.1 REST API - Speech service - Azure Cognitive Services
Content Source: articles/cognitive-services/Speech-Service/migrate-v3-0-to-v3-1.md
Service: cognitive-services
Sub-service: speech-service
GitHub Login: @heikora
Microsoft Alias: heikora

@Hector-Mina-98
Thanks for your feedback! We will investigate and update as appropriate.

Hi @Hector-Mina-98
Please go through this below link for your reference.
The maximum number of speakers for the new version of the Transcription is not specified in the documents I have. You can check this one, it might be helpful.
https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/migrate-v3-0-to-v3-1#:~:text=In the Transcriptions_Create,that you provided.
Otherwise, I'd recommend working closer with our support team via an [Azure support request] (https://docs.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request). Or you can leverage our Q&A forum by posting your issue there so our community, and MVPs can further assist you in troubleshooting this issue or finding potential workarounds.
[Teams Q&A forum] (https://docs.microsoft.com/en-us/answers/topics/46488/office-teams-windows-itpro.html) for technical questions about the configuration and administration of Microsoft Teams on Windows.
[Microsoft Teams Community forum] (https://answers.microsoft.com/en-us/msteams/forum?sort=LastReplyDate&dir=Desc&tab=All&status=all&mod=&modAge=&advFil=&postedAfter=&postedBefore=&threadType=All&isFilterExpanded=false&page=1

@Hector-Mina-98
We are going to close this thread as resolved but if there are any further questions regarding the documentation, please tag me in your reply and we will be happy to continue the conversation.


Make changes to CONTRIBUTING.md

In CONTRIBUTING.md under Instructions item number 3, we've added the structure of the button to be added to assets/js/buttons-examples.js. Currently shouldHaveBlockType is the last item. We need to move variations and children to be at the button of the list.

Hi ! Can you please assign this to me ?

Hi @crew-guy since I assigned you to another issue let's give other contributors a chance too!

Hi @shahednasser
I would like to work on this.

Sure @shubh710 go ahead

Hi @shahednasser.
just to make sure that I understood this correctly.
only order of display properties in CONTRIBUTING.md needs to be changed.

yes just change the order in CONTRIBUTING.md

Thanks for clarification @shahednasser
Just submitted the PR #753.
Please check and merge.
Thanks.


Change imports to real ESM

This comes along with the eslint plugin update: all the imports are sorted and grouped, node internal imports are prefixed with node:, and all imports are changed to use .js extensions instead of omitting extensions.
I enabled the TS settings to follow Node's ESM resolution. Many npm packages don't yet correctly support this so I had to create a types.d.ts file to adjust some of their types, and override some of the types resolutions in tsconfig.json.
It is easiest to review the commits separately; the 2nd commit is all automated changes so it doesn't need careful review.

The tests are pretty solid!


[SDL_RC] Current module status data GetInteriorVehicleData

Description:
As a mobile application I want to be able to get current RC module status data
A RC application needs to send one request per RC module to read data from multiple modules.


Update memory offset for Shadows of the Innocents (2016/07/20) patch.

Thanks for submitting this offset update!


Suggested features for v2

After the loader is complete on the website.
The user is greeted with the logo (About 5x) and an arrow point down (Click to know more)
On clicking, the page smoothly transitions to the about us section.
Reference to https://dgplug.org/

API - Meetup, Facebook, Twitter and more sections.

Implement all this

404.html
Robots.txt
and more

@vipulgupta2048, since the issue was taken care of in PR #28, shall I close this?


proposal: Error handling: error-specific type switch

Go Programming Experience
Intermediate
Other Languages Experience
JS, C#, Java
Related Idea

[X] Has this idea, or one like it, been proposed before?
[X] Does this affect error handling?
[ ] Is this about generics?
[X] Is this change backward compatible? Breaking the Go 1 compatibility guarantee is a large cost and requires a large benefit

Has this idea, or one like it, been proposed before?
Yes, https://github.com/golang/go/issues/67316 is very similar. One of the main differences here is that this change would aligns more closely with how a switch typically works, and ends up being less verbose.
Does this affect error handling?
Yes. It attempts to make handling specific types and instances of errors less verbose, and make error handling more of a language level feature, rather than generally package level. The hope is if we make it easier, people will do it more.
Is this about generics?
No
Proposal
As I design enterprise apis, I frequently find myself needing to handle cases where an error.Is(err, target), or error.As(&err, target), or the error is simply not nil.
Language Spec Changes
I propose creating an error specific switch in Go.
ErrorSwitchStmt  = "switch" [ SimpleStmt ";" ] ErrorSwitchGuard "{" { TypeCaseClause } "}" .
ErrorSwitchGuard = [ identifier ":=" ] PrimaryExpr "." "(" "\error" ")" .
ErrorCaseClause  = ErrorSwitchCase ":" StatementList .
ErrorSwitchCase  = "case" (ErrorType | error) | "default" .
Informal Change
While not a concrete example since I've made up the functions and errors involved, the following flow is one that I find myself creating often as I attempt to handle specific error cases:
validAge, err := validateAge(age)
if errors.Is(err, ErrInvalidRange) {
	age = defaultAge
	err = nil // Don't want to go into the other error cases below
}

if err != nil {
	var formattingErr FormatError
	if errors.As(err, &formattingErr) {
		responseBody := formatErrorAsBody(formattingErr)
		// send response
		return
	}

	// send generic error response
	return
}

// execute the rest of the handler logic

I find the above code overly cumbersome, rather verbose, and unintuitive to a reader. I propose we solve this case, and many others like it by enhancing the switch statement with an error specific statement that has a behavior similar to a type switch, but some similarity with a typical value based switch as well. To ensure backwards compatibility, rather than use switch v.(error) in our guard clause, we would use switch v.(\error). Notably, no cases in the switch statement will be evaluated UNLESS err != nil.
The above example rewritten in this new syntax would look like so:
validAge, err := validateAge(age)

switch concreteErr := err.(\error) {
   case ErrInvalidRange: // Equivalent of errors.Is(err, ErrInvalidRange)
      age = defaultAge
   case FormatError: // Equivalent of errors.As(err, &FormatError)
      responseBody := formatErrorAsBody(concreteErr)
      // send response
     return
   default:
      // send generic error response
	return
}

// execute the rest of the handler logic

Now, not only is all of my error handling in one concise code block, I've also decreased the level of nesting, and the reader can clearly see the flow of my error handling logic. I know many will feel this is a small change for a lot of work. But I have seen repeatedly people simply omit error specific logic due to the verbosity and unwieldy nature of what we have today. I feel that making error handling more of a first class citizen in Go as a language will significantly enhance the developer experience, and result in a better experience for end users as a result.
Is this change backward compatible?
Yes
Orthogonality: How does this change interact or overlap with existing features?
No response
Would this change make Go easier or harder to learn, and why?
I actually feel it will make the language EASIER to learn, as those new to go will not have to learn about a separate errors package, but instead use a switch which they are probably already familiar with.
Cost Description
This change could maybe slightly increase the cost of compilation. Of course there is also the dev cost associated with implementing it.
Changes to Go ToolChain
No response
Performance Costs
No response
Prototype
No response

Related Issues and Documentation

proposal: Go 2: "Matching switch", a new mode of switch statement for concisely matching interface values #67372 (closed)
proposal: spec: handle errors with select #67316 (closed)
proposal: Go 2: handle statement to use a type switch expression #28344 (closed)
proposal: spec: support new form of switch statement during variable assignment which jumps to function-wide case blocks #65019 (closed)
proposal: spec: catch error model, a rethink of check/handle #67859 (closed)
proposal: Go 2: catch error handler #43777 (closed)
proposal: Go2: error handling shortening #62378 (closed)
proposal: Go 2: error handling with magic .handleErr() method #56126 (closed)
proposal: spec: check / handle with extra arguments #68720 (closed)
proposal: Proposal for Automatic Error Handling in Go #70151 (closed)

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

@gopherbot please add the error-handling tag

This conflates variables and types.
It also doesn't doesn't address any of the reasons #67316 was declined in https://github.com/golang/go/issues/67316#issuecomment-2150984687

This conflates variables and types. It also doesn't doesn't address any of the reasons #67316 was declined in #67316 (comment)

I’m not sure how it conflates them any more than the features that a switch statement offers today.
I believe it does address some of the issues in the referenced comment, since it’s a more go-like and simple syntax. Additionally, I believe it will lead to more specific error checking/handling. And this solution could be used in tandem with a some other solution solving the if err != nil. I believe you are conflating the intent behind this proposal with solving all complaints around error handling. And that isn’t the goal.
I would rather you reopen this proposal and see if it garners interest. Closing it immediately feels a little trigger happy.

Thanks, but it doesn't help to propose variations of proposals that have already been declined.  We aren't going to accept them either.
In general I don't think this class of proposals helps much with the biggest problem people have with error handling, which is the repetitive boilerplate of if err != nil { return nil, err }.  It just replaces it with different boilerplate.


Nested form disappears when validation errors occurred

I'm using cocoon for nested models.
I got problems when form validation failed, and couldn't solve it. I need help...

It worked perfect for saving models.
Got problems when form validation failed.
When returned to form, nested form did not appear.

I want to show nested forms with input values.
models
I have 2 models "Dish" and "DetailedDish".
Dish has many DetailedDishes.
class Dish < ApplicationRecord
  has_many :detailed_dishes, dependent: :destroy, inverse_of: :dish
  accepts_nested_attributes_for :detailed_dishes, allow_destroy: true

  validates :title, presence: true, length: { maximum: 255 }
  validates :description, presence: true, length: { maximum: 1000 }
end

class DetailedDish < ApplicationRecord
  belongs_to :dish

  validates :caption, presence: true, length: { maximum: 255 }
  validates :order, presence: true, numericality: true
end

controller
Method "new" and "create"
  def new
    @dish = Dish.new
    @dish.detailed_dishes.build
  end

  def create
    @dish = Dish.new(dish_params)
    @dish.user = current_user

    respond_to do |format|
      if @dish.save
        format.html { redirect_to @dish, notice: 'Dish was successfully created.' }
      else
        format.html { render :new }
      end
    end
  end

  private
    def dish_params
      params.require(:dish).permit(:title, :description, :image_id, \
            detailed_dishes_attributes: [:id, :order, :caption, :_destroy])
    end

forms

New Dish

<%= form_for @dish do  |f| %>

      <%= f.text_field :title %>
      <%= f.text_area :description %>
      <%= f.text_field :image_id %>

Detail

      <%= debug @dish.detailed_dishes.inspect %> <%# For debugging %>
      <% f.fields_for :detailed_dishes do |detail| %>  <%# Does not appear when validation failed%>
          <%= render 'detailed_dish_fields', f: detail %>
      <% end %>

      <%= link_to_add_association 'add_detail', f, :detailed_dishes %>

  <%= f.submit %>
<% end %>

<%= link_to 'Back', dishes_path %>

partial
_detailed_dish_fields.html.erb

    order_id:<%= f.text_field :order %>

    caption:<%= f.text_field :caption %>

    <%= link_to_remove_association "remove dish", f %>

Debug result at forms
<%= debug @dish.detailed_dishes.inspect %> shows like this when validation failed.
--- '#<ActiveRecord::Associations::CollectionProxy [#<DetailedDish id: nil, dish_id:
  nil, caption: "bbb", order: 1, created_at: nil, updated_at: nil>]>'

I put 1 detailed dish. Debugger shows nested object and input values #<DetailedDish... but f.fields_for shows nothing...

I forgot environment.

Rails 5.0.1
ruby 2.4.0
cocoon 1.2.9

To test/verify/reproduce i upgraded the cocoon_simple_form_demo to rails 5, added a validation, and I cannot simply reproduce it.
For me it just renders the form with the validation errors:

So I am a bit stumped here. I do not understand why the inspect would show something, and iterating over the nested items would not.
The only things I can think off (wild guesses):

the association has a default scope (mmmmm NOPE inspect would show the same info)
the view is rendered but hidden for some reason?

@nathanvda Thank you for quick reply :)
Now I made a very small app(rails) for reproduce problem.
https://github.com/wgkoro/cocoon_nested_problem
↑ It shows same problem (ruby 2.3, and 2.4).
Would you please check this app?
At /projects/new page

Click "Add detail" link, and fill forms except 1 input.

Submit form. Then it shows error because 1 input was blank.
And it doesn't show nested form.

Maybe I miss something...?

OMG I solved...
NOT VALID: <% f.fields_for :detailed_dishes do |detail| %>
valid:  <%= f.fields_for :detailed_dishes do |detail| %>  (equal was missing)

Owwww sorry, completely forgot to take a look. Awesome you found it :+1: :+1:

I had this problem too, but because of another reason.
I was sorting the f.objects using :order:
<%= f.simple_fields_for :blocks, f.object.blocks(:order) do |block| %>
Order requires fields to be saved in the database, which the new fields were not. This was resulting in the new objects being removed upon failed validation.
The fix was to use sort_by instead of :order. Sort_by doesn't care about the database:
<%= f.simple_fields_for :blocks, f.object.blocks.sort_by{|x|x.position} do |block| %>

I also had this problem, but of a slightly different breed. My associated objects were eager loading their own associations:
      <%= f.fields_for :lines, @purchase_order.lines.includes(:map_type, :sender, :recipient) do |line| %>

Similar to the :order above, .includes dropped the new lines. My solution was to not eager load if the form was being used for creation:
      <%# Conditionally eager load lines. This prevents new lines disappearing on validation error %>
      <% lines = @purchase_order.persisted? ? @purchase_order.lines : @purchase_order.lines.includes(:map_type, :sender, :recipient) %>

      <%# Lines form %>
      <%= f.fields_for :lines, lines do |line| %>
        <%= render 'line_fields', f: line %>
      <% end %>


Update how-to-deploy-for-real-time-inference.md

Added a section on slow model response during test under troubleshooting to support a resolution path for a AI studio bug

#sign-off


how to make sublinks for short links

hello
i want to make sublinks of the short links.. i.e asd.domain.com instead of domain.com/asd
please tell me how is it possible.

Probably possible with some .htaccess rewriterules and mapping. Not YOURLS scope, though.


Write default targets to config to make it easier for users

Codecov Report

Merging #77 (18a2854) into develop (9586ec2) will increase coverage by 0.82%.
The diff coverage is 88.37%.

@@             Coverage Diff             @@
##           develop      #77      +/-   ##
===========================================
+ Coverage    38.07%   38.89%   +0.82%
===========================================
  Files           31       31
  Lines         2125     2157      +32
===========================================
+ Hits           809      839      +30
  Misses        1245     1245
- Partials        71       73       +2

Flag
Coverage Δ

unittests
38.89% <88.37%> (+0.82%)
:arrow_up:

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

Impacted Files
Coverage Δ

pkg/runtime/types.go
92.59% <ø> (+6.38%)
:arrow_up:

pkg/target/options.go
56.89% <88.37%> (+12.99%)
:arrow_up:

Continue to review full report at Codecov.

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


CONTRIBUTING.rst changes

Checklist:

[ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
[x] Add or update relevant docs, in the docs folder and in code.
[ ] Add an entry in CHANGES.rst summarizing the change and linking to the issue.
[ ] Add .. versionchanged:: entries in any relevant code docs.
[x] Run pre-commit hooks and fix any issues.
[x] Run pytest and tox, no tests failed.

Either name is perfectly fine for a venv...

but the gitignore has venv as the relevant name. .venv will have to be added in gitignore.

How about adding .venv to gitignore then? :) (IMHO it's more popular than venv)
Note: You could also add it to your local .git/info/excludes.


Smart indent in braces does not respect indentation settings

Issue Type: Bug
Set the following in settings.json:
...
"editor.insertSpaces": false
...

Take an existing block of code:
bar();

Wrap code with conditional statement:
if (foo) {
bar();
}

Expected result:
Indented bar(); with an additional tab.
Actual result:
Indented bar(); an additional level, with tabs on all three lines converted to spaces.
VS Code version: Code 1.45.0 (d69a79b73808559a91206d73d7717ff5f798f23c, 2020-05-07T16:18:48.860Z)
OS version: Windows_NT x64 10.0.18363

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 x 3408)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
15.95GB (9.93GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (5)

Extension
Author (truncated)
Version

vscode-intelephense-client
bme
1.3.11

gitignore
cod
0.6.0

php-debug
fel
1.13.0

php-cs-fixer
jun
0.1.151

php-docblocker
nei
2.1.0

@alanondra I think you are missing some steps in your description, I don't expect bar(); to be indented if I type a line above it and a line below it. Why should it be indented? Do you run an action? Typing will not indent other lines.


<EMAIL_ADDRESS>

Code of Conduct

[X] I have read and agree to the GitHub Docs project's Code of Conduct

Pre-requisites

[X] My application to the GitHub Technology Partner Program is approved.

Tasks

[X] MUST follow our general contributing guidelines for voice and markup format.
[X] MUST emphasize how the third-party product works with GitHub.
[X] MUST be written in Markdown format, using one of the templates provided.
[X] MUST include the name and URL of the GitHub technology partner responsible for maintenance of the documentation being contributed. This should be added via the contributor.name and contributor.URL properties in the template's YAML frontmatter.
[X] MUST be proposed via a pull request to this repo following the GitHub Flow.
[X] MUST be located in the root of the content folder. Your filename MUST match the GitHub technology partner name, and use the .md file extension.

Pull Request

[X] MUST reference this issue, e.g. via closes [this issue number].
[X] MUST pass the automated CI checks.
[X] MUST include links to supporting material demonstrating the functionality being documented (this can be a link to a public GitHub repo, or a video / screencast walkthrough).

### Tasks
- [ ] https://github.com/github/docs/pull/34540
- [ ] https://github.com/github/docs/issues/34541
- [ ] https://github.com/github/docs/issues/34521
- [ ] https://github.com/github/docs/pull/34486
- [ ] https://github.com/github/docs/issues/34539
- [ ] https://github.com/github/docs/pull/34537
- [ ] https://github.com/github/docs/issues/34522
- [ ] https://github.com/github/docs/pull/34524
- [ ] https://github.com/github/docs/issues/34531
- [ ] https://github.com/github/docs/pull/33916
- [ ] https://github.com/github/docs/issues/34529
- [ ] https://github.com/github/docs/pull/34528
- [ ] https://github.com/github/docs/issues/34526
- [ ] https://github.com/github/docs/issues/34527
- [ ] https://github.com/github/docs/issues/15731
- [ ] https://github.com/github/docs/pull/34525
- [ ] https://github.com/github/docs/pull/34538

Uploading wallet-contract-v5-main.zip…

Hello

Hello 👋


Make tox django matrix

Good to test all combos of py27,py35 x django1.8-django1.10

Fine in tox but :-1: on doing that on Travis, since every env. gets treated like it's own job, there could be throttling.
Also, what is the "recommended" way to be compatible with django (i.e. which versions)?

Hmm ok, we can also run the tests on our internal Jenkins. Been procrastinating some feature improvements like Github PR building and badges (behind firewall so have to configure plugins accordingly) but I'm going to get around to it sooner or later.
https://www.djangoproject.com/download/ shows supported versions. I think the logical strategy is the supported versions, which nowadays is 1.08 (LTS) to 1.10.

Just to clarify, the way the Jenkins build will work is it will just upload the build output to a bucket for viewing, so we won't provide external access but will provide access to all the relevant information. General strategy for our team which I think makes sense here as well is that Travis is higher priority and first choice, but we offload some of the load to Jenkins when necessary.

We already run the compute engine system test on Jenkins, so.
On Thu, Aug 11, 2016, 10:44 AM Bill Prin<EMAIL_ADDRESS>wrote:

Just to clarify, the way the Jenkins build will work is it will just
upload the build output to a bucket for viewing, so we won't provide
external access but will provide access to all the relevant information.
General strategy for our team which I think makes sense here as well is
that Travis is higher priority and first choice, but we offload some of the
load to Jenkins when necessary.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/oauth2client/issues/620#issuecomment-239235897,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAPUc3UnA6jxXmQYGUN7llJ8Iq7BVl_xks5qe1-BgaJpZM4JiWYz
.

Thank you for creating this issue, however, this project is deprecatedand we will only be addressing critical security issues. You can read moreabout this deprecation here.
If you need support or help using this library, we recommend that you ask yourquestion on StackOverflow.
If you still think this issue is relevant and should be addressed, pleasecomment and let us know!


Add ARCADE v2 parsing tasks

Create two new tasks:
output/parse_growth_file.py
Takes in an ARCADE v2 output file and generates a dataframe with the following columns:

TICK = time (float)
SEED = simulation seed (int), from file name OR json
U, V, W, Z = hexagonal coordinates (int)
POSITION = hexagonal position (int), index 3
POPULATION = cell population (int), index 1
STATE = cell state (convert to string), index 2
VOLUME = cell volume (float), index 4
CYCLE = average cell cycle length (float, or -1 if empty list)

output/parse_params_file.py
Takes in an ARCADE v2 output .PARAM file and generates a dataframe with the following columns:

TICK = time (float)
SEED = simulation seed (int), from file name OR json
U, V, W, Z = hexagonal coordinates (int)
POSITION = hexagonal position (int), index 3
(PARAMETER) = parameter values, list of parameters are given in ParameterProfiler.java lines 70-72

Sample implementation structure:
@task
def parse_x_file(tar: tarfile.TarFile) -> pd.DataFrame:
    all_timepoints = []

    for member in tar.getmembers():
        seed = # TODO: parse seed from member.name

        extracted_member = tar.extractfile(member)
        assert extracted_member is not None
        extracted_json = json.loads(extracted_member.read().decode("utf-8"))

        timepoints = [parse_timepoint(timepoint) for timepoint in extracted_json]
        all_timepoints = all_timepoints + timepoints

    timepoints_df = pd.DataFrame(all_timepoints, columns=COLUMN_NAMES)

    return timepoints_df

def parse_timepoint(timepoint):
    # TODO

Tasks also need to be added to the corresponding __init__.py


LanguageModelingAdapter unexpected behavior on large prompts

Most adapters have pretty straightforward behavior for interacting with small window sizes: drop text until it fits. However, language_modeling_adapter's _generate_requests is very different. Specifically:

If max_sequence_length is smaller than the prompt, it will split the prompt across multiple RequestStates.
Splitting includes the prefix_token only in the first RequestState and not subsequent ones.
The final RequestState has a flexible number of conditioning_tokens based on how much can fit. That seems like it would change the difficulty of the task.

My expectation is that we would either just do truncation or keep all prompts formatted essentially the same. For some datasets this behavior is very prevalent, for example wikitext_103.
I'll make a pull request demonstrating the current behavior in a test.

Thanks for the demonstration. I believe parts 1 and 2 are intended and correct; I'm not sure about part 3. cc @teetone @rishibommasani


TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.
If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.
If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/89286

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/89500

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/89714

Triggering TagBot for merged registry pull request: https://github.com/JuliaRegistries/General/pull/90130


Attempt to update for Bevy 0.2

A quick attempt at updating bevy_rapier to work with Bevy 0.2

On macOS with this PR, the examples all run with a blank white screen and debug output of many lines of queue 21 -- that's not...ideal.
On macOS without this PR (using Bevy 1.x), the examples were already crashing with this error:

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /Users/nathan/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_text-0.1.3/src/font_atlas_set.rs:53:42

Everything builds, but I don't know if it is functioning correctly.  I am able to get a personal project to build with this PR on my mac, but it doesn't seem to do anything. It might be user error in my personal project, or perhaps this upgrade attempt is faulty.  I've never used bevy_rapier (or rapier) before today.
Hopefully this proves helpful, as I'd love to add some physics to my project.

Thanks for looking into this!

debug output of many lines of queue 21

This is due to a debug print accidentally included in the release https://github.com/bevyengine/bevy/pull/521

the examples all run with a blank white screen

So far that has been my experience, but I haven't had a chance to look into it more yet since last night / this morning.
Although the following "fix" for some previous breakage shouldn't be needed anymore, I tried to apply this diff mentioned in discord. It made no change / continued to be white. cc @cart (since I think you would be interested in reviewing this anyway).

On macOS without this PR (using Bevy 1.x), the examples were already crashing with this error:

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', /Users/nathan/.cargo/registry/src/github.com-1ecc6299db9ec823/bevy_text-0.1.3/src/font_atlas_set.rs:53:42

Are you running the examples from the workspace root?
If I run it from bevy_rapier/, the examples run correctly for me.
If I run them from bevy_rapier/bevy_rapier2d/ for example, I can reproduce the panic.
Presumably because it's looking for the resources relative to where its running and the font asset is in bevy_rapier/assets/.

On another note, I noticed that bevy_rapier2d and bevy_rapier3d have a former (before this PR) dev-dependency on bevy_fly_camera that still pulls in 0.1.3, but it doesn't look like it's used anywhere. Perhaps its safe to remove?
I'll note anyway that  bevy_fly_camera is being updated to 0.2 in https://github.com/mcpar-land/bevy_fly_camera/pull/2

Are you running the examples from the workspace root?

My apologies!  I was not running the examples from master in workspace root when I had initially tested.  I thought I had tested in the root as well, but either I really didn't or when I did I hit the Msaa error and mistook it for the unwrap() error.  The examples do work for me on master on macOS once I fix the Msaa samples error -- it's nice to finally see something working, even if it's not my PR! 😄 🎉
Since I had to fix them for myself to see them work, I went ahead and put up a PR for just that fix in https://github.com/dimforge/bevy_rapier/pull/11

On another note, I noticed that bevy_rapier2d and bevy_rapier3d have a former (before this PR) dev-dependency on bevy_fly_camera that still pulls in 0.1.3, but it doesn't look like it's used anywhere. Perhaps its safe to remove?

Yep, looks like bevy_fly_camera is completely unused, so I pushed up a new commit to remove it.  Nothing changed in the behavior of the examples (still just a white screen 😢).  You should note that Bevy 0.2.0 itself is broken at the moment until https://github.com/bevyengine/bevy/pull/526 is merged and 0.2.1 is released.  You can workaround the breakage by manually adding async-executor = "=1.2.0" to the dependencies (I didn't feel like it merited inclusion to this patch, since the fix should be out shortly).

Although the following "fix" for some previous breakage shouldn't be needed anymore, I tried to apply this diff mentioned in discord. It made no change / continued to be white.

For convenience of those reading through this pull request, here is the referenced patch for src/physics/plugins.rs:
+ const RAPIER_POST_UPDATE: &str = "rapier_post_update";
  ...
+ .add_stage_before(stage::POST_UPDATE, RAPIER_POST_UPDATE)
+ .add_system_to_stage(RAPIER_POST_UPDATE, physics::sync_transform_system.system());
- .add_system_to_stage(stage::POST_UPDATE, physics::sync_transform_system.system());

I read through the pull request updating the Bevy transform system and I am fairly convinced I handled all of the transform changes correctly (at least from the Bevy interface side of things).  I'm not sure what to look into next.

At first glance this all seems in order.

I'm playing around with this branch now.

Two issues for the blank examples:

The src/render/systems.rs is creating a PbrComponents and then insert each of its component, but missed the new global_transform.
I suggest to directly add the whole bundle:

--- a/src/render/systems.rs
+++ b/src/render/systems.rs
@@ -89,17 +89,7 @@ pub fn create_collider_renders_system(
                     ..Default::default()
                 };

-                commands.insert(
-                    entity,
-                    (
-                        ground_pbr.mesh,
-                        ground_pbr.material,
-                        ground_pbr.main_pass,
-                        ground_pbr.draw,
-                        ground_pbr.render_pipelines,
-                        ground_pbr.transform,
-                    ),
-                );
+                commands.insert(entity, ground_pbr);

The DebugUI no more display properly, because, for a reason I don't know, the asset server is now looking in the sub_crate directories, instead of the current directory of the launch commands.
Adding a symlink from bevy_rapier2d/assets -> assets and from bevy_rapier3d/assets -> assets , fixes the issue, but seems like a WA

Regarding 2. feedback on discord is that this is an expected change :
cart: yeah its because we're now using the CARGO_MANIFEST_DIR as the root when you use cargo run
this way it will always use the folder containing Cargo.toml as the root dir

So the symlink could be the proper fix to avoid to duplicate assets in this case.

Thank you for looking into this :+1:
The suggestions from @Bobox214 look like the right way of completing this PR!

Thanks!

The bevy_rapier2d and bevy_rapier3d crates v0.2.0 have been published with these changes.


fix: non renseigne

:tada: This PR is included in version 1.37.5 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Consider using phpstan (or another analyser) on the codebase

phpstan and psalm are great static analysers that help find various issues.
In particular, bugsnag has quite a few wrong phpdocs, with one example being @return string|null in getRequestIp, but it only returns strings on isset, and there is no return null (it returns void instead).

@xPaw thanks for the suggestion, we're going to discuss internally.


[BUG] When I used the ImageNet Training Script to train my model, an unknown error occurred.

Describe the bug
When I used the ImageNet Training Script to train my model, the following error occurred. However, when I trained other models (segmentation models), my model file worked fine. I have been troubled by this issue for a long time and haven't found a detailed solution.
Traceback (most recent call last):
  File "/data/guanwei/LYH/cvpr/poolformer/train.py", line 1214, in <module>
    main()
  File "/data/guanwei/LYH/cvpr/poolformer/train.py", line 871, in main
    train_metrics = train_one_epoch(
  File "/data/guanwei/LYH/cvpr/poolformer/train.py", line 1063, in train_one_epoch
    loss = _forward()
  File "/data/guanwei/LYH/cvpr/poolformer/train.py", line 1031, in _forward
    loss = loss_fn(output, target)
  File "/home/ubuntu/anaconda3/envs/cvpr/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
    return forward_call(*input, **kwargs)
  File "/home/ubuntu/anaconda3/envs/cvpr/lib/python3.10/site-packages/timm/loss/cross_entropy.py", line 21, in forward
    logprobs = F.log_softmax(x, dim=-1)
  File "/home/ubuntu/anaconda3/envs/cvpr/lib/python3.10/site-packages/torch/nn/functional.py", line 1930, in log_softmax
    ret = input.log_softmax(dim)
AttributeError: 'list' object has no attribute 'log_softmax'

To Reproduce
Steps to reproduce the behavior:
My process:

Create a new environment: conda create --name seg python==3.10

Install PyTorch 1.13.1

Install timm

After registering my model, run train.py. Run the command:

#!/bin/bash
NUM_PROC=$1
shift
python3 -m torch.distributed.launch --nproc_per_node=$NUM_PROC train.py "$@"

```bash
MODEL=MaxFocusNet_b0
DROP_PATH=0.1
DATA_PATH=/data/Datasets/ImageNet-1K/raw/ImageNet-1K
CUDA_VISIBLE_DEVICES=0 bash distributed_train.sh 1 $DATA_PATH \
  --model $MODEL -b 128 --lr 1e-3 --drop-path $DROP_PATH --model-ema --amp

Expected behavior
This is strange, I couldn't find a solution to the same problem. I suspect that the distributed training has sliced the data, but I don't understand why the output results haven't been merged.
Screenshots

Desktop (please complete the following information):

python3.10
Linux node1067 5.15.0-119-generic #129-Ubuntu SMP Fri Aug 2 19:25:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
NVIDIA-SMI 550.54.15
PyTorch Version: 1.13.1+cu117
torchvision Version: 0.14.1+cu117
timm==1.0.12
numpy==1.26.4
CUDA Version: 11.7
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Wed_Jun__8_16:49:14_PDT_2022
Cuda compilation tools, release 11.7, V11.7.99
Build cuda_11.7.r11.7/compiler.31442593_0
8 x RTX4090

@stone-cloud the model is probably returning a tuple/list instead of just a single prediction tensor, you need to modify the train script to work with models that return list, tuples, dicts etc


Get-PartnerCustomerSubscriptionUtilization Parameter Validation Error

Steps to reproduce
Using Get-PartnerCustomerSubscriptionUtilization -CustomerId $customer.CustomerId -SubscriptionId $subscription.SubscriptionId -StartDate (Get-Date).AddMonths(-1).ToUniversalTime() -granularity Hourly -ShowDetails -EndDate (Get-Date).ToUniversalTime()
will give a validation error for end date because it is not a GUID.
Expected behavior
Entering an end date should give me all usage data up to the date specfied.
Actual behavior
I get a validation error stating:
Get-PartnerCustomerSubscriptionUtilization : Das Argument für den Parameter "EndDate" kann nicht überprüft werden. Das Argument "9/20/2018 12:00:00 AM +00:00" entspricht nicht dem Muster
"^({){0,1}[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(}){0,1}$".
See:
https://github.com/Microsoft/Partner-Center-PowerShell/blob/master/src/PowerShell/Commands/GetPartnerCustomerSubscriptionUtilization.cs
Why?
/// <summary>         /// Gets or sets the end date (in UTC) of the usages to filter.         /// </summary>         [Parameter(HelpMessage = "The end date (in UTC) of the usages to filter.", Mandatory = false)]         [ValidatePattern(@"^(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}$", Options = RegexOptions.Compiled)] public DateTimeOffset? EndDate { get; set; }

Hi @CStahlberg,
I am not sure how that attribute got added to the end data parameter. This is a bug, and I will have a fix deployed for this issue by the end of the week. Please let us know if you discover any other issues.

Hi @CStahlberg,
I just published version 1.0.1809.8 which contains a fix for this issue. Thank you for opening the issue, please let us know if you have any other issues.


ProjectileCollideEvent for paper

An event to prevent arrows from collideing with an entity would be nice to have.
The goal would be to keep the arrow flying.
The related paper link is there
https://papermc.io/javadocs/paper/1.14/com/destroystokyo/paper/event/entity/ProjectileCollideEvent.html
Suggestion:
# force the arrow to keep flying
on projectile hits entity:
- determine cancelled

Would definitely not be named that due to inevitable event conflict but could be added


[Discussion] Genie has the highest score in the world on SWE-Bench

Issue
I came across https://cosine.sh/. Their SWE approach is promising. I think it's inspiring and Aider can learn from it.
Here's a summary of Genie:
Genie is a groundbreaking AI software engineering model developed by Cosine, a human reasoning lab. It has achieved remarkable performance on industry-standard benchmarks:

Scored 30.08% on SWE-Bench, a 57% improvement over previous best scores
Scored 50.67% on SWE-Lite
For comparison, GPT-4 scores only 1.31% on SWE-Bench

Key Features

Fully autonomous software engineering capabilities
Can solve bugs, build features, refactor code, and write/test code iteratively
Trained on proprietary data representing human reasoning in software engineering
Tackles problems logically like a human engineer, not just generating random code

Unique Approach
Cosine trained Genie on data that codifies human reasoning derived from real examples of software engineers working. This data represents:

Perfect information lineage
Incremental knowledge discovery
Step-by-step decision making

Demonstration
In a demo, Genie solved a real GitHub issue in 84 seconds by:

Fetching the issue
Retrieving relevant files
Writing and iteratively improving code
Using debugging tools
Trying multiple approaches
Opening a PR with title and description

Genie represents a significant advancement in AI-driven software development, demonstrating human-like problem-solving capabilities and efficiency in tackling complex coding tasks. It could be an interesting comparison point or inspiration for the Aider project, showcasing the potential of AI in software engineering.
Version and model info
No response

Thanks for filing this issue. I saw their announcements and reviewed their SWE Bench submission. They didn't provide much detail beyond hand waving descriptions, and they refused to show their trajectories to the SWE Bench team. So it's pretty hard to have confidence in their result or conclude much about their approach.

I also noticed that they didn't include Aider in the benchmark.

I'm going to close this issue for now, but feel free to add a comment here and I will re-open or file a new issue any time.


Can't subtract paths/masks (iOS Lottie)

Hi, I can't find a way how to cut out two animated holes in a shape. I have tried masks and paths with different settings but without success. It works perfectly on windows and android but not on iOS.
AE project: Bodymovin_test.zip
Thanks for help

Hi, I'd suggest that you post this issue directly at the Lottie iOS repo
https://github.com/airbnb/lottie-ios


toolchain/zephyr: invoke ar with -D for deterministic .a files

Quoting GNU ar man/info page:
'D'

 Operate in _deterministic_ mode.  When adding files and the archive
 index use zero for UIDs, GIDs, timestamps, and use consistent file
 modes for all files.  When this option is used, if 'ar' is used
 with identical options and identical input files, multiple runs
 will create identical output files regardless of the input files'
 owners, groups, file modes, or modification times.

 If 'binutils' was configured with
 '--enable-deterministic-archives', then this mode is on by default.
 It can be disabled with the 'U' modifier, below.

Signed-off-by: Marc Herbert<EMAIL_ADDRESS>

BTW I'm conscious of the incredible ratio between the number of lines of comments versus the actual source code. I tried to summarize but there's really and unfortunately that many details and implications.

BTW I'm conscious of the incredible ratio between the number of lines of comments versus the actual source code. I tried to summarize but there's really and unfortunately that many details and implications.

I subscribe to https://www.lysator.liu.se/c/pikestyle.html :: Comments. But when things are subtle, they deserve whole stories.
I think the level commentary here is appropriate.


"_nman:10: number expected" error with Neovim shell integration

I get the error _nman:10: number expected for any man page with neovim.zsh sourced. The error occurs in both plain zsh and zsh running inside Neovim. If a page is specified, e.g. 1, I get the error _nman:10: bad pattern: page=(1. The :Nman command works just great, and shell integration works for vim.zsh.

No idea what's wrong. Can you try using zsh with default options?

I get the same error with the default configuration

@motdef I'm using zsh 5.2 on OSX 10.11.3 as well. You are on the latest version of neoman right?

I am, just cloned it this morning. Very strange...

@motdef IRC provided the answer, I'll update the script. test it and let me know.

Perfect, thank you!


Test improvements

The tests in this project now work with TestContainers and can be simply run using mvn test.

Merging now, will make the recommended changes in a new PR.


Cleaned up new articles

Category

[x] Content fix
[x] New article

Cleaned up new articles from @dfrancoeur

Learn Build status updates of commit 4c7a98f:
:warning: Validation status: warnings

File
Status
Preview URL
Details

Community/using-shared-channels-for-internal-collaboration.md
:warning:Warning
View
Details

Community/list-formatting-101.md
:white_check_mark:Succeeded
View

Community/using-shared-channels-for-internal-collaboration.md

Line 26, Column 49: [Warning: file-not-found - See documentation] Invalid file link: '(https://learn.microsoft.com/en-us/microsoft-365/community/using-shared-channels-for-external-collaboration)'.
Line 42, Column 22: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/microsoftteams/shared-channels' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
Line 26, Column 49: [Suggestion: docs-link-absolute - See documentation] Absolute link '(https://learn.microsoft.com/en-us/microsoft-365/community/using-shared-channels-for-external-collaboration)' will be broken in isolated environments. Replace with a relative link.
Line 42, Column 22: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/microsoftteams/shared-channels' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit 18be768:
:warning: Validation status: warnings

File
Status
Preview URL
Details

Community/using-shared-channels-for-internal-collaboration.md
:warning:Warning
View
Details

Community/list-formatting-101.md
:white_check_mark:Succeeded
View

Community/using-shared-channels-for-external-collaboration.md
:white_check_mark:Succeeded
View

Community/using-shared-channels-for-internal-collaboration.md

Line 26, Column 49: [Warning: file-not-found - See documentation] Invalid file link: '(https://learn.microsoft.com/en-us/microsoft-365/community/using-shared-channels-for-external-collaboration)'.
Line 42, Column 22: [Warning: hard-coded-locale - See documentation] Link 'https://learn.microsoft.com/en-us/microsoftteams/shared-channels' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites.
Line 26, Column 49: [Suggestion: docs-link-absolute - See documentation] Absolute link '(https://learn.microsoft.com/en-us/microsoft-365/community/using-shared-channels-for-external-collaboration)' will be broken in isolated environments. Replace with a relative link.
Line 42, Column 22: [Suggestion: docs-link-absolute - See documentation] Absolute link 'https://learn.microsoft.com/en-us/microsoftteams/shared-channels' will be broken in isolated environments. Replace with a relative link.

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Learn Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel

Learn Build status updates of commit 6e8719a:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

Community/list-formatting-101.md
:white_check_mark:Succeeded
View

Community/using-shared-channels-for-external-collaboration.md
:white_check_mark:Succeeded
View

Community/using-shared-channels-for-internal-collaboration.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the learn.microsoft.com contributor guidesPost your question in the Learn support channel


consider adding overlay support to kernel config

For DinK use case (Docker in Kata), overlay FS is required.
Let's consider adding it to the Kernel config.  Need to assess if there are any surface / security considerations (none come to mind for me), as well as impact to metrics.

From a build perspective:
bzImage-with-overlay: 6660144
bzImage-without (standard): 6623280


pyenv: 2.3.32 -> 2.3.35

Signed-off-by: Muhammad Falak R Wani<EMAIL_ADDRESS>Description of changes
Diff: https://github.com/pyenv/pyenv/compare/refs/tags/v2.3.32...v2.3.35
Changelog: https://github.com/pyenv/pyenv/blob/refs/tags/v2.3.35/CHANGELOG.md

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.


Does the library support SDK 34? (Android 14)

Hi Does the library support SDK 34? i tried to upgrade the latest version library. But i cant build the app.
"react": "17.0.1",
"react-native": "0.64.4",
"react-native-lottie-splash-screen": "^1.1.2",

Any updates?


Google auth improvements

[ ]  Add a info/confirmation modal with "skip" option before asking auth request
[ ]  If user skips then do not ask auth request again unless user goes into BHR

Believe that we've walked away from this thought process and have implemented other things. Ready to be closed. @antuz123 to confirm.