Implement functions for EntityScript

Functions would be subroutines that can be added to a script via merge composition.
The syntax would look something like this:
function f(x, y:int, z:string)
	return ((x + y):string + ", " + z)
end

Leaving this on hold, since we're going to be writing most logic with the C++ script interface anyway.


Acknowledge Intel and CilkArts

Issues
Much of our content comes courtesy of Intel + CilkArts, but does not acknowledge that.
Improvements
When appropriate, the page template should include a standard acknowledgment. Something like "This work is a derivative of Cilk Plus documentation, used with permission of Intel Corporation and Cilk Arts."
Additional discussion
One way to implement is with a front matter flag like
acknowledge: true
If the field is not set, then no acknowledgment appears. If the field is true, then a default acknowledgment message appears. If the field is set to something else, then that something else is printed as a customized acknowledgment.

I updated the page layouts (pages and posts) to check for a front matter field attribution, and if it's true then display metadata.attribution.cilkplus. That is a field in metadata.json and right now it's

This work is derived from Cilk Plus documentation with permission of Intel Corporation and Cilk Arts.

I also updated config.yml for Netlify CMS so that every collection provides a true-false field that is labeled "Provide attribution to Intel and Cilk Arts."
Because of our current GitHub workflow, the attribution field only works for articles that come from the main branch after this commit was added. Other PRs that were branched prior to this change will have the CMS field but will not display the attribution message until after they are merged with main.


Add test case for ShenyuClientIllegalArgumentException

#4544

Make sure that:

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

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c8fe281) 61.14% compared to head (416c374) 60.97%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5408      +/-   ##
============================================
- Coverage     61.14%   60.97%   -0.18%
+ Complexity     8594     8580      -14
============================================
  Files          1248     1248
  Lines         38017    38017
  Branches       3647     3644       -3
============================================
- Hits          23247    23182      -65
- Misses        12673    12732      +59
- Partials       2097     2103       +6

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

If time allows it please merge this pr @moremind .


Create withJQuery mixin

In v2, jQuery will no longer be a dependency of Flight, so we need a mixin to add this.$node etc back.

Yay!

@phuu I can take this if you want.

Not sure withJQuery is the best name - will be confusing when you use it with other $ providing libraries (Zepto comes to mind).

@giuseppeg — that would be awesome, although I'd wait until we've refactored jQuery out as it will likely strongly affect the mixin. Probably we're going to have a way to swap out the implementation of the DOM interface (select, trigger, on, off etc) on a component-by-component basis.

@phuu makes sense

This is great news

@giuseppeg — I'd say we're getting pretty close to being able to do this. Perhaps we could start talking in general terms about how to make the dom-layer 'pluggable' over in this issue?

@phuu yeah we should figure that solution out first imo.


Problem decrypting message

Hey guys, I was surprised to be sent a message in the new saltpack format, but it doesn't seem to be working. I am running on macOS Sierra, so I was trying to decrypt on the web, but no dice:

What's my best course of action here? I can't downgrade the OS but do need to open the message.
Thanks!

CC @maxtaco @oconnor663

ps: it's been hung here for a while, presuming this is where one problem is...

This is mildly embarrassing, but the encrypt/decrypt UI on the website still only supports PGP. Part of the reason for this is that we have all this infrastructure for encrypting your PGP private key on the server side and having JS decrypt it, but we're going to avoid that approach with our more modern (NaCl) device keys. It could still be possible to encrypt messages (with an unauthenticated/anonymous sender) or verify signatures in the browser without any private keys at all, but we haven't done it yet.
In the meantime, the keybase encrypt and keybase decrypt commands on the command line will handle saltpack.

Hey @briantopping I don't know what's going on with the keybase uninstall issue, but the website only does PGP encryption/decryption. Soon, we're going to have saltpack encryption in-browser. But for now if the message wasn't encrypted using keybase pgp encrypt the browser won't know what to do with it, you'll have to use the CLI. If you really need it decrypted, perhaps set up a VM and decrypt in there?

@briantopping Okay, so it looks like you need the app to work.  While KBFS doesn't support Sierra, I think that the command line keybase should work okay.  Try this test .dmg?
https://prerelease.keybase.io/darwin/Keybase-1.0.17-20160817191833%2Be83e8a5.dmg
The .dmg is an attempt to get everything working on Sierra, but I think KBFS may still be broken there.  Hopefully it's enough to get your message decrypted, at least.

Hey guys, thanks for the notes. I actually had the same problem with keybase decrypt on the command line with that saltpack message, so there's some chance the message was bad. I doubt that it was a transcription error, so it's hard to tell.
@cjb i'll test that DMG now, although I did get the sender to resend as .pgp so any urgency is solved.

I'd be curious to know more about the errors you're seeing in keybase decrypt, if you get a chance.

@oconnor663 sure, happy to do what I can here.
I installed the DMG that @cjb sent and started noticing the same 15% system CPU hit (i.e. one core going full tilt) as soon as I tried to decrypt a file on the command line. If I go to a terminal and type ls /k<tab> the terminal freezes (but does respond to ctrl-c). So I tried to keybase uninstall and it locked in the same way as above.
It may be that I need to keybase install cli services so the kbfs doesn't get installed, but maybe that's automatic on app installation? Hard to tell.

@briantopping just so we understand: did the keybase decrypt work, despite the CPU hit, or did that command hang forever?
CC'ing @gabriel for the Sierra bugs

@briantopping can you do a keybase log send and post the ID?
Also what beta of Sierra are you on? I think it's up to beta7 now...

@cjb keybase decrypt did not work, it gave an error indicating that it could not find a device (I don't remember the exact content after another reboot). Basically, it showed a paper key and a machine I don't have in the same city, even though my current machine was just re-added using the above DMG.
Can't spend more time on new versions today, but happy to answer any other questions. It's uninstalled for now.

Ah yeah, unfortunately (and again, mildly embarrassingly) that's expected. When you send a saltpack message to someone, it's encrypted for all the devices they have at the time. If they then add a new device, that device is going to generate a new random encryption keypair, and it won't be able to read old messages. There is a keybase decrypt --paperkey mode that should let you decrypt the message by typing in your paper key though.
The eventual solution for this is going to be to have a single account-wide encryption key that's shared across all your devices. (They'd still have device-specific keys that never touch the network, and they'd use those to pass the shared key around. We'd also need a story for rotating the shared key after a device revocation.) Saltpack messages will be encrypted to just that key, which will save us some header overhead, and then that key can be forwarded to new devices as part of the provisioning process. This is similar to what we currently do at a per-folder level for the Keybase File System, but we haven't implemented it for saltpack.

@oconnor663 Ah, very nice! I didn't realize @malgorithms had intent to actually fix encryption beyond making PGP usable when this all started a while back.
Feel free to hit me up if there's anything you need field checks on.


Where is state supposed to come from?

I've set my app's Redirect URI to a PHP script which uses the example code you provided in the README.
Slack is not sending state to my URL. It's just sending this:
?code=2916289853.27927757863.a3a02b156e&state=
So I get Invalid state error.
So I set state in the URL, manually, just to see if I can get past that error. Same error. Then I see state is compared against a session variable that is set in this code:
$_SESSION['oauth2state'] = $provider->getState();

This code is never reached because Slack never hits my Requst URL without the code in the URL. Am I doing it wrong?

The state parameter is set by you. It's an optional parameter that allows you to check that the person completing the OAuth flow is the same person that started it. It's meant to work like so:

User loads your page. You generate a unique, random string.
The link on your page that redirects to Slack's OAuth flow should have ?state=YourRandomString as a query parameter.
When Slack OAuth flow completes and sends the user back to your site, Slack will also send the &state=YourRandomString query parameter back (which is what you're seeing)
You're meant to check that string against the one generated in step 1, to confirm that a third party has not gone through the OAuth flow.

Sorry @unformatt it's taken so long to respond, I didn't receive a notification for the issue.
@cwhite92 answer is correct. When you create your \AdamPaterson\OAuth2\Client\Provider\Slack instance you should pass it a state.
<?php
$provider = new \AdamPaterson\OAuth2\Client\Provider\Slack([
    'clientId'          => '{slack-client-id}',
    'clientSecret'      => '{slack-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url',
    'state'    =>     uniqid()
]);

if (!isset($_GET['code'])) {

    // If we don't have an authorization code then get one
    $authUrl = $provider->getAuthorizationUrl();
    $_SESSION['oauth2state'] = $provider->getState();
    header('Location: '.$authUrl);
    exit;

// Check given state against previously stored one to mitigate CSRF attack
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {

    unset($_SESSION['oauth2state']);
    exit('Invalid state');

} else {

    // Try to get an access token (using the authorization code grant)
    $token = $provider->getAccessToken('authorization_code', [
        'code' => $_GET['code']
    ]);```


logmap: init at unstable-2021-12-15

Motivation for this change
Tools for fuzzing Log4j2 jndi injection
https://github.com/zhzyker/logmap
Related to #81418
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 150901 run on x86_64-linux 1

1 package built:

logmap


Feature request: wrap node label on multiple lines

I think this feature request is related to this closed issue: https://github.com/kuzudb/explorer/issues/10.
With the current explorer default settings it is only possible to see three characters and an ellipses with long node names when starting up the explorer. By changing the node size in the settings it is possible to see the entire node labels, however this also means that the nodes get quite bulky (big). It would be a nice feature if the node labels could be wrapped to multiple lines in the node if it is too long of a text - there might have to be some length limit to where the ellipsis still kicks in of course.
I know this is a super small feature request but from a visual and explorative point of view I think it is beneficial to see the entire (or as much as possible) of the node label on the graph itself.
Keep on the great work, really enjoy using your graph explorer!

Hi @BjarkeTornager,
Thanks for your suggestion. This makes sense. I'll look into it.


Outdated cask: cdock

Outdated cask: cdock.
Info:

version: 0.10.1.
appcast url: https://github.com/w0lfschild/cDock2/releases.atom.

0.10.3

Updated in #18385.


Radimir: workflows: 2 weeks

Week-1 Check-in
I Need Help With:

Creating an issue
Pushing my branch to GitHub
Creating a PR

What went well?
What went less well?

open a new terminal window
navigate up and down directories using cd
list the contents of a directory using ls
create new folders using mkdir

Lessons Learned

In my first week I learned how to use commands in terminal and visa studio code.

Sunday Prep Work

I was still trying to understand base commands

Check-in Week 2
I Need Help With:

fixing npm errors

What went well?

[x]  clone group repo

[x]  creating a branch

[x] creating an issue

[ ] git push in to master and git pull from master in order to have ab updated file

[x] making project board

[x] GitHub SSH Key

What went less?

try to find reasons why  something doesn't work

Lessons Learned

the idea of creating remote repo
the differences between working in a branch and master
[x] How to work in group

Sunday Prep Work

fixing npm errors

Which errors? there are many errors, so which error did you face?
I advice you to make GOOGLE your friend during studying and work.

git push in to master

It is NOT ALLOW to push to master branch.


[FEATURE] Add OAuth2 refresh token Form dependency in security/oauth2.py

First check

[x] I added a very descriptive title to this issue.
[x] I used the GitHub search to find a similar issue and didn't find it.
[x] I searched the FastAPI documentation, with the integrated search.
[x] I already searched in Google "How to X in FastAPI" and didn't find any information.
[x] I already read and followed all the tutorial in the docs and didn't find an answer.
[x] I already checked if it is not related to FastAPI but to Pydantic.
[x] I already checked if it is not related to FastAPI but to Swagger UI.
[x] I already checked if it is not related to FastAPI but to ReDoc.
[x] After submitting this, I commit to:

Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.
Or, I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.
Implement a Pull Request for a confirmed bug.

Description
security/oauth2.py already contains OAuth2PasswordRequestForm, why don't we add OAuth2RerefreshRequestForm to FastAPI as well? It is also well defined in the OAuth RFC. To implement a complete OAuth2 with FastAPI, token refresh is needed. Also, the docs can be updated with a full example.
As the RFC states, the refresh request has to be exactly like this:
POST /token HTTP/1.1
     Host: server.example.com
     Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
     Content-Type: application/x-www-form-urlencoded

     grant_type=refresh_token&refresh_token=tGzv3JOkF0XG5Qx2TlKWIA

The solution you would like
from fastapi import FastAPI, Depends
from fastapi.security import OAuth2RefreshRequestForm

app = FastAPI()

@app.route("/refresh")
def refresh_token(form: OAuth2RefreshRequestForm = Depends()):
    # check if the refresh token is valid
    return {
       "access_token":"2YotnFZFEjr1zCsicMWpAA",
       "token_type":"example",
       "expires_in":3600
    }

A possible implementation would be:
class OAuth2RefreshRequestForm:

    def __init__(
        self,
        grant_type: str = Form(None, regex="refresh_token"),
        refresh_token: str = Form(...)
    ):
        self.grant_type = grant_type
        self.refresh_token = refresh_token

It is indeed simple, but having it in builtin still saves users some time to look up in the RFC. Also, the tutorial in docs can be more complete.
Additional context
RFC6749 section 6 on refresh token grant

Note that according to the spec, the refresh request should also be to the same /token endpoint as the original access token (and not to /refresh as in the code example).

@Jan-Jasek - do you still have plans to work on this feature?

Hi guys thanks for the work. Is this functionality still in the works? Also, @Jan-Jasek do you need help with it?

Any update on this feature? This would be a huge improvement to the current implementation.

Is this still being looked at by anybody? @Jan-Jasek ? I'm willing to take a stab at implementing this if nobody else is.

Is this still being looked at by anybody? @Jan-Jasek ? I'm willing to take a stab at implementing this if nobody else is.

@kbernst30 I tried the implementation, but did not like the result, because OAuth2 spec has a single token endpoint, that expects different set of parameters based on response_type field and I was not sure how to expose the conditional pydantic models that would propagate to swagger nicely.

So feel free to take the stab.

I have integrated the refresh token workflow into the same endpoint. We could just simply change fastapi.security.OAuth2PasswordRequestForm by altering grant_type and adding refresh_token attribute as follows.
class OAuth2PasswordAndRefreshRequestForm:
    """Modified from fastapi.security.OAuth2PasswordRequestForm"""

    def __init__(
        self,
        grant_type: str = Form(default=None, regex="password|refresh_token"),
        username: str = Form(default=""),
        password: str = Form(default=""),
        refresh_token: str = Form(default=""),
        scope: str = Form(default=""),
        client_id: str | None = Form(default=None),
        client_secret: str | None = Form(default=None),
    ):
        self.grant_type = grant_type
        self.username = username
        self.password = password
        self.refresh_token = refresh_token
        self.scopes = scope.split()
        self.client_id = client_id
        self.client_secret = client_secret

And then alter the schemas.Token to return
class Token(BaseModel):
    access_token: str
    refresh_token: str
    token_type: str

In the login endpoint, implement a refresh token authentication function (which could make use of the access token authentication logic), and make a conditional statement on grant_type.
@router.post("/token", response_model=schemas.Token)
async def login_for_tokens(
    response: Response,
    session: AsyncSession = Depends(get_session),
    form_data: OAuth2PasswordAndRefreshRequestForm = Depends(),
):
    if form_data.grant_type == "refresh_token":
        user = authenticate_user_from_token(
            session=session,
            token=form_data.refresh_token,
            secret_key="REFRESH_SECRET_KEY",
        )
    else:
        user = authenticate_user(session, form_data.username, form_data.password)

    if not user:
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Incorrect username or password",
            headers={"WWW-Authenticate": "Bearer"},
        )
    return create_tokens_from_user(user=user, response=response)

Finally, implementing the create_tokens_from_user function to create access token and refresh token to return
def create_tokens_from_user(user: models.User, response: Response) -> dict[str, str]:
    jwt_data = {"sub": str(user.id)}

    access_token_expires = timedelta(minutes="15")
    access_token = create_access_token(
        data=jwt_data,
        expires_delta=access_token_expires,
    )

    refresh_token_expires = timedelta(minutes="60")
    refresh_token = create_refresh_token(
        data=jwt_data,
        expires_delta=refresh_token_expires,
    )
    return {
        "access_token": access_token,
        "refresh_token": refresh_token,
        "token_type": "bearer",
    }

All the details not mentioned above are well explained in the FastAPI documentation.

Any update here?


Deprecate check/082: "Designer exists in Google Fonts profiles.csv?"

According to https://github.com/google/fonts/pull/1465 (merged today), profiles.csv is not used anymore by the Google Fonts project. So this means that FB check/082 should probably be deprecated:
https://github.com/googlefonts/fontbakery/blob/3e8988c421f782b8a6c982358f2104a24fba17fb/Lib/fontbakery/specifications/googlefonts.py#L3178-L3213

Yes; you could comment it out though as there's a new designer profiles/bio
section coming soon :)


OCM-8133 | ci: Update readme for test folder of  how to destroy resources

OCM-8133 | ci: Update readme for test folder to document how to destroy resources

/approve

/lgtm


show the function type

Is it possible to show the type of the function under the cursor?

Could you solve this?

I am sorry, I don't remember and I am not using this plugin anymore. In the meanwhile I switched to RLS and vim-lsp for Rust annotations.


Connect via Unix Socket and Connection Pool

Hi, I'm not actual sure whether this should work (in theory) or not (maybe a misconception on my side?). I configured my redis server to allow connections via the unix domain socket. Unfortunately my testing code (using a connection pool) is not working that way. Could it be my fault based on a wrong usage? Using the unix domain socket without connection pool is working great.
Python 3.4.0 (default, Apr 11 2014, 13:05:18)
[GCC 4.8.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import redis
>>> rdb = redis.ConnectionPool(unix_socket_path="/tmp/redis.sock")
>>> r = redis.Redis(connection_pool=rdb)
>>> r.info()
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/redis/connection.py", line 872, in get_connection
    connection = self._available_connections.pop()
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/redis/client.py", line 657, in info
    return self.execute_command('INFO')
  File "/usr/local/lib/python3.4/dist-packages/redis/client.py", line 562, in execute_command
    connection = pool.get_connection(command_name, **options)
  File "/usr/local/lib/python3.4/dist-packages/redis/connection.py", line 874, in get_connection
    connection = self.make_connection()
  File "/usr/local/lib/python3.4/dist-packages/redis/connection.py", line 883, in make_connection
    return self.connection_class(**self.connection_kwargs)
TypeError: __init__() got an unexpected keyword argument 'unix_socket_path'

redis-py was installed using pip. Any suggestions?

You need to specify the connection_class argument when not using the normal Connection class.
>>> import redis
>>> rdb = redis.ConnectionPool(connection_class=UnixDomainSocketConnection, unix_socket_path="/tmp/redis.sock")
>>> r = redis.Redis(connection_pool=rdb)

Ah thanks. :)

Thanks, but unfortunately this isn't working, too:
>>> import redis
>>> rdb = redis.ConnectionPool(connection_class=redis.UnixDomainSocketConnection, unix_socket_path="/tmp/redis.sock")
>>> r = redis.Redis(connection_pool=rdb)
>>> r.info()
Traceback (most recent call last):
  File "/usr/local/lib/python3.4/dist-packages/redis/connection.py", line 872, in get_connection
    connection = self._available_connections.pop()
IndexError: pop from empty list

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/redis/client.py", line 657, in info
    return self.execute_command('INFO')
  File "/usr/local/lib/python3.4/dist-packages/redis/client.py", line 562, in execute_command
    connection = pool.get_connection(command_name, **options)
  File "/usr/local/lib/python3.4/dist-packages/redis/connection.py", line 874, in get_connection
    connection = self.make_connection()
  File "/usr/local/lib/python3.4/dist-packages/redis/connection.py", line 883, in make_connection
    return self.connection_class(**self.connection_kwargs)
TypeError: __init__() got an unexpected keyword argument 'unix_socket_path'

Sorry, the argument names are slightly different between the client class and the the connection. The following code works for me:
import redis
rdb = redis.ConnectionPool(connection_class=redis.UnixDomainSocketConnection, path="/tmp/redis.sock")
r = redis.Redis(connection_pool=rdb)

While the client class itself accepts unix_socket_path and chooses the UnixDomainSocketConnection class as a convenience, I prefer to keep the ConnectionPool completely separate from Connection subclasses.

Thanks, again! This time it's running :)


BUG: conflict with surfing plugin

This is a follow up to
https://github.com/sunxvming/obsidian-vscode-editor/issues/3#issue-1941479799
I found a similar conflict with the sufring plugin and was able to solve it by:

disabling surfing, enable vscode
removing html from vscode settings
reenable surfing (will give error. Ignore the error)
reload the vault.

Had the same issue, thanks for the workaround!


Fix stream's leaked goroutines

Fixes https://github.com/apache/skywalking/issues/9460.
Signed-off-by: mikechengwei<EMAIL_ADDRESS>

Codecov Report

Merging #214 (2339486) into main (a160092) will decrease coverage by 0.04%.
The diff coverage is 27.27%.

@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
- Coverage   43.83%   43.79%   -0.05%
==========================================
  Files          87       87
  Lines        8579     8590      +11
==========================================
+ Hits         3761     3762       +1
- Misses       4481     4490       +9
- Partials      337      338       +1

Impacted Files
Coverage Δ

pkg/bus/bus.go
79.41% <0.00%> (-4.10%)
:arrow_down:

banyand/metadata/schema/etcd.go
60.50% <40.00%> (-0.45%)
:arrow_down:

banyand/stream/service.go
66.23% <100.00%> (+0.44%)
:arrow_up:

banyand/measure/measure.go
80.76% <0.00%> (-3.85%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mikechengwei Please use make format to reorder the imports

/run-all-tests

Fixes apache/skywalking/issues/9460

Fixes apache/skywalking/issues/9460

Fix keyword only works in PR description, or finally squashed commit.

Fixes apache/skywalking/issues/9460

Fix keyword only works in PR description, or finally squashed commit.

done

LGTM. Thank you.
Would you be interested in other goroutines leaked issues listed at apache/skywalking#9454

Ok，i can finish other similar issue.


Create .codecov.yml

Current coverage is 59.84% (diff: 100%)

Merging #68 into master will not change coverage

@@             master        #68   diff @@
==========================================
  Files            25         25
  Lines          1579       1579
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            945        945
  Misses          634        634
  Partials          0          0

Powered by Codecov. Last update ff81bf2...8ca0013


[SCB-520] resolve service with env re-registered will fail

Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[x] Each commit in the pull request should have a meaningful subject line and body.
[x] Format the pull request title like [SCB-XXX] Fixes bug in ApproximateQuantiles, where you replace SCB-XXX with the appropriate JIRA issue.
[x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[x] Run mvn clean install to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

Coverage increased (+0.001%) to 87.393% when pulling d393e6d4668f6a024cf169215fedec4fae9ba0fb on weichao666:envreregistryfail into 5348393b977f5e6a8eac87016dd1f969a7a1e6df on apache:master.


fix missing scanner in builds

since tree-sitter-cobol uses an external scanner, the rust crate's build script needs to compile that as well. this fixes the errors seen in builds of downstream libraries such as:
error: linking with `cc` failed: exit status: 1
    .
    .
    .
  = note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified

Thank you!


phpunit not working with windows in the workflow

Hi,
There is problem with the Windows environments. The phpunit command is not triggered because the binary is not correctly called.
./bin/devtools test:unit should be remplaced with php bin/devtools test:unit so this will work with both unix & windows systems.
But you will have some errors in the tests because the DIRECTORY_SEPARATOR constante is used so some tests will fails (ex : with windows the constructed path will be "/path/to/bin\foo" and it will compare in the phpunit a value of "/path/to/bin/foo").
I could try to do a PR if you wish.

What is the error message you're getting?

There is no error message, i think it try to execute it as a shell instead as a php file.
You can see here that phpunit is not run (windows-latest) :
https://github.com/ramsey/devtools-lib/runs/4676940542?check_suite_focus=true#step:6:3
And here is the result when phpunit is run (ubuntu-latest) :
https://github.com/ramsey/devtools-lib/runs/4676940528?check_suite_focus=true#step:6:1

There is no error message, i think it try to execute it as a shell instead as a php file.
You can see here that phpunit is not run (windows-latest) :
https://github.com/ramsey/devtools-lib/runs/4676940542?check_suite_focus=true#step:6:3
And here is the result when phpunit is run (ubuntu-latest) :
https://github.com/ramsey/devtools-lib/runs/4676940528?check_suite_focus=true#step:6:1

Thanks for pointing this out. I've fixed this with the commits<PHONE_NUMBER>a2cc80014ff77a3fb287ed5332a244,<PHONE_NUMBER>1231054904b4ebb166a43f634cdef2, and 60ef27be133cd4a8bed7cbe041601e3f83cebb31.
Happy New Year!

Thanks for pointing this out. I've fixed this with the commits<PHONE_NUMBER>a2cc80014ff77a3fb287ed5332a244,<PHONE_NUMBER>1231054904b4ebb166a43f634cdef2, and 60ef27be133cd4a8bed7cbe041601e3f83cebb31.
Happy New Year!

Happy new year :)
Beware of the captainhook config file, you will encounter the same problem on Windows.
https://github.com/ramsey/devtools-lib/blob/main/captainhook.json#L46
https://github.com/ramsey/devtools-lib/blob/main/captainhook.json#L55

I don't know how to call the commands on Windows, and I don't have access to a Windows machine. How should these be written so that they work cross-platform?

I am on windows (yes some of us are using this OS :-) ) and i use "php bin/devtools xxxxx" in the captainhook file (and composer.json) and it's working fine. I think the first line in devtools #!/usr/bin/env php is used to implicitely call the php executable to interpret the script, but on windows you need to specificaly tell him to use "php" to interpret the file.


reproduce Tnet0 example plots

tsnet version: latest master
Python version: 3.7.4
Operating System: Mac OS X

Description
I'm experimenting with this software, trying to understand how to setup some simple transient models, consisting of a reservoir, a few pipes, and a valve. My goal is to model the transients upon either opening or closing the valve.
What I Did
I tried to reproduce Figs. A and B of Tnet0 shown here: https://tsnet.readthedocs.io/en/latest/validation.html
I am able to reproduce Fig. B but not Fig. A. When I plot the flow-rate, I see a steady sinusoid pattern with no apparent damping, unlike the plot in the link above, which shows rapid flow-rate decay in the first 2 seconds.
Also, why does the flow-rate and pressure head ring for such a long time? I tried increasing the simulation period to 600s and there is very little damping of the pressure head.
Here is the code I used:
import matplotlib
matplotlib.use('agg')
from matplotlib import pyplot as plt
import tsnet

# Open an example network and create a transient model
inp_file = 'Tnet0.inp'
tm = tsnet.network.TransientModel(inp_file)

# Set wavespeed
tm.set_wavespeed(1200.) # m/s

# Set time options
dt = 0.01
tf = 60   # simulation period [s]
tm.set_time(tf,dt)

# Set valve closure
tc = 2 # valve closure period [s]
ts = 0 # valve closure start time [s]
se = 0 # end open percentage [s]
m = 1 # closure constant [dimensionless]
valve_op = [tc,ts,se,m]
tm.valve_closure('3',valve_op)

# Initialize steady state simulation
t0 = 0. # initialize the simulation at 0 [s]
engine = 'DD' # demand driven simulator
tm = tsnet.simulation.Initializer(tm, t0, engine)

# Transient simulation
results_obj = 'Tnet0' # name of the object for saving simulation results
friction = 'steady'
tm1 = tsnet.simulation.MOCSimulator(tm, results_obj, friction)

# Get head at junction between the pipes
node = '2'
head1 = tm1.get_node(node).head

# Get flow-rate in pipe 2
fr = tm1.get_link('2').start_node_flowrate

# Prep plotting
t1 = tm1.simulation_timestamps
fig = plt.figure(figsize=(8,5), dpi=80, facecolor='w', edgecolor='k')

# Plot flow-rate
plt.plot(t1, fr, 'k',label='steady', linewidth=2.5)
plt.ylabel("flow-rate [m^3/s]")
plt.xlim([t1[0],t1[-1]])
plt.xlabel("Time [s]")
plt.legend(loc='best')
plt.draw()
plt.savefig('a.png')

# Plot head
plt.clf()
plt.plot(t1, head1, 'k',label='steady', linewidth=2.5)
plt.ylabel("Pressure Head [m]")
plt.xlim([t1[0],t1[-1]])
plt.xlabel("Time [s]")
plt.legend(loc='best')
plt.draw()
plt.savefig('b.png')

Hi Nathan,
Thanks for trying out TSNet. To answer your two question:

Figs. A of Tnet0 shows the flowrate at the valve, i.e., the end node of pipe 2, while your codes plot the flowrate at the start node of pipe 2.

The lack of damping in pressure and flowrate is partially due to the choice of friction model, which is steady friction model in your codes. This model only accounts for the head loss in form of roghness*head^2, and the roughness is set to be fairly small in this example (0.02). The unsteady frictrion model can introduce additional damping.
Another reason is due to the fact that Tnet0 is a very simple network, so the pressure wave essentially bounces back and forward between the two ends.

Best,
Lu

Ah, thanks very much. Yes, I see that if I use
fr = tm1.get_link('2').end_node_flowrate

then it reproduces the figure in the docs.
I also see that if I change to
friction = 'unsteady'

then the behavior damps more.
I really appreciate your help and thanks for building this code. I might have further questions as I dig deeper.

Sure, feel free to post any issues or questions here.


Incident MTTD (Mean Time To Detection)

Is your feature request related to a problem? Please describe.
We are using dispatch not only for security vulnerability but also for reliability incidents. We want to measure the MTTD of the incident.
Describe the solution you'd like
Adding DateTime field for detection time in the incident table and UI. It is accessible to update via admin web.

Would allowing you to modify the incident timeline to add this type of metadata fit your use case? We've heard some other similar use-cases but were hesitant to add a lot of more top-level metadata to the incident object.
The idea would be to provide a more robust/flexible timeline, that you could add these types of timing-related metadata.


Add more rest handlers for basecoin

The current setup is nice for sendtx and querying accounts.  Ideally, every tx and query that is available in the cli is also available in the rest api.
Minimally, this means:

middleware: support 0 to N "assume_role" assertions and wrap them in reverse order ( as per https://github.com/tendermint/basecoin/blob/unstable/modules/roles/commands/wrap.go#L25-L38 ) - in all tx constructors - put it somewhere we can reuse it.

tx endpoint /build/create_role: same middleware stack as /build/send, but different tx.  Cli equivalent: https://github.com/tendermint/basecoin/blob/unstable/modules/roles/commands/tx.go#L44-L65
except, I think we just want the role as hex, not a string (will fix cli soon)

query endpoint query/role: rest equivalent to https://github.com/tendermint/basecoin/blob/unstable/modules/roles/commands/query.go#L19-L37

Also, please allow me to configure which endpoints are present in main.go, without having to cut and paste the ServeCmd into my sub-repo.  This is designed to be imported (not forked) and used to build many different commands for each app.  So a third party should easily be able to write a new tx or query endpoint, as well as register it with the server. (Or also remove eg. all endpoints except /query/*)

Next up would be to implement a route for:

/seeds
/tendermint/status
/tendermint/block
as per https://github.com/tendermint/basecoin/blob/feature/186-http-api/docs/rest/API_draft.md#future-stuff


Adds footnote per measure type id

Jira link
https://transformuk.atlassian.net/browse/HOTT-572
What?
I have added/removed/altered:

[x] Adds footnote translations for measure types
[x] Standardise footnotes for every measure type and option.

Why?
I am doing this because:

HMRC have asked that we specify a footnote per every measure type such that all the different measure types are made clear to the user


Add CESS network ss58 address prefix

This PR adds CESS network information to the substrate.
{
	"prefix": 10042,
	"network": "CESS",
	"displayName": "CESS",
	"symbols": ["TCESS"],
	"decimals": [12],
	"standardAccount": "*25519",
	"website": "https://cess.cloud"
}

CLA Signed :)

Hi Guys,
Is there anything else other than CLA, that we need to do before the review?
Please let us know if there is anything else.
Thanks,
CumulusSystem Team

@Cumulus2021 would you mind to reach out on Element?

Hi @BenWhiteJam ,
Yes, I will contact you in elements.
Thank you.


Add macro similar to $rateColumns for counter like metrics

Similarly to request in #78, please consider adding support for computing $perSecond for multiple series (hosts).
Currently, the $rateColumns computes something like:
SELECT t, arrayMap(a -> (a.1, a.2/runningDifference( t/1000 )), groupArr)
FROM (
    SELECT t, groupArray((host, v)) as groupArr
....

Which does not produce correct results for metrics which only grows over time, as one needs to compute difference between two consequitive values v as well (not just time).
Unfortunatelly, doing runningDifference(a.2)/runningDifference(t/1000) does not work, as a.2 gets materialized to different values v between different columns (host).
I have been scratching my head for a while and I am not sure how to write such query in Clickhouse at all. I hope you know better :)

Hi @JiriHorky
Back to #78
Let's introduce new data:
SELECT *
FROM issue_78

┌───────Date─┬────────────────Time─┬─Packets─┬─Type─┐
│ 2018-08-31 │ 2018-08-31 10:51:00 │    1000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:51:00 │    1000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:52:00 │    2000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:52:00 │    3000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:53:00 │    3000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:53:00 │    5000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:54:00 │    4000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:54:00 │    7000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:55:00 │    5000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:55:00 │    9000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:56:00 │    6000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:56:00 │   11000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:57:00 │    7000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:57:00 │   13000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:58:00 │    8000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:58:00 │   15000 │ udp  │
│ 2018-08-31 │ 2018-08-31 10:59:00 │    9000 │ tcp  │
│ 2018-08-31 │ 2018-08-31 10:59:00 │   17000 │ udp  │
└────────────┴─────────────────────┴─────────┴──────┘

Here we have a Type column and counter Packets. It is obvious, that tcp grows by 1000 per minute (1000/60=16.6 per second) and udp by 2000 per minute (2000/60=33.33 per second).
I think the macros should implement following query:
SELECT
    t,
    arrayMap(a -> (a.1, a.2 / runningDifference(t)), groupArr) AS am
FROM
(
    SELECT
        t,
        groupArray((Type, runningDifference(c))) AS groupArr
    FROM
    (
        SELECT
            intDiv(toUInt32(Time), 120) * 120 AS t,
            Type,
            max(Packets) AS c
        FROM issue_78
        GROUP BY
            t,
            Type
        ORDER BY
            Type ASC,
            t ASC
    )
    GROUP BY t
    ORDER BY t ASC
)

┌──────────t─┬─am──────────────────────────────────────────────────────┐
│<PHONE_NUMBER> │ [('tcp',nan),('udp',-inf)]                              │
│<PHONE_NUMBER> │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER> │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER> │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER> │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
└────────────┴─────────────────────────────────────────────────────────┘

5 rows in set. Elapsed: 0.009 sec.

Please, note some details:

Selecting max value for period instead of counting, since we're dealing with counter:

max(Packets)

The reverted sort in inner query:

 ORDER BY
            Type ASC,
            t ASC

The runningDifference comparison which is possibly because of reverse sorting:

 groupArray((Type, runningDifference(c))) AS groupArr

Please, try this construction with your data. If it fits your need I'll add a new macros into plugin.
Thank you!

Hi @hagen1778 ,
Thanks a lot for your reply, it's very useful. I'm from @JiriHorky team and I have been testing your query for a while and I think we have a problem when there are missing rows in ClickHouse table. I will try to explain:
This query I want to create should produce a graph of CPU usage of the particular hosts and we want to be able to see the metric for several hosts. After a small adjustment I made it work with Grafana's variable $host, where we want to select multiple values (hosts).
I adjusted the query like this:
SELECT
   t,
   arrayMap(a -> (a.1, 100 - a.2 / runningDifference(t) * 1000), ga) AS am
FROM
(
   SELECT
       t,
       groupArray((host, runningDifference(v))) AS ga
   FROM
   (
       SELECT
           $timeSeries AS t,
           host,
           max(value) AS v
       FROM $table
       WHERE $timeFilter and host in ($host)
       GROUP BY
           t,
           host
       ORDER BY
           host ASC,
           t ASC
   )
   GROUP BY t
   ORDER BY t ASC
)

Where $table is set to cpu_idle. And as for $host I will select two values S182V06001924 and S182V06001957 for this example .
In ClickHouse we have table cpu_idle and here is an example of data from the two hosts:
┌─toUInt32(time)─┬────────────────time─┬─host──────────┬────value─┐
│<PHONE_NUMBER> │ 2018-10-29 12:00:00 │ S182V06001924 │ 65945602 │
│<PHONE_NUMBER> │ 2018-10-29 12:00:00 │ S182V06001957 │ 19140170 │
│<PHONE_NUMBER> │ 2018-10-29 12:05:00 │ S182V06001924 │ 65973829 │
│<PHONE_NUMBER> │ 2018-10-29 12:05:00 │ S182V06001957 │ 19161774 │
│<PHONE_NUMBER> │ 2018-10-29 12:10:00 │ S182V06001924 │ 66001985 │
│<PHONE_NUMBER> │ 2018-10-29 12:15:00 │ S182V06001924 │ 66029971 │
│<PHONE_NUMBER> │ 2018-10-29 12:20:00 │ S182V06001924 │ 66057855 │
│<PHONE_NUMBER> │ 2018-10-29 12:25:00 │ S182V06001924 │ 66086019 │
│<PHONE_NUMBER> │ 2018-10-29 12:25:00 │ S182V06001957 │ 19224748 │
└────────────────┴─────────────────────┴───────────────┴──────────┘

You may notice that we did not receive data from host S182V06001957 at 12:10, 12:15 and 12:20.
And here comes the issue:
If I try to apply the query on this data and simulate multiselect by WHERE (host IN ('S182V06001957', 'S182V06001924')):
SELECT
    toDateTime(t),
    t,
    arrayMap(a -> (a.1, 100 - (a.2 / runningDifference(t))), groupArr) AS am
FROM
(
    SELECT
        t,
        groupArray((host, runningDifference(v))) AS groupArr
    FROM
    (
        SELECT
            toUInt32(time) AS t,
            host,
            max(value) AS v
        FROM cpu_idle
        WHERE (host IN ('S182V06001957', 'S182V06001924')) AND (time >= '2018-10-29 12:00:00') AND (time <= '2018-10-29 12:25:00')
        GROUP BY
            t,
            host
        ORDER BY
            host ASC,
            t ASC
    )
    GROUP BY t
    ORDER BY t ASC
)

I will get this:
┌───────toDateTime(t)─┬──────────t─┬─am───────────────────────────────────────────────────────────────────────────┐
│ 2018-10-29 12:00:00 │<PHONE_NUMBER> │ [('S182V06001924',nan),('S182V06001957',inf)]                                │
│ 2018-10-29 12:05:00 │<PHONE_NUMBER> │ [('S182V06001924',5.909999999999997),('S182V06001957',27.986666666666665)]   │
│ 2018-10-29 12:10:00 │<PHONE_NUMBER> │ [('S182V06001924',6.146666666666661)]                                        │
│ 2018-10-29 12:15:00 │<PHONE_NUMBER> │ [('S182V06001924',6.713333333333338)]                                        │
│ 2018-10-29 12:20:00 │<PHONE_NUMBER> │ [('S182V06001924',7.0533333333333275)]                                       │
│ 2018-10-29 12:25:00 │<PHONE_NUMBER> │ [('S182V06001924',6.1200000000000045),('S182V06001957',-109.91333333333333)] │
└─────────────────────┴────────────┴──────────────────────────────────────────────────────────────────────────────┘

But if I select just S182V06001957 I will get this:
┌───────toDateTime(t)─┬──────────t─┬─am─────────────────────────────────────┐
│ 2018-10-29 12:00:00 │<PHONE_NUMBER> │ [('S182V06001957',nan)]                │
│ 2018-10-29 12:05:00 │<PHONE_NUMBER> │ [('S182V06001957',27.986666666666665)] │
│ 2018-10-29 12:25:00 │<PHONE_NUMBER> │ [('S182V06001957',47.52166666666667)]  │
└─────────────────────┴────────────┴────────────────────────────────────────┘

As you can see on the last row the value we get for S182V06001957 (and thus the graph) are erroneous in case we use multiselect and some data are missing. In other words, the curves in the graph change depending on what host(-s) I select.
Could you please help me with that? Have you got any idea how to get rid of this? I tried to adjust the query for a while but unsuccessfully.
In case you need any further info, please ask.
Thanks a lot.

Hi @MichalNedbalek,
I guess I got the idea. Let's introduce updated data:
┌──────────t─┬─Type─┬─────m─┐
│<PHONE_NUMBER> │ tcp  │  1000 │
│<PHONE_NUMBER> │ tcp  │  3000 │
│<PHONE_NUMBER> │ tcp  │  5000 │
│<PHONE_NUMBER> │ tcp  │  7000 │
│<PHONE_NUMBER> │ tcp  │  9000 │
│<PHONE_NUMBER> │ tcp  │ 11000 │
│<PHONE_NUMBER> │ tcp  │ 13000 │
│<PHONE_NUMBER> │ tcp  │ 15000 │
│<PHONE_NUMBER> │ tcp  │ 17000 │
│<PHONE_NUMBER> │ udp  │  1000 │
│<PHONE_NUMBER> │ udp  │  5000 │
│<PHONE_NUMBER> │ udp  │  9000 │
│<PHONE_NUMBER> │ udp  │ 13000 │
│<PHONE_NUMBER> │ udp  │ 17000 │
│<PHONE_NUMBER> │ udp  │ 29000 │
│<PHONE_NUMBER> │ udp  │ 33000 │
└────────────┴──────┴───────┘

We see a little time gap for udp type between last two rows. To avoid false results I suggest to use following query:
SELECT
    t * 1000 AS t,
    groupArray((Type, c)) AS groupArr
FROM
(
    SELECT
        t,
        Type,
        runningDifference(m) AS diff,
        if(diff < 0, nan, diff / runningDifference(t)) AS c
    FROM
    (
        SELECT
            intDiv(toUInt32(Time), 120) * 120 AS t,
            Type,
            max(Packets) AS m
        FROM issue_78
        GROUP BY
            t,
            Type
        ORDER BY
            Type ASC,
            t ASC
    )
)
GROUP BY t
ORDER BY t ASC

┌─────────────t─┬─groupArr────────────────────────────────────────────────┐
│<PHONE_NUMBER>000 │ [('tcp',nan),('udp',nan)]                               │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668)]                            │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668)]                            │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
│<PHONE_NUMBER>000 │ [('tcp',16.666666666666668),('udp',33.333333333333336)] │
└───────────────┴─────────────────────────────────────────────────────────┘

The following operations:
SELECT
        runningDifference(m) AS diff,
        if(diff < 0, nan, diff / runningDifference(t)) AS c

gives us opportunity to compare values of the same type considering the time gaps. Also, the condition if(diff < 0 avoids false results of comparing the values for different types.
The result of the query could be easily displayed in Grafana, since plugin knows how to behave with null values. Anyway, you still have a possibility to manage the way of displaying the null values on panel:

Hi @hagen1778,
This works perfectly, thank you very much. :) My final version of the query look like this:
SELECT
    t,
    groupArray((host, c)) AS groupArr
FROM
(
    SELECT
        t,
        host,
        runningDifference(v) AS diff,
        if(diff < 0, nan, 100 - diff / runningDifference(t) * 1000) AS c
    FROM
    (
        SELECT
            $timeSeries AS t,
            host,
            max(value) AS v
        FROM $table
        WHERE $timeFilter and host in ($host)
        GROUP BY
            t,
            host
        ORDER BY
            host ASC,
            t ASC
    )
)
GROUP BY t
ORDER BY t ASC

Are going to create the macro for this? If so, I would wait for it, because I want to implement similar queries in some 20+ other graphs and the macro would make everything easier and faster.
Thanks a lot.

Yes, I will implement it. New release will published this week

Thanks for info

Hi @MichalNedbalek
Why there is an additional sub operation in if(diff < 0, nan, 100 - diff / runningDifference(t) * 1000) AS c? I mean the following 100 - diff

Hi @hagen1778
Because in this particular case we get cpu_idle metric from the hosts. So when I want to calculate percentage of CPU usage I need to subtract the value from 100.

I have to wait for a colleague who will update our Grafana and I'm going to test it tomorrow. Thanks for the macros.

Hi @hagen1778 ,
We tried the new version and we ended up with all graphs not working with error query is undefined and stacktrace like this:
execute/SqlQuery</SqlQuery.unescape@https://grafana.avast.com/public/plugins/vertamedia-clickhouse-datasource/sql_query.js:428:25
execute/SqlQuery</SqlQuery.prototype.replace@https://grafana.avast.com/public/plugins/vertamedia-clickhouse-datasource/sql_query.js:101:29
execute/ClickHouseDatasource</ClickHouseDatasource.prototype.query/<@https://grafana.avast.com/public/plugins/vertamedia-clickhouse-datasource/datasource.js:84:33
h@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:1:53965
ls@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:1:95226
execute/ClickHouseDatasource</ClickHouseDatasource.prototype.query@https://grafana.avast.com/public/plugins/vertamedia-clickhouse-datasource/datasource.js:81:21
1752/g</e.prototype.issueQueries@https://grafana.avast.com/public/build/0.6aa12092d3333cb24394.js:7:18163
1818/p</e.prototype.issueQueries@https://grafana.avast.com/public/build/0.6aa12092d3333cb24394.js:7:223548
u@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:87:68722
l/<@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:87:69127
$digest@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:87:74824
$apply@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:87:76636
o/c<@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:87:84010
i@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:87:21868
mt/l.defer/n<@https://grafana.avast.com/public/build/vendor.6aa12092d3333cb24394.js:87:23332

Today we will try to install it to our testing Grafana and test it there.
As for the 100 - diff queries, I think it is not necessary to be concerned with it for now. I will use the query as it is now and later we will change the metrics we get from the hosts and the query will get changed anyway.
Thanks

Yep, my fault. Should be fixed now. Could you try it again?

@MichalNedbalek ping

Please, see https://github.com/Vertamedia/clickhouse-grafana/releases/tag/1.8.0


Only support Python 3.6+

Closes #8
This library supported Python 2.7+ as the code was the same and did not require maintenance work. Now that we are adding additional features, it makes sense to restrict to only support active Python releases.
Python 3.5.10 was released on September 5th, 2020 and there are no plans for additional releases. This library is following suit and only supporting Python 3.6.
This PR also adds badges to the README.me

Codecov Report

Merging #13 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master       #13   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            5         5
  Lines           78        73    -5
=========================================
- Hits            78        73    -5

Impacted Files
Coverage Δ

examples/turnstile.py
100.00% <0.00%> (ø)

examples/boolean_field.py
100.00% <0.00%> (ø)

finite_state_machine/state_machine.py
100.00% <0.00%> (ø)

Continue to review full report at Codecov.

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


fix MCN CRD to use proper Drained and Cordoned condition types

These CRD selectors do not match the constants in types_machineconfignode.go I'd prefer to change the CRD now before 4.15 is cut. But if not, I can change the types later.

/test all

/test e2e-aws-ovn-techpreview


small refactor of rsync logging

@paetling not sure why we were doing this before

seems fine i guess. Not really sure why it was like this to begin with?


Use "elasticsearches"  as resource type of Elasticsearch

As Kubernetes didn't support, we used elasticsearchs as plural of Elasticsearch.
ResourceCodeElasticsearch   = "es"
ResourceKindElasticsearch   = "Elasticsearch"
ResourceNameElasticsearch   = "elasticsearch"
ResourceTypeElasticsearch   = "elasticsearchs"

Should we use elasticsearches as its the correct plural form?

yes. This has been fixed in Kube 1.9.
https://github.com/kubernetes/apiextensions-apiserver/issues/12#issuecomment-357756880
Also code generator has been fixed 26 days ago. https://github.com/kubernetes/gengo/commit/620d1a032ac0475048b02bd1f0bf1067a3c7679d#diff-5ae98d3146dd4ccc40a12538a05637b9R64

[ ] Also need to update the apiserver Webhook config
https://github.com/kubedb/cli/blob/master/hack/deploy/admission.yaml#L19


Add default parameter to get.

Add default parameter to util.get
Unit tests for default parameter

If interested in change I can add it to the docs before PR acceptance.
Also, should default be added to other functions?

This is for #52

@banjocat might I suggest making default a keyword-only argument? I imagine many people will want to be able to have None as a default value.


Increase log level in the openshift control plane

@pweil- @jim-minter opening for discussion since I am torn.
We are setting up and starting the control plane ourselves (no ansible) as part of the master script. Once we switch to static pods there won't be any big difference. I see two possible actions for increasing the loglevel in the e2e tests:

update log level in the config (sysconfig or pod manifests) after a deployment is done but before tests start + restart services (ugly plus we miss debug logs during post-install tasks)
expose loglevel in openshift.json - as I was writting this I realized we cannot configure this today at all so I think it makes sense to do it here and now.

I think we should do 2. but wanted to discuss before I move forward with opening a PR, maybe there is something else? Thoughts? Objections?
/label orchestrator/openshift
/kind feature

I'm tempted to do nothing for now.  Would it help to express more clearly /why/ we think it would be necessary to do this?

The control plane currently runs on loglevel=2 which is too low for debugging. In Origin, e2e tests run with 4.

we really need the ability to change loglevel at runtime.
2 seems like the best option but it seems less useful if it cannot be used on an existing cluster.  That would be the bar for me.   Not sure how easy that is.

@kargakis can we table this for the architecture call?  I feel there's way more to talk about here than meets the eye.  I've added a topic to the arch topics doc.

/label orchestrator/openshift

/assign

/remove-kind feature


Add core-js es5 shim to karma client, fixes #1529

Added core-js es5 shim in client/main.js
It fixes for me the issue with IE8 which was preventing me to use karma runner to run tests on IE8

Thanks, could you change the commit message to follow our convention please?

Of course :)

Thanks :octocat:


Add new methods, new inputs, documentation and tests.

I tried to think as a student to figure out the easiest way to use this library.
You can see that I changed the output of the functions to avoid using repetition.
Example: To get observations, we would do:
x.Fred.Series.Observations.Observations, I think this might confuse students.
Also, in this case, I thought, what do we really want from this function (the data and the value), so despite saying that getting the JSON values is interesting, I think that having so many fields might be tricky for students.
So I did:
|> Seq.map(fun obs ->
    {
        Date = obs.Date
        Value = obs.Value
      })

If you want to see these changes to the different functions, use control + F with - Davide Costa to find the comments.

Should we close this now @DavideGCosta ?

Yes, I can see the changes! Will keep them in mind for next time! Yes, we can close it


Trades.java class is incorrectly comparing ID strings

Trades.java contains the following:
@Override
public int compare(Trade trade1, Trade trade2) {
    return trade1.getId().compareTo(trade2.getId());
}

Since .getId() returns a String, comparing two Strings using compareTo is a lexicographical comparison, and would not work reliably, especially when the length of the String is different.
Consider this example:
public static void main(String[] args) {
  String id = "100";
  // check if the value is less than 100
  System.out.println(id.compareTo("99"));
  // check if value is equal to 100
  System.out.println(id.compareTo("100"));
  // check if value is greater than 100
  System.out.println(id.compareTo("101"));
}

Console:
-8
0
-1

"100".compareTo("99") returns a negative number which is lexicographically correct, but if these are trade Ids, then this is a bug.
We should therefore change the TradeIDComparator in Trades.java to convert the String into a BigInteger or Integer prior to the comparison.
something like this:
@Override
public int compare(Trade trade1, Trade trade2) {
	BigInteger id1 = new BigInteger(trade1.getId());
	BigInteger id2 = new BigInteger(trade2.getId());
	return id1.compareTo(id2);
}

If you really want to do that, why not just adding a BigDecimal test in the existing compareTo method?

@shimonm I addressed your problem in https://github.com/knowm/XChange/pull/2839, dealing with hexadecimal IDs as well.

Thank you! closing


ENOENT error on

Can't publish the package with npm dependency enabled if npm dependency is enabled in package.js I receive this error:
/Users/martino/.meteor/packages/meteor-tool/.<IP_ADDRESS>9pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:206
						throw(ex);
						      ^
Error: ENOENT, stat '/Users/martino/Sites/martino:iron-router-i18n/.npm/package/npm-shrinkwrap.json'
    at Object.Future.wait (/Users/martino/.meteor/packages/meteor-tool/.<IP_ADDRESS>9pzb++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:326:15)

Hi @martinopic I checked out your package with the 0.5.x branch. not sure where you receive this error?

Just a stupid error in my package.js, fixed with 0.5.1, sorry I needed to figure out this before going ahead with other issues.


[HOLD for payment 2022-01-11] Android - User prompted for permission after granting permission during download

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:
Precondition: User declined access to files (see video below)

Launch the app
Log in with any account
Select any user and tap on plus button
Select attachment as txt. format
Tap Send
After attachment sent - tap on it
Select Allow when asked if you want to give storage permission

Expected Result:
Attachment downloads without any error popup.
Actual Result:
A popup appears telling the user permissions have to be set, and then it disappears and the download happens successfully.  We should not show the popup asking the user for permissions if they have just given us permission.
Video
Workaround:
unknown
Platform:

Where is this issue occurring?

Android

**Version Number:<IP_ADDRESS>
**Reproducible in staging?:YES
**Reproducible in production?:YES
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:
Video
Issue reported by:
Slack conversation:
Job post https://www.upwork.com/jobs/~0158de43e8face62ee
View all open jobs on GitHub
Title:

Triggered auto assignment to @Jag96 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Triggered auto assignment to @lschurr (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@kbecciv can you please add a screenshot or specify what specific Android permission is denied here? I'm not sure what permission you are referring to, so I am not sure how to reproduce. I attempted to reproduce with these steps:

Disable the Storage permission under Settings->Apps and Permissions->New Expensify

Navigate to a chat and try to download a file, see the request to enable the storage permission

Hit Deny, confirm attachment isn't downloaded

If I hit Allow instead of Deny, I see that the Access Needed message shows up initially, and then the download is successful, but only after I Allow the permission. That seems like an issue in itself, but I want to confirm the entire flow, including the manual steps you took to decline access to files.

@Jag96 Please attached video with Expensify app permissions.
Uploading Screen_Recording_20211207-155717_Settings.mp4…

@Jag96 Please attached video with Expensify permissions,
Video

@kbecciv ah perfect that makes more sense! It looks like in that video you chose Allow which then triggered the download, so the only issue here is that after the user selects Allow, we shouldn't show the Access Needed popup. I'll update the description and title and move this along.

Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@Jag96, @kevinksullivan Huh... This is 4 days overdue. Who can take care of this?

Triggered auto assignment to @parasharrajat (Exported)

Triggered auto assignment to @thienlnam (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Below line seems to be the reason for showing the permission error dialog, even when user has given storage access. showError method is called irrespective of the returned value for hasPermission.
https://github.com/Expensify/App/blob/main/src/libs/fileDownload/index.native.js#L139-L144
Proposal
Move the showError  call to else block under if (hasPermission). This will make sure that the prompt will be shown only if user has denied the permission.

Hey @aswin-s, that proposal looks good.  I think you mean the showAlert call but either way 🟢
@kevinksullivan Could you please hire @aswin-s in Upwork?

All good here.
:ribbon: :eyes: :ribbon:

Offer sent @aswin-s !

Offer accepted in upwork. @kevinksullivan

Just merged the PR: https://github.com/Expensify/App/pull/6840
Now waiting for production deploy and 7 day regression hold once that happens

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.24-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

https://github.com/Expensify/App/pull/6840

If no regressions arise, payment will be issued on 2022-01-11. :confetti_ball:

@thienlnam we are logging a new issue potentially related to this PR. I will post the link in a bit.
Current issue not reproducible during KI retests. (First week)

https://github.com/Expensify/App/issues/7008

@mvtglobally Linked issue is unrelated to the current PR. I've posted the reason & fix for the bug in #7008

Issue not reproducible during KI retests. (First week)

Paid in upwork. Thanks @aswin-s !


Concatenation in test case description causes test loading fail

If you add description to your it test-case as two concatenated string via + operator test loading failes.
Minimal repository: https://github.com/zzzorgo/vscode-jest-test-adapter-issue
There is repo with two issues i was just too lazy to create separate repos, look for concatenatedDescription.test.js file

For completeness - this seems to be an issue in the parser in jest-editor-support.  There is an open PR to update the parser (jest-community/jest-editor-support#30) which may fix this.


Add: Checksum check on decoder

Actually, the checksum isn't checked on the decoder itself;
it's only verified when you attempt to build a ProtocolMessage from it.
PR propose validating it upon receipt and returning an error promptly.

A question -- do we want to prohibit access to the message when the CRC is wrong, or do we want to allow the user to access it even if the CRC is wrong?

I think that would be better for us return the message inside the error enum

A question -- do we want to prohibit access to the message when the CRC is wrong, or do we want to allow the user to access it even if the CRC is wrong?

I think that would be better for us return the message inside the error enum

@joaoantoniocardoso humm, then would be possible to try recover the msg,
we can do something like @patrickelectric expose, should I modify this PR for it?

A question -- do we want to prohibit access to the message when the CRC is wrong, or do we want to allow the user to access it even if the CRC is wrong?

I think that would be better for us return the message inside the error enum

@joaoantoniocardoso humm, then would be possible try to recover the msg, we can do something like @patrickelectric suggested, should I modify this PR for it?

You only need to update ChecksumError declaration

@joaoantoniocardoso thks for input.
Modief ParseError::CheksumError to contain ProtocolMessage as Success does.


Small fix for  __test_files__ link

Checklist

[x] I've given this PR a concise, self-descriptive, and meaningful title
[ ] I've linked relevant issues in the PR body
[x] I've applied the relevant labels to this PR
[ ] I've added relevant tests for my contribution
[ ] I've updated the documentation and/or added correct docstrings
[x] I've assigned a reviewer
[x] I've consulted ADS's internal developer documentation to ensure my contribution is in line with any relevant design decisions

Description
This PR aims to update the link of the test files to the latest release. For more details, refer here

Coverage remained the same at 83.018% when pulling 6eb1b1a15e49b7459097fb3c3d49dd7dbf6cbc3a on vs/quickfix_test_link into f54e1d9798841fe20d06a18350a6d462ea998e87 on master.


Comment out jest.disableAutomock() with explanation

Issue
Fixes: https://github.com/trivikr/vitest-codemod/issues/111
Description
Comment out jest.disableAutomock() with explanation
Testing
CI

Superceded by https://github.com/trivikr/vitest-codemod/pull/113 which deleted disableAutomock


Build Images using Docker

Simple scripts to build the images using docker instead of vagrant:
git clone --recurse-submodules <repo>
docker-compose run build_XXXX # See docker-compose.yml for available options.

This was useful to me, that's why I share :man_shrugging:

@hkfuertes any reason to not merge this? Sorry for the delay, but this looks useful. I am just waiting to try this out as I'm not very familiar with docker yet.

@hkfuertes any reason to not merge this? Sorry for the delay, but this looks useful. I am just waiting to try this out as I'm not very familiar with docker yet.

I thought there was no interest... as you already used Vagrant VM to build it... If you think its useful, please merge it (or play with it and merge it)

Hi, sorry for the delay. I had played around with this, but was getting into some permission issues with the setup. Did play around some more and came up with 9d9dd9c27779c1f10969f5347e795bf0d65c3be8. Please have a look and suggest if it can be better? I'm new to docker, but seems much better than using Vagrant for this. Thanks for suggesting and getting me started on this!

I have seen your docker branch... nice!!!
Please close this PR when you think it fits :)
Thank you!

9d9dd9c27779c1f10969f5347e795bf0d65c3be8 adds support for building with docker. Thanks a lot for this. :)


added sentry example

@fwang can you grab a screenshot of the Sentry layer and save it as assets/examples/sentry/copy-sentry-lambda-layer-arn.png.


Dell .exe files not extracting on 7.1.7

Based on commit log looked like this was maybe fixed in 7.1.6, but it's not working for me using 7.1.7.
I'm using MDT, and extracting drivers to d:\Drivers. What I get is a folder D:\Drivers\Dell\Latitude 3520\Driver Cab with '3520-2C94W-Win10_1.0_A07.exe' in it, and D:\Drivers\Dell\Latitude 3520\Win10-A07 with another copy of the exe file in it instead of the extracted drivers. It still tries to import the directory, but of course doesn't find any drivers there.
Manually extracting the drivers with 3520-2C94W-Win10_1.0_A07.exe /s /e= seems to work fine.

Same here. 7.1.7 is not extracting CABs anymore. :/

https://github.com/maurice-daly/DriverAutomationTool/issues/353#issuecomment-1241467151


Transfer big files (10MB)

Hello.
How can I transfer ZIP file (10MB) from Requester to Responder? Is Cote allows to do this?
Thanks.

How about file with size 10MB?

Same question, does it fit for big files?

cote doesn't currently allow transfer of binary files in a coherent way. It's not very easy to implement it, but still doable. I would love to have some help from the community here.


Live Streaming unavailable

Steps to reproduce the behaviour:

Go to https://superhero.com/league
Join the event
Click on the burger menu
Click on Start Live stream
Paste Youtube live stream key and Click on Start Live stream on the pop-up
See an error:

OS: Mac 10.15.7
Wallet: Superhero 5d91965 / v.0.3.3
superhero ui: b9a82bc / 0.2.1

This is because jibri was not started

I have checked that the error is reproducible again on my side.


215 mark quantumleap subscription as deprecated

closes #215
Marked quantumleap susbscription deprecated as needed. IdPattern was also added as query parameter but was not able to be tested properly.

@SystemsPurge, could you add a test function in tests/clients/test_ngsi_v2_timeseries.py to validate the implemented idPattern functionality?

Test function is implemented and should work properly now. I just wanted to point out a few things. The setup and teardown methods do not work in the test ( at least in test_ngsi_v2_timeseries ) because the servicepath is hard  set on /static, whereas the servicepath in settings ( where it is taken from in the setUp method ) is a different one. No entities are added or removed before and after each test. The test for idPattern is a bit convoluted because in the case where we expect 0 results, an error must be caught, whereas in any other case a value calculated from the response is compared to an expected value. Suggestions on how to write it in a more simplified manner ( if possible ) are definitely welcome.
I've had to go through the quantumleap code to figure out the regex OP used for the SQL queries, and its the '~' op ( case insensitive POSIX ), same as it stands in ORION documentation, only with an extra ($|.) tacked on in the end, i guess to indicate an automatic search as a subexpression.


Module not found: Cannot resolve directory './images'

Description
App throws error about resolving images directory from node_modules. It worked with version 0.42.
I import css like this:
import 'leaflet/dist/leaflet.css'

Expected behavior
Application should open.
Actual behavior
It throws error:
Module not found: Cannot resolve directory './images' in C:\MyApp\node_modules\leaflet\dist

Environment

npm ls react-scripts (if you haven’t ejected): 0.6.0
node -v: 6.3.0
npm -v: 3.10.3

I just removed leaflet folder and installed version 1.0.0-rc.3, previously was 1.0.0, and suddenly it works. But as I was looking at folder structure it's basically the same.

Thanks for the report. Since your immediate problem is resolved, it won’t be a hi pri issue, but we’ll try to reproduce it with those versions when we get some time.

Sure, thanks! You can view the problem here, by changing this line:
https://github.com/sinergise/SentinelPlayground/blob/master/package.json#L16 to
"leaflet": "1.0.0-rc.3"

The './images' directory error is caused by this line:
https://github.com/Leaflet/Leaflet/blob/v1.0.0/dist/leaflet.css#L379
For convenience, this is the commit that added this line:
https://github.com/Leaflet/Leaflet/blob/v1.0.0/dist/leaflet.css#L379

Per https://github.com/Leaflet/Leaflet/issues/4849, this will be addressed in 1.0.1 of the library. There is nothing we can do on our side—Webpack analyzes CSS but Leaflet’s CSS intentionally refers to a non-existing file.
They intend to fix it. Please make sure to be considerate to them in the issue if you express your desire to see this fixed 😉 .
In the meantime, you can work around the issue by copying the CSS into the public folder and including it from HTML.
Assuming you put it into public/leaflet.css:
<!-- Temporary until https://github.com/Leaflet/Leaflet/issues/4849 is fixed -->
<link rel="stylesheet" href="%PUBLIC_URL%/leaflet.css">

I’m closing because a workaround exists, a fix is planned, and there is nothing we need to do on the side of Create React App. I hope this helps!

Whoa thanks! Will report the issue (if it's not already) and wait for the fix.

The issue is reported here: https://github.com/Leaflet/Leaflet/issues/4849.

Yeah,saw it,read only half of posts,sorry :)

sep. 2016 8:57 pop. je oseba "Dan Abramov"<EMAIL_ADDRESS>napisala:

The issue is reported here: Leaflet/Leaflet#4849
https://github.com/Leaflet/Leaflet/issues/4849.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/facebookincubator/create-react-app/issues/782#issuecomment-250264932,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKV7etgSySovp8_Lvs77VtrnCGcckGykks5quriJgaJpZM4KHraN
.


Package install broken?

Not sure about this, as I haven't used Python in a while and hence might be doing something wrong, but currently doing pip install wquantiles just adds a a folder named wquantiles-0.3.dist-info to my package folder, which doesn't contain the actual .py files that define the functions.

There should also be a file called weighted.py in the package folder. Could you check if you have this file please?
The main methods can be imported using from weighted import quantile, median. I think I should clarify that.

Sure, that was my point, the actual file containing the definitions was not installed. I downloaded it manually and it works fine, but the pip install didn't work.

I have tried to reproduce this with no success.
Summarizing, when you run pip install wquantiles the folder wquantiles-0.3.dist-info  is added to site-packages but the file weighted.py is not. Hence, if you try to run from weighted import quantile, median it does not work unless you manually add weighted.py to site-packages.
Could you please send me some information about your system (Operating System, Python version python --version, pip version pip --version, etc) so I can try to reproduce the error?

It's Python 2.7.8, Anconda 2.3.0 (64-bit), with pip 7.1.2 on Windows 7 SP1.
If you can't reproduce it and no one else sees it, it might be a quirk on my machine.

I have tried to reproduce the error in exactly the same system (Python 2.7.8, Anconda 2.3.0 (64-bit), with pip 7.1.2 on Windows 7 SP1) from a fresh install and could not find the problem.
The file weighted.py is placed in Anaconda\Lib\site-packages when I execute pip install wquantiles.

Perhaps is a quirk on your system as you mention. If you need to debug this at some point down the line maybe you could try to create a conda isolated environment to make some tests. Anyway, at least the manual copy of the file works for you. Thank you for the report!


[DO NOT MERGE] Democracy Earth Documentation

Adding content explaining how to vote with democracy earth

@paulamlb Here is the PR for the documentation.


How can I prevent "307 Temporary Redirect" while accessing FastAPI via an Android Emulator on local machine

The FastAPI REST API is working great when checked in the local browser and with the Advanced REST client Chrome plugin (only while using the XHR enabled).
But in no way are the same API accessible via the Android App running inside an emulator.
The info message in FastAPI console when accessed via Android App
<IP_ADDRESS>:57083 - "POST /v1/login HTTP/1.1" 307 Temporary Redirect
This is what is configured while loading the FastAPI
api = FastAPI(title=PROJECT_NAME)

if not ALLOWED_HOSTS:
    ALLOWED_HOSTS = ["*"]

api.add_middleware(
    CORSMiddleware,
    allow_origins=ALLOWED_HOSTS,
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)

Any help would be greatly appreciated.

Hard to say exactly what’s going on here without more detail (eg, what are the raw 307 http response contents? what is the redirect url? what do the server request logs contain?) but my guess is something is going on with a trailing slash. Possibly your android client is modifying the url to add a trailing slash? Or maybe performing some other url modification starlette is able to handle via redirect?

Sorry about that. Here are the details via CURL
**sushil@Sushils-MacBook % curl -v -X POST -H "Origin: http://aws.indonis.com" http://localhost:8000/v1/login**
*   Trying ::1...
* TCP_NODELAY set
* Connection failed
* connect to ::1 port 8000 failed: Connection refused
*   Trying <IP_ADDRESS>...
* TCP_NODELAY set
* Connected to localhost (<IP_ADDRESS>) port 8000 (#0)
> POST /v1/login HTTP/1.1
> Host: localhost:8000
> User-Agent: curl/7.64.1
> Accept: */*
> Origin: http://aws.indonis.com
>
< **HTTP/1.1 307 Temporary Redirect**
< date: Mon, 25 Nov 2019 03:22:56 GMT
< server: uvicorn
< location: http://localhost:8000/v1/login/
< access-control-allow-origin: *
< transfer-encoding: chunked
<
* Connection #0 to host localhost left intact
* Closing connection 0
sushil@Sushils-MacBook-Pro indonis_api %

Below is how the FastAPI server has been setup
# Read settings for API project
api_settings = get_api_settings()
api = FastAPI(title=PROJECT_NAME)
# Attach the Sync API router
api.include_router(sync_api, prefix=api_settings.api_v1_route)
# Set the GzipRoute
api.router.route_class = GzipRoute

# Allow cross origin for Dev purpose
if not ALLOWED_HOSTS:
    ALLOWED_HOSTS = ["http://aws.indonis.com"]

api.add_middleware(
    CORSMiddleware,
    allow_credentials=False,
    allow_origins=["*"],
    allow_methods=["*"],
    allow_headers=["*"]
)

api.add_exception_handler(HTTPException, http_error_handler)
api.add_exception_handler(HTTP_422_UNPROCESSABLE_ENTITY, http_422_error_handler)

uvicorn.run("app.main:api", host="<IP_ADDRESS>", port=8080, reload=True)
Quite curious to know what's being missed out.

Yeah, you can see it is trying to redirect you to the endpoint with a trailing slash:
< HTTP/1.1 307 Temporary Redirect
< date: Mon, 25 Nov 2019 03:22:56 GMT
< server: uvicorn
< location: http://localhost:8000/v1/login/

The problem is in code you didn't share -- wherever you've defined your endpoint, the path you are providing is ending with a "/". If you remove that trailing slash (or put a ? after it, if you want it to work both ways), this issue should go away.

Wow, that really was the cause of the issue, indeed. After removing the trailing "/" now both the REST API Client and the Android Emulator are able to connect to the REST API.
Thank you very much. This was really really helpful. Much appreciated :-)

Thanks for the help here @dmontagu ! :clap: :bow:
Thanks for reporting back and closing the issue @sushaeel  :+1:

Unfortunately, "/?" no longer works in the versions since April @tiangolo as reported in #1787 and #1648

Related: https://github.com/tiangolo/fastapi/discussions/5491


Doesn't build with zig 0.9

c_void got renamed but it exists in some files and dependencies still. easy to fix by zig fmt every file

src/git.zig:221:73: error: use of undeclared identifier 'c_void'
fn submoduleCb(sm: ?*c.git_submodule, sm_name: [*c]const u8, payload: ?*c_void) callconv(.C) c_int {

There seems to be some breaking change involving if allocators should be references or not. But I didn't find anything in the 0.9 change log.

./src/main.zig:38:36: error: expected type '*std.mem.Allocator', found 'std.mem.Allocator'
        try Display.init(&display, allocator);
                                   ^

https://ziglang.org/download/0.9.0/release-notes.html

the allocators change is mentioned here: https://ziglang.org/download/0.9.0/release-notes.html#Allocgate

thanks for the c_void heads up, going to be fixing these up when I'm back from holidays (Dec 26)

I got most of the way there. Heres a branch you can pick up when you get back https://github.com/mattnite/gyro/pull/149

Fixed with #149


Can't start the Home Assistant Addon

Sorry but i think there is a problem with configuration ?

still having some bugs in the addon. please wait 😀

Oh sorry about that :D thanks for the work

This should be fixed now with the newest version.


Add support for rate-limits retry in Cohere

Need to push to 60 req/min to get the error and add support for it
See: https://docs.cohere.ai/limited-access/

@mauriyouth if you want to keep playing on the Rust side of things, this one is an easy one as well. You can look at the openAI provider for an example.

Closed by #16


Release v1.5.1

[x] I've updated the (WIP) tag to today's date in CHANGELOG.md
[x] I've added the release label to this PR

Changes

Fixed version panel misplacement on scrollable pages and being locked to the width of the side nav bar, a bug introduced in v1.5.0 by #82. (#97)

Security: Changed version of jsprim to v1.4.2 and json-schema to v0.4.0 to resolve CVE-2021-3918. (#100)

Actions after merge
Follow the step-by-step guide found here:
https://iver-wharf.github.io/#/development/releasing-a-new-version?id=merging-a-release-pr

I rebased to include #100


INT B-21429 and B-21431 combo for populating shipment market code

B-21429 Agility ticket
B-21431 Agility ticket
Summary
We want to be able to track if a shipment is a domestic/international shipment, but we can only do that by checking the addresses under the shipment. If both addresses are CONUS then the market_code should be d, else it's gonna be i.
This does contain code needed for B-21430 since the isOconus value is necessary to determine the shipment's market code.
This PR does the following:

migration to populate market_code columns
updates all Swagger definitions for shipments to send back marketCode to the UI
updates all model_to_payload.go files to send back marketCode
adds in logic in both shipment creation and update that determines if marketCode needs to change by checking the address values
adds/updates relevant tests

How to test

Fire up yer client & server
Check your migrations and the mto_shipments table - every value in market_code should say d
Create any shipment as a customer/office user with any CONUS addy
Throw in some console logs somewhere that you can see the data
You should see the marketCode value in the shipment object
Now... To test if a shipment changes to i you need to be able to enter an OCONUS state (in this case, Alaska)
Close down your server, in your envrc turn FEATURE_FLAG_ENABLE_ALASKA to true
Run direnv allow and fire up your server again
Create a shipment with an Alaska address
Check your logs, should now see i in the marketCode value on the shipment

Screenshots

When the prime updates destination address and sets state to AK within 50 miles of zip code it does not adjust the market code from d -> i or i -> d
However it does work perfectly for office users updating the shipment

Ah, nice catch. That must use a separate updater function. I'll take a look.

When the prime updates destination address and sets state to AK within 50 miles of zip code it does not adjust the market code from d -> i or i -> d
However it does work perfectly for office users updating the shipment

This was addressed in this commit

@traskowskycaci & @cameroncaci
Updated relevant files per your requests - please take a look when ya get another chance!


Fix some typos

Just some minor typo fixes, in comments and output.

Original issue reported on code.google.com by<EMAIL_ADDRESS>on 18 Jan 2013 at 4:24
Attachments:

typos.diff

See Pull Request #35

Thanks for the patch!


Segfault since last commit

Hello,
I just updated to the latest commit (c90bcc3564610ac29d52dc0019358e05832d37e4) and I have been getting segmentation faults in Neovim, at least with Python files. Not every Python file trips up the editor, so simple scripts are fine. I have attached a script which produces a segfault (I had to change the extension because of GitHub, change it back to .py):
kNN.txt

I've noticed the same problem too, I'll need to investigate but will likely need to revert the last commit in some form.

The segfault came from decoration.c in nvim so I guess there is a bug in the extmark handling. The only thing changed in the last commit relating to this was to no longer use ephermal extmarks. https://github.com/lewis6991/spellsitter.nvim/commit/c1e9228630542336be6ad107fa380f138ec0e3c2 makes the extmarks ephemeral again so should resolve this. Please reopen otherwise.


Named params not working with strings in queries

Preparing a statement from this:
SELECT * FROM tablename WHERE labels LIKE '%:param%'

And then calling Statement.query_named(<named params>) does not appear to be correctly parsing '%:param%'.  It appears to be ignoring everything within the single quotes when replacing parameters with the named params.

It looks like this is actually an issue with the underlying SQLite C function sqlite3_bind_parameter_index().  I suppose there's also room for debate on whether or not this is a bug or intended.  If this is intended, then what is the solution in rusql to bind a named parameter to something within quotes?

Yeah, this is intended behavior. You could make the :param be format!("%{}%", thing) and then use SELECT * FROM tablename WHERE like(labels, :param) also (I dont remember if you can use the operator on a non-string literal).
Note that I vaguely remember some security concerns around using LIKE like this, but I think it might just be denial-of-service related.

Ah, this makes sense.  The point of binding the parameter is to define it entirely somewhere else, not plop it in the middle of an expression it's mean to be a part of.
Thanks for your help, I'll close this issue.

Note - Using WHERE LIKE(labels, :param) with format!("%{}%", thing) doesn't seem to work.  However using WHERE labels LIKE :param ith it does.

Note - Using WHERE LIKE(labels, :param) with format!("%{}%", thing) doesn't seem to work.  However using WHERE labels LIKE :param ith it does.

Glad you found something that works, but it's weird that like as a function didn't: https://sqlite.org/lang_corefunc.html#like

Glad you found something that works, but it's weird that like as a function didn't: https://sqlite.org/lang_corefunc.html#like

Looks like with the WHERE LIKE(labels, :param) format it treats the % as string literals.

Looks like with the WHERE LIKE(labels, :param) format it treats the % as string literals.

Oh, I see the issue, it should be LIKE(:params, labels).

Oh, I see the issue, it should be LIKE(:params, labels).


Feature: Dynamic incoming & outgoing registry project name

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

32514ff810819974b855760ece6b80505dbecdf6


[QUERY] Why getVirtualMachines().listByLocation response not contain VirtualMachineInner.instanceView()?

Query/Question
Azure get Instances/VM via  listByLocation() not returning the mentioned values in response object (InstanceView).
PagedIterable virtualMachineInners = azure.virtualMachines().manager().serviceClient().getVirtualMachines().listByLocation("eastus", Context.NONE);
for (VirtualMachineInner inner : virtualMachineInners) {
System.out.println(inner.instanceView());// Getting null and that will contain some useful primary info like machine power state and extensions.
}

@shailendrajain24
This is service behavior. I believe the reason is getting instance view of each VM takes extra resource to process. And it is not economical (or take exceedingly long time)  to do this for all 200 in a page.

@weidongxu-microsoft , Is there any way to do it in optimise way.

@shailendrajain24
You might try ARG https://learn.microsoft.com/en-us/azure/virtual-machines/resource-graph-samples?tabs=azure-cli#count-of-virtual-machines-by-power-state
SDK https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/resourcegraph

https://github.com/Azure-Samples/compute-java-manage-vm-async/issues/3#issuecomment-1202146781

Through azure resource graph, can we get all the below  information ? (because we were expecting instance view to get these values..)
Status like stop/start/deallocate
Address Space
Managed Status
CPU Usage
Extensions


Added 3 messages with links to TestCafe Studio

The new message with link to TestCafe Studio is displayed in the CLI interface after each 20 runs.
Now, there are 3 such messages.
The texts will be reviewed by Rey. But we check them now and apply the changes later if it will be necessary.

FPR @kirovboris @AndreyBelym @VasilyStrelyaev

https://github.com/DevExpress/testcafe/pull/3733/files#diff-93d60a2037f34104929d4d77560fb4c3R32
So, these warning are for our own debug purposes? Will they be displayed only with the --dev flag?

So, these warning are for our own debug purposes? Will they be displayed only with the --dev flag?

It's internal debug messages.
They will display if you specify DEBUG environment variable (for more detail see https://www.npmjs.com/package/debug#windows-command-prompt-notes).

Okay, then I guess we don't have to run them through the correctors. I'll just make one edit.
The promotional messages are yet to be approved by Ray.

We decided to show on first run as well. LGTM in other.


Wrong keywords in forwardingList

I noticed that in the forwarding list there are keywords "server-name" and "service-name".
In the template from the ApplicationPattern I only see "server-name", so I guess this might be wrong as I would expect this should be "server-name" everywhere...
Example:
  - forwarding-name: ServiceRequestCausesLoggingRequest
    uuid: eatl-2-0-1-op-fc-bm-002
    forwarding-type: InvariantProcessSnippet
    management-requests:
      operation-client-update:
        - server-name: /v1/redirect-service-request-information
          uuid: eatl-2-0-1-op-s-bm-002
      fc-port-update:
        - server-name: /v1/redirect-service-request-information
          uuid: eatl-2-0-1-op-s-bm-002
      fc-port-deletion:
      operation-client-deletion:
    initiating-requests:
      - server-name: /v1/register-yourself
        uuid: eatl-2-0-1-op-s-bm-000
      - server-name: /v1/embed-yourself
        uuid: eatl-2-0-1-op-s-bm-001
      - server-name: /v1/redirect-service-request-information
        uuid: eatl-2-0-1-op-s-bm-002
      - server-name: /v1/redirect-oam-request-information
        uuid: eatl-2-0-1-op-s-bm-003
      - server-name: /v1/end-subscription
        uuid: eatl-2-0-1-op-s-bm-004
      - server-name: /v1/inquire-oam-request-approvals
        uuid: eatl-2-0-1-op-s-bm-005
      - server-name: /v1/update-client
        uuid: eatl-2-0-1-op-s-bm-007
      - server-name: /v1/list-ltps-and-fcs
        uuid: eatl-2-0-1-op-s-bm-008
      - server-name: /v1/redirect-topology-change-information
        uuid: eatl-2-0-1-op-s-bm-009
      - server-name: /v1/update-operation-key
        uuid: eatl-2-0-1-op-s-bm-010
      - server-name: /v1/update-operation-client
        uuid: eatl-2-0-1-op-s-bm-011
      - server-name: /v1/bequeath-your-data-and-die
        uuid: eatl-2-0-1-op-s-im-000
      - server-name: /v1/start-application-in-generic-representation
        uuid: eatl-2-0-1-op-s-bs-000
      - server-name: /v1/inform-about-application
        uuid: eatl-2-0-1-op-s-bs-001
      - server-name: /v1/inform-about-application-in-generic-representation
        uuid: eatl-2-0-1-op-s-bs-002
      - server-name: /v1/inform-about-release-history
        uuid: eatl-2-0-1-op-s-bs-003
      - server-name: /v1/inform-about-release-history-in-generic-representation
        uuid: eatl-2-0-1-op-s-bs-004
      - service-name: /v1/regard-application
        uuid: eatl-2-0-1-op-s-is-001
      - service-name: /v1/disregard-application
        uuid: eatl-2-0-1-op-s-is-002
      - service-name: /v1/list-applications
        uuid: eatl-2-0-1-op-s-is-003
      - service-name: /v1/list-records
        uuid: eatl-2-0-1-op-s-is-005
      - service-name: /v1/list-records-of-flow
        uuid: eatl-2-0-1-op-s-is-006
      - service-name: /v1/list-records-of-unsuccessful
        uuid: eatl-2-0-1-op-s-is-007
    consequent-requests:
      - client-name: ExecutionAndTraceLog://v1/record-service-request
        uuid: eatl-2-0-1-op-c-bs-eatl-2-0-1-000

Changed as proposed.


Incompatible with psychedelic shaders

The portals are rendered as if the shaders are not there

It only looks correct when you get close

http://shadersmods.com/category/psychedelic-shaders/

Immersive Portals' renderers were not designed to be used with shaders that actually distort space. I believe it simply uses the portals' shape rather than going through vertex shaders and what have you. I believe this is WAI

Is shadersmods.com like CurseForge or does it need some https://stopmodreposts.org/ ?

I don't really know, I just used it as an example, but here's an image that proves they can't sort correctly

I actually checked it out and it seems like they're just storing direct links to shader mods.

I don't think it'd be that hard to implement as the portals could warp just on each grid point as these blocks do:

You wouldn't have to add any points, just move them. (If we're dealing with a large portal, you could add a few points to prevent it from being a straight line instead of curved as the shaders intended)

Supporting psychedelic shaders is very hard and not worth the effort.

Hi, I assume support for this is still unlikely to be added? I am working on a project involving custom vertex shaders to distort the world and immersive portals, but none of the available optifine gbuffers vertex shaders have any effect on the portal edges.


Compute instanceHost on model change, set instance at instanceHost.instance

Gives the instanceHost an 'instance' property, which points to the currently active instance

@bedeoverend can we call instance 'view'?

Done and done


Code functionality

Filter returned  products based on filter options

Search functionality was checked and verified functional
hours of completion: 7hrs


release 1.1.3 to pypi

Hwould it be possible to create a release for ssh-crypt on pypi with the latest 1.1.3?

Will do today if i'll have time

done

pull request to add the package in here


riscv64: Improve icmp codegen

👋 Hey,
This PR improves our current lowerings for icmp and moves them to ISLE. We currently emit a 4 instruction sequence that moves 1 or 0 to a register based on a branch. This PR changes the lowerings to use the dedicated icmp instructions.
These are:

Instruction
Description

slt rd, rs1, rs2
Set Less Than

sltu rd, rs1, rs2
Set Less Than Unsigned

slti rd, rs1, imm
Set Less Than (Immediate)

sltu rd, rs1, imm
Set Less Than Unsigned (Immediate)

All other IntCC's are handled with some variation of the above. Additionally I've also added some optimizations when the comparision is done with an immediate.
This has been fuzzing for most of today (~8h) without any issues.

This was a fairly big rebase since most of these changes conflicted with #5888 which also added the snez mnemonic. I think I got it right, at least nothing seems too out of place.

I'm closing this because I'm not going to look into it right now, and it looks like @alexcrichton is looking into something similar in #7113.
Nevertheless thanks @jameysharp for all of the feedback and helping me along with this ❤!