TypeError: str returned non-string (type Error)

OS X 10.9
Python 2.7.9
$ pip freeze
cffi==0.9.2
cryptography==0.8.1
enum34==1.0.4
gitdb==0.6.4
GitPython==0.3.6
ndg-httpsclient==0.3.3
pyasn1==0.1.7
pycparser==2.10
pyOpenSSL==0.14
requests==2.6.0
requests-toolbelt==0.3.1
six==1.9.0
smmap==0.9.0

On request to website with TLS 1.0 https://codeforge.lbl.gov/frs/download.php/409/fastbit-ibis1.3.8.tar.gz I'm getting:
Traceback (most recent call last):
  File "./main.py", line 118, in <module>
    resp = downloader.run()
  File "/Users/mktums/Projects/brew404/downloaders.py", line 64, in run
    resp = self.fetch()
  File "/Users/mktums/Projects/brew404/downloaders.py", line 59, in fetch
    resp = s.send(req, verify=verify_ssl, allow_redirects=True, timeout=20)
  File "/Users/mktums/.virtualenvs/brew/lib/python2.7/site-packages/requests/sessions.py", line 576, in send
    r = adapter.send(request, **kwargs)
  File "/Users/mktums/.virtualenvs/brew/lib/python2.7/site-packages/requests/adapters.py", line 370, in send
    timeout=timeout
  File "/Users/mktums/.virtualenvs/brew/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 544, in urlopen
    body=body, headers=headers)
  File "/Users/mktums/.virtualenvs/brew/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 344, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=conn.timeout)
  File "/Users/mktums/.virtualenvs/brew/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py", line 314, in _raise_timeout
    if 'timed out' in str(err) or 'did not complete (read)' in str(err):  # Python 2.6
TypeError: __str__ returned non-string (type Error)

Thanks for reporting this! This is currently tracked under shazow/urllib3#556, so I'm going to close this issue to centralise discussion there.

@Lukasa Thanks for fast reply!

how to fix this bug? any ideas?

@gdonzy Please read the above issue, which links to a related tracking issue.

Thanks a lot. When I use "requests.get("xxxx", verify=False)", the bug is fixed.

Can I re open this?

No, this was fixed a long time ago. You should update instead.


GCP: Add SSH key to project metadata

Sources:

https://cloud.google.com/compute/docs/connect/add-ssh-keys#add_ssh_keys_to_project_metadata
https://about.gitlab.com/blog/2020/02/12/plundering-gcp-escalating-privileges-in-google-cloud-platform/

By default, allows access to all VMs in a project (unless the VMs disable project-wide SSH keys, which is not the default)

challenge: might be very noisy and not actionable enough for detection, as the gcloud compute ssh seems to do it

Note: OS login is generally used, so that could be a good detection

Might also be added at the VM level.

Update: the post above doesn't say it was used in the wild


How to avoid the auto convert variable dtype from float32 to float64 when read netCDF file use open_dataset?

when i read some netCDF4 file using xr.open_dataset, it seems this method would auto convert the variable type from float32 to float64, how to avoid it ?

Variables dtype of dbz, vr and sw in this file have been convert to float64, which actually is float32.
Use netCDF4.Dataset
import netCDF4 as ncf
ncf.Dataset('cat.20151003200633.nc')

will yield output as follow
   <type 'netCDF4._netCDF4.Dataset'>
    root group (NETCDF4 data model, file format HDF5):
    ..........
    dimensions(sizes): x(461), y(461), z(9)
    variables(dimensions): float32 x(x), float32 y(y), float32 z(z), float32 dbz(z,y,x), float32 vr(z,y,x), float32 sw(z,y,x)
    groups:

The netCDF4.Dataset produce the right variable type, while the xarray.open_dataset not.

Some of your variables probably have scale_factor or add_offset attributes. To avoid overflow, xarray converts such variables to float64 when scaling.
You can disable the scaling by writing xr.open_dataset('cat.20151003200633.nc', mask_and_scale=False)

Thanks for your reply.
Variables dbz, vr and sw have the _FillValue attribute, whose value is equal to _FillValue: -999.0
<type 'netCDF4._netCDF4.Variable'>
float32 dbz(z, y, x)
    _FillValue: -999.0
    units: dBZ
    long_name: reflectivity in log units
unlimited dimensions:
current shape = (9, 461, 461)
filling on

It seems that xarray will convert the dtype from float32 to float64, while the variable in netCDF4 file has the attribute _FillValue, xr.open_dataset auto identify the _FillValue in the variable and mask it with np.nan , however the variable is also changed into float64. I think this result with default argument is  not reasonable enough, as this type conversion is not necessary in fact.
Using mask_and_scale=False will maintain the variable in float32 and retain the _FillValue attribute of variable. However, what i want is mask but maintain the dtype in float32. Is it has possible bug in the internal of the open_dataset method ?

OK, that makes sense. I agree, we could keep such arrays as float32. We don't need to guard against overflow when only decoding a _FillValue.
If you're interested in taking a look at a fix, this is where the current logic is: https://github.com/pydata/xarray/blob/551a7bca7b42a6d6db976b01d2eee1131735785d/xarray/conventions.py#L795-L802

OK & Thanks

I stumbled across the same issue in xarray 0.9.1 and updating to 0.10.2 solved it. Perhaps this issue may be closed?

Yes, this was fixed by @Zac-HD in https://github.com/pydata/xarray/pull/1840


remove liquidity default value missing

when you refresh the "remove liquidity" screen:

selection is default at 50%, but there is not value in the "remove liquidity amount" that represent that 50%
after few sec, the page refresh to update this.

instead of refreshing the page, do not auto select 50%, and let the user select it.
https://streamable.com/gfexgv

okay I have fixed that. Please review.


Application crashes on startup

This is clearly a SQL issue - reproduced via this GraphQL query
query {
  chart(id:ESTIMATED_BUDGET)
}

The query is encountering a value for estimated budget that it can't handle - despite that the input for estimated budget is sanitized

The estimated spend is calculated by averaging the estimated budget range when an absolute value is not specified. This involves a lot of string splitting. I had to update the function to take into account the < and > chars (it didn't previously).
OLD FUNCTION DECLARATION
if not exists (
  select *
  from sys.objects
  where
    object_id = OBJECT_ID(N'[dbo].[ESTIMATE_SPEND]')
    and type = 'FN'
)
begin
DECLARE @sql NVARCHAR(MAX);
SET @sql = N'create function [dbo].[ESTIMATE_SPEND] ( @estimatedBudget nvarchar(500) ) returns bigint as begin declare @result bigint ;with cte as ( select cast( replace(replace(replace(trim(value), ''R'', ''''), ''m'', ''000000''), ''k'', ''000'') as bigint ) val from string_split(@estimatedBudget, ''-'') ) select @result = avg(val) from cte return @result end';
EXEC sp_executesql @sql;
end

NEW FUNCTION DECLARATION
if not exists (
  select *
  from sys.objects
  where
    object_id = OBJECT_ID(N'[dbo].[ESTIMATE_SPEND]')
    and type = 'FN'
)
begin
DECLARE @sql NVARCHAR(MAX);
SET @sql = N'create function [dbo].[ESTIMATE_SPEND] ( @estimatedBudget nvarchar(500) ) returns bigint as begin declare @result bigint ;with bounds as ( select * from string_split(@estimatedBudget, ''-'') ) ,cte as ( select cast( replace( replace( replace( trim( replace( replace( value, ''<'', '''' ), ''>'', '''')), ''R'', ''''), ''m'', ''000000'' ), ''k'', ''000'' ) as bigint ) val from bounds ) select @result = avg(val) from cte return @result end';
EXEC sp_executesql @sql;
end


Typo "Azure Board tools"→"Azure Boards tools"

https://docs.microsoft.com/en-us/azure/devops/boards/boards/add-columns?view=azure-devops
#PingMSFTDocs

@hyoshioka0128 : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Set up travis

I can sure make a .travis-ci.yml blindfolded, but I think circleci is vastly superior.
Perhaps we should try both and see what works best ?
We'll also need codecov integration, both for python and js (unless you intended to ship HTML forms without JS like in the 90s).
It should also run QA checks (flake8 ?), and a "strict" docs build (fail if sphinx raises a warning).
Feel free to assign this issue to me if you want me to make such a setup for you (perhaps consider validating or closing #25 first !)

I have used both, at the time Travis was the standard for open source projects, but I don't really mind either way.


downloaded latest frame data from rbnorway

Closing.
This has deleted the basic data for all the pages which have them on a separate page.
Need to resolve before creating a PR


Url params in API

Has no one needed to use url params yet? I might be missing something but they are not working for me
In routes/index.js
export podcasts from './podcasts';

hit /podcasts - action is found and route is matched
hit podcasts/123 - action is undefined and 404
I'm happy to hack away (on the regex i assume) but if anyone has already existing code, would be a good addition for this boilerplate.

I have not yet made it as far as loading a specific db record, no. But it looks like you just need a
<Route path="podcasts/:id" component={Podcast}/>

route. That should be passed in as this.props.id to your component. Does that help?

Not for me! I had to:
	static contextTypes = {
		router: PropTypes.object.isRequired
	}
	const podId = this.context.router.state.params.id;

Seems like a similar issue that's being coverer with redux-react-router

React Router is a fantastic routing library, but one downside is that it abstracts away a very crucial piece of application state — the current route!

Anyway the question was more about the api side of things:
export podcasts from './podcasts';

then console.log()
req.url = /'podcasts'
matcher = [ '/podcasts', 'podcasts', index: 0, input: '/podcasts' ]
action =  [Function]

req.url =  '/podcasts/55918227969897d82134a1ff'
matcher = ['podcasts/55918227969897d82134a1ff',  index: 0, input: '/podcasts/55918227969897d82134a1ff' ]
action = undefined

so params break the podcast route. I'll mess around today with it and if i come up with something clean i can do a pr.

Thanks for figuring that out and posting the solution. :+1:


Identify World Time API

Step 2: World Time API
Figure out which API we will use for world time

https://www.abstractapi.com/api/time-date-timezone-api#docs

http://worldtimeapi.org/
This one looks more simple

This is one I found that looks straight forward: timezonedb.com

sarah got this working!


Added support for decorating apps built using Flask-RESTful Resources

Fixes issue: https://github.com/di/flask-accept/issues/5

Thanks! Looks good to me, there is a small issue with the README.rst, if you pip install readme_renderer and then setup.py check -r s it will show you the problem:
$ python setup.py check -r -s
running check
warning: Check: :181: (WARNING/2) Title underline too short.
warning: Check:
warning: Check: Works with Flask-RESTful Resources
warning: Check: ^^^^^^^^^^^^^^^^^^^
warning: Check: Invalid markup which will not be rendered on PyPI.
error: Please correct your package.

(sorry there isn't CI to catch this!)

Great! I've fixed the issue with the readme_renderer check failing. Should be good now!

Thanks!

This has been released on PyPI: https://pypi.org/project/flask_accept/


[SPARK-18694][SS] Add StreamingQuery.explain and exception to Python and fix StreamingQueryException (branch 2.1)

What changes were proposed in this pull request?
Backport #16125 to branch 2.1.
How was this patch tested?
Jenkins

Test build #69682 has started for PR 16153 at commit 57a8328.

Test build #69682 has finished for PR 16153 at commit 57a8328.

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

Merged build finished. Test PASSed.

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

Merging to 2.1.


Component not work when open remote debugger in React Native v 0.62.2

I have meet the problem on RN v 0.62.2 all the component not working when running remote debugger ( I use Android 10).
Description
First step, I run RN project (without remote debugger running), the apps run well, all component can be access.  When I run into remote debugger mode, my apps run well, but all the component cannot be access, example (text input, button or react navigation not working)
React Native version:
RN Version 0.62.2
Step to Fix it
Make sure to set your real device or emulator time exactly the same as your PC or Laptop time until the Seconds Part should be exactly the same

Yea this has really affected my android development.. seems the case since i've been on 0.62.2.  Can't debug anything if I cant do anything on my app lol

@bneigher you can follow my way to solve that

I checked, and the clocks are exactly in sync though..

@bneigher please check hour, minute, and seconds, should be the same until the seconds part

@hariantara right, what you're referring to is called the clock, its the internal timekeeping mechanism for machines (android phone, laptop, ect.). I've checked if the clock is in sync (common issue for weird errors) and it is not the case, and this doesn't fix my issue.  Perhaps when you looked into your issue something else changed to get it to work? occasionally it works for me too, but it's inconsistent and unreliable, and mostly is not working.
has anyone else experienced this?

@bneigher look on your phone time setting, disable all auto timezone or network time, and setup your phone time manually and follow base on your laptop or pc time until seconds part of your laptop or pc.

It doesn't fix the issue for me also :'(


sporcle.com is blocked

I have the file which contains "Unified hosts + fakenews + gambling + porn + social" Don't think sporcle falls under any of that

Hi @Ha3iSeldon.  The specific domain, sporcle.com, is not blocked by the hosts files in this repo.
We block sporcle-tagan.adlightning.com but that's not the domain you mention.
Closing.


Why not just use {% include ... %} ?

Can you comment on why this is better than using  {% include ... %}?
https://jinja.palletsprojects.com/en/3.0.x/templates/#include

Hi @davetapley. Good question. I created this because I didn't see how to accomplish that with this:
# Data provided to outer template:
user: User
videos: List[Video]

# Data needed by partial/include/subtemplete
email: str
video: Video (active one from a loop in the outer template potentially

With the statement:
{% include "sidebar.html" ignore missing with context %}

Where do I pass and transform the data? With jinja-paritals, it's:
{% for v in videos %}

        {{ render_partial('shared/partials/video_square.html', video=v, email=user.email) }}

{% endfor %}

Is there a clean way to do this?
Also, macros definitely will not work for this situation, but include is closer.

It's fairly clear to me why you would not want to use an include in this situation, but why not a macro?
{% macro video_image(video) %}

{%- endmacro %}

Your main template can call the macro:
{% from 'shared/macros/video_image.html' import video_image %}

{% for v in videos %}

        {{ video_image('video.html', video=v) }}

{% endfor %}

I left out the email str part, but I don't think it makes a difference here, does it?

Ah, I did not understand that you also wanted to use the macro outside of a template file. It would be possible to use macros from within the view function by loading the macro through the module attribute of a loaded template that contains the macro. In order for this to work with more complex templates like video_square (which uses an import, and therefore needs a loader), we need to do it through a proper jinja2 environment though.
This works with the macro template from above:
@blueprint.get('/macro_only')
def macro_only():
    videos = video_service.all_videos()

    environment = jinja2.Environment(loader=jinja2.FileSystemLoader('templates'))
    template = environment.get_template('shared/macros/video_square.html')

    return flask.make_response(template.module.video_square(videos[0]))

It is admittedly a little more convoluted than the jinja-partials solution, although you could set up the environment outside of the request context. It might come down to a question of taste though.
I'd have to do more testing to confirm equivalent behavior as far as file-caching is concerned.

Hi Max, thanks for your thoughts. I figured the macros, once set in motion, would keep going recursively but wasn't sure.
As for already working on a project with lots of macros, that would totally make sense to just keep going like that. I don't think I would rewrite things either. But on a new project that also has to directly render the template, like when doing HTMX, I think this is a bit cleaner.

I closed this issue but I did also update the readme.md to link here for this discussion.

Hi @nickleman
That will work I think. But it's just more clumsy. Not too bad for one variable, the example we've been discussing needs two:
{% for v in videos %}

      {% set email = user.email %}
      {% set video = v %}
      {% include "video.html" ignore missing with context %}

{% endfor %}

What if there is more?
{% for v in videos %}

      {% set email = user.email %}
      {% set video = v %}
      {% set cat_name = category.category %}
      {% include "video.html" ignore missing with context %}

{% endfor %}

Does that still feel better than:
{% for v in videos %}

    {{ render_partial("video.html", video=v, email=user.email, cat_name=category.category) }}

{% endfor %}

To me, definitely not. But if you don't like how that looks, then go for the set multiple variables + include. It's a choice for sure, not a requirement to use this library.

Since Jinja 2.1 (actual version is 3.0) context is automatically added in included templates. Therefore, you should be able to do just this :
{% for video in videos %}

      {% include "video.html" ignore missing %}

{% endfor %}

See https://jinja.palletsprojects.com/en/3.0.x/templates/#import-visibility

Hi @Mindiell thanks for the feedback. But "keeping the same context" is exactly what I'm trying to avoid with this library. That's not what we want. What we want is the equivalent of calling a function with variables that are local with certain names and fields and passing them to a function with it's own param names.
Example:
user = ...
time = now()
record_action(user.id, time)

With this function
def record_action(entity_id, timestamp)

What you're suggesting would require every caller of the function to write code like this:
user = ...
time = now()

entity_id = user.id
timestamp = time

record_action()

Does that look like an improvement? No way. See the discussion just a couple of entries in this thread above for this in the context of jinja templates. Especially this entry.

Hi @Mindiell thanks for the feedback. But "keeping the same context" is exactly what I'm trying to avoid with this library. That's not what we want. What we want is the equivalent of calling a function with variables that are local with certain names and fields and passing them to a function with it's own param names.
Example:
user = ...
time = now()
record_action(user.id, time)

With this function
def record_action(entity_id, timestamp)

What you're suggesting would require every caller of the function to write code like this:
user = ...
time = now()

entity_id = user.id
timestamp = time

record_action()

Does that look like an improvement? No way. See the discussion just a couple of entries in this thread above for this in the context of jinja templates. Especially this entry.

With jinja, I believe you can:
{% for v in videos %}

    {% with video=v email=user.email %}
      {% include "video.html"%}
    {% endwith %}

{% endfor %}

I think you can too. But to me, it's less clear that the variables are part of video.html, not to be used locally. I find the render_partial call to communicate intent more and use one fewer lines of code. But thanks for the example.

For what it's worth, the custom function tends to be about ~5-10% more performant compared to jinja include in my testing (with had no effect on speed), although this may change with Python 3.11
Here's the minimum implementation so people don't have to hunt for the magical lines:
def render_partial(name: str, **context) -> str:
	return templates.get_template(name).render(**context)

templates = Jinja2TemplatesExtended('app/templates')
templates.env.globals['render_partial'] = render_partial

Usage example in your templates:
{{ render_partial("date_selector.html", label='Date of Birth') }}

Nice information and details, thanks a bunch @gnat

@mikeckennedy this package is great. thanks! ✨

Glad you like it Mike!
On Thu, Jun 23, 2022 at 9:08 AM Mike Rossetti @.***>
wrote:

@mikeckennedy https://github.com/mikeckennedy this package is great.
thanks! ✨
—
Reply to this email directly, view it on GitHub
https://github.com/mikeckennedy/jinja_partials/issues/1#issuecomment-1164604788,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPQ62KRVFTOAMSJFFXG3TDVQSDYXANCNFSM5FA6JQFQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Best,
Michael

I just found https://flask.palletsprojects.com/en/2.2.x/api/#flask.get_template_attribute
The name is a bit obscure, and it returns the macro as a python function, but it should do the same, with the added benefit of being able to leave the "partial" in the file it is used, and if you render it separately, then you use get_template_attribute.
Or am I totally missing something here?

Hey @mkrd, what's missing is the fact that you want to render the content that is the macro as an individual page:
If you have:
main page content
  -- macro1
  -- macro2

And need to be able to return both "main page content" and "macro1" content directly as an HTML response, you need to create a third "macro holder page" which is silly. That's why macros are the answer here.

Hey @mkrd, what's missing is the fact that you want to render the content that is the macro as an individual page:
If you have:
main page content
  -- macro1
  -- macro2

And need to be able to return both "main page content" and "macro1" content directly as an HTML response, you need to create a third "macro holder page" which is silly. That's why macros are the answer here.

Look at @mkrd 's code again. You can totally do this with get_template_attribute. I use it for this exact reason and it allows the macro to be a macro, as well rendered as an independent response. It also receives the variables just like your partials do. It's functionally the same as @gnat 's custom render function, except it maintains classis macro functionality in addition to the partial behavior. It's appears to be the most flexible and complete solution.

def render_partial(name: str, **context) -> str:
	return templates.get_template(name).render(**context)

# Wherever you instantiate Jinja...
templates = Jinja2Templates('app/templates')
templates.env.globals['render_partial'] = render_partial

Did >= 3.11 make either approach more performant?

For what it's worth, the custom function tends to be about ~5-10% more performant compared to jinja include in my testing (with had no effect on speed), although this may change with Python 3.11
Here's the minimum implementation (Starlette / FastAPI) so people don't have to hunt for the magical lines:
def render_partial(name: str, **context) -> str:
	return templates.get_template(name).render(**context)

# Wherever you instantiate Jinja...
templates = Jinja2Templates('app/templates')
templates.env.globals['render_partial'] = render_partial

Usage example in your templates:
{{ render_partial("date_selector.html", label='Date of Birth') }}

Did >= 3.11 make either approach more performant?

Hey! I revisited the render_macro function, and here is the complete working version:
`from flask import current_app
from jinja2 import Template
from jinja2.nodes import Macro
def render_macro(template_name: str, macro_name: str, **kwargs) -> str:
env = current_app.jinja_env
template_source, _, _ = env.loader.get_source(env, template_name)
parsed_template = env.parse(template_source)
macros = [n for n in parsed_template.find_all(Macro) if n.name == macro_name]

if len(macros) != 1:
	msg = f"Macro {macro_name} not found in template {template_name}"
	raise ValueError(msg)

try:
	macro = macros[0]
	macro_source = macro.body[0].nodes[0].data
except Exception as e:  # noqa: BLE001
	msg = f"Macro {macro_name} not found in template {template_name}"
	raise ValueError(msg) from e

macro_args = ",".join(a.name for a in macro.args if a.ctx == "param")
macro_template = Template(
	f"{{% macro {macro_name}({macro_args}) %}}{macro_source}{{% endmacro %}}",
	autoescape=env.autoescape,
)

return getattr(macro_template.module, macro_name)(**kwargs)

`
A bit more involved than a one liner, but it works and properly isolates the macro from the rest of the template.
With a bit more effort, one could generalize it so that it is not flask specific.

Hi,
Does render_partial work with Pyramid/Jinja?  I'm assuming it would but wanted to know before I tried it.
Also, most of my previous programming is with Blazor and I'm new to the Python world. The render_partial looks like it could be synonymous with Blazor components.  In Blazor everything is a component and you can pass data to and from them.  You can also pass from child components back to parent components and pass events and views between child components.
Is that possible with render_partial?
Thanks
Dave

Hi @TrailBlazor Blazor is a really cool technology. The origins for me actually come from Razor and C#. They had a really great way to do that in ASP.NET so I took some inspiration from there.
They can be composed in the sense that partials can themselves call render_partial, you just have to pass the needed data.

Thanks for the response @mikeckennedy .  I might try using them in our Pyramid environment.

Sounds good @TrailBlazor I'm using them in Pyramid (the chameleon version) on Talk Python & TP Training.


added word-wrap less rule to .test-output

Pre-Submission Checklist

[ ] Your pull request targets the staging branch of FreeCodeCamp.
By #11687 this should target backup/master
[X] Branch starts with either fix/, feature/, or translate/ (e.g. fix/signin-issue)
[X] You have only one commit (if not, squash them into one commit).
[X] All new and existing tests pass the command npm test. Use git commit --amend to amend any fixes.

Type of Change

[X] Small bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds new functionality)
[ ] Breaking change (fix or feature that would change existing functionality)
[ ] Add new translation (feature adding new translations)

Checklist:

[X] Tested changes locally.
[X] Closes currently open issue (replace XXXX with an issue no): Closes #11687

Description

Added a rule to the .test-output class: word-wrap: break-word.
Closes #11687

@chiptus, unfortunately the PR #11705 has already been created before this one. Sorry about this, but we have to accept the first one that comes in! In future, make sure to check that no one has submitted a fix to an issue before fixing it yourself. Thanks for contributing however, and I hope you can find another issue tagged help wanted 😄

@atjonathan Both pull requests were by @chiptus. As stated (somewhat hidden) in the pre-submission checklist, the issue requested this fix to be submitted against both staging and backup/master. The PR against staging is #11705, this is the PR against backup/master. 😅

LGTM. thanks @chiptus
/cc @BerkeleyTrue please release when you have a moment.

Thanks @chiptus.
@BerkeleyTrue, reminder to release backup/master 😜


Class Probabilities not adding up to 1

I have spent quite a lot of time debugging a silly mistake where the class probabilities did not add up to 1 and therefore the decoder outputs were completely wrong. Would it make sense to add a simple error message saying "Class probabilities do not add up to 1.0" or similar?

Just investigated this a bit further and it seems that the actual problem were large negative values coming from log_softmax which also resulted in values nan in returned scores

@rokasgie hi did you solve this problem? I'm trying to get the confidence score which sum up to be 1.0.
If you solve this, maybe you can share your experience?


GKE ingress not creating upstream

Is this a request for help?:
Yes
What keywords did you search in Kong Ingress controller issues before filing this one? (If you have found any duplicates, you should instead reply there.):
ingress, upstream
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG

Kong Ingress controller version:
0.0.4
Kubernetes version (use kubectl version):
1.9.7
Environment:

Cloud provider or hardware configuration: Googe Cloud
OS (e.g. from /etc/os-release): unknown
Kernel (e.g. uname -a): unknown
Install tools: kubectl
Others:

What happened:
I deployed the Kong ingress controller according to the YAML provided in the manifest. Further i'm using Konga as a GUI for Kong to see created upstreams ,services, etc. I use an auth-nginx deployment but i think any simple nginx sample application will provide enough to replicate the issue.
The ingress i created:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: auth-ingress
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
   - http:
      paths:
      - path: /auth
        backend:
          serviceName: auth-nginx
          servicePort: 80

The 'auth-nginx' service is a NodePort type service and running. When i create the above ingress with
kubect create -f ingress.yaml
i see that the ingress is created in Google Cloud Kubernetes -> Services. By specifying the nginx ingress class, Kong should be notified and create an upstream. Is there anything that i'm missing why Kong Ingress doens't notice the creation of the ingress?
What you expected to happen:
Upstream created in Kong. And the upstream will be reachable with http://IP_OF_LB/auth
How to reproduce it (as minimally and precisely as possible):
Deploy above script in Google Cloud
Anything else we need to know:
Not that i can think of right now

Just noticed that the host: domain option is required for the kong ingress to work. So this issue is solved by using the host: domain in the ingress script. Maybe this can be an addition to the docs?

@EntonoX PRs welcome! Thank you for posting an update here.


Fsharp/master

Added support for xamarinmac FSharp.Core profiles

Should this add the new FSharp.Core dlls for these platforms to the nuget package specifications too?

Only the Mac mobile one would actually work due to nuget not supporting profiles with multiple aspects.  We could add it in the future if it was needed but I suspect the F# templates will suffice for applications, and for libraries you would probably target pcl 78/259

So am I correct in thinking that these FSharp.Core binaries will ship as part of the Xamarin support for F# itself?

Dave, will this resolve this issue: https://github.com/fsharp/fsharp/issues/367?  Thanks

@dsyme No idea, I thought that issue was to do with iOS.
To be honest I don't follow what the issue is, I though http://blog.xamarin.com/how-to-update-nuget-packages-for-64-bit/ would resolve it.


New version: yetone.OpenAITranslator version 0.3.41

Pull request has been created with komac v2.2.1 :rocket:
Resolves: https://github.com/microsoft/winget-pkgs/issues/149600
Microsoft Reviewers: Open in CodeFlow

@stephengillie can we merge this please?


Requesting Solaar

Describe the package
Solaar is Linux manager for many Logitech devices that connect wirelessly to a USB/Bluetooth,/Unifying Receiver/etc. It is also available on the Fedora repos. As someone who uses and ergonomic mouse, this would be really useful for me. They don't have a flatpak at this point and it seems like it isn't going to be done soon.
Image
All Images

Thank you for adding Solaar, makes a big difference for people like me :-)

I have like 5 of these dongles and had forgotten about this tool entirely so I'm glad we got this sorted!


AVA serial script to run test in serial on node 4 - Travis

Close #344
What is the different between this custom script and AVA --serial flag ?
-> This script run each test files in serial while --serial flag run each tests in each file in serial.

Benchmark
Must be worse on Travis
$ time babel-node scripts/ava-serial.js
real	0m38.004s
user	0m59.360s
sys	0m3.308s

$ time ava
real	0m20.810s
user	1m5.216s
sys	0m4.100s

Changes Unknown when pulling 36532139b6a742ad5be789cb5ba9e9818355de85 on node-4 into ** on next**.

Changes Unknown when pulling ef308c97b503b7edacaac7092c29b6f1270bf906 on node-4 into ** on next**.

Changes Unknown when pulling f24e0d9d716e5cb63660aafa6c4a2225db4a2b43 on node-4 into ** on next**.

Changes Unknown when pulling 89d809ab4aa73acb2ae574d3c2a6525345616da0 on node-4 into ** on next**.

Changes Unknown when pulling 89d809ab4aa73acb2ae574d3c2a6525345616da0 on node-4 into ** on next**.

Changes Unknown when pulling 3eaf91f6d58fb76eab8236eebbd5b69625182076 on node-4 into ** on next**.

Changes Unknown when pulling ce677a7fd94192855ec79d91c94ba31b27aab4f4 on node-4 into ** on next**.

@MoOx could you disable coveralls comment plz ? So annoying

Changes Unknown when pulling 7a9de9c008561c31144a5c5db3d9e4574a9d5881 on node-4 into ** on next**.

Changes Unknown when pulling 17ba38649891ef79ecd9627e9dd148c04173c97f on node-4 into ** on next**.


Build failure: xzoom

Steps To Reproduce
Steps to reproduce the behavior:

nix build nixpkgs/634fd46801442d760e09493a794c4f15db2d0cbb#xzoom (note: identical result with nix build -option sandbox true.)

Build log

Build Log
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/5pl0jnl2vmkdpmxqgf14ca0fk5zhnws7-xzoom-0.3.tgz
source root is xzoom-0.3
setting SOURCE_DATE_EPOCH to timestamp 833442891 of file xzoom-0.3/README
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
applying patch /nix/store/bgg8grcsm5y6cmkiggy5mcgrkbn63np4-xzoom_0.3-24.diff.gz
patching file Imakefile
patching file debian/changelog
patching file debian/compat
patching file debian/control
patching file debian/copyright
patching file debian/install
patching file debian/menu
patching file debian/rules
patching file debian/watch
patching file debian/xzoom.desktop
patching file scale.h
patching file xzoom.c
patching file xzoom.man
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring with imake: ''
imake -DUseInstalled -I/nix/store/8b7krzkp8f7d58vw7sc82xids0k77g8j-imake-1.0.10/lib/X11/config
make Makefiles
make: Nothing to be done for 'Makefiles'.
make includes
make: Nothing to be done for 'includes'.
make depend
gccmakedep  --   -I/nix/store/qqhl2a7166iik31sr9jklf3m9gfyjlrq-xorg-cf-files-1.0.8/include    -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L 				-D_POSIX_SOURCE -D_XOPEN_SOURCE 				-D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 				  				  -DFUNCPROTO=15 -DNARROWPROTO   -DFRAME -DXSHM   -- xzoom.c
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
build flags: SHELL=/nix/store/5mh7kaj2fyv8mk4sfq1brwxgc02884wi-bash-5.2p37/bin/bash PREFIX=\$\(out\) BINDIR=\$\(out\)/bin MANPATH=\$\(out\)/share/man
gcc -O2 -fno-strength-reduce -fno-strict-aliasing      -I/nix/store/qqhl2a7166iik31sr9jklf3m9gfyjlrq-xorg-cf-files-1.0.8/include    -Dlinux -D__amd64__ -D_POSIX_C_SOURCE=199309L 				-D_POSIX_SOURCE -D_XOPEN_SOURCE 				-D_BSD_SOURCE -D_SVID_SOURCE                                 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 				  				  -DFUNCPROTO=15 -DNARROWPROTO   -DFRAME -DXSHM    -c -o xzoom.o xzoom.c
In file included from /nix/store/kj8hbqx4ds9qm9mq7hyikxyfwwg13kzj-glibc-2.40-36-dev/include/bits/libc-header-start.h:33,
                 from /nix/store/kj8hbqx4ds9qm9mq7hyikxyfwwg13kzj-glibc-2.40-36-dev/include/stdio.h:28,
                 from xzoom.c:33:
/nix/store/kj8hbqx4ds9qm9mq7hyikxyfwwg13kzj-glibc-2.40-36-dev/include/features.h:197:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
  197 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
      |   ^~~~~~~
xzoom.c: In function 'main':
xzoom.c:620:33: warning: 'XKeycodeToKeysym' is deprecated [-Wdeprecated-declarations]
  620 |                                 switch(XKeycodeToKeysym(dpy, event.xkey.keycode, 0)) {
      |                                 ^~~~~~
In file included from xzoom.c:39:
/nix/store/2p1gkzwz2lq6vv67579vh4bllw1psqk8-libX11-1.8.10-dev/include/X11/Xlib.h:1683:15: note: declared here
 1683 | extern KeySym XKeycodeToKeysym(
      |               ^~~~~~~~~~~~~~~~
xzoom.c:629:33: warning: 'XKeycodeToKeysym' is deprecated [-Wdeprecated-declarations]
  629 |                                 switch(XKeycodeToKeysym(dpy, event.xkey.keycode, 0)) {
      |                                 ^~~~~~
/nix/store/2p1gkzwz2lq6vv67579vh4bllw1psqk8-libX11-1.8.10-dev/include/X11/Xlib.h:1683:15: note: declared here
 1683 | extern KeySym XKeycodeToKeysym(
      |               ^~~~~~~~~~~~~~~~
xzoom.c:756:41: error: implicit declaration of function 'alarm' [-Wimplicit-function-declaration]
  756 |                                         alarm(2);
      |                                         ^~~~~
xzoom.c:888:25: error: implicit declaration of function 'usleep' [-Wimplicit-function-declaration]
  888 |                         usleep(delay);
      |                         ^~~~~~
make: *** [<builtin>: xzoom.o] Error 1

Additional context

Metadata

system: "x86_64-linux"
host os: Linux 6.8.0-50-generic, Ubuntu, 24.04.1 LTS (Noble Numbat), nobuild
multi-user?: yes
sandbox: no
version: nix-env (Nix) 2.24.11
nixpkgs: /nix/store/8fwsiv0hd7nw1brkvka0jf1frk3m7qkr-source

Notify maintainers

@7c6f434c
Note for maintainers: Please tag this issue in your PR.

Add a :+1: reaction to issues you find important.

looks like it is just missing `#include <unistd.h>
add unistd
diff --git a/pkgs/by-name/xz/xzoom/package.nix b/pkgs/by-name/xz/xzoom/package.nix
index 6f456b8d8129..5cd13fc5a712 100644
--- a/pkgs/by-name/xz/xzoom/package.nix
+++ b/pkgs/by-name/xz/xzoom/package.nix
@@ -26,6 +26,10 @@ stdenv.mkDerivation rec {
     })
   ];

+  postPatch = ''
+    sed -i 1i'#include <unistd.h>' xzoom.c
+  '';
+
   nativeBuildInputs = [
     imake
     gccmakedep


When a project is closed and the user wants to delete the project namespace...

... then executing )Erase #.<namespace-name> appears to not work in case the user is currently inside that namespace.
That is very easy to forget, and causes potentially a lot of confusion.
Question is: can there something be done about this?!

Issue a warning. That's all that can be done.

We now do suggest )CLEAR, and that will always work.


bench: use high-level gc api

This changes the replay code to use the high-level gc api. I'm opening as a draft because, while it works, a change needed to ensure gc finalization (adding Lwt.pause) breaks the progress printing of the replay.
This builds on #1984, which is not yet merged, so only the most recent commit contains the actual changes.

Will be superseded by future PR that does not use Lwt.pause :smiley:


Asg private ami with notifications

this won't merge, but wanted to show the diffs with recent gwlb and asg changes

Is it deregistration_delay we are asking it to be 0? If yes, no need to but
we want it to be 0 far faster switchover.
We don't handle the draining of existing flows explicitly. It may be an
application that needs to start using new session to get over aws glwb
limitation. Maybe things may change in the future and if we want to bring
it back hardcoding will require respin of cft/tf
Thanks
Venkatesh
On Tue, Feb 28, 2023 at 1:43 PM Ani Chari @.***> wrote:

@.**** commented on this pull request.
In modules/terraform-zscc-gwlb-aws/main.tf
https://github.com/zscaler/terraform-aws-cloud-connector-modules/pull/19#discussion_r1120818942
:

@@ -2,11 +2,12 @@

Configure target group
################################################################################
resource "aws_lb_target_group" "gwlb_target_group" {

name        = "${var.name_prefix}-cc-target-${var.resource_tag}"
port        = 6081
protocol    = "GENEVE"
vpc_id      = var.vpc_id
target_type = var.asg_enabled == true ? "instance" : "ip"

name                 = var.target_group_name
port                 = 6081
protocol             = "GENEVE"
vpc_id               = var.vpc_id
target_type          = var.asg_enabled == true ? "instance" : "ip"
deregistration_delay = var.deregistration_delay

@jmolnar-zscaler https://github.com/jmolnar-zscaler Should this be a
variable or hardcoded to 0?
—
Reply to this email directly, view it on GitHub
https://github.com/zscaler/terraform-aws-cloud-connector-modules/pull/19#discussion_r1120818942,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A35RPJSYKABT3LV4RP77EUDWZZWOZANCNFSM6AAAAAAUPPRRMI
.
You are receiving this because your review was requested.Message ID:
<zscaler/terraform-aws-cloud-connector-modules/pull/19/review/1318707283@
github.com>

The deregistration delay is really pointless to have anything more than 0 imo since AWS already confirmed it still takes at least 90 seconds to deregister even when set to 0


Nested exceptions when the Docker socket is unreachable

Issue Type

Bug report

Molecule and Ansible details
$ ansible --version
ansible [core 2.13.7]
  config file = /var/lib/jenkins/workspace/grade_ansible-sles-upgrade_MR-76/ansible.cfg
  configured module search path = ['/var/lib/jenkins/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/ansible
  ansible collection location = /var/lib/jenkins/.ansible/collections:/usr/share/ansible/collections
  executable location = /var/lib/jenkins/.python3.10/bin/ansible
  python version = 3.10.8 (main, Oct 28 2022, 17:28:32) [GCC]
  jinja version = 3.1.2
  libyaml = True
$ molecule --version
molecule 4.0.4 using python 3.10
    ansible:2.13.7
    delegated:4.0.4 from molecule
    docker:2.1.0 from molecule_docker requiring collections: community.docker>=3.0.2 ansible.posix>=1.4.0

Molecule installation method (one of):

pip

Ansible installation method (one of):

pip

Detail any linters or test runners used:
Desired Behavior
Please catch these (the primary as well as the nested) exceptions and print a meaningful error message with the path of the missing socket.
Actual Behaviour
molecule converge is failing probably because the docker socket is missing. The failing due to the missing socket isn't unexpected, but that's triggers a exception and additionally 3 nested exceptions - that's an unexpected behaviour.
#  molecule converge
WARNING  The scenario config file ('/var/lib/jenkins/workspace/grade_ansible-myproj_MR-76/molecule/default/molecule.yml') has been modified since the scenario was created. If recent changes are important, reset the scenario with 'molecule destroy' to clean up created items or 'molecule reset' to clear current configuration.
INFO     default scenario test matrix: dependency, create, prepare, converge
INFO     Performing prerun with role_name_check=0...
INFO     Running ansible-galaxy collection install -v -r requirements.yml -p /var/lib/jenkins/.cache/ansible-compat/549545/collections
INFO     Set ANSIBLE_LIBRARY=/var/lib/jenkins/.cache/ansible-compat/549545/modules:/var/lib/jenkins/.ansible/plugins/modules:/usr/share/ansible/plugins/modules
INFO     Set ANSIBLE_COLLECTIONS_PATH=/var/lib/jenkins/.cache/ansible-compat/549545/collections:/var/lib/jenkins/.ansible/collections:/usr/share/ansible/collections
INFO     Set ANSIBLE_ROLES_PATH=/var/lib/jenkins/.cache/ansible-compat/549545/roles:roles:/var/lib/jenkins/workspace/grade_ansible-myproj_MR-76/roles
INFO     Running default > dependency
INFO     Running from /var/lib/jenkins/workspace/grade_ansible-myproj_MR-76 : ansible-galaxy collection install -vvv community.docker:>=3.0.2
INFO     Running from /var/lib/jenkins/workspace/grade_ansible-myproj_MR-76 : ansible-galaxy collection install -vvv ansible.posix:>=1.4.0
WARNING  Skipping, missing the requirements file.
WARNING  Skipping, missing the requirements file.
INFO     Running default > create
INFO     Sanity checks: 'docker'
Traceback (most recent call last):
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib64/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/requests/adapters.py", line 489, in send
    resp = conn.urlopen(
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/urllib3/connectionpool.py", line 787, in urlopen
    retries = retries.increment(
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/urllib3/util/retry.py", line 550, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/urllib3/packages/six.py", line 769, in reraise
    raise value.with_traceback(tb)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/urllib3/connectionpool.py", line 703, in urlopen
    httplib_response = self._make_request(
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/urllib3/connectionpool.py", line 398, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib64/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/transport/unixconn.py", line 30, in connect
    sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/api/client.py", line 214, in _retrieve_server_version
    return self.version(api_version=False)["ApiVersion"]
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/api/daemon.py", line 181, in version
    return self._result(self._get(url), json=True)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/utils/decorators.py", line 46, in inner
    return f(self, *args, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/api/client.py", line 237, in _get
    return self.get(url, **self._set_request_timeout(kwargs))
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/requests/sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/requests/adapters.py", line 547, in send
    raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/var/lib/jenkins/.python3.10/bin/molecule", line 8, in <module>
    sys.exit(main())
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/command/converge.py", line 102, in converge
    base.execute_cmdline_scenarios(scenario_name, args, command_args, ansible_args)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/command/base.py", line 121, in execute_cmdline_scenarios
    execute_scenario(scenario)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/command/base.py", line 165, in execute_scenario
    execute_subcommand(scenario.config, action)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/command/base.py", line 154, in execute_subcommand
    return command(config).execute(args)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/logger.py", line 188, in wrapper
    rt = func(*args, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/command/create.py", line 94, in execute
    self._config.provisioner.create()
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/provisioner/ansible.py", line 771, in create
    pb.execute()
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule/provisioner/ansible_playbook.py", line 117, in execute
    self._config.driver.sanity_checks()
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/molecule_docker/driver.py", line 245, in sanity_checks
    docker_client = docker.from_env()
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/client.py", line 96, in from_env
    return cls(
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/client.py", line 45, in __init__
    self.api = APIClient(*args, **kwargs)
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/api/client.py", line 197, in __init__
    self._version = self._retrieve_server_version()
  File "/var/lib/jenkins/.python3.10/lib64/python3.10/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

Same error on molecule prepare, my Docker Desktop is running fine on macOS. I can run hello-world container without any issue.
docker==6.1.3
molecule==5.1.0
molecule-plugins==23.4.1

Docker Desktop and Colima both place the docker socket in a non-standard location, meaning that molecule's docker plugin is unable to find it by default
For Colima you can export DOCKER_HOST=unix:///Users/$USER/.colima/default/docker.sock
For Docker Desktop you can export DOCKER_HOST=unix:///Users/$USER/.docker/run/docker.sock or you can follow the previously suggested workaround of "In Docker's Desktop, Advanced settings, Allow the default Docker socket to be used." (the latter requires admin rights)
But the original request to provide a clearer error message in these cases is still valid - perhaps along with a link to suggested fixes like the above

Upon further investigation, the error is actually in the molecule-plugins repo and is caused by expecting an error from requests rather than docker. I've raised a PR that I believe will resolve this issue:
https://github.com/ansible-community/molecule-plugins/pull/196

Thanks for @alicekaerast 's https://github.com/ansible-community/molecule-plugins/pull/196


fix: fix cycle error

Description
In https://github.com/terraform-ibm-modules/terraform-ibm-observability-instances/pull/576 I added some logic to the outputs in the root level module for log analysis that are not actually needed. There was a knock on affect which was causing a cycle error:
Cycle: provider[\"registry.terraform.io/logdna/logdna\"].ld, module.observability_instances.module.log_analysis.logdna_archive.archive_config, module.observability_instances.module.log_analysis (close), module.observability_instances.output.log_analysis_resource_key (expand)
I was able to reproduce in the examples, and have removed the conditional logic from the outputs to fix the issue
Release required?

[ ] No release
[x] Patch release (x.x.X)
[ ] Minor release (x.X.x)
[ ] Major release (X.x.x)

Release notes content

Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
/run pipeline

Checklist for reviewers

[ ] If relevant, a test for the change is included or updated with this PR.
[ ] If relevant, documentation for the change is included or updated with this PR.

For mergers

Use a conventional commit message to set the release level. Follow the guidelines.
Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
Use the Squash and merge option.

/run pipeline

/run pipeline

/run pipeline

The upgrade test is failing on below since I updated the test to use a prefix in the EN integration name (as it was giving a name clash error). This is an expected update and skipping upgrade test will have no impact on the module itself.
2024-09-30T09:19:36.3977504Z         	Messages:   	Resource(s) identified to be updated
2024-09-30T09:19:36.3978207Z         	            	Name: en_integration
2024-09-30T09:19:36.3979337Z         	            	Address: module.observability_instances.module.cloud_logs[0].ibm_logs_outgoing_webhook.en_integration["0"]
2024-09-30T09:19:36.3980471Z         	            	Actions: [update]
2024-09-30T09:19:36.3981015Z         	            	DIFF:
2024-09-30T09:19:36.3981487Z         	            	  Before:
2024-09-30T09:19:36.3982204Z         	            		{"name":"cloud-logs-eu-de-en-integration-0"}
2024-09-30T09:19:36.3982875Z         	            	  After:
2024-09-30T09:19:36.3983523Z         	            		{"name":"obs-upg-nmqlcy-en"}

/run pipeline

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


Antialiasing Shapes

What is a good method to antialias shapes from sdl-gpu such as an Arc? Should this be a built in feature of sdl-gpu?

I was also wondering whether it'd be possible to render circles anti-aliased, which would presumably mean similar changes

Someone asked about this in an email a few months ago, so here's my edited response:
There's no built-in way to do anti-aliasing with SDL_gpu, so it's currently left to the user.  The obvious/naive way is OpenGL's glEnable( GL_POLYGON_SMOOTH ), but some drivers do not even respond to that.  It's possible that it might work with SDL_gpu on systems that support it.
Supersampling is simple, but wasteful: Render to a 2x larger texture, then blit with linear interpolation (GPU_FILTER_LINEAR) or your own downsampling shader.  A better way might be to look up something like FXAA, which I think is just a shader.
Another way would be to interface with a separate library to do anti-aliased vector drawing.  One such library is NanoVG.  The user I talked to had taken this path and it worked really well for what he was doing.  NanoVG specifically lets you set up the window and GL context independently, so SDL_gpu can do that and NanoVG can take over from there.  You would probably treat NanoVG calls as direct GL calls if you want to also use SDL_gpu's rendering (see 3d-demo for some reference).
If you have any other suggestions or reasonable ways to work AA into SDL_gpu, please share!

Thanks for the tip about NanoVG. I'd tried it out before deciding upon SDL_gpu but it makes sense to combine them. Cheers

I'm trying to render NanoVG drawings to a SDL_gpu target and I'm not really sure how I should be doing it. I found if I draw GPU_Rectangle it seems to switch the OpenGL context for NanoVG but then all of my drawing operations are inverted on the y-axis (NanoVG works normally when drawing during the normal render loop).
I've attached an example image with a red and blue box highlighting the specific output. Sorry for putting this here, I'm not sure if I should have opened a new issue but there's already NanoVG discussion here.

Any luck with antialiasing yet? :(

As per the discussion above, it's probably not going to be a feature of SDL_gpu unless I come across some good AA algorithms and the time to put them in.  I'll close this for now.

Here is what I did for this issue:
// toggle on/off
procedure AntiAliasing(aEnable: Boolean);
begin
  if aEnable then
    begin
      GPU_FlushBlitBuffer;
      glEnable(GL_POLYGON_SMOOTH);
      glHint(GL_POINT_SMOOTH_HINT, GL_NICEST);
    end
  else
    begin
      GPU_FlushBlitBuffer;
      glDisable(GL_POLYGON_SMOOTH);
      GPU_FlushBlitBuffer;
    end;
end;

// toggle on/off and set global flag
procedure GK_AntiAliasing(aEnable: TGK_Bool);
begin
  GKL.AntiAliasing := aEnable;
  AntiAliasing(aEnable);
end;

// if anti-aliasing is enabled, turn if off before rendering a sold primitive, then
// turn it back on and draw an anti-aliased outline around it to smooth the edges
procedure GK_RectangleFilled(aX, aY, aWidth, aHeight: TGK_Single; aColor: TGK_Color);
var
  LColor: SDL_Color absolute aColor;
  LRect: GPU_Rect;
begin
  if not Assigned(GKL.Window.Target) then Exit;
  LRect.x := aX; LRect.y := aY; LRect.w := aWidth; LRect.h := aHeight;
  if GKL.AntiAliasing then AntiAliasing(False);
  GPU_RectangleFilled2(GKL.Window.Target, LRect, LColor);
  if GKL.AntiAliasing then
  begin
    AntiAliasing(True);
    GK_Rectangle(aX, aY, aWidth, aHeight, aColor);
  end;

end;

// for polys such as a images, temp disable if currently enabled then turn it back on afterwards
procedure GK_RenderTexture(aTexture: TGK_Texture; aSrcRect: PGK_Rectangle; aX, aY: TGK_Single; aColor: TGK_Color);
var
  LSrcRect: PGPU_Rect absolute aSrcRect;
  LColor: SDL_Color absolute aColor;
begin
  if not Assigned(aTexture) then Exit;
  GPU_SetColor(aTexture, LColor);
  if GKL.AntiAliasing then AntiAliasing(False);
  GPU_Blit(aTexture, LSrcRect, GKL.Window.Target, aX, aY);
  if GKL.AntiAliasing then AntiAliasing(True);
  GPU_UnsetColor(aTexture);
end;

So far so good. 😎


How handle Auth::user() in model

    /**
     * @param  \Illuminate\Database\Eloquent\Builder $query
     * @return \Illuminate\Database\Eloquent\Builder
     */
    public function scopeByActiveInstitution($query)
    {
        return $query->where('institution_id', \Auth::user()->institution->id);
    }

How can i handle this? Because i get error:

Exception: Trying to get property 'institution' of non-object
Could not analyze class App\Models\Form.

Of course i tried some solutions with magic configuration like:
        'Auth' => array(
            'user'     => 'App\Models\User()',
        ),

        'Auth' => array(
            'user'     => 'Illuminate\Contracts\Auth\Guard::user',
        ),

but without success. This settings are ignored.
My auth config:
    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],
        'admin' => [
            'driver' => 'eloquent',
            'model' => App\Models\User::class,
        ],
    ],

I need separate session for admin (i use https://github.com/Laravel-Backpack) but it isn't make any difference.

Try to use the "@" at the begining -  @\Auth::user()->institution->id

Exception: Trying to get property 'institution' of non-object

But this indicates that your code is not working, i.e. there's no authenticated user in your current context.
How is this related to the ide-helper package?
Do you still have the problem?

I have just had this problem.
I have a relationship that relies on a user id return $this->hasOne('App\Models\Answer')->where('user_id', \Auth::user()->id);
Because it's running on command line there is no logged in user, so when running php artisan ide-helper:models it throws the error ```Exception: Trying to get property 'id' of non-object
Could not analyze class App\Models\Question.````
suppressing errors with @ works fine as a solution but may not be desirable in an http context

Thanks, now I get the initial description of the problem. Didn't realize the \Auth::user as part of the definition of the relation.
Can you show the full stacktrace, please?

The initial issue is actually to do with a query scope method but they are essentially the same thing. It's more to do with running from cli as there is no user authenticated. The method the \Auth::user() call is in is mostly irrelevant really as this happens no matter where you put it. I think it's more the fact that it returns null for the user
Stack trace is
Exception: Trying to get property 'id' of non-object
Could not analyze class App\Models\Question.

Trace:
#0 \app\Models\Question.php(55): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(8, 'Trying to get p...', 'D:\\work\\spoken\\...', 55, Array)
#1 \vendor\barryvdh\laravel-ide-helper\src\Console\ModelsCommand.php(573): App\Models\Question->user_answer()
#2 \vendor\laravel\framework\src\Illuminate\Database\Eloquent\Relations\Relation.php(90): Barryvdh\LaravelIdeHelper\Console\ModelsCommand->Barryvdh\LaravelIdeHelper\Console\{closure}()
#3 \vendor\barryvdh\laravel-ide-helper\src\Console\ModelsCommand.php(574): Illuminate\Database\Eloquent\Relations\Relation::noConstraints(Object(Closure))
#4 \vendor\barryvdh\laravel-ide-helper\src\Console\ModelsCommand.php(246): Barryvdh\LaravelIdeHelper\Console\ModelsCommand->getPropertiesFromMethods(Object(App\Models\Question))
#5 \vendor\barryvdh\laravel-ide-helper\src\Console\ModelsCommand.php(129): Barryvdh\LaravelIdeHelper\Console\ModelsCommand->generateDocs(Array, Array)
#6 [internal function]: Barryvdh\LaravelIdeHelper\Console\ModelsCommand->handle()
#7 \vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): call_user_func_array(Array, Array)
#8 \vendor\laravel\framework\src\Illuminate\Container\Util.php(37): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#9 \vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
#10 \vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(39): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#11 \vendor\laravel\framework\src\Illuminate\Container\Container.php(596): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#12 \vendor\laravel\framework\src\Illuminate\Console\Command.php(134): Illuminate\Container\Container->call(Array)
#13 \vendor\symfony\console\Command\Command.php(258): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#14 \vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#15 \vendor\symfony\console\Application.php(911): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 \vendor\symfony\console\Application.php(264): Symfony\Component\Console\Application->doRunCommand(Object(Barryvdh\LaravelIdeHelper\Console\ModelsCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 \vendor\symfony\console\Application.php(140): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 \vendor\laravel\framework\src\Illuminate\Console\Application.php(93): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 \vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 \artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#21 {main}

Thanks

I guess it could be put in a try catch block so the exception is caught and handled properly?

Yeah, that was my thought too!
Are you up for PR + tests?

To be honest it's not something I've done before or would be so comfortable doing.
I know a try/catch block around the if statement on line 468 of src/Console/ModelsCommand.php:468 is a fix. For example
/**
     * @param \Illuminate\Database\Eloquent\Model $model
     */
    protected function getPropertiesFromMethods($model)
    {
        $methods = get_class_methods($model);
        if ($methods) {
            sort($methods);
            foreach ($methods as $method) {
                try {
                    if (...)
                    {
                        ...
                    }
                } catch (\Throwable|\Exception $e) {
                    ...
                }
            }
        }

But what to do with the exception and how to write test for it I'm not 100% sure with

np, I no one beats me I might be able to take a a stab at this

I'm closing this because this is actually already fixed 😅

I cannot reproduce the original issue with the scope => scopes with references to global state did not exhibit any error
the other recently mentioned issue with global state in relations, or any kind of error for the matter, was recently solved via https://github.com/barryvdh/laravel-ide-helper/pull/1017 and releases as part of 2.8.1 🎉
I made a PR to at least tell the user about it, but otherwise there's not much to do: if the relation "can't be executed", we can't figure out the referenced model => https://github.com/barryvdh/laravel-ide-helper/pull/1052

Since I tested all the scenarios and didn't see any bug, I'm going ahead and closing this.
If I made a mistake, please feel free to comment or, preferable, open a new issue with the details.
Thanks!


Add GPG key signing

Add optional gpg_keys section to .pairs file to be used to sign commits when committing with git pair-commit.

I'll add a section to the README if this is deemed useful.

Hrm, failing on old Rubies... not exactly sure why.


chore(deps): bump countly-sdk-nodejs from 19.8.0 to 20.4.0

Bumps countly-sdk-nodejs from 19.8.0 to 20.4.0.

Release notes
Commits

Signed-off-by: dependabot-preview[bot]<EMAIL_ADDRESS>

No bandwidth to bump countly atm, marking as blocked.
Context: It requires someone to go over release notes and check if it is compatible with instance at countly.ipfs.io


Exclude failing tests, won't fix 21.0.5 & 17.0.13

Exclude failing tests, won't fix 21.0.5 & 17.0.13

Test failed now in aqa-tests. The reason is even though aqa-test master will grab openjdk tests the dev branch by default ( the fix is in dev and 21.0.6, 17.0.14, https://bugs.openjdk.org/browse/JDK-8338748) , the latest or nightly jdk itself are still tagged with 21.0.5 and 17.0.13. Once release is over the new tag would be 21.0.6 and 17.0.14, tests should pass with 21.0.6 and 17.0.14.


Variant agnostic build steps

Is there an existing way of executing project-level (i.e. variant agnostic) build steps for packages with variants? Our packages contain a target to build Sphinx docs which are the same across all variants, so ideally we would like to only build them once.
Currently Rez treats each variant as a separate cmake project, so PROJECT_BINARY_DIR points to the variant's root directory, not the project's. I had a look through the cmake env vars and variables, but couldn't find anything that represented the project-level build directory. I can work around this with some path hackery, but it seems error-prone.
Thanks!

There's no way to do this currently. Even if there were I'm not sure how it
should work. Perhaps introduce a 'base' build? But that would surely break
existing builds. Unless it's opt-in on a per-package+configurable basis.
Will have to think about but this is something that's come up a number of
times.
A
On Sat, Mar 11, 2017 at 9:50 AM, ttanimura<EMAIL_ADDRESS>wrote:

Is there an existing way of executing project-level (i.e. variant
agnostic) build steps for packages with variants? Our packages contain a
target to build Sphinx docs which are the same across all variants, so
ideally we would like to only build them once.
Currently Rez treats each variant as a separate cmake project, so
PROJECT_BINARY_DIR points to the variant's root directory, not the
project's. I had a look through the cmake env vars and variables, but
couldn't find anything that represented the project-level build directory.
I can work around this with some path hackery, but it seems error-prone.
Thanks!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/nerdvegas/rez/issues/394, or mute the thread
https://github.com/notifications/unsubscribe-auth/ABjqSseYrQtGdjMoFnwd_XraT0QfGEZLks5rkdPKgaJpZM4MZ9Nm
.

Yeah, its not something that makes sense with the way Rez works. What about a post-build type of thing? I guess it would be at the package scope, although perhaps that is something that can be configurable.

I've had cases where I needed builds like this. ie, I'd like to generate variants of packages, but I only need to build a payload which those packages point to just once, because for example, a payload might come with libraries for multiple versions of Nuke already bundled, and it doesn't make much sense to "build" it multiple times.
I tend to get around it by not using variants and instead introducing a requirement for the variant range, and letting the commands() section handle any different pathing needed. It's not ideal but fits the concept reasonably well (of having a "base" build)


wip: [OSX] dialogs stay ontop of main window when another app is displayed.

Since nspanel / nswindow refactor, dialog windows no longer remain on top of parent window when another app is selected.
This restores the expected and previous behavior.

You can test this PR using the following package version. 0.10.999-cibuild0020743-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]

You can test this PR using the following package version. 0.10.999-cibuild0020760-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]

You can test this PR using the following package version. 0.10.999-cibuild0020853-beta. (feed url: https://nuget.avaloniaui.net/repository/avalonia-all/index.json) [PRBUILDID]


[Aio] Run IO operations in a separated Asyncio loop

All IO operations are executed using its own loop and thread, allowing the synchronous client to run without getting blocked.
Recipe for running the synchronous tests using the Aio iomgr:
python ./src/python/grpcio_tests/setup.py test_sync_over_aio

Related to #19955
Performance impact
The following table shows the performance of the Python gRPC driver in its three different ways of making RPC calls comparing the PR with master. Each value shows the maximum QPS reached with the same level of concurrency (25 threads/25 Asyncio tasks)

stack
Master
PR

sync
11K
11K

sync over Aio
x
6K

Aio
19K
18K

For testing has been using the following tool [1] for stressing a CPP gRPC server from a Python gRPC client by making unary calls, having both of them living in different machines. All tests that required the Aio module were executed using the uvloop implementation of the  Asyncio loop.
[1] https://github.com/pfreixes/grpcio_stress
What is missing

The init_grpc_aio is still the way of initializing the Aio module.
Several tests have been disabled [1] we would need to tackle the ones that are critical.
The new test command for running all of the synchronous tests on top of an initialized Aio module would need to be added into the CI for having them running automatically at each new PR.
For detecting regressions with the solution proposed we could also consider having an entry into the current benchmark tests for checking the performance. We could consider testing all arities

Other notes
None last minor versions of 3.6 and 3.7 have this bug [2] where asynchronous generators might end up being closed from another thread, all last minor versions have this bug fixed.
[1] https://github.com/grpc/grpc/pull/22076/files#diff-f4932b2c9567e7075b28bc8ddf591120R266
[2] https://bugs.python.org/issue34769

EDIT(@lidizheng): This PR needs cherry-pick import. Fixes https://github.com/grpc/grpc/issues/19985

Found ou that once Ive switched to Python 3.6 some tests were failing randomly with this traceback:
Errors/Failures:
[91munit.call_test.TestStreamStreamCall.test_error_in_async_generator[0m
[1mtraceback:[0m
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_tasks.py", line 27, in _task_get_stack
    f = task._coro.cr_frame
AttributeError: 'async_generator_athrow' object has no attribute 'cr_frame'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/unittest/case.py", line 608, in run
    self.tearDown()
  File "/Volumes/BuildData/tmpfs/src/github/grpc/workspace_python_macos_opt_asyncio/src/python/grpcio_tests/tests_aio/unit/_test_base.py", line 31, in wrapper
    return loop.run_until_complete(f(*args, **kwargs))
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 468, in run_until_complete
    return future.result()
  File "/Volumes/BuildData/tmpfs/src/github/grpc/workspace_python_macos_opt_asyncio/src/python/grpcio_tests/tests_aio/unit/call_test.py", line 46, in tearDown
    await self._channel.close()
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/Volumes/BuildData/tmpfs/src/github/grpc/workspace_python_macos_opt_asyncio/py36_asyncio/lib/python3.6/site-packages/grpc/experimental/aio/_channel.py", line 295, in close
    await self._close(grace)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/coroutines.py", line 110, in __next__
    return self.gen.send(None)
  File "/Volumes/BuildData/tmpfs/src/github/grpc/workspace_python_macos_opt_asyncio/py36_asyncio/lib/python3.6/site-packages/grpc/experimental/aio/_channel.py", line 255, in _close
    stack = task.get_stack(limit=1)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_tasks.py", line 29, in _task_get_stack
    f = task._coro.gi_frame
AttributeError: 'async_generator_athrow' object has no attribute 'gi_frame'

[1mstdout:[0m
None
[1mstderr:[0m
None

Ive tried to reproduce in master but I couldn't, so considering that with Python 3.7 the branch was passing all of the tests most likely it's something related to the changes proposed and the way that the channel closes the ongoing calls.
Any idea will help /cc @lidizheng

@pfreixes This failure looks deterministic to me, looks like a bug in CPython. I'll investigate if we can work around it.

@pfreixes The frame object not found issue seems like a bug in CPython. In short, there is a global callback for closing async generators. It schedules an aclose task onto the event loop, however, aclose task is a PyAsyncGenAThrow in CPython which doesn't have proper frame attributes. Then it fails.
            try:
                stack = task.get_stack(limit=1)
            except AttributeError as attribute_error:
                # NOTE(lidiz) tl;dr: If the Task is created with a CPython
                # object, it will trigger AttributeError.
                #
                # In the global finalizer, the event loop schedules
                # a CPython PyAsyncGenAThrow object.
                # https://github.com/python/cpython/blob/00e45877e33d32bb61aa13a2033e3bba370bda4d/Lib/asyncio/base_events.py#L484
                #
                # However, the PyAsyncGenAThrow object is written in C and
                # failed to include the normal Python frame objects. Hence,
                # this exception is a false negative, and it is safe to ignore
                # the failure (someone should fix it in CPython!).
                # https://github.com/python/cpython/blob/a025d4ca99fb4c652465368e0b4eb03cf4b316b9/Objects/genobject.c#L1989
                if 'frame' in str(attribute_error):
                    continue
                else:
                    raise

Even with this update, I still observe deadlocks occasionally. More investigation is needed.

@lidizheng definitely seems a bug from CPython, and it's not only happening with the async_generator_throw, but also happens with all of the versions of the async_generator_*. Indeed the only one that supports stack introspection is async_generator and has its own attribute named ag_frame [1].
So technically with the fix that you proposed it should work, I will start by using the patch that you provided and see where these deadlocks are happening.
Eventually, we would need to send a patch to CPython for fixing this mess. Since you found the bug, I think that you should do it.
[1] https://github.com/python/cpython/blob/master/Objects/genobject.c#L1329

@pfreixes CPython PR filed https://github.com/python/cpython/pull/18669. No idea how long it will take.

@lidizheng I have bad news, once we solve the deadlocks by releasing the GIL - last pushed commits - I'm experimenting the following two down-side effects:

We lose ~15% of performance, moving from 19K QPS to 15QPS!
Im not able to have all test_sync_over_aio in green again. Something that I got before the changes that I pushed Today

Any ideas about what could be the way to go will help, because I'm starting to feel that maybe this shortcut will be never fully functional, and having as a side-effect hurting the Aio module, as it is being reflected with the performance.

My next plans for this PR:

Work on having the legacy tests passing in green as we had before fixing the deadlocks
Measure the performance impact on the server-side
Decision point with you once we have the tests passing and we have numbers of the regression in the server-side and the client-side.

CI is green, good news. But there is still a lot of work to do. I will continue with the plan. I will dismiss your review @gnossen since there is a lot of work to do, and the performance after adding the proper GIL lock/unlock methods has been impacted

With the latest changes for preventing deadlocks, we added a substantial performance regression in the Aio package. This regression has paired - for bad - the performance of the asynchronous driver and the synchronous one. Benchmarks showed that both of them were able to reach a maximum of 12K QPS, when in the master branch the asynchronous one is able to reach 20K QPS./
Why this regression appeared?
The main reason for releasing/acquiring the GIL, some examples here [1] [2], when we called gRPC Core functions and when we were called by gRPC Core functions was for addressing the deadlocks that appeared at the moment that we implemented and offload all IO operations to an isolated IO loop.
The deadlocks appeared between gRPC Core mutex and the GIL. Without releasing or acquiring the GIL explicitly by us this what was happening.
1 - (thread 1) (Pyton) call a gRPC Core function
2 - (thread 1) (gRPC core) create a mutex X
3 - (thread 1) (gRPC core) calls on_callback
4 - (thread 1) (Python) syncrhonized the thread and releases the GIL implicitly
5 - (thread 2) (Python) call a gRPC Core function
6 - (thread 2) (gRPC core) tried to acquire the mutex X
At that point, thread 1 and thread 2 had a deadlock because the mutex X was already locked by thread 1 and the GIL was locked by thread 2. This didn't happen before because the execution of the on_callback would never release the GIL implicitly and would return the control back to the gRPC core function which would eventually release the mutex X.
For addressing the situation we had to release explicitly the GIL every time that we would make a call to gRPC core, so previous flow would look like:
1 - (thread 1) (Pyton) call a gRPC Core function
2 - (thread 1) (Pyton) Release the GIL
3 - (thread 1) (gRPC core) create a mutex X
4 - (thread 1) (gRPC core) calls on_callback
5 - (thread 1) (Python) Acquire the GIL
6 - (thread 1) (Python) synchronizes the thread and RELEASE the GIL implicitly
7 - (thread 2) (Python) Acquire the GIL
8 - (thread 2) (Python) call a gRPC Core function
9 - (thread 2) (Python) Release the GIL
10 - (thread 2) (gRPC core) tried to acquire the mutex X
11 - (thread 1) (Python) Acuire the GIL
12 - ...
As can bee observed, by acquiring and releasing the GIL we prevented the deadlock scenario where a lock from the gRPC Core and the GIL might end up creating a deadlock.
But addressing this didn't come for free, the following is the profiling of the top15 functions for that specific branch vs the top15 form master.
Current branch
Total: 3740 samples
     500  13.4%  13.4%      500  13.4% __pthread_cond_signal
     398  10.6%  24.0%      494  13.2% __pthread_cond_timedwait
     161   4.3%  28.3%     3739 100.0% _PyEval_EvalFrameDefault
     128   3.4%  31.7%      128   3.4% syscall
     114   3.0%  34.8%      114   3.0% PySequence_Contains
     111   3.0%  37.8%      111   3.0% __lll_unlock_wake
      75   2.0%  39.8%      180   4.8% _PyType_Lookup
      60   1.6%  41.4%       61   1.6% __libc_write
      57   1.5%  42.9%       57   1.5% __libc_read
      48   1.3%  44.2%      339   9.1% PyObject_GC_UnTrack
      47   1.3%  45.4%      209   5.6% _PyObject_GenericGetAttrWithDict
      40   1.1%  46.5%       42   1.1% __GI_epoll_pwait
      38   1.0%  47.5%       38   1.0% PyObject_Malloc
      37   1.0%  48.5%     3129  83.7% _init@36e8
      33   0.9%  49.4%       97   2.6% _PyDict_GetItem_KnownHash

master
(pprof) top15
Total: 3138 samples
     181   5.8%   5.8%      181   5.8% syscall
     174   5.5%  11.3%     3137 100.0% _PyEval_EvalFrameDefault
     170   5.4%  16.7%      170   5.4% __pthread_cond_signal
     139   4.4%  21.2%      141   4.5% PySequence_Contains
     113   3.6%  24.8%      147   4.7% __pthread_cond_timedwait
      74   2.4%  27.1%       74   2.4% __libc_write
      65   2.1%  29.2%       69   2.2% __GI_epoll_pwait
      60   1.9%  31.1%      175   5.6% _PyType_Lookup
      56   1.8%  32.9%       56   1.8% PyObject_Malloc
      53   1.7%  34.6%      235   7.5% PyObject_GC_UnTrack
      51   1.6%  36.2%      192   6.1% _PyObject_GenericGetAttrWithDict
      47   1.5%  37.7%       49   1.6% __libc_read
      37   1.2%  38.9%     2408  76.7% _init@36e8
      37   1.2%  40.1%       37   1.2% _init@60860
      29   0.9%  41.0%       29   0.9% PyType_IsSubtype

As we can see the two offending functions __pthread_cond_signal and __pthread_cond_timedwait are involved in GIL acquiring [3] and releasing had a substantial increase in the total number of times called and the time spent on them.
Before we introduced the changes for acquiring and releasing the GIL properly - for addressing the deadlock issues - the profile showed that the time spent by the two offending functions was only slightly higher - hence, the little regression introduced and claimed initially.
[1] https://github.com/grpc/grpc/pull/22076/files#diff-cdd81de112d1cded21f7544d8264b12aR81
[2] https://github.com/grpc/grpc/pull/22076/files#diff-cdd81de112d1cded21f7544d8264b12aR114
[3] https://github.com/python/cpython/blob/e225bebc1409bcf68db74a35ed3c31222883bf8f/Python/ceval_gil.h#L184

Closing this in favor of these two ones https://github.com/grpc/grpc/pull/22258 https://github.com/grpc/grpc/pull/22259


[mwc-radio & mwc-formfield] middle alignement issue

When using mwc-radio in a mwc-formfield the label is not properly aligned with the radio button.
reproduction : https://mwc-radio-and-mwc-formfield.glitch.me/ (with hotfix)

That glitch link doesn't work for me (CORS error relating to bu.edu), but doe shttps://github.com/material-components/material-components-web-components/issues/380 describe the same issue you are seeing?

Yes that's the issue i'm referring to.

The radio label is not vertically aligned with the radio button (red line).

for now I am using this quick fix :
<mwc-formfield label="radio">
  <mwc-radio style="display:flex"></mwc-radio>
</mwc-formfield>

Thanks for confirming, closing as dupe of https://github.com/material-components/material-components-web-components/issues/380

reclosing because this seems to actually be a. dupe of #380


Added buy again and cancel order features

Fixes #337
Type of change
Please give a X on it which is applicable

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Refactor Code
[ ] A documentation update

How Has This Been Tested?
Cancel Order Feature
In this, when cancel order button is clicked, status changes from pending to cancelled in the database and the data is fetched again.
Buy Again Feature
In this, same items are added to the cart and the item is navigated to the cart page.
Screenshots and Videos:

Checklist:
Give a X on, which is applicable

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[X] Any dependent changes have been merged and published in downstream modules

Nice @abckhush 🚀


feat: add Starport for better development environment

Summary

Right now, the farming module uses localnet script to run local network for testing local environment. This issue proposes to add Starport for better development environment so that just by running starport chain serve command, you can run local network with various different functionalities that Starport supports.
Tasks

Add config.yml to add Starport
Update README.mdand TECHNICAL_SETUP.md docs
Remove scripts/localnet.sh and update Makefile
Remove most of the third_party proto files

References

Starport Official Github
Starport Documentation

For Admin Use

[x] Not duplicate issue
[x] Appropriate labels applied
[x] Appropriate contributors tagged
[x] Contributor assigned/self-assigned

The farming module is planning to release the next version tomorrow. I think this PR is better not to be merged in the next version since I don't have strong confidence at this point. As I integrate Starport into the module, I find out there are tradeoffs (e.g proto-format functionality when starport g proto-gen and there should exist scaffold inline comments in order to fully utilize Starport subcommands and etc). It might be because I don't know there is a workaround or there are some stuff that I don't know yet. Therefore, I think I need to spend more time playing with it.

The farming module is planning to release the next version tomorrow. I think this PR is better not to be merged in the next version since I don't have strong confidence at this point. As I integrate Starport into the module, I find out there are tradeoffs (e.g proto-format functionality when starport g proto-gen and there should exist scaffold inline comments in order to fully utilize Starport subcommands and etc). It might be because I don't know there is a workaround or there are some stuff that I don't know yet. Therefore, I think I need to spend more time playing with it.

I agree, Let's continue it after starport starts supporting cosmos-sdk 0.44.3


Remnants of rogue file names and other maintenance tasks

Some file names should be harmonized to avoid confusion + maintenance tasks:

[x] docs/helpers/rogueEnv.go -->docs/helpers/extendedEnv.go
[x] docs/templates/ADOC_global.tmpl --> docs/templates/ADOC_extended.tmpl
(merge #5292 first)
[x] backport the file from the:
docs branch ocis/services/_includes/adoc/extended_configvars.adoc -->
docs-stable-2.0 branch ocis/services/_includes/adoc/extended_configvars.adoc
(merge #5292 first)
fixed via #5298
[x] it would be great that when running make docs-generate that the directory:
docs/services/_includes and
docs/services/_includes/adoc
are emptied, except the .gitignore and the _index.md file. This has to do with local building and testing - else you keep remnants forever. The bash command to do so could be (tested)
find docs/services/_includes/ -type f \( -name "*" ! -name ".git*" ! -name "_*" \) -delete
[x] when running make docs-generate two go files not in the scope of docs always get changed, a blank comment line gets added in settings.pb.go and thumbnails.pb.go (protogen/gen/ocis + subdir). Run locally to see the change. The blank comment line could be added by default then this gets avoided. A fix has been proposed, see #5294, needs checking if ok to do so.

Regarding make docs-generate, I have tested removing stuff locally and all files are regenerated as expected.

All fixed


When i open setup.py the cmd opens and close in 2 seconds

Please help i want to be online please
i have the latest python and i used the pip cmd to download the nintendo clients now what i do PLEASE HELP

I want to be online

What do you mean? What exactly is your goal?
The best way to get started is to check out one of the example scripts, the package docs or the wiki, but I'm not sure if NintendoClients is the correct tool for what you are doing.


Downgrade cookie to 0.2

cookie 0.4 was never used with serde 0.9, it was a mistake to bump it. Yes I am sad too.

bors r+


Partial string matching on resource values?

What would you like to be added:
I found it pretty surprising that I couldn't do partial string matching (regex or wildcard) on the values in created resources.
Why is this needed:
When working with custom resources like XRDs in Crossplane, I find it difficult to validate certain kinds of dynamic resources because they fundamentally change the return  values.. for example, verifying that my Role resource has a status.roleArn field that matches arn:aws:iam:.... The role ARN changes on every test, but fundamentally my goal is to verify that a value was put in there and that it's not empty.

See also https://github.com/kudobuilder/kuttl/issues/224 and https://github.com/kudobuilder/kuttl/issues/70
The closest thing possible right now is to use a TestAssert with a command that does some kind of templating/substitution (if the value you're looking for is predictable at all) and runs a nested kuttl assert.
https://github.com/kudobuilder/kuttl/pull/387 might make this easier but there are no plans to support regexes. You might want to take a look at https://github.com/kyverno/chainsaw

Thanks @porridge for the mention!
https://github.com/kyverno/chainsaw supports wildcard matching.


make dl_all_lm failing

When I run the command to download all of the language models:
 make dl_all_lm
I can't run it, with the response:
make: *** No rule to make target 'dl_all_lm'.  Stop.
Also, I am able to download the english language model (using make lang=en dl_lm), but the perplexity calculation doesn't work..
Any ideas?

In my case, make dl_all_lms works.

When I run the command to download all of the language models:  make dl_all_lm I can't run it, with the response: make: *** No rule to make target 'dl_all_lm'. Stop.
Also, I am able to download the english language model (using make lang=en dl_lm), but the perplexity calculation doesn't work..
Any ideas?

In Makefile, it's dl_all_lms, you lost the "s".


415 Unsupported Media Type

Server Code:
init(Req, State) ->
{cowboy_rest, Req, State}.
is_authorized(Req, State) ->
case cowboy_req:parse_header(<<"authorization">>, Req) of
{basic, User = <<"a">>, <<"a">>} ->
{true, Req, User};
_ ->
{{false,<<"UnAouthorized realm="cowboy"">>}, Req, State}
end.
content_types_provided(Req, State) ->
{[
{<<"application/json">>, to_json}
], Req, State}.
content_types_accepted(Req, State) ->
io:format( "~n Content_Types_accepted ~n"),
{[{{<<"application/json">>, <<"x-www-form-urlencoded">>, '*'},create_paste}],
Req, State}.
create_paste(Req, State) ->
io:format( "ENcoded Bosy = ~p ~n ",cowboy_req:read_urlencoded_body(Req)),
case cowboy_req:method(Req) of
<<"POST">> ->
io:format("~n POST IN CREATE PASTE ~n"),
{true, Req, State};
_ ->
{true, Req, State}
end.
allowed_methods(Req, State) ->
{[<<"GET">>, <<"POST">>], Req, State}.
to_json(Req, State) ->
Body = mochijson:encode({struct, [{status, <<"Success">>}]}),
{Body, Req, State}.
===============================================================================
In Browser:
curl -u a:a -X POST -i http://localhost:8080
OUTPUT:
HTTP/1.1 415 Unsupported Media Type
content-length: 0
content-type: application/json
date: Tue, 20 Jun 2017 15:19:13 GMT
server: Cowboy
============================================================================
How to solve that ?
It works fine if i use GET instead of POST.

Well you gotta pass a content-type header matching what you accept.


merge from arlac77/template-github,arlac77/template-kronos-module

README.md

docs(README): update from template

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Corne Mini SVG Wrong Size?

Is the corne mini SVG file exported with the wrong dimensions?  Hole size for choc is around 10mm instead of the 13.851mm that the corne mini tent SVG has.

SVG scaling is set in the user’s environment so check your own settings and calibration. (Mm vs inch etc).

Sorry yeah seems like there is a fusion 360 issue with importing SVGs. Lots of recommendations to import using 1.33 scale.
https://www.reddit.com/r/Fusion360/comments/ldkdns/importing_svg_svg_is_smaller_than_original/
https://www.reddit.com/r/Fusion360/comments/iggn0d/scaling_problem_importing_svg_from_illustrator/
https://www.reddit.com/r/Fusion360/comments/eqy8y1/weird_annoyance_when_importing_svg_files/


Sometimes trade account disappears

It happened after and deposited and refreshed the view
and also after I submitted an order.
Usually comes back after a refresh though.

Oh now I have noticed that I put all the money in my trade acccount into an order and it's showing as totally empty and asking me to deposit. So I cannot see my orders or anything.
It seems the trade account is also being weird on Android at the moment too.

fixed.