[idea] structured logs/report

Rather than rely on string parsing such as this tool oijkn/aws-nuke-exporter, aws-nuke could have an option to output structured logs (--output or --json flag).

assuming it wouldn't be too hard to add it into here:
https://github.com/ekristen/aws-nuke/blob/main/pkg/commands/global/global.go
let me know if you'd like me to give it a shot and open a PR for this

@so0k this was on my backlog of things I wanted to do. The changes would have to start in libnuke, but wouldn't be super hard. JSON is a given format, but what are you wanting the output to have? Do you have an example?
I'm always down for contributors, but this will require to PRs on two repos to make happen, please check out the contributing docs.  I'm following semantic commits, require all commits to be signed. The goal here is to setup some good guidance to allow others to contribute and get things merged quick and reliably instead of them getting stale.

Sounds good @ekristen - I definitely won't have time soon to work on this

This is a little more difficult to implement. Requires several changes, but I like it and I've been working on it.

This would be awesome to have as well. Was seeing if an option was available then saw this! +1 from me

This is a work in progress .. https://github.com/ekristen/aws-nuke/pull/368

@so0k @kieran-lowe @vincenthsh any feedback on how to handle the output when doing prompts like to confirm the run? Put everything into structured logging except for prompts? I suppose I could prevent structured logging when in "interactive" mode, like TTY/terminal with a prompts active.

@so0k @kieran-lowe @vincenthsh any feedback on how to handle the output when doing prompts like to confirm the run? Put everything into structured logging except for prompts? I suppose I could prevent structured logging when in "interactive" mode, like TTY/terminal with a prompts active.

I would propose that the prompts should be left as they are when "interactive" and only the output of the run is what is logged in JSON as I'd argue that is what most want the JSON output for.
Maybe you could have an option where it logs the prompts used on that specific run maybe? So you have this JSON output that shows the results of the run, and the prompts/flags chosen by the user that generated the run.

@so0k @kieran-lowe @vincenthsh any feedback on how to handle the output when doing prompts like to confirm the run? Put everything into structured logging except for prompts? I suppose I could prevent structured logging when in "interactive" mode, like TTY/terminal with a prompts active.

I would propose that the prompts should be left as they are when "interactive" and only the output of the run is what is logged in JSON as I'd argue that is what most want the JSON output for.
Maybe you could have an option where it logs the prompts used on that specific run maybe? So you have this JSON output that shows the results of the run, and the prompts/flags chosen by the user that generated the run.

I agree with @kieran-lowe here @ekristen. Typically non-interactive processes that probably runs on schedule would require this to be able to easily report on the outcomes.

:tada: This issue has been resolved in version 3.39.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


change to the new llvm::Optional APIs

This is a follow-up of https://github.com/apple/swift/pull/62217

@swift-ci test


Does it possible request transaction by id?

find only method for receive list of transaction
https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-Command-Line-Interface-(cardano-wallet-byron)/fc82be65a7bbd0b24f2d0663c12079d2157a7980#transaction-list
older api (v1) have a filter options for get transaction by id
https://docs.cardano.org/technical/wallet/api/v1/?v=1.3.0#tag/Transactions

This is indeed not currently supported by the API.

May you suggest any workaround for it?
Thursday, 7 May 2020, 19:21 +0300 from<EMAIL_ADDRESS><EMAIL_ADDRESS>
This is indeed  not currently supported by the API.
—
You are receiving this because you authored the thread.
Reply to this email directly,  view it on GitHub , or  unsubscribe .

A work around would be to filter the list of results you get from https://input-output-hk.github.io/cardano-wallet/api/edge/#operation/listByronTransactions or https://github.com/input-output-hk/cardano-wallet/wiki/Wallet-Command-Line-Interface-(cardano-wallet-byron)/fc82be65a7bbd0b24f2d0663c12079d2157a7980#transaction-list.
Every resource has an "id" field to filter upon.

ok thanks for quick answer. I also will use start query with value (pending_since.time) from create transaction output for reduce transaction list

This is now tracked in a separate (non public) ticket system as part of our backlog :+1:


Driver does not support GGA quality values > 5

The use of GGA quality values greater than 5 is becoming more common. In particular, Novatel boards announce WAAS as a value of 9.  In this case, the driver would report a -1 for current_fix.status.status. Our solution was to reproogram the GPS to report all quality values of 9 as 2 instead.
I believe this merits discussion on if/how the driver could be changed to be more accommodating.
My concerns are:

The GGA quality values are being abused more and more and the mappings between quality and NavSatStatus.status might not be static.
The NavSatStatus.status message is ill-equipped for the growing variety of solution options.  Currently we can only declare NO_FIX, FIX, GBAS_FIX, SBAS_FIX, which leaves the nmea_navsat_driver little way to communicate the solution type.

Maybe there needs to be an option for the user to submit a rosparam of the mapping table that's appropriate to their device?
Alternatively, use the nmea_sentence topic with an external node to extract the quality (and any other vendor-specific data you care about), and publish it in a form suitable to your application?

I think an optional remapping via rosparam is a good option because of the lack of a formal or even de-facto standard. I wouldn't want to impose specific meanings on developers.  This feature would have allowed us to simply remap the values rather than fork or reprogram the NovAtel.
This also allows us to not worry about future mappings so much, so when GNSS vendors begin making use of additional quality integers, the hard coded mapping doesn't restrict use.
The alternative solution you present seems like a viable resolution to me. Though I think I'm more concerned about what/if anything needs to be amended in this driver to keep it usable into the future.

@ablakey can you please propose a parameter that would remap quality in the way you want. Also, if Novatel is using 9 for WAAS it seems we should add 9 as a supported quality and give it a parameterized default EPE, as I'm doing with the other quality values per issue 17. Do you agree?
Can you test any changes with a Novatel receiver?

I think the simplest implementation would be a map of arrays. Any fix enum in the map has their defaults overridden. It's one parameter and explicit, which is good. Nested collections is not the best but I see no other way around it.
For example, I might want to override two of them with a few more integers:
---
  FIX_STATUS_MAP:
    STATUS_SBAS_FIX:
      - 2
      - 6
    STATUS_GBAS_FIX:
      - 4
      - 5
      - 8
      - 9

I don't know if we still have a WAAS enabled GNSS but I can certainly test the business logic with a NovAtel unit.  Happy to author this modification too!

Andrew - I'd appreciate you providing the modification to support remapping GPS quality values. You have an idea in mind that I don't quite get. It would be best to either fork my fork, which has support for GPS quality 9 and the new parameters that support correct EPE reporting, or wait until Eric has pulled my work into the top of tree. At a minimum, please review what I did so we don't stamp on each other. My fork is at https://github.com/PaulBouchier/nmea_navsat_driver

Hi Paul:
Good idea.  I'll likely approach this work one evening this week. It sounds like forking, or at least collaborating on your fork makes the most sense.
From a quick peek at your work, I'm thinking we might want to consider the value of @mikepurvis's suggestion of allowing a custom override of NMEA mappings (and epe quality?) rather than explicitly defining the mapping in the code. While there might be some common conventions or pseudo-standards for the integer mappings, it may still fall short in cases where the mappings vary from device to device.
A bonus effect of this approach is that we do not alter the behaviour of the driver, possibly breaking fragile implementations that depend on the current mappings.

Thanks for working on this.
Oops - I need to merge my changes into indigo, currently they're only on jade.
I thought the idea was to map one gps_quality to another, with the intent that the second would have an associated epe that would be published in covariance, and to do this remapping with parameters. Is that right?
I thought the use of this would be for some receiver that may emit gps_quality = 3 (an unsupported value), and one could remap it to, say, 2, which has an associated meaning, status, and default epe. Is that right?
About the only thing gps_quality is used for is to set the default epe that feeds into covariance, and to set the gps fix status. My implementation of support for covariance allows those default epe's to be changed with parameters.  I don't understand "epe quality" when you say "allowing a custom override of NMEA mappings (and epe quality?) rather than explicitly defining the mapping in the code". Did you mean gps_quality? epe default can receive a custom override via parameters as now implemented.
Just trying to make sure we're on the same page. As you say, keeping the default behavior of the driver has a lot of merit.

Added support for gps_quality 9 in pull request #19 for jade & #20 for indigo

Yeah I think we're on the same page, just framing the problem from different perspectives.
The bottom line is that with the current proposed changes, if your quality is any value that is NOT:  1,2,4,5,9  then it sets:  current_fix.status.status = NavSatStatus.STATUS_NO_FIX   which is wrong.
I was thinking about a way to have default mappings for 1,2,4,5,9  but allow a user to provide params that override these.  Pseudocode:
custom_qual_map = rospy.get_params('override_qualities')
qual_values = custom_qual_map.get(gps_qual) or default_qual_map.get(gps_qual)
if qual_values:
    self.fix_type = qual_values['fix_type']
    self.default_epe = qual_values['default_epe']
    current_fix.status.status = qual_values['navsat_status]
else:
    self.fix_type = 'Unknown'
    current_fix.status.status = NavSatStatus.STATUS_NO_FIX

Obviously less awful var names but you probably get the gist.
We can definitely consider it for this or a different pull request.

OK now I think I get the idea better. Makes sense. FYI I submitted a pull request for the work I did to try & at least get it into the source repo to support the Skytraq RTK GPS receiver which they're announcing this week and stating ROS support.

@PaulBouchier I've got some time this week to approach this.  What do you think the best method is for moving forward? Should I fork your fork and raise a PR for you to fold into the existing PRs?  Or should I await your PRs to be merged first? They'll conflict considerably, so I suspect doing it in parallel is a bad idea.

@mikepurvis @ericperko Can you guys please advise on the timeframe for merging pull requests 19 & 20. Do you have any concerns with it? Andrew needs to know what to base his further work on, and it should be made to properly support the new RTK GPS modules.

I've reviewed #19. Once we get that into a state we like, it should be cherry-picked back to Indigo (rather than merged).
@ablakey Suggest you work from Paul's branch with an expectation that you'll rebase your work to ros-drivers and merge there when complete.

I'm closing this issue as I believe it was mostly solved in PR #46. If there are specific issues that remain unaddressed, please file new issues.


Try to regroup static field checks done at build time in a single class

To limit the amount of classes configured as initialized at build time to increase the robustness of our support.

Superseded by https://github.com/spring-projects/spring-framework/issues/25795.


Why not add Newtonsoft.Json.Linq.JsonMergeSettings ?

Hi,
In order to be able to merge JContainer with settings, it is required to create a JsonMergeSettings with is not included with the C# subset.
Could it be possible to add it to the subset ?

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

ID: 2a90be78-63d0-8ee0-d1d6-a9280e2ba892
Version Independent ID: 500c452d-372b-92a9-dfca-b2586669a9bf
Content: Azure API Management policy expressions
Content Source: articles/api-management/api-management-policy-expressions.md
Service: api-management
GitHub Login: @dlepow
Microsoft Alias: danlep

@gui2dev
Thanks for your feedback! We will investigate and update as appropriate.

@gui2dev - Thanks for the feedback. If I understand, you're suggesting an enhancement to the .NET framework types that are supported in policy expressions, not a documentation issue. For API Management feature requests, please go to https://aka.ms/apimwish. If I misunderstood, please feel free to continue this discussion here, otherwise I will close this issue. Thank you.

Closing this issue. Thanks again @gui2dev.
#please-close


randomly down-sampling

Hello, I used the randomly down-sampling enhancement strategy (waymo->KITTI), but the performance is particularly poor, more than ten points lower than the performance without using randomly down-sampling. I have a question. Waymo is obtained by a 64-beam +4 200-beam LiDARs. The effective distance of the 200-beam LiDAR is 20m. The code you provided is to set a threshold to generate a beam mask, which seems unreasonable. Can you provide the downsampling code for down-sampling in the paper?

For simplicity, the first 64 beams of a 200-beam lidar have the same mask probability as a 64-beam lidar.
The downsampling algorithm in this repo is the same as in the paper, except in this repo the mask probability is given directly in config.

Hello, I used the randomly down-sampling enhancement strategy (waymo->KITTI), but the performance is particularly poor, more than ten points lower than the performance without using randomly down-sampling. I have a question. Waymo is obtained by a 64-beam +4 200-beam LiDARs. The effective distance of the 200-beam LiDAR is 20m. The code you provided is to set a threshold to generate a beam mask, which seems unreasonable. Can you provide the downsampling code for down-sampling in the paper?

I have encountered some issues. May I know which torch version and spconv version you are using?

torch==1.10.1
spconv==2.1.21


Alert has an unrecognized area: 'ביר הדאג

System Health details
System Information

version
core-2024.4.3

installation_type
Home Assistant Container

dev
false

hassio
false

docker
true

user
root

virtualenv
false

python_version
3.12.2

os_name
Linux

os_version
6.1.24-v8+

arch
aarch64

timezone
Asia/Jerusalem

config_dir
/config

Home Assistant Community Store

GitHub API
ok

GitHub Content
ok

GitHub Web
ok

GitHub API Calls Remaining
4988

Installed Version
1.34.0

Stage
running

Available Repositories
1401

Downloaded Repositories
29

Home Assistant Cloud

logged_in
false

can_reach_cert_server
ok

can_reach_cloud_auth
ok

can_reach_cloud
ok

Dashboards

dashboards
6

resources
17

views
9

mode
yaml

Recorder

oldest_recorder_run
April 4, 2024 at 10:54

current_recorder_run
April 14, 2024 at 16:16

estimated_db_size
99.50 MiB

database_engine
mysql

database_version
11.3.2

Checklist

[X] I have enabled debug logging for my installation.
[X] I have filled out the issue template to the best of my ability.
[X] This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
[X] This issue is not a duplicate issue of any previous issues..

Describe the issue
Hi!
The Oref integration started generating the log below:
This error originated from a custom integration.
Logger: custom_components.oref_alert
Source: custom_components/oref_alert/coordinator.py:94
integration: Oref Alert (documentation, issues)
First occurred: 17:25:04 (82 occurrences)
Last logged: 17:27:46
Alert has an unrecognized area: 'ביר הדאג
Reproduction steps

Send hundreds of iranian missiles to Israel

...
Debug logs
2024-04-14 17:43:13.631 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration oref_alert which has not been tested by Home Assistant.  The alert is coming with a single quote as the first character of the area name instead of its last character:

The area is spelled correctly in the metadata file of Pikud Ha-Oref which lists all areas.
I'll add a workaround: if the first character of the area name in the incoming alert is a single quote, put the character at the end of the name. (Ugly, but there is no much we can do about it.)

Fixed by v2.11.0.


introduced logs streaming mechanism for current and previous session …

…logs

Probably we should tag this version as 1.1.0 after merging


How to use Plasma In-Memory Object Store from R?

Are there any plans for supporting Plasma in R? I couldn't find anything similar to pyarrow.plasma in R package arrow.

I didn't see a JIRA so I opened one
https://issues.apache.org/jira/browse/ARROW-6747


Issue with k8s.io/zh/docs/home/

This is a Bug Report

Problem:
Proposed Solution:
Page to Update:
https://kubernetes.io/...

any details?

/triage needs-information

/close


Test againts bitcoin core 0.17.0

Silly PR.

For the record, signrawtransaction was removed and the regtest and testnet bitcoin.conf entries now need regtest. and test. prefixes. There might be more things, these definitely will be issues.

I added a commit to make it work


Bogus guillotine collision ?

There might be a bug in the display of the blood stains in the guillotine trap, cf. attached screenshot.
Already happened twice on level 122 (https://princejs.com/?level=122&health=10&time=59&strength=100&width=0), once in the previous guillotine, Prince was falling down after killing the guard and got it back "chopped off", and once here running through this guillotine, getting its back foot "chopped off" but not dying.

Actually, I'm not entirely sure what's going on, something's very wrong with that current instance . Prince doesn't ever "fall"...

This is happening on {   "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.71 Safari/537.36" }

Ok, I had a look. My Version is:
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36'
But I think it should not make a difference. I played the level 122 now again, and I cannot see those strange effects.
Can you reproduce it every time, or only randomly.
Please also be aware that all custom made levels (>=100) are not that good tested as the original ones... (most should work, but some have glitches)...

I'm playing ~every night (big THANKS to you btw!), this was a one-off issue.

Thanks a lot. Happy that someone also plays the custom levels. If it was an one-off, it's hard to reproduce. Therefore I close for now...

Actually, I just reproduced it. Consider the following screenshot:

Kill the guard, then climb on the upper left platform, jump on the upper right trigger, then have Prince walk carefully on the very lip of the trigger, then press "Up".  All the issue are there, he no longer fall either.

Btw, it's 100% reproducing now with the flow described (reproduced it another 2x time after my previous comment).

Cool, I will check it...

Thanks again for finding this issue.
The coincidence, being chopped during free fall, lets him resurrect as Zombie Prince during landing... 🧟
I fixed this hidden feature 😀


[NF-20097] Add the documentation for applicant details

We're adding the documentation for the Applicant Details API endpoint, this endpoint allows you to edit the redirect_eligible column from the details table. Note that this endpoint is limited 1000 records per call.
Linked PR: https://github.com/Liaison-Intl/WebAdMIT/pull/7517

@Bunter @dquimper I addressed your comments, let's not merge this until it's deployed to PROD otherwise the documentation will be live while the code is not deployed yet.

Indeed 😅


When left side of one rectangle ovelaps with the right side of the other rectangle, rectangles are considerd as not intersecting.

It would be good to clarify how IntersectsWith method handles rectangles that overlap borders, X == r.X + Width. WinForms consider this case as not an intersection. WPF considers this as an intersection but does not document this fact either:https://docs.microsoft.com/en-us/dotnet/api/system.windows.rect.intersectswith?view=netframework-4.7.1#System_Windows_Rect_IntersectsWith_System_Windows_Rect_
The difference between the frameworks is confusing. This could be documented with a sample or even a pointer to reference source website.
Another good note would be to mention that this method ignores integer overflows and might be inaccurate due to this fact.

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

ID: 7f5cd207-cade-dd01-bfe0-5303b2bacf49
Version Independent ID: 931eae53-8fac-b6d6-6324-ca94473f610a
Content: Rectangle.IntersectsWith(Rectangle) Method (System.Drawing)
Content Source: xml/System.Drawing/Rectangle.xml
Service: unspecified
GitHub Login: @dotnet-bot
Microsoft Alias: dotnetcontent

Thanks @Tanya-Solyanik. I've added this to our backlog. But if you'd like to contribute and make the changes sooner, we can review your PR and help you to get that fixed.


undefined local variable or method `ruby_version' on macOS 10.13 beta

There is a bug in check_ruby_version. It occur on MacOS 10.13 beta because it ships with Ruby 2.3.3.
I didn't figure up how to make brew tests work, but i made some workarounds changes to check my code and it should to be work.
Fixes https://github.com/Homebrew/brew/issues/2737

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same change?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?
[x] Have you written new tests for your changes? Here's an example.

Great work here @constXife! Thanks for your first contribution to Homebrew!  You rock!

Anyone get a solution for this?


Remove assert for XCB_GE_GENERIC

Closes #257
This looks like a logical mistake in the code.  The events logic is the following:
pub(crate) unsafe fn resolve_event(
    event: *mut xcb_generic_event_t,
    extension_data: &[ExtensionData],
) -> Event {
    let response_type = (*event).response_type & 0x7F;

    if response_type == XCB_GE_GENERIC {
        //  Special handler for GE_GENERIC
    }

    for data in extension_data {
        if response_type >= data.first_event && data.first_event != 0 {
            // Handle extensions here
        }
    }

    x::Event::resolve_wire_event(0, event) // CRASH HERE

We can either refactor resolve_event to avoid going into resolve_wire_event if the first check passes. Or we can simply remove the debug assert. The resolve_wire_event will gracefully return None in this case.resolve_wire_event

closed by #260


Bug: the plugin attempts to run over node_modules files when using the latest version + pnpm

After updating the from version 1.6.5 to 1.7.0, we started getting the following errors over almost every file in my node_modules folder:
<EMAIL_ADDRESS>because it would overwrite input file.  .
For reproducing

open a default create-vue project
add the following dependencies:

    "@sentry/tracing": "^7.8.1",
    "@sentry/vue": "^6.19.7",

add the vite-plugin-dts plugin in 1.7.0
run pnpm i
build the project

I try both in Windows and Linux, this issue cannot be reproduced.
Could you provide a reproduction with exact steps?

I try both in Windows and Linux, but this issue cannot be reproduced.
Could you provide a reproduction with exact steps?

same error here, you can avoid it if add exclude option on your DTS:
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
import dts from 'vite-plugin-dts';

export default defineConfig({
   plugins: [
       dts({
           skipDiagnostics: false,
           insertTypesEntry: true,
           tsConfigFilePath: resolve(__dirname, 'tsconfig.json'),
           entryRoot: resolve(__dirname, 'src'),
           exclude: ['node_modules', '../../node_modules'] // here, in my case I am working with turborepo, and add parent node_modules
       }),
       react()
   ],

   build: {
       lib: {
           entry: resolve(__dirname, 'src/index.ts'),
           name: '@preaestate/psa-chart',
           formats: ['es'],
           fileName: 'index'
       },
       rollupOptions: {
           external: ['react', 'react-dom', 'styled-components'],
           output: {
               globals: {
                   react: 'React',
                   'react-dom': 'ReactDOM',
                   'styled-components': 'styled'
               }
           }
       }
   }
});

`

This issue seems to have been fixed in past updates, so close it now.
Might reopen if any update.


@roadiehq/scaffolder-backend-module-http-request: Wrong backstage URL generated

The URL generated when in the action when the path is /api/azure-devops/health is  http://localhost/:7000$%20/api/azure-devops/health as opposed to:
 http://localhost:7000/api/azure-devops/health
I copied the example software template for a GET request and changed path to  $ {{ parameters.httpGetPath }}
Expected Behavior

URL used in HTTP call should be  http://localhost:7000/api/azure-devops/health
Current Behavior

URL used in HTTP call is http://localhost/:7000$%20/api/azure-devops/health
Steps to Reproduce

Copy the GET example from https://www.npmjs.com/package/@roadiehq/scaffolder-backend-module-http-request and register the software template
In the 'get path' form field in the template, add /api/{an API that works}
Possible Solution

Context

Your Environment

@backstage/catalog-react version:
@backstage/integrations version:

I changed the value for the path key to  '{{ parameters.httpGetPath }}' from
 ${{ parameters.httpGetPath }}


Deadlock in statusConnectionPool

Deadlock occurs at statusConnectionPool.OnFailure.
https://github.com/elastic/elastic-transport-go/blob/v8.5.0/elastictransport/connection.go#L184
	sort.Slice(cp.dead, func(i, j int) bool {
		c1 := cp.dead[i]
		c2 := cp.dead[j]
		c1.Lock()
		c2.Lock() // <- here
		defer c1.Unlock()
		defer c2.Unlock()

		res := c1.Failures > c2.Failures
		return res
	})

Here is my hypothesis:
	/*
		Initially using Pool 1

			Goroutine 1:                                        |  DiscoverNodes()  | Pool 2
			Goroutine 2: get Pool 1 node        OnFailure()     |                   |  ...............{resurects on Pool 1}
			Goroutine 3: get Pool 1 node                        |                   |  OnFailure()
			Goroutine 4: get Pool 1 node                        |                   |  ....................................OnFailure()
	*/

Here is my test function:
package elastictransport

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	_ "net/http/pprof"
	"net/url"
	"sync"
	"testing"
	"time"
)

type ctxKey int

const shouldError, onTransport = ctxKey(1), ctxKey(2)

var someErr = errors.New("some error")

type mockTransport struct {
	t *testing.T
}

func (m *mockTransport) RoundTrip(req *http.Request) (*http.Response, error) {
	switch req.URL.Path {
	case "/_nodes/http":
		n := nodeInfo{}
		n.HTTP.PublishAddress = "localhost:1234"
		n2 := nodeInfo{}
		n2.HTTP.PublishAddress = "localhost:5678"
		return m.fromJson(map[string]map[string]nodeInfo{
			"nodes": {
				"es0": n,
				"es1": n2,
			},
		}), nil
	default:
		if f, ok := req.Context().Value(onTransport).(func()); ok {
			f()
		}
		if y, _ := req.Context().Value(shouldError).(bool); y {
			return nil, someErr
		}
		return &http.Response{
			StatusCode: 200,
			Body:       io.NopCloser(bytes.NewReader(nil)),
		}, nil
	}
}

func (m *mockTransport) fromJson(v interface{}) *http.Response {
	b, err := json.Marshal(v)
	if err != nil {
		m.t.Fatal(err)
	}
	return &http.Response{
		StatusCode: 200,
		Body:       io.NopCloser(bytes.NewReader(b)),
	}
}

type lg struct{}

func (lg) Log(a ...interface{}) error {
	fmt.Println(a...)
	return nil
}
func (lg) Logf(format string, a ...interface{}) error {
	fmt.Printf(format, a...)
	return nil
}

func TestDeadlock(t *testing.T) {
	go func() {
		http.ListenAndServe(":8080", nil)
	}()
	debugLogger = lg{}
	defaultResurrectTimeoutInitial = 10 * time.Second

	var (
		transport http.RoundTripper = &mockTransport{t}
		makeReq                     = func(ctx context.Context) *http.Request {
			t.Helper()
			req, err := http.NewRequestWithContext(ctx, "GET", "", io.NopCloser(bytes.NewReader(nil)))
			if err != nil {
				t.Fatal(err)
			}
			return req
		}
	)
	u, err := url.Parse("http://localhost:9200") // just the initial node
	if err != nil {
		t.Fatal(err)
	}

	c, err := New(Config{
		Transport:    transport,
		URLs:         []*url.URL{u, u},
		DisableRetry: true,
	})
	if err != nil {
		t.Fatal(err)
	}

	c.DiscoverNodes()

	/*
		Initially using Pool 1

			Goroutine 1:                                        |  DiscoverNodes()  | Pool 2
			Goroutine 2: get Pool 1 node        OnFailure()     |                   |  ...............{resurects on Pool 1}
			Goroutine 3: get Pool 1 node                        |                   |  OnFailure()
			Goroutine 4: get Pool 1 node                        |                   |  ....................................OnFailure()
	*/

	var (
		firstPhaseWg,
		secondPhaseWg,
		thirdPhaseWg,
		getPoolWg,
		discoverNodesWg sync.WaitGroup
	)

	var firstPhases = func(c *Client) {
		defer firstPhaseWg.Done()
		ctx := context.Background()
		ctx = context.WithValue(ctx, shouldError, true)
		ctx = context.WithValue(ctx, onTransport, func() {
			getPoolWg.Done()
		})
		c.Perform(makeReq(ctx))
	}

	var discoverNodesPhase = func(c *Client) {
		defer discoverNodesWg.Done()
		getPoolWg.Wait()
		c.DiscoverNodes()
	}

	var secondPhases = func(c *Client) {
		defer secondPhaseWg.Done()
		ctx := context.Background()
		ctx = context.WithValue(ctx, shouldError, true)
		ctx = context.WithValue(ctx, onTransport, func() {
			getPoolWg.Done()
			firstPhaseWg.Wait()
			discoverNodesWg.Wait()
		})
		c.Perform(makeReq(ctx))
	}

	var thirdPhases = func(c *Client) {
		defer thirdPhaseWg.Done()
		ctx := context.Background()
		ctx = context.WithValue(ctx, shouldError, true)
		ctx = context.WithValue(ctx, onTransport, func() {
			getPoolWg.Done()
			secondPhaseWg.Wait()
			time.Sleep(10 * time.Second)
		})
		c.Perform(makeReq(ctx))
	}

	runPar := func(n int, wg []*sync.WaitGroup, f func(*Client), c *Client) {
		for _, w := range wg {
			w.Add(n)
		}
		for i := 0; i < n; i++ {
			go f(c)
		}
	}

	var N = 10
	runPar(N, []*sync.WaitGroup{&firstPhaseWg, &getPoolWg}, firstPhases, c)
	runPar(N, []*sync.WaitGroup{&secondPhaseWg, &getPoolWg}, secondPhases, c)
	runPar(N, []*sync.WaitGroup{&thirdPhaseWg, &getPoolWg}, thirdPhases, c)
	runPar(1, []*sync.WaitGroup{&discoverNodesWg}, discoverNodesPhase, c)

	thirdPhaseWg.Wait()

	fmt.Println("pool urls", c.pool.URLs())
	fmt.Println("deads", c.pool.(*statusConnectionPool).dead)
}

I can consistently get it to deadlock, and when I open http://localhost:8080/debug/pprof/goroutine?debug=1 I get this profile
1 @ 0x43b356 0x44ca0f 0x44c9e6 0x4694e6 0x474065 0x73d745 0x73d71d 0x490251 0x49083d 0x48fd9a 0x73d429 0x741c09 0x74bda9 0x46d701
#	0x4694e5	sync.runtime_SemacquireMutex+0x25										/home/<user>/go1.20.11/go/src/runtime/sema.go:77
#	0x474064	sync.(*Mutex).lockSlow+0x164											/home/<user>/go1.20.11/go/src/sync/mutex.go:171
#	0x73d744	sync.(*Mutex).Lock+0xa4												/home/<user>/go1.20.11/go/src/sync/mutex.go:90
#	0x73d71c	github.com/elastic/elastic-transport-go/v8/elastictransport.(*statusConnectionPool).OnFailure.func1+0x7c	/home/<user>/github.com/elastic/elastic-transport-go/elastictransport/connection.go:184
#	0x490250	sort.insertionSort_func+0xb0											/home/<user>/go1.20.11/go/src/sort/zsortfunc.go:12
#	0x49083c	sort.pdqsort_func+0x2dc												/home/<user>/go1.20.11/go/src/sort/zsortfunc.go:73
#	0x48fd99	sort.Slice+0xf9													/home/<user>/go1.20.11/go/src/sort/slice.go:26
#	0x73d428	github.com/elastic/elastic-transport-go/v8/elastictransport.(*statusConnectionPool).OnFailure+0x268		/home/<user>/github.com/elastic/elastic-transport-go/elastictransport/connection.go:180
#	0x741c08	github.com/elastic/elastic-transport-go/v8/elastictransport.(*Client).Perform+0x9a8				/home/<user>/github.com/elastic/elastic-transport-go/elastictransport/elastictransport.go:386
#	0x74bda8	github.com/elastic/elastic-transport-go/v8/elastictransport.TestDeadlock.func6+0x148				/home/<user>/github.com/elastic/elastic-transport-go/elastictransport/a_test.go:172

Suggested fix: in *Client.Perform:

Save the pool to a local variable when calling .Next()
Use the local var when calling OnSuccess() or OnFailure()

Thanks.

Hi @kuningfellow,
Thank you for this very detailed issue, I agree there seems to be a deadlock.
I also think there's a race condition in your test code, runPar should read:
runPar := func(n int, wg []*sync.WaitGroup, f func(*Client), c *Client) {
  for i := 0; i < n; i++ {
	  for _, w := range wg {
		  w.Add(i)
	  }
	  go f(c)
  }
}

Otherwise there's a discrepancy between the number of active goroutines and the number declared in the WaitGroup.
Using this version I believe locking the connections found in the dead slice is unneeded. The connection pool is already locked in the beginning of OnFailure which should prevent concurrent access while the slice is reordered.
My tests are conclusive that removing the locks like this, solves the issue:
	sort.Slice(cp.dead, func(i, j int) bool {
		c1 := cp.dead[i]
		c2 := cp.dead[j]

		res := c1.Failures > c2.Failures
		return res
	})

Can I ask you test on your end and report your findings ?
Thanks again!

Hi @Anaethelion ,
The discrepancy between the WaitGroups are intentional. It is intended to induce as much of a race condition as possible.
If I update my runPar as your suggestion, it will not trigger a deadlock.
It's true that the connection pool is locked before OnFailure. But the problem lies because OnFailure might operate on a different pool than initial call to Next
Thanks for the reply!

@Anaethelion Couldn't we just save the pool to a variable like so?
This fixes the race condition. But I'm not sure if it will break something else.
diff --git a/elastictransport/elastictransport.go b/elastictransport/elastictransport.go
index d9b2f85..89be42c 100644
--- a/elastictransport/elastictransport.go
+++ b/elastictransport/elastictransport.go
@@ -335,12 +335,16 @@ func (c *Client) Perform(req *http.Request) (*http.Response, error) {
                        conn            *Connection
                        shouldRetry     bool
                        shouldCloseBody bool
+                       pool            ConnectionPool
                )

-               // Get connection from the pool
+               // Get pool from client
                c.Lock()
-               conn, err = c.pool.Next()
+               pool = c.pool
                c.Unlock()
+
+               // Get connection from the pool
+               conn, err = pool.Next()
                if err != nil {
                        if c.logger != nil {
                                c.logRoundTrip(req, nil, err, time.Time{}, time.Duration(0))
@@ -382,9 +386,7 @@ func (c *Client) Perform(req *http.Request) (*http.Response, error) {
                        }

                        // Report the connection as unsuccessful
-                       c.Lock()
-                       c.pool.OnFailure(conn)
-                       c.Unlock()
+                       pool.OnFailure(conn)

                        // Retry upon decision by the user
                        if !c.disableRetry && (c.retryOnError == nil || c.retryOnError(req, err)) {
@@ -392,9 +394,7 @@ func (c *Client) Perform(req *http.Request) (*http.Response, error) {
                        }
                } else {
                        // Report the connection as succesfull
-                       c.Lock()
-                       c.pool.OnSuccess(conn)
-                       c.Unlock()
+                       pool.OnSuccess(conn)
                }

                if res != nil && c.metrics != nil {

Sorry for the diff. I haven't got permission to push a branch.

Saving the pool to a variable solves the race condition, it doesn't really solves the concurrency problem.
Discovery would periodically overwrite the statusConnectionPool underneath the transport thus resulting in a data loss of the state of known nodes.
Saving the current connection to a local variable feels more like a performance optimization. It could prove faster at a small memory cost, but that would need to be benchmarked!


Unable to update or delete task when the tasker demon running

Hi，
i saw the Tasker's properties are private. Can u add corresponding interfaces?

hello, we can keep the properties private but expose Funcs for these operations (guarded by a sync.Mutex).
would you be interested for such a PR? thanks

Sure，it can solve my problem. Thanks。

no prob, would you like to create a PR?

i will try.


Pruning unused redirects

Seeing as the mass-delete plugin is hosted on this github repository, I thought this might be the best place to post this. Apologies if it's not.
What I would like is a pruning plugin - a plugin which removes no longer used redirects for privacy reasons. Who knows what I've shortened 2 years ago to share once and then never again.
Since I've done manual pruning myself, I thought it might be helpful to simply share the two SQL queries I used for anyone with a similar problem or intention to make the plugin. I did it through two steps:

create table with backups
remove entries from main table.

These two queries remove all URLs which have not been clicked on in the last N days. By default it's 30 days. To change it to another number, edit the "30" in "INTERVAL 30 day". All deleted URLs remain in the deleted_urls table, where they can be recovered from later. If you're 100% confident that you don't need the deleted urls, you can delete the deleted_urls table afterwards.
CREATE TABLE deleted_urls as (     SELECT *      FROM yourls_url      WHERE keyword IN (         SELECT shorturl         FROM (             SELECT shorturl, max(click_time) as lastclick              FROM yourls_log              GROUP BY shorturl         ) a          WHERE a.lastclick < DATE_SUB(NOW(), INTERVAL 30 day)          ORDER BY lastclick DESC     )     ORDER BY clicks DESC )
and then to delete:
delete from yourls_url where keyword in (select keyword from deleted_urls)

Also, will good if I can delete only links without clicks and less than, for example, 2 clicks also.
But another problem, as I understand, there is no way to reuse free urls again. If I delete yourls.org/2Mz, the script don't create it again by itself.

I wouldn't call it a problem that deleted URLs aren't recreated. It's better to have YOURLS report that the keyword isn't found than to redirect to something other than was intended, if the link has been shared somewhere.

@balohmatevz thank you, neat tip
@seventhsite: cool URIs dont change. Recycling URLs and redirecting somewhere else it used to should not be the standard behavior (granted, some cases might need it but simple plugins to the rescue here)


Props with true value

Do I need to specify shadow={true}?
Value true should be optional(?).
 <Panel title="Employees" layout="fit" flex={1} margin="20" shadow={true}>
In this example, the exactly prop is not followed by true.
<Match
  pattern="/messages/:userId"
  component={ExampleComponent}
  exactly
/>

You are correct, true is not needed in this case.  I will update the boilerplate.

Actually, upon further review, it looks like omitting the value results in a parsing error in the reactor-webpack-plugin.  Apparently acorn-jsx doesn't like it.  Looking into this further...

This should now be fixed.  I switched the parser for the webpack plugin from acorn to babylon.


Docker image build fails during "go get" (gopls)

The whole "go get" command inside Dockerfile returns a non-zero error code, causing the image build to fail.
I've isolated the failure to the package "gopls":
The command '/bin/sh -c go get -u -v golang.org/x/tools/cmd/gopls' returned a non-zero code: 1

This was resolved, but we neglected to close the issue.


Add basic mocks to some routes

gets things rolling on: https://github.com/appcelerator/amp/issues/678

I'm going to convert the inline data access code into an account data package, so the account data package can then be converted to using a real backing store.

Next step, create data interface.

Should we go ahead and merge this to [0.6x] and then start doing incremental PR's from there?


mypy fixups

For future reference the following will run these tests:
make check

Internally the runs the following:
make pycodestyle
make pydocstyle
make pylint
make mypy

It also runs them inside an appropriate conda env.  You can override which one like so:
make CONDA_ENV_NAME=mlos-3.8 mypy

You can run them all individually as well that way.


[Feature Request] Code assistance in CSS/SCSS files

Dear Gencer, thank you for the excellent work with the html-slim-scss-css-class-completion extension. I was hoping if you could please offer some insight regarding the support for code completion in CSS/SCSS files for class attributes defined in HTML files.
Currently the extension only scans the work-space for class style definitions within CSS/SCSS files.
It does not scan the work-space for class attributes within HTML files. As such, while editing and creating CSS/SCSS files there are no code suggestions offered.
I can see how currently, the code suggestions are helpful in the case of CSS frameworks (such as Bootstrap etc.), when the style-sheets already exist, and one wishes to simply add the available classes to the class attributes in the HTML markup.
It is my understanding, the structure of the HTML document is created first, and only afterwards, are the styles created for the relevant class attributes that exist in the HTML markup. As such, scanning the HTML documents would be very helpful, to allow class name suggestions for use while editing and creating the style-sheets.
I find this to be a severely overlooked feature in Vscode, although it is a common feature which is found in several widely used IDE's such as Netbeans and those by Jetbrains. I was hoping this might be taken into consideration as a feature request since i'm sure many others look forward to this as well.
Thanking you, and best regards

Let me try few steps from my end and we can discuss further. But as far as I understand, When you write html attributes like this:

...

You expect from CSS/SCSS files to autocomplete like this:
test.scss:
.my # < auto completes my-class
Thank you,
Gencer.

I think we can do that! Actually, for slim language, I needed this feature, too!
How we going to handle cache? This is another question. I think I can add cache refresh every x minutes or seconds depending user value in settings.

This is great news, Thank you ever so much for your help.

...
You expect from CSS/SCSS files to autocomplete like this:
.test.scss:
.my # < auto completes my-class

I'm afraid I may not have understood correctly but I have included a video screen capture below with an attempt to describe how the functionality works in other IDE's. In this example a comparison with the Net-beans IDE. (Thumbnail Below is a YouTube link) @Time: 1:25 Netbeans CSS/SCSS Code assistance Feature.

As for caching, most likely I do not have the experience to suggest anything pertinent, but I look forward to helping out in any way that I could.

Yup. We're on the same page. This is exactly what I referred. I will try few cache / live models and update here.

Just out of curiosity, wouldn't it be ideal for the cache to update dynamically on file change or text change, to provide real time coding assistance, without the need for manual intervention or a time interval to update the cache. Or is this something that is not feasible performance wise?

Just out of curiosity, wouldn't it be ideal for the cache to update dynamically on file change or text change, to provide real time coding assistance, without the need for manual intervention or a time interval to update the cache.

There could be hundreds of CSS/SCSS files in one workspace. Triggering cache warm on each file save/focus, we spend too much time to build whole workspace.
I think 2 options here.

We only do this cache update dynamically for HTML files. So, you will get almost instant updates when typing classes from html to scss (thats what you want)
We can add crazy option and give user a choice for that. If user believes that cache will be fast and less work, than user can choose between dynamic update and manual update.

For example, I would do dynamic update on my PC because currently even largest project of mine takes 2 seconds to cache all SCSS/CSS files.

@syedsameerali, this feature is in master branch. I will release a new version when I complete.

Released in v1.2.0


[WelcomeUX] Find all references looks weird in walkthrough

Testing #18091
Maybe we don't care, or maybe we want to disable it or something in those little editors.

Disabled this via 5b25934bace96443d24687344aee96ae0432f348

Cool, thanks. That seems like a very specific flag to have in common editor code though? I wonder if it should be 'disableInsetEditor' or something else generic.

@roblourens Maybe isInEmbeddedEditor so the clause here would be !isInEmbeddedEditor?
@chrmarti any thoughts?

Renamed context to isInEmbeddedEditor

Sounds good, thanks.

Yeah 'embedded' was the word I was looking for. Sounds good.


Fix : selections not working

Resolves ZENDESK-98469

[ ] I have added automatic tests where applicable.
[X] The PR contains a description of what has been changed.
[X] The description contains manual test instructions.
[X] The PR contains updates to the release notes.
[ ] I have verified that the documentation is still up to date.

Changes
Provide separate hacky method to allow temp data from selection to be rendered in widget.
Test
NOTE: Please ensure you have set Bake RVLINK to True in setttings.

select a bunch of entities (Tasks, AssetVersion) and click play with -> RV
select a list of click play with -> RV

Confirmed to be fixing the issue by the client.


Zooming Option

Hi there,
I was trying hard to get zoom and pan option for my Line chart, but i didn't found any option in chartjs. Need help on this. zoom is working with ctx.scale(2,2); but not pan

Consolidating with #726


[ios10] Potential name clash with Apple new framework ?

https://twitter.com/hyperspacemark/status/755541983469240320

I'm aware. Planning on updating it soon. Thanks!
Sam

On Jul 21, 2016, at 1:01 AM, Roman<EMAIL_ADDRESS>wrote:
https://twitter.com/hyperspacemark/status/755541983469240320
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

This is now fixed. The library has been renamed to SAMKeychain.


feat: add NoSSD support #14

:tada: This PR is included in version 1.0.0-beta.5 :tada:
The release is available on:

GitHub release
v1.0.0-beta.5

Your semantic-release bot :package::rocket:


Rwa merge

@giofsantos11 Thanks for this! Please delete the branch at your earliest convenience.

Thanks for going through this @gronert-m . I have deleted the branch.


LoRAs Composer

Dear author, thanks for the tremendous contribution. I'm wondering if this algorithm could be applied to train a Lora(s) that combines several different concepts like a character holding a gun while driving a motorbike? I have several images depicting each concept separately, but I couldn't find any experiments in your paper that elaborate on how the model handles interactions between such multi-concept scenarios. Could you provide further insights on this?
Example usage:
A <ckc>character holding a <wpe>weapon while driving a <mror>motorbike

@Sundragon1993 , you can try to directly generate a new image based on images for different concepts:
A character <|image_1|> holding a weapon <|image_2|> while driving a motorbike <|image_3|>.
If the generated image doesn't meet your expectations, you can use LoRA for fine-tuning：https://github.com/VectorSpaceLab/OmniGen/blob/main/docs/fine-tuning.md#lora-fine-tuning. The dataset can be
{"task_type":"text_to_iamge","instruction":"<ckc> character...","input_images":[],"output_image":"character.jpeg"}
{"task_type":"text_to_iamge","instruction":"<wpe> weapon...","input_images":[],"output_image":"weapon.jpeg"}
{"task_type":"text_to_iamge","instruction":"<mror> motorbike...","input_images":[],"output_image":"motorbike.jpeg"}

@staoxiao Thanks so much for the instructions, could you give us some insights regarding the total iterations or number of images sufficient to train a LoRA with decent quality?


problems in VirConnection.DomainEventRegister

In the switch in events.go#423 there are 3 empty cases (VIR_DOMAIN_EVENT_ID_REBOOT, VIR_DOMAIN_EVENT_ID_PMWAKEUP, VIR_DOMAIN_EVENT_ID_PMSUSPEND) which I think they are probably meant to have a fallthrough in them.

Currently if I pass such values for eventId I always get -1 from DomainEventRegister.

in events.go#457 in the call to C.virConnectDomainEventRegisterAny_cgo, C.VIR_DOMAIN_EVENT_ID_LIFECYCLE is hardcoded, shouldn't it be something like C.int(eventId)?

Currently if I pass anything but VIR_DOMAIN_EVENT_ID_LIFECYCLE as eventId to DomainEventRegister I always get a panic at the first dom state change.

It may be fixed in #80. It would be good to extract the necessary bits from this PR.

I need to look better into that PR to understand it, but I don't see how it could work for all possible event types because some of the cases were simply removed (e.g. I need VIR_DOMAIN_EVENT_ID_REBOOT) so that they are caught by the default clause and fail.
But at least the eventID argument to C.virConnectDomainEventRegisterAny_cgo is changed so that it is not hardcoded anymore.
I think that having fallthroughs in the currently empty cases of that switch was obviously the intent of whoever wrote them (look at how they are grouped, and they make no sense otherwise).
Also the hardcoded eventId can't be right, and I don't see why we can't just pass DomainEventRegister's eventId through to C.virConnectDomainEventRegisterAny_cgo.
As I said I need to look better to understand what problems are left, but the two above look to me like obvious oversights, and by fixing both I was able to handle VIR_DOMAIN_EVENT_ID_REBOOT without problems so far.
Such change would not affect the behavior of DomainEventRegister in any way if the event type is VIR_DOMAIN_EVENT_ID_LIFECYCLE, which currently is the only one working, therefore I would propose to make it.


add  3D  every time after equal sign

Hi there,
I saw that this problem is reported more as 1 year ago.
This error comes up in V 4.07 and V4.10Rc2
If I use
$message->setBody($html, text/plain');  instead of $message->setBody($html, 'text/html');
the html content is correct!
I added: Swift_Preferences::getInstance()->setCacheType('null');
but the problem is the same.

Any idead how to fix?
Regards,
Uwe
Original creation date: 2011-06-24T22:33:06Z
Original reporter: inthanet
Original ticket: http://swiftmailer.lighthouseapp.com/projects/21527/tickets/200

Thanks @ShawnKuan, it works!
Maybe @swiftmailer can clouse the issue now


Uniform javadocs for autoconfiguration classes

As title.

API changes have been detected in com.azure.spring:spring-cloud-azure-autoconfigure. You can review API changes here


Update action.yml

Currently, the action cannot pass and I get this error message. To avoid this, I made a small change in the build command
Building the Docker image: ghcr.io/OWNER/REPO:latest from ./Dockerfile in . context ...
  ERROR: failed to get console: provided file is not a console
  Error: Process completed with exit code 1.

See #30.

@TetrisIQ - thanks for the PR, I've merged #30 instead. Will publish the new version soon.


[Question] I have some questions with yt-dlp for Manjaro

Checklist

[x] I'm asking a question
[ ] I've looked through the README
[ ] I've read the opening an issue section in CONTRIBUTING.md
[ ] I've searched the bugtracker for similar questions including closed ones
[ ] I have given an appropriate title to the issue

Question

WRITE QUESTION HERE
I have some questions with yt-dlp for Manjaro. I get this error when I try to download a video:
ERROR: Unable to download webpage: <urlopen error [Errno -2] Name or service not known> (caused by URLError(gaierror(-2, 'Name or service not known'),))

DNS or networking issue on your side.


Can't generate test reports in plain text.

I'm trying to generate test reports in plain text but for some reason Jest keeps adding characters to the output that are breaking the text, I assume it's replacing the previous line with the results of the test but I don't need that feature for test reports.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
It's adding a bunch of [K and [1A to my output and I can't use it.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal repository on GitHub that we can npm install and npm test.
Just try jest > yourfile.txt
What is the expected behavior?
I wish I could generate test reports in plain text
Run Jest again with --debug and provide the full configuration it prints. Please mention your node and npm version and operating system.
Jest --debug output

Running your tests with the --no-color flag should make it work 😄
npm run test -- --no-color

After reading your comments in #608 I agree that it would be great to be able to customize this through other ways other than argv

We thought it was a colour issue but it's not only that.
It's using special characters to replace the previous line in the shell buffer.
Try to save that output to a text file, like npm run test -- --no-color > results.txt and you will see the problem.

Yeah, Jest adds a lot of special characters to provide a better output in interactive terminals... I don't think that there is a way to disable it with command line args
Jest does not add any characters when it is a non interactive terminal or when you are running it in CI, which means that you could simulate a CI build to prevent those special characters from showing up. I know that this solution seems weird, but I can't think of anything else. I wonder if it would make sense to have --interactive, --no-interactive flags to override it.
In the mean you can run CI=true npm test, but you might also have to redirect stderr, depending on which output you are interested on (Jest uses stderr for several things). CI=true npm test > yourfile.txt  2>&1.

@rogeliog sweet, thanks for your answer! Closing this.

@rogeliog I totally agree we should have --no-interactive or --no-status, especially also to disable the concurrent runner output. If anybody wants to send a PR for this it would be greatly appreciated.

@cpojer I can help with this

go for it!

I've been trying to figure out how to use tee to see both the output file and get something in the terminal (since CI emails that). Any ideas on making that work?

BTW if you pass the output through cat, the terminal is considered non-interactive, and doesn't do the fancy formatting. e.g.
yarn jest | cat

@JaneCoder Wouldn't passing the output of just to the tee command work?
yarn jest 2>&1 | tee jest.log

Has this ever been resolved?  Still broken with vim-test and vim-dispatch

@JaneCoder Wouldn't passing the output of just to the tee command work?
yarn jest 2>&1 | tee jest.log

this worked for me. give it a go @vegerot , i am using it like so in my package.json:
  "scripts": {
    "test": "jest 2>&1 | tee reports/acceptance-test-results.txt",


How to recover from invalid FU-A packet?

Sometimes we're seeing an rtsp stream giving a lot of invalid FU-A packet (non-starting) errors. It only stops after we restart the rtsp-reader.
When this happens, and we visualize the stream, the majority of the image is pixelated. But the top part of the image is not. Like this:

The stream never recovers. But if we restart the gortsplib.Client, the stream recovers. I've observed this behavior in two different camera models and 4 different hardware cameras.
From my testing, it seems that when an invalid FU-A packet is received, gortsplib gets into a state where it keeps reading invalid FU-A packet.
I've tried to read the source code of the decoder, but I can't find the problem. Any help?

Hello, by looking at the source code, there are at least 3 different errors that start with "invalid FU-A packet":

"invalid FU-A packet (invalid size)"
"invalid FU-A packet (can't contain both a start and end bit)"
"invalid FU-A packet (non-starting)"

what error are you referring to?
Furthermore, they all seem stateless to me, so the problem may lie in the queue the is placed before decoding. What is the full log of MediaMTX with those sources? is it showing "XX packets lost"?


Add support for InfluxDB v2.x backups

Description of the feature
InfluxDB v2 is available and has different syntax for the backup commend (see link below). Would be great to have support for this latest version.
Benftits of feature
Support backing up instances of the latest version of InfluxDB.
Additional context
(https://docs.influxdata.com/influxdb/v2.1/reference/cli/influx/backup/)

Hi Ben,
I'm interested. Can you give me a bit of a copy and paste on how a final backup looks in a directory?
From what I can see Influx 1 was backing up to a flat file (?) and Influx 2 is backing up multiple files inside of a directory.
I assume I can use DB_USER in place of an Organization name, and DB_PASS as the Token. DB_NAME can be used for the Buckets. Does that sound like I'm on the right track?
Am flying blind here with no other experience with Influx other than the manuals, so if you are willing to test out and provide some input in the process I don't see a problem of working this in to support both 1.x and 2.x InfluxDB.

Hi Dan,
I think what you are suggesting sounds about right. DB_USER -> ORG, DB_PASS -> TOKEN, DB_NAME -> BUCKET.
Currently I have the following ENV vars in my backup container (image influxdb:2.1);
INFLUX_HOST=http://db:8086
INFLUX_TOKEN=secret

And then run the following command (i.e. backup ALL databases to a time stamped folder);
mkdir /dump/$$(date +%Y%m%d_%H%M%S)
influx backup /dump/$$(date +%Y%m%d_%H%M%S)

This generates the following;
ben@nuc01:~$ ls -al /var/data/influxdb/database-dump/20220331_172619/
total 6
drwxr-xr-x 2 root root    3 Mar 31 17:28 .
drwxr-xr-x 4 root root    2 Mar 31 17:28 ..
-rw------- 1 root root 3061 Mar 31 17:28 20220331T042819Z.bolt.gz
-rw------- 1 root root 1735 Mar 31 17:28 20220331T042819Z.manifest
-rw------- 1 root root  991 Mar 31 17:28 20220331T042819Z.sqlite.gz

I am not specifying the ORG anywhere and it seems to be working fine, but it would probably be better to explicitly define that.
Hope this helps, more than happy to test!

Thanks for this - this turned out to be more complicated than I originally thought. I had to build some routines to get both Influx1/2 going by means of a new "INFLUX_VERSION=` environment variable and build some new routines to actually compress the directory as opposed to the hack that I was doing before.
That being said, give 3.2.0 a try - it should work?

Wow - thanks for the prompt work!! Will there be an automatic push of 3.2.0 to Dockerhub? Can't see anything there yet
.

Argh. Looks like the auto build is failing. Let me send one up as tiredofit/db-backup:develop first and then work on the builds in the AM.

And we've got succesful builds :)

Almost but not quite...
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | 2022-04-01.16:11:13 [DEBUG] ** [db-backup] Backup routines started time: 2022-04-01 16:11:13 NZDT
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | 2022-04-01.16:11:13 [DEBUG] ** [db-backup] Preparing to back up everything
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | 2022-04-01.16:11:13 [NOTICE] ** [db-backup] Dumping Influx2 database: 'justbackupeverything'
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | Error: API compatibility check failed: Get "db:///health": unsupported protocol scheme "db"
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | 2022-04-01.16:11:13 [DEBUG] ** [db-backup] DB Backup Exit Code is 1
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | 2022-04-01.16:11:13 [ERROR] ** [db-backup] DB Backup of 'influx2_justbackupeverything_db_20220401-161113' reported errors
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | 2022-04-01.16:11:13 [NOTICE] ** [db-backup] Creating archive file of 'influx2_justbackupeverything_db_20220401-161113' with tar
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | tar: removing leading '/' from member names
influxdb_db-backup.1.4xji0v2odqj3@nuc03    | 2022-04-01.16:11:13 [WARN] ** [db-backup] Skipping Checksum creation because backup did not complete successfully

I have the following env vars;
INFLUX_VERSION=2

DB_TYPE=influx
DB_HOST=db
DB_PORT=8086
DB_NAME=ALL
DB_USER=hardwicke
DB_PASS=secret

DB_DUMP_FREQ=1440
DB_DUMP_BEGIN=+2
DB_CLEANUP_TIME=10080

I initially tried DB_HOST=http://db but the availability check was failing (the nc check).
But I think the influx backup command expects http://db - at least that is what I had in my manual backup command that was working earlier.

OK, Nuts. I see a couple other funny things sitting in there - Would you mind sending me a dump of the logs with DEBUG_MODE=TRUE (sanitized of course) to dave at my github name dot ca ? Looks like there is more at play here.

Many thanks for the debug logs, I noticed some weird stuff with the DB_NAME ALL which shouldn't have been there and you are right - Without prefixing DB_HOST with http or https would break that basic port checking routine. I've rewritten it to look at the /health endpoint and wait for a 200 response code.
That being said - I violated a few rules and retagged and repushed 3.2.0 - Interested to hear how this one works.

Unfortunately not...
influxdb_db-backup.1.l2k9q6heljaq@nuc01    |                                                                        ,---.
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | ,--------.,--.                 ,--.            ,---.    ,--. ,--------.|   |
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | '--.  .--'`--',--.--. ,---.  ,-|  |     ,---. /  .-'    |  | '--.  .--'|  .'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    |    |  |   ,--.|  .--'| .-. :' .-. |    | .-. ||  `-,    |  |    |  |   |  |
influxdb_db-backup.1.l2k9q6heljaq@nuc01    |    |  |   |  ||  |   \   --.\ `-' |    ' '-' '|  .-'    |  |.--.|  |   `--'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    |    `--'   `--'`--'    `----' `---'      `---' `--'      `--''--'`--'   .--.
influxdb_db-backup.1.l2k9q6heljaq@nuc01    |                                                                        '--'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | Image: tiredofit/db-backup | Version 3.2.0 Type 'image_changelog' for details
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | Repository/Issues/Support: https://github.com/tiredofit/docker-db-backup/
influxdb_db-backup.1.l2k9q6heljaq@nuc01    |            Like my work? Visit https://www.tiredofit.ca/sponsor
influxdb_db-backup.1.l2k9q6heljaq@nuc01    |
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:32:34 [NOTICE] ** [monitoring] Container configured for monitoring with 'zabbix modern'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:32:34 [NOTICE] ** [scheduling] Container configured for scheduled tasks with 'cron'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /assets/functions/10-db-backup: line 105: syntax error near unexpected token `;'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /assets/functions/10-db-backup: line 105: `                if [ "${db}" != "justbackupeverything" ] ; then ; bucket="-bucket $db" ; else db=all ; fi'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /assets/functions/10-db-backup: line 105: syntax error near unexpected token `;'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /assets/functions/10-db-backup: line 105: `                if [ "${db}" != "justbackupeverything" ] ; then ; bucket="-bucket $db" ; else db=all ; fi'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /etc/cont-init.d/10-db-backup: line 9: sanity_test: command not found
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /etc/cont-init.d/10-db-backup: line 10: setup_mode: command not found
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /assets/functions/10-db-backup: line 105: syntax error near unexpected token `;'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | /assets/functions/10-db-backup: line 105: `                if [ "${db}" != "justbackupeverything" ] ; then ; bucket="-bucket $db" ; else db=all ; fi'
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:32:34 [DEBUG] ** [db-backup] Looking for existence of INFLUX_VERSION environment variable
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:32:35 [STARTING] ** [monitoring] [1] Starting Zabbix Agent (modern) 6.0.2
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:32:35 [STARTING] ** [scheduling] [1] Starting cron
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:32:39 [DEBUG] ** [db-backup] Wait Time: 60 Target time:<PHONE_NUMBER> Current Time:<PHONE_NUMBER>
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:32:39 [INFO] ** [db-backup] Next Backup at 2022-04-02 09:33:39 NZDT
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:33:40 [DEBUG] ** [db-backup] Backup routines started time: 2022-04-02 09:33:40 NZDT
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | ./run: line 45: check_availability: command not found
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | ./run: line 46: backup_influx: command not found
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:33:40 [INFO] ** [db-backup] Backup routines finish time: 2022-04-02 09:33:40 NZDT with overall exit code 0
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:33:40 [NOTICE] ** [db-backup] Backup routines time taken: Hours: 0 Minutes: 00 Seconds: 00
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | ./run: line 80: cleanup_old_data: command not found
influxdb_db-backup.1.l2k9q6heljaq@nuc01    | 2022-04-02.09:33:40 [NOTICE] ** [db-backup] Sleeping for another 86400 seconds. Waking up at 2022-04-03 08:33:40 NZST

Eesh I am being sloppy. A new 3.2.0 is uploaded and fixes that.

Getting closer... a problem with using DB_HOST in the filename, now it contains the http:// scheme...
influxdb_db-backup.1.kepnea0zf7z8@nuc01    |                                                                        ,---.
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | ,--------.,--.                 ,--.            ,---.    ,--. ,--------.|   |
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | '--.  .--'`--',--.--. ,---.  ,-|  |     ,---. /  .-'    |  | '--.  .--'|  .'
influxdb_db-backup.1.kepnea0zf7z8@nuc01    |    |  |   ,--.|  .--'| .-. :' .-. |    | .-. ||  `-,    |  |    |  |   |  |
influxdb_db-backup.1.kepnea0zf7z8@nuc01    |    |  |   |  ||  |   \   --.\ `-' |    ' '-' '|  .-'    |  |.--.|  |   `--'
influxdb_db-backup.1.kepnea0zf7z8@nuc01    |    `--'   `--'`--'    `----' `---'      `---' `--'      `--''--'`--'   .--.
influxdb_db-backup.1.kepnea0zf7z8@nuc01    |                                                                        '--'
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | Image: tiredofit/db-backup | Version 3.2.0 Type 'image_changelog' for details
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | Repository/Issues/Support: https://github.com/tiredofit/docker-db-backup/
influxdb_db-backup.1.kepnea0zf7z8@nuc01    |            Like my work? Visit https://www.tiredofit.ca/sponsor
influxdb_db-backup.1.kepnea0zf7z8@nuc01    |
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:10:53 [NOTICE] ** [monitoring] Container configured for monitoring with 'zabbix modern'
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:10:53 [NOTICE] ** [scheduling] Container configured for scheduled tasks with 'cron'
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:10:53 [DEBUG] ** [db-backup] Looking for existence of INFLUX_VERSION environment variable
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:10:53 [STARTING] ** [monitoring] [1] Starting Zabbix Agent (modern) 6.0.2
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:10:53 [STARTING] ** [scheduling] [1] Starting cron
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:10:58 [DEBUG] ** [db-backup] Wait Time: 60 Target time:<PHONE_NUMBER> Current Time:<PHONE_NUMBER>
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:10:58 [INFO] ** [db-backup] Next Backup at 2022-04-02 21:11:58 NZDT
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [DEBUG] ** [db-backup] Backup routines started time: 2022-04-02 21:11:58 NZDT
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [DEBUG] ** [db-backup] Preparing to back up everything
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [NOTICE] ** [db-backup] Dumping Influx2 database: 'all'
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022/04/02 21:11:58 INFO: Downloading metadata snapshot
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [DEBUG] ** [db-backup] DB Backup Exit Code is 0
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [INFO] ** [db-backup] DB Backup of 'influx2_all_http://db_20220402-211158' completed successfully
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [NOTICE] ** [db-backup] Creating archive file of 'influx2_all_http://db_20220402-211158' with tar
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | tar: removing leading '/' from member names
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [NOTICE] ** [db-backup] Generating MD5 for 'influx2_all_http://db_20220402-211158.tar.zst'
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [DEBUG] ** [db-backup] MD5: 1b873695fcb8559fa4772d2c6e905e3f - influx2_all_http://db_20220402-211158.tar.zst
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [NOTICE] ** [db-backup] Backup of influx2_all_http://db_20220402-211158.tar.zst created with the size of 4289 bytes
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [DEBUG] ** [db-backup] Moving backup to filesystem
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | mv: can't rename '/tmp/backups/*.md5': No such file or directory
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | mv: can't rename '/tmp/backups/influx2_all_http://db_20220402-211158.tar.zst': No such file or directory
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:58 [NOTICE] ** [db-backup] Sending Backup Statistics to Zabbix
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | stat: can't stat '/backup/influx2_all_http://db_20220402-211158.tar.zst': No such file or directory
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | Sending failed. Use option -vv for more detailed output.
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | date: can't stat '/backup/influx2_all_http://db_20220402-211158.tar.zst': No such file or directory
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | Sending failed. Use option -vv for more detailed output.
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | Sending failed. Use option -vv for more detailed output.
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | Sending failed. Use option -vv for more detailed output.
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:59 [NOTICE] ** [db-backup] DB Backup for 'all' time taken: Hours: 0 Minutes: 00 Seconds: 00
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:59 [INFO] ** [db-backup] Backup routines finish time: 2022-04-02 21:11:59 NZDT with overall exit code 0
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:59 [NOTICE] ** [db-backup] Backup routines time taken: Hours: 0 Minutes: 00 Seconds: 01
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:59 [INFO] ** [db-backup] Cleaning up old backups
influxdb_db-backup.1.kepnea0zf7z8@nuc01    | 2022-04-02.21:11:59 [NOTICE] ** [db-backup] Sleeping for another 86399 seconds. Waking up at 2022-04-03 20:11:58 NZST

Of course! Missed that entirely - tiredofit/db-backup:latest will contain the fix using a simple bash environment variable replacement. ${dbhost#*//}

Bingo - working!! Thanks so much :). Closing this issue.


Truncated Normal initializer doesn't match PyTorch

System information

WSL 2 on Windows
Flax 0.8.4, JAX 0.4.30
Python 3.10
RTX 2080
CUDA 12.3

Both nn.initializers.truncated_normal and jax.nn.initializers.truncated_normal aren't similar enough to PyTorch's nn.init.trunc_normal_. All of these use a lower of -2 and upper of 2 by default.
I'm running a test to make sure the outputs are similar if given the same arguments.
Here's my JAX code.
import jax
import jax.numpy as jnp
from jax import random
from flax import linen as nn

def summary_stats(name, x):
    print(f'Stats for {name}:')
    print('shape: ', x.shape)
    print('min: ', x.min())
    print('max: ', x.max())
    print('std: ', jnp.std(x))
    # print(x)

def make_trunc(key, stddev):
    lower = -2
    upper = -lower
    shape = (4096,)
    return nn.initializers.truncated_normal(stddev, lower=lower, upper=upper)(key, shape=shape)
    # return jax.nn.initializers.truncated_normal(stddev, lower=lower, upper=upper)(key, shape=shape)

summary_stats('trunc', make_trunc(random.key(0), .02))
summary_stats('trunc', make_trunc(random.key(1), .04))
summary_stats('trunc', make_trunc(random.key(2), .06))

Here's my PyTorch code:
import torch
import torch.nn as nn

def summary_stats(name, x):
    print(f'Stats for {name}:')
    print('shape: ', x.shape)
    print('min: ', x.min().item())
    print('max: ', x.max().item())
    print('std: ', x.std().item())
    # print(x)

t = torch.zeros((4096,))

nn.init.trunc_normal_(t, std=0.02)
summary_stats('pytorch', t)
nn.init.trunc_normal_(t, std=0.04)
summary_stats('pytorch', t)
nn.init.trunc_normal_(t, std=0.06)
summary_stats('pytorch', t)

JAX output:
Stats for trunc:
shape:  (4096,)
min:  -0.039960504
max:  0.039985776
std:  0.018035976
Stats for trunc:
shape:  (4096,)
min:  -0.0797701
max:  0.07959695
std:  0.03491081
Stats for trunc:
shape:  (4096,)
min:  -0.11983735
max:  0.119733654
std:  0.053539284

PyTorch output:
Stats for pytorch:
shape:  torch.Size([4096])
min:  -0.06634494662284851
max:  0.0743524581193924
std:  0.020439231768250465
Stats for pytorch:
shape:  torch.Size([4096])
min:  -0.13382470607757568
max:  0.12441056221723557
std:  0.03931436687707901
Stats for pytorch:
shape:  torch.Size([4096])
min:  -0.22086666524410248
max:  0.20988918840885162
std:  0.05979840084910393

Although the std values look close enough, the min and max seem off.
However, let's look at the JAX output again if I set lower=-4, even though PyTorch is using -2.
JAX output:
Stats for trunc:
shape:  (4096,)
min:  -0.07253291
max:  0.076029524
std:  0.020624608
Stats for trunc:
shape:  (4096,)
min:  -0.13531744
max:  0.12941647
std:  0.039439432
Stats for trunc:
shape:  (4096,)
min:  -0.21360189
max:  0.20679429
std:  0.060959056

Now min/max line up with PyTorch better. I haven't figured out in the source code what explains this, but it would be nice to document it if it's an intended design.

On a quick look at the torch documentation and the source code of jax.random.truncated_normal, it seems that:

the torch version runs on a fixed normal distribution and redraws a new random value when a number is out of bounds (doc)
the JAX version runs a customized normal distribution based on the upper & lower bounds (jax.random.uniform called here to uniformly sample between a customized min-max range)

This might explain why the min/max values of Pytorch are more divergent from 0, as it is based on a distribution that has a higher chance to be out-of-bound.
If you'd like to know more, I'd recommend open an issue/question on JAX Github for a response from the authors.


Action List

In Atom, Ctrl+shift+p brings up a searchable menu consisting of a list of available actions, along with their shortcuts and descriptions.
I propose that Slap has something similar.
This has the following use cases / benefits:

Users who do not know a shortcut can determine find a feature by describing it or by its likely name.
Users who find a feature can then find out its shortcut.
Users wondering whether an as-yet-unimplemented feature exists can determine with relative certainty that it doesn't.
The shortcut shown will mirror the user's actual config, not the editor default (which would be the case for traditionally maintained documentation).

Progress so far (on my fork's unstable/action-list branches of slap and base-widget):

The registry of actions resides in BaseWidget, and any subclass can add to this registry.
The keypress actions in Slap.js and EditorPane.js are registered in this way.
Created a list of available actions, accessible through Ctrl+p.
Shown the current keybindings in the list.
Made the list searchable.

To do:

Declare the many actions in EditorWidget. I feel it should be possible to retain the loops which are currently used for case-switching.
Improve key bindings, focus handling, etc. within the actionList.
Improve ordering so search on 'o' returns 'open' before 'close'.
Refactor out the search form + list combo so it can be used elsewhere (file browser?)
Work out how to handle edge cases where the presence of the actionList changes the effect of the action, e.g. prevPane.

Any feedback would be welcome, especially any concerns which might prevent merging a future PR.

@pdl, first of all, thanks so much for filing this issue and taking a stab at developing this functionality! While I have not tested it yet, the feature set you've described is definitely planned for a future release of slap. At first glance, your branch looks great (notwithstanding a few minor style tweaks).
While I will happily accept a PR for this functionality, and merge it if the pull request looks A-OK, I should note that most of slap's active development has been centered around porting to react-blessed. That means that there is a small but non-trivial chance that some of the functionality you are working on may be changed or lost once the react-blessed changes are merged. Here's the active branch in slap: dbkaplun/slap#react-blessed. While editor-widget has been ported completely and works very well, slap itself is missing some key pieces (most importantly panes).
Now I have not had much time to finish up the work as of late, but if you'd like to take a look and tell me what you think, please join us in #slap on Freenode and I'll be more than happy to discuss the best way to introduce your changes into slap. Otherwise, please feel free to continue with development and I will happily take a look at a PR if you decide to file. 👍

Thanks! That's very useful information. I'll take a look at that branch before going any further. Am I right in inferring from #106 that the reason for the move to react-blessed is performance? I don't see an issue in the current list relating to the porting.


[Helm Deploy] YAMLException: duplicated mapping key when upgrade

Required Information
Entering this information will route you directly to the right team and expedite traction.
Question, Bug, or Feature?
Type: Bug
Enter Task Name: HelmDeploy@0
list here (V# not needed):
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks
Environment

Server - Azure Pipelines
Agent - Hosted : 2.177.1

Issue Description
While deploying a helm chart within my AKS cluster, I have the following warning message.
I think it is due to the output of Helm command which return an unnecessary "null" text.
`

stage: Deploy_Staging
displayName: Deploy to Staging
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
jobs:

deployment: Staging
displayName: Deploy to Staging
environment: Staging
strategy:
runOnce:
deploy:
steps:
- task: HelmDeploy@0
displayName: Helm install
inputs:
connectionType: Kubernetes Service Connection
kubernetesServiceEndpoint: $(KubernetesServiceEndpoint)
command: upgrade
chartType: FilePath
chartPath: $(Pipeline.Workspace)/helm-chart/$(PackagedChartName)
releaseName: api-staging
valueFile: $(Pipeline.Workspace)/chart-values/staging-values.yaml

`

Task logs
`
2020-11-17T15:48:43.7701360Z ##[section]Starting: Helm install
2020-11-17T15:48:43.7712088Z ==============================================================================
2020-11-17T15:48:43.7713139Z Task         : Package and deploy Helm charts
2020-11-17T15:48:43.7713906Z Description  : Deploy, configure, update a Kubernetes cluster in Azure Container Service by running helm commands
2020-11-17T15:48:43.7714303Z Version      : 0.177.0
2020-11-17T15:48:43.7715325Z Author       : Microsoft Corporation
2020-11-17T15:48:43.7715621Z Help         : https://aka.ms/azpipes-helm-tsg
2020-11-17T15:48:43.7716685Z ==============================================================================
2020-11-17T15:48:44.7342474Z [command]/usr/local/bin/helm upgrade --install --values /home/vsts/work/1/chart-values/staging-values.yaml --wait api-staging /home/vsts/work/1/helm-chart/api-0.2.0.tgz
2020-11-17T15:48:49.4929724Z Release "api-staging" has been upgraded. Happy Helming!
2020-11-17T15:48:49.4944536Z NAME: api-staging
2020-11-17T15:48:49.4959152Z LAST DEPLOYED: Tue Nov 17 15:48:46 2020
2020-11-17T15:48:49.4959459Z NAMESPACE: default
2020-11-17T15:48:49.4959692Z STATUS: deployed
2020-11-17T15:48:49.4959894Z REVISION: 12
2020-11-17T15:48:49.4960115Z TEST SUITE: None
2020-11-17T15:48:49.7732045Z ##[warning]Capturing deployment metadata failed with error: YAMLException: duplicated mapping key at line 94, column 17:
null
^
2020-11-17T15:48:49.7747336Z ##[section]Finishing: Helm install
`

@Heisenberg74 You can ignore the warning. This is something that the task is doing to collect metadata which will be used for better customer experience eventually.

Hi @shigupt202 ,
Thank you for your answer but it is something disturbing while checking our pipelines status.
Orange lines are something we don't want to see 😀
Do you think this issue can be solved ?
Or at least, can we disable metadata collect ?
Thanks

I'll discuss this within the team.
@anraghun @ds-ms Can we introduce a boolean field to disable the metadata collection step?

@shigupt202 I'd suggest let's hotfix this today if the deployment hasn't reached all the rings yet and we'll deliberate on the future of this feature in a separate conversation offline. What say?

There's already a boolean at the project level for disabling this; don't you think that should suffice?

I'm not sure if that controls this part of the code. I'll explore that option.

There's already a boolean at the project level for disabling this; don't you think that should suffice?

Hi,
Could you tell me where is this setting ?
Thank you

The setting is present in Project Settings > Pipelines > Settings > Publish metadata from pipelines.

The setting is present in Project Settings > Pipelines > Settings > Publish metadata from pipelines.

Thanks

Hi,
since we have updated to latest helm task version we get similar issue, see below:
2020-11-24T11:34:37.5610968Z ##[warning]Capturing deployment metadata failed with error: YAMLException: duplicated mapping key at line 95, column 34:
              imagePullPolicy: Always
                                      ^

As mentioned before this could be prevented by disabling Publish metadata from pipelines. But it's already disabled and we still see this warning.

Ok, so we should wait for a fix.

I'm still getting this warning even with the toggle disabled.

Using Helm Deploy version 0.214.0
Warning:
##[warning]Capturing deployment metadata failed with error: YAMLException: duplicated mapping key at line 257, column -58:
            securityContext:
            ^

Previously this used to be as a warning message. But, now it turned into ##[Error]Capturing deployment metadata failed with error: YAMLException:
Do anyone have idea why it turned into error from warning.

seems related to #18846


different size of pdf files

I generated two files with a picture and text inside and each time I save the file I get a different size, why is this happening?
cmp test4.pdf test5.pdf
test4.pdf test5.pdf differ: char 5056, line 75
test (5).pdf
test (4).pdf

Yes, it seems like the generation of PDF files using this library is not deterministic! :(
I am also getting a similar issue, but copying pages.
I have my source PDF document and I am generating another one copying some pages from the source document.
Every time that I run my code a different PDF file is generated, although the appearance is exactly the same!
Anyone knows the reason?

It seems the library adds a content stream that's get changed every minute. For example, if I merge two PDFs together, I get the same result. If the second try is about minute later, I get a different result.
There is a different in one content stream only:

Everything else is identical.
I suppose the library adds some kind of signature to processed PDFs. I haven't dug into the library's code though.

Amazing man! create() method always will generate a new timestamp / metadata. But I found a tricky solution to my use case: instead of creating a new file I open an already created blank file (preserving the metadata), remove the blank page and append the content I want in a deterministic way! Thanks a lot for the help!


⚠ Adacta-fintech.com has degraded performance

In e41b1d4, Adacta-fintech.com (https://www.adacta-fintech.com) experienced degraded performance:

HTTP code: 200
Response time: 1318 ms

Resolved: Adacta-fintech.com performance has improved in c81976b.


Testing - Adding in Tests for Dashboard

Branch: https://github.com/UBC-MDS/climadash/tree/kelly-test-update
Closing the ticket.


[DO NOT MERGE] test branch for debugging #12235 (KAFKA-13945)

Not a real PR -- do not review or merge
This is just for testing on the side, the real PR is https://github.com/apache/kafka/pull/12235

WHEW managed to find the bug


Contracts array

depends on https://github.com/openprocurement/openregistry.lots.core/pull/57

Pull Request Test Coverage Report for Build 190

118 of 124 (95.16%)  changed or added relevant lines in 8 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage decreased (-0.1%) to 95.848%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

openregistry/lots/loki/views/lot_contracts.py
15
17
88.24%

openregistry/lots/loki/tests/contract.py
12
16
75.0%

Files with Coverage Reduction
New Missed Lines
%

openregistry/lots/loki/models.py
1
96.58%

Totals

Change from base Build 188:
-0.1%

Covered Lines:
2655

Relevant Lines:
2770

💛  - Coveralls


On restart / reboot windows do not restore in the correct places

VSCode Version: 1.10.1
OS Version: OSX 10.11.6

Steps to Reproduce:

Two monitor system
Several Code workspaces in fullscreen mode on each monitor
Reboot / restart on upgrade
Workspaces have switched monitors

This issue has already been reported. Please use the search function next time before reporting an issue and/or this time if you are curious about the progress of the issue.


Error pip install --upgrade git+https://github.com/google/lightweight_mmm.git

Hi Pablo!
I'm tried install with "pip install --upgrade git+https://github.com/google/lightweight_mmm.git" and give me the next error:

I hope you help me :)
Thanks!!
Best.
Rai

hey! could you try again? Our test broke for a few mins.

Yeah!! Thank so much!! :)


Automate maven releases completely

Is your feature request related to a problem? Please describe
Currently, even though most of the process for maven release is automated, there is a last step that needs human intervention by logging into the nexus sonatype, closing the staging repo and then hitting release.
This causes @opensearch-project/engineering-effectiveness to become bottle neck for all maven related releases as they own the credentials to the platform.
Describe the solution you'd like
This process can be automated completely in a such a way that no human intervention is required and any maintainer can release the opensearch and its artifacts.
Describe alternatives you've considered
Some quick research gives this documentation: https://central.sonatype.org/publish/publish-guide/#releasing-to-central
https://github.com/sonatype/nexus-maven-plugins/blob/main/staging/maven-plugin/README.md
Additional context
No response

[Triage], we can explore nexus-maven-plugin to do this promotion without human intervention.

I don't believe any testing needs/can be done around it. The maven release needs all kinds of checksums, signature files, etc along with the artifacts which ensures that the artifacts being uploaded are legit. The authentication or access of end to end process is what needs to be considered while working on this.
Would like your thoughts on this @prudhvigodithi @dblock @saratvemulapalli

For clients I wouldn't do any extra work and trust CI/CD. If all tests pass (and they do during this process), :shipit:

+1 As long as we sign the artifacts and verify the signatures we should be good.
This is how I see it, for infra our job is to enable verified releases to maven for maintainers. We would rely on the maintainers to do all the checks in CIs and determine its ready for release.

Posting a successful run here: https://build.ci.opensearch.org/job/publish-to-maven/4/console
The auto publish part works. Few nits needs to be worked upon. @rishabh6788 is taking care of it.
Thanks @rishabh6788 Great work. 🙌
Also thanks @mch2 for all the knowledge transfer


Remove Metal staging buffers cache to avoid lock contention overhead in command buffer completion handler

[ ] Depends on #30

The caching will be added back at an o!f level instead.
Before:

After:

(all on just a 10 second run of sample game with nothing extra displayed)

To leave a paper trail: If similar logic is being added back in o!f, does that mean there's potential to add that same logic here instead? Does it mean that anyone using veldrid will need to implement their own caching to get optimal performance?

It's much easier to have it in o!f since there's no place within the Veldrid project where we can potentially add code that's used by all backends at once, at least with the current structure of the project. Anyone using Veldrid would probably find it more comfortable doing this locally as the usages may definitely vary, and it's better for the backend implementation to not do too much work behind the scenes compared to what the consumer would actually benefit from, otherwise it could add unnecessary overhead, which is what's happening here right now.


style update: indent lists

From my email:

You said you wanted feedback: my only initial dislike is that you don’t intend the bullet items, i.e. the bullet is “in the margin”, which is increasingly common, but looks awful in my opinion.

https://github.com/neurosnap/lists.sh/commit/0e36ce1ab482d2451b864380e7055aea070a85af


Question about 0 Vulnerability Dependencies and CPEs

Hello! I've learned a lot of new things about SCAs as well as NVD CPE/CVE concepts recently because of your tool. I am an intern new to the industry and find it inspiring to see that much of it is held up by charitable effort such as yours.
I've been working solely on node projects as I've been getting to know your tool the past few weeks. I was wondering if there was an option for the CLI dependency-check to list a dependency even if there are no vulnerabilities found. I pored over the documentation of this tool, ran many scans, looked through the NVD CPE dictionary to confirm that the package was there (as well as in the npm registry, where I got it), but when there are no vulnerabilities, the package is not shown in any of the output from the dependency-check scan.
Is this due to the fact that the node analyzers depend solely on npm audit, which returns only vulnerabilities? I saw that in #2122 you stated that you were making a tool for 5.3.0 which would cause it to look into the NVD for node projects, which I saw in the Dependency-Check CLI documentation makes up the backbone of this tool.
From what I could see for other types besides node, the ability to see 0 vulnerability dependencies is there, but not for node. Are these plans for the near future?
I apologize for any ignorant assumptions I may have taken in this. Pointing out any of it would help.

The report includes the vulnerable and non-vulnerable dependencies already.  In the HTML report there is a toggle right below the summary. In the report just click the link to show all.

Summary
Display: Showing Vulnerable Dependencies (click to show all)

I'm sorry, there must be an error in my setup I need to track down. The node analyzers currently give me no results that aren't identical to what shows up from npm audit. Exactly the same results are displayed and nothing more (or less), even after clicking 'show all'. To clarify, I have the package-lock without the build.

You need to run npm install before running the analysis (currently) to get the dependencies not returned by npm audit. However, this has the downside that you can't skip the dev dependencies. There are plans to improve this - but that is how it works today.

Ah. I understand. Thank you for your time and for the clarification.


Should the lock port be modifiable by API authors?

There could be a conflict on our port.

    def __new__(cls, *args, **kwargs) -> 'BaseRobot':  # type: ignore
        """Create a new instance of the class."""
        obj: BaseRobot = super().__new__(cls)

        # We have to ignore some of the types here as they are unknown.
        obj.__init__(*args, **kwargs)  # type: ignore

        obj._obtain_lock()

        return obj

As the lock is requested in new, we we need to use a metaclass to do this.
I actually think that might be slightly nicer than using __new__ anyway.

I would say yes, this feels like something that can be quite important to change depending on OS (do IBM mainframes have 10k ports? I dunno, I bet they have python though so someone will try to run j5 on them at some point), or other running services.
But ultimately this comes down to what makes a good config option. In my opinion anything which is an arbitrary constant, the configuration of which may be useful to the API author, should probably be a config option (subject to common sense), and by that logic the port number should also be configurable.

I agree that this would be a useful option to have.
I think the main argument against this change is that it makes situations where there are two instances of j5 on the same machine using different port numbers more likely. For example, one instance could be a background service with a non-default port number configured and the other instance is operated by a human who is quickly testing some things out at the command line (using the default port number).
I don't a strong opinion either way on this decision.


Alert - make Event to Check field required when adding/updating an Event Threshold Alert

What the subject says, prevents a crash trying to show the alert when Event to Check is an empty array.
https://bugzilla.redhat.com/show_bug.cgi?id=1204635

@himdel Not sure what was supposed to be fixed, but when I try to add the alert described in the BZ (based on VM and Instance: Event Threshold, but leaving the actual parameters of the threshold unchosen), I now get the following exception and the record is Alert is not created:
[----] I, [2015-03-31T15:18:09.832905 #15882:971e90]  INFO -- : Started POST "/miq_policy/alert_edit?button=add" for <IP_ADDRESS> at 2015-03-31 15:18:09 -0700
[----] I, [2015-03-31T15:18:09.861874 #15882:971e90]  INFO -- : Processing by MiqPolicyController#alert_edit as JS
[----] I, [2015-03-31T15:18:09.861992 #15882:971e90]  INFO -- :   Parameters: {"button"=>"add"}
[----] F, [2015-03-31T15:18:10.018757 #15882:971e90] FATAL -- : Error caught: [NoMethodError] undefined method `empty?' for nil:NilClass
/home/dclarizio/dev/manageiq/vmdb/app/controllers/miq_policy_controller/alerts.rb:538:in `alert_valid_record?'
/home/dclarizio/dev/manageiq/vmdb/app/controllers/miq_policy_controller/alerts.rb:23:in `alert_edit'

Clicking on the old Alert I created recreating the bug itself, I still get the original exception undefined method 'first' for nil:NilClass [miq_policy/tree_select] .
Let me know if I'm not testing correctly.

@dclarizio Oh, I hadn't thought of old alerts.. but it is a bug to have an Event Threshold Alert without an actual event, right? Adding a check to the template, but possibly we could want to add a migration that removes such alerts or something?
As for that exception .. that's interesting, seems sometimes alert.expression != @edit[:new][:expression] in there, I'll have to figure out which one we want to check.

@himdel

but it is a bug to have an Event Threshold Alert without an actual event, right?

Correct, and I don't expect us to catch this error, I was just noting that the original symptoms had not gone away, so no need for a migration.

Added a fix for displaying existing alerts without an event type.
Still missing a fix for that add/update should check for it.

Hopefully done, added i18n to the template change and fixed the error you got while saving.
Also tested that it doesn't allow you to add or update an event threshold alert without the event type being set but doesn't crash when it isn't set.

Verified fix.


Manual: explain how and where JSON output is produced

As now JSON output is produced for both parsed TLA+ files and found counterexamples, this should be explained in the manual.

@Kukovec do you think the recent ADR on JSON closes this issue?