[CONTROLLER] fix learning huawei bugs

This PR is for:

Server

Fixes learning huawei bugs
Steps to reproduce the bug

create a dnat rule with port id has two type ips

Changes to fix the bug
Affected branches

main

Checklist

[ ] Added unit test to verify the fix.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.zhengya seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Modify response before sending it to the client

Hello,
Is there a way to modify the response before sending it to the client ? I am able to retrieve the response in the middleware using "onResponse()" however I did not find a way to update the content of the body response
Sorry if the question does not belong here
Have a good day!

Hey @Juuuke!
I believe you'll be able to do this by modifying the underlying stream that Guzzle creates.
What kind of body is it? JSON?  For example if you're using JSON you'll need to use json_encode. Guzzle also provides a handy Utils class to create a stream from a string.
Try something like this...
$request->middleware()->onResponse(function (Response $response) {
    // Don't use ->json() as that will cache the JSON body
    $data = json_decode($response->body());

    $stream = Utils::streamFor(json_encode(array_merge($data, ['something' => 'else'])));

    $response->getPsrResponse()->withBody($stream);

    return $response;
});

Thanks for the hint :) - I have tried that but I don't seem to make it work. Here's the way I am calling the onResponse() from my connector, (https://docs.saloon.dev/digging-deeper/middleware#using-constructors) maybe this is the problem or I misunderstood something?
public function __construct()
{
    $this->middleware()->onResponse(new SerializeJsonApi);
}

Thanks for your time :)

I tried a lot of things today, I found that the answer is indeed updated in the middleware but the output is still the original one outside the middleware.
I don't know what else to try, if anyone finds a solution feel free to tag me here :)

Yeah, I noticed this as well when I did some testing last night.
I'm going to check to see if there's a bug in the middleware pipeline and the new result isn't being passed down the middleware pipeline properly.

Thanks!
I'll try on my side and submit a PR if I find something.

@Sammyjo20 I found the "issue", here's the thing :

MiddlewarePipeline.php:100

$callbackWrapper = Closure::bind(function (Response $response) use ($callable): Response {
    $result = $callable($response);

    return $result instanceof Response ? $result : $response;
}, new class {});

You're expecting a Http\Saloon\Response in order to return the result of the callback, otherwise you return the original response.
I managed to make it work by returning a Saloon response instead of a Guzzle PSR7 response :

$pendingRequest = $response->getPendingRequest();
$responseClass = $pendingRequest->getResponseClass();

 $stream = Utils::streamFor(json_encode($resources));
 $response = $response->getPsrResponse()->withBody($stream);

return $responseClass::fromPsrResponse($response, $pendingRequest);

I don't know if you intended to do it this way, if so, perhaps the doc should be updated ?
Thanks for your time :)

Found the last problem, it's in PendingRequest.php:336 in executeResponsePipeline function, the response is not set,
public function executeResponsePipeline(ResponseContract $response): ResponseContract
    {
        $this->middleware()->executeResponsePipeline($response);

        return $response;
    }

The original response is returned here, should return the response returned from the executeResponsePipeline method instead ! :)

@Sammyjo20 Sorry I updated my previous answer, I deleted it by mistake. :)

Hey @Juuuke wow nice find! Thank you - I'm happy to PR this, I will make a PR tomorrow for you.

Hey @Juuuke thanks again for finding the bug, if you update Saloon - could you try and again and let me know if it's fixed for you please? Thanks!

Hey!
Thanks for the update, I will try it this evening as I am not at home right now. I will let you know 🙂
Thanks again!

@Sammyjo20 All good. Works great. Thank you so much for you time :)


Icon request: Splitgate

App ID: 677620
WM_CLASS: PortalWars-Linux-Shipping

Hello, it should work now.


[Feature Request] Integrate Llama3 from hugging face

Required prerequisites

[x] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
[X] Consider asking first in a Discussion.

Motivation
Meta released Llama3
Solution
Integrate Llama3 from hugging face
https://huggingface.co/collections/meta-llama/meta-llama-3-66214712577ca38149ebb2b6
Alternatives
No response
Additional context
No response

close this issue since not needed and feature has included in https://github.com/camel-ai/camel/pull/448


[1.12.2] Crash on Server

Getting a crash with version
Crash Log: https://pastebin.com/YfqkA5Z7
OreLib-1.12.2-<IP_ADDRESS>BETA
Patchwork-1.12.2-<IP_ADDRESS>BETA

Dedicated server?

Pushed v<IP_ADDRESS> to CurseForge.


Device reviews and ratings

As a user, I would like to know what other fabricators and recipients have learned from printing, fitting, and using devices from LimbForge.  Ideally, I would like to be able to look at a 0-5 star average rating and see written reviews (as with Amazon/Yelp) to help inform my decision about which design to print if there are multiple options for a given limb difference.  This would also be useful when beta testing designs.  Reviews and ratings would ideally also be accessible on the ECF Web Portal and could be viewed within LimbForge.

moved to https://github.com/e-nable/LimbForge/wiki/Feature-requests-(not-yet-rated)


Pass all EventEmitter methods to the client connection

This pull request makes sure that the client implements all original EventEmitter methods and namespaces them with the service name. Closes #7, closes #22 and closes https://github.com/feathersjs/feathers/issues/362

Looks good.

Sorry. Coming to this late but this is awesome. Thanks for getting that in @daffl!


KAFKA-13851: Add integration tests for DeleteRecords API

Changes
Added integration tests to test the DeleteRecords API for the following scenarios:

Happy case when the records are deleted
Error case when an invalid topic is provided
Error case when an invalid offset is provided

Testing
./gradlew unitTest is successful locally
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Known flaky tests failing unrelated to this change
Build / JDK 17 and Scala 2.13 / shouldBootstrapTwoBrokersWithFollowerThrottle() – kafka.server.ReplicationQuotasTest
34s
Build / JDK 17 and Scala 2.13 / shouldRestoreNullRecord – org.apache.kafka.streams.integration.StateRestorationIntegrationTest

@dajac, this PR is ready for your review.

@dengziming @showuon @mimaison please take a look at this minor PR when you get a chance!

Thank you for reviewing this @showuon and @dengziming. Really appreciate it :)
It should be ready to be merged.

All tests passed. Merge into trunk. Thanks.


Segment does not have t_start, t_stop

Segments don't have a t_start and t_stop.
Ideally, these would be two functions of the Segment that calculate t_start and t_stop as the minimum and maximum times of all children, respectively.

Is included as optional attributes.


New App: Happy Hour

Hello again! I'm back with a new app. This one is called Happy Hour. It uses the CocktailDB's free random drink generator API. It displays a drink image, name, and the list of ingredients, and the cache refreshes at the top of the hour so everyone enjoys the same cocktail.

In this image everything fits on the page, but if the ingredients are too long, they scroll vertically. If the drink name is too long, it scrolls horizontally.

Thanks for the contribution! Looking forward to using this :)


Endfix replacing lists with vectors on some inner lists.

Can recreate with:
(defn defn-test (x y) (set 'x (* x 2))(+ x y))
Note with endfix on the output will be:
(fn (x y)
(block defn-test
#(set (quote x) #(* x 2))
#(+ x y)))
The two vectors should be lists.

fix in fb3ac3bf7afbbfb51bf882a6202990e46a83703b

fix in fb3ac3bf7afbbfb51bf882a6202990e46a83703b


Updates to the cmake files.

Move some common calls into cmake functions to remove duplication. Various other updates to the cmake scripts.

This refactoring was done to make it a bit simpler to turn on warnings in the various exe's and libraries. (see https://github.com/dj2/subspace/commit/a02e754eedc765e75716a5bfec6c4f02aacb5f12)

This refactoring was done to make it a bit simpler to turn on warnings in the various exe's and libraries. (see dj2@a02e754)

Awesome! FWIW I had tried to enable warnings - but it feels like it only worked for MSVC. Welp now that I read it I guess I forgot the Wall 😂 https://github.com/chromium/subspace/blob/main/subspace/CMakeLists.txt#L209

Thanks


Ignore NotConnected error in poll_shutdown()

Fixes #41.

Added some context to the commit message.

I ran into this issue as well with reqwest.  This commit definitely reduces the amount of errors that I get, but it doesn't fix it completely.  When testing hitting https://google.com 100 times, I actually start getting different responses than I get with openssl AND I occasionally get this error now:
connection error: unexpected end of file

I suspect that maybe EOF errors need to be ignored as well?

I suspect that maybe EOF errors need to be ignored as well?
..
And then still occasionally returns:
error sending request for url (https://google.com/): connection error: unexpected end of file

I think this is being addressed upstream (hyperium/hyper#3427, hyperium/h2#743) and is separate from the concerns of this branch. See also the Rustls manual's section on Unexpected EOF.
The other two responses seem fine to me. The choice of the server's 301 or 302 response doesn't seem obviously tied to Rustls.

I added h2 as a dependency and pointed it to the git repo:
h2 = { git = "https://github.com/hyperium/h2.git" }

But I still get the error:
Got an error: error sending request for url (https://google.com/): connection error: unexpected end of file

These are my reqwest dependencies:
reqwest = { version = "0.11", default-features = false, features = [
    "rustls-tls",
] }
tokio = { version = "1", default-features = false }
tokio-rustls = { git = "https://github.com/rustls/tokio-rustls.git", rev = "8c9d6f32b972a3c3882a304f8e5156034805ed43" }
h2 = { git = "https://github.com/hyperium/h2.git" }

Wouldn't you need to point your reqwest dependency at a fork that also takes a patch to use h2's unreleased git branch with the change? Does cargo tree reflect what you expect w.r.t the patched h2 dependency? I suspect you ended up with two h2 versions and reqwest using h2 0.3.14
Since this seems unrelated to the change in this PR I think it would be more appropriate to discuss in a separate issue.

Wouldn't you need to point your reqwest dependency at a fork that also takes a patch to use h2's unreleased git branch with the change? Does cargo tree reflect what you expect w.r.t the patched h2 dependency? I suspect you ended up with two h2 versions and reqwest using h2 0.3.14
Since this seems unrelated to the change in this PR I think it would be more appropriate to discuss in a separate issue.

Yep I agree.  I actually wasn't able to test updating h2 alongside this fix as there were compiler errors when I cloned reqwest.  I'm just going to stick to using openssl for now and will circle back around to rustls when reqwest updates with the patches :).
Thanks for the help! :)

I went looking for why this doesn't affect OpenSSL -- as of OpenSSL 3 they have the same behaviour as rustls. (Though there is a flag (SSL_OP_IGNORE_UNEXPECTED_EOF) that can be set via SSL_set_options to turn off that behaviour --but I can't see any rust code anywhere on github that references that option.)
The answer is a bug in rust-openssl that mishandles the error: https://github.com/sfackler/rust-openssl/issues/1803

@quininer do you want to/have time to take a look at this?

Sorry for delay, I just finished my Spring Festival vacation.

No worries, hope you had a nice vacation!

A more reasonable approach is to record a state to ensure that write_io is no longer called after call io.shutdown. but that's fine too.

Ahh, you think this is because poll_shutdown() is called twice? (Looked this up, the std documentation notes that calling it a second time on Linux will yield Ok(()) but on macOS it will yield io::ErrorKind::NotConnected.)
#41 states it's happening because the peer closed the connection.

I'm think about something like this
fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> {
    while !self.start_shutdown && self.session.wants_write() {
        ready!(self.write_io(cx))?;
    }

    self.start_shutdown = true;
    Pin::new(&mut self.io).poll_shutdown(cx)
}

I believe this is because the signal has been emitted when io.shutdown was called, but still returned pending, and when poll_shutdown is called for second time, write_io will return an error.

Looked this up, the std documentation notes that calling it a second time on Linux will yield Ok(()) but on macOS it will yield io::ErrorKind::NotConnected.
...
I believe this is because the signal has been emitted when io.shutdown was called, but still returned pending, and when poll_shutdown is called for second time, write_io will return an error.

Interesting! For what it's worth yesterday I spent a little bit of time trying to write a test for this condition. I couldn't manage to get shutdown to error despite trying a few different approaches. In hindsight I was testing on Linux and so was likely on a pointless quest.
@Revanee Out of curiosity, in #41 when you were observing this issue were you testing on MacOS?

@cpu I've tested it on Arch Linux with kernel 6.7.0-arch3-1. The example in the issue should be enough to reproduce the error. Here is my Cargo.toml with the dependency versions I used:
[package]
name = "proxy_test"
version = "0.1.0"
edition = "2021"

[dependencies]
hyper = { version = "1.1.0", features = ["full"] }
hyper-util = { version = "0.1.1", features = ["full"] }
tokio = { version = "1.18.1", features = ["macros", "rt-multi-thread", "sync"] }
tokio-native-tls = "0.3.1"
tokio-rustls = "0.25.0"
rustls-pemfile = "2.0.0"

@Revanee would you be able to test whether your issue is fixed with the proposal from @quininer?

@djc I tested both the changes from the PR, as well as the proposed changes from @quininer. Neither seem to fix the issue for me. In both cases Pin::new(&mut self.io).poll_shutdown(cx) returns the error Err(Os { code: 107, kind: NotConnected, message: "Transport endpoint is not connected" }).

Okay, I've pushed a simpler fix, can you test this?

@Revanee do you have time to test this soon? We'd like to get a new release out soonish with the rustls 0.23 upgrade, and it would be nice to ship a fix for this at the same time.

@djc I tested the new fix and it works! :)

Thanks! @quininer what do you think of this? It seems like the minimal fix that addresses the observed issue, we can always extend this to more cases if they are encountered in the wild by someone.

I think this is good, at least it doesn't bring risks.


mount.setProps() does not wait for rendering to complete

Current behavior
The test below fails, because it seems that mount.setProps() completes async.
So it says that value1 is 1 (instead of the expected 3) and that value2 is 2 (instead of the expected 4).
import * as React from "react";
import { shallow, mount } from "enzyme";
import * as sinon from "sinon";

function ParentComponent(props: { value1: number, value2: number }) {

    const [values, setValues] = React.useState([props.value1, props.value2]);

    // This hook should trigger a re-render whenever value1 and/or value2 change
    React.useEffect(() => {
        setValues([props.value1, props.value2]);
    }, [props]);

    return (
        <>
            <ChildComponent key={1} value={values[0]} />
            <ChildComponent key={2} value={values[1]}/>
        </>
    )
}

function ChildComponent(props: { value: number }) {
    return <span>{props.value}</span>;
}

describe("ParentComponent", () => {
    it("should repond to change of props", () => {
        const wrapper = mount(<ParentComponent value1={1} value2={2} />);

        // Simulate prop change
        wrapper.setProps({ value1: 3, value2: 4 });

        // Check if children have updated their props
        const children = wrapper.find(ChildComponent);

        expect(children.first().props().value).toBe(3);
        expect(children.last().props().value).toBe(4);
    });
});

Expected behavior
As soon as I wrap the expect statements in a setTimeout(..., 100) the test completes OK.
Should this be necessary?
...
        // Simulate prop change
        wrapper.setProps({ value1: 3, value2: 4 });

        setTimeout(() => {
            // Check if children have updated their props
            const children = wrapper.find(ChildComponent);

            expect(children.first().props().value).toBe(3);
            expect(children.last().props().value).toBe(4);
        }, 100);
...

Your environment
OS: Windows 10 1903
Node: 8.12.0
Npm: 6.4.1
API

[ ] shallow
[x] mount
[ ] render

Version

library
version

enzyme
3.10.0

react
16.8.0

react-dom
16.8.0

Adapter

[x] enzyme-adapter-react-16
[ ] enzyme-adapter-react-16.3
[ ] enzyme-adapter-react-16.2
[ ] enzyme-adapter-react-16.1
[ ] enzyme-adapter-react-15
[ ] enzyme-adapter-react-15.4
[ ] enzyme-adapter-react-14
[ ] enzyme-adapter-react-13
[ ] enzyme-adapter-react-helper
[ ] others ( )

I have the same issue. Adding setTimeout made tests pass, but as I discovered later, that was false positive, because setTimeout wasn't called and as previous expect statement in my test passed, whole test passed.
What to really help is triggering update function like this:
component.setProps({ value: valueMockChanged });
component.update();


generate skeleton for new rules

[ ] generate rule file skeleton
[ ] geberate test fiel skeleton

@David-Pena I was thinking about helping other developers (and ourselves) generating new rules.
Can you please try it and share your thoughts?
At the moment you can try it by node ./src/generator/createRule.js

Oh so inquirir is how you can prompt things to the user. I'm learning so much with this project 🔥
This feature is awesome!
What if we add more to it, for example not just creating the rule files, but what if we add by default the rule's name to rules/rules.ts and rulesCheck, rulesReport.
What do you think?

What if we add more to it, for example not just creating the rule files, but what if we add by default the rule's name to rules/rules.ts and rulesCheck, rulesReport.

Yes, it should be like that.
I am not satisfied with the skeleton yet.

I would like to add the line number to the output also. It would be nice to have it everywhere possible, so I think the skeleton should contain it.
Somehow I want to mark more clearly what to change in the generated files.

Yes, it should be like that.

Awesome 🚀

I would like to add the line number to the output also. It would be nice to have it everywhere possible, so I think the skeleton should contain it

The lineNumber was something I struggled with my first issue in this project so I agree with you, it should be there.

Somehow I want to mark more clearly what to change in the generated files.

What about snippets behavior? you know you can set up the snippet in a way that you can set where the cursor should be and if it should select by default a line or something.
I'm not sure how this ⬆ is done but some research would do it

Creating snippet will be a vscode only addition.
Personally I do not like them.
What about adding comments explaining what to do at the lines where we (they) should put actual code?

What about adding comments explaining what to do at the lines where we (they) should put actual code?

I thought you didnt like comments for this, in that case yes, comments would be the most appropiate.
This is how you see it?
const checkThisIsATest = (script: SFCScriptBlock | null, filePath: string) => {
  // TODO: Check if the `script` is null
  if (!script) {
    return
  }

  // TODO: Create regex to match the pattern for this rule
  const regex = createRegExp()
  const matches = script.content.match(regex)

  // TODO: Push to `results` array if matches are found
  if (matches?.length) {
    results.push({
      filePath,
      message: `add_your_message ${BG_ERR}(${matches.length})${BG_RESET}`
    })
  }
}

or you mean no code at all, just comments explaining and giving context of what to do?

Ah yeah I like this approach adding TODO comments.
Simple, clear, easy to understand and follow.
Tomorrow I will update the skeleton. If nobody does it earlier 😉

Tomorrow I will update the skeleton. If nobody does it earlier 😉

haha I have one issue assigned already 👀

Can you check and tell me what do you think? It is in 139-generate-skeleton-for-new-rules branch

I see one typo:

follwoing > following (newRuleFile)

And also, in both files the rule field must be ``${TEXT_INFO}RULESET ~ RULENAME${TEXT_RESET}`, where:

RULESET we know what it is
RULENAME should be the name of the file (name of the rule) but splitted, in this case the rule is called complicatedConditions, then the rulename for the offense object should be complicated conditions

Result ⬇
results.forEach((result) => {
      offenses.push({
        file: result.filePath,
        rule: `${TEXT_INFO}rrd ~ complicated conditions${TEXT_RESET}`,
        description: `👉 ${TEXT_WARN}/* TODO tip to fix this issue */.${TEXT_RESET} See: https:///* TODO doc link */`,
        message: `${result.message} 🚨`,
      })
})

expect(reportComplicatedConditions()).toStrictEqual([{
      file: fileName,
      rule: `${TEXT_INFO}rrd ~ complicated conditions${TEXT_RESET}`,
      description: `👉 ${TEXT_WARN}/* TODO tip to fix this issue */.${TEXT_RESET} See: https:///* TODO doc link */`,
      message: `line #/* TODO line number from your content above*/ ${BG_WARN}/* TODO message from the rule file */${BG_RESET} 🚨`,
    }])

Does it mean you like it in general?

Ah I see you answered that also.
Thanks I will fix it and merge it

Does it mean you like it in general?

Yes 🔥 I edited the order of my comment haha

implemented in https://github.com/rrd108/vue-mess-detector/releases/tag/v0.32.0


Add check_ha() to iml-agent

Returns list of resources configured to run on a given host.
Fixes #1190
Signed-off-by: Nathaniel Clark<EMAIL_ADDRESS>

Codecov Report

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

@@           Coverage Diff           @@
##           master    #1199   +/-   ##
=======================================
  Coverage   95.39%   95.39%
=======================================
  Files           2        2
  Lines         152      152
=======================================
  Hits          145      145
  Misses          7        7

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 0aa188e...3e69390. Read the comment docs.


Rewrote app in JavaScript using React and Electron

Rewrote app in JavaScript using React and Electron
closes #1
closes #2

closes #2


Set model validation lengths based upon react form maxLength

update:

authentication no longer requires name

update:

Rebase
Remove Authentication#name presence check
Zone#name, description length from 50 to 128

update:

Fix error MiqAlert#name (mistyped to notes)

update:

fix merge conflict with hash serialization in Zone.


Nicer imports

This Pull Request meets the following criteria:

[x] Tests have been added/adjusted for my new feature
[x] New Components are registered in index.js of my project

I fixed this before I looked at this pull-request. 😄  ddc70f690e7a514ec00a0d609238165366e69233


OOM Error

Maybe there is Memory leak. I always see OOM Error  after some days running for prerender.

Which version of Prerender are you using? How much memory are you giving to the Prerender server? and did you override any of the Prerender server environment variables?

I'm using commit "8bfab9a88bc95a89245d9cd2bc296b93bbb56167". It used no more than 100Mb when started a moment. I have got OOM Error when it running some days.
Now, there is no OOM when I use linux crontab to restart running server each day.

I don't see that commit. Is it on the master branch? What version does prerender show in the package.json?

The last commit likes below:
commit 8bfab9a88bc95a89245d9cd2bc296b93bbb56167
Author: Todd Hooper<EMAIL_ADDRESS>Date:   Wed Feb 6 22:56:23 2019 -0700

    bump to v5.5.1

The packge.json:
{
  "author": "Prerender.io",
  "name": "prerender",
  "description": "Service to prerender Javascript rendered pages for SEO",
  "version": "5.5.1",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "https://github.com/prerender/prerender"
  },
  "dependencies": {
    "body-parser": "~1.18.3",
    "chrome-remote-interface": "~0.25.7",
    "compression": "~1.7.3",
    "express": "~4.16.3",
    "he": "~1.1.1",
    "valid-url": "~1.0.9"
  },
  "devDependencies": {
    "mocha": "^5.2.0",
    "sinon": "^6.1.4"
  },
  "scripts": {
    "start": "node server.js",
    "test": "./node_modules/.bin/mocha"
  },
  "engines": {
    "node": ">=6.9.0"
  }
}

Hmm, I'm seeing a different commit hash for that one:
https://github.com/prerender/prerender/commit/bf1f1cd6e247786453147e23aedfd3bcc0cfa22b
Either way, thanks for sending that over.
How much memory are you giving to the Prerender server? and did you override any of the Prerender server environment variables? Which version of Chrome and which operating system are you using?

I'm sure the memory leak is from prerender server. But I can't find real reason.

How much memory are you giving to the Prerender server? and did you override any of the Prerender server environment variables? Which version of Chrome and which operating system are you using?
Are you using pm2 (or some other library) to start multiple versions of server.js at the same time? I would only expect to see one process for the server.js process but you show lots of them running there.


GO 685 Response write xss

Add new endpoint - /xss/response/reflectedXss to handle usage of net/http.ResponseWriter.Write method to set the page response.
Testing
Build and run the go-test-bench app. You should see a new section Response in Reflected XSS where you can submit a form which sets the response with ResponseWriter.Write. You should see the vulnerability reported in Teamserver.

Codecov Report

Merging #16 (f01b72a) into main (4ff2879) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #16   +/-   ##
=======================================
  Coverage   95.23%   95.23%
=======================================
  Files           1        1
  Lines          21       21
=======================================
  Hits           20       20
  Misses          1        1

Impacted Files
Coverage Δ

utils/input.go
95.23% <ø> (ø)

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 4ff2879...f01b72a. Read the comment docs.


IE7 bug in findByName if input has been added dynamically to dom

Currently the findByName function looks as follows:
findByName: function( name ) {
// select by name and filter by form for performance over form.find("[name=...]")
var form = this.currentForm;
return $(document.getElementsByName(name)).map(function(index, element) {
return element.form == form && element.name == name && element  || null;
});
}
This does not work correctly in IE7 in case you create the elements in the form dynamically via JavaScript API. It doesn't matter if you call $("#myForm").validate() before or after you add the fields dynamically to the dom. The problem seems to be that in IE7 the function
document.getElementsByName(name)
returns an empty array if the field has been added to the dom dynamically (although it actually exists!). so here is an easy example to show the issue live in IE7:
<html>
<body>

<!-- the bug also exists if you try it somewhen later after the page has loaded... -->
<input type="button" value="find input" onclick="alert(document.getElementsByName('d0').length);">

<script>

  //create and add an element dynamically to the dom
  var newInput = document.createElement('input');
  newInput.setAttribute('type','radio');
  newInput.setAttribute('name','d0');
  document.getElementsByTagName('body')[0].appendChild(newInput);

  //although the element is available in the dom IE7 won't find it here
  alert(document.getElementsByName("d0").length);
</script>

</body>
</html>
To make findByName compatible with IE7 the function should be rewritten or during runtime findByName should be replaced with some kind of findByNameIE7 function (latter could be done once when initializing the validation plugin).

When replacing the findByName function with the following one validation works for my forms:
findByName: function( name ) {
  return $(this.currentForm).find('input[name="' + name + '"],select[name="' + name + '"]');
}


Remove all dependencies JARs from published artifacts

We currently publish "fat" JARs, including all dependencies (most notably Spring Framework).
Quite apart from being bad practice and making the artifacts unnecessarily bloated, this prevents applications that import our JAR to correctly import code/sources and navigate to them in IDEs.
Our published JAR should only contain our code, and there should be clear documentation as to what additional imports are needed (including correct version information).

Completed with Rel. 0.8.8 (PR #40 )


Wizard: change the image name

fixes #1196
this commit update the wording on image name step
when user create new image.

Perfect! Just two small nitpicks and a then a rebase

Looks good! It only needs a small lint fix :)

@jrusz Changes in this PR will affect most of the texts on the "Name image" step. Could that cause any problems with the integration tests?

@jrusz Changes in this PR will affect most of the texts on the "Name image" step. Could that cause any problems with the integration tests?

So the tests don't seem to care as they don't really check if they're on the "Image name" step :smile: ... But I am going to prepare an update regardless. Thanks for bringing this to my attention @regexowl :slightly_smiling_face:

Btw, what is that description good for? I don't see it anywhere after I create the image...

Thanks for checking this @jrusz!
The description should be an optional field for adding more information about the image. For now it should show on the Review step when recreating it as far as I can tell from the mocks.

Thank you @mgold1234, this looks great! Can you please rebase and update the image name helperText with "The image name can be 3-63 characters long. It can contain lowercase letters, digits and hyphens, has to start with a letter and cannot end with a hyphen."? We've recently updated the name validation :)


Fixes for notebooks, evaluate config

Found notebook bug in file name, fixed
Changed S3 links in notebooks to new S3 paths
Changed synthetic-evaluate.yml to tabular-lstm-evaluate.yml

ugh not supposed to point to main :/


Fix issue that task annotation doesn't render data

resolves https://github.com/RackHD/RackHD/issues/418
@RackHD/corecommitters @WangWinson @heckj @dmskinner

Build finished.

:+1:
The change itself looks good. But this seems different from the reason Joe commented in the issue.

@WangWinson : That's because the input task objects are not correct, so the filter doesn't generate correct data. We should fix the input not the filter.


Docker.io to quay for stackrox operator

Description
Use quay.io
Checklist

[ ] Investigated and inspected CI test results
[ ] Unit test and regression tests added
[ ] Evaluated and added CHANGELOG entry if required
[ ] Determined and documented upgrade steps
[ ] Documented user facing changes (create PR based on openshift/openshift-docs and merge into rhacs-docs)

If any of these don't apply, please comment below.
Testing Performed
TODO(replace-me)
Use this space to explain how you tested your PR, or, if you didn't test it, why
you did not do so. Valid reasons include, for example, "CI is sufficient",
"No testable changes". Feel free to attach JSON snippets, curl commands,
screenshots.
In addition to reviewing your code, reviewers must also review your testing
instructions and make sure they are sufficient.

Please don't forget to target master.


Spike: is it possible to reconstitute the current set of evaluations by ingesting the current real world

We ran this for all 7 PCI groups:
make ingest-evaluations INGEST_ONLY=pci INGEST_DAYS=6000 INGEST_DEBUG=true

resulted in ~327 evaluations being correctly recorded.

To look into a local database:
$ make dev-sql
docker compose --file docker-compose.yml --file docker-compose.dev.yml exec -e PGUSER=user -e PGPASSWORD=secret -e PGDATABASE=sciety db psql
psql (12.3)
Type "help" for help.

sciety=# SELECT COUNT(*) FROM events;
 count
-------
   327
sciety=# SELECT COUNT(*) FROM events WHERE payload->>'groupId'='32025f28-0506-480e-84a0-b47ef1e92ec5';

 count
-------
   114
(1 row)

To count unique evaluations for a group on a copy of the production database:
grep -r 32025f28-0506-480e-84a0-b47ef1e92ec5 data/exploratory-test-from-prod.csv | grep -o '""evaluationLocator"": ""doi:.*' | so
rt | uniq | wc -l

The Arcadia group has 2642 evaluations specified on their group card in prod. Local, fresh ingestion yielded 2083.

The preLights group has 1175 evaluations specified on their group card in prod. Local, fresh ingestion yielded 1542.
We had to edit hours=120000 in the ingestion code to look further into the past than the hardcoded 120 hours.

The prereview group has 415 evaluations specified on their group card in prod. Local, fresh ingestion yielded 405.

It is known NCRC does not have an ingestion set up currently, as a dormant group; we would need to bring that back.

To compare, the current Hypothesis group we ingest from for eLife:
$ curl -s "https://api.hypothes.is/api/search?group=q5X6RWJ6&limit=200&sort=created&order=asc" | jq .total
26477

which is about ~500 less than the group card in prod.
The number of unique evaluation locators recorded in prod is:
$ grep -r b560187e-f2fb-4ff9-a861-a204f3fc0fb0 data/exploratory-test-from-prod.csv | grep -o '""evaluationLocator"": ""hypothesis:.*' | wc -l
28865

which suggests we erased/removed almost ~2000 of them over time?

More on eLife suggests the Hypothes.is group is the source of truth and will cover our use case:

https://hypothes.is/users/Public_Reviews is the user and https://hypothes.is/groups/q5X6RWJ6/elife is the group. Using the group rather than the user makes sense. We post reviews/responses using Kotahi, which ensures they end up on hypothes.is in the group specified (as well as bioRxiv, medRxiv, EPP, and hopefully Sciety!) Paul, let us know if any of that is mistaken!
< 1 minute ago

Thanks, that fits our understanding, and it goes back to 2019 so it doesn't miss any historical content.

The Rapid Reviews Infectious Diseases group has 995 evaluations specified on their group card in prod. Local, fresh ingestion yielded only 114 even after unhardcoding daysAgo(1). Suggests some bug in pagination or filtering as this ingestion has to filter out the other peer-review items from MIT Press on the same DOI prefix.


updated to compile on el capitain as well as clang 7.3.0

Would need to check that the changes compiled on other platforms (unfortunately don't have those to hand)

I'll do a test-compile on Linux and cross-compile to windows but it looks good. I see you fixed a lot of those warnings "C++11 requires a space between string literals" or something like that. :)
Does this raise the minimum Mac OS version requirement to 10.7 and possibly prevent older versions from running it?


React 15.5.4 compatibility

New warning
Warning: Lorem: React.createClass is deprecated and will be removed in version 16. Use plain JavaScript classes instead. If you're not yet ready to migrate, create-react-class is available on npm as a drop-in replacement

Thanks for reporting it. Fixed in v0.12. Enjoy!


Update dependencies and devDependencies

Summary

updated dependencies and devDependencies
added nodejs-v10 to travis
.eslintrc.js is removed from eslintrc since eslint ignores it by default

Requirements

[x] I've read and understood the Contributing Guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[ ] I've written tests to cover the new code and functionality included in this PR.
[x] I've read, agree to, and signed the Contributor License Agreement (CLA).

Would you be able to rebase from master to ensure the branch is up to date?

done. 👍


Include the gender field when fetching the user profile

It is possible to include the gender field when fetching user info, but the provider does not currently do it.
Originally reported as thephpleague/oauth2-client#402.

The fields that are fetched are defined by this code. You could certainly extend the Google provider class yourself and add additional fields to this, along with changing the GoogleUser class.
I could also make it possible to configure this via the provider options, although doing so would make the GoogleUser class methods potentially inaccurate. Would it be sufficient for your needs if there was a userFields option?

@shadowhand I did configure the code you mentioned earlier and I've enabled the gender field.  Also I think it would be cool if there was a user fields option so I could get other stuff like locale etc

You have the ability to add userFields to provider options now. Whatever you provide here will be merged with the default fields.

I've tagged this in the beta3 release.

Thanks @shadowhand.. I appreciate :+1:


Limitations on Spatially Partitioned Messaging dimensions

Windows imposes limits on the size of statically allocated data. For 32bit and 64bit windows this is limited to 2GB (source).
The number of bins required for spatially partitioned messaging is dependant upon the bounds and radius. If the combination of environment bounds and radius result in a significant number of bins being required (approx 536,870,912 bins, or roughly an 812*812*812 cube ) then the application will not compile.
This should not be a problem for FLAMEGPU2 as dynamically allocated memory can  be up to 8TB on Windows x64.
Furthermore, the use of cudaBindTexture in spatially partitioned messaging imposes an additional limit (device dependant) at runtime.
The total number of elements in a linear address range cannot exceed  cudaDeviceProp::maxTexture1DLinear[0] (source), which for a Geforce GTX Titan X is 134217728 texels (source).
In practice this limits the number of bins in spatially partitioned messaging to 512*512*512.

Great spot. A bin with 512*512*512 would require 1GB of memory anyway so chances are that any model would be close to reaching memory limitations. Still can be fixed in version 2.


(maint) Add build_tar: FALSE to build_defaults

Our automation is attempting to sign tarballs that aren't there. This will make sure we don't try to do that.

Test PASSed

CLA signed by all contributors.


[Bug report]: Balance disappearing after setup completed

update i tried to set up a new profile  all went well i entered my 24 word key the setup completed and was showing the correct  balance for about 1 min then reverted back to showing a 0 balance  i was getting multiple notifications saying receiving to wallet 1 but no balance shows up any help or suggestions would be greatly appreciated
Platform
Desktop
Version
1.65
Description
so i downloaded firefly shimmer and claimed my tokens and when i opened the normal firefly wallet after claiming the iota tally that was at 2800 was at 0  there is no transaction in or out off the wallet
Expected behaviour
to be normal as always
Actual behaviour
to see 2800 iota in my wallet and asmb staking as per normal
Can the issue reliably be reproduced?
Yes
Steps to reproduce the issue
turn it on
Operating System
Windows
Diagnostics
Version 1.6.5
Language: en
Currency: AUD
Node selection: Automatic
Platform: win32
Platform Version: 10.0.19044
Platform Architecture: x64
CPU Count: 4
Total Memory: 12152.3 MB
Free Memory: 7331.1 MB

Developer Profile
No
Profile Type
Software (Stronghold)
Staking
Actively staking
Crash Status
Infinite loading symbol
Error Messages
no
Error Logs
Thu, 24 Feb 2022 00:00:23 GMT
ClientError: `Response error with status code 404: 404 page not found
`

Thu, 17 Feb 2022 06:21:40 GMT
ClientError: `Response error with status code 404: 404 page not found
`

Thu, 10 Feb 2022 01:53:12 GMT
ClientError: `Response error with status code 404: 404 page not found
`

Tue, 01 Feb 2022 22:41:34 GMT
StrongholdError: `failed to perform action: `Engine Error: Crypto Error: `error in algorithm XCHACHA20-POLY1305`, Unable to read snapshot. Please try another password.``

Tue, 01 Feb 2022 22:41:01 GMT
StrongholdError: `failed to perform action: `Engine Error: Crypto Error: `error in algorithm XCHACHA20-POLY1305`, Unable to read snapshot. Please try another password.``

Thu, 27 Jan 2022 23:12:46 GMT
ClientError: `Response error with status code 404: 404 page not found
`

Sun, 23 Jan 2022 03:20:36 GMT
ClientError: `Response error with status code 503:
503 Service Unavailable

No server is available to handle this request.

`

Sun, 23 Jan 2022 03:20:34 GMT
ClientError: `Response error with status code 522: `

Wed, 29 Dec 2021 01:29:15 GMT
ClientError: `Response error with status code 404: 404 page not found
`

Tue, 28 Dec 2021 11:18:04 GMT
StrongholdError: `failed to perform action: `Engine Error: Crypto Error: `error in algorithm XCHACHA20-POLY1305`, Unable to read snapshot. Please try another password.``

Tue, 28 Dec 2021 08:38:05 GMT
ClientError: `Response error with status code 404: 404 page not found
`

Sun, 26 Dec 2021 01:43:25 GMT
StrongholdError: `failed to perform action: `Engine Error: Crypto Error: `error in algorithm XCHACHA20-POLY1305`, Unable to read snapshot. Please try another password.``

Duplicate declaration

[X] I have searched the issues tracker this issue and there is none

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi, is this still an issue in the latest version?

The network was recently upgraded, please download the latest firefly iota version 2.0.2

Closing issue due to inactivity, please update to the latest version and reopen the issue if the problem persist 🌷


Update helpers.php

Fixed bug in firstStringBetween

@IonutNeagu Thanks for this correction. However you must always change this in snippets/firstStringBetween.md for this function to complete the PR.


OpenStack provider template for HMC

Created the provider templates for openstack

https://github.com/Mirantis/hmc/pull/695


[WIP] Implement email sending via SES

This implements sending emails via Amazon SES. It has the following features:

[x] Implements a SESEmailSender service that sends emails and logs them to the database.
[x] Implements a Web hook that SES via SNS will call with various delivery related events.
[x] Will Unflag emails as verified when they bounce or are marked as complaint, requiring users to re-verify their emails.
[x] Provides an admin panel that will show the emails sent (omitting their body, incase the body has sensitive information in it) as well as the email status (accepted, delivered, bounced, complained) and any delivery events that were received about the email.
[x] Provides a flag on the email to indicate it has been having delivery issues.

Long term goal of this flag is to provide better UX in the user's account management page to indicate that the reason this email is no longer verified is because of delivery issues. This PR does not implement that though.

[x] Cleans up logged emails after 14 days. This is to keep the table from growing unbounded (see the journals table) and also to provide a finite lifespan on any email addresses or similar that get logged into this table.
[x] Allow searching the email logs for specific addresses, etc.
[x] Allows configuring the email sending backend similarly to the way the file storage backend is configured.
[x] Handles flagging an account as having delivery problems after N transient delivery failures.
[ ] Authenticate/Validate that the web hook was actually called by SNS for the desired topic and it wasn't an attacker attempting to DoS the email handling.

Overall it still needs some cleanups as well (tests need written, some hardcoded region values, error handling is broken, etc). However it has all the basic functionality!
Here's some screenshots of the admin interface:

Note: Before we deploy this we will need to change the environment variables in our deploys, the new mechanism uses MAIL_BACKEND=<backend> foo=bar format that the storage and docs and such use.

I've hardcoded the number of transient bounces that an email address can have before it gets flagged for re-verification to 5. I'm not sure if that's a good number or not or if that should be generally configurable or not.

Whenever we get a soft bounce that doesn't occur after a delivery (i.e. not an OOTO auto-responder) increment the number of transient bounces by 1.
Whenever we get a successful email delivery, reset the number of transient bounces to 0.
Whenever the number of transient bounces is greater than 5, treat it as if the email had hard bounced and un-verify the email address.
Whenever an email gets verified (either the first time, or any subsequent times) we reset the number of transient bounces back to 0.

To switch to SES, you need a configuration like:
MAIL_BACKEND=warehouse.email.services.SESEmailSender<EMAIL_ADDRESS>region=us-west-2 topic=...

That assumes you have the other environment variables setup to configure authentication for AWS.

Note: After this merges and deploys, https://github.com/python/pypi-infra/pull/5 will need to be merged and applied to wire the SNS topic up to Warehouse's web hook handler. It will likely take two runs of terraform for this to work, since we need to know the expected TopicArn before we can subscribe to it.


Detached configurations cannot extend from existing configurations

Context
Dependency resolution using attribute matching doesn't work if the configuration being resolved is a detached configuration. I'm actually surprised we went that far without fixing this. Given the following build file:
subprojects {
   apply plugin: 'java-library'
}

project(":app") {
    dependencies {
        implementation project(":lib")
    }

    tasks.create("resolve") {
       def detached = configurations.detachedConfiguration()
       detached.with {
           canBeResolved = true
           canBeConsumed = false
           extendsFrom(configurations.implementation)
           attributes {
               attribute(Attribute.of('org.gradle.usage', Usage), project.objects.named(Usage, 'java-api'))
           }
       }
       println configurations.compileClasspath.files
       println detached.files
    }
}

I would expect the detached.files collection to be the same as compileClasspath.files, given that it asks for the same attributes and both extend implementation. However, in practice, the collection is empty. Replacing configurations.detachedConfiguration() with configuration.create("foo") solves the problem, indicating that the issue is really with detached configurations, not with attribute matching.

FWIW, there's a first problem which is that detached configurations cannot inherit from configurations defined in a different container. So, in fact, we get no dependencies because we don't inherit dependencies from the parent configuration here.

Yes, I can confirm it works properly if we include the set of configurations from the container the detached configuration was created from in the list.

Updated the title to reflect the real problem

counter++
I think I hit this the second or the third time already

Interesting. I have tried creating a detached configuration that extends from another detached configuration, both from the same configuration container. The first configuration contains a dependency without a version, and the second contains a relevant platform dependency. My hope was that I could resolve the first configuration and then examine the ResolveConfiguration's only firstLevelModuleDependency, especially since allDependencies contains what I expect. However, Gradle refuses to resolve this, forcing me to add both dependences to a single detached configuration instead.

I stumbled across the same issue and described it on the forum here:
def newConfiguration = project.configurations.detachedConfiguration()
newConfiguration.setCanBeResolved(true)
newConfiguration.extendsFrom(project.configurations.runtimeClasspath)

Resolving results in an empty array:
doFirst {
    println newConfiguration.resolve()
}

So this issue gets a +1 from me. Would love to see this one resolved. Workaround is to create a attached configuration.

This problem is a little painful when trying to resolve the non-transitive elements of a configuration. The suggested workaround https://github.com/gradle/gradle/issues/14880 is to create a non-transitive Configuration that extends the transitive Configuration. It would be nice to create the intransitive Configuration as detached, so it does not get confused with the transitive configuration, generate unnecessary Kotlin DSL accessors, or pollute IDE auto-completion.
Here is an example that reproduces the problem. Copy it into a build.gradle.kts, and run
./gradlew listPluginsIntransitive

It should list the declared dependency, and the transitive dependencies, and then finally the declared dependency. However, the detached and attached intransitive configurations produce different results
Execution failed for task ':listPluginsIntransitive'.
> attached: kotlin-gradle-plugin-1.8.0-gradle76.jar
  detached:

import org.gradle.api.attributes.Bundling.BUNDLING_ATTRIBUTE
import org.gradle.api.attributes.Bundling.EXTERNAL
import org.gradle.api.attributes.Category.CATEGORY_ATTRIBUTE
import org.gradle.api.attributes.Category.LIBRARY
import org.gradle.api.attributes.LibraryElements.JAR
import org.gradle.api.attributes.LibraryElements.LIBRARY_ELEMENTS_ATTRIBUTE
import org.gradle.api.attributes.Usage.JAVA_RUNTIME
import org.gradle.api.attributes.Usage.USAGE_ATTRIBUTE
import org.gradle.api.attributes.java.TargetJvmEnvironment.STANDARD_JVM
import org.gradle.api.attributes.java.TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE

plugins {
  base
}

val generatorPlugins by configurations.registering {
  isCanBeResolved = true
  isCanBeConsumed = false
  isVisible = false
  attributes {
    attribute(USAGE_ATTRIBUTE, objects.named(JAVA_RUNTIME))
    attribute(CATEGORY_ATTRIBUTE, objects.named(LIBRARY))
    attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL))
    attribute(TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(STANDARD_JVM))
    attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(JAR))
  }
}

val generatorPluginsIntransitiveAttachedConfiguration = configurations.create("generatorPluginsIntransitive") {
  isCanBeResolved = true
  isCanBeConsumed = false
  isVisible = false
  isTransitive = false
  extendsFrom(generatorPlugins.get())
  attributes {
    attribute(USAGE_ATTRIBUTE, objects.named(JAVA_RUNTIME))
    attribute(CATEGORY_ATTRIBUTE, objects.named(LIBRARY))
    attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL))
    attribute(TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(STANDARD_JVM))
    attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(JAR))
  }
}

val generatorPluginsIntransitiveDetachedConfiguration = configurations.detachedConfiguration().apply {
  isCanBeResolved = true
  isCanBeConsumed = false
  isVisible = false
  isTransitive = false
  extendsFrom(generatorPlugins.get())
  attributes {
    attribute(USAGE_ATTRIBUTE, objects.named(JAVA_RUNTIME))
    attribute(CATEGORY_ATTRIBUTE, objects.named(LIBRARY))
    attribute(BUNDLING_ATTRIBUTE, objects.named(EXTERNAL))
    attribute(TARGET_JVM_ENVIRONMENT_ATTRIBUTE, objects.named(STANDARD_JVM))
    attribute(LIBRARY_ELEMENTS_ATTRIBUTE, objects.named(JAR))
  }
}

dependencies {
  "generatorPlugins"("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0")
}

val listPlugins by tasks.registering {
  inputs.files(generatorPlugins)
  doLast {
    generatorPlugins.get().files.forEach { println(it.name) }
  }
}
val listPluginsIntransitive by tasks.registering {
  dependsOn(listPlugins)
  inputs.files(generatorPluginsIntransitiveAttachedConfiguration)
  inputs.files(generatorPluginsIntransitiveDetachedConfiguration)
  doLast {
    val attachedResult = generatorPluginsIntransitiveAttachedConfiguration.files.joinToString { it.name }
    val detachedResult = generatorPluginsIntransitiveDetachedConfiguration.files.joinToString { it.name }

    require(attachedResult == detachedResult) {
      """
        attached: $attachedResult
        detached: $detachedResult
      """.trimIndent()
    }
  }
}

We should fix this by failing fast instead of failing silently.

We should fix this by failing fast instead of failing silently.

Why?, The detached configuration is created from a given container, restricting it from extending configuration reachable through that container, seems like an arbitrary blocker.
Is there a functional reason why this should not be possible?

I agree that ideally this shouldn't fail but simply make it work. I guess that what Justin is saying is that it is currently broken anyway, so making it fail is a "better" solution in the sense that it would fail eagerly instead of being simply ignored. However it is reasonable to expect that this feature works.

@bot-gradle test and merge


Incorrect window and workspace focus with multiple monitor

If I have more than one of the same application distributed across monitors, when I switch workspaces, the last opened window of that application gets focused instead of the one on the focused workspace/monitor.
Detailed explanation

I have two monitors
My primary monitor hosts workspaces 1-9, while the secondary have workspace 10
I have keybindings to switch workspaces using cmd (e.g. cmd-1 = workspace 1)

Steps to reproduce

Open an application (e.g. Firefox) on the workspace 1 (primary monitor)
Open another window of the same application in workspace 10 (secondary monitor)
Open another application (e.g. Terminal) on the workspace 2 (primary monitor)
Switch to workspace 1 (e.g. type cmd-1)
Switch to workspace 2 (e.g. type cmd-1)
Switch to workspace 1 I need your GD account to start enabling the rest of the permissions

Expected behavior
Window on workspace 1 is focused
Current behavior
Window on workspace 10 is focused, even though I focused workspace 1
Workaround
By focusing workspace 1 again (e.g. typing cmd-1 twice) the correct window gets focus.
System information
OS: macOS 14.1.2 23B2091 arm64
Host: Mac15,6
Kernel: 23.1.0
Uptime: 38 days, 4 hours, 16 mins
Packages: 158 (brew)
Shell: zsh 5.9
Resolution: 1920x1080, 1512x982
DE: Aqua
WM: Quartz Compositor
WM Theme: Purple (Dark)
Terminal: tmux
CPU: Apple M3 Pro
GPU: Apple M3 Pro
Memory: 3408MiB / 18432MiB

aerospace CLI client version: 0.10.0-Beta 4fe8276262b8df077ffface84c3f93f1b832b8ac
AeroSpace.app server version: 0.10.0-Beta 4fe8276262b8df077ffface84c3f93f1b832b8ac

It's a known and unfortunate problem. It's a bug in Apple API. The workaround is to disable "Displays have separate spaces"

Duplicate of #101


We do not have the Q from the paper.

https://github.com/OctopiChalmers/Multef/blob/d7ee1aa38eb8703ae106c0c4ca4e039838d27b8d/src/Faceted.hs#L9
Have we shown that it is the same?

They are the same, it's just a different name.

Put


Python3 compatible version

Please, release Python3 compatible version. I tried id today with Python 3.6 and after installing git version, demo.py works:
python demo.py
Populating 'demo.sqlite' ...
raw times: 0.988 0.902 0.954
gsqlite3: 10 loops,
best of 3: 90.2 msec per loop
raw times: 2.11 2.12 2.13
sqlite3: 10 loops,
best of 3: 211 msec per loop

But hte latest PyPi  version (0.1.3) fails with #2

+1
Can you please make a new release of the package?

Oh my goodness. Never knew anyone was using this. Should be easy enough but if you want to create a PR that would be great.
Sent from my T-Mobile 5G Device
Get Outlook for Androidhttps://aka.ms/AAb9ysg

From: Lefteris Karapetsas @.>
Sent: Sunday, June 5, 2022 8:31:46 AM
To: gilesbrown/gsqlite3 @.>
Cc: Subscribed @.***>
Subject: Re: [gilesbrown/gsqlite3] Python3 compatible version (#5)
+1
Can you please make a new release of the package?
—
Reply to this email directly, view it on GitHubhttps://github.com/gilesbrown/gsqlite3/issues/5#issuecomment-1146834721, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AADN6ZTFSW5GOYE3TJYAP5LVNTB6FANCNFSM4ERGW6KA.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

I just ran it under Python3 and it works for me. 🤷


before-suggestions slot click events

When using the before-suggestions slot, it seems that click events are still triggering @selected events?
I'm essentially trying to add an option at the top of the list of suggestions I want to handle a little differently than the actual suggestion options. I've tried @click modifiers stop and prevent and doesn't seem to supercede the other events.
I've looked through the component but couldn't find an obvious way to work around this yet.

vue-autosuggest version: latest
node version: 12
npm (or yarn) version: 6.11

    <vue-autosuggest
      ref="search"
      v-model="query"
      :class="$style.search"
      :suggestions="suggestions"
      :input-props="inputProps"
      :render-suggestion="(suggestion) => suggestion.item"
      :get-suggestion-value="(suggestion) => query = suggestion.item"
      @input="getSuggestions()"
    >
      <template slot="before-suggestions">
        <div
          class="px-3 py-3 normal-case border-b-2 cursor-pointer z-100 hover:bg-gray-100"
          @click.prevent="emitAddGeneric()"
        >
          Add "<strong v-text="query" />" to list
        </div>
      </template>
    </vue-autosuggest>

little quirk, but you have to use @mouseup.stop since that's the event that triggers the select. Ideally the component would know that you are clicking something that is not a suggestion.

Sorry for the delay, was working on a few other tasks.
This worked just fine for me! Thanks for the quick reply 🎉

@darrenjennings quick follow up to this, how do I "close" the suggestions after clicking on that before-suggestions element? would it be a custom function for shouldRenderSuggestions?

Ignore me! Silly me, on clicking that before-suggestion element, just clear out the suggestions! 🤦♂


Allow useUser to accept initial data for SSR requests

Feature request
It would be nice if the useUser hook could accept an argument for initial data in cases where a user is fetched on the server, and useUser it used on the client.
Is your feature request related to a problem? Please describe.
A clear and concise description of what you want and what your use case is.
Describe the solution you'd like
Allow the <UserProvider> to accept values for initial data where the hook can accept a single argument for a user so that there is a smooth handoff between a SSR user, and a client side user fetched via the hook

This has been added to the SessionContext with the initialSession param: https://github.com/supabase/auth-helpers/blob/main/examples/nextjs/pages/_app.tsx#L24


Allow building the --with-add-source-root to work with full paths

https://github.com/AdoptOpenJDK/openjdk-infrastructure/pull/1263

lgtm but are we holding off until after Mac Os X builds go out?

Yes - we can fully test in independently in the environment that the problem showed up in without it being merged

https://ci.adoptopenjdk.net/view/Tooling/job/VagrantPlaybookCheck/506/
Indeed, it worked 👍 Thanks


Embedded entity without "object" option "breaks" UOW / IdentityMap

Describe the bug
If entity has embedded property without object: true option then it breaks UnitOfWork / IdentityMap - multiple calls to repository.findOne(PK) always trigger SQL queries despite entity should be "cached" in IdentityMap.
To Reproduce
Entity classes:
// TestEntity1 class
export class TestEntity1 {
  public readonly id: string;
  public readonly customProp: CustomProp;

  constructor(id: string, customProp: CustomProp) {
    this.id = id;
    this.customProp = customProp;
  }
}

// TestEntity2 class (identical to TestEntity1)
export class TestEntity2 {
  public readonly id: string;
  public readonly customProp: CustomProp;

  constructor(id: string, customProp: CustomProp) {
    this.id = id;
    this.customProp = customProp;
  }
}

// CustomProp class
export class CustomProp {
  public readonly someValue: string;

  constructor(someValue: string) {
    this.someValue = someValue;
  }
}

Entity schemas:
// TestEntity1 schema
export const TestEntity1Schema = new EntitySchema({
  class: TestEntity1,
  properties: {
    id: {
      type: 'text',
      primary: true,
    },
    customProp: {
      type: 'CustomProp',
      nullable: false,
      reference: ReferenceType.EMBEDDED,
      object: true, // <-------------------------------- true
    },
  },
});

// TestEntity2 schema
export const TestEntity2Schema = new EntitySchema({
  class: TestEntity2,
  properties: {
    id: {
      type: 'text',
      primary: true,
    },
    customProp: {
      type: 'CustomProp',
      nullable: false,
      reference: ReferenceType.EMBEDDED,
      object: false, // <-------------------------------- false (this is the only difference between those schemas)
    },
  },
});

// CustomProp schema
export const CustomPropSchema = new EntitySchema({
  class: CustomProp,
  embeddable: true,
  properties: {
    someValue: {
      type: 'text',
      nullable: false,
    },
  },
});

// Insert entities (native inserts skip IdentityMap)
await this.testEntity1Repository.nativeInsert(
  new TestEntity1('abc', new CustomProp('yyy')),
);
await this.testEntity2Repository.nativeInsert(
  new TestEntity2('def', new CustomProp('xxx')),
);

// Find TestEntity1 twice by PK
await this.testEntity1Repository.findOne('abc');
await this.testEntity1Repository.findOne('abc'); // should not trigger SQL query

// Find TestEntity2 twice by PK
await this.testEntity2Repository.findOne('def');
await this.testEntity2Repository.findOne('def'); // should not trigger SQL query

// Remove entities (just for cleanup)
this.testEntity1Repository.remove(e1!);
this.testEntity2Repository.remove(e2!);

Current behavior
[query] insert into "test_entity1" ("id", "custom_prop") values ('abc', '{"someValue":"yyy"}') returning "id" [took 4 ms]
[query] insert into "test_entity2" ("id", "custom_prop_some_value") values ('def', 'xxx') returning "id" [took 4 ms]
# TestEntity1 is retrieved from DB once
[query] select "t0".* from "test_entity1" as "t0" where "t0"."id" = 'abc' limit 1 [took 2 ms, 1 result]
# TestEntity2 is retrieved from DB twice
[query] select "t0".* from "test_entity2" as "t0" where "t0"."id" = 'def' limit 1 [took 3 ms, 1 result]
[query] select "t0".* from "test_entity2" as "t0" where "t0"."id" = 'def' limit 1 [took 2 ms, 1 result]
[query] begin
[query] delete from "test_entity1" where "id" in ('abc') [took 2 ms]
[query] delete from "test_entity2" where "id" in ('def') [took 3 ms]
[query] commit

Expected behavior
In example above both entities should be retrieved from DB only once and cached in IdentityMap.
For some reason if entity has embedded property with object: false option then it is not cached in IdentityMap (or can't be found in IdentityMap not sure). Changing entity schema to use object: true fixes the issue, however then embedded property is of JSON type without properties of embedded entity mapped to separate DB table columns.
Versions

Dependency
Version

node
18.16.0

typescript
5.2.2

mikro-orm
5.9.3

mikro-orm/postgresql
5.9.3

The problem here is that the ORM thinks your entity is partially loaded, this method returns true:
https://github.com/mikro-orm/mikro-orm/blob/master/packages/core/src/EntityManager.ts#L1920

Got it, but do you think it can/should be fixed? Or maybe there is workaround to mark is as not partially loaded? I tried to add { populate: true } option to findOne() but it does not change anything.

It needs to be fixed :]


chore/crust: Refactor to use mio

This change is

r? @vinipsmaker
(maidsafe_highfive has picked a reviewer for you, use r? to override)

src/service.rs, line 137 [r2] (raw file):

        let mapping_context = self.mapping_context.clone();
        let our_pub_key = self.our_keys.0.clone();
        let _ = self.sender.send(Box::new(move |_: &mut EventLoop<Core>, _: &mut Core| {

If this is an error should we inform that too via event_tx.send(ConnectionInfo(err)) or something similar to routing ?

Comments from Reviewable

Reviewed 4 of 7 files at r1, 2 of 3 files at r2.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

Comments from Reviewable

src/service.rs, line 166 [r3] (raw file):

        })) {
            let _ = self.event_tx.send(Event::MioNotificationError);
        }

Ah no - this will be useless to routing - it does not know the context - you will have to create Event::ConnectionInfoPrepare(ConnectionInfoResult { result: Err etc .. Another thing to notice is that this error is not io::Result's error. So might be worthwhile extending it to CrustError enum and wrapping all io::Result, MioResult etc into it like other crates have successfully done so far. Then all results would be Result<blahblah, CrustError>

Comments from Reviewable

Reviewed 4 of 4 files at r3.
Review status: all files reviewed at latest revision, 2 unresolved discussions, some commit checks failed.

Comments from Reviewable

src/service.rs, line 166 [r3] (raw file):
Previously, ustulation (Spandan Sharma) wrote…
> Ah no - this will be useless to routing - it does not know the context - you will have to create `Event::ConnectionInfoPrepare(ConnectionInfoResult { result: Err` etc .. Another thing to notice is that this error is not io::Result's error. So might be worthwhile extending it to CrustError enum and wrapping all `io::Result, MioResult` etc into it like other crates have successfully done so far. Then all results would be `Result`
I don't get it here. Such error only happens when the mio eventloop as a whole failed to accept the notification. So it's not a `ConnectionInfo` specific error.
Also, as such error returns immediately, I am even thinking it can be a return result of the function.

Comments from Reviewable

src/service.rs, line 166 [r3] (raw file):
Previously, maqi wrote…
> I don't get it here. Such error only happens when the mio eventloop as a whole failed to accept the notification. So it's not a `ConnectionInfo` specific error.
> Also, as such error returns immediately, I am even thinking it can be a return result of the function.
The context here is the token that routing passes - So you would be sending it as:
```
Event::ConnectionInfoPrepared(ConnectionInfoResult {
                result_token: result_token,
                result: Err(blahblah),
```
is much more useful to routing than saying - `Err(blah)` in some unknown context.

Comments from Reviewable

Comments from Reviewable

src/service.rs, line 166 [r3] (raw file):
Previously, ustulation (Spandan Sharma) wrote…
> The context here is the token that routing passes - So you would be sending it as:
> ```
> Event::ConnectionInfoPrepared(ConnectionInfoResult {
>                 result_token: result_token,
>                 result: Err(blahblah),
> ```
> is much more useful to routing than saying - `Err(blah)` in some unknown context.
Also i agree about immediate returns - that'll be more useful - but will change the API. Should we add that as TODO and return contextual error if that is a middle ground ?

Comments from Reviewable

src/service.rs, line 166 [r3] (raw file):
Previously, ustulation (Spandan Sharma) wrote…
> Also i agree about immediate returns - that'll be more useful - but will change the API. Should we add that as TODO and return contextual error if that is a middle ground ?
Reviewable does not let me edit my comment - wanted to explain more - so here it is: Should we add that as TODO and  return contextual error like the way i showed above for just now, if that is an acceptable middle ground

Comments from Reviewable

src/service.rs, line 166 [r3] (raw file):
Previously, ustulation (Spandan Sharma) wrote…
> Reviewable does not let me edit my comment - wanted to explain more - so here it is: Should we add that as TODO and  return contextual error like the way i showed above for just now, if that is an acceptable middle ground
I don't want to mess up with the API, so put a TODO to mention about the immediate return result.

Comments from Reviewable

src/service.rs, line 166 [r3] (raw file):
Previously, maqi wrote…
> I don't want to mess up with the API, so put a TODO to mention about the immediate return result.
cheers qi

Comments from Reviewable

Reviewed 3 of 3 files at r5.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

Comments from Reviewable


magnetic configuration equivalence

workflows.get_magnetic_structure()
Combines the magmom data from the outcar with the structure from the poscar
to return a pymatgen magnetic Structures object (e.g. Structures with
associated magmom tags).
workflows.equivalent_orderings()
finds equivalent magnetic orderings for a set of configurations in a path
Works rather slow. Needs to be optimized. 350 configurations takes about 10 minutes.

workflows.significant_spin_change()
function for determining a significant spin change from the input magmoms

I split workflows into three modules

workflows
data_extraction
magnetism


react-transform-catch-errors

hello thanks for this great project setup
i'm getting following Error:
imports[1] for react-transform-catch-errors does not look like a React component.

There is a problem with dependency package redbox-react.
To fix that problem you need to specify 1.2.6 version of the package redbox-react instead of '^1.1.1' in your package.json file.
Solution was found in stackoverflow.

@maxsbelt thank you for pointing out the solution


Difficulties provisioning kubernetes cluster in secure environment

Is this a request for help?: Yes.
Is this an ISSUE or FEATURE REQUEST? (choose one): Issue

What version of acs-engine?:
Not sure. acs-version is printing 'unset (unset)' and I'm having issues building a new deployment image to test the latest version.

Orchestrator and version (e.g. Kubernetes, DC/OS, Swarm)
azureuser@k8s-master-41051073-0:~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.6", GitCommit:"7fa1c1756d8bc963f1a389f4a6937dc71f08ada2", GitTreeState:"clean", BuildDate:"2017-06-16T18:21:54Z", GoVersion:"go1.7.6", Compiler:"gc", Platform:"linux/amd64"}
What happened:
Manual changes to configuration files are being lost.
Anything else we need to know:
Bear with me here, my experience with Azure/acs-engine/kubernetes is pretty limited and I recently took over this project from a colleague of mine. We're trying to deploy a Kubernetes cluster in a secure Microsoft environment and due to security policy, these VMs will have limited access making provisioning them with standard Azure services prohibitive.
It was decided to build and update the VMs outside of this environment, delete them while preserving the disks, and recreate them inside of the secure environment using the original disks. Any connectivity to Azure services would be facilitated through a proxy to ensure secure access.
We need to create and update the boxes - from defaults - in CorpNet, because that can reach the Internet. However, the private IPs of our VMs change when we recreate the boxes in the subnet that faces the secure environment, so we're trying to manually tweak configuration files that have IP addresses hard-coded in them:
/opt/azure/containers/kubelet.sh
/etc/kubernetes/manifests/kube-apiserver.yaml
/etc/default/kubelet
/var/lib/kubelet/kubeconfig
The problem we're seeing is that our changes to these files are getting blown away when the boxes come back up with the new private IPs. As a result, the kubelets are unable to talk to API server because these configs point to the original IPs.
I'm hoping there's a simpler solution for what we're trying to accomplish - Any help would be greatly appreciated.

Hi @eddyg3.
These are blown away as cloud-config will re-run when the node is rebooted. Can you please let me know what you're changing in each file and I will let you know if we support those configurations?
The solution here would be to use configure the changes inside your cluster-defintion and then deploying that template. See https://github.com/Azure/acs-engine/blob/master/docs/clusterdefinition.md for a list of configurable options.

Hi @lachie83,
Thank you for your response. FWIW, I can confirm that we're now running v.0.5.0 (had to work around #1160).

Because this environment doesn't have access to the internet, we're trying to modify /etc/systemd/system/kubelet.service by adding --env-file /etc/kubernetes/proxy.env to the kubelet's docker run command to allow our kubelet service to communicate with Azure's API.

Additionally, because the private IPs of our VMs change when we recreate them (from disk) in the EML(Enterprise Management LAN)-facing subnet, we're trying to update files which have the IP address for the API server hardcoded in them. Specifically, we're trying to change <IP_ADDRESS> to <IP_ADDRESS> in /opt/azure/containers/kubelet.sh, /etc/kubernetes/manifests/kube-apiserver.yaml, /etc/default/kubelet, and /var/lib/kubelet/kubeconfig.

Given that cloud-config re-runs on boot, tweaking those hardcoded IP addresses obviously isn't the way to go. Please correct me if I'm wrong, but after going through the configurable options for the cluster it looks like we should have our masterProfile point to the master's eventual subnet (<IP_ADDRESS>/25) and set the firstConsecutiveStaticIP to the master's eventual private IP (<IP_ADDRESS>), though I'm worried that we won't be able to deploy directly to this secure (limited access, no internet) subnet.
Thanks again for replying - any help is much appreciated.
Regards,
Gary

@lachie83 Please let me know when you have a chance to review my previous reply.
cc: @sauryadas @colemickens
Thank you.

Hi Gary.

Because this environment doesn't have access to the internet, we're trying to modify /etc/systemd/system/kubelet.service by adding --env-file /etc/kubernetes/proxy.env to the kubelet's docker run command to allow our kubelet service to communicate with Azure's API.

Okay. Yes currently we have no provision for adding a proxy.env file so your best bet is fork the repo and make the changes to acs-engine to add that file and the corresponding options in kubelet.

Additionally, because the private IPs of our VMs change when we recreate them (from disk) in the EML(Enterprise Management LAN)-facing subnet, we're trying to update files which have the IP address for the API server hardcoded in them. Specifically, we're trying to change <IP_ADDRESS> to <IP_ADDRESS> in /opt/azure/containers/kubelet.sh, /etc/kubernetes/manifests/kube-apiserver.yaml, /etc/default/kubelet, and /var/lib/kubelet/kubeconfig.

Yes if you should be able to provision into a existing block and I think as long as your sort out the proxy configuration you should be able to redeploy.


Possibly pin/freeze package versions?

... so app doesn't break due to dependency package version updates
It's not totally clear how to do this, but most likely renv

I think this is quite feasible with renv. They even have a vignette on using it with docker.
Will push work on this in a branch renv soon

command to build and run:
docker build --platform linux/amd64 -t shiny-cromwell:renv .
docker run -p 3838:3838 shiny-cromwell:renv

@dtenenba thinking about moving to a setup where we're pinning package versions so that we aren't surprised by any package updates. here's the dockerfile with changes. it's not working quite yet, see above. Any concerns with this setup?

@sckott -- How much of a lift would this be? Feels like an important step, just deciding whether it can be brought into v1.X..

I think we can skip this for the Shiny app since we're moving away from it to JS land. In JS it's easy to pin packages, so we'll be all set there.


PauliSum should support multiplication with PauliSum and raising to integer power

You beat me to this! An example of how we want this to behave:
(cirq.X(bit_0) + cirq.Y(bit_0)) *  (cirq.X(bit_1) + cirq.Y(bit_1)) = (cirq.X(bit_0) * cirq.X(bit_1)) + (cirq.X(bit_0) * cirq.Y(bit_1)) + (cirq.Y(bit_0) * cirq.X(bit_1)) + (cirq.Y(bit_0) * cirq.y(bit)_1)

In your example, * should denote plain (matrix) multiplication, not the tensor product. The tensor product is implicit in the fact that cirq.X(bit_0) represents X ⊗ I, cirq.X(bit_1) represents I ⊗ X, etc.


Reporting UI issue

Describe the bug
The Popup when you click on the Reporting is not relative and fixed .
When we scroll down the dashboard and click on the reporting there seems to be no popup appearing but it has come at the top
To Reproduce
Steps to reproduce the behavior:

Go to Dashboards
Scroll down to the dashboards
Click on reporting and download PDF
The pop up appears at the top and not visible below

Expected behavior
The popup should be relative and not static
OpenSearch Version
2.x any version the issue is present
Dashboards Version
It is present in all the versions of the OpenSearch-dashboards
Plugins
Reporting plugin
Screenshots

[Catch All Triage - 1, 2, 3, 4, 5]


Add primary keys to pg_class and pg_index

Summary of the changes / Why this improves CrateDB
This will add entries for primary keys to pg_class and pg_index to address https://github.com/crate/crate/issues/9712
Checklist

[x] User relevant changes are recorded in CHANGES.txt
[x] Touched code is covered by tests
[x] Documentation has been updated if necessary
[x] CLA is signed
[x] This does not contain breaking changes, or if it does:

It is released within a major release
It is recorded in CHANGES.txt
It was marked as deprecated in an earlier release if possible
You've thought about the consequences and other components are adapted
(E.g. AdminUI)

retest this please


command p5-server.explorer.createSketch not found

Wonderful extension! Unfortenely it is not working. It gives this error "command p5-server.explorer.createSketch not found".
How can we fix it?

Thank you for your encouragement, and thank you for the bug report!
What version of Visual Studio Code are you running?
And, what did you do to create the sketch? For example, "In the P5.js sketch explorer, clicked on the Create Sketch icon", or "in the P5.js sketch explorer, selected 'Create sketch (HTML + JavaScript)' from the ellipsis menu".
[I just tried both of these with the latest version, but I don't know whether I am trying the same thing that you did and it's behaving differently on my computer than yours, or whether you're using a different way to create a sketch, that I've forgotten to test…]

Hello, I'm having the same issue as described here
The error message happens whether I click on the Create Sketch icon in the P5.js sketch explorer, or I selected 'Create sketch (HTML + JavaScript)' from the ellipsis menu in the P5.js sketch explorer.
Any news on this?

Same problem here

@lorenzo-leuck @grybouilli @luckasRanarison Thank you for your bug reports, and for your patience. I have not yet reproduced this.
Here is a screencast of the steps that I am taking to try to reproduce the issue.
This screencast is using a fresh install of the extension, in a new Visual Studio Code Profile that doesn't have any other extensions installed, or any changes from the default settings. I see similar results in my Default profile, which has a number of extensions and configuration changes.
Please let me know if you see a difference between the steps that work for me, and the steps that fail for you.
If these steps are the same, another possibility is that there's a conflict between this extension and some other extension that is popular, but that I'm not running.

I just noticed the "Actual command not found, wanted to execute p5-server.explorer…" alert that appears in the preceding comment's screencast. This is different from the reported error, and doesn't prevent the command from functioning, but it does give me something to look at.
It would still be helpful to know if the steps that I'm using to try to reproduce the problem are different from the steps that you all are taking when you encounter it.

Thank you for looking into thus issue. Here is how I get the errors:
https://drive.google.com/file/d/1cFzTSM2JvRQThisyG-XvgEkxNl3OADje/view?usp=sharing

same issue. The commands do not work.
Additionally, sketch explorer says

but doesn't change.
I am using WSL, & my folders and files were created before installing your extension, if that makes a difference.


Problem with OpenMP dependency on macOS

Required Info

Camera Model
R200 / F200 / SR300 / ZR300 / D400

Firmware Version
3.21

Operating System & Version
macOS 10.12.4

Kernel Version (Linux Only)

I call make ../ -DBUILD_EXAMPLES=true and get the following:

cmake ../ -DBUILD_EXAMPLES=true<EMAIL_ADDRESS>-- Info: REALSENSE_VERSION_STRING=2.8.0
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES) (found version "1.0")
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES) (found version "1.0")
CMake Error at CMakeLists.txt:58 (message):
OpenMP package is missing!
-- Configuring incomplete, errors occurred!
See also "/Users/Auni/Workspace/librealsense/build/CMakeFiles/CMakeOutput.log".

This happened before when I briefly tried the development branch. I think it has to do with OpenMP being moved to llvm in brew, similar to here.

Hi @auni53
You can disable OpenMP in CMake using -DBUILD_WITH_OPENMP=false.
However, D400 support for Mac OS is still work-in-progress (the D400 is using UVC 1.5 spec, that requires considerable modifications to the existing libuvc backend).
For other devices, we recommend using the legacy driver.

Fantastic, just figured out that flag was a thing myself haha. Hope this helps anyone else having issues messing around with clang and llvm on mac!

I needed to prepare instructions for somebody on how to get OpenMP support with this, the unofficial guide is here.


Irmin graphql subscriptions (take 2)

The PR description of https://github.com/andreas/ocaml-graphql-server/pull/141 unintendedly closed https://github.com/mirage/irmin/pull/598 with no option of reopening, so this PR is a copy of #598 😒
This PR adds the ability to watch the entire store or a specific key with notifications delivered via the GraphQL subscription mechanism (currently only websockets, possibly Server-Sent Events or chunked HTTP responses in the future).
Adding Irmin_unix.set_listen_dir_hook () to cli.ml may be required...

I'm not quite sure why Appveyor cannot find graphql-cohttp.0.10.0, but it works in Travis. Maybe the OPAM repo is cached somehow?
Otherwise, this PR should be ready for review.

Any idea why the irmin-git tests are failing ?

I think the irmin-git test failure is actually unrelated to this PR.  I'm getting the same failure as the one on travis-ci when running tests for the code in mirage/irmin#master without any modifications. However, the failure seems to be kind of inconsistent, so I haven't really been able to debug it.

One question since I'm not all that familiar with how subscriptions work: it looks like unwatch will be called automatically when the client unsubscribes, but how does the client send the actual unsubscribe request?

The client sends a GQL_STOP message (doc) over the websocket, which will terminate the subscription -- this triggers a call to unwatch.

Any idea why the irmin-git tests are failing ?

I'm not sure either. It's green now without any relevant changes on my part. I did rebase on master though.

Any idea why the irmin-git tests are failing ?

I'm not sure either. It's green now without any relevant changes on my part. I did rebase on master though.

Yeah, I'm not sure what's going on with the tests :confused:


Turn on CodeQL and fix BinSkim regressions

How about using CMake presets instead and be a good example how CMake should be done ?

How about using CMake presets instead and be a good example how CMake should be done ?
[...]
In general, we should either:

add_compile_options() / add_link_options()
Move these to a Toolchain file

Modifying CMAKE_C(XX)_FLAGS in the CMakeLists.txt is always a smell. That said, this works and follows what came before, so not requiring changes at this time.

This is a controversial opinion among the vcpkg maintainers, but I still believe that CMake expecting application authors to separate warnings manipulation into separate files is unreasonable. And I cite as evidence that I've reviewed a lot of things that are shipped into vcpkg ports and never ever seen a project do it. Separate files is a statement that separate people are interested in the values, and that isn't true for diagnostics.
Contrast with /machine: switches in similar that make sense to be part of the "toolchain".

And I cite as evidence that I've reviewed a lot of things that are shipped into vcpkg ports and never ever seen a project do it.

Most ports predate presets and most projects don't care about proper CMake ;)
VTK/Qt in general give an option to opt out of the flag setting business.

VTK/Qt in general give an option to opt out of the flag setting business.

And so do we. VCPKG_DEVELOPMENT_WARNINGS defaults to off.

And so do we. VCPKG_DEVELOPMENT_WARNINGS defaults to off.

That is just the warning flag setting business and leaves at least:
https://github.com/microsoft/vcpkg-tool/blob/5fdee72bc1fceca198fb1ab7589837206a8b81ba/CMakeLists.txt#L120-L130


[issue39 ]fix code coverage

https://github.com/AArnott/Nerdbank.Streams/issues/39

@AArnott  cc is back!


Add a preliminary CLI

@dchiquit As a sanity check, can you see if you can run this successfully (list and download a dataset)? It should be as easy as:
cd swc
pip install -e .
swc dataset list
swc dataset download 1 somedir

Prefix with SWC_URL=http://localhost:8000/api/v1 for running against your local instance.

Running
pip install -e .
swc dataset list

gives me ModuleNotFoundError: No module named 'tqdm'.
pip install tqdm fixes it.


Relax timeouts, spinning things up frequently takes > 2s

On testing this some more I think I was just having a bad computer day. Everything seems fast now, sorry about that, I'm gonna pull this.


Protocol agnostic socket

Currently socket-collection exposes separate structures for different protocols: UDP, TCP, etc. All of those sockets implement similar API, but we need a single abstraction that wraps all the protocol implementations to ease it's integration into p2p and Crust.

Call this abstraction Socket
Investigate if Socket needs to be a trait or an enum with other sockets as variants.
This abstraction should provide the common APIs shared by the sockets it's wrapping.
If there's an API in one and not in other then we can mimic that API as NoOp in the other where it lacks and give an appropriate return - e.g., if the return type is a Result then an InvalidOperation error would do so that the caller does not have to do anything special and can read the doc and branch on the error type if necessary. This will keep the API uniform in this protocol agonostic layer.

Went with enums as here because with traits we'll require to either hold it as trait object by Boxing it (thus heap allocation) or templatising the types in the user code on Socket which is quite verbose.