Locale is causing error

With the latest version 15 I receive the following error, version 13 works fine. I am located in germany and use MACOS 10.14.5 with Python3
Traceback (most recent call last):
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/startWohnzimmer.py", line 14, in
for robot in account.robots:
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/account.py", line 65, in robots
self.refresh_robots()
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/account.py", line 113, in refresh_robots
endpoint=robot['nucleo_url']))
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/robot.py", line 46, in init
if self.service_version not in SUPPORTED_SERVICES:
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/robot.py", line 231, in service_version
return self.available_services['houseCleaning']
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/robot.py", line 227, in available_services
return self.state['availableServices']
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/robot.py", line 223, in state
return self.get_robot_state().json()
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/robot.py", line 181, in get_robot_state
return self._message({'reqId': "1", 'cmd': "getRobotState"})
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/robot.py", line 63, in _message
headers=self._headers)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg/requests/sessions.py", line 519, in request
prep = self.prepare_request(req)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg/requests/sessions.py", line 462, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg/requests/models.py", line 317, in prepare
self.prepare_auth(auth, url)
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/requests-2.22.0-py3.7.egg/requests/models.py", line 548, in prepare_auth
r = auth(self)
File "/Users/stephan/Documents/Development/Phyton/Neato/robot/pybotvac/robot.py", line 245, in call
locale.setlocale(locale.LC_TIME, 'en_US.utf8')
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 604, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting

Hm! This is unfortunate.  Indeed it seems the change from #30 broke you (and possibly others).  fwiw, the context in which we delivered the change was to fix issues for users NOT in en_US, pulling robot data against Neato for newer bots did not work.  Our realization is that it seemed that Neato was rejecting requests from the header not formulated from en_US locale.  (so we temporarily flipped to en_US during that, then revertted back to default system locale).  We had tested with en_CA (non-US), and en_US (US).  Obviously missed cosidering the case where the system does not have en_US at all.
As per, https://docs.python.org/3/library/locale.html#locale.setlocale, locale.setlocale() itself should of course exist. (initially I thought the error was about that) - but I think it is actually about the fact your system doesn't have en_US.
Specifically it is probably throwing:
https://docs.python.org/3/library/locale.html#locale.Error

Exception raised when the locale passed to setlocale() is not recognized.

I am curious into your environment.

I think this is a bug/gap we missed during review/consideration of the change.
Not all docker containers I suppose would have locales-all package installed?
https://stackoverflow.com/questions/1259971/os-locale-support-for-use-in-python
This post suggests that it is kind of expected that environments have "all locales" available.
https://mike632t.wordpress.com/2018/04/08/dates-and-locale-settings-in-python/
(dpkg-reconfigure locales)
My system is
>>> locale.getlocale()
('en_CA', 'UTF-8')

Not exactly sure the best way to proceed.  Perhaps the interim workaround is to ONLY apply this workaround if the en_US locale is available on the system? (this would prevent breakage for environments that don't have locales installed/configured ... but then would NOT FIX #30 for those systems). - sigh?
If we want to proceed with that kind of fix, we should wrap it in a try/except catching locale.Error and logging that we couldn't apply the workaround on that system.

Wouldn't this be more of a local issue where we ask the user to install/setup whatever they need and just move on?  In the case of Home Assistant the Docker image is updated and other users are asked to make any necessary changes if that is the case.  There are not many cases where locale is missing or not set at all.

Wouldn't this be more of a local issue where we ask the user to install/setup whatever they need and just move on? In the case of Home Assistant the Docker image is updated and other users are asked to make any necessary changes if that is the case. There are not many cases where locale is missing or not set at all.

It isn't unreasonable to ask environments to have their locales setup properly, I agree.  But it might be unreasonable to ask a system to have the en_US locale installed when not in the US. (I'm not sure).
For home-assistant, https://github.com/home-assistant/home-assistant/issues/25759, it looks like whatever was rejected.  (and I don't see any subsequent issues for HASS/docker envs to have their locales fixed) - we probably don't want to rely on this happening
Regardless, I think the right thing to do here is to add the try/except like I suggested above.  @dshokouhi  - if you agree, I can submit the PR for that.

@fermulator do you have a deeper understanding why the error occurs in #30? We set the locale, call strftime and set the locale back. So it's only the date that is affected by the locale, not the creation of the header itself.
When we set a date that is created with UTC, it should not depend on the locale setting of the user. Therefore, error #30 should not occur here. What do you think? Please correct me if I am wrong.
Personally I thing that the try/except solution is just a workaround for a problem that can be solved. Furthermore try/except is a expensive operation and especially the case of except should be avoided.

Hey @Santobert , thanks for jumping back into this.  Appreciate the feedback!
RE: "So it's only the date that is affected by the locale, not the creation of the header itself."
Note that the date string is FOR the header.  In __call__() for Auth class, we do:
https://github.com/stianaske/pybotvac/blob/master/pybotvac/robot.py#L262
date = time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()) + ' GMT'
# ... (snip) ...
msg = '\n'.join([self.serial.lower(), date, request.body.decode('utf8')])
        signing = hmac.new(key=self.secret.encode('utf8'),
                           msg=msg.encode('utf8'),
                           digestmod=hashlib.sha256)
# ... (snip) ...
request.headers['Date'] = date
request.headers['Authorization'] = "NEATOAPP " + signing.hexdigest()

, so it is relevant to the header itself.  In both the Date portion (raw), and encoded into the Authorization portion.
Also the creation of the date-time-string itself IS relevant to the system's locale as per:

https://docs.python.org/3/library/time.html#time.strftime
Our string is: '%a, %d %b %Y %H:%M:%S', so we are affected by it for:

%a | Locale’s abbreviated weekday name.
%b | Locale’s abbreviated month name.

As noted at the end of #30, I have submitted a request into Neato R&D to understand why this is happening ... (5 weeks ago) no response as of yet.

The PROPER fix here is to root cause the API AUTH dependency on en_US for some robot models. (but we are beholden to Neato's response unless someone in the community can ascertain RCA w/out their input?)

RE understanding of the workaround itself, in fact no at least on my en_CA systems I cannot see an observable (printable) difference between en_CA and en_US in terms of the resulting date-time-string. See https://github.com/stianaske/pybotvac/issues/30#issuecomment-511117320 -- re-sharing here for posterity:
>>> import time
>>> import locale
>>> locale.getlocale()
('en_CA', 'UTF-8')
>>> date = time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()) + ' GMT'
>>> print(date)
Thu, 15 Aug 2019 12:16:50 GMT
>>>
>>> locale.setlocale(locale.LC_ALL, 'en_US.utf8')
'en_US.utf8'
>>> date = time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()) + ' GMT'
>>> print(date)
Thu, 15 Aug 2019 12:17:02 GMT

, I see no difference; YET, we proved that the header request is broken without it in non-US locales on newer bots. (lots of evidence in #30).
So the TLDR is:

we don't know why this fixes the problem in #30
I agree it is a workaround

Finally, RE this issue specifically (#45, the delivery of workaround in #30 breaks systems without proper locale installation/config), from a pure code robustness perspective, we MUST handle this using either EAFP or LBYL.  It is incorrect to write code that calls into a library that MIGHT throw an error, and to not handle it. (I take the blame here, as I did not notice that setlocale() could throw an exception.
So our two options are:

The try/except implementation is EAFP (easier to ask for forgiveness than permission) -- https://docs.python.org/3/glossary.html#term-eafp. -- just try it, and if the locale isn't present gracefully move on.
The alternative LBYL (look before you leap) - https://docs.python.org/3/glossary.html#term-lbyl -- would could be something like making a sys call into locale -a to determine if en_US is present, and only apply this workaround if that locale is present on the system.

I would hazard a guess, that a syscall is more expensive than exception handling. (only a guess though);  If someone has a proposal for how to check if a system locale exists without that expensive sys call (option 2); in a pythonic way, that could be our winner here.
PS: (so that I can learn) what evidence/experience do you have that supports try/except as being expensive? As I understand it, the happy path through a try-except is extremely efficient/fast.  Handling of an exception is more expensive, but exceptions are supposed to be rare anyway.

Wow, great summary. Thank you for the clarification.

https://docs.python.org/3/library/time.html#time.strftime
Our string is: '%a, %d %b %Y %H:%M:%S', so we are affected by it for:
%a | Locale’s abbreviated weekday name.
%b | Locale’s abbreviated month name.

Oh, I was just thinking about the date and time, not the string representations.
Could pytz solve this problem without using the systems locale? I'm not familiar with this library.
https://pypi.org/project/pytz/

From a pure code robustness perspective, we MUST handle this using either EAFP or LBYL. It is incorrect to write code that calls into a library that MIGHT throw an error, and to not handle it. (I take the blame here, as I did not notice that setlocale() could throw an exception.)

I agree, that the syscall might be more expensive than the except-case (which is the only part of try/except that is expensive). If there is no other solution (like pytz?), I would vote for the first solution (try/except) for performance reasons. The second solutions looks more clean to me.

Hey @Santobert , I gave this a shot.
BASELINE
.. wait ... did Neato change/fix something? I'm no longer able to produce the ORIGINAL problem.  If I revert to the OLD code (v13) without any locale changing:
date = time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()) + ' GMT'

, it doesn't bork (like it used to) and works:
~/projects/pybotvac$ python3
Python 3.5.2 (default, Nov 12 2018, 13:43:14)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pybotvac import Account
>>> for robot in Account('USERNAME_SNIP', 'PASSWORD_SNIP').robots: print(robot)
...
Name: boyle, Serial: OPS<SNIP>, Secret: <SNIP> Traits: ['maps']

huh?
Confirming I'm still in en_CA locale
>>> import locale
>>> locale.getlocale()
('en_CA', 'UTF-8')

Retest v15 (the one with the locale switching)
...
>>> for robot in Account('USERNAME_SNIP', 'PASSWORD_SNIP').robots: print(robot)
...
Name: boyle, Serial: OPS<SNIP>, Secret: <SNIP> Traits: ['maps']

Works as expected (still).
If I try with another method ...
>>> fmt='%a, %d %b %Y %H:%M:%S'
>>> from datetime import datetime
>>> date = datetime.utcnow().strftime(fmt) + ' GMT'
>>> print(date)
Tue, 20 Aug 2019 01:05:32 GMT

I hacked up a local instance of pybotvac robot.py with changes to the Auth.__call()__ method to use that, and it works as well.
...
>>> for robot in Account('USERNAME_SNIP', 'PASSWORD_SNIP').robots: print(robot)
...
Name: boyle, Serial: OPS<SNIP>, Secret: <SNIP> Traits: ['maps']

If i use UTC as a suffix, it doesn't work (robot incorrectly reports as offline).
We need other testers to confirm/deny this.
SUSPECT that Neato changed something recently (FIXED) their API... ?
I can no longer test fixes here ...

It works for me, too.
>>> import locale
>>> locale.getlocale()
('de_DE', 'UTF-8')

So, if I understand everything correctly, #48 should resolve both the #30 and #45, right?
This does make a lot of sense to me, as I'm unable to understand how the temporary locale could somehow affect the header encoding (except for the date of course). Note that in v0.15 we do reset the locale immediately after creating the datetime string.
saved_locale = locale.getlocale(locale.LC_TIME)
locale.setlocale(locale.LC_TIME, 'en_US.utf8')

date = time.strftime('%a, %d %b %Y %H:%M:%S', time.gmtime()) + ' GMT'

locale.setlocale(locale.LC_TIME, saved_locale)

I.e. the locale is only used to correctly format the current datetime, and setting it using datetime's
Have anybody reproduced #30 when using datetime.utctime() from #48?

So, if I understand everything correctly, #48 should resolve both the #30 and #45, right?

For me (de_DE.UTF-8) it works.

Have anybody reproduced #30 when using datetime.utctime() from #48?

I didn't notice anything wrong while testing #48, so I guess not.
@fermulator  What do you think?

Sorry for late response, I was AFK.
Nothing was changed on Neato servers. If I understand correctly, you are experiencing some issues in encoding the date header properly.
As specified by the official docs, the Date Header is to be defined as per RFC 2616 Sec 14.18 which states that the reference is RFC 1123, that in turn references RFC 822, more specifically here. You can see in this section that days MUST be "Mon"..."Sun" and months "Jan"..."Dec" (in english).
This is BTW standard http header encoding. Cannot help in python because I'm not up to date on libraries / functions I'd recommend for the scope. :)

If there are still issues after #48 we could consider using Babel's format_datetime function. But on all my systems (Linux and Windows with different location locales) datetime.utcnow() always returns english representations of dates.

So, if I understand everything correctly, #48 should resolve both the #30 and #45, right?
@stianaske

no, please delete pull #48, it is not the right fix

Sorry for late response, I was AFK.
Nothing was changed on Neato servers. If I understand correctly, you are experiencing some issues in encoding the date header properly.
As specified by the official docs, the Date Header is to be defined as per RFC 2616 Sec 14.18 which states that the reference is RFC 1123, that in turn references RFC 822, more specifically here. You can see in this section that days MUST be "Mon"..."Sun" and months "Jan"..."Dec" (in english).
This is BTW standard http header encoding. Cannot help in python because I'm not up to date on libraries / functions I'd recommend for the scope. :)

Hi @ostinelli , thank you for the reply. I will look into the specifics of the RFCs, however at a glance it seems the code even originally was in compliance.
Can you please specifically consider
https://github.com/stianaske/pybotvac/issues/30#issuecomment-511117320
?
Users were having problems when using the date formulation for header with non-US locales, but for me if I compared "Canada vs. US", there was no human legible difference ...

I tried searching all over for a python module that would automatically format us to to RFC 2616/822 per the HTTP header date requirements, but surprising nothing exists!  Not even the http module has something.  There are several functions that do the OPPOSITE (from an http header, parse out the date), but nothing to create it.
Looking at the existing string format we have, this format seems to align as per RFC 2616 and per the semantics of RFC 822:
>>> fmt='%a, %d %b %Y %H:%M:%S'

(less the  GMT suffix required)
but/however AGAIN %a and %b are tied to the system's locale. :(, so this is subject to breakage
There's really no way around this.
https://docs.python.org/3/library/time.html#time.strftime
Python's only map to "weekday abbreviated name" and "month abbreviated name" requires locale set.
(this is, at the root, the problem as I see it)

as a side-note, for the time conversion itself, I think we're into one of two solutions
(A)
https://docs.python.org/3/library/datetime.html#datetime.datetime.utcnow
>>> from datetime import datetime
>>> from time import strftime
datetime.utcnow().strftime(fmt) + ' GMT'
'Thu, 05 Sep 2019 12:14:05 GMT'

(B)
https://docs.python.org/3/library/time.html#time.gmtime
>>> from time import gmtime, strftime
>>> strftime(fmt, gmtime()) + ' GMT'
'Thu, 05 Sep 2019 12:08:06 GMT'

Which one to use?  Well gmtime() considers DST, but utcnow() does not ...
https://stackoverflow.com/questions/25022745/why-is-there-1-hour-difference-between-gmtime-and-utcnow-datetime
IMO, we should keep the change in #30 , but add/fix it for the try/except + warning. (if a system DOES NOT have a locale, then log a warning, as it is REQUIRED to build the HTTP header).
-> @stianaske  if you concur, I will submit a PR to fix everything up
My proposal is:

Continue with #30 's solution, but add try/except handling.
If we detect the system does not have the en_US locale installed, log a warning
Use either gmtime() or utcnow() (TBD)

@Santobert , the babel package looks useful too, thanks for sharing that. I experimented with it.
http://babel.pocoo.org/en/latest/dates.html
Questions

do you know tho if it can simulate a locale EVEN IF the system doesn't have the target locale installed?
one bit seems broken heh; https://github.com/python-babel/babel/issues/664 (or i did something wrong)

But on all my systems (Linux and Windows with different location locales) datetime.utcnow() always returns english representations of dates.

PS: the representation of dates is determined by the format time stuff (has nothing to do with datetime.utcnow() as that is returning a datetime object :)

Thanks @fermulator for digging into this. Are you sure that setting the systems locale doesn't have any side effects? Is the locale bound to the session or can it influence other programs behavior?
I'm still not happy with setting the locale, but I see that there is possibly no other way.
To simulate a locale I would consider the pytz package, but I'm not an expert.
https://pypi.org/project/pytz/
Unfortunately I can't help you at the moment because I'm quite busy, but I prefer solution C.

i agree setting the locale is risky (in fact it is riskier than I thought)

it does not affect the whole system (as I knew)
however it is not thread safe, as it affects the entire program (instance of python running)

Read: https://docs.python.org/3/library/locale.html#background-details-hints-tips-and-caveats
, so if there are other major systems using pybotvac (i.e. home-assistent), and they have threads, and they too rely on locale in some way, we could screw them up;
I was fiddling with pytz a month ago, but ran into a blocker that I can't remember ... retrying
>>> import pytz
>>> pytz.timezone('GMT')
<StaticTzInfo 'GMT'>
>>> pytz.timezone('UTC')
<UTC>

I remember now, I can't figure out how to get a raw datetime object for "utcnow()" that is easily usable into the datatime constructor...
their example is
>>> utc_dt = datetime(2002, 10, 27, 6, 0, 0, tzinfo=utc)
>>> loc_dt = utc_dt.astimezone(eastern)
>>> loc_dt.strftime(fmt)
'2002-10-27 01:00:00 EST-0500'

but we need the date-time of NOW (in UTC or GMT), and I'm also not sure how datetime.strftime() behaves if the tzinfo is set to something, and it doesn't match the system locale :(

I'm not going to spend any more time fiddling until I get a clear set of answers/requirements from Neato @ostinelli . https://github.com/stianaske/pybotvac/issues/45#issuecomment-528327972

I've closed the #48 in order to create a new pr with the correct solution. I was digging a bit around in python datetime stuff. Big thanks to @fermulator for his great comments. That helped me a lot.
I see two different approaches:
https://github.com/Santobert/pybotvac/blob/avoid_missing_locale_1/pybotvac/robot.py#L248
This approach uses the babel package. We have to create a datetime object with datetime.now(timezone.utc). This is just a more advanced version of datetime.utcnow(), that cares about tzinfo. Babel's format_datetime() function creates the string from it using english abbreviations. The format EEE, dd LLL yyyy hh:mm:ss matches the given RFC.
https://github.com/Santobert/pybotvac/blob/avoid_missing_locale_2/pybotvac/robot.py#L248
The other approach uses the native package email.utils that has a function format_datetime() as well. This function creates a formatted string based on a datetime object that has utc as tzinfo. The function creates the string according to RFC 2822 that is also based on RFC 822 and RFC 1123. You can read about the differences here.
What do you think about it? Which of these approaches do you guy like? Do you see any problems?

I will create a PR as soon as we have decided on one of the given solutions.

Going with the solution in PR from @Santobert for now. Reopen if you experience any issues with this.

Great @Santobert in #52, i tested your changes locally (hacked in the patch/diff), and it seems to work!
for robot in Account('username', 'password').robots: print(robot)
Your 'boyle-ORIGINAL' robot is offline.
Name: boyle, Serial: OPS26517-SNIP, Secret: <SNIP> Traits: ['maps']

Once we rebuild and re-release i'll be sure to track the fix doesn't regress anything.


Infix expression evaluator added

Have you read the Contributing Guidelines on Pull Requests?
(Yes)
Checklist

[x] I've read the contribution guidelines.
[x] I've checked the issue list before deciding what to submit.
[x] I've edited the README.md and link to my code.

Related Issues or Pull Requests
(#5656 )

Please review @ankitaggarwal23 @iamrajiv @HarshCasper @atarax665 @gat786

All requested changes done @ankitaggarwal23


[WIP] Add initial integration tests for SignImage

The purpose of this PR is to add the integration tests for SignImage. The integration tests for SignFile will be added after #29 is merged.
The integration tests are based on the following workflow:

Run Docker Registry (https://github.com/distribution/distribution) as a container

The registry doesn't have any authentication because it is not exposed to the Internet or outside the ProwJob

Build an empty image based on scratch and push it to the local registry
Generate cosign key used to sign the image

This PR doesn't use keyless because that would require running in some trusted environment (e.g. Cloud Build or GitHub Actions)

Use the SignImage function to sign the image

TODO:

Verify is the image signed

Do we want to use the VerifyImage function or do we want to do that in some other way?

Disable pushing to transparency logs (ref: https://github.com/kubernetes-sigs/release-sdk/pull/29#issuecomment-1029975523)

I'm not sure how to do that

Relevant to #24
/assign @saschagrunert @cpanato @puerco @palnabarun
cc @kubernetes-sigs/release-engineering

/test all

/test all

/test all

/test all

/test pull-release-sdk-integration-test

Thanks @xmudrii , great work!!
/lgtm


golang/website: erratum in checksum database documentation

There appears to be an error in the [checksum database documentation:

The checksum database allows for global consistency and reliability for all publicly available module versions. It makes untrusted proxies possible since they can’t serve the wrong code without it going unnoticed. (emphasis added)

The text should read: "It makes untrusted proxies impossible" or "It deters
untrusted proxies".
What is the URL of the page with the issue?
https://go.dev/ref/mod#checksum-database

The website is correct, you no longer have to trust the proxy as you can verify the contents yourself.


Fix deprecation warnings

Description
There are currently lots of deprecation warning when running the test suite. Some of them come from upstream dependencies. But many are from conda-store. This PR aims to resolve some of them.
not fixed:

datetime.datetime.utcnow is deprecated, should be replaced with datetime.datetime.now(datetime.UTC). However, this is not supported by python 3.10. Will address this when we drop python 3.10 support

Pull request checklist

[x] Did you test this change locally?
[x] Did you update the documentation (if required)?
[x] Did you add/update relevant tests for this change (if required)?

I did not go through all the changes in detail but this is much appreciated.

datetime.datetime.utcnow is deprecated, should be replaced with datetime.datetime.now(datetime.UTC). However, this is not supported by python 3.10. Will address this when we drop python 3.10 support

Can you add a TODO note on this in the code so we do not forget to do this when needed


Allow application setup to be provided by any function

Currently, in the Python API, user's use Python decorators on a variety of required Python API elements such as encoders, decoders etc.
From a user perspective, application_setup stands out as oddly different. It has to have a specific name. Technically, it's different than a partition function or state computation but from an end user perspective, that distinction is would probably seems arbitrary. We should look into using a decorator like:
@wallaroo.application_setup

My thought here is that we have a global variable called in the wallaroo module called application_setup_fn. When you apply the @wallaroo.application_setup decorator to a function, it sets that variable to point to the function. Machida then knows to call the wallaroo.application_setup_fn function to do application setup. Is there another way to do this? If so, I'm open to hearing about it.


feat: add zoom buttons

Add zoom buttons on right side of card

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


After settings Files as default file manager, i am facing issue while opening control panel

Description
After settings Files as default file manager.
Whenever i open control panel 'Files' automatically open and close after few seconds.
Steps To Reproduce

open control panel
then you will notice Files open and close after few seconds

https://user-images.githubusercontent.com/97865710/151767726-0e1b17f6-d776-403d-81be-3da018859502.mp4
Expected behavior
I don't like that Files open when i am trying to open control panel. so please fix this issue.
Files Version
<IP_ADDRESS>
Windows Version
Window 11 21H2 22000.469
Relevant Assets/Logs
https://user-images.githubusercontent.com/97865710/151767726-0e1b17f6-d776-403d-81be-3da018859502.mp4

That is expected, as Files can't show the control panel. We're looking to avoid opening Files though.


Access Token no more returned by openidc.authenticate if renew_access_token_on_expiry is set to false

The just issued 1.5.0 version introduces a new parameter named renew_access_token_on_expiry.
When testing the behavior of this new param, I faced the following issue: if this parameter is set to false, then the Access Token is no longer returned as output data of the openidc.authenticate function.
My analysis is the following:

The pure login process still works fine, until the redirection to the redirect_ui. At that stage, the Access Token is correctly retrieved and stored in the session.
When the last redirect to the original uri is done, the openidc.authenticate is called again: processing of this method first checks whether it is the redirect_uri (no, it is not); then if it is the logout uri (no, it is not) => the new code starting in line 955 is run!
As the renew_access_token_on_expiry is set to false, the try_to_renewlocal varaiable is false, so the if statement of line 957 if never evaluated to true
So the openidc_access_token function is never called, and the access_token local variable remains nil...
... So Access Token can never be returned as output data of openidc.authenticate (lines 1003 to 1011).

Thanks for reporting. Can you try this branch: https://github.com/pingidentity/lua-resty-openidc/compare/fix-access-token-return and let us know if that fixes it?

ahh, sprry about that. Fix looks good to me.

Works better: Access Token is now available... but I'm still not sure the library behaves in a proper way: when the Access Token expires, the (expired) Access Token is still returned as output data of the openidc.authenticate => the access to the resource looks still allowed, unless the caller explicitly checks the expiration date of the token !!
My feeling is that in case the Access Token expires and it is not requested to refresh it, then openidc.authenticate shall return a non nil err.
In terms of implementation, my 2 cents: why do you manage the renew_access_token_on_expiry in the openidc.authenticate function? It looks to me more obvious to manage it in the openidc_access_token function because this function has the clear responsibility to deliver either a valid Access Token (the non-expired one available in the session, or a refreshed one in case the token has expired and the renew_access_token_on_expiry is set to true), or nil in case of expired token with renew_access_token_on_expiry set to false or in case of error getting the token.
Would need to rollback the updates done in openidc.authenticate and move the try_to_renew stuff in the openidc_access_token function, after the check of the expiration time.

I'm leaving this to @bodewig but I would like to emphasize that the expires_in as returned in the authentication response is merely a hint and should not be used in an "absolute" way, but just to optimize the user experience. At any time an access token can expire or be invalidated by the authorization server.

when moving the decision into openidc_access_token it would also apply to openidc.access_token unless we make it an explicit parameter.
try_to_refresh not only controls whether to refresh the token but also what happens when the token expires in authenticate. If it is true when the token expires then authenticate re-runs the authorization flow, if its false this will not happen.
A slightly amended fix is in c131305 which would also allow us to use the flag in openidc.auccess_token if we wanted to.

agreed, you approach looks better

@pamiel what my change does not do is returning err in the case when the token expires. This is to be consistent with the behavior of 1.4.1 which also wouldn't return an error if the token expired and no refresh token was available.

@bodewig I'm in line with your last update: try_to_refresh evaluated in openidc.authenticate but test of expiration done in openidc_access_token function.
And it now takes into account the access_token_expires_leeway which was not the case before.
For the fact that it does not return an err: I understand that it is backward compatible... but still, I think it would have been better to raise en err here... Anyway, we are now able to check if res.access_token is nil or not => it is manageable at library caller side.

OK, fix merged to master.


update gf180mcu_fd_sc_mcu7t5v0 commit id

The recent PDK refactor of the standard cells is going to make this obsolete, so I'm going to not merge this, but wait until that change is merged into the standard cell repositories, then run the JSON file update.

open_pdks is now updated with all the latest library commits in the JSON file, so I'm closing this pull request.


After uploading a file using Microsoft.Common.FileUpload, the UI notification displays an invalid URL

I have added a Microsoft.Common.FileUpload field to the uiDefinitions.json file of my Managed App app.zip file. I set the uploadMode to "url".
I then added a Managed App Definition to my Service Catalog, and tried deploying it. The UI displays the File field as expected, and I can select the required file using the file dialog.
The file is rather small (31KB), and I immediately get a UI notification that the upload was completed, along with a URL. That URL is not working. When I try to access it, I keep getting a ResourceNotFound reply.
I have just continued the deployment, and looked at the input parameters that were sent from my uiDefinition to my mainTemplate. Over there, the URL contains multiple query params, which I guess are needed for successfully accessing the uploaded temporary file. With this full URL I am able to access it.
So I guess the main issue is with the UI notification displaying an incomplete URL after the upload.

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

ID: a6a29e65-4f77-19b1-d132-acc76354ca1c
Version Independent ID: 8eade943-217c-8277-e325-802f13df4f0d
Content: Azure FileUpload UI element
Content Source: articles/managed-applications/microsoft-common-fileupload.md
Service: managed-applications
GitHub Login: @tfitzmac
Microsoft Alias: tomfitz

@ATGardner Thanks for the feedback. We are actively investigating and will get back to you soon.

@tfitzmac any thoughts on the incomplete URL post-upload?

@ATGardner - The displayed URL is the full URL but it is protected so the contents of the file are not available to everyone. The query string parameters are the SAS token that is required to access the file. Given that the output URL includes the SAS token, your template can access the file for any information that is needed during deployment. Are you trying to access the file outside of the deployment process?

I have added an additional note about the SAS token that is included with the output URL. It should get published this morning.
#please-close

Thank you for your follow up.
In my humble opinion, there is no special need to show the URL at all. A simple "upload completed" seems enough to me. But if a URL is being displayed, it should be a valid one that can easily be checked to work.
My main problem was that I was confused by seeing the URL in the notification, and not being able to use it to check the uploaded file. After I tried several times, and on several different deployment attempts, to see if the file was actually "there", I just decided to go on with the deployment. Only then I noticed that my custom script is getting a somewhat different URL, and then I checked the Managed App input parameters, and saw that it contained this SAS token. So it was more confusing than actually causing any real problem.
Since (a.) the admin is the one uploading the file and (b.) the admin can later see the full URL (with the SAS token) in the managed app input params screen, I don't see why the first notification can't just show the URL with the token in the first place. Not showing any URL at all (in the notification) seems reasonable as well, to me.

@ATGardner valid feedback. We will review internally for future consideration. Thanks again. We will now close this request.
@tfitzmac  - FYI

@ATGardner - I want to add a little explanation. I understand the confusion because you are seeing two processes. There is the Managed Application process, and the general portal process.
The notification is a general feature of the portal. The portal shows the notification any time I upload a file to my storage account. It doesn't know how I am planning to use the new file, so it just displays the base URL. The SAS token contains an expiration value so generating a SAS token and displaying it in the notification would not be helpful if I had no intention of accessing it soon. Plus, it creates an unnecessary security issue because the file would then be available to any one who retrieves the URL with the token.
The managed application process creates the SAS token and adds it to the base URL because it knows it needs to immediately access the file for deployment.
I hope that clarifies a bit why the token is not displayed in the original notification.

It does indeed help me understand why there is this discrepancy between the two URLs. I did not realize these are two separate and distinct processes.
Maybe in that case, the simplest solution would be just to include this information in the Microsoft.Common.FileUpload documentation - to let future users know that the URL they see in the notification will not be usable by them, but the ARM template will get a revised URL which will be accessible during deployment.


Branch/add class and objects

Update
Added

Person Class.
Student Class.
Teacher Class.

Hi @ClintonYounge
Can we talk on Slack?


Symbol.asQuotes doesn't work as advertised

Compiler version
3.4.2
Minimized code
Diff: https://github.com/typelevel/cats-tagless/pull/547/files?w=1#diff-19baba9f9fc14acd2200e21ad491f2871a69edbae3de81d0d3e7eec2c88899c5
CI: https://github.com/typelevel/cats-tagless/actions/runs/9236004309/job/25411405213?pr=547
Here is my change:
       body = {
         case (method, tpe, body) if tpe =:= B =>
+          given Quotes = method.asQuotes
           '{
             @tailrec def step(x: A): B =
               ${ body.replace(a, '{ x }).asExprOf[Either[A, B]] } match
                 case Left(a) => step(a)
                 case Right(b) => b
             step($a)
-          }.asTerm.changeOwner(method)
+          }.asTerm

The test which fails to compile:
  trait TestAlgebra[T] derives FlatMap:
    def abstractEffect(a: String): T
    def concreteEffect(a: String): T = abstractEffect(a + " concreteEffect")
    def abstractOther(a: String): String
    def concreteOther(a: String): String = a + " concreteOther"
    def withoutParams: T

Output
[error] -- Error: /home/runner/work/cats-tagless/cats-tagless/tests/src/test/scala-3/cats/tagless/tests/autoFlatMapTests.scala:39:31
[error] 39 |  trait TestAlgebra[T] derives FlatMap:
[error]    |                               ^
[error]    |Exception occurred while executing macro expansion.
[error]    |java.lang.AssertionError: assertion failed: Tree had an unexpected owner for method step
[error]    |Expected: method withoutParams (cats.tagless.tests.autoFlatMapTests$.TestAlgebra$._$_$$anon._$$anon$macro$3.withoutParams)
[error]    |But was: method concreteEffect (cats.tagless.tests.autoFlatMapTests$.TestAlgebra$._$_$$anon._$$anon$macro$3.concreteEffect)
[error]    |
[error]    |The code of the definition of method step is
[error]<EMAIL_ADDRESS>def step(x: A): B = f.apply(x).withoutParams match {
[error]    |  case scala.Left(a) =>
[error]    |    step(a)
[error]    |  case scala.Right(b) =>
[error]    |    (b: B)
[error]    |}
[error]    |
[error]    |which was found in the code
[error]    |{
[error]    |  @scala.annotation.tailrec def step(x: A): B = f.apply(x).withoutParams match {
[error]    |    case scala.Left(a) =>
[error]    |      step(a)
[error]    |    case scala.Right(b) =>
[error]    |      (b: B)
[error]    |  }
[error]    |  step(`a₂`)
[error]    |}
[error]    |
[error]    |which has the AST representation
[error]    |Inlined(Some(TypeIdent("MacroFlatMap$")), Nil, Block(List(DefDef("step", List(TermParamClause(List(ValDef("x", Inferred(), None)))), Inferred(), Some(Match(Inlined(None, Nil, Select(Inlined(Some(TypeIdent("MacroFlatMap$")), Nil, Apply(Select(Inlined(None, Nil, Ident("f")), "apply"), List(Inlined(None, Nil, Ident("x"))))), "withoutParams")), List(CaseDef(TypedOrTest(Unapply(TypeApply(Select(Ident("Left"), "unapply"), List(Inferred(), Inferred())), Nil, List(Bind("a", Wildcard()))), Inferred()), None, Block(Nil, Apply(Ident("step"), List(Ident("a"))))), CaseDef(TypedOrTest(Unapply(TypeApply(Select(Ident("Right"), "unapply"), List(Inferred(), Inferred())), Nil, List(Bind("b", Wildcard()))), Inferred()), None, Block(Nil, Typed(Ident("b"), Inferred())))))))), Apply(Ident("step"), List(Inlined(None, Nil, Ident("a"))))))
[error]    |
[error]    |
[error]    |
[error]    |Tip: The owner of a tree can be changed using method `Tree.changeOwner`.
[error]    |Tip: The default owner of definitions created in quotes can be changed using method `Symbol.asQuotes`.

Expectation
I expect it to compile the same way it does if I use changeOwner. It's even one of the tips:

Tip: The default owner of definitions created in quotes can be changed using method Symbol.asQuotes

Hi joroKr21! After printing the trees in cats-tagless I see everything behaving correctly:

(...)
[info]                       final lazy given val q2: scala.quoted.Quotes =
[info]                         given_DeriveMacros_q_type.q.reflect.SymbolMethods.
[info]                           asQuotes(method)
[info]                       q.reflect.asTerm(
[info]                         '{
[info]                           {
[info]                             @tailrec def step(x: A): B =
[info]                               ${
[info]                                 {
[info]                                   def $anonfun(using
[info]                                     evidence$8: scala.quoted.Quotes):
[info]                                     scala.quoted.Expr[Either[A, B]] =
[info]                                     given_DeriveMacros_q_type.q.reflect.
[info]                                       TreeMethods.asExprOf(
[info]                                       given_DeriveMacros_q_type.replace(body)(
[info]                                         a, '{x}.apply(evidence$8))
[info]                                     )[Either[A, B]](
[info]                                       scala.quoted.Type.of[Either[A, B]](
[info]                                         evidence$8)
[info]                                     )
[info]                                   closure($anonfun)
[info]                                 }
[info]                               } match
[info]                                 {
[info]                                   case Left.unapply[A, B](a @ _):Left[A, B] =>
[info]                                     step(a)
[info]                                   case Right.unapply[A, B](b @ _):Right[A, B]
[info]                                      =>
[info]                                     b:B
[info]                                 }
[info]                             step(
[info]                               ${
[info]                                 {
[info]                                   def $anonfun(using
[info]                                     evidence$9: scala.quoted.Quotes):
[info]                                     scala.quoted.Expr[A] = a
[info]                                   closure($anonfun)
[info]                                 }
[info]                               }
[info]                             )
[info]                           }
[info]                         }.apply(q2)
(...)

(q2 is the Quotes object applied to the splice, which is what we want)

The issue you are having stems from changeOwner and given Quotes behaving slightly differently by design.
Supplying correct given Quotes guarantees that every symbol defined as part of the quoted code block has its owner set to a pointed symbol.
Meanwhile changeOwner(symbol) goes through the whole tree and replaces every nonlocal owner with symbol.
With the first method we still have to set the correct owners inside splices, with the second those will likely be corrected.
So in our case, while the def step does have a correct owner set, the stuff returned by DeriveMacros.replace does not. The (correct) Quotes object supplied by the splice is ignored, and instead the previous quotes object passed to DeriveMacros is used:
def replace(from: Expr[?], to: Expr[?]): Term =
  ReplaceTerm(from.asTerm, to.asTerm).transformTerm(term)(Symbol.spliceOwner)

You could rewrite the replace method to something like
def replace(from: Expr[?], to: Expr[?])(using quotes: Quotes): quotes.reflect.Term =
  import quotes.reflect._
  ReplaceTerm(from.asTerm, to.asTerm).transformTerm(term)(Symbol.spliceOwner)

to use the correct quotes object supplied by the splice (it will not compile yet, but the point is to use a correct symbol).

Hmm I will try it but that sounds strange, because the error is explicitly about the owner of step:
[error]    |java.lang.AssertionError: assertion failed: Tree had an unexpected owner for method step
[error]    |Expected: method withoutParams (cats.tagless.tests.autoFlatMapTests$.TestAlgebra$._$_$$anon._$$anon$macro$3.withoutParams)
[error]    |But was: method concreteEffect (cats.tagless.tests.autoFlatMapTests$.TestAlgebra$._$_$$anon._$$anon$macro$3.concreteEffect)

For context, body.replace(a, '{ x }) doesn't introduce any definitions.

Ah, you are right, I now replaced step implementation with ??? and  those errors are still thrown. I will have to investigate this further. Thank you for reporting!

Self-contained minimisation:
Macro_1.scala

import scala.annotation.experimental
import scala.quoted.*
import scala.annotation.tailrec

@experimental
object MacroFlatMap:

  inline def derive[F[_]]: FlatMap[F] = ${ flatMap }

  def flatMap[F[_]: Type](using Quotes): Expr[FlatMap[F]] = '{
    new FlatMap[F]:
      def tailRecM[A, B](a: A)(f: A => F[Either[A, B]]): F[B] =
        ${ deriveTailRecM('{ a }, '{ f }) }
  }

  def deriveTailRecM[F[_]: Type, A: Type, B: Type](
      a: Expr[A],
      f: Expr[A => F[Either[A, B]]]
  )(using q: Quotes): Expr[F[B]] =
    import quotes.reflect.*

    val body: PartialFunction[(Symbol, TypeRepr), Term] = {
        case (method, tpe) => {
          given q2: Quotes = method.asQuotes
          '{
            def step(x: A): B = ???
            ???
          }.asTerm//.changeOwner(method)
        }
      }

    val term = '{ $f($a) }.asTerm
    val name = Symbol.freshName("$anon")
    val parents = List(TypeTree.of[Object], TypeTree.of[F[B]])

    extension (sym: Symbol) def overridableMembers: List[Symbol] =
      val member1 = sym.methodMember("abstractEffect")(0)
      val member2 = sym.methodMember("concreteEffect")(0)
      def meth(member: Symbol) = Symbol.newMethod(sym, member.name, This(sym).tpe.memberType(member), Flags.Override, Symbol.noSymbol)
      List(meth(member1), meth(member2))

    val cls = Symbol.newClass(Symbol.spliceOwner, name, parents.map(_.tpe), _.overridableMembers, None)

    def transformDef(method: DefDef)(argss: List[List[Tree]]): Option[Term] =
      val sym = method.symbol
      Some(body.apply((sym, method.returnTpt.tpe)))

    val members = cls.declarations
      .filterNot(_.isClassConstructor)
      .map: sym =>
        sym.tree match
          case method: DefDef => DefDef(sym, transformDef(method))
          case _ => report.errorAndAbort(s"Not supported: $sym in ${sym.owner}")

    val newCls = New(TypeIdent(cls)).select(cls.primaryConstructor).appliedToNone
    Block(ClassDef(cls, parents, members) :: Nil, newCls).asExprOf[F[B]]

Test_2.scala
import scala.annotation.experimental

@experimental
object autoFlatMapTests:
  trait TestAlgebra[T] derives FlatMap:
    def abstractEffect(a: String): T
    def concreteEffect(a: String): T = abstractEffect(a + " concreteEffect")

object FlatMap {
  @experimental inline def derived[F[_]]: FlatMap[F] = MacroFlatMap.derive
}
trait FlatMap[F[_]]{
  def tailRecM[A, B](a: A)(f: A => F[Either[A, B]]): F[B]
}


Reset work 5328 to first deposited version

The depositor tried to modify this item after cataloging was done and a catkey assigned, so this got hung up in the "depositing..." state.  Please reset this item back to the first deposited version if possible and stop the spinning.
The depositor needed to correct a misspelling, which I have directed him to request a fix for by his cataloger elsewhere so that the SDR record is properly updated.

This is druid: yn200hw8896

Looks good. Thanks.


Make sure that the code is correctly tabbed after pasting

https://github.com/SkEditorTeam/SkEditor/assets/79092746/dac8bf47-4462-48e8-88ac-181a77d70cb7

Added! Thanks 👍


[Bug] An exception has been thrown during the rendering of a template ("Undefined constant "CURL_SSLVERSION_TLSv1_2"")

Describe the bug
I am getting an error message when trying to access the admin area after updating. The frontend works, but accessing admin areas leads to this error.

How to reproduce

Have old version.
Update to newest version.
Go to https://yourdomain.com/admin or any other admin page, it gives this error.

Expected behavior
I expected to be able to access my admin area after the update to edit some styling.
Screenshots

FOSSBilling version
0.6.8 ---> 0.6.9 Auto Update
FOSSBilling instance ID
1302c39c-b6ae-493b-ac39-7e632d82fdc5
Module version
No response
Device
Desktop, Smartphone
Information
Device: Mac and Iphone
OS: MacOS and iOS
Browser: Edge on both
Additional context
No response

Your server is running a version of cURL that is at least 10 years old.
It needs to be at the oldest version 7.34.0 which added in the CURL_SSLVERSION_TLSv1_2 constant.
The specifics will depend on your server installation, but you'll need to update the cURL package on your server and then update / rebuild the PHP extension for it

Hello,
I have updated PHP and cURL and the error remains. Please advise.
I now can no longer access it through my terminal and I am safe mode
accessing it. This update broke my system and I may have to roll it back.
Please advise what info you need to aide me. Thank you so much!
Isaac
On Fri, Jan 19, 2024 at 12:25 AM Belle Aerni @.***>
wrote:

Your server is running a version of cURL that is at least 10 years old.
It needs to be at the oldest version 7.34.0 which added in the
CURL_SSLVERSION_TLSv1_2 constant.
The specifics will depend on your server installation, but you'll need to
update the cURL package on your server and then update / rebuild the PHP
extension for it
—
Reply to this email directly, view it on GitHub
https://github.com/FOSSBilling/FOSSBilling/issues/2087#issuecomment-1899792206,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYR32V5HZ3QSY42CMZWM72LYPH7WFAVCNFSM6AAAAABCBJCAKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJZG44TEMRQGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

I don't know what server OS you are running but managing a server doesn't fall in Fossbilling scope...

I understand that,
What I stated was that I had to roll back the update. I did not ask for
help with the server.
My request for assistance was regarding the update of cURL and PHP which
still didn’t work. I have rolled it back to the previous version and
everything works, but every time I update to the new FOSS and manually
rebuild cURL and PHP to the right version it still does not work. That was
my request, because I did what you suggested and it still didn’t work.
The information I provided was to support my claim that the new update is
breaking things.
Please let me know if there’s any more info I can provide for you to help
advise me as to potential next steps. I know it’s open source and I’m not
paying, so I don’t expect an immediate resolution. Just some help with
getting it handled.
Thank you!
On Sun, Jan 21, 2024 at 6:40 AM Jaap Marcus @.***>
wrote:

I don't know what server OS you are running but managing a server doesn't
fall in Fossbilling scope...
—
Reply to this email directly, view it on GitHub
https://github.com/FOSSBilling/FOSSBilling/issues/2087#issuecomment-1902602201,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AYR32V6VZZ5BGBXL5E5G3KTYPT5DBAVCNFSM6AAAAABCBJCAKSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMBSGYYDEMRQGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

The information I provided was to support my claim that the new update is breaking things.

There honestly isn't any bug with the new release. Anything since version 0.6.0 will run into this error if the cURL version isn't sufficient. Collectively those releases have close to 1500 downloads (some of these are upgrades, some fresh installs).
Of all of those downloads, only 3 people have reported this error including yourself and the other two people were able to resolve it by updating cURL and the cURL PHP extension. There is no bug on our end, just a configuration issue on your server.
You haven't specified what your server is so I am going to assume that it's a CentOS server running CWP in which case I have a few suggestions for you:

I'd highly encourage you to start looking into upgrade paths for your OS as CentOS is discontinued. If you have anything other than CentOS 7, you're already outside of the provided maintenance update time-frame. (This includes CentOS 8 which was dropped 2 years ago and is still listed as a supported OS on the CWP site when it really shouldn't be used).
Verify that you actually rebuilt the correct version of PHP. If you have 3 or 4 different versions on your server and only updated one, the rest will still be out of date and that may be what your FOSSBilling installation is running on.
CWP has some documentation on how to update cURL to a later version because they know this is likely to be an issue. These steps are here on their wiki. Their guide as written should update you to cURL version 7.88.0 which still a year old, it should be more than recent enough to function correctly with modern software.
You could try asking Mike on our forum how he was able to resolve the issue for himself. The original post can be found here. The forum allows you to sign in via GitHub, so you don't need to create a new account for it.

Outside of that, I'm not really sure what to tell you.
Our GitHub issues aren't really supposed to be used as a forum / tech support so if you can hop onto the forum or our Discord we can have a bit more of a back-and-forth conversation trying to identify where you're having issues, but as-is this bug report isn't a bug and is non-actionable for us.
If you are going to join one so we can help easier, I personally would suggest using the Discord over the forum. Both work, but 99% of the time I am the only person responding on the forum and I only periodically check it unlike the Discord server which I look at regularly since I have Discord on my phone.

I'm going to close this as it's been a few weeks and we've already provided how to resolve the problem.


Things to add to dungeon loot

Refractory bricks to lower floors
Bow drills
Cogs and sawblades
Baked food from Pyrotech

Diamond and iChisels

Tarred bales, dried fiber, hay bales


Simplify/Enforce LayoutStyle.Absolute when X, Y, Width, and/or Height are null or Absolute()

I keep finding latent bugs and/or extra code in v1 relative to this topic.
The current API docs for ComputedLayout read:

IOW, these members are to be ignored if Absolute is set. However, in reality, nobody keeps this clear in their heads and there's tons of code where Views with Absolute get these members set using absolute values (e.g. view.X = 3).
Plus, Dim and Pos make this easy with their constructors that take int.
I propose the following for v2 to simplify and clarify all of this: View.LayoutStyle is no longer implemented as a field (the View.layoutStyle private member), but a calculated property.
v1:
		public LayoutStyle LayoutStyle {
			get {
				return layoutStyle;
			}
			set {
				layoutStyle = value;
				SetNeedsLayout ();
			}
		}

v2:
		/// <summary>
		/// Gets or sets what <see cref="Terminal.Gui.LayoutStyle"/> the view is using.
		/// </summary>
		/// <remarks>
		/// <para>
		/// Setting this property to <see cref="Terminal.Gui.LayoutStyle.Absolute"/> will cause <see cref="Frame"/> to determine the size and position of the view. <see cref="X"/> and <see cref="Y"/> will be
		/// set to <see cref="Dim.DimAbsolute"/> using <see cref="Frame"/>.
		/// </para>
		/// <para>
		/// Setting this property to <see cref="Terminal.Gui.LayoutStyle.Computed"/> will cause the view to use the <see cref="LayoutSubviews"/> method to
		/// size and position of the view. If either of the <see cref="X"/> and <see cref="Y"/> properties are `null` they will be set to <see cref="Pos.PosAbsolute"/> using
		/// the current value of <see cref="Frame"/>.
		/// If either of the <see cref="Width"/> and <see cref="Height"/> properties are `null` they will be set to <see cref="Dim.DimAbsolute"/> using <see cref="Frame"/>.
		/// </para>
		/// </remarks>
		/// <value>The layout style.</value>
		public LayoutStyle LayoutStyle {
			get {
				if ((X == null || X is Pos.PosAbsolute) &&  (Y == null || Y is Pos.PosAbsolute) &&
					(Width == null || Width is Dim.DimAbsolute) && (Height == null || Height is Dim.DimAbsolute)) {
					return LayoutStyle.Absolute;
				}
				return LayoutStyle.Computed;
			}
			set {
				switch (value) {
				case LayoutStyle.Absolute:
					X = Frame.X;
					Y = Frame.Y;
					Width = Frame.Width;
					Height = Frame.Height;
					break;

				case LayoutStyle.Computed:
					if (X == null) X = Frame.X;
					if (Y == null) Y = Frame.Y;
					if (Width == null) Width = Frame.Width;
					if (Height == null) Height = Frame.Height;
					break;
				}

				SetNeedsLayout ();
			}
		}

The implications of this are fairly straightforward, but there are sure to be some subtle gotchas in existing code and architecture.

I think once this is done, there's no need for X, Y, Width, or Height to ever be null. They are either of type Pos/Dim.Absolute or another. Their setters should throw InvalidArgumentException if value is null.

Thoughts? Comments?

			v = new View (frame.X, frame.Y, "v");
			Assert.True (v.LayoutStyle == LayoutStyle.Absolute);
			// BUGBUG: v2 - I think the default size should be 0,0
			Assert.Equal (new Rect(frame.X, frame.Y, 1, 1), v.Frame);

BUGBUG: v2 - I think the default size should be 0,0

The reason for this is the call to this (TextFormatter.CalcRect (x, y, text), text) { }
		[Fact]
		public void AbsoluteLayout_Change_Height_or_Width_NotAbsolute ()
		{
			var v = new View (Rect.Empty);
			v.Height = Dim.Fill ();
			v.Width = Dim.Fill ();
			Assert.True (v.LayoutStyle == LayoutStyle.Absolute);  // BUGBUG: v2 - Changing the Height or Width should change the LayoutStyle
		}

		[Fact]
		public void AbsoluteLayout_Change_X_or_Y_NotAbsolute ()
		{
			var v = new View (Rect.Empty);
			v.X = Pos.Center ();
			v.Y = Pos.Center ();
			Assert.True (v.LayoutStyle == LayoutStyle.Absolute); // BUGBUG: v2 - Changing the Height or Width should change the LayoutStyle
		}

		[Fact]
		public void AbsoluteLayout_Change_X_or_Y_Null ()

BUGBUG: v2 - Changing the Height or Width should change the LayoutStyle

LayoutStyle.Absolute is immediately set if a Rect is provided, no matter is empty or not. The reason for the set of a Pos/Dim not changing the LayoutStyle is to avoid throwing an exception if the ForceValidatePosDim is true, which you can be tweaked by set to LayoutStyle.Absolute to change the value and set again to LayoutStyle.Computed.
			// BUGBUG: v2 - If all of X, Y, Width, and Height are null or Absolute(n), isn't that the same as LayoutStyle.Absoulte?
			v.X = null;
			v.Y = null;
			v.Height = null;
			v.Width = null;
			Assert.True (v.LayoutStyle == LayoutStyle.Absolute); // We never automatically change to Absolute from Computed??

If ForceValidatePosDim behavior doesn't matter you can advance to set automatically the LayoutStyle by setting the Pos/Dim.
		[Fact]
		public void AbsoluteLayout_Layout ()
		{
			var superRect = new Rect (0, 0, 100, 100);
			var super = new View (superRect, "super");
			Assert.True (super.LayoutStyle == LayoutStyle.Absolute);
			var v1 = new View () {
				X = 0,
				Y = 0,
				Width = 10,
				Height = 10
			};
			// BUGBUG: v2 - This should be LayoutStyle.Absolute
			Assert.True (v1.LayoutStyle == LayoutStyle.Computed);

BUGBUG: v2 - This should be LayoutStyle.Absolute

Based on your suggestion, yes, but based on the constructor, no.

@tig I think you are in the right direction. Please go ahead. Thanks.


az --version shows there are available updates when there is actually not

Related command
az --version
az upgrade
Describe the bug
Azure CLI has dropped support for some environments:

Ubuntu < 18.04, Debian < 10 (https://github.com/Azure/azure-cli/pull/22170)
CentOS 7, RHEL 7, SUSE (https://github.com/Azure/azure-cli/pull/23047)
Python < 3.7 (https://github.com/Azure/azure-cli/pull/23102)

However, in those environments, az --version still shows there are available updates:
[root@ae6b254e11cf /]# az -v
azure-cli                         2.38.0 *

core                              2.38.0 *
telemetry                          1.0.6 *

Dependencies:
msal                            1.18.0b1
azure-mgmt-resource             21.1.0b1

Python location '/usr/bin/python3.6'
Extensions directory '/root/.azure/cliextensions'

Python (Linux) 3.6.8 (default, Nov 16 2020, 16:55:22)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

Legal docs and information: aka.ms/AzureCliLegal

You have 3 updates available. Consider updating your CLI installation with 'az upgrade'

This because Azure CLI checks the latest version from source code on GitHub repo, instead of corresponding package repo:
https://github.com/Azure/azure-cli/blob/8357f17bdc9abb50e3f97a465943ea8301c925f7/src/azure-cli-core/azure/cli/core/util.py#L299-L303
To Reproduce
Lauch a CentOS 7 docker container and install Azure CLI:
docker run -it --rm centos:7

rpm --import https://packages.microsoft.com/keys/microsoft.asc

echo -e "[azure-cli]
name=Azure CLI
baseurl=https://packages.microsoft.com/yumrepos/azure-cli
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc" | tee /etc/yum.repos.d/azure-cli.repo

yum install azure-cli

az --version

Expected behavior
az --version shouldn't show available updates in those environments.

az upgrade

Same problem here with SLES. There is no newer version in repository
https://packages.microsoft.com/yumrepos/azure-cli/

Last version is 2.38.0 (release date: 2022-07). Is this repository still alive? There is no information on that in the docs.
Do we have to use
az upgrade

for the future now? That would mean higher maintenance effort for companies!


It does not detect haproxy servers

Hello, I am delighted with this great software that you have developed, I would like to use it but I am having problems, I can not see any configuration of the haproxy within the platform and they also appear as down the servers that I load. thank you

Hi,
Your config in default place /etc/haproxy/haproxy.cfg?
Отправлено из Mail.ru для Android вторник, 16 июля 2019г., 00:42 +03:00 от jcarlosg87<EMAIL_ADDRESS>:

Hello, I am delighted with this great software that you have developed, I would like to use it but I am having problems, I can not see any configuration of the haproxy within the platform and they also appear as down the servers that I load. thank you
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly,  view it on GitHub , or  mute the thread .

hello if my configuration is in /etc/haproxy/haproxy.cfg, as data the verification I have of is HA-Proxy version 1.6.3 2015/12/25
Copyright 2000-2015 Willy Tarreau<EMAIL_ADDRESS>thank you very much for your help

Then maybe problem with permission


multi region deployment fails on S3 error: Access Denied

ci/taskcat.yml contains:
package-lambda: true
regions:
- us-east-1
- us-west-2
use taskcat to package lambda code in functions/source/
taskcat will create the s3 bucket in us-east-1
[INFO   ] :Creating bucket taskcat-my-project-temp-f4bc86a3 in us-east-1
when taskcast starts deployment into us-west-2 it fails with S3 error: Access Denied
it looks like the bucket in us-east-1 is not usable by CloudFormation in other regions for deployment.

@e14nielson - Are you seeing this when you use the object URL as the source for the lambda function resource?
Assuming that's the case
It's less a taskcat issue and more an S3/Lambda limitation. We've worked around it via a CopyZips lambda... Yes... a lambda that copies lambda zips...
https://github.com/aws-quickstart/quickstart-ribbon-sbc/blob/83dbfd6ecd46d38d1e732cd99a7dbe8d596abce6/templates/ribbon-sbc.template.yaml#L1187-L1291
The "cfnresponse" module is here...
https://github.com/aws-quickstart/quickstart-ribbon-sbc/blob/master/functions/source/KeyGen/cfnresponse.py
Blog post (by @jaymccon) about it here.

https://aws.amazon.com/blogs/infrastructure-and-automation/deploying-aws-lambda-functions-using-aws-cloudformation-the-portable-way/

Otherwise...
Well.. more context please ? :)

@andrew-glenn  sorry i could have been more clear.
taskcat never gets a template up in us-west-2 as the s3 error is accessing the templates in the deployment bucket not the lambda code. that is just how i have it configured in my project.
it sounds like even once i solve this issue i also have to solve the lambda code issue by deploying a custom lambda to enable taskcat. I wont be doing this which means i probably wont be able to successfully use this feature for my projects.

@e14nielson interesting.  We don't run into this on our end. Sanity check: You're able to manually launch the template via the CFN console using the same params in us-west-2?
I assume yes, but wanted to make sure. This is puzzling.

@andrew-glenn everything works fine when ci/taskcat.yml contains:
package-lambda: true
regions:

us-east-1

as soon as i add us-west-2 it breaks.

but i can manually deploy to us-west-2, yes

Sounds like you need to add a copyzips lambda to your project to resolve
this issue. The initial build only stages the template in one region (
Which is done by design)
On Fri, Jul 26, 2019 at 9:29 AM eric nielson<EMAIL_ADDRESS>wrote:

but i can manually deploy to us-west-2, yes
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/aws-quickstart/taskcat/issues/315?email_source=notifications&email_token=ABNDMQBBSS5CYBUUS2F3XP3QBMQ5HA5CNFSM4IHFABA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25C2VA#issuecomment-515517780,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABNDMQD3AF4GC5TFB7WGJ43QBMQ5HANCNFSM4IHFABAQ
.

@avattathil this makes sense but also de-values the multi region feature because of this dependancy. The documentation could be updated to specify this requirement. One of the main reasons i was interested in this was the easy ability to deploy a single stack to all regions without the need for extra infrastructure.

So using taskcat to do the staging (in multiple region s) would make the
template depend on taskcat itself or require end-users to do pre launch
step.
If you implement the staging in the template as described in this blog
https://aws.amazon.com/blogs/infrastructure-and-automation/deploying-aws-lambda-functions-using-aws-cloudformation-the-portable-way/
It will allow your template to work independently without staging assist
from taskcat.  Once implemented you can use taskcat to test to make sure
everything work as designed in multiple regions.  Hope this helps with your
use case
On Fri, Jul 26, 2019 at 9:39 AM eric nielson<EMAIL_ADDRESS>wrote:

@avattathil https://github.com/avattathil this makes sense but also
de-values the multi region feature because of this dependancy. The
documentation could be updated to specify this requirement. One of the main
reasons i was interested in this was the easy ability to deploy a single
stack to all regions without the need for extra infrastructure.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-quickstart/taskcat/issues/315?email_source=notifications&email_token=ABNDMQFUZ334G3SRYSSA4X3QBMSD7A5CNFSM4IHFABA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD25DT5Y#issuecomment-515521015,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABNDMQA2L3ZYDXH2V5MGTC3QBMSD7ANCNFSM4IHFABAQ
.

again your taskcat docs dont reflect this requirement so that would be great to add.
and there are other ways to do this easier.
*gitlab runner stages per region

@e14nielson  - QQ: Would an option to auto-generate a bucket per region work for your use-case? In that scenario, there's no cross-region lambda/S3 considerations. I'm happy to add this to the v0.9.0 release.

@andrew-glenn that is a great idea, but i also dont understand why a new bucket in each region is needed. a bucket might have regionality in its metadata but the CloudFormation service is able to handle any s3 url provided it has access to.
to test this i put a template in a bucket with region of Oregon then under the CloudFormation service in N. Virginia i can deploy that template as a stack without issue.

@e14nielson It's a lambda specific "gotcha".
Looking at the Code Object of  an AWS::Lambda::Function resource, we see it'll take
an S3Bucket, an S3Key, and other properties. The S3Bucket is restricted to the same region as the lambda function.

S3Bucket
An Amazon S3 bucket in the same AWS Region as your function. The bucket can be in a different AWS account.

This restriction is why you'll see CopyZips functions scattered throughout AWS QuickStarts.
BTW: I'm happy to take your feedback on this and forward internally. I just need to get a clear picture of how much pain this causes.

Of course, I just realized the scope of your issue to begin with. (again). What you're specifically running into isn't something that we've experienced, or had others experience either.
For the sake of usability, I'll add the regional-bucket feature I mentioned above (just to be safe). We're in the back-half of v0.9, so any bugfixes and soforth would show up there.
I hate to say "hang tight", but we're doing a significant amount of work between v0.8 and v0.9. If this issue persists in v0.9, then I'm more than happy to dig at this deeper.

Yup totally get it I’ll be checking back in to test the new version and see
how that works.
On Wed, Jul 31, 2019 at 7:10 PM Andrew Glenn<EMAIL_ADDRESS>wrote:

Closed #315 https://github.com/aws-quickstart/taskcat/issues/315.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/aws-quickstart/taskcat/issues/315?email_source=notifications&email_token=AMAUP4L36Y7SCIB6VVQ267LQCIZYFA5CNFSM4IHFABA2YY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGOSZ74PIA#event-2524956576,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMAUP4NRQZL6V6PHHETHMEDQCIZYFANCNFSM4IHFABAQ
.


Make TextBox wrap when it get's to big

Should help with #704
I also decided to show the line numbers again, because I just like that more.

Nice! Not really sold on the numbers, but I'll merge 👍🏻


ERC20 example is slightly off the API

So not sure how critical are argument names used in the ERC20, but the example uses different ones? Also types do not match. (I thin conversion between camelCase and snake_case is OK, so I am talking about other differences.) For example:

total_supply should be returning u256 not u64.
balance_of does not return just balance of the sender, but of the account with given address.
The amount in transfer should be of type u256 and not u64.
Similarly for transferFrom and approve.
allowance should also operate on a given address and not on sender.
Transfer and Approval events use u64 as well instead of u256.
Some of arguments names like spender, sender, from, to, value, and amount`, are not consistent between ERC20 and example, not inside example itself. I suggest using names from here.

I made new ERC-20 implementation based on OpenZeppelin code for SimplePeg service.


Problem in running demo.ipynb

net = caffe.Net(prototxt, caffe.TEST, weights=weights)
Traceback (most recent call last):
File "", line 1, in
Boost.Python.ArgumentError: Python argument types in
Net.init(Net, str, int)
did not match C++ signature:
init(boost::python::api::object, std::string, std::string, int)
init(boost::python::api::object, std::string, int)

Do any of these suggestions help? I haven't experienced this problem. What OS / python version do you use?

Well, I solved it by changing it to
net = caffe.Net(prototxt, ,weights,caffe.TEST)


Add documentation for logger usage and make keepAlive optional

Signed-off-by: Shubham Sharma<EMAIL_ADDRESS>Description
Add docs for logger.
Make keepAlive optional in DaprClientOptions - this ensures that the user can set logger options without being forced to set keepAlive explicitly.
Issue reference
Please reference the issue this PR will close #288 and close #291
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[ ] Code compiles correctly
[ ] Created/updated tests
[X] Extended the documentation

ping @XavierGeerinck


speed test with multiple fifo

Nice work! This is exactly what we needed. A few observations:

When I run 10 fifos for 100k ticks, then the loop time can be sped up by a factor of two by disabling the per-tick sprintf output (printing stuff to the terminal is relatively slow).
After disabling the sprintf above, I see the following rates:

 #FIFOS
	 tick rate [kHZ]

 10
	 12

 100
	 1.1

 1000
	 0.12

so rate ~ 120 kHZ / #FIFO
If one wants to simulate a full DTC, the number of components is probably O(10e3+). For our case, I think a subset will suffice, though (handling 100 input links is not qualitatively different from 200 links, 300 links etc, so if the firmware works for one, it will qualitatively work for the other modulo resource limits)


ARTEMIS-584 add validated user to msg

Implements a new feature to aid in security auditing by adding the name
of the validated user to the messages it sends.

I ran the full test-suite.  There were no new failures.

Is there a reason this is disabled by default? Performance, maybe? It seems pretty useful, it's just odd that it's off by default. It makes me wonder what the catch is.


Make "Revert File" more useful

Recently I've been wondering if there is a way to revert a large number of changes made to a file through VScode. Found a few guides that recommended using File -> Revert File or same thing from the command palette (CTRL+SHIFT+P) -> Revert File. Unfortunatelly this function only works when you've made some changes BUT didn't save the file. If the file is saved this option does absolutelly nothing.
It would be nice if this function would revert ALL changes in both saved and unsaved file.

Maybe https://code.visualstudio.com/updates/v1_66#_local-history

Maybe https://code.visualstudio.com/updates/v1_66#_local-history

A bit inconvenient I would say - it's easier to simply search for the file in the Source Control plugin and revert all changes IMO. But thank you for pointing out this nifty functionality - I didn't know about it.
Still my proposal stands, I believe File -> Revert File should also revert a saved file, not only the unsaved, to it's original unmodified local state. I don't fully understand the usecase of this option ATM if it only works for any unsaved change - since you can simply choose to close and not save the modified file thus reverting all changes.

In the saved file case how far back to you go? VS Code's core architecture doesn't know anything about git so it cannot revert up until a committed change in your git repo only the SCM view can do that because that is part of the git extension. So your options are local history as stated by @gjsjohnmurray which allows you to pick which save to revert to or to revert in the SCM view which will go back until your last committed changes. I think the implementation would be way too confusing and volatile to shove into the File > Revert menu since different people have different ideas of where the revert should happen. We currently cover the 3 major cases of revert unsaved, revert git, and revert up to whatever save you want using file -> revert, SCM, and local history respectively.

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!

I believe File -> Revert File should also revert a saved file, not only the unsaved, to it's original unmodified local state.

How would this work unless "Revert" would know about source control systems such as Git?


Add open source to our vision

Resolves #16

@eojthebrave @blakehall @agentolivia @ashleyrian @philippa5 Does this change capture open source well enough int he vision?

This looks good to me 👍

❤

+1


Add URLFetch sample

@shun-fan @tswast PTAL

LGTM, other than two suggested changes.

LGTM once Travis passes.

Coverage decreased (-0.2%) to 20.745% when pulling a00fa21c9e339b5d85495aba409c99527afa9a57 on urlfetch into c56f5530d843dc4f8c93004ef0492e1fdb243e29 on master.

Coverage decreased (-0.2%) to 20.745% when pulling a00fa21c9e339b5d85495aba409c99527afa9a57 on urlfetch into c56f5530d843dc4f8c93004ef0492e1fdb243e29 on master.


cout is not working in lambda function of a route

the code inside a handler works as usual, except 'cout', for example:
server.resource["^/$"]["GET"] = [](................){
  cout << "abc";
};

it doesn't print out anything
void handle_get_root(.........................){
  cout << "xyz";
}

server.resource["^/$"]["GET"] = handle_get_root;

doesn't print out 'xyz' too

tks god, i found the answer:
http://stackoverflow.com/questions/14858262/stdcout-wont-print
i need to call cout.flush()
but i still don't know why i have to call 'flush'.
most of the time nobody needs to call 'flush'

There are no guarantees that a flush is called when you use std::cout, unless using std::endl, std::flush, or when a program exits. In the case above, I would simply write cout << "abs" << endl; when using std::cout for testing purposes.

ah yeah, endl works


Create php superglobals

Article checklist
ATTENTION: In your PR - add the ISSUE (topic form) # that this PR corresponds to. You can do this by also adding a comment that states "This fixes #(enter your Idea Content Form #)" to link and close your Idea Content (issue) when the PR is merged.
NOTE: (Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)
If you have not already please go over our Resources Page for more tips and tricks on how to improve our overall technical writing.
Preliminary Checks - Formatting and Structure

[x] Does your article follow any of the suggested structure formats? - see example formats
[x] Is your article properly formatted in Markdown? - see Github Markdown guide
[x] Have you used the correct folder and file structure? - see Contribution Guidelines
[x] Is your article over 750 words? - Tool: Wordcounter.net
[x] Have you used our preferred heading structure? - H3 (###) and up
[x] Does your article provide enough value and detail about your topic? - Articles should be clear, accurate, and fully explained.
[x] Can your article be understood by beginners? - Assume the audience is smart but has no prior exposure to the common terminology in your article.
[x] Have you included a hero image that is 600x400 pixels and have the copyright to use it? - Tools: Pixlr Image Editor for resizing and Unsplash for Creative Commons images
[x] In your PR - add a comment that states "This fixes #(enter your Idea Content Form #)" to link and close your Idea Content (issue) when the PR is merged.

Grammar & plagiarism checks

[x] Have you spellchecked and grammar checked your article? - Tools: Write&Improve - ProWritingAid -  Grammarly
[x] Please place your article through a 3rd party plagiarism checker? We suggest using Quetext, this tool is free and has a daily limit. We typically accept articles with 10% or less.
[x] Have you checked your article for readability? - Tool: Hemmingway
[x] Have you added sources for quotes and images that aren't yours?

Technical checks

[x] Are your code snippets properly formatted for syntax highlighting - see Syntax guide

Contribution guidelines
For first-time contributors and for more details, see Contributing Guidelines
This fixes #2413

plagiarism check done

I was wondering why the code was not running. You wrote
 $GLOBAL['c'] = $GLOBAL['a']* $GLOBAL['b']; instead of  $GLOBALS['c'] = $GLOBALS['a']* $GLOBALS['b'];
Ensure you use the correct syntax. I have corrected this

```
$cookie_name = "uname";
$cookie_value = "Mackrine";

//setting cookie
setcookie($cookie-name, $cookie-value, time()+(86400*30),"/");

In the above code, you passed the wrong variable names in the setCookie function, thus, leading to an error. I have corrected this.


Suspected bug in jax.lax.conv_general_dilated_patches

Trying to implement the solution here but ran into the following bug:
import jax.numpy as jnp

dev = jax.local_devices()[0]

ftmap_fn = jax.device_put(jnp.ones((1, 384, 384, 256), dtype=jnp.bfloat16), device=dev)
W = 5
stride, padding = (4, 4), (W // 2, W // 2)
jax.lax.conv_general_dilated_patches(ftmap_fn, (5, 5), stride, padding).shape

but i found the following error:
...
File ~/.local/lib/python3.8/site-packages/jax/_src/dispatch.py:609, in XlaCompiledComputation.from_xla_computation(name, xla_computation, nreps, device, backend, tuple_args, in_avals, out_avals, kept_var_idx)
    606 options.parameter_is_tupled_arguments = tuple_args
    607 with log_elapsed_time(f"Finished XLA compilation of {name} "
    608                       "in {elapsed_time} sec"):
--> 609   compiled = compile_or_get_cached(backend, xla_computation, options)
    610 buffer_counts = (None if len(out_avals) == 1 else
    611                  [aval_to_num_buffers(aval) for aval in out_avals])
    612 execute = _execute_compiled if nreps == 1 else _execute_replicated

File ~/.local/lib/python3.8/site-packages/jax/_src/dispatch.py:578, in compile_or_get_cached(backend, computation, compile_options)
    575   ir_str = (computation if isinstance(computation, str)
    576             else computation.as_hlo_text())
    577   _dump_ir_to_file(module_name, ir_str)
--> 578 return backend_compile(backend, computation, compile_options)

File ~/.local/lib/python3.8/site-packages/jax/_src/profiler.py:206, in annotate_function.<locals>.wrapper(*args, **kwargs)
    203 @wraps(func)
    204 def wrapper(*args, **kwargs):
    205   with TraceAnnotation(name, **decorator_kwargs):
--> 206     return func(*args, **kwargs)
    207   return wrapper

File ~/.local/lib/python3.8/site-packages/jax/_src/dispatch.py:532, in backend_compile(backend, built_c, options)
    528 @profiler.annotate_function
    529 def backend_compile(backend, built_c, options):
    530   # we use a separate function call to ensure that XLA compilation appears
    531   # separately in Python profiling results
--> 532   return backend.compile(built_c, compile_options=options)

RuntimeError: UNKNOWN: -:4:130: error: expected '['

The error looks very cryptic cannot figure out what it means. Is it an XLA / Jax bug? Thanks!
Environment: TPU-VM v3-8 with software version tf.2.8.0
jax==0.3.5
jaxlib==0.3.5
libtpu-nightly==0.1.dev20220407
cloud-tpu-client==0.10

The issue is that padding should be a list of pairs, one for each dimension. e.g., this works:
stride, padding = (4, 4), [(W // 2, W // 2), (W // 2, W //2)]

We are apparently missing some input validation that would have caught this sooner. I'll fix that!


pull request for e2e test at 01/29/2017 18:15:13

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


DanceTitle

Describe your problem here.

Do any of you guys know how to start the animation at the title screen, I can take any code if necessary. :)
Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
No response

Its the demon guy btw, he won't play animation :(

Go to Assets/shared/images/gftitledance.xml and look at the name of the animation prefix, if you used AN, rename the symbol in the animation to the prefix in the gf xml.
(sorry if you couldn't understand)

Go to Assets/shared/images/gftitledance.xml and look at the name of the animation prefix, if you used AN, rename the symbol in the animation to the prefix in the gf xml. (sorry if you couldn't understand)

Okay so is this for the source code? and whats an AN.     It worked!!


Fix fetch stub issue when using node.js 20.x

@nick4598 looks like there is another issue with Docs, can you help with that?

@nick4598 looks like there is another issue with Docs, can you help with that?

I'm on it.

@nick4598 There are still errors coming from @itwin/physical-material-backend

@aruniverse please review


chore: jumper move to the strapi sdk

Ticket: https://lifi.atlassian.net/browse/LF-8048

Still running into a build error:
Error occurred prerendering page "/sitemap.xml". Read more: https://nextjs.org/docs/messages/prerender-error

{
  data: null,
  error: {
    status: 404,
    name: 'NotFoundError',
    message: 'Not Found',
    details: {}
  }
}


repair issueNo 1060

// Describe your PR here; eg. Fixes #issueNo
ratelimiter-plugin stress testing, report an java.lang.IllegalStateException Error #1060
This PR does two things:
1.Create in SoulReactiveRedisTemplate.java and SoulReactiveScriptExecutor package org.dromara.soul.plugin.ratelimiter.handler
1.Update org.dromara.soul.plugin.ratelimiter.handler.RateLimiterPluginDataHandler handlerPlugin method, Replace  ReactiveRedisTemplate<String, String> reactiveRedisTemplate = new ReactiveRedisTemplate<>(lettuceConnectionFactory, serializationContext)  with  ReactiveRedisTemplate<String, String> reactiveRedisTemplate = new SoulReactiveRedisTemplate<>(lettuceConnectionFactory, serializationContext);
Make sure that:

[x] You have read the contribution guidelines.
[x] You submit test cases (unit or integration tests) that back your changes.
[x] Your local test passed mvn clean install -Dmaven.javadoc.skip=true.

Codecov Report

Merging #1064 (480b9b0) into master (cbdcf69) will increase coverage by 0.06%.
The diff coverage is 28.57%.

@@             Coverage Diff              @@
##             master    #1064      +/-   ##
============================================
+ Coverage     74.30%   74.37%   +0.06%
- Complexity     2047     2064      +17
============================================
  Files           355      357       +2
  Lines          7846     7866      +20
  Branches        858      858
============================================
+ Hits           5830     5850      +20
- Misses         1577     1584       +7
+ Partials        439      432       -7

Impacted Files
Coverage Δ
Complexity Δ

...atelimiter/handler/SoulReactiveScriptExecutor.java
13.33% <13.33%> (ø)
1.00 <1.00> (?)

...ratelimiter/handler/SoulReactiveRedisTemplate.java
60.00% <60.00%> (ø)
1.00 <1.00> (?)

...elimiter/handler/RateLimiterPluginDataHandler.java
74.13% <100.00%> (ø)
12.00 <0.00> (ø)

...soul/client/sofa/SofaServiceBeanPostProcessor.java
16.21% <0.00%> (-43.25%)
4.00% <0.00%> (-4.00%)

...soul/client/tars/TarsServiceBeanPostProcessor.java
19.17% <0.00%> (-27.40%)
5.00% <0.00%> (-5.00%)

.../metrics/facade/handler/MetricsTrackerHandler.java
91.07% <0.00%> (-3.58%)
23.00% <0.00%> (-1.00%)

.../soul/plugin/httpclient/NettyHttpClientPlugin.java
57.14% <0.00%> (-2.05%)
10.00% <0.00%> (ø%)

... and 6 more

Continue to review full report at Codecov.

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

Codecov Report

Merging #1064 (480b9b0) into master (cbdcf69) will increase coverage by 0.06%.
The diff coverage is 28.57%.

@@             Coverage Diff              @@
##             master    #1064      +/-   ##
============================================
+ Coverage     74.30%   74.37%   +0.06%
- Complexity     2047     2064      +17
============================================
  Files           355      357       +2
  Lines          7846     7866      +20
  Branches        858      858
============================================
+ Hits           5830     5850      +20
- Misses         1577     1584       +7
+ Partials        439      432       -7

Impacted Files
Coverage Δ
Complexity Δ

...atelimiter/handler/SoulReactiveScriptExecutor.java
13.33% <13.33%> (ø)
1.00 <1.00> (?)

...ratelimiter/handler/SoulReactiveRedisTemplate.java
60.00% <60.00%> (ø)
1.00 <1.00> (?)

...elimiter/handler/RateLimiterPluginDataHandler.java
74.13% <100.00%> (ø)
12.00 <0.00> (ø)

...soul/client/sofa/SofaServiceBeanPostProcessor.java
16.21% <0.00%> (-43.25%)
4.00% <0.00%> (-4.00%)

...soul/client/tars/TarsServiceBeanPostProcessor.java
19.17% <0.00%> (-27.40%)
5.00% <0.00%> (-5.00%)

.../metrics/facade/handler/MetricsTrackerHandler.java
91.07% <0.00%> (-3.58%)
23.00% <0.00%> (-1.00%)

.../soul/plugin/httpclient/NettyHttpClientPlugin.java
57.14% <0.00%> (-2.05%)
10.00% <0.00%> (ø%)

... and 6 more

Continue to review full report at Codecov.

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


Add na colour to survey aliases

In this PR I add a colour for 'na' values in the survey.

I see a check is failing. Seems to be complaining about a package MASS requiring a newer version of R. Doesn't seem like it's related to this PR, and hopefully is something that will resolve itself.


Swift Alternative

Is there any alternative in Swift?

@sicaboy https://github.com/mokumoku/SwiftWebViewProgress


nested BlueGigaBLE-project in src like the other projects

This will solve issue #163

This is a VisualStudio only thing ;)


Wallet suck on 'Loading: Setup'

After using Mutiny for a while, one day I opened it and it wouldn't fully load. I have tried restoring my seed phrase via an iOS PWA, the iOS safari browser, and a desktop Firefox browser. Same result for each (images below).
Any suggestions for how to get my wallet running again? Apologies if this is a known issue I didn't find when searching.

mutiny-logs.txt
Log file attached

Do you have a federation added and which federation? I think it's the same issue as this: https://github.com/MutinyWallet/mutiny-web/issues/890

Ah yes, I did add the same federation as that issue to test it out (fed11qgqpu8rhwden5te0vekjuem9dejhx6tn9e3hgunz9e5k7tmhwvhsqqfq5a2sy0f26k6ndld2qpassl0gd4cx2szmfv98zfn83ywp4mja3m4s7yz4zq). I don’t think I have any sats in the federation though, so just removing it would be fine if possible.

Our next version of mutiny should have it fixed but until then, yeah you can remove it. See if you can get to the federation settings screen to remove it.
If not, you should be able to download and then edit the state.json file if you wanted to replace: "federations":{"federations":{},"version":2} but instead of 2, increment the number by one from what it is for you.

Thanks. Can't get to the federation settings to remove it, but I changed the state.json to version 48 from 47. Getting an error that Mutiny is running in another browser now. Everything is closed all all devices, but, I'll give it some time and try again later. Appreciate the help.

Update: even after hours of all instances being closed, whenever I try to load in the edited state file, I get stuck here:

No immediate rush, just wanted to add the latest. Thanks!

If mutiny is already running, it's already running. You need to make sure it's closed everywhere where it might be.


[Frontend] improve icons on carousel

Describe your Proposal
improve arrow icons on corousel section. i will update it with a more fancy and minimalistic look which doesn't affects the readability
Additional context
the previous icons are very old fashioned and occupies unneccessary background space also which reduces readability
Have you read the Code of Conduct?
Write your answer here.
Yes

please assign me this issue add gssoc21 and level2 labels

i was talking about these arrow icons on carousel.

Hey @tushartiwari7 can you please show us the icons design that you want to use in place of the current one?

this is one such example which i think best suits.
if not i have more collection too.

@tushartiwari7 please go ahead with the issue. We look forward to your PR

thanks! i will start working on it ASAP 👍

sorry closed that by mistake.


Address issues raised in #15

Fix corner calculation for NIRSpec.
Fix tranformation to/from det frame for NIRSpec.

Thanks. I will include code to prevent these transformations to be used for NRS_FULL_MSA and NRS_VIGNETTED_MSA.
Does it work properly for NRS1_FP1MIMF?

Hello Johannes:
Actually NRS1_FP1MIMF doesn’t work if one tries to go to a detector frame.
The corners and reference point functions do seem to work if one sticks to IDL and/or tel frames.
Why is this one different than the other SLIT rows line S1600A1?
My earlier tests had included

NRS_S1600_A1_SLIT
NRS_S200B1_SLIT  (goes properly to NRS2)
NRS_FIELD1_MSA4
NRS1_FULL

But I hadn't specifically tested any of the MIMF apertures until now.

My previous checks consisted of verifying that the correct reference points and corners were being pulled and checking that going directly from aperture to detector coordinates gave the same results whether using the detector or the slit aperture name. I've now written and tested test code that works with pytest to do those checks for all the slits with a parent aperture.
However, in writing the tests I realized I was only doing the test in one direction - from idl or tel to det or sci.  It turns out that the reverse transforms starting from the detector and trying to go to the aperture coordinate idl or tel values don't work at all.
This will be a less common use case, as if coordinates are measured on the detector frame one would normally use the detector aperture name to convert to V2,V3.  However, one might want to ask where given det or sic coordinates are in a slit's idl frame to figure out to where in the slit the detector pixel maps.  I.e., for a NIRSpec slit aperture, one can now do without any problem
In [22]: xic, yic = aperture.idl_to_det(ixc, iyc)
but attempting the following results in an error
In [23]: ixc2, iyc2 = aperture.det_to_idl(xic, yic)
TypeError                                 Traceback (most recent call last)
 in ()
----> 1 ixc2, iyc2 = aperture.det_to_idl(xic, yic)
~/Documents/jwst/siaf/tools/pysiaf/pysiaf/aperture.py in det_to_idl(self, *args)
892
893     def det_to_idl(self, *args):
--> 894         return self.sci_to_idl(*self.det_to_sci(*args))
895
896     def det_to_tel(self, *args):
~/Documents/jwst/siaf/tools/pysiaf/pysiaf/aperture.py in det_to_sci(self, XDet, YDet, *args)
1673         """Use parent aperture if SLIT."""
1674         if self.AperType == 'SLIT':
-> 1675             return self._parent_aperture.det_to_sci(self, XDet, YDet, *args)
1676         else:
1677             return super(NirspecAperture, self).det_to_sci(XDet, YDet, *args)
~/Documents/jwst/siaf/tools/pysiaf/pysiaf/aperture.py in det_to_sci(self, XDet, YDet, *args)
1675             return self._parent_aperture.det_to_sci(self, XDet, YDet, *args)
1676         else:
-> 1677             return super(NirspecAperture, self).det_to_sci(XDet, YDet, *args)
1678
1679
~/Documents/jwst/siaf/tools/pysiaf/pysiaf/aperture.py in det_to_sci(self, XDet, YDet, *args)
811     def det_to_sci(self, XDet, YDet, *args):
812         """ Detector to Science, following Section 4.1 of JWST-STScI-001550"""
--> 813         X_model, Y_model = self.detector_transform('det', 'sci', *args)
814         return X_model(XDet - self.XDetRef, YDet - self.YDetRef), Y_model(XDet - self.XDetRef,
815                                                                           YDet - self.YDetRef)
~/Documents/jwst/siaf/tools/pysiaf/pysiaf/aperture.py in detector_transform(self, from_system, to_system, angle_deg, parity)
641             angle_deg = getattr(self, 'DetSciYAngle')
642
--> 643         x_model_1, y_model_1 = linear_transform_model(from_system, to_system, parity, angle_deg)
644
645         if from_system == 'det':
~/Documents/jwst/siaf/tools/pysiaf/pysiaf/aperture.py in linear_transform_model(from_system, to_system, parity, angle_deg)
1447     """
1448     if type(angle_deg) != float:
-> 1449         raise TypeError('Angle has to be a float. It is {}'.format(angle_deg))
1450     # print(angle_deg)
1451
TypeError: Angle has to be a float. It is [<PHONE_NUMBER>2<PHONE_NUMBER>8<PHONE_NUMBER>1<PHONE_NUMBER>8]

I incorporated @charlesrp SLIT test and the 'reverse' transforms.


[Redfish] redfish/update_service/test_firmware_tftp_upload_image.robot check FirmwareInventory state failed

I use openbmc-test-automation v3.0-stable branch and run the redfish/update_service/test_firmware_tftp_upload_image.robot test case.
After uploading the BMC image via TFTP, when checking the FirmwareInventory status, it is confirmed that it is "Enabled" and not "Disabled" & "Updating". Do we need to validate the "Disabled" & "Updating" status in the robot source code?

robot -v OPENBMC_HOST:<IP_ADDRESS> -v TFTP_SERVER:x.x.x.x -v IMAGE_FILE_NAME:v2.12.2.all.tar --include TFTP_Download_Install_With_ApplyTime_OnReset_Policy redfish/update_service/test_firmware_tftp_upload_image.robot

$ curl -H "X-Auth-Token: $token" -k https://${bmc}/redfish/v1/UpdateService/FirmwareInventory/ece98953
{
<EMAIL_ADDRESS>"/redfish/v1/UpdateService/FirmwareInventory/ece98953",
<EMAIL_ADDRESS>"#SoftwareInventory.v1_1_0.SoftwareInventory",
  "Description": "BMC image",
  "Id": "ece98953",
  "Name": "Software Inventory",
  "RelatedItem": [
    {
<EMAIL_ADDRESS>"/redfish/v1/Managers/bmc"
    }
  ],
<EMAIL_ADDRESS>1,
  "Status": {
    "Health": "OK",
    "HealthRollup": "OK",
    "State": "Enabled"
  },
  "Updateable": true,
  "Version": "v2.12.2"
}

@susilsi7 please take a look into this.

This code is designed on old API and has to be migrated on Task API.