[Feat] : Create Beautifully design community page

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
@Akshatchaube01
we can beautifully design community page
something like this,

Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
What problem is this feature trying to solve?
How do we know when the feature is complete?

We do not plan on adding more pages to the website


Markdown rendering in messages slightly broken

See attached screenshot

probably due to missing list-style-position: inside; style within the css for the markdown message content, we had a similar issue with the need details itself


licenses in package.json is deprecated

Hey
The use of the licenses key in package.json files is deprecated.
Would you please consider switching to an SPDX expression in the license key instead and then pushing out a patch release?
As of right now the npmjs.com website shows busboy as being unlicensed which means that no one can use it unless they double check the repo on GitHub for a license.

Thanks :)

I prefer keeping the direct URL to the license for now.

Preference or not, it's deprecated & unsupported by any/all tools that are run audits to gather this metadata. It's not supported by npm itself, either.
Suggest keeping your licenses field w/ direct link, but add the "license" field since that actually is what holds meaning.
Currently, busboy and streamsearch are both flagged as "unlicensed" which also affects all their dependents.


FigureCaption story styling conflicts with ImageCaption

https://github.com/undp/design-system/blob/master/stories/Atom/ReachElement/Figcaption/figcaption.scss is in conflict with https://github.com/undp/design-system/blob/master/stories/Molecules/ImageCaption/image-caption.scss so only latter should be used for the production assets compilation

Resolved and deployed


If a query is applied without containing the_geom or the_geom_webmercator, it changes the query-schema-model to unfetched

STR

Create a map with a points dataset.
Go to the builder.
Apply a query, adding LIMIT 10 at the end, for example.
Reload the page due to bug https://github.com/CartoDB/cartodb/issues/7875.
Go to the SQL editor again, and apply this query: SELECT cartodb_id FROM xxxxx.
Map fails but also it makes query-schema-model change to status unfetched, which causes problems with the table implementation where I've involved.

After taking a look, code in deep-insights integration change may_have_rows attribute and it provokes an internally change in the status of the query-schema-model.
https://github.com/CartoDB/cartodb/blob/master/lib/assets/javascripts/cartodb3/deep-insights-integrations.js#L69-L77

The question here, do we want this behaviour? is it correct? If so, I'll do the proper changes in my implementation.

Actually that works correctly/as it was intended; if the query is changed the query-schema model should be set to unfetched because if the query changed the schema might have changed too, so the schema needs to be reset and re-fetched.
Even more so if editing the query of a source node that have an analysis on top of it, because the query change might affect each node's schema in that chain.
The alternative would be interpret the changed query to decide whether it changes the schema or not, but that could easily become complicated… not sure we want to go down that path.

No no, that's not the problem. If you check the steps, if there is any problem at map level (cc @alonsogarciapablo) after applying a query (query is ok), the query schema model status is reseted to 'unfetched'.

Like mentioned offline; Since a source node doesn't really need the result from maps API to update the query-schema model this could/should (probably) be handled by the source-node model instead. So in terms of changes we'd have to:

Update/reset/re-fetch query-schema-model in source-node-model when the query is changed.
Don't listen to node changes in deep-insights-integration if the node is of type source

This report actually contains 2 bugs, the first one related to query-schema model was resolved by #8232.
However, setting a query that doesn't include the_geom makes the maps API fail yeah:
but the maps API still fails:

Request to Maps API failed: Postgis Plugin: ERROR:  column "the_geom_webmercator" does not exist
LINE 1: SELECT ST_AsBinary(ST_Simplify(ST_SnapToGrid("the_geom_webme...`)

Updating the title+desc to reflect this, but I'm not sure how we should handle/resolve that really.

Closing since there's nothing more to do here, side-effects of this kind of query will be handled like a non-select query which is planned for #8093


Write example for a page controller

Using lib-static to serve a static webpage via lib-router.

https://github.com/enonic-playground/demo-lib-static-page


Add a callback/event to notify that the SDK failed to send telemetry data

Add callbacks for onSuccess and onError.

I can see at least two ways how this could be implemented:
1: Adding an extra parameter to the track* calls, like trackEvent("MyEvent", myProps, { onSuccess: handleSuccess });. This way the user could be notified about every single telemetry item separately.
2: Adding global event handlers to the appInsights object: appInsights.addEventListener("sendSucceeded", handleSuccess);. This way the user gets to know whether telemetry sending works in general, and the onSuccess callback might even imply that the sending queue exhausted.
I personally prefer the second one, it would solve my current problem in #313.


Inconsistent results during 4k streams

Expected Behavior

Current Behavior
When streaming 4k files from sources (above 10Mb/s) I get repeated crashes of either elementum or kodi during streams.
If I repeatedly attempt to play the same file eventually it will work.

Possible Solution

Steps to Reproduce (for bugs)

Context

Your Environment

Version used:
1.62
Environment name and version:
Kodi 18.9
Operating System and version:
Android TV Shield TV 2019
Link to Kodi debug log:
https://pastebin.com/hFq8n1bp

@samjuels what should I see in that log? You just opened something and then log is finished.
If you have crashes, then you need to show what happens then.

@samjuels what should I see in that log? You just opened something and then log is finished.
If you have crashes, then you need to show what happens then.
How is that possible if kodi is crashing? is there another log file I need to enable?

Check for kodi.old.log file, near the usual kodi.log file.

https://pastebin.com/YXBq29Vh
this is a section of the complete log. let me know if you need more.

heres a more complete log, i recreated the error with a different file.
https://pastebin.com/ffMQT0xM

Disable libtorrent alerts in Elementum settings. And try again.

oddly enough i just did that...
https://pastebin.com/ffMQT0xM

here is another attempt...
https://pastebin.com/JE996aeT

one more ...
https://pastebin.com/4X7cuj4j

@samjuels I don't see any problem there.
Maybe you have out-of-memory issue, of something like that, if you Kodi is killed.

You are absolutely correct!!! I tried running my old 2017 shield tv (3gb) and it works perfectly!!! That extra gig of ram makes all the difference. Thank you for being awesome!!!!.


How to print filename and line by assert

CONFIG_DEBUG_ASSERTIONS_FILENAME must be enabled in order to print filename and line by assert function.
And, CONFIG_DEBUG_ASSERTIONS_FILENAME depends on CONFIG_DEBUG_ASSERTIONS and CONFIG_DEBUG.
So assert() and ASSERT() macro, not DEBUGASSERT(), cannot output the filename and line if CONFIG_DEBUG=n.
Is this behavior as intended?
It is strange because there is no distinction between ASSERT() and DEBUGASSERT().

Introduced by https://github.com/apache/nuttx/pull/9498

so you want to remove the dependence?

We should not only remove the dependencies, but rename the configration name.
Or, it is a good idea to create a separate CONFIG_ASSERTIONS_FILENAME from CONFIG_DEBUG_ASSERTIONS_FILENAME and apply it to assert(), ASSERT() and PANIC().

I just check the config, CONFIG_DEBUG_ASSERTIONS_FILENAME is default y if enable CONFIG_DEBUG_ASSERTIONS ,
the assert file name could be printed if enable CONFIG_DEBUG_ASSERTIONS and call assert(), ASSERT() and PANIC().
I don't quite understand what your problem is. Do you want to enable CONFIG_DEBUG_ASSERTIONS_FILENAME without  CONFIG_DEBUG_ASSERTIONS?

I think that assert() should print the filename and line without CONFIG_DEBUG.

@anchao

You mean CONFIG_DEBUG is actually CONFIG_NDEBUG=y right?

No. It is not about CONFIG_NDEBUG.
The NuttX assertion has two types, assert()(=ASSERT()) and DEBUGASSERT().
The former is used standardly by applications.
The latter is used for special debugging purposes.
To prevent an increase of the code size, the DEBUGASSERT() code can be disabled by CONFIG_DEBUG_ASSERTIONS=n.

Function
CONFIG
CONFIG
Show filename/line

assert(), ASSERT()
CONFIG_DEBUG_ASSERTIONS=n

No(*1)

DEBUGASSERT()
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_ASSERTIONS_FILENAME=n
No

DEBUGASSERT()
CONFIG_DEBUG_ASSERTIONS=y
CONFIG_DEBUG_ASSERTIONS_FILENAME=y
Yes

(*1)
When the general application uses assert(), the filename and line are not shown.
Before your commit, the filename and line were shown.
This comes from the following code.
https://github.com/apache/nuttx/blob/master/include/assert.h#L45-L51
For assert() to print the filename and line, we need to enable CONFIG_DEBUG=y, CONFIG_DEBUG_ASSERTIONS=y and CONFIG_DEBUG_ASSERTIONS_FILENAME=y. It causes an increase in code size since DEBUGASSERT() is also enabled.
Essentially, since assert() is also used by the application, it should show the filename and line by default, as it does on other platforms.
How do you think?

Thanks for the clear explanation, I followed your suggestion to separate CONFIG_ASSERTIONS_FILENAME from CONFIG_DEBUG_ASSERTIONS_FILENAME, and remove the coupling between assert(3) with CONFIG_DEBUG_ASSERTIONS,
Please review PR https://github.com/apache/nuttx/pull/10978


Fix(Readme.md) some grammatical mistakes and simplified it .

I have fixed some grammatical errors and simplified some sentences which improves the understanding experience of the reader.

Summary
SUMMARY_GOES_HERE
Full changelog

[Implement ...]
[Add related tests]
...

Issues resolved
Fix #XXX

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


[bug] Sidebar component is not responsive

Describe the bug
On smaller screen sizes the Sidebar components icons are not aligned properly. They are aligned awkwardly to the left.
I would like to work on this issue
To Reproduce

open any page with the sidebar
resize the screen to a smaller size

Expected Behavior
The sidebar icons must be aligned to the center
Screenshot/ Video

Additional context
No response

I would like to work on this issue

@OMGATE23 go ahead.


Fade music on transitions between main game and menus

I'm not sure I understand the context for this task considering we don't have any music anywhere besides the main game.


Issue while running as service

--web.listen-address="x.x.x.x:9090" is not working while running as linux service . without "" is working fine please update help menu or fix it .

hello,
--web.listen-address="x.x.x.x:9090" works in a shell environment. Unfortunately, when running out of a shell, you need to know the underlying platform. When it is systemd, I think that it would keep the "" verbatim. There isn't much we can do as we do not provide systemd service files.
It makes more sense to ask questions like this on the prometheus-users mailing list or our forums rather than in a GitHub issue. In our community channels, more people are available to potentially respond to your question, and the whole community can benefit from the answers provided.


Can we make synchronous IPC faster by doing a mixed shmem/pipe one?

While working on #1114:

https://github.com/DaemonEngine/Daemon/pull/1114

I noticed that message size of synchrnous IPC based trap calls have huge impact on performance.
I wonder if it would be possible to make such pipe speed totally independant from message size this way:

Game write message body in shmem at a given address;
Game reserve response body in shmem at a given address;
Game send to engine over pipe a very short message telling the engine the message is ready in shmem at the given address, and where the response should be written in shmem;
Engine receives the message and processes the message body;
Engine writes the response in shmem at a given address;
Engine sends back to game over pipe a very short response telling the game the response is ready in shmem at the known address.

I guess the problem of synchronous IPC between game and engine using shmem is to actually synchronize the access, maybe we can only use the pipe for synchronizing the access, not for exchanging the actual data.

I guess in theory it sounds faster, but I don't actually know whether such a thing will be faster in practice? Maybe we can avoid a kernel round trip by only using user space. Would need to be prototyped and benchmarked to be sure that this has a noticeable effect.


Movie search error

Hi. When I try to search for a Movie I get error. If I search for TV show it's working.

Hi
Problem is in:
File "/home/mrknow/.kodi/addons/plugin.video.specto/resources/lib/indexers/movies.py", line 212, in search
 - self.list = cache.get(self.trakt_list, 0, url)
+ self.list = cache.get(self.trakt_list, 0, url, self.trakt_user)
I will fix this next update 2016-05-07

I have the latest version but im still having this problem.
Please fix it T^T

Fixed in version 2<IP_ADDRESS>.


Missing link of rtop on tools section of GitHub pages

I saw there is a missing link of rtop on tools section of GitHub pages. Please, take a look here. It is written as [rtop](file:///Users/jwalke/githubdocs/Reason/index.html#reason-repl), a. That link points to someone local files. This is just a minor issue.

Thanks!

You're welcome.


ORA1232 Test invariant: Reputer closer to consensus should get more rewards

https://github.com/allora-network/allora-chain/pull/312 instead


Stream Audio

Stream Audio From A URL.

Completed In Release: v1.0
Commit: https://github.com/markydoodled/Stream.it/commit/67c653ecafcdeed4bc69138ebb8660f08b497fc2


rolling: allow control over padding

Code Sample, a copy-pastable example if possible
import numpy as np
import xarray as xr

x = np.arange(1, 366)
y = np.random.randn(365)
ds = xr.DataArray(y, dims=dict(dayofyear=x))

ds.rolling(center=True, dayofyear=31).mean()

Problem description
rolling cannot directly handle periodic boundary conditions (lon, dayofyear, ...), but could be very helpful to e.g. calculate climate indices. Also I cannot really think of an easy way to append the first elements to the end of the dataset and then calculate rolling.
Is there a way to do this? Should xarray support this feature?
This might also belong to SO...

Very useful suggestion.

Also I cannot really think of an easy way to append the first elements to the end of the dataset and then calculate rolling.

We already support a different type of "rolling" with periodicity
http://xarray.pydata.org/en/latest/generated/xarray.DataArray.roll.html?highlight=roll
and it is straightforward to apply roll operations at the variable level:
https://github.com/pydata/xarray/blob/master/xarray/core/variable.py#L1007-L1026
I suspect this would not be too hard to implement.

ds.rolling(center=True, dayofyear=31).mean()

What do you mean by rolling here? As a reduce operation over a rolling window, like a moving average (rolling in xarray)? Or rolling around the end of a dataarray when shifting (roll in xarray)? Or a mix of both?
Specifically, what's the dayofyear=31 doing?

Probably a mix of both - I want to compute a moving average, but with periodic boundaries. rolling sets window_length - 1 elements to nan. However I want to calculate them like so:
running_mean_0 = xr.concat([ds[-15:], ds[:16]]).mean()
running_mean_1 = xr.concat([ds[-14:], ds[:17]]).mean()

and so on...

I think what I want is like the filter function in R with circular=True.
I found two possibilities but they are quite "hand made" and certainly not very efficient
Solution with slicing:
# take the last and first elements and append/ prepend them
first = ds[:15]
last = ds[-15:]
extended = xr.concat([last, ds, first], 'dayofyear')
# do the rolling on the extended ds and get rid of NaNs
sol1 = extended.rolling(dayofyear=31, center=True).mean().dropna('dayofyear')

Solution with roll:
roll1 = ds.roll(dayofyear=150).rolling(dayofyear=31, center=True).mean()
roll2 = ds.rolling(dayofyear=31, center=True).mean()
sol2 = xr.concat([roll1, roll2], dim='r').mean('r')

Call rolling on original and rolled dataset, and put them together again.

I think the implementation would be not so difficult by supporting more flexible fill_value option in xr.DataArrayRolling.construct method.
Maybe fill_value='periodic' would be a possible API,
da.rolling(dayofyear=31).construct('window', fill_value='periodic').mean('window')

@mathause, any interest in contributing?

Though I'm not sure you need the construct machinery.
IIUC you need to copy a window-sized amount of data from the front of the array onto the back.
You could do that with construct-like machinery, which would save a copy - though not a large copy

@fujiisoup Yes for sure - I think it would be good. I think there are two salient questions:

Where this lives in the API: Should this be under construct? I don't think the kwarg should be called fill_value - that traditionally has a specific meaning of "the value to replace NaN with". I don't understand the periodic reference, but likely I'm missing something. Could be wrap=True, or roll=True?
How it's implemented - do you have a view here? Can you use the construct machinery? Or we make a new array and run rolling over it?

I don't think the kwarg should be called fill_value - that traditionally has a specific meaning of "the value to replace NaN with".

Agreed. dask.ghost has boundaries keyword, for which we can choose between periodic, reflect, and any constant.
I think this would be a good reference.
Maybe we can deprecate fill_value keyword and replace it by boundaries?
(I slightly regret that I choose fill_value keyword in construct).

How it's implemented - do you have a view here?

Only a slight modification of construct machinery realizes this (see #2011).
I think this option should be available only in construct method (not in the traditional rolling constructor) for the sake of simplicity (according to this comment).

#2011 looks good - I didn't realize numpy already had pad
Agree with your other comments. Thanks as ever @fujiisoup

I was going to suggest this feature so glad others are interested.
In my use case I would like to smooth a daily climatology. My colleague uses matlab and uses https://www.mathworks.com/matlabcentral/fileexchange/52688-nan-tolerant-fast-smooth
Using the slice solution as @mathause showed above, it would look something like (using code from http://xarray.pydata.org/en/stable/examples/weather-data.html#toy-weather-data)
import numpy as np
import pandas as pd
import xarray as xr

times = pd.date_range('2000-01-01', '2010-12-31', name='time')
annual_cycle = np.sin(2 * np.pi * (times.dayofyear.values / 366 - 0.28))
noise = 15 * np.random.rand(annual_cycle.size)
data = 10 + (15 * annual_cycle) + noise
da = xr.DataArray(data, coords=[times], dims='time')
#da.plot()
#Check variability at one day
#da.groupby('time.dayofyear').std('time')[0]
da_clim = da.groupby('time.dayofyear').mean('time')
_da_clim = xr.concat([da_clim[-15:], da_clim, da_clim[:15]], 'dayofyear')
da_clim_smooth = _da_clim.rolling(dayofyear=31, center=True).mean().dropna('dayofyear')
#da_clim_smooth.plot()

I am coming back to @shoyer suggestion in #2011 - your idea would be to do first a pad and then a rolling operation as e.g.:

import numpy as np
import xarray as xr

x = np.arange(1, 366)
y = np.random.randn(365)
ds = xr.DataArray(y, dims=dict(dayofyear=x))

ds.pad(dayofyear=15, mode='wrap').rolling(center=True, dayofyear=31).mean()

I think you may need to do cropping afterwards, too, before taking the mean.

I just need to find the three warmest consecutive months from a temperature dataset for my work, so I thought I add a complete example. First, create an example dataset with monthly temperature:
import xarray as xr
import numpy as np
import pandas as pd

time = pd.date_range("2000", periods=12 * 30, freq="M")
temp = np.sin((time.month - 5) / 6 * np.pi) + np.random.randn(*time.shape) * 0.3
da = xr.DataArray(temp, dims=["time"], coords=dict(time=time))
print(da)

<xarray.DataArray (time: 360)>
array([-0.676731, -0.812742, -1.367547, ...,  0.186731,  0.237676, -0.343879])
Coordinates:
  * time     (time) datetime64[ns] 2000-01-31 2000-02-29 ... 2029-12-31

Currently we can achieve this like:
n_months = 3

monthly = da.groupby("time.month").mean()
padded = monthly.pad(month=n_months, mode="wrap")
rolled = padded.rolling(center=True, month=n_months).mean(skipna=False)
sliced = padded.isel(month=slice(3, -3))

central_month = sliced.idxmax()

Implementing pad_mode in rolling would allow to do:
monthly = da.groupby("time.month").mean()
rolled = monthly.rolling(center=True, month=n_months, pad_mode="wrap").mean(skipna=False)

central_month = rolled.idxmax()

I think we should do pad_kwargs so that monthly.rolling(center-True, month=n_months, pad_kwargs=dict(mode="constant", constant_values=5)} is possible.

Hey, just wondering what the current state of this is? I'm running into exactly the issue described in https://github.com/pydata/xarray/issues/4743 which seems like a bug; that issue was closed as a dupe of this. Are we just waiting for someone to implement something here, or are there other blockers?

This should be easy now so we just need someone to try it out.
This is where the padding happens so the kwarg needs to be passed all the way down to Variable.rolling_window
https://github.com/pydata/xarray/blob/67d1955cc1d6941edd12a325090da7e4d029b84c/xarray/core/variable.py#L2132
What should the API be? .rolling(..., pad_kwargs={...}) or just have .pad(...).rolling(..., pad=False) i.e. have the user pad beforehand? The only advantage to the first one AFAICT is that the user doesn't have to specify the window length (or padding length) twice.

.pad(...).rolling(..., pad=False)

For this API, it seems that the only thing that would need to be implemented would be adding a pad keyword argument to rolling, defaulting to True.  Is that correct?

Yes. I think we might want this anyway; for rolling without any padding at all.

I added support for .rolling(..., pad=False) in #5603.  The basic implementation was simple, but getting it working for bottleneck/dask took a little more work.
That fixes, e.g., #4743, but I don't think it's a complete fix for this issue.


[BEAM-2162] Add logging to long BigQuery jobs

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[*] Make sure the PR title is formatted like:
[BEAM-<Jira issue #>] Description of pull request
[*] Make sure tests pass via mvn clean verify.
[*] Replace <Jira issue #> in the title with the actual Jira issue
number, if there is one.
[*] If this contribution is large, please file an Apache
Individual Contributor License Agreement.

R: @tgroh OR @dhalperi

Coverage decreased (-0.08%) to 70.557% when pulling 10f6edc4aea100cd80adc8c28f445022811e0fe3 on bjchambers:bq-logging into b4bafd09282cf66adf121b750d3e2d9e5a0fefbe on apache:master.

Coverage decreased (-0.08%) to 70.561% when pulling 10f6edc4aea100cd80adc8c28f445022811e0fe3 on bjchambers:bq-logging into b4bafd09282cf66adf121b750d3e2d9e5a0fefbe on apache:master.

Lovely, thanks.


Added node-telegram-operation-manager to community field

I've created this utility library for bots, that uses this library to show usage example. 😊

Great work!


Fix some formatting

Codified example container names
Emphasised 'link' vs 'legacy link' (instead of using code markup)
Add a missing ``` for a code example

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "patch-1" git@github.com:rhuss/docker.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

nice, LGTM

LGTM 🐵


test(world): check core system functions can only be delegatecalled

Fixes https://github.com/latticexyz/mud/issues/2162
~Testing this in Solidity is quite cumbersome - I wonder if we can write a JavaScript test that iterates through every system and tries to call them. Or even codegen so we don't have to manually write each selector.~
(found an ok way to do it in Solidity)

testing this in JS seems reasonable! and then we can just enumerate the system methods via the generated ABI

the idea here is that we have centralized where the function signatures are defined so that we can both register and test their proper registration using the same source array
in the future, we'd like to automate this via some codegen (#2155) but gonna skip that for now


Get-DbaUptime output & parameter updates

Type of Change

[ ] Bug fix (non-breaking change, fixes #)
[ ] New feature (non-breaking change, adds functionality)
[X] Breaking change (effects multiple commands or functionality)
[ ] Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
[ ] Pester test is included
[X] Spelling, grammar & other cleanup in Help and other text content

Purpose
Fixes #2152. Eliminates the -WindowsOnly and -SqlOnly switches and always returns both Windows and SQL uptime, unless Windows uptime cannot be obtained (in which case it's eliminated from the output). Uses Set-DefaultView for output.
Commands to test

See help

Failed test was in a function not changed by this PR.


ipv6 only deployement, Open Message Error: Bad BGP Identifier

In IPv6 only kubernetes deployment, router-id is derived from the hash of nodename. This is good and i saw some previous issues to make it this way to automate the process of router-id. But if you are unlucky like me and router-id ends up in the range of 224.xxxx reserved multicast range, the peering router start complaining and the BGP get stuck in the open message with an error of Open Message Error: Bad BGP Identifier.
Expected Behavior
The expected behavior should be to put a check on the router-id in a way that it exclude reserved multicast range. I believe this can be achieved by not using specific bits in the first octet of router-id to avoid this range. https://kb.juniper.net/InfoCenter/index?page=content&id=KB26645&cat=FIREWALL_IPSEC_VPN&actp=LIST
Current Behavior
The router-id is generated randomly including the reserved range of 224.xxx.
2021/12/01 02:32:05 BGP: x:x:x:4::11 bad OPEN, wrong router identifier <IP_ADDRESS>
2021/12/01 03:16:34 BGP: x:x:x:4::12 bad OPEN, wrong router identifier <IP_ADDRESS>
Possible Solution
The best and easy solution will be to fix the code and don't include the reserved ranges. This can be achieved by avoiding specific bits in the first octet of IPv4.
Another suggestion is to please include router-id parameter in the BGP node configuration yaml file. Currently there is no easy way to pass the manual router-id via daemon-set.
Steps to Reproduce (for bugs)

I used a kubernetes hostname of cl1-master1.rcp.local and this generated a router id of <IP_ADDRESS>.

Context
I am using IPv6 only kubernetes cluster, my nodes have no IPV4 addresses and I am relying on node hash for BGP router-id. Everything works fine when BGP remains within BIRD which full-mesh. When i am trying to do the peering with external router using eBGP, the upstream router doesn't accept router-id in reserved ranges. With adoption of IPv6, I believe more people will face this issues in future.
Your Environment
Client Version:    v3.21.1
Git commit:        183af6a8
Cluster Version:   v3.21.1
Cluster Type:      typha,kdd,k8s,operator,bgp,kubeadm
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:41:28Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}
OS: Ubuntu 20.04 LTS.
Upstream router is using FRR.

@abasitt thanks for raising this to our attention - agree this sounds like a bug in the way we calculate the router ID.
If we were to use fixed bits, that would be my preferred solution for this, but might it cause issue on upgrade for any cluster that is currently functioning? Changing router ID is likely to break graceful restart if I had to guess. We might just want to live with that, though, given the nature of the bug.

@caseydavenport thank you for labeling it as high impact and hope to see it's resolved. I also edit the issue and added in the RFC link which talks about how to error handle BGP router ID in the expected behavior section.
You are right if changing the code recalculate BGP router id even for the existing deployments, it will hard reset all BGP connections with an impact on data flows. Looking at the current landscape of kubernetes deployments, I do believe majority of the deployments are either IPv4 or dual stack so the impacted customers will be less. The sooner the bug is fixed, the better.
Can i suggest few options? Looking forward to hear feedback from you/community.
1- Have a logic in the router-id calculation which don't recalculate a new router ID for existing cache Nodenames or check for Bird config and see if there is existing router-ID then don't change it. If someone wants to recalculate, node name change is required.
2- Add this feature in a major release which requires a node downtime and as part of the bigger change, this feature will be rolled out as well.

I think what we would need to do is introduce a new router ID calculation option. See the logic here: https://github.com/projectcalico/calico/blob/a9be80eb90bc4974ade44d2464cc32260859db51/confd/etc/calico/confd/templates/bird6.cfg.template#L40-L44
Right now, the options are "hash" (which generates a router ID) or use the IPv4 address. We should introduce a new option named something like "auto" or a similar name that triggers using the improved logic. Then, users who have this issue can set the "auto" parameter.
Or, we modify the behavior of "hash" and introduce a new one "legacyhash" which allows folks to opt-in to the old behavior.
We can probably change the default as well, so long as we release note the consequences of doing so and provide an option to opt-out of the new hashing.

Sounds like a plan. New logic with a  different value like "auto" should work. Thank you so much and looking forward for the feature update :)


Update dependency to gax-python 0.12.0

[Current coverage][cc-pull] is 89.71%

Merging [#46][cc-pull] into [master][cc-base-branch] will not change coverage

@@             master        #46   diff @@
==========================================
  Files             3          3
  Lines           642        642
  Methods         131        131
  Messages          0          0
  Branches         99         99
==========================================
  Hits            576        576
  Misses           66         66
  Partials          0          0

Powered by Codecov. Last updated by [082bd8f...b5f88c0][cc-compare]
[cc-base-branch]: https://codecov.io/gh/googleapis/packman/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/googleapis/packman/compare/082bd8fa9143665cc10257e97741af0bc7c615df...b5f88c0f047373a648b17d5aa63dcf0aaa98cc56
[cc-pull]: https://codecov.io/gh/googleapis/packman/pull/46?src=pr

LGTM


Use ACTION_BAR_WIDTH instead of "#define SIDEBAR_WIDTH 30" in sidebar.c

You can use ACTION_BAR_WIDTH instead of "#define SIDEBAR_WIDTH 30" in sidebar.c.
I think It has different size in Time vs Time 2 (30 vs 34).
Thanks!!

Huh, I never noticed that ACTION_BAR_WIDTH was the same width as the timeline. This would be much more elegant than hardcoding 30/34 depending on platform. Thanks for the tip!


Feat: Minting fee

What does PR do?

Allow installer can set minting fee

Thanks, @vietdht , I resolved your comment and will merge this PR first


Show friendly error on image not found + update the setup docs

quickstart example config was missing required image_project_id
to work at all (see #234, #228),
update the GCP setup instructions to their current web UI as of now,
reorganize initial setup sections for readability,
change headings a bit for consistency,
fix minor typos, replace http links with https etc.

Oops, I was wrong. The image_project_id is NOT required, but https://github.com/fog/fog-google was missing the project_id of the image_family I was trying to use - rocky-linux-cloud for rocky-linux-8...

@Temikus ?


Added Leaky ReLU and Parametric ReLU (with a fixed coefficient of .25)

The coefficient for PReLU should become a learnable parameter in the future.

Did you check out the PReLU implementation at https://github.com/fchollet/keras/blob/master/keras/layers/advanced_activations.py ?
(one learnable parameter per input dimension, as in the original paper).

My apologies - I missed that file.
Thanks!


Critical Bug with HierarchyId Serialization/Deserialization

We ran into a show-stopping issue with the writing and reading of HierarchyId binary data.
If findings below are accurate then folks need to know that this wonderful library is not production ready at the moment!
V 2.1.0 now pulls in V 1.3.0 of dotMorten which addresses this specific bug. Thanks everyone!
This library uses dotMorten/Microsoft.SqlServer.Types as the backing SqlHierarchyId implementation which has an outstanding bug with how it reads and writes Id values.
For example: Using GetDescendant on SQL Server generates the following:
declare @h HIERARCHYID = '/1/1/'
select
[Binary] = @h.GetDescendant('/1/1/3/', '/1/1/4/'),
[String] = @h.GetDescendant('/1/1/3/', '/1/1/4/').ToString()

Binary		String
0x5AE058	/1/1/3.1/

But in C# it generates the following invalid binary value:
var newId = HierarchyId.Parse("/1/1/").GetDescendant(HierarchyId.Parse("/1/1/3/"), HierarchyId.Parse("/1/1/4/"));

using (var ms = new MemoryStream())
using (var binWriter = new BinaryWriter(ms))
{
    newId.Write(binWriter);
    var byteString = BitConverter.ToString(ms.ToArray()).Replace("-", "");
    var result = String.Format("0x{0}", byteString);
}

// Result = 0x5AE0B0

Here are some related issues and PRs:
https://github.com/dotMorten/Microsoft.SqlServer.Types/issues/35
https://github.com/dotMorten/Microsoft.SqlServer.Types/pull/55
I'm no expert, but after reading through this article and the PRs above it seems maybe the issue occurs when you try to use any Id value which is on the end of the special ranges? (ex. 0 through 3, 4 through 7, etc.)
http://www.adammil.net/blog/v100_how_the_SQL_Server_hierarchyid_data_type_works_kind_of_.html
I also verified that Using the .NET Framework version of Microsoft.SqlServer.Types does not have the issue.
I'm not sure what options are available until this is resolved. The maintainer of the dotMorten library has not committed to getting this resolved and does not seem to feel confident in maintaining HierarchyId features in his library. In fact, he may remove it completely.
https://github.com/dotMorten/Microsoft.SqlServer.Types/pull/55#issuecomment-735419099

That library is the main thing preventing this from being an “official” extension.
To do it properly, we should create something like NTS and NetTopologySuite.IO.SqlServerBytes but for hierarchyid.
The spec for the serialization format is here: https://docs.microsoft.com/openspecs/sql_server_protocols/ms-ssclrt/6f82da7e-f487-4bb1-afa3-4b0ce0acb2db

Please upvote these issues to let Microsoft know this is a priority:
https://github.com/dotnet/efcore/issues/365
https://github.com/dotnet/SqlClient/issues/322

@olmobrutall Let me know if you're interested in working on an implementation more like the NTS model. It would be completely decoupled from Microsoft.SqlServer.Types and SqlClient.
We'd provide a friendlier type for using, serializing, and deserializing hierarchyid values:
public class HierarchyId : IComparable {
    public HierarchyId(string value);
    public HierarchyId(byte[] bytes);

    public override string ToString();
    public byte[] ToByteArray();

    public HierarchyId GetAncestor(int n)
    public HierarchyId GetDescendant(HierarchyId child1, HierarchyId child2)
    public short GetLevel();
    public HierarchyId GetReparentedValue(HierarchyId oldRoot, HierarchyId newRoot);
    public bool IsDescendantOf(HierarchyId parent);
}

That could easily be used with SqlClient:
// Reading
var bytes = dataReader.GetSqlBytes(columnOrdinal).Value;
var hierarchyId = new HierarchyId(bytes);

// Writing
var bytes = hierarchyId.ToByteArray();
var parameter = command.Parameters
    .AddWithValue(parameterName, new SqlBytes(bytes));
parameter.SqlDbType = SqlDbType.Udt;
parameter.UdtTypeName = "hierarchyid";

1.3 was released which contains fixes for this issue!
https://github.com/dotMorten/Microsoft.SqlServer.Types/releases/tag/release%2Fv1.3

@bricelam to give a little bit of context, I'm the maintainer of https://github.com/signumsoftware/framework for like 10 years and I don't use EF on a daily basis (I would love to discuss why with the EF team by the way!). I'm also father of two toddlers and I have a day job.
I'm worried of the burden on support request that building an official piece of EF will put on my shoulders. Also, SQL Server is an expensive Microsoft product and we're talking about .Net Core support, not some corner language... shouldn't SQL Server team take his share of work?.
Complains aside, I see that the current dependency chain HierarhyId (efcore) -> SqlHierarhyId (dorMorten) -> HierarhyId (dotMorten) it's kind of ugly and should be fixed. I would also like to have one HierarhyId type that can easily be used in EFCore, Signum Framework, or any other .Net Core code.
About your proposed APIs:

Should this type have all the Equal / GetChasCode / CompareTo / overloaded operators... I think so.
What about the annoying SqlBoolean / SqlInt16? I just took it from the official .Net Framework implementation but.. could we use bool/short instead?

So, I can build / help build such a class but will be cool to have someone with a Microsoft salary that understand the code and can maintain it in the future.

We've been asking the SQL Server team for years to support the spatial and hierarchyid types .NET Core, but it seems to ...fall on deaf ears.
EF Core's use of NTS and this unofficial hierarchyid side project of mine (and others from the community) represent our efforts to unblock users. But of course, we'll keep pressuring the SQL Server team too.
My draft proposal was just an illustration of how we could cut dotMorten.Microsoft.SqlServer.Types out of the picture and still support hierarchyid on .NET Core using amore ORM-friendly type (those SqlBoolean types just make me cringe).
If you (and Morten) are happy with the current state of things, I'm happy to continue as we are for now and eagerly await official SQL Server support for these types on .NET Core.

I don't use EF on a daily basis (I would love to discuss why with the EF team by the way!)

@JeremyLikness is currently gathering feedback to help direct the future development of EF Core and, more generally, data access on .NET. Always feel free to reach out to us.

Closing this issue as resolved by PR #38, but feel free to continue the discussion.
The issues tracking official .NET Core support are:

https://github.com/dotnet/SqlClient/issues/30 (spatial)
https://github.com/dotnet/SqlClient/issues/322 (hierarhcyid)

@bricelam if you think SQL Server team support is not going to come any soon, I think I could find time to make a cleaner HierarchyId implementation about Feb 2021.
where should be the repo be created? As a project from dotnet? NetTopologySuite? signumsoftware? or my very professional olmobrutall account?
@vyrotek @ppasieka feel like helping on it? There is not too much coding to be made but maybe some reviewing/CI stuff etc?

We're reaching out to the SQL Sever team (again). Let's give them a chance to respond before moving forward.


[2.6] Apply & show the system-default-registry setting

https://github.com/rancher/rancher/issues/32600


docs(attest): use namespace import to avoid name collision in README

Hey @ssalbdivad! Here's a quick fix for the attest docs. Let me know if you have any feedback.

Awesome, I had meant to change this. Thanks!


Add/modify/delete ThirdPartyResources - Sequel

What changes were proposed in this pull request?

SparkJobState representation as a case class, making it easy to serialize, deserialize to and from json respectively
Implements POST/PATCH/DELETE/GET for the SparkJob TPR based on the case-class representation.
Representation of JobState as an Enum type
Support for ImagePullSecrets in the case where image is pulled from a private registry. Set spark.kubernetes.imagePullSecret to use with secret

I have rebased my commit to the tip of this branch, so it should be trivial to merge.

/cc @erikerlandson @foxish @mccheah @tnachen

@iyanuobidele This change LGTM.
I am going to merge this into tpr-fix and then we can iterate on it (since a PR on a PR seems cumbersome when it comes to keeping everything in sync).
I'll fix the import ordering as @tnachen mentioned.


feat: use default go path if env var isn't set

The default go path is ~/go which can be used if the GOPATH variable isn't set. If the home directory can't be determined, we error since the mount will fail anyway

Codecov Report

Merging #224 (f088dc5) into develop (cf635ec) will decrease coverage by 0.23%.
The diff coverage is 21.05%.

:exclamation: Current head f088dc5 differs from pull request most recent head a2a9079. Consider uploading reports for the commit a2a9079 to get more accurate results

@@             Coverage Diff             @@
##           develop     #224      +/-   ##
===========================================
- Coverage    35.94%   35.70%   -0.24%
===========================================
  Files           48       48
  Lines         4215     4232      +17
===========================================
- Hits          1515     1511       -4
- Misses        2557     2574      +17
- Partials       143      147       +4

Flag
Coverage Δ

unittests
35.70% <21.05%> (-0.24%)
:arrow_down:

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

Impacted Files
Coverage Δ

pkg/utils/paths.go
4.76% <0.00%> (-6.35%)
:arrow_down:

pkg/runtime/golang.go
74.32% <40.00%> (-2.82%)
:arrow_down:

pkg/ghissue/buglink.go
90.32% <0.00%> (-9.68%)
:arrow_down:

Continue to review full report at Codecov.

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


Generic field type issue (inheritance)

Thanks to #439, there is base generic type support for fields. But there are cases still not covered: e.g. if the generic type is inherited. The given test shows an issue:
import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.Test;

public class GenericComplicatedTest {

    @Test
    void genericInheritedShouldBeCorrectlyPopulated() {
        // given
        EasyRandom easyRandom = new EasyRandom();

        // when
        SubLongResource longResource = easyRandom.nextObject(SubLongResource.class);
        // note: with this call instead the test is success
        // InterLongResource longResource = easyRandom.nextObject(InterLongResource.class);

        // then
        assertThat(longResource.getId())
                .isInstanceOf(Long.class);
    }

    private static abstract class IdResource<K, T extends IdResource<K, ?>> {

        private K id;

        @SuppressWarnings("unchecked")
        public T setId(K id) {
            this.id = id;
            return (T) this;
        }

        public K getId() {
            return id;
        }
    }

    private static class InterLongResource<T extends InterLongResource<T>> extends IdResource<Long, T> {
    }

    private static class SubLongResource extends InterLongResource<SubLongResource> {
    }

}

Fails with message:
java.lang.ClassCastException: class org.jeasy.random.GenericComplicatedTest$SubLongResource cannot be cast to class java.lang.Long (org.jeasy.random.GenericComplicatedTest$SubLongResource is in unnamed module of loader 'app'; java.lang.Long is in module java.base of loader 'bootstrap')

	at org.jeasy.random.GenericComplicatedTest.genericInheritedShouldBeCorrectlyPopulated(GenericComplicatedTest.java:42)

Thank you for reporting this. Indeed, ER seems to resolve K as SubLongResource instead of Long. As mentioned in https://github.com/j-easy/easy-random/issues/425#issuecomment-723494900 , I'm not expecting ER to support this kind of use cases out of the box, that's why I updated the known limitations section accordingly when I released 4.3:
Due to type erasure, there are some cases where Easy Random is not able to get the information required
about a class or a field type at runtime.

Your use case is clearly one of them. That said, I will try to see if we can improve things in the next iteration (at least try to correctly detect unsupported cases and throw an exception with a clear message about that).


IStepContext metadata

As per https://github.com/scriptcs/scriptcs/pull/542/files#r11565140 it would be nice to have metadata about the scenario available on IStepContext, in that particular case, the name of the scenario method.

https://www.nuget.org/packages/Xbehave/2.0.0
https://github.com/xbehave/xbehave.net/releases/tag/2.0.0


snapshotEngine: snapshot scheduler should not schedule pods if node is not ready

Right now the snapshot maker does not start creating artifacts from snapshots before the node is ready. However when starting up new infrastructure, its possible that the snapshot job starts before the node pods are scheduled. We continuously take EBS snapshots even if the node is not ready because this "warms" up the storage and prevents longer snapshot times in the future.
Suggestion is to not allow the scheduler to schedule a maker pod until the node pod is scheduled. Then the maker logic will not continue if the node is not ready. "Not ready" and "doest exist" seem to be exclusive conditions.

Implemented


The provided key element does not match the schema

I am trying to do a get request and also the update event.
message: 'The provided key element does not match the schema',   code: 'ValidationException',   time: 2019-04-08T18:46:18.666Z,   requestId: '7KEDMN6JEGGUQ5F8MMVM9J2RQNVV4KQNSO5AEMVJF66Q9ASUAAJG',   statusCode: 400,   retryable: false,   retryDelay: 35.406635642419296 } {     "statusCode": 500,     "headers": {         "Access-Control-Allow-Origin": "*",         "Access-Control-Allow-Credentials": true     },     "body": "{\"status\":false}" }

my bad


Add a Gitter chat badge to README.md

calebboyd/app-builder now has a Chat Room on Gitter
@calebboyd has just created a chat room. You can visit it here: https://gitter.im/calebboyd/app-builder.
This pull-request adds this badge to your README.md:

If my aim is a little off, please let me know.
Happy chatting.
PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

I just said hi.

better talk about your own bugs privately, so it looks like it is a good feature. I won't add this badge on mine, which is embarrassing myself if someone in the room asks questions.


How to delete this conda feedstock project?

Comment:
@conda-forge/help-python
Hi,
We would like to remove the xsarslc-feedstock project. We don't have the permission to do that. Could you help us?
thanks

You can archive it, not delete. Also, bare in mind that the existing artifacts are still available for users. What is the reason for the request BTW?

We do not want to share the present/future code (publication in peer review journal foreseen).
What do you call artifacts?

We do not want to share the present/future code (publication in peer review journal foreseen).

You can archive it and no new packages will be built.
See https://github.com/conda-forge/admin-requests?tab=readme-ov-file#archive-or-unarchive-a-feedstock

What do you call artifacts?

The packages already built and distributed. Those are are GPL licensed and OSS at the moment if their creation. We only remove past artifacts if they are terribly broken to prevent a reproducibility problem for those doing good science.

Ok thanks for the explanation.
I will archive it then.
A last question about https://anaconda.org/conda-forge/xsarslc/ ,  is there a way to know if the "10863 total downloads" are only bots?

A last question about https://anaconda.org/conda-forge/xsarslc/ , is there a way to know if the "10863 total downloads" are only bots?

Nope. And probably not most bots. Packages that are the "base" for science, like numpy, can be in tons of CIs and have thousands of bot downloads. Others, like this one, that are on the other side, more like the ones that users install and run to get specific results, are usually less bot heavy and the most of those downloads are probably real people.


Add Tracing configuration for Lambda CDK construct

Add Tracing configuration for Lambda CDK construct
https://docs.aws.amazon.com/lambda/latest/dg/lambda-x-ray.html
Provide user a simple boolean flag to turn on tracing.
This should enable tracing in LambdaResource and add permission as follows
- Action:
- xray:PutTraceSegments
- xray:PutTelemetryRecords
Effect: Allow
Resource: '*'

in the interest of keeping it simple for the customer, i was planning on proposing, we keep this Active if we ever set it. Passthrough is a subset of Active. If a customer setting up a lambda does decide to instrument their Lambda, I think it best that instrumentation happens irrespective of whether the upstream explicitly asks for it or not. Let me know if you don't think this falls in the purview of enforcing best practices on the clients.

The purpose of L2 (the AWS Construct Library) is to expose the entire surface area. We are trying not to be opinionated about best practices, but rather help users make the right choice and optimize the usage for the common case/best-practice (which is different then not exposing it at all). I would encourage providing documentation on the enum that helps users make the best choice.

got you, will build accordingly.


ruff: Enable logging format rules

https://github.com/charliermarsh/ruff#flake8-logging-format-g

Nice, it's awesome to be able to remove things from semgrep, since they're way way slower there.


Document strictPropertyInitialization

And definite assignment assertions from Microsoft/TypeScript#20166

Could I handle the strictPropertyInitialization definition part since the assignment assertions have been completed?

Sure, go for it.

I noticed there is a section underneath Strict Class Initialization on this page https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-7.html that has some documentation for this flag. Is this sufficient or do you think I should add on to it?

Personally I wouldn't consider release notes to be documentation. CC @DanielRosenwasser


Directly run system given world

Objective
Systems are an ergonomic and expressive API for performing well-encapsulated complex logic.
However, you could not easily use them while working directly with &mut World for custom commands, exclusive systems, writing tests or bare-bones bevy_ecs usage.
Solution
Adds a System::run_direct method, which immediately executes a single system on a particular world and then flushes any Commands (or similar system parameters).
The equivalent run_direct method is also created for exclusive systems.
This is also very useful for users who may want to construct their own game loop in part or whole, sacrificing parallelism for simplicity and control.
Notes
Successor to #2417; exposing an API that dodges the ownership issues created there. Closely related to #2234.

I think I'd prefer to just change the run method to initialise self

The problem with this is that you lose all the nice caching, and have to repeat the initialization work repeatedly. This is much less of an issue in one-off systems that are being run than it is in schedules though.

I'm not convinced that this API is more useful than the existing APIs

The aim of this is actually to make working with exclusive world access easier, rather than compete directly with the way that other System methods are used. Rather than learning an entirely new API and fighting the borrow checker with cell and resource_scope, users can simply make an ordinary system and run it, then use the exclusive world access to finish up the task they had in mind.

But I mean that the actual body of this function seems to be:
fn apply_direct(world){
self.init(world);
self.run(world);
}

Immediately applying buffers is the other very useful trick for ordinary non-exclusive systems, which lets you bypass thinking about "have my commands applied yet".
This is largely a convenience method, but I think that it does a good job helping reduce boilerplate and mental overhead for basic uses by hiding some of the largely internal implementation details and just doing what end users would like to do when writing custom commands or using ordinary system syntax within larger exclusive systems.
run_direct for exclusive systems is mostly there to ensure API consistency; I would be very surprised to see it get heavy use.

Closing this out as I don't think it's immediately the way forward. We can easily reimplement this if needed.


Use in PackedStringArray over Array in Engine.get_author_info() & similar

Also affects get_donor_info and get_copyright_info.
This is technically compatibility-breaking, but also not really? They're all Arrays of exclusively Strings. In Godot 4 it may as well be a PackedStringArray, instead of even a TypedArray (which it isn't now).

Vector aka PackedStringArray and TypedArray[String] are different from gdscript. I recall it was somewhat hard to convert. Thoughts?

They are indeed different, but for the purpose of what most people would use this for, I personally believe making use of the Packed Array is ideal. And, at worst, one could convert it to an Array.
Granted, there may be some questions up the air. Namely, if the returned Array should be read-only, and what not.


Fixes loading SVG and FileMessage style

This PR uses the <template> trick in order to load SVG files without a webpack loader.
It also updates the FileMessage style in order to cleanup it a little bit and also in order to make it looking like our mockup.

thanks a lot


Improve type inference for nullish coalescing (??) after null checks on multiple variables

🔍 Search Terms
"narrowing multiple conditions", "control flow analysis", "nullish coalescing", "type narrowing after null check"
✅ Viability Checklist

[X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[X] This wouldn't change the runtime behavior of existing JavaScript code
[X] This could be implemented without emitting different JS based on the types of the expressions
[X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
[X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

⭐ Suggestion
Currently, TypeScript doesn’t correctly infer types when using the nullish coalescing operator (??) after null checks involving multiple nullable variables. This requires additional code to handle permutations of nullable values, making the code less concise.
Consider the following example:
function test(a: string | null, b: string | null): string {
  if (!a && !b) {
    throw Error("Need either a or b");
  }

  return a ?? b;  // TypeScript error: Type 'string | null' is not assignable to type 'string'
}

After the if (!a && !b) check, it’s guaranteed that at least one of a or b is a string, yet TypeScript still raises an error for the a ?? b expression, assuming that both values could still be null.
Expected Behavior:
I expect TypeScript to infer that at least one of a or b is a non-null string after the if (!a && !b) check. Therefore, a ?? b should not throw a type error since it’s guaranteed to return a non-null string.
Actual Behavior:
TypeScript throws the following error:
Type 'string | null' is not assignable to type 'string'.

Despite the null check ensuring that at least one of a or b is non-null, TypeScript doesn’t infer that a ?? b will always return a string.
📃 Motivating Example
In TypeScript, handling nullable values often requires extra checks or verbose code. With this improvement, TypeScript’s type inference is now smarter when using the nullish coalescing operator (??) after null checks.
For example, in this code:
function test(a: string | null, b: string | null): string {
  if (!a && !b) {
    throw Error("Need either a or b");
  }

  return a ?? b;  // Now correctly inferred as 'string'
}

TypeScript now understands that after checking both a and b are not null, a ?? b will always return a non-null string. This makes the code more concise and eliminates the need for redundant if blocks or temporary variables.
As the number of nullable variables increases, this becomes more useful. Without it, handling multiple nullable variables would require increasingly verbose checks.
💻 Use Cases

What do you want to use this for?
General TypeScript usage.

What shortcomings exist with current approaches?
Non-null assertion is needed, when it shouldn't be.

What workarounds are you using in the meantime?
Using non-null assertion. Eg.

function test(a: string | null, b: string | null): string {
  if (!a && !b) {
    throw Error("Need either a or b")
  }

  return (a ?? b )!
}

Duplicate of #49452.


Handle packages inside another node modules package when auto importing

Fixes #37542

Thank you so much for fixing this 👍


I created an ableton live10 Skin with the dracula theme

New Theme?
Not sure if I named correctly color palette.
This time I did use the propper Github Template.
Repo can be found at.
https://github.com/NicTanghe/Dracula-AbletonTheme
Its stil somewhat of a wip.

Hey @NicTanghe, we already have an Ableton Live 10 theme.
Site: https://draculatheme.com/ableton-live
Source Code: https://github.com/dracula/ableton-live
It would be great if you could contribute to that one instead.
Thanks for using Dracula and creating new themes!

Ooh i dident c it when i made this.


[Bug]: Cannot migrate deprecated snowflake_role_grants to snowflake_grant_account_role

Terraform CLI Version
1.7.4
Terraform Provider Version
0.93.0
Terraform Configuration
Previously, I have a resource like below,
resource "snowflake_role_grants" "role_grant_user" {
  provider  = snowflake.useradmin_role
  role_name = snowflake_role.role.name
  users     = [snowflake_user.user.name]
}
To upgrade to 0.93.0, I changed to below(I do not want to use terraform state rm so using the removed block instead),
removed {
  from = snowflake_role_grants.role_grant_user
  lifecycle {
    destroy = false
  }
}
resource "snowflake_grant_account_role" "role_grant_user_new" {
  provider  = snowflake.useradmin_role
  role_name = snowflake_role.role.name
  user_name = snowflake_user.user.name
}
import {
  to = snowflake_grant_account_role.role_grant_user_new
  id = "<role_name>|USER|<user_name>"
}

But got the error and warning,

│ Error: no schema available for snowflake_role_grants.role_grant_user while reading state; this is a bug in Terraform and should be reported

 │ Warning: Missing resource schema from provider
    │
    │ No resource schema found for snowflake_role_grants when decoding prior
    │ state

Even, if I completely removed the old resource without any removed or import block, I got the same error.

I did the same for snowflake_oauth_integration -> snowflake_oauth_integration_for_partner_applications and it works.

Category
category:resource
Object type(s)
No response
Expected Behavior
The old resource should not be destroyed and should be able to be imported to the new one. The plan should be no changes for this.
Actual Behavior
Error about no schema available even remove the resource block, thus cannot upgrade to the version 0.93.0
Steps to Reproduce

create the resource snowflake_role_grants listed above with snowflake provider version 0.92
update the version to 0.93 and delete the resource.
update the version to 0.93 and using the removed, import block plus the new resource mentioned above.

How much impact is this issue causing?
Medium
Logs
No response
Additional Information
No response
Would you like to implement a fix?

[ ] Yeah, I'll take it 😎

Hey @vivi0209. Thanks for reaching out to us.
In 0.93.0 there is no snowflake_role_grants, so it's a correct error that no schema available for snowflake_role_grants.role_grant_user while reading state.
If you want to run the migration your way, I believe you have to do it being on 0.92.0 version.

Hey @vivi0209. Thanks for reaching out to us.
In 0.93.0 there is no snowflake_role_grants, so it's a correct error that no schema available for snowflake_role_grants.role_grant_user while reading state.
If you want to run the migration your way, I believe you have to do it being on 0.92.0 version.

Hi! Thanks for your quick reply! Does it mean that I need to split it into 2 pull requests for upgrading to version 0.93.0? First, do the migrations on 0.92.0 and then upgrade the version to 0.93.0?

If you don't want to touch the state, then yes. You can't have the state with objects that are already gone.

If you don't want to touch the state, then yes. You can't have the state with objects that are already gone.

Thanks! I just come into another issue for the import block, I can see in the statefile that the id for snowflake_role_grants is  "id": "FLYWAY_FR||FLYWAY_AU", but when I copy it to the import block, I got the error, "invalid object type specified: , expected ROLE or USER│ ", I tried to add ROLE or USER to the middle but got another error about "│ Error: Cannot import non-existent remote object
│
│ While attempting to import an existing object to
│ "snowflake_grant_account_role.flyway_role_grant", the provider detected
│ that no object exists with the given id. Only pre-existing objects can be
│ imported; check that the id is correct and that it is associated with the
│ provider's configured region or endpoint, or use "terraform apply" to
│ create a new remote object for this resource."
Why is that and how to fix it?

The old id in snowflake_role_grants according to https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.92.0/docs/resources/role_grants#import was:
role_name|role1,role2|user1,user2

so based on your example I guess that:

FLYWAY_FR is the name of the role
FLYWAY_AU is the name of the user

According to the docs of snowflake_grant_account_role : https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_account_role#import, the new id should be:
"FLYWAY_FR"|USER|"FLYWAY_AU"

If this is the one you check, please run the code with TF_LOG=DEBUG and share the SQL statements being run.

which means I need to destroy the old deprecated ones and create the new resources?
No, we do not require destroying and recreating.

The old id in snowflake_role_grants according to https://registry.terraform.io/providers/Snowflake-Labs/snowflake/0.92.0/docs/resources/role_grants#import was:
role_name|role1,role2|user1,user2

so based on your example I guess that:

FLYWAY_FR is the name of the role
FLYWAY_AU is the name of the user

According to the docs of snowflake_grant_account_role : https://registry.terraform.io/providers/Snowflake-Labs/snowflake/latest/docs/resources/grant_account_role#import, the new id should be:
"FLYWAY_FR"|USER|"FLYWAY_AU"

If this is the one you check, please run the code with TF_LOG=DEBUG and share the SQL statements being run.

which means I need to destroy the old deprecated ones and create the new resources?

No, we do not require destroying and recreating.

Thanks for your help! I found the issue, I wrote id = "FLYWAY_FR|USER|FLYWAY_AU" in the import block but it should be id = ""FLYWAY_FR"|USER|"FLYWAY_AU"".
Thanks again for your help!

Great to hear that @vivi0209. I am closing the issue then :)


Postgres Backup fails with user "root"

I have this docker-compose file:
version: '3.1'

services:
  # ...SOME OTHER SERVICES...

  pg:
    image: postgres:11
    container_name: pg-my-service-prod
    restart: always
    volumes:
      - $HOME/data/postgres-my-service-prod:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=root
      - POSTGRES_DB=myservicePROD
    ports:
      - <IP_ADDRESS>:5432:5432
    networks:
      - my-service-prod

  db-backup:
    image: tiredofit/db-backup
    restart: always
    container_name: db-backup
    depends_on:
      - pg
    volumes:
      - $HOME/data/backups:/backup
    environment:
      - DB_TYPE=pgsql
      - DB_HOST=pg
      - DB_NAME=myservicePROD
      - DB_PORT=5432
      - DB_USER="root"
      - DB_PASS="root"
      # - DB_DUMP_BEGIN=0415
      - DB_DUMP_BEGIN=+01
      - MD5=TRUE
      - SPLIT_DB=TRUE
      - DEBUG_MODE=TRUE
    networks:
      - my-service-prod

  # ...SOME OTHER SERVICES...

networks:
    my-service-prod:

The backup fails with this message:
db-backup     | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
db-backup     | [s6-init] ensuring user provided files have correct perms...exited 0.
db-backup     | [fix-attrs.d] applying ownership & permissions fixes...
db-backup     | [fix-attrs.d] 01-s6: applying...
db-backup     | [fix-attrs.d] 01-s6: exited 0.
db-backup     | [fix-attrs.d] 02-zabbix: applying...
db-backup     | [fix-attrs.d] 02-zabbix: exited 0.
db-backup     | [fix-attrs.d] 03-logrotate: applying...
db-backup     | [fix-attrs.d] 03-logrotate: exited 0.
db-backup     | [fix-attrs.d] done.
db-backup     | [cont-init.d] executing container initialization scripts...
db-backup     | [cont-init.d] 01-permissions: executing...
db-backup     | + DEBUG_PERMISSIONS=FALSE
db-backup     | + ENABLE_PERMISSIONS=TRUE
db-backup     | + '[' TRUE = TRUE ']'
db-backup     | + varenvusername=(`env | grep USER_ | awk -F= '{print tolower($1)}' | awk -F_ '{print $2}'`)
db-backup     | ++ grep USER_
db-backup     | ++ awk -F_ '{print $2}'
db-backup     | ++ awk -F= '{print tolower($1)}'
db-backup     | ++ env
db-backup     | + varenvuid=(`env | grep USER_ | awk -F= '{print tolower($2)}'`)
db-backup     | ++ env
db-backup     | ++ awk -F= '{print tolower($2)}'
db-backup     | ++ grep USER_
db-backup     | ++ echo ''
db-backup     | ++ sed 's/ /\\|/g'
db-backup     | + strusers=
db-backup     | + [[ ! -z '' ]]
db-backup     | + '[' FALSE = TRUE ']'
db-backup     | + '[' FALSE = true ']'
db-backup     | + '[' TRUE = TRUE ']'
db-backup     | + echo '**** [permissions] [debug] Users (varenvusername) from Docker env are: '
db-backup     | + echo '**** [permissions] [debug] UIDs (varenvuid) from Docker env are: '
db-backup     | + echo '**** [permissions] [debug] The string (strusers) used to grep the users is: '
db-backup     | + echo '**** [permissions] [debug] Users (varpassuser) from /etc/passwd are: '
db-backup     | + echo '**** [permissions] [debug] UIDs (varpassuserid) from /etc/passwd are: '
db-backup     | + counter=0
db-backup     | + '[' 0 -gt 0 ']'
db-backup     | + counter=0
db-backup     | + varenvgroupname=(`env | grep ^GROUP_ | grep -v GROUP_ADD_  | awk -F= '{print tolower($1)}' | awk -F_ '{print $2}'`)
db-backup     | **** [permissions] [debug] Users (varenvusername) from Docker env are:
db-backup     | **** [permissions] [debug] UIDs (varenvuid) from Docker env are:
db-backup     | **** [permissions] [debug] The string (strusers) used to grep the users is:
db-backup     | **** [permissions] [debug] Users (varpassuser) from /etc/passwd are:
db-backup     | **** [permissions] [debug] UIDs (varpassuserid) from /etc/passwd are:
db-backup     | ++ grep '^GROUP_'
db-backup     | ++ awk -F= '{print tolower($1)}'
db-backup     | ++ grep -v GROUP_ADD_
db-backup     | ++ env
db-backup     | ++ awk -F_ '{print $2}'
db-backup     | + varenvgid=(`env | grep ^GROUP_ | grep -v GROUP_ADD_ | awk -F= '{print tolower($2)}'`)
db-backup     | ++ env
db-backup     | ++ ++ ++ grep '^GROUP_'
db-backup     | grep -v GROUP_ADD_
db-backup     | awk -F= '{print tolower($2)}'
db-backup     | ++ sed 's/ /\\|/g'
db-backup     | ++ echo ''
db-backup     | + strgroups=
db-backup     | + [[ ! -z '' ]]
db-backup     | + '[' FALSE = TRUE ']'
db-backup     | + '[' FALSE = true ']'
db-backup     | + '[' TRUE = TRUE ']'
db-backup     | + echo '**** [permissions] [debug] Group names (varenvgroupname) from Docker environment settings are: '
db-backup     | + echo '**** [permissions] [debug] GIDs (grvarenvgid) from Docker environment settings are: '
db-backup     | + echo '**** [permissions] [debug] The string (strgroup) used to grep the groups is: '
db-backup     | + echo '**** [permissions] [debug] Group names (vargroupname) from /etc/group are: '
db-backup     | + echo '**** [permissions] [debug] GIDs (vargroupid) from /etc/group are: '
db-backup     | + '[' 0 -gt 0 ']'
db-backup     | + counter=0
db-backup     | + varenvuser2add=(`env | grep ^GROUP_ADD_ | awk -F= '{print $1}' | awk -F_ '{print tolower($3)}'`)
db-backup     | **** [permissions] [debug] Group names (varenvgroupname) from Docker environment settings are:
db-backup     | **** [permissions] [debug] GIDs (grvarenvgid) from Docker environment settings are:
db-backup     | **** [permissions] [debug] The string (strgroup) used to grep the groups is:
db-backup     | **** [permissions] [debug] Group names (vargroupname) from /etc/group are:
db-backup     | **** [permissions] [debug] GIDs (vargroupid) from /etc/group are:
db-backup     | ++ env
db-backup     | ++ grep '^GROUP_ADD_'
db-backup     | ++ awk -F_ '{print tolower($3)}'
db-backup     | ++ awk -F= '{print $1}'
db-backup     | + varenvdestgroup=(`env | grep ^GROUP_ADD_ | awk -F= '{print tolower($2)}'`)
db-backup     | ++ env
db-backup     | ++ grep ++ awk -F= '{print tolower($2)}'
db-backup     | '^GROUP_ADD_'
db-backup     | + '[' FALSE = TRUE ']'
db-backup     | + '[' FALSE = true ']'
db-backup     | + '[' TRUE = TRUE ']'
db-backup     | + echo '**** [permissions] [debug] Users (varenvuser2add) to add to groups are: '
db-backup     | + echo '**** [permissions] [debug] Groups (varenvdestgroup) to add users are: '
db-backup     | **** [permissions] [debug] Users (varenvuser2add) to add to groups are:
db-backup     | **** [permissions] [debug] Groups (varenvdestgroup) to add users are:
db-backup     | + mkdir -p /tmp/state
db-backup     | ++ basename /var/run/s6/etc/cont-init.d/01-permissions
db-backup     | + touch /tmp/state/01-permissions-init
db-backup     | [cont-init.d] 01-permissions: exited 0.
db-backup     | [cont-init.d] 02-zabbix: executing...
db-backup     | [cont-init.d] 02-zabbix: exited 0.
db-backup     | [cont-init.d] 03-cron: executing...
db-backup     | **** [cron] Disabling Cron
db-backup     | [cont-init.d] 03-cron: exited 0.
db-backup     | [cont-init.d] 04-smtp: executing...
db-backup     | **** [smtp] [debug] SMTP Mailcatcher Enabled at Port 1025, Visit http://<IP_ADDRESS>:8025 for Web Interface
db-backup     | **** [smtp] Disabling SMTP Features
db-backup     | [cont-init.d] 04-smtp: exited 0.
db-backup     | [cont-init.d] 99-container-init: executing...
db-backup     | [cont-init.d] 99-container-init: exited 0.
db-backup     | [cont-init.d] done.
db-backup     | [services.d] starting services
db-backup     | [services.d] done.
db-backup     |
db-backup     | ** [zabbix] Starting Zabbix Agent
db-backup     | 2019/06/30 12:44:43 Using in-memory storage
db-backup     | 2019/06/30 12:44:43 [SMTP] Binding to address: <IP_ADDRESS>:1025
db-backup     | [HTTP] Binding to address: <IP_ADDRESS>:8025
db-backup     | 2019/06/30 12:44:43 Serving under http://<IP_ADDRESS>:8025/
db-backup     | Creating API v1 with WebPath:
db-backup     | Creating API v2 with WebPath:AnalyticsServer-0.0.1-SNAPSHOT.jar started by root in /opt/app)org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$42f4199] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)environments was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]org.hibernate.type.UUIDBinaryType@158f4cfe
db-backup     | + '[' '!' -n pgsql ']'
db-backup     | + '[' '!' -n pg ']'
db-backup     | + COMPRESSION=GZ
db-backup     | + PARALLEL_COMPRESSION=TRUE
db-backup     | + DB_DUMP_FREQ=1440
db-backup     | + DB_DUMP_BEGIN=+01
db-backup     | + DB_DUMP_TARGET=/backup
db-backup     | + DBHOST=pg
db-backup     | + DBNAME=myservicePROD
db-backup     | + DBPASS='"root"'
db-backup     | + DBUSER='"root"'
db-backup     | + DBTYPE=pgsql
db-backup     | + MD5=TRUE
db-backup     | + SPLIT_DB=TRUE
db-backup     | + TMPDIR=/tmp/backups
db-backup     | + '[' '' = NOW ']'
db-backup     | + '[' TRUE = 'TRUE ' ']'
db-backup     | + BZIP=bzip2
db-backup     | + GZIP=gzip
db-backup     | + XZIP=xz
db-backup     | + case "$DBTYPE" in
db-backup     | + DBTYPE=pgsql
db-backup     | + DBPORT=5432
db-backup     | + [[ -n "root" ]]
db-backup     | + POSTGRES_PASS_STR='PGPASSWORD="root"'
db-backup     | ++ date
db-backup     | + echo '** [db-backup] Initialized at at Sun' Jun 30 12:44:51 PDT 2019
db-backup     | ** [db-backup] Initialized at at Sun Jun 30 12:44:51 PDT 2019
db-backup     | ++ date +%s
db-backup     | + current_time=1561923891
db-backup     | ++ date +%Y%m%d
db-backup     | + today=20190630
db-backup     | + [[ +01 =~ ^\+(.*)$ ]]
db-backup     | + waittime=60
db-backup     | + sleep 60
db-backup     | [APIv1] KEEPALIVE /api/v1/events
db-backup     | + true
db-backup     | + mkdir -p /tmp/backups
db-backup     | ++ date +%Y%m%d-%H%M%S
db-backup     | + now=20190630-124551
db-backup     | + TARGET=pgsql_myservicePROD_pg_20190630-124551.sql
db-backup     | + case "$DBTYPE" in
db-backup     | + check_availability
db-backup     | + case "$DBTYPE" in
db-backup     | + COUNTER=0
db-backup     | + export 'PGPASSWORD="root"'
db-backup     | + PGPASSWORD='"root"'
db-backup     | + pg_isready --dbname=myservicePROD --host=pg --port=5432 '--username="root"' -q
db-backup     | + backup_pgsql
db-backup     | + '[' TRUE = TRUE ']'
db-backup     | + export 'PGPASSWORD="root"'
db-backup     | + PGPASSWORD='"root"'
db-backup     | ++ psql -h pg -U '"root"' -p 5432 -c 'COPY (SELECT datname FROM pg_database WHERE datistemplate = false) TO STDOUT;'
db-backup     | psql: FATAL:  password authentication failed for user ""root""
db-backup     | + DATABASES=
db-backup     | + '[' TRUE = TRUE ']'
db-backup     | ++ stat -c%s /backup/pgsql_myservicePROD_pg_20190630-124551.sql
db-backup     | stat: can't stat '/backup/pgsql_myservicePROD_pg_20190630-124551.sql': No such file or directory
db-backup     | + zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.size -o
db-backup     | zabbix_sender [759]: option requires an argument -- o
db-backup     | usage:
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host -k key
db-backup     |                 -o value
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host] [-T] [-r]
db-backup     |                 -i input-file
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] -k key -o value
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] [-T] [-r] -i input-file
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host
db-backup     |                 --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file -k key
db-backup     |                 -o value
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
db-backup     |                 --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file [-T] [-r]
db-backup     |                 -i input-file
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file -k key
db-backup     |                 -o value
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file [-T] [-r]
db-backup     |                 -i input-file
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host
db-backup     |                 --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file -k key -o value
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
db-backup     |                 --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file [-T] [-r] -i input-file
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file -k key -o value
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file [-T] [-r] -i input-file
db-backup     |   zabbix_sender -h
db-backup     |   zabbix_sender -V
db-backup     | ++ date -r /backup/pgsql_myservicePROD_pg_20190630-124551.sql +%s
db-backup     | date: can't stat '/backup/pgsql_myservicePROD_pg_20190630-124551.sql': No such file or directory
db-backup     | + zabbix_sender -c /etc/zabbix/zabbix_agentd.conf -k dbbackup.datetime -o
db-backup     | zabbix_sender [761]: option requires an argument -- o
db-backup     | usage:
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host -k key
db-backup     |                 -o value
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host] [-T] [-r]
db-backup     |                 -i input-file
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] -k key -o value
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] [-T] [-r] -i input-file
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host
db-backup     |                 --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file -k key
db-backup     |                 -o value
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
db-backup     |                 --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file [-T] [-r]
db-backup     |                 -i input-file
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file -k key
db-backup     |                 -o value
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect cert --tls-ca-file CA-file
db-backup     |                 [--tls-crl-file CRL-file]
db-backup     |                 [--tls-server-cert-issuer cert-issuer]
db-backup     |                 [--tls-server-cert-subject cert-subject]
db-backup     |                 --tls-cert-file cert-file --tls-key-file key-file [-T] [-r]
db-backup     |                 -i input-file
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] -s host
db-backup     |                 --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file -k key -o value
db-backup     |   zabbix_sender [-v] -z server [-p port] [-I IP-address] [-s host]
db-backup     |                 --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file [-T] [-r] -i input-file
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file -k key -o value
db-backup     |   zabbix_sender [-v] -c config-file [-z server] [-p port] [-I IP-address]
db-backup     |                 [-s host] --tls-connect psk --tls-psk-identity PSK-identity
db-backup     |                 --tls-psk-file PSK-file [-T] [-r] -i input-file
db-backup     |   zabbix_sender -h
db-backup     |   zabbix_sender -V
db-backup     | + [[ -n '' ]]
db-backup     | + '[' '' = TRUE ']'
db-backup     | + sleep 86400

Looks like it ignores the DB name in the command generation phase, therefore it's trying to connect to the root db. Tried with ', " and also without anything sorrounding db name, user and password

That's strange. Definitely the Double quotes are throwing some errors there.  I'm not running 11 on any production systems but it shouldn't be different. I will in the next few days get one of my guys to look into this to see if we can replicate. FWIW we've got this running on half a dozen production systems with no hiccups, although now I'm getting paranoid :)

Could be my setup, I know that setting root as the username is not recommended, but I don't see why it should fail.
I'll try to investigate if I have the time and see if I can fix it myself. I believe the issue is when it creates the command to do the actual backup:
db-backup     | ++ psql -h pg -U '"root"' -p 5432 -c 'COPY (SELECT datname FROM pg_database WHERE datistemplate = false) TO STDOUT;'

As you can see it does not use the DB name, so maybe (hopefully) it's a simple fix.

Hi there, sorry for my delay. I had a chance to look at our production systems and also your logs in more detail. It is stating in your logs that the password is wrong, which may limit your ability to get your backups working properly.
In the code, If SPLIT_DB=TRUE we query the psql server for databases, then execute a for loop to backup the databases one by one.
Specifically the command works like so:
      export PGPASSWORD=${DBPASS}
      DATABASES=`psql -h $DBHOST -U $DBUSER -p ${DBPORT} -c 'COPY (SELECT datname FROM pg_database WHERE datistemplate = false) TO STDOUT;' `
            for db in $DATABASES; do
                echo "** [db-backup] Dumping database: $db"
                TARGET=pgsql_${db}_${DBHOST}_${now}.sql
                pg_dump -h ${DBHOST} -p ${DBPORT} -U ${DBUSER} $db > ${TMPDIR}/${TARGET}
                generate_md5
                compression
                move_backup
            done

Running this on your command line should give you some sort of output, if not, then it is indeed a problem with the password you have setup:
bash-5.0# export PGPASSWORD=$DB_PASS
bash-5.0# psql -h $DB_HOST -U $DB_USER -c 'COPY (SELECT datname FROM pg_database WHERE datistemplate = false) TO STDOUT;'
postgres
database1
database2

Running the command SELECT datname FROM pg_database WHERE datistemplate = false inside of DataGrip, connected with the same credentials I used for this image, gives me a list of the actual DBs inside of the instance without any issues.
So I believe the issue happens only when using the psql command to list the available DBs. If I run the command
psql -U root -h localhost <DB_NAME>

inside of the Postgres 11 container, the auth works without any issues and I am able to interact with the system.
If I do not specify the DB name, then the command fails and I get a
psql: FATAL:  database "root" does not exist

So I believe the issue happens when the name of the DB is omitted from the command, which makes the listing of the available DBs only possible throught the use of the option --list which in itself produces a lot more noise than required and more difficult to parse.
I have put the following command together, and I recognize it is awful but I do not have much experience with awk and the shell in general, but it works:
psql -U root -h localhost --list | tail -n +4 | head -n -3 | awk '!/template[0-9]/' | awk '{print $1}' | head -n -1

the command outputs essentially the same as the current command that uses the SQL syntax, although it is a lot uglier.

I'm a fan of ugly one liners :) Let me spend some time on this and see if I can recreate.

After a bit of playing around, even changing the username and password to anything else failed in my case. The only thing that allowed it to work was to set the SPLIT_DB flag to FALSE therefore bypassing the step outlined above.
I do not believe this is a solution, but it is a workaround nonetheless.

Backup of all postgres database does not work when setting SPLIT_DB=TRUE. The line @tiredofit describes gives me the following output:
bash-5.0# export PGPASSWORD=$DB_PASS
bash-5.0# psql -h $DB_HOST -U $DB_USER -c 'COPY (SELECT datname FROM pg_database WHERE datistemplate = false) TO STDOUT;'
psql: error: FATAL:  database "admin" does not exist

Adding a database called admin solves the problem. But this should not be a requirement since it is not automatically added by the postgres image.
My docker-compose:
postgres:
    image: postgres:12.1-alpine
    hostname: postgres
    container_name: postgres
    restart: always
    environment:
       POSTGRES_USER: ${POSTGRESUSER}
       POSTGRES_PASSWORD: ${POSTGRESPW}
       POSTGRES_DB: ${POSTGRESDB}
    volumes:
      - postgres-data:/var/lib/postgresql/data

postgres-db-backup:
    image: tiredofit/db-backup:latest
    container_name: postgres-db-backup
    restart: always
    links:
      - postgres
    volumes:
      - postgres-backups:/backup
      - /etc/timezone:/etc/timezone:ro
    environment:
      - DEBUG_MODE=true
      - BACKUP_LOCATION=FILESYSTEM
      - DB_TYPE=pgsql
      - DB_HOST=postgres
      - DB_USER=${POSTGRESUSER}
      - DB_PASS=${POSTGRESPW}
      - DB_DUMP_FREQ=1440
      - DB_DUMP_BEGIN=0430
      - DB_CLEANUP_TIME=8640
      - MD5=TRUE
      - COMPRESSION=GZ
      - SPLIT_DB=TRUE

@pennal please try it now by defining the database name DB_NAME. The DB_NAME should be the database against the client should authenticate. I tested it myself and after the merged fix it works now :)

Anyone troubleshooting this issue- I was able to get it working for Postgres with these vars:
DB_TYPE=pgsql
DB_HOST=172.16.xxx.xxx (fill your db IP, mine happens to live in <IP_ADDRESS>)
DB_USER=backup_worker (or whichever user you've created that has at least CONNECT/USAGE/SELECT/COPY permissions for any databases you want to backup)
DB_PASS=****** (whatever yours is)
SPLIT_DB=FALSE (couldn't get it to work otherwise)
DBNAME=ALL

The Docker log still shows an error that database "backup_worker" doesn't exist, but the backup executes successfully.


The src/home.component shouldn’t have the DoneJS logo header

In this section of the guide, we instruct users to add the DoneJS header to the home.component template, but it’s already added in another section.
This diff shouldn’t have the h1:

The first time, we are adding it to index.stache. In the later section, we are moving it to the home.component. That's why it says:

First, let's update src/home.component with the original content from the homepage and a link to the chat messages page:

I think the highlighting is correct. Please re-open if you disagree.


kernel: increase event loop queue size & error if full

Problem
Nodes doing heavy work could sometimes freeze. We chased this down to be associated with the event loop queue getting filled & then deadlocking when processing a message that put >1 messages on the event loop.
https://discord.com/channels/1186394868336038080/1186684706700410962/1278437204749844611
Solution
For now, simply increase the queue size. This is a bandaid.
@dr-frmr recommended using an unbounded queue. The reasons I chose to instead increase the queue size & panic, outputting an error message if the queue is full are:

Queues don't fix overload; the long-term correct solution here is not to increase the queue, whether bounded or not: its to add backpressure
The backpressure solution likely looks more like the code in this branch, but with the panic!() replaced by, e.g., the backpressure mechanism (likely a new SendError variant)
Pushing queue size to 100k buys us time to figure out the "correct" solution, while making the highest load case we've seen so far (providerfren.os) still functional
This change is much smaller than the unbounded queue change, because that change implies changing types throughout to UnboundedSender. I wouldn't be opposed to this if I thought that was the "correct" solution, but since I now think the "correct" solution involves backpressure once the queue is full, we'd be changing types in order to change them back once we want to implement the "correct" solution

Testing
Run providerfren.os with develop vs this branch
Docs Update
None
Notes
None

Going to rebuild binary & run providerfren.os using it to eliminate that possibility. Hopefully we can witness another crash by tomorrow morning to confirm this doesn't work -- or not and gain confidence I just made a mistake wrt binary.

Yeah, still freezing. Darn.


chore: upgrade packages

Review Checklist

Summary*

[ ] fix: Bug fix for Add the items tackled here as checklists
[x] feat: Completed task
[ ] chore: Incomplete task

[ ] test: Sub-task 1

Structure*

[ ] The Pull Request has a proper title that conforms to our MR title standards
[ ] The Pull Request has one commit, and if there are more than one, they should be squashed
[ ] The commit should have a proper title and a short description
[ ] The commit must be signed off
[ ] Unused imports are not present
[ ] Dead code is not present
[ ] Ensure dry running library to confirm changes

Tests

[ ] Proper and high quality unit, integration and acceptance(if applicable) tests have been written
[ ] The coverage threshold should not be lowered

Sign off*

[ ] All comments have been resolved by the reviewers
[ ] Approved by Czar {replace_with_czar_name}
[ ] Signed off by second reviewer {replace_with_name}
[ ] Ensure all checks are done before merging :warning:
[ ] All PRs needs to be signed before merging :warning:

N/B:

Add a checklist if more than one item is done.
Add screenshots and/or images where necessary
Indicate any breakages caused in the UI :exclamation:
Where necessary, indicate which issue the Pull Request solves (Closes #)
Any new files are updated in the folder structure in the README

Codecov Report

Merging #7 (8c9a896) into main (5b64bd9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main       #7   +/-   ##
=======================================
  Coverage   81.05%   81.05%
=======================================
  Files           3        3
  Lines          95       95
=======================================
  Hits           77       77
  Misses         13       13
  Partials        5        5

Continue to review full report at Codecov.

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


[design] send & receive

Send and receive
generation of QR with logo: #258
scanner done in #306

always refer to figma for latest design reference

@clangenb I guess the text fields should also validate their content
e.g. you cannot send a negative amount, and not more than you've got, or is this verified later in the transfer process and does not have to be checked here?

should be checked here:
0 < send amount < balance - fee estimate


Add setup.py

Take environment variable CMAKE_ARGS as extra cmake flags
tested pip install pip wheel python setup.py build python setup.py install

It invokes cmake to do the actual build, so everything should work exactly the same as using plain cmake. build options will depend on the build machines, on my linux desktop it's
$ python -c 'from caffe2.python import build; from pprint import pprint; pprint(build.build_options)'
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode.
WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu
{u'BLAS': u'Eigen',
u'BUILD_TYPE': u'Release',
u'CXX_FLAGS': u' -Wno-deprecated -std=c++11 -O2 -fPIC -Wno-narrowing',
u'FORCE_FALLBACK_CUDA_MPI': u'',
u'GIT_VERSION': u'v0.8.1-688-g03808cd-dirty',
u'HAS_MKL_DNN': u'',
u'HAS_MKL_SGEMM_PACK': u'',
u'PERF_WITH_AVX': u'1',
u'PERF_WITH_AVX2': u'1',
u'UNIQUE_LONG_TYPEMETA': u'',
u'USE_ACCELERATE': u'',
u'USE_ATEN': u'OFF',
u'USE_CUDA': u'OFF',
u'USE_EIGEN_FOR_BLAS': u'1',
u'USE_GFLAGS': u'OFF',
u'USE_GLOG': u'OFF',
u'USE_GLOO': u'',
u'USE_LITE_PROTO': u'',
u'USE_MKL': u'',
u'USE_MPI': u'OFF',
u'USE_NCCL': u'OFF',
u'USE_NNPACK': u'ON',
u'USE_NVTX': u'',
u'USE_OPENMP': u'OFF'}

@pietern It takes an environment variable CMAKE_BUILD_DIR to point to a previous existing cmake build directory, if users has done build there before, invoking cmake (and make) again should do nothing. Note we shouldn't directly package stuffs from the cmake build directory, it should be from the cmake install directory. I can change it to if user has specified the cmake install directory (via CMAKE_INSTALL_DIR), then we skip the cmake invocation.
I dont' think we should make setup.py a packaging-only script, that will make us unable to do python package source distribution.

Good point re: source distribution.
You could consider running scripts/build_local.sh (you can pass additional CMake args that are passed through). Then we can only have one path for defaults and for example ccache configuration. Not required of course.

@pietern Yeah makes sense, I will change it to use the build scripts instead of directly invoking cmake.