PSO To Do's

Think about how to do migration with PSO in Propulate. Check how multi-swarm PSO works in general. The general mechanism is different from the island model used with GAs.
Fix position synchronization between dict and array-type position field in Particle class.
Make personal and global best attributes of PSO propagators. Currently, they are determined from scratch in every update step.
Combine basic PSO and velocity clamping in one propagator. Enable / disable velocity clamping with bool flag.

To the second bullet point - as I already pointed out in the test run and will point out again in the final presentation as well as in my thesis, please note, that run time efficient synchronization between the explicit and the implicit position fields of the Particle class are only possible in the direction pointing away from the explicit position field and only, if it is ensured, that one cannot change single values of this field without the Particle noticing this. In this case, field synchronization might become impossible.

Multi swarms


"I" value

Pardon my ignorance, but what it the "I" value in the summary. Busco does not produce this.
Thanks,

I was just wondering the same while going through my results.

Hi @huangnengCSU,
Thank you for the clarification, it is actually very useful to have this distinction!
Guillaume


DOC-4910

https://issues.couchbase.com/browse/DOC-4910
I've tried the break down the changes into multiple commits for the benefit of the review, with each commit message as a summary of the change.

@rhedgpeth would it be possible to merge this PR? I will start another PR afterwards for the editor review. Thanks!

Sorry this took so long, @jamiltz! For some reason I didn't receive any notifications, and just happened to stumble up on it.

@rhedgpeth No worries. Thanks!


feature(bspwm) label-last-underline

I often switch between two desktops, and have a binding for switching to the last focused desktop. It would thus be neat if I could mark that desktop. (Perhaps also label-dimmed-last-underline, top be complete)

This, in my opinion, is a very specific use case.  For example, I have a binding that switched to the last non-empty focused desktop.  Would it make sense to include an underline for that as well?  Certainly not.
However, it would make sense to include something that underlines the desktops/monitors of a specific command...

Ah. Well I didn't mean to specifically mark "last focused desktop" just because I have a binding for that. bspwm does maintain last focused desktop (per monitor), which can be found with bspc query -D -d last.local (or, omit .local for last focused desktop on all monitors). No matter how you navigate between desktops, there will be a last focused desktop. Do you mean that you would want to exclude empty desktops when finding the last focused desktop?
But, certainly one could consider tying a mark to the desktop returned by a custom bspc command, which I think is what you mean. Then I guess you'd use something like bspc query -D -d last.occupied.local.

But, certainly one could consider tying a mark to the desktop returned by a custom bspc command, which I think is what you mean. Then I guess you'd use something like bspc query -D -d last.occupied.local.

Yes, that is precisely what I meant.

Closing. I'll add a reference to this in #84


MM-26322 Update mattermost-redux to make reorganizing sidebar optimistic

Using https://github.com/mattermost/mattermost-redux/pull/1187 in the webapp
Ticket Link
https://mattermost.atlassian.net/browse/MM-26322
Related Pull Requests
https://github.com/mattermost/mattermost-redux/pull/1187

Tests are failing because this is missing the changes from https://github.com/mattermost/mattermost-webapp/pull/5917

You have a type error:
components/sidebar/sidebar_channel/sidebar_channel_menu/index.ts:17:25 - error TS2305: Module '"../../../../node_modules/mattermost-redux/utils/channel_utils"' has no exported member 'isFavoriteChannel'.

17 import {isChannelMuted, isFavoriteChannel} from 'mattermost-redux/utils/channel_utils';

Did we remove/rename that function?

Yep, that's fixed in https://github.com/mattermost/mattermost-webapp/pull/5917

Holding off on QA review for now since the test server is unusable without that other PR.

When cherry-picked onto the release branch, the mattermost-redux commit must be updated to 9831ef3e2381839151a0b1a22cbc5585f5c58436

@hmhealey Testing mostly went well, but I noticed two things:

DMs and GMs cannot be reorganized within the Direct Messages category. Is this by design?
Channels can't get dropped to the bottom of a newly created category, however dropping them at the top or the middle of a new category and dragging/dropping them to the bottom of Favorites and Channels work fine. Is this something that can be fixed in this PR as well?

DMs and GMs cannot be reorganized within the Direct Messages category. Is this by design?

Yeah, that's by design. The Direct Messages category has the channels automatically ordered

Channels can't get dropped to the bottom of a newly created category, however dropping them at the top or the middle of a new category and dragging/dropping them to the bottom of Favorites and Channels work fine. Is this something that can be fixed in this PR as well?

I think there's an outstanding ticket for the drop zones being a bit off for new categories. We'll have to address that later since I don't think it's going to make it in for 5.26 at this point.

The changes to mattermost-redux were included on master in https://github.com/mattermost/mattermost-webapp/pull/5447. I'll submit a new PR to the release branch to include those.


Guard against racy channel allocation and connection close

Proposes a solution to #251.
As the only write to c.channels is in c.allocateChannel() a simple c.isClosed() guard is sufficient to protect against concurrent writes - multiple readers is OK and does not require a lock.
Because c.allocateChannel() holds the connection mutex for the duration of the call and c.shutdown() acquires it after c.closed has been set, I don't believe there is any racy interaction using c.closed.
The test case is from the issue reported by @jmalloc - thanks it helped massively!
The changes to channel.go is a separate issue (and separate commit - I can remove it if you want) that eliminates a race between channel.shutdown() and channel.call(). It looks like the original code intended to avoid this race, but didn't get complete coverage - it became noticeable using -race after fixing the allocation race, so I included it in this PR.
Running AMQP_URL="amqp://guest:guest@localhost:5672/" go test ./... -tags=integration -race no longer produces any race warnings for me, though I still get:
--- FAIL: TestExchangeDeclarePrecondition (34.66s)
	integration_test.go:1759: dial integration server: Exception (501) Reason: "read tcp <IP_ADDRESS>:58857-><IP_ADDRESS>:5672: i/o timeout"

I've always had this test case fail during integration tests and assume it's unrelated.

Thank you!

FWIW, the tests that led me to create #251 originally are running smoothly using this PR.

Looks good, but I'm concerned that this can deadlock when a server sent close arrives between the request and response of the call function. Can you add a test in client_test.go that would simulate the client send request, server recv request, server send close, server send response and make sure there isn't a deadlock?

JFYI, the easiest way of simulating a server-sent connection.close against a real RabbitMQ nodes is by closing a connection with rabbitmqctl or via management UI/HTTP API.

@michaelklishin
I think that closing connection with rabbitmqctl or management is inconsistent and not testable.
Correct me if I'm wrong:
a) a server close connection if not supported protocol header was received - non existing header can be added to force server to send close
b) rabbitmq close connection when publish is sent with mandatory flag to non existing exchange

Looks like the usage of ch.send in Ack() is still racey when using the head of this PR :(
Please see this CI build, which is using 645418e5f0725c09ab98fde517e45865a369d352.

Hi all, sorry for the delay, I've been out of the country for a few weeks.
Thanks @jmalloc, there were several calls to channel.send() that weren't covered by the mutex (channek.Ack/Nack/Reject) - I've added a test case to cover these racey calls.
Acquiring a lock for all Ack/Nack/Reject calls just to cover changing to channel.sendClosed() seems like overkill, so I've switched to using atomic operations to flip a flag controlling the behaviour of channel.send() instead of replacing the func pointer.
As the updated PR no longer aquires locks for switching the behaviour of channel.send(), does this resolve your concerns @streadway?
The test case I added failed with:
Dominics-MacBook-Pro:amqp % AMQP_URL="amqp://guest:guest@localhost:5672/" go test ./... -tags=integration -race -run TestRaceBetweenChannelShutdownAndSend
==================
WARNING: DATA RACE
Read at 0x00c4200682c8 by goroutine 16:
  github.com/domodwyer/amqp.(*Channel).Ack()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/channel.go:1505 +0x90
  github.com/domodwyer/amqp.TestRaceBetweenChannelShutdownAndSend.func1()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/connection_test.go:78 +0x46

Previous write at 0x00c4200682c8 by goroutine 13:
  github.com/domodwyer/amqp.(*Channel).shutdown.func1()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/channel.go:107 +0xe2
  sync.(*Once).Do()
      /usr/local/Cellar/go/1.8/libexec/src/sync/once.go:44 +0xe1
  github.com/domodwyer/amqp.(*Channel).shutdown()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/channel.go:138 +0xad
  github.com/domodwyer/amqp.(*Connection).closeChannel()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/connection.go:622 +0x42
  github.com/domodwyer/amqp.(*Channel).Close()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/channel.go:396 +0x19f

Goroutine 16 (running) created at:
  github.com/domodwyer/amqp.TestRaceBetweenChannelShutdownAndSend()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/connection_test.go:79 +0xe4
  testing.tRunner()
      /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107

Goroutine 13 (finished) created at:
  github.com/domodwyer/amqp.TestRaceBetweenChannelShutdownAndSend()
      /Users/dom/Documents/Go/src/github.com/domodwyer/amqp/connection_test.go:74 +0xb5
  testing.tRunner()
      /usr/local/Cellar/go/1.8/libexec/src/testing/testing.go:657 +0x107
==================
--- FAIL: TestRaceBetweenChannelShutdownAndSend (0.01s)
	shared_test.go:68: channel close/send race close
	testing.go:610: race detected during execution of test
FAIL
FAIL	github.com/domodwyer/amqp	0.054s

and after commit 15912e66f832ac41d6b0bbc8fb436b16dc1f0f55:
Dominics-MacBook-Pro:amqp % AMQP_URL="amqp://guest:guest@localhost:5672/" go test ./... -tags=integration -race -run TestRaceBetweenChannelShutdownAndSend
ok  	github.com/domodwyer/amqp	1.060s

No races detected from my tests so far :)

@jmalloc thank you for your feedback!

This definitely improves things as I can trigger race conditions easily without these changes. I'm still seeing a less rare race condition:
AMQP_URL="amqp://guest:guest@localhost:5672/" go test ./... -tags=integration -race -run=TestRaceBetweenChannelShutdownAndSend -count=10000
==================
WARNING: DATA RACE
Write at 0x00c420354f90 by goroutine 138:
  runtime.mapdelete()
      /usr/local/Cellar/go/1.8.1/libexec/src/runtime/hashmap.go:598 +0x0
  github.com/domodwyer/amqp.(*Connection).releaseChannel()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:600 +0xbc
  github.com/domodwyer/amqp.(*Connection).closeChannel()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:623 +0x70
  github.com/domodwyer/amqp.(*Channel).Close()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/channel.go:403 +0x19f

Previous read at 0x00c420354f90 by goroutine 159:
  runtime.mapiterinit()
      /usr/local/Cellar/go/1.8.1/libexec/src/runtime/hashmap.go:668 +0x0
  github.com/domodwyer/amqp.(*Connection).shutdown.func1()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:384 +0x23d
  sync.(*Once).Do()
      /usr/local/Cellar/go/1.8.1/libexec/src/sync/once.go:44 +0xe1
  github.com/domodwyer/amqp.(*Connection).shutdown()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:407 +0xcc
  github.com/domodwyer/amqp.(*Connection).dispatch0()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:431 +0x62c
  github.com/domodwyer/amqp.(*Connection).demux()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:414 +0x6e
  github.com/domodwyer/amqp.(*Connection).reader()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:508 +0x273

Goroutine 138 (running) created at:
  github.com/domodwyer/amqp.TestRaceBetweenChannelShutdownAndSend()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection_test.go:75 +0xb5
  testing.tRunner()
      /usr/local/Cellar/go/1.8.1/libexec/src/testing/testing.go:657 +0x107

Goroutine 159 (running) created at:
  github.com/domodwyer/amqp.Open()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:219 +0x578
  github.com/domodwyer/amqp.DialConfig()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:200 +0x414
  github.com/domodwyer/amqp.Dial()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection.go:132 +0x88
  github.com/domodwyer/amqp.integrationConnection()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/integration_test.go:1757 +0x50
  github.com/domodwyer/amqp.TestRaceBetweenChannelShutdownAndSend()
      /Users/gerhard/go/src/github.com/domodwyer/amqp/connection_test.go:70 +0x51
  testing.tRunner()
      /usr/local/Cellar/go/1.8.1/libexec/src/testing/testing.go:657 +0x107
==================
--- FAIL: TestRaceBetweenChannelShutdownAndSend (0.01s)
	shared_test.go:68: channel close/send race close
	testing.go:610: race detected during execution of test
FAIL
FAIL	github.com/domodwyer/amqp	89.099s

The above might be out of scope for this PR, therefore I'm giving it 👍  since it definitely improves things.
Happy to merge @streadway?

I've developed a fix for the rarer race @gerhard discovered (thanks!).
I'll open another PR after this one has been merged with a fix to keep everything clean, unless you want it in this PR too?

@domodwyer can you please rebase this against master? Thank you.

Sorted!


major bug with saml sso

I'm not sure what triggered this and I am currently investigating
but it seems that saml sso stopped working with keycloakify all together
after I updated keycloakify to latest and wanted to implement the saml post page: https://github.com/keycloakify/keycloakify/issues/277
I first had to fix a major issue where the redirect will not be at all and user would get stuck on the redirect page.
i had to add :
 useEffect(() => {     document.forms[0].submit();   }, [samlPost]);
otherwise the redirect won't happen. unfortunately even with this change I get an error from all saml providers upon login completion
this is the resulting page:

due to a 400 bad request on the post

I can confirm that if I don't use the keycloakify theme the saml sso works
this is what the endpoint returns without using the keycloakify themeing

I am researching the problem now but if you have a heads up to what can be the problem I'd appreciate it
thanks and have a nice day

is it possible there is a mismatch with the variable names:

https://github.com/keycloak/keycloak/blob/main/themes/src/main/resources/theme/base/login/saml-post-form.ftl

I fixed it locally and it seems working will issue a pr

All good can confirm it's back working on my end, if something happens again with sso feel free to tag me.
thanks for answering quickly and deploying my patch.
cheers


Post refresh event or callback?

Im facing an issue I was hoping you could help me out.
I have a container that has different layouts according to the box state, this state is dictated by eq.js that, at some point, makes the container go from full width to a two column layout. In one of those columns I have a slider which also calculates the available size to trigger its behaviour.

I was thinking of attaching an event triggered by eqjs.refreshNodes(); or having that function call a callback. This way when the nodes were updated by eq.js, I would have my slider recalculate it's properties also.
Im not seeing a suitable event or callback in the source of eq.js, is this something you considered?

eqjs.refreshNodes() refreshes the list of nodes, but doesn't query the elements. eqjs.query() does, and that accepts a callback. I've contemplated adding an event, but haven't done so yet.

Hey Sam, thanks for the feedback.
An event would be really useful, I'll see if I can find a solution to get around my use case.
Thanks.


Black screen when embedding youtube video

Hi, I'm using react-native 0.40.0. When I integrated the the example snippet into my project, I only get the empty black screen.
Same problem here: https://github.com/inProgress-team/react-native-youtube/issues/65
but I don't want to use WebView to solve this issue. Anyone know how to fix it?
Thanks alot!

@nhcuong95 Android/iOS? If you're on Android make sure that the project is included in MainApplication.java and that you've rebuit the project with react-native run-android.
Usually a red-line around the component indicates that it hasn't been installed properly.

@morelazers I'm working on the iOS one. And I saw a red-line around the component too.
I have been looking around for hours but haven't found a solution yet.

@nhcuong95 I got the same problem after upgrating my project to react-native 0.40.0.  Because, like @morelazers said, react-native-youtube hasn't been installed properly. I rolled back to use react-native 0.39.0 and this problem was disappeared.

@nhcuong95 the red frame happens if I remember correct because the YTPlayerView-iframe-player.html file that holds the inner iframe source isn't found by the native code.
Did you incorporated that file in you project correctly?
Try installing my fork for this repository by running
npm install github:davidohayon669/react-native-youtube#v1 --save
and following the instructions on the README. My fork takes care of all the assets installation with react-native link and rnpm link command lines

For android you must provide apiKey.
https://developers.google.com/youtube/android/player/register
Register your application. Enable youtube api and use that api in apiKey.
<YouTube videoId="" apiKey="" play={false}  fullscreen={true} loop={false}/>


Unable to serialize/validate while using “Union” with “Field” in response_model

Question
I'm trying to make the class TableSetting as BaseModel and take it as response_model. But seems like there are some validation or serialization errors in this class. I guess it might be Union or Optional[str] that I ues but not sure.
OS: Ubuntu 18.04.4 LTS
Python version: 3.7.7
Pydantic version: 1.4

from fastapi import FastAPI, Query, Body, Path
from pydantic import BaseModel, Field
from typing import Union, Optional
from enum import Enum

app = FastAPI()

class Tableware(str, Enum):
    SPOON= "SPOON"
    FORK= "FORK"

class TableSetting(BaseModel):
    kitchen: Union[Tableware, Optional[str]] = Field(..., title="I am title")
    numberOfknife: int = Field(None, ge=0, le=4)

@app.post(
    "/{tableNumber}/provide-table-setting",
    response_model= TableSetting,
)

def provide_table_setting(
    *,
    tableNumber: str= Path(...),
):
    results = {"tableNumber": tableNumber}
    return results

The json schema of class TableSetting should look like this
TableSetting{
    kitchen*        I am title{
                        anyOf ->    string
                                    Enum:
                                        [ SPOON, FORK ]
                                    string
                    }
    numberOfknife   integer
                    maximum: 4
                    minimum: 0
}

While performing curl
curl -X POST "http://localhost:8000/2/provide-table-setting" -H  "accept: application/json"
it return errors as follows with response code 500, Internal Server Error , seems like some there are some validation problems with kitchen but I can't figure out why.
INFO:     <IP_ADDRESS>:53558 - "POST /2/provide-table-setting HTTP/1.1" 500 Internal Server Error
ERROR:    Exception in ASGI application
Traceback (most recent call last):
  File "/home/*****/miniconda3/envs/fastAPI/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 385, in run_asgi
    result = await app(self.scope, self.receive, self.send)
.
.
.
  File "/home/*****/miniconda3/envs/fastAPI/lib/python3.7/site-packages/fastapi/routing.py", line 126, in serialize_response
    raise ValidationError(errors, field.type_)
pydantic.error_wrappers.ValidationError: 1 validation error for TableSetting
response -> kitchen
  field required (type=value_error.missing)

However, when remove 1= Field(..., title="I a title")1 from the code as follows. It's works fine with a response code 200, but since I need 1Item kitchen1 as required, so it's not what I want.
class TableSetting(BaseModel):
    kitchen: Union[Tableware, Optional[str]]
    numberOfknife: int = Field(None, ge=0, le=4)

How can I fix this?
Thanks

Hi @GlennShih
When you write
kitchen: Union[Tableware, Optional[str]] = Field(..., title="I am title")

you expect kitchen to always be set no matter what because of the ... (required value)! You allow None as a valid value thanks to the Optional but that's it!
Since you only set tableNumber in your response, it raises an error !
If you want to make kitchen completely optional, you can just add a default value
Field(None, title='I am a title')


Update installing-on-linux.rst

Fix incorrect folder path in Libuv 'cd' command.

Hi @memark, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!

This seems like a small (but important) contribution, so no Contribution License Agreement is required at this point. Real humans will now evaluate your PR.

TTYL, DNFBOT;

f8aa8484043fa093a1409a1bd6eade0112dac393


Issue - Export Tool

The save image tool doesn't work for large scenes.
When it is empty, it works perfectly, but when it has content (especially big), it doesn't work.

Hello. Browsers don't handle very large canvases well. You can check the dimensions (width, height) in the "stats for nerds" you can display by right-clicking on the canvas and choosing it from the context menu. Alternatively you can save to JSON and we can check ourselves.
Alas, not much we can do (apart from some non-trivial workarounds which we may do at some point, but not right now).


install script git detection should also check for .git

Currently, if nvm was installed not with git, and then git is installed, and then the install script re-ran - it will fail with:
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7766  100  7766    0     0   208k      0 --:--:-- --:--:-- --:--:--  280k
=> Downloading nvm from git to '$HOME/.nvm'
=> fatal: destination path '$HOME/.nvm' already exists and is not an empty directory.
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
=> Appending source string to $HOME/.bashrc
=> Close and reopen your terminal to start using nvm

Either the git detection should also look for a .git directory and fall back to script when .git is not found - or, it should be modified to work in this scenario by stamping the git repo on top of the non-git directory - or, some other idea I haven't thought of.

This was fixed with 68bf93514bdf5d2852ce74819350bed99eb472a6, which also fixed #1212 and closed #1213.


speed receiving is stopped but the speedView is still showing the speed increase.

I stopped the speed from the service side and also set the speed to 0 but it still showing the speed?
binding.speedView.speedTo(speed, 1000) is used for speed setting.

Please share more information about the code and how did you reach the view from your service!

Please share more information about the code and how did you reach the view from your service!

Sorry by default the tremble was on that was the reason It now works perfectly thank you.


Dimension checking in resample

The following behavior caught me by surprise. Not entirely sure if it is intended.
K = 4
psi = np.ones(K)
beta = pybasicbayes.distributions.IsotropicGaussian(mu_0=np.zeros(K), nu_0=0.1, alpha_0=1, beta_0=1)
beta.resample(np.atleast_2d(psi))
beta.mu
beta.resample(psi[:, None])  # psi is (4, 1), seems like an error should be thrown.
beta.mu

Thanks for the library. This is great.

Glad you like it! Some classes are more polished than others. Feedback is very welcome because I've been hoping to rewrite this library with a couple other interested parties.

Further work/rewrites would be wonderful! I'm really attracted to the
idea of modularizing these "steps" in the Gibbs sampler.
I'd also love an example of a simple Gaussian hierarchical model (e.g.,
where mu_0 comes from the output of another Gaussian). Perhaps there's
already an idiom for this that I'm missing?
p.s. Is there any pybasicbayes-esque ARMS or slice sampler planned for
single (hyper) parameters? I could certainly use that.
On 07/08, Matthew Johnson wrote:

Glad you like it! Some classes are more polished than others. Feedback is very welcome because I've been hoping to rewrite this library with a couple other interested parties.

Reply to this email directly or view it on GitHub:
https://github.com/mattjj/pybasicbayes/issues/18#issuecomment-119722548


Homework 3

each of the class have thier own primitive data types and individual getter and setter function for them.
the User class is the parent class of Patient class and the Staff class.
the Staff class is the parent class of Doctor class and the Nurse class.
now in another hierarchy i have created HealthInsurancePlan abstract class as the parent class for PlatinumPlan class , GoldPlan class , SilverPlan class and the BronzePlan class . Each of these plans have their own coverage value and the discount value.
A interface InsuranceBrand is made and a class BlueCrossBlueShield class implements it.
A Billing class is also made for computation methods.
Two methods for computing the amount to paid by customer and insurance company as well as for calculating the premium for staff is made.

Project Video

Metric
Value

alert_status
:white_check_mark: OK

bugs
0

code_smells
8

reliability_rating
A (0 Bugs)Note: A being best, E being worst

security_rating
A (0 Vulnerabilities)Note: A being best, E being worst

vulnerabilities
0


Adding the call to the corr function

The README is missing the call to the corr function that is in the final notebook.

@carlotta94c - can you also take a look at this one please?


Prow: refactor fluid e2e framework and rewrite testcases

Ⅰ. Describe what this PR does
Currently Fluid's prow e2e testcases may be interrupted and left over situations where some CRs (like Datasets and Runtimes) are not cleaned up. The log messages are also in mess.
This PR designs a e2e framework that:

Assemble test cases with a TestFlow containing multiple Steps
Always cleaned up CRs when the test case ends
Timeout testcases when checking status of CRs

Ⅱ. Does this pull request fix one issue?

NONE
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews

/test fluid-e2e-debug

/test fluid-e2e-debug

/test fluid-e2e-debug

It is very nice to split a testcase into multiple steps. If any one step fails, the framework catches the exception and runs the  "back_fn()" to delete the CRs. But there is still one preblem that "back_fn()" fails to delete the CRs which cases the next testcase fails.

/test fluid-e2e-debug

It is very nice to split a testcase into multiple steps. If any one step fails, the framework catches the exception and runs the "back_fn()" to delete the CRs. But there is still one preblem that "back_fn()" fails to delete the CRs which cases the next testcase fails.

You're right. That's quite a hard case... I think a practical solution may be using PR number(e.g. #2711) and commit hash (e.g. 2e3df85) to create a specific namespace, and run e2e tests in that namespace. This won't block any other commits in either the same PR or other PRs

/test fluid-e2e-debug

/test fluid-e2e-debug

/test fluid-e2e-debug

/test fluid-e2e-debug

/lgtm
/approve


Poller visibility adding new query method to Get all entities of an App

Adding new Query method to get all the entities of an App.
This was required to expose an api to have poller visibility

Good to go !


Goo Beasts Drip Excessively After Pausing The Game For Long Periods of Time.

Not 100% sure if Pausing the game is the exact cause, but it appears to be. The effect is especially noticeable on voxel-dense parts of models.

Related to #776 , maybe...?


The error of '/ by zero' will random occurs when query from the table.

'/ by zero ' could come in the scenario when the ('int noOfTasksPerNode = parallelism / mapOfNodes.size();' )  noOfTasksPerNode is zero.
The noOfTasksPerNode  can return 0 when parallelism is less the mapOfNodeds.size()

pr merged closing the issue


2fa enable error

Jdk 16
server version paper1.17
server log    https://pastebin.com/aPABhznt
Plugins (36): 2FA*, AdvancedAchievements, AdvancedNMotd, Citizens, CMI, CMILib, CoreProtect, DungeonsXL, FastAsyncWorldEdit (WorldEdit), Gunging_Ootilities_Plugin, HeadDatabase, HoloDropsX, ItemsXL, LangUtils, LiteSignIn, LuckPerms, MMOCore, MMOItem_Shrubs, MMOItems, Multiverse-Core, MythicLib, NoOneFishing, Oraxen, PlaceholderAPI, PlayerPoints, PlayerVaults, PlugMan, ProtocolLib, PvPManager, Residence, SmoothTimber, TAB, Vault, VentureChat, WorldEdit, WorldEditSelectionVisualizer

Enter 2fa enable
There is no response in the game, there will be an error in the log in the background, and after that enter ever 2fa command there will prompt code error .

command

Thank you for contacting me!
I'll go over the error in the following days :)

Hi ods-im,
I've added a message to let players know when the plugin is generating the 2FA.
Depending on your machine, the time it takes to generate the 2FA key & QR code varies.
The error you provided should, however, be fixed through some code improvements :)


Support record deletion

Similar to #34 The SDK needs to support the deletion of existing records in an archive. This might be through a deleteRecord function.

This is related to https://github.com/PermanentOrg/back-end/issues/229 in the back-end repo
https://github.com/PermanentOrg/back-end/issues/229


race control / live timings / various other fixes

fixes #225
fixes #374
fixes #342
fixes #341
fixes #306
fixes #138
fixes #379
fixes #383

I think this likely fixes #319 too

bwoah


Add tenant to all taxonomy endpoints

Back-end:

[ ] /taxonomy/taxonomy/ there is no tenant in header (add tenant dependency)

Description:

Every resource in this module requires Tenant to be accepted as a header.
Example is here

Every time you make a query to the Taxonomy table in the database, tenant should be validated - compare received external tenant and existed entity's one.
Examples: 1, 2
Examples from the annotation service table Categories - which is also using tenants: 1, 2, 3

Probably, models service should be reworked the same way.


Synchronization packets for privilege change

Based on the main text of e-trace spec, the synchronization packets are not yielded for privilege change (e.g. xret):

But the Figure 2. Instruction delta trace algorithm implies that synchronization packets are generated for privilege change.
It would be better to explicitly include privilege change as a condition of synchronization in main text.
Besides, the the privilege field in format 3 subformat 0 says:

Regarding the case with instruction xret, ecall, ebreak, it is better to indicate the the privilege field holds the new privilege after execution of the instruction.

@AoteJin please check that https://github.com/riscv-non-isa/riscv-trace-spec/pull/159 addresses your concern


Missing favicon

Not sure where this came from ...

Do you mean the mangled URL? Probably just a chrome issue.

just wondering where the reference to favicon.ico came from, since there's nothing in our codes that use that.

Oh that's just a default browser setting.


Long wait time in RounterTests.testCallContinuousReplicateTwice

I have noticed that RounterTests.testCallContinuousReplicateTwice has twice 20 seconds (total = 40 seconds) waiting for replicator to become idle inside the code. We need to review if we could bring that waiting time down.

@pasin
This issue is fixed by PR .
Please confirm.


ported fairyfloss and jellybeans

i tried to regenerate the thumbnails but couldn't because of this error, however, i hope everything else is satisfactory

If you don't mind install additional dependency for python, you can try pip install PyYAML first, and run the script again.


CAPZ release process

Epic
Define and implement the release process of CAPA workload clusters.
- [ ] https://github.com/giantswarm/roadmap/issues/2522
- [ ] Implement the release process
- [ ] Update the public documentation

Links

Release process issue;

CAPZ is now using the new release mechanism (see Azure releases).


Single frame GIF with resizeMode="contain" not rendering on Android.

Description
Loading a single frame GIF from network and attempting to display it with resizeMode="contain" causes the image not to render.
Reproduction
Sample app loading a GIF from network and attempting to display it with resizeMode="contain": https://rnplay.org/apps/e3sSDA
Additional Information

React Native version: 0.36.1
Platform: Android
Operating System: MacOS

cc @tyronen

erm @owcs - it seems to work for me?

@owcs - indeed contain works for gifs with multiple frames: https://rnplay.org/apps/WJj35g
I don't think this will be highly prioritized by React Native or Fresco teams as this is a pretty obscure edge case (please don't use single frame gifs, why?? :P), so if you want to try your hand at a fix that would be welcome.

@brentvatne The single frame GIF support is a requirement by the client. Will try to persuade the client to drop that requirement.

Seems better to just use png. It compresses a lot better than gifs.

I just faced the same problem. In my case the gifs come from a cms that I have little influence on and are already being used in other places too. I am agreeing with your arguments as to why png is a better choice than gif, so at least this gives me some leverage to get it changed :)
Maybe it's good to mention this in the Image docs somewhere. Took some searching before I got here and found what caused this.

Indeed not working on android, but as @brentvatne  suggested, lets go for a png :P

So long has not solved this problem

Share my solution:
use react-native-photo-view
{Platform.OS === "android"
            ? <PhotoView
                  style={{
                    width: 100,
                    height: 100
                  }}
                  source={{
                    uri: "https://abc.com/a.gif"
                  }}
                  androidScaleType="fitCenter"
                />
            : <Image
                style={{
                    width: 100,
                    height: 100
                }}
                source={{
                  uri: "https://abc.com/a.gif"
                }}
                resizeMode={"contain"}
              />}

Hi there! This issue is being closed because it has been inactive for a while.
But don't worry, it will live on with Canny! Check out its new home: https://react-native.canny.io/feature-requests/p/single-frame-gif-with-resizemodecontain-not-rendering-on-android

Inactive for a while, but still no fix.
Sent from my Lge LG-H873 using FastHub

As far as I can tell, no one is working on a fix.

Noone working on a fix @@


Add ibc.mock proto definitions

Close: #11
Depends on: #9

[x] Referenced an issue explaining the need for the change
[ ] Updated all relevant documentation in docs
[ ] Updated all code comments where relevant
[ ] Wrote tests
[ ] Updated CHANGES.md

I think we should be careful with introducing custom proto files into the proto crate. The original thinking was that this crate is fully generated by a compiler.
With the current implementation, the proto files should be in the compiler folder. Or maybe we could revisit how we create proto structs.

With the current implementation, the proto files should be in the compiler folder.

I am not sure what you mean by that?

I think we should be careful with introducing custom proto files into the proto crate. The original thinking was that this crate is fully generated by a compiler.

I am not sure what you mean by that either.
By custom proto, do you mean the mock proto file this PR adds? Or the generated Rust code? If the latter, we already package the generated Rust code within the repository, no?
In any case, the Rust code is still fully generated by the ibc-prost-compiler, unless I am missing something?

I agree that those .proto files should probably live in the ibc-rs repo, but until we move ibc-proto there I figured we could include them within this repo.

Yes, the proto files are all right in this repo. The folder name “proto” distracted me. In Tendermint-rs, the folder name proto contains the Tendermint-proto crate. In IBC-rs, I’d like it the same. But if we have custom proto files, we’ll have to figure out what is best. For now, this is good as it is.

From: Romain Ruetschi<EMAIL_ADDRESS>Sent: Tuesday, September 15, 2020 10:42:55 AM
To: informalsystems/ibc-proto<EMAIL_ADDRESS>Cc: Greg Szabo<EMAIL_ADDRESS>Comment<EMAIL_ADDRESS>Subject: Re: [informalsystems/ibc-proto] Add ibc.mock proto definitions (#12)
I agree that those .proto files should probably live in the ibc-rs repo, but until we move ibc-proto there I figured we could include them within this repo.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/informalsystems/ibc-proto/pull/12#issuecomment-692761840, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEAQ6K3P5AWTWQ2VCFLYHMDSF54O7ANCNFSM4RNB2T5A.


.NET Execute: Allow . in process types

https://github.com/paketo-buildpacks/dotnet-execute/issues/350

https://github.com/paketo-buildpacks/dotnet-execute/pull/452


get rid of spurious docker error "no space left on device"

For the nth time (every 1-2 days of dev), docker build (or docker run?) fails with:
base64: write error: No space left on device

Currently at least, I can only reproduce this from within act.
docker build outside of act still works fine, even when producing a big new image with invalidated layers.
This might be a duplicate of https://github.com/nektos/act/issues/60
The disk image on my machine is still within the assigned limit:

This size also checks out. ls -la ~/Library/Containers/com.docker.docker/Data/vms/0:
.rw-r--r--@  26G max  7 Jun 13:35 Docker.qcow2

The usual suggestions don't help/change much:
docker volume prune --force

Total reclaimed space: 0B

docker container prune --force

Total reclaimed space: 439.2MB

docker system prune --force

Total reclaimed space: 2.455GB

This does not affect the error from act.

the only thing that currently helps is:

rm -rf  ~/Library/Containers/com.docker.docker/Data/vms/0/Docker.qcow2
restart the docker daemon
download all upstream images from scratch

obsolete or done in the new yml-based GitHub actions.

You can try:
docker rm $(docker ps -q -f 'status=exited')
docker rmi $(docker images -q -f "dangling=true")


[B] Add labels to error messages and required fields

Resolves WDP-183

@zdavis & @scryptmouse , this PR adds the label to field error messages. An alternative to adding the label  would be to write error message that are label agnostic. For example, take a look at how HTML5 returns error messages:

Do we want to go forward with adding labels to each message, or use language that is label agnostic?

Really good question/suggestion. I never thought about solving this error messaging problem in this way. I'm certainly open to trying it, as I think it's actually pretty challenging to reliably combine field name and validation error message. I'm totally open to taking this approach.

One other thought — we might just want the API to return something more like error.blank or error.invalidEmail that we can pass to our localization system. Are we really going to want to localize these message on the server?

I think the server should be responsible for localizing its errors—a single source of truth vs needing to have localization files in every consumer of the API, and also, I think the server needs the flexibility to add new types of errors without the client knowing about them.
(also, maybe a biased opinion, but Ruby's i18n format & support still seems a lot more refined than what exists in JS land, especially when handling plurals and such)

Fine! :)
Can the server provide error messages with wording like what Jen is proposing?

To make sure I'm following it entirely, we're wanting full messages (with the localized attribute name) vs the predicate format I was returning previously?
Or are wanting the HTML5-style?
The former is trivial, it's just a matter of calling full_message instead of message, though are we okay with duplication in the (semi-rare, but not impossible) instance that an attribute has more than one error?

In that case, I guess I don't really care, but lean slightly toward HTML style error wording because it's simpler. It always kind of bugs me to see the field name repeated when there are multiple errors.

I agree with Zach - it feels repetitive to include the field name in each individual error. The component is written in such a way that the error should be accessible, even if it doesn't include the field name. But while it seems simpler to provide the same message for certain errors, I don't know how complicated it is on the backend.

@zdavis @scryptmouse - I've removed the FE label from error messages so that the errors can be:

handled from the backend
label agnostic (HTML5 style labels) if possible
Do you want me to make a new issue for the backend work?

I also agree about not duplicating the field names. Restructuring the errors to read more like HTML5 is very doable—the strings don't really care how they're formatted, so long as they're consistent, and there aren't that many of them:
https://github.com/NGLPteam/wdp-api/blob/main/config/locales/en.yml are the custom ones, and there are a couple other files in the same directory that I plucked out of the gems we use for validating API inputs with the expectations that we'd adjust wordings.
And a new issue would be great, thank you!


include: nxstyle fixes

Summary
fixes for errors reported by nxstyle tool
Impact
Nxstyle
Testing
NONE

@xiaoxiang781216 please ignore the remaining errors


Updating all "Source Connector" in dynamoDB

Is your feature request related to a problem? Please describe.
Updating all Source Connectors details information on DynamoDB.
Describe the solution you'd like
On /components.list doc we can update from SLIDE 5 TO SLIDE 12.
Additional context
docs reference: https://docs.google.com/presentation/d/1ecTHtSDABuoKZMDhSw5GWycXFKt7VRMnu5jlzOtfnQQ/edit#slide=id.g14827cc91a0_0_12

Closing this as the information is no longer in dynamodb

where did it go then? @chrismatix


Use MultiHostUrl type instead of Union for MongoDsn

Fixed by https://github.com/pydantic/pydantic/pull/7116


Re-package with fully qualified package names

:notebook_with_decorative_cover: Description

Update all package versions to 2020.11.26 to prepare all packages for release
Restructure package folder structure
Update Makefiles and CI jobs

:memo: Checklist

[x] All user-facing changes have changelog entries.
[x] The changes are reflected on docs.tenzir.com/threatbus, if necessary.
[x] The PR description contains instructions for the reviewer, if necessary.

:dart: Review Instructions
File-by-file.
Try the following on your machine (all in a virtual env):

make clean -> remove previous artifacts, if any
make dev-mode
configure some plugins and start Threat Bus
-> expectation: all can be started
make unit-tests
-> expectation: all pass

If that worked, we gonna do the exact same thing for different install targets. Remove your virtual env, setup a new one and source it, then:

make clean
make install
repeat steps from above (run it with config, run unit tests)

Again, if that worked, clean your virtual env, setup a new one and source it. Then

make clean
make dist -> that produces a bunch of dist/ folders, both in top-level threatbus as well as in each plugin directory
install Threat Bus and plugins from the created dist/XXX.tar.gz artifacts via pip install /path/to/dist/XXX.tar.gz
repeat steps from above (run it with config, run unit tests)

@satta With this PR we can build packages from within their respective source directory instead of repository root.

Works for me, with the exception of the code dependent on broker. Also, I had to install librdkafka and the Python dev headers, but that's hardly Threat Bus's responsibility. :+1:


Marshalling 'undefined' property

If a stored value is undefined, it is store as a string 'undefined'. Would it be feasible to marshall/unmarshall undefined properly? Possibly null value as well.

Hmm.  How would we tell they wanted it to be the value undefined instead of the string "undefined"? What if the next person says, "Hey, i need to store the string 'undefined', but it keeps getting turned into the value undefined?" If we have to start storing the type with the value, things get icky. And how are you storing undefined? It must be with a different library or directly in the localStorage/sessionStorage interface, because store2 would refuse to persist it if you passed the value undefined. It does handle the value null, just fine, by the way. You can store('foo', null) and it will return null for store('foo') and return true for store.has('foo'). But we don't support turning "undefined" into undefined, and i'm not convinced we should.

Yes, this sounds reasonable. At the moment I use a simple custom function to unmarshall the string "undefined" into undefined, but I know that I store numbers under the key, so no conflicts appear.

Yeah, a custom function or plugin sounds like the best move here.


Refactor api-versioning.md Developer doc

Changes
This commit refactors the api-versioning.md developer doc which
previously mixed API versioning and feature versioning. The API-driven
feature versioning was mingled with the process of adding a new CRD
apiVersion.
To have better clarification of the difference between API versioning
and the feature versioning, a new Markdown file feature-versioning is
introduced in light of TEP-0138.
/kind documentation
part of #6965

Submitter Checklist
As the author of this PR, please check off the items in this checklist:

[x] Has Docs if any changes are user facing, including updates to minimum requirements e.g. Kubernetes version bumps
[n/a] Has Tests included if any functionality added or changed
[x] Follows the commit message standard
[x] Meets the Tekton contributor standards (including functionality, content, code)
[x] Has a kind label. You can add one by adding a comment on this PR that contains /kind <type>. Valid types are bug, cleanup, design, documentation, feature, flake, misc, question, tep
[n/a] Release notes block below has been updated with any user facing changes (API changes, bug fixes, changes requiring upgrade notices or deprecation warnings). See some examples of good release notes.
[n/a] Release notes contains the string "action required" if the change requires additional action from users switching to the new release

Release Notes
NONE

Thanks for the review @QuanZhang-William !
This is a cleanup of docs before introducing the docs in https://github.com/tektoncd/pipeline/pull/7090. There were some updates mingled in this PR which I've removed in the update. TY!

Given second thought, I've noticed the confusion it might be for adding the explanation of behavioural flags in this PR. So I removed the part mentioning behavioural flags to avoid being misleading. While this PR mainly serves as a doc cleanup, I have updated the issue tracking this https://github.com/tektoncd/pipeline/issues/6965#issue-1818588964 instead.
Also I've tried to combine this PR in #7090 .
Thanks to the reviews/comments from @QuanZhang-William for letting me understand such potential confusions.

Closing this as https://github.com/tektoncd/pipeline/pull/7090 has already been merged.


Unnecessary call in UserManager

At line 716 in the UserManager class on the dev branch, there is an seemingly unnecessary call to the GetSecurityStore method.  It isn't assigned to a variable, so it isn't serving much of a purpose.
https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNet.Identity/UserManager.cs#L716

GetSecurityStore throws if the store doesn't support the operation
https://github.com/aspnet/Identity/blob/dev/src/Microsoft.AspNet.Identity/UserManager.cs#L682


Fix Specific Funding Target showing infinite when switching from inifinite to specific

What does this PR do and why?
Provide a description of what this PR does. Link to any relevant GitHub issues, Notion tasks or Discord discussions.
Screenshots or screen recordings
If applicable, provide screenshots or screen recordings to demonstrate the changes.
Acceptance checklist

[ ] I have evaluated the Approval Guidelines for this PR.
[ ] I have tested this PR in all supported browsers.
[ ] I have tested this PR in dark mode and light mode (if applicable).

Current dependencies on/for this PR:

main

PR #2348

PR #2349

PR #2350

PR #2351

PR #2368

PR #2369

PR #2370

PR #2371


NPE thrown

I am trying to use this with the generic editor for YAML files, but it throws this exception:
java.lang.NullPointerException
	at org.eclipse.tm4e.core.model.Tokenizer.tokenize(Tokenizer.java:49)
	at org.eclipse.tm4e.core.model.AbstractTMModel._updateTokensUntilLine(AbstractTMModel.java:533)
	at org.eclipse.tm4e.core.model.AbstractTMModel.lambda$0(AbstractTMModel.java:494)
	at org.eclipse.tm4e.core.model.AbstractTMModel._withModelTokensChangedEventBuilder(AbstractTMModel.java:435)
	at org.eclipse.tm4e.core.model.AbstractTMModel._revalidateTokensNow(AbstractTMModel.java:448)
	at org.eclipse.tm4e.core.model.AbstractTMModel.access$3(AbstractTMModel.java:447)
	at org.eclipse.tm4e.core.model.AbstractTMModel$BackgroundThread.run(AbstractTMModel.java:200)

I am using this grammar file:
https://raw.githubusercontent.com/textmate/yaml.tmbundle/master/Syntaxes/YAML.tmLanguage
and configured the extension like this:
   <extension
         point="org.eclipse.tm4e.core.grammars">
      <grammar
      		scopeName="cf.manifest.yml"
            path="./syntaxes/YAML.tmLanguage" >
      </grammar>
      <scopeNameContentTypeBinding
            contentTypeId="org.springframework.boot.ide.manifest.yml"
            scopeName="cf.manifest.yml">
      </scopeNameContentTypeBinding>
   </extension>

Any idea what is going wrong here?

This error comes from that tm4e cannot find your grammar. The reason is that scopeName declared in the extension point should be the same than scopeName of your grammar
<key>scopeName</key>
<string>source.yaml</string>

. In other words you should use source.yaml and not cf.manifest.yml.
Please try and it should work:
   <extension
         point="org.eclipse.tm4e.core.grammars">
      <grammar
      		scopeName="source.yaml"
            path="./syntaxes/YAML.tmLanguage" >
      </grammar>
      <scopeNameContentTypeBinding
            contentTypeId="org.springframework.boot.ide.manifest.yml"
            scopeName="source.yamll">
      </scopeNameContentTypeBinding>
   </extension>

Ah, right, I see, that works indeed. Many thanks!!!
I get the nice coloring. But I wonder why some values are sometimes rendered black instead of the nice color.
When I put something in like:
applications:
- name: hello

"hello" is rendered nicely. When I change that to "hellotest", it is rendered in black. Do you know why that happens?

Many thanks!!!

But I wonder why some values are sometimes rendered black instead of the nice color.

I think it's the same bug than https://github.com/angelozerr/textmate.java/issues/31 https://github.com/angelozerr/textmate.java/issues/5
I suppose you have some feature which invalidate the text presentation of StyledText like validation, occurrences, folding, etc which update StyledText which causes this problem.
As it's not possible to have the editor of each people to test each problem, I have decided to provide a Test generator https://github.com/angelozerr/textmate.java/issues/33 which will register each command (when text changed, when textviewer is invalidated, etc) and will generate a JUnit Java class with the problem. So after you will able to open your editor, play with your editor and close your editor and it will generate you a JUnit Java class with your commands. It will be easy for me to fix problem with your generated Java test class. I will try to finish my work this night.

@martinlippert please retry with master. I have fixed a little bug. I don't know if it will fix your problem.

@angelozerr that seems to fix it, thanks!!!


groupby(multi-index level) not working correctly on a multi-indexed DataArray or DataSet

What happened?
run the code block below with 2022.6.0
midx = pd.MultiIndex.from_product([list("abc"), [0, 1]], names=("one", "two"))

mda = xr.DataArray(np.random.rand(6, 3), [("x", midx), ("y", range(3))])

mda.groupby("one").groups

output:
In [15]: mda.groupby("one").groups
Out[15]:
{('a', 0): [0],
 ('a', 1): [1],
 ('b', 0): [2],
 ('b', 1): [3],
 ('c', 0): [4],
 ('c', 1): [5]}

What did you expect to happen?
as it was with 2022.3.0
In [6]: mda.groupby("one").groups
Out[6]: {'a': [0, 1], 'b': [2, 3], 'c': [4, 5]}

Minimal Complete Verifiable Example
import pandas as pd
import numpy as np
import xarray as XR

midx = pd.MultiIndex.from_product([list("abc"), [0, 1]], names=("one", "two"))

mda = xr.DataArray(np.random.rand(6, 3), [("x", midx), ("y", range(3))])

mda.groupby("one").groups

MVCE confirmation

[X] Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
[X] Complete example — the example is self-contained, including all data and the text of any traceback.
[X] Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
[X] New issue — a search of GitHub Issues suggests this is not a duplicate.

Relevant log output
N/A

Anything else we need to know?

There is a lot of complexity related to pandas.MultiIndex special cases and it's been difficult to avoid new issues arising during the index refactor.
create_default_index_implicit has some hacks to create xarray objects directly from pandas.MultiIndex instances (e.g., xr.Dataset(coords={"x": pd_midx})) or even from xarray objects wrapping multi-indexes. The error raised here suggests that the issue should fixed before this call... Probably in safe_cast_to_index indeed.
We should probably avoid using .to_index() internally, or should we even deprecate it?  The fact that mda.one.to_index() (in v2022.3.0) doesn't return the same result than mda.indexes["one"] adds more confusion than it adds value. Actually, in the long-term I'd be for deprecating all pandas.MultiIndex special cases in Xarray.

From #7282 it looks like we need to convert the multi-index level to a single index when casting the group to an index. And from #7105 we can fix that in safe_cast_to_index() (sometimes the full multi-index is expected) so we probably need a special case in groupby.

Is there hope for groupby working on multi-indexed DataArrays again in the future? We -- and from the issue history it looks like others too -- are currently pinning xarray<2022.6 even though we would love to use newer versions.

I think we could special-case extracting a multiindex level here:
https://github.com/pydata/xarray/blob/d4db16699f30ad1dc3e6861601247abf4ac96567/xarray/core/groupby.py#L469
group at that stage should have values
['a', 'a', 'b', 'b', 'c', 'c']

@mschrimpf Can you try that and send in a PR?

A special-case sounds reasonable to me as well as a temporary fix before looking into if/how we can refactor groupby so that it works with multiple kinds of built-in and/or custom indexes.

I solved it temporarily by reset_index to groupby and set_xindex after, if anyone is looking.

This is happening again :(

@carynbear please could you post a reproducible example? A new bug report would be ideal...


Accept incoming p2p connections

What current issue(s) does this address, or what feature is it adding?
FIx https://github.com/CityOfZion/neo-python/issues/522
How did you solve this problem?
Add endpoint for incoming connections, implemented first part of RemoteNode.StartProtocol() routine up to verack checking
How did you make sure your solution works?
manual testing
Are there any special changes in the code that we should be aware of?
Yes. I'm aware that our NeoNode is implemented differently that the C#'s equivalent RemoveNode due to historical performance issues. Due to the way it's structured now I had to squeeze in the Version and Verack payload sending in different locations unlike the StartProtocol routine in C#. I also did not go as far as implementing the sequence for getheaders (here)  and getblocks as we already can update our own state using the peers that we connect to. It would keep the code a bit simpler. Interested to hear if this should still be added
Please check the following, if applicable:

[ ] Did you add any tests?
[X] Did you run make lint?
[X] Did you run make test?
[X] Are you making a PR to a feature branch or development rather than master?
[X] Did you add an entry to CHANGELOG.rst? (if not, please do)

Coverage decreased (-0.05%) to 80.129% when pulling c810dd48f570703222fb6abc4dd61c9022608e16 on ixje:accept_p2p into ef4d33f8f117a258254e631c066cfb0653d9c7b1 on CityOfZion:development.

don't merge yet. I spotted a missed commit and might be on to a bug. investigating now

For what it's worth; I wrote a small test program that completes the handshake against a C# client, then did the same against neo-python with this PR and that now passes after the above fixes.

@localhuman let me know what insights you want for this PR to pass. I could share the test program on discord if that helps in building confidence.

It's not clear to me if you want me to validate other possible incoming requests in this PR or not

fyi; working on it. There are indeed some missing requests and requests that get handled incorrectly.

So I tested this as follows;

run a private net
let neo-python sync, then exit
disable connecting to seeds in neo-python and run instance again to avoid C# client grabbing blocks via connected seeds
set C# client seedlist to neo-python instance only (same reason as above)
let C# client sync (=is successful)
compare blocks from neo-python with C# RPC output (they're equal)

If you want to test it yourself you might need to increase the CONNECTED_PEER_MAX from 5 to 6 or higher because for some reason there's always 1 privatenet node that's connected twice and therefore you'll get a connection rejected.
https://github.com/CityOfZion/neo-python/blob/ba815b870614d01f9295d934c8dc3a172765e1aa/neo/Network/NodeLeader.py#L172
The alternative is commenting out the code for connecting to the seeds
https://github.com/CityOfZion/neo-python/blob/ba815b870614d01f9295d934c8dc3a172765e1aa/neo/Network/NodeLeader.py#L110-L114

Looks good! Going to try it out for a day or two and see how it goes

Seems pretty good after running for a while.  One thing, could you turn off print_payload=True 😉

Looks good! just need to fix the changelog and we're ready to go 🎉


Removing ContainerManifest

#8087
cc @caesarxuchao @nikhiljindal @bgrant0607
@dchen1107 Please double check pkg/kubelet/config/file_test.go and other kubelet changes.

I only reviewed kubelet related pieces, that lgtm.

I'm OOO right now, but occasionally checking in on this one. Is there anything left that I need to do?

I'm still not sure about nonRoundTrippableTypes, but it shouldn't prevent this PR to be merged. Thank you. LGTM.

I think it's fine to leave nonRoundTrippableTypes in the code for now.

Milestone?

@bgrant0607 could you set triage it? I don't think I have the right to set the milestone.

This is ok to go in, but the test failures need to be fixed.

The only test failure I saw was what looked to be a flaky shippable build,
and I couldn't figure out how to rerun it. Did the e2e fail? I'm on my
phone and can't really see the test statuses.
On Jun 18, 2015 5:58 PM, "Brian Grant"<EMAIL_ADDRESS>wrote:

This is ok to go in, but the test failures need to be fixed.
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/pull/9807#issuecomment-113332341
.

@k8s-bot ok to test

Close and re-open the PR to trigger shippable

Rebased

I fixed the mesos test failure that relied on Pod name defaulting logic in kubelet.

Thanks @krousey. LGTM. @bgrant0607, could you give the second LGTM? Thanks.

LGTM. We can do the v1beta3->v1 conversion later, if necessary.


when graphics drivers crash : warn user and close godot zombie, fixes #6502

edit : The generic purpose of this patch is to detects when the GLES2 module turns Godot into a zombie process because the graphics drivers crashed in the middle of a blocking process.
Under Windows, AMD drivers around version 16.7.3 have a bug that make
them crash and reset on OpenGL initialisation when DualGraphics
CrossFire is enabled. (edit : this bug exists since at least DOOM3 and RAGE release, and is thus not likely to be fixed anytime soon by AMD.)
Godot.exe will then become a zombie process.
This hack/workaround adds a timeout mechanism that will warn and inform
the user that the timeout might be caused by a buggy graphics driver,
and that will kill the Godot zombie process.
The timeout is set to occurs after 10 seconds.
When AMD will have fixed their drivers, this workaround will be
transparent and might be removed. (edit : this bug exists since at least DOOM3 and RAGE release, and is thus not likely to be fixed anytime soon by AMD.)
Fixes #6502

As you mentioned in #6502, this is a drivers bug that affects many applications, so I don't believe that we should try to work it around in Godot. AMD just has to fix its driver, and the more applications that crash on it, the higher the pressure (or their losses, if they don't act).

@Akien :
Average users won't even be aware that the problem come from AMD drivers. They will think that Godot or the game developped with godot is just one more crappy buggy software.
If they bought your game on Steam, they will call for a refund.
Thanks to this patch, when the AMD drivers crashes, users are informed that the problem is not from godot or from the game, and that there are solutions that will allow them to play the game (disabling crossfire).
It is exactly like when godot silently crashed because of uncompatible opengl drivers.
AMD or Intel or Nvidia will never ashamed if the user don"t know why the game crashe.
The warning message that is displayed is this one :
Warning : OpenGL initialisation timeout reached.

- if your system has an AMD DualGraphics with Crossfire
enabled and if your graphics drivers have just crashed, it is because these
graphics drivers contain a bug. Disable Crossfire into the AMD Crimson Radeon
Parameters or try to update your AMD drivers, and run this program again.
If it still does not work, send a bug report to AMD so they fixe their drivers.
- else, please, contact the developers of this program.

Well trust me, if RAGE from id Software crashes the same way, then probably hundreds of OpenGL applications would crash the same way, which means:

this driver version is utterly broken
it's a matter of weeks until AMD fixes it - if not, they will lose market shares if most AMD users on Windows end up not being able to play their cool games since they bought DualGraphics card.

seems like one of us is too pessimistic while the other is too optimistic.
this issue is there since at least version 15.2 which was released last year.
back in 2010 some users were complaining about similar issue that were regressions that were supposedly fixed but were not.
today we are at 16.7 and it is still there.
AMD devteam is slow and mainly focussed on recent DirectX AAA games.
Godot 2.2 could be released before AMD release a WHQL driver that fixes this issue.
And regressions might happen again in the AMD drivers.
This PR cost nothing to add to godot.
It just a safety mechanism.
If it is not merged in official godot, i'll just have to keep my own branch.

To reply to your edit :
it makes no sense to add a hack that looks for a timeout and says "maybe it's an AMD DualGraphics bug, maybe not". It's not our role to do proprietary drivers' QA.
Right now, we know WHY it crashes this way : this is beause of AMD drivers and nothing else could trigger this timeout, because the way it crash is very special.
Chances that this timeout is reached because of AMD drivers is almost 100%.

also, did we do some Intel/AMD/Nvidia QA with this already ??
https://github.com/godotengine/godot/pull/5909/commits/a155342eca0bf4417838e9d4f081450014f47e11
`Your system's graphic drivers seem not to support OpenGL 2.1 / GLES 2.0, sorry :(
Try a drivers update, buy a new GPU or try software rendering on Linux;

also, didn't we do some Intel/AMD/Nvidia QA with this already ?? a155342

No, that's checking the capabilities of the drivers, not working around a bug in the drivers. It's not a bug that drivers don't support OpenGL 2.1, it's a limitation (whether hardware or software, it depends).
Anyway, it's just my opinion, you don't have to take it personally and other contributors might find your PR good to merge.

Your opinion counts a lot more since your in the devteam and since you choose to merge or not PR.
So if i disagree with your opinion i'm forced to explain why.

As a godot user I'm inclined to support @SuperUserNameMan 's arguments here, however I do feel that the wording of the error message could be improved.
Warning : OpenGL initialisation timeout reached.

- This is likely caused by a graphics driver issue with SLI or Crossfire since Graphics hardware vendors tend not to support multi-GPU rendering for OpenGL well or at all. Try disabling SLI/Crossfire in the respective driver settings manager and try launching this program again to see if that solves the issue.

might be more fitting, also before this gets commit(if it is at all) it should be tested on a Nvidia SLI setup as well. Chances are the same or similar issue exists on that platform as well, however the fix needs to work there as well.

I don't know details (can't test), but TerminateThread() should be never used, especially not in this case. I think is better to detach the thread and let it finish in background:
bool *br = (bool *)lpParam;
Sleep(5000)
if (*br) {
    delete br;
    return 0;
}

...

bool *br = new bool(false);
opengl_init_timeout_thread_hd = CreateThread(NULL, 0, opengl_init_timeout_thread_cb, br, 0, NULL);

//init opengl

*br = true; // Part of the hack above
CloseHandle(opengl_init_timeout_thread_hd); // Part of the hack above, detach thread

In this solution thread will be properly closed by changing the br variable instead of terminating it. CloseHandle() should detach the thread.
Or better - use e.g. Sleep(10) in the loop which checks for br and wait for thread before closing the handle, then allocating br via new won't be necessary.

@zaps166 :
well, maybe I interpreted microsoft recommendations and warnings in a too optimistic way by thinking that the sleep(5000) was code in my control ?
You should call TerminateThread only if you know exactly what the target thread is doing, and you control all of the code that the target thread could possibly be running at the time of the termination.

Though, extra safety can't hurt.
I'll update this patch with a cleaner thread termination.

So I've updated the code to make it safer, and also, I've reformulated the warning message to make it more "universal" and less "AMD bug" centered.
The generic purpose of this patch is now detects when the GLES2 module turns Godot into a zombie process because the graphics drivers crashed in the middle of a blocking process.
If no one complain, I will rename this PR to reflect this more general/universal purpose.
The new warning message is :
You're seeing this message because your graphics drivers
failed to initialize, which means that they are likely to contain a bug.
If applicable, disable Crossfire or SLI into your graphics card parameters
and/or update your graphics drivers, and run this program again.
If this problem persists, please, send a bug report to the developers of
your graphics drivers and/or to the developers of this program.

@zaps166 : i've followed MSDN recommendations about exiting a thread the good way.
Thanks for encouraging me to make this patch safer.

Now it doesn't terminate thread, but maybe too complicated :)
Is it possible to remove the do{}while() loop and use: WaitForSingleObject(opengl_init_timeout_waitevent_hd, 5000); instead? It fails after ~5 seconds. Otherwise it finishes earlier (after SetEvent()).

The default time resolution is ~10 ms or ~16 ms in Windows. It can be changed to ~1 ms using https://msdn.microsoft.com/en-us/library/windows/desktop/dd757624(v=vs.85).aspx (it can be changed to lower by any other process e.g. web browser or video player).

@zaps166 :
Well, at first read, I misunderstood your message. I thought you were saying that the thread remained active (`"the thread doesn't terminate").
So yes, the thread is no more terminated, but is ended carefully.
I did not use WaitForSingleObject( hndl, 5000 ); like you propose, because the WaitForSingleObject( hndl, 1000 ); of the main thread would be blocking for a too long time.
And making it unblocking might lead to call CloseHandle() too early.
I don't know what happens when an Handle is closed too early. And I don't want to guess.
What I know is that this handle is closed a few milliseconds after the thread has ended.
So, yes, the solution I propose looks over-complicated, but IMO it is safe and tolerant to random slowdowns that might occur during a high CPU load, and the timeout duration is under control.
I tested it on real hardware various ways, and I found no problem, nor any extra cost for Godot.

hmm, let me rethink about it

yes, you are correct, do while is not required.
I kept thinking about WaitForSingleObject() like if it was a blocking Sleep() when it is obviously not.

Right, WaitForSingleObject should exit immediately (as fast as Windows can :smile:) after setting an event in other thread, so the code will be simpler :)

OKAAAAAY, now, it is safer, and simpler.

:+1:

Nice, the wording is still a little strange IMO:

disable Crossfire or SLI into your graphics card parameters
and/or update your graphics drivers, and run this program again.

for clarity maybe change it to:

disable Crossfire or SLI in your graphics driver manager
and/or update your graphics drivers, and run this program again.

But this does look a lot better to me already. :)

the maximum timeout delay needs to be increased beyond 10 seconds.
I got the timeout on my laptop when I tried to launch Godot while GitHub Desktop was still launching itself in the background. (high and long CPU load).
And the AMD drivers did not crash.

I have slightly increased the timeout delay to 14 seconds.
It should be "compatible" with the average user's patience level.
Also, I've added an extra 7 seconds timeout after the MessageBox just in case the GLES2 driver manage to initialize while the user was reading the messagebox. (it is likely to happen when the CPU/disk is under very heavy load).
Which mean that the drivers have more than 21 seconds to initialize before Godot is considered as a zombie process and is killed.

I guess that's not going to be as useful in the upcomming 3.0, plus there are some merge conflicts (and it is windows-only, eww), so I guess I can, uhm, close it :smiley:

sure, given the fact that AMD has still not fixed this bug, that the upcoming 3.0 is still based on opengl, and that this bug does not affects nvidia/linux/mac/android/winrt/single-gpu users, i guess you can, uhm, close it.

@SuperUserNameMan But the bug is still AMD's.
If a new linux kernel rolls out a patch which crashes all applications with name "Godot", should we fix it, or should we leave linux to fix it (quickly)? Obviously no, it is linux's problem.

yeah, indeed, if we're going to discuss it with the same arguments, "opinions" and linux/OSS/antiAMD/antiMS biased state of minds again and again, it's simpler to read the thread again and again.
The summary ;

AMD does not care about this bug.
It's been here for years.
it will stay forever because Vulkan is the future, and dual-gpu users are minority.
Godot games will crash dumbly for dual-gpu users.

Final victims : dual-gpu users ; Godot game developers ; and Godot engine.
Even if not merged, this PR is archived and will make this workaround available to any game developer who actually care about its customers.
THE END.


Support for Xaml Island

Is it possible to use the Xaml Island with this crate in Rust?
It seems that it's very difficult to create the DesktopWindowXamlSource class which is under a ComposableAttribute and should be created via a factory class(IDesktopWindowXamlSourceFactory) which is undocumented.
If further efforts are planed to make, I am wondering if you could share any information on when that will be scheduled? Thanks.

Support for composable types (specifically deriving

It should be possible, although it is not simple. There are a few issues that need to be addressed before broader Xaml support becomes more feasible including #119 #92 #91 and #81
We're working hard at these remaining issues. It may still be some time, but the goal is to make procedural Xaml (at the very least) very simple with Rust.

I've got a working XAML Island, see https://github.com/roblabla/ubuntu-installer
In particular the DesktopWindowXamlSource can be created with winrt::factory, see https://github.com/roblabla/ubuntu-installer/blob/master/src/main.rs#L33

Yes, once we're done you'll be able to use use something like this:
let source = DesktopWindowXamlSource::new()?;


flaky test: TestInfo hang

=== RUN   TestInfo
  TestInfo
    TestInfo 2022/04/19 01:36:40.973465 juicefs[25119] <INFO>: Meta address: redis://<IP_ADDRESS>:6379/10 [interface.go:383]
2022/04/19 01:36:40.974486 juicefs[25119] <WARNING>: AOF is not enabled, you may lose data if Redis is not shutdown properly. [info.go:83]
2022/04/19 01:36:40.974662 juicefs[25119] <INFO>: Ping redis: 123.752µs [redis.go:2604]
2022/04/19 01:36:40.975115 juicefs[25119] <INFO>: Data use file:///tmp/TestInfo1925778252/001/test/ [format.go:409]
2022/04/19 01:36:40.976268 juicefs[25119] <INFO>: Volume is formatted as {Name:test UUID:85f0a91b-5df2-4ed7-a424-09a582ca0bcc Storage:file Bucket:/tmp/TestInfo1925778252/001/ AccessKey: SecretKey: BlockSize:4096 Compression:none Shards:0 HashPrefix:false Capacity:0 Inodes:0 EncryptKey: KeyEncrypted:false TrashDays:1 MetaVersion:1 MinClientVersion: MaxClientVersion:} [format.go:447]
2022/04/19 01:36:40.976873 juicefs[25119] <INFO>: Meta address: redis://<IP_ADDRESS>:6379/10 [interface.go:383]
2022/04/19 01:36:40.977759 juicefs[25119] <WARNING>: AOF is not enabled, you may lose data if Redis is not shutdown properly. [info.go:83]
2022/04/19 01:36:40.977893 juicefs[25119] <INFO>: Ping redis: 90.819µs [redis.go:2604]
2022/04/19 01:36:40.978858 juicefs[25119] <INFO>: Data use file:///tmp/TestInfo1925778252/001/test/ [mount.go:286]
2022/04/19 01:36:40.979038 juicefs[25119] <INFO>: Disk cache (/var/jfsCache/85f0a91b-5df2-4ed7-a424-09a582ca0bcc/): capacity (102400 MB), free ratio (10%), max pending pages (15) [disk_cache.go:90]
2022/04/19 01:36:40.980218 juicefs[25119] <INFO>: create session 1 OK [base.go:184]
2022/04/19 01:36:40.981263 juicefs[25119] <INFO>: Prometheus metrics listening on <IP_ADDRESS>:35581 [mount.go:157]
2022/04/19 01:36:40.981891 juicefs[25119] <INFO>: Mounting volume test at /tmp/jfs-unit-test ... [mount_unix.go:172]
2022/04/19 01:36:41.480096 juicefs[25119] <INFO>: OK, test is ready at /tmp/jfs-unit-test [mount_unix.go:45]
16468:M 19 Apr 2022 01:37:22.044 * 100 changes in 300 seconds. Saving...
16468:M 19 Apr 2022 01:37:22.045 * Background saving started by pid 25170
25170:C 19 Apr 2022 01:37:22.047 * DB saved on disk
25170:C 19 Apr 2022 01:37:22.048 * RDB: 0 MB of memory used by copy-on-write
16468:M 19 Apr 2022 01:37:22.145 * Background saving terminated with success

Tracked in #3105


SVG dropshadow filter not rendered

version: wkpdf 0.6.1
To replicate:

Create an HTML file with inline SVG content with a dropshadow (see below for example).
Run wkpdf.

expected: Faithfully rendered graphic in PDF.
result: The actual shape is rendered correctly in the PDF but the dropshadow is omitted.
SVG sample:
https://gist.github.com/1994389

Note: css box-shadow property is rendered correctly, so it may be possible to workaround in some instances.

Please add an example of the complete HTML document with the inline SVG.

I'm actually getting no output from inline SVG on my laptop, will try again from office computer next week. Think there is a version mismatch.


bazel cc_grpc_library not working as expected

Hi,
I've been trying to use the cc_grpc_library rule for Bazel version 0.4.5 (which introduced the native proto_library support).
However, it looks like the document on the cc_grpc_library is different from what it is actually doing:
The document in bazel/cc_grpc_library.bzl mentions the following
  Arguments:
      srcs: a single proto_library, which wraps the .proto files with services.

In reality, this srcs is passed to native.proto_library's srcs argument, which requires a list of *.proto or *.protodevel
  native.proto_library(
      name = proto_target,
      srcs = srcs,
      deps = proto_deps,
      **kwargs
  )

Is this expected or this cc_grpc_library is not yet ready for projects outside gRPC?
Thanks

The semantic of the argument probably mutated without the associated documentation update, thanks for bringing that up. Since proto_library had issues with Bazel we had to change this around, indeed. Our goal eventually became to provide a replacement of proto_library, waiting for proper Bazel support.
In all cases, you should be able to use grpc_proto_library instead, and we should make sure this rule stays the same moving forward. It's supposed to be used as a replacement of proto_library and provides both the generation of the .pb.{cc,h} and .grpc.pb.{cc,h} files. You can see an example of that at the root of the example folder.


Paper lantern quick-search does not function on Cloudflare plugin page

cPanel version <IP_ADDRESS>
Cloudflare plugin version 6.1.2
After opening the Cloudflare page in cPanel, the paper lantern quick search feature no longer works. If you enter anything in to the box, the quick-search drop-down does not functional at all.
Image 1 - How it works on every other cPanel page:

Image 2 - How it works on the Cloudflare plugin page, note "add" is entered in to the box with no dropdown. The box is empty when the page is initially loaded.

Exact steps to replicate:

Log in to cPanel for an account on the paper_lantern theme, "basic" style.
Navigate to the Cloudflare plugin page
Attempt to search for cPanel pages in the search drop-down

Issue:
No results are returned from the paper_lantern search box. Only occurs when on the Cloudflare page.

@thellimist is your cPanel env on 60?  I only have 62.

@jwineman No problem! I've actually been noticing this stuff for a while, but only recently saw how responsive you guys are on github. Its awesome you are staying on top of bug reports, and I'm happy to be able to help get some issues fixed. 👍


Angular 2-way binding not working in 3.7.0

Sir,
Recent update in the component just broke 2 way binding in Angular 8 (TypeScript). Jexcel cell view values are not reflecting in angular components. It is working with v3.4.4. Request to please look into the issue.

Sir,
I added a save button in your example for angular to reproduce the issue.
Data from the component is populating in JExcel grid but if we update the Jexcel grid component data (logged in alert on save click) is not getting updated.
This is happening in jExcel 3.7+ versions. 2 way binding works well with older version. I have verified with the same example in v3.4.
https://codesandbox.io/s/jexcel-and-angular-hrbpl


redirect_unauthenticated_users will cause raise_exception to be ignored

When chaining LoginRequiredMixin and another AccessMixin, setting raise_exception = True and redirect_unauthenticated_users = True doesn't seem to do the right thing.

I tried to replicate this but it passed the test (I got a 302). Did you expect the redirect to happen instead?

@kennethlove : I think this issue is related to issue #161 (redirect loop).
[snip]
[10/Aug/2015 16:21:56]"GET /profiles/list/ HTTP/1.1" 302 0
[10/Aug/2015 16:21:56]"GET /accounts/login/?next=/profiles/list/ HTTP/1.1" 302 0
[10/Aug/2015 16:21:56]"GET /profiles/list/ HTTP/1.1" 302 0
[10/Aug/2015 16:21:56]"GET /accounts/login/?next=/profiles/list/ HTTP/1.1" 302 0
[snip]

I've just stumbled upon the same situation. In the following view, I want to check that the user is authenticated and that it belongs to the appropriate group. If the user is not authenticated, I want it to be redirected to the LoginView. If it is authenticated, but does not belong to the right group, I want an exception to be rised.
class UserProfileListView(LoginRequiredMixin, GroupRequiredMixin, ListView):
    group_required = u"Academic Administrator"
    raise_exception = True
    redirect_unauthenticated_users = True

    pass

NOTE: Actually, this problem occurs even without having LoginRequiredMixin as one of the parents.
The problem resides in the method handle_no_permission from the class AccessMixin:
    def handle_no_permission(self, request):
        if self.raise_exception and not self.redirect_unauthenticated_users:
            if (inspect.isclass(self.raise_exception)
                    and issubclass(self.raise_exception, Exception)):
                raise self.raise_exception
            if callable(self.raise_exception):
                ret = self.raise_exception(request)
                if isinstance(ret, (HttpResponse, StreamingHttpResponse)):
                    return ret
            raise PermissionDenied

        return self.no_permissions_fail(request)

The problem is twofold: first, the fact that the default behaviour is a redirection to the login page, and second, how the flag redirect_unauthenticated_users is being used. Consider the following situations:

if the flag raise_exception is False, the default behaviour is to redirect the user to the login page. However, if the user is already authenticated, the user is redirected back to the page for which it didn't have permissions, thus closing the loop.

if the flag raise_exception is True and the flag redirect_unauthenticated_users is False, an exception is raised (as expected).

if the flag raise_exception is True and the flag redirect_unauthenticated_users is True, the user is redirected to the login page with independence of whether or not the user is authenticated. If the user was already authenticated, we run again into the situation described in (1) above.

The solution I'd propose is to refactor the method handle_no_permission to simply raise an exception or redirect the user somewhere other than the login page. This other page to redirect to should be indicated by the programmer by setting the variable redirect_to_url. One of the two behaviours has to be defined by the programmer (raising an exception or redirecting the user).
    def handle_no_permission(self, request):
        if not (self.raise_exception or redirect_to_url):
            raise ImproperlyConfigured(...)
        if self.raise_exception:
            if (inspect.isclass(self.raise_exception)
                    and issubclass(self.raise_exception, Exception)):
                raise self.raise_exception
            if callable(self.raise_exception):
                ret = self.raise_exception(request)
                if isinstance(ret, (HttpResponse, StreamingHttpResponse)):
                    return ret
            raise PermissionDenied
        else:
            return HttpResponseRedirect(redirect_to_url)

Now, if a programmer wants to also have unauthenticated users redirected to the login page, then they should use LoginRequiredMixin in addition to whatever permission or group they are trying to check.
Of course, the above refactoring of handle_no_permission also requires the refactoring of dispatch in LoginRequiredMixin, so that any user that is not authenticated is immediately redirected to the login page. There's no need to run any code from handle_no_permission. LoginRequiredMixin should do one thing only and do it well: if a user is not authenticated, redirect it to the login page. No more, no less.
    def dispatch(self, request, *args, **kwargs):
        if not request.user.is_authenticated():
#            return self.handle_no_permission(request)
            return self.no_permissions_fail(request)

        return super(LoginRequiredMixin, self).dispatch(
            request, *args, **kwargs)

Just to add another to this, I've got a SuperuserRequiredMixin view which then hits the redirect view due to the ?next arg.

class ClientListView(LoginRequiredMixin, SuperuserRequiredMixin, FormView):
    """
    List of clients
    """
    http_method_names = ['get', 'post']
    form_class = ClientListForm
    raise_exception = True
    login_url = settings.LOGIN_URL
    redirect_unauthenticated_users = True

Oddly I was seeing the unauthenticated users redirected to a page they can access while I had redirect_unauthenticated_users set to False. This confused the hell out of me as I can't see where it gets the URL from, which is when I came across this looping issue.
I wondered if a UserPassesTestMixin could provide a workaround to allow for checking that a user is logged in, a superuser etc, but then that only results in a True/False value which wouldn't help. Could a custom handle_no_permission be used to implement default redirect URLs for already authenticated users to prevent the loop?

I agree with @gkeller2 I've the same issue. If the user is authenticated but not authorized to view the content page, the call go in an infinite loop.
The solution proposed by @gkeller2 sounds good in my case.

@renaudManda : I've implemented the solution locally; let me know if you'd be interested in having a look at it.

@gkeller2 yes of course. I did myself as well. You can check on https://gist.github.com/renaudManda/9db2a8185966b01ee8e9

How about a pull request on this from @gkeller2 or @renaudManda ?

@kennethlove : done #196

@kennethlove : have you checked out the code?

@gkeller2 @kennethlove I tried my own shot at making a fix -- see #200 . I tested the fix inline to my project and it does the trick, but I'm having problem getting my test case to fail and succeed when it should. Can you take a look?

bumping for interest

+1 for the @cornmander PR :)


[CI] Adding Sonar

Adding back coverage has been on the backlog for quite some time. This PR brings back coverage and also introduces static code analysis by adding SonarCloud.
What
SonarCloud is a tool to track code quality, and it is free for open-source projects.
I have included it in my fork, as seeing a live version is the best way to describe it.
The dashboard can be found here.
How
SonarCloud is linked via their provided GitHub action, and thus should be easy to maintain.
Setup should be as simple as connecting the tool to the GitHub organization and adding the SONAR_TOKEN secret. Retriggering the CI on this PR should yield first results.
Smaller adjustments can then be made through the UI (e.g. set the definition of "New Code", which quality standards to apply, ...).
Initial results
Some of the bugs and code smells are definitely false positives, many are triggered by the exception tests. These can be marked as such and will be ignored going forward. On the other hand, there are also a few findings where it makes sense to take a closer look. After an initial cleanup of the false positives, it could be worthwhile to link to the dashboard in the "Contribution" section, as it provides actionable tasks (coverage or code smells) that usually are well encapsulated.
Intrusiveness
The tool can be set up on different levels of "intrusiveness". From running completely in the background just to track coverage, to commenting on every PR and even blocking PRs if certain criteria are not met.
I have prepared an example PR which includes code smells and missing coverage. The corresponding analysis can be found here (the same information would be shown in the bot comment).
Implementation details:

DEPLOY_PYPI_SOURCE was renamed to SINGLE_ACTION_CONFIG as this variable is not only used to decide which config uploads to PyPI, but also which config is used for the cvxpy-base tests and coverage
It would theoretically be possible to run coverage on all configs and combine the outputs for the most accurate results. There are small differences as not all solvers are available for all platforms. I have not done this yet to keep this initial proposal as simple as possible.
I have added a check to see if the SONAR_TOKEN variable exists. This will make sure the action does not fail on forks, which do not have the variable set.
One can create a coverage badge directly from the SonarCloud UI, if desired
I'll remove the test dashboard I have created if this PR is merged
The action runs in parallel to the cvxpy-base tests, so the overall time of the CI is not increased.

I think this is very valuable! I would vote for starting off unobtrusively (i.e. tracking in the background). Some of the bugs are real, so sonar is definitely providing value.

Merged via #1565


Closes #1838 First Dummy Issue

Thank you for your Pull Request! We have developed this task checklist from the Development Process Guide to help with the final steps of the process. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the admiral codebase remains robust and consistent.
Please check off each taskbox as an acknowledgment that you completed the task or check off that it is not relevant to your Pull Request. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the main branch until you have checked off each task.

[x] Place Closes #<insert_issue_number> into the beginning of your Pull Request Title (Use Edit button in top-right if you need to update)
[x] Code is formatted according to the tidyverse style guide. Run styler::style_file() to style R and Rmd files
[x] Updated relevant unit tests or have written new unit tests, which should consider realistic data scenarios and edge cases, e.g. empty datasets, errors, boundary cases etc. - See Unit Test Guide
[x] If you removed/replaced any function and/or function parameters, did you fully follow the deprecation guidance?
[x] Review the Cheat Sheet. Make any required updates to it by editing the file inst/cheatsheet/admiral_cheatsheet.pptx and re-upload a PDF version of it to the same folder.
[x] Update to all relevant roxygen headers and examples, including keywords and families. Refer to the categorization of functions to tag appropriate keyword/family.
[x] Run devtools::document() so all .Rd files in the man folder and the NAMESPACE file in the project root are updated appropriately
[x] Address any updates needed for vignettes and/or templates
[x] Update NEWS.md under the header # admiral (development version) if the changes pertain to a user-facing function (i.e. it has an @export tag) or documentation aimed at users (rather than developers)
[x] Build admiral site pkgdown::build_site() and check that all affected examples are displayed correctly and that all new functions occur on the "Reference" page.
[x] Address or fix all lintr warnings and errors - lintr::lint_package()
[x] Run R CMD check locally and address all errors and warnings - devtools::check()
[ ] Link the issue in the Development Section on the right hand side.
[x] Address all merge conflicts and resolve appropriately
[x] Pat yourself on the back for a job well done! Much love to your accomplishment!

I couldn't add the issue under the development section for some reason - it was grayed out.

I couldn't add the issue under the development section for some reason - it was grayed out.

Maybe it has something to do with others using this issue in their PRs as well??
All good!  Any questions or concerns?  If not, please close this PR.

no questions - very smooth process thanks to the great docs. Thanks!


Teams Reinstall - Per User Fix - QUSER Remediation Error...

Thanks to the team creating these scripts, they will be a life saver if I can get them to work properly.
I'm using the Teams Reinstall - Per User Fix and am getting the following remediation error:
quser : The term 'quser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At C:\Windows\IMECache\HealthScripts\9bc64704-2ac2-4894-a0bd-2ed264464d77_1\remediate.ps1:54 char:8 + (((quser) -replace '^>', '') -replace '\s{2,}', ',').Trim() | For ... + ~~~~~ + CategoryInfo : ObjectNotFound: (quser:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I'm interpreting the instructions as needing to run this script as "Run this script using the logged-on credentials" but I've tried not running as this as well, same error. I'm not sure if this is normal or if I'm doing something wrong.
My settings I'm using are:

Thanks in advance!
Cheers

I run it with, are you using Cloud PC Enterprise or business?
Run this script using the logged-on credentials: No
Enforce script signature check:  No
Run script in 64-bit PowerShell: Yes
Also I see that the deployed cloud pcs, from end of last week are having the correct teams installed under user context.
So no need to run the teams fix anymore.

We are using Cloud PC Enterprise.
I'll try changing my settings to what you are using (disabling run using logged on creds + enabling run script as 64-bit).
Right, the gallery images were fixed recently. I'm actually the one who made the ticket that got that accomplished...was a long ticket making my point, but finally got it done. I think they just duplicated the AVD gallery images and forgot about how the Teams install was done for those multi-session AVD's.
Thanks for your reply, I'll give the 64-bit option a try...maybe that's my hang-up.
Otherwise, it's running ok for you then? Are you NOT seeing the quser errors then?

Thanks for your hard work on that case then :), those cases can indeed be quite time consuming with support engineers.
Yes it works a week 2 ago I tested it on a Cloud PC, when I start PowerShell in 32-bit(on my laptop) , the command quser also fails to run.
So I assume the 64bit will fix it for you.,

Great, thank you for answering, sounds like that might fix it then. I should have tried that myself...   :/
Out of curiosity, since I've probably over-thought this like 10x, how did you end up on your parameters configuration? I 've been changing a few items back-n-forth, along with trying the $retry = $true, and can't settle on a final but currently am using this:
Param(     [parameter(mandatory = $false, HelpMessage = "Log path and file name")]      [string]$logpath = "$env:windir\temp\Teams-MWI-remediate.log",     [parameter(mandatory = $false, HelpMessage = "time in seconds to wait past disconnect")]     [string]$DCNTwait = 600,     [parameter(mandatory = $false, HelpMessage = "time in seconds to wait to re-check user state")]     [string]$StateDetWait = 300,     [parameter(mandatory = $false, HelpMessage = "evaluate user state only once")]      [switch]$retry,     #[switch]$retry = $true,     [parameter(mandatory = $false, HelpMessage = "time in minutes to timeout")]     [int]$TimeOut = 60 )

I left it default. I am still testing the script before releasing it to all impacted CPCs.
It is not working 100% as I would excpect it to do, when a user hasn't logged on to his CPC during the script ran, it doesn't seem to update it. The detection worked, I assume it has to do with the scheduled task, not running or able to start.

We are still testing with IT too... We've had similar behaviors, but also the opposite, we've had it close Teams right in the middle of people using it, uninstall, and then not install back. This was prior to me changing to run as 64bit as you mentioned though, so maybe that was due to that.
Not sure if this script was tested prior to publishing...seems quirky so far...

Yes be sure to go over the code yourself.
When the end-user logged on to the CPC the teams detection detected it was upgrade. (even though the event viewer showed it was upgraded already), I will continue to rollout, as the image is updated to have the latest teams, to get it over with and work on other things.
I just noticed line: 441 in the remediation script contains a typo:
remove-temm -path c:\windows\temp\teamsinstall.ps1 -force -ErrorAction Continue

Yes be sure to go over the code yourself. When the end-user logged on to the CPC the teams detection detected it was upgrade. (even though the event viewer showed it was upgraded already), I will continue to rollout, as the image is updated to have the latest teams, to get it over with and work on other things.
I just noticed line: 441 in the remediation script contains a typo: remove-temm -path c:\windows\temp\teamsinstall.ps1 -force -ErrorAction Continue

Good catch on the typo. I'll get that fixed shortly.
For OP, did switching to Run as 64 Bit PowerShell get rid of the QUSER issue for you?

@DonnaRyanMicrosoft - Yes, switching to run as 64-bit did eliminate my quser error, thank you both.

Running script in 64 bit solved the problem. Typo pointed out on line 441 has been corrected. Added to readme.md to specify the Proactive Remediation settings. Should hit main branch in the next day


⚠ Bofrost.es has degraded performance

In cbb382d, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1770 ms

Resolved: Bofrost.es performance has improved in f52719d after 1 hour, 7 minutes.