Usage in Next.js server components

Scenario & Reproduction Steps

scaffold a new next.js app with npx create-next-app@latest and default options
npm install @1password/sdk
replace contents of app/page.tsx with

import { createClient } from "@1password/sdk";

export default async function Home() {
  // Creates an authenticated client.
  const client = await createClient({
    auth: process.env.OP_SERVICE_ACCOUNT_TOKEN!,
    // Set the following to your own integration name and version.
    integrationName: "My 1Password Integration",
    integrationVersion: "v1.0.0",
  });

  return null;
}

run npm run dev

Actual Behavior
When navigating to localhost:3000 I get the following error in the console:
Error: ENOENT: no such file or directory, open '<project-root>/.next/server/vendor-chunks/core_bg.wasm'
    at Object.openSync (node:fs:581:18)
    at Object.readFileSync (node:fs:460:35)
    at __webpack_require__ (<project-root>/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (<project-root>/.next/server/webpack-runtime.js:33:43)
    at __webpack_require__ (<project-root>/.next/server/webpack-runtime.js:33:43)
    at eval (./app/page.tsx:5:72)
    at (rsc)/./app/page.tsx (<project-root>/.next/server/app/page.js:184:1)
    at Function.__webpack_require__ (<project-root>/.next/server/webpack-runtime.js:33:43)
    at async Promise.all (index 0

Expected Behavior
No response
SDK version
<EMAIL_ADDRESS>Additional information
One fix I found is to run  cp<EMAIL_ADDRESS>.next/server/vendor-chunks AFTER starting the dev server using npm run dev.
This has to be run every single time when starting the dev server and thereby is very infeasible.

Hi @icrayix, I'm noticing you're using our SDK in a browser based client, in the frontend React code. Our JS SDK doesn't currently support browsers, meaning we haven't officially tested this use case, and we are only claiming compatibility with Node.js. We looked into supporting browser apps so it's not completely uncharted territory, so I will raise this issue internally as a feature request for browser support.
To get you unblocked faster, I'm wondering whether your use case can leverage Next.JS's server side rendering feature to run the SDK in a node.js environment and still get your required data on the frontend.

Hi @AndyTitu, thanks for your response!
In the Next.js App Router (available in version 13 and above), which I'm using, React Server Components are the default. This means that these components exclusively run on the server and only the rendered html is sent to the client.
Thereby, the code snippet I sent for the reproduction does only run on the server in the Node.js runtime.

Okay, I see. In this case, I think the problem lays somewhere with the webpack bundling that's going on. Bundlers are also not yet on the supported list of target environments as we have never officially tested for these scenarios (it might be that some do work - like in your case after moving one file around). I'll modify our README to reflect this while we work on better supporting these use cases as well.

Okay, thanks. I appreciate that!


Manifold::Initialize() sqrt of square not required?

sf = std::sqrt( A->staticFriction * A->staticFriction );
Is there a reason this is done like so?  Something unfinished, perhaps?
PS thank you so much for a clear 2D working example.  I looked high and low for something similar to help me debug my own version.  In the end I implemented a version of ImpulseEngine in Processing 4.

What's wrong with it?

Ah yeah it should mix A and B together, it's a typo :)


Follow the MVC architecture

Make sure you store all the Models in a folder names models, all the routes in a folder named routes.

DONE


How to best acquire bison/flex/gperf and ruby?

I am currently trying to create a qtwebkit package (separate from the Qt5 build, not as part of it). Qt-webkit has a lot of build dependencies. All libraries are covered by vcpkg, but there seems to be no predefined function to acquire the build-time tool dependencies gnuwin32utils bison, flex and gperf, and also none for ruby. To keep things as automatic as possible it would be nice to acquire them like can be done for perl etc., or at least like can be done for python2 (btw - why can't VSs-python2 not be acquired full-automatically?), i.e. get a warning that they need to be downloaded and added to the search path.

bison/flex/gperf are actually bundled with the qt5 source (but not webkit), they could be downloaded here:
https://github.com/qt/qt5/tree/dev/gnuwin32

ruby I am not sure. Qt recommends: https://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.3.3-x64.exe (or the 32-bit version)

Any "best-practice" reco would be appreciated!

Good question!
As you noticed in the other thread, for any executables that are target architecture independent, it's ideal to get them through vcpkg_find_acquire_program. Our policy is that we prefer "portable" versions if possible, but if installation is required then we halt the build and instruct the user to download and install the software as needed (e.g. python2).
As for picking up python2 from VS -- that would be a great improvement! We just haven't done so yet :)

Okay, so for ruby, this seems like a good candidate, right (it's called "rubyinstaller", but it's a portable archive that only needs to be extracted):
https://github.com/oneclick/rubyinstaller2/releases/download/2.4.1-1/rubyinstaller-2.4.1-1-x64.7z
Should one prefer the  32- or 64-bit version, or offer both, either following host architecture, or by distinguishing ruby32 and ruby64? (The same question would be relevant for python, I think)

Generally, I'd recommend just getting the 32-bit version. This makes things simpler for all the various kinds of Windows, since they can all run x86. However, sometimes 64-bit may have a significant advantage for some reason, in which case you would need to follow the current host architecture.
We already handle msys based on the host architecture today, as an example.


When v-if and v-show are used on the same element, leave transition does not occur when v-if changed to false

Vue.js version
2.1.3
Reproduction Link
http://codepen.io/weotch/pen/GNyWaV
Steps to reproduce
Go to that codepen and click both links for "show" and "if" to "yes".  Toggle just "show" off, note the transition occurs.  Toggle "show" back on and then toggle "if" off, note that there is no transition out.
What is Expected?
I expected to still see the box transition out.  Or, in other words, anenter transition should trigger only if both v-show and v-if == true.  And a leave transition should trigger only if either v-show or v-if != true.
What is actually happening?
If v-if == true and v-show changes from true to false, the leave transition occurs as expected.  If v-show== true and v-if changes from true to false, the element is immediately removed, no transition occurs.
My use case for this is using both v-if and v-show around media (img, video).  The v-if triggers a load to start and then, once they are loaded, the v-show triggers the element to be revealed.

They are not supposed to be used on the same element - why would you do that?

v-if and v-show are not supposed to be used together for transition purposes, because they entail conflicting start/ending states. Regarding your use case: you can use the v-if on the outer <transition> component instead.

Appreciate the feedback and thanks for that suggestion.

Can they use together now !?  In Vue 2.x version.

@sky790312 the above was for Vue 2.x (2.1.3)

Got it. Thanks!


"anticipated opportunity cost of not fishing for alternative species"

What does this mean and where did this information come from? Management performance subsection just before "Model Uncertainty" section

feel free to change verbage.... the residual bio-economist in me I
guess.... Low utilization comes from (at least what I heard at JTC
meetings) was 1) not finding aggregations and 2) the decision to go fishing
for other things (the latter is the above economics of fisheries
translation of that; i.e., fishing for other species was preferred because
from an investment standpoint it was anticipated to be a better economical
decision)
On Mon, Feb 8, 2016 at 2:11 PM, allanhicks<EMAIL_ADDRESS>wrote:

What does this mean and where did this information come from? Management
performance subsection just before "Model Uncertainty" section
—
Reply to this email directly or view it on GitHub
https://github.com/cgrandin/hake-assessment/issues/89.

--
Aaron M. Berger, Ph.D. Research Mathematical Statistician
Fishery Resource Analysis and Monitoring Division
Northwest Fisheries Science Center
2032 SE OSU Dr. Bldg. 955
Newport, OR 97365-5275
<EMAIL_ADDRESS><EMAIL_ADDRESS>

I'll leave it up to you if this is to be kept in. But, think about
defending this when an SRG member asks, and industry is listening. I tend
to stick with the facts or something I can quote industry on.  I think that
it was implied at our meeting that some boats chose to fish for other
species (like some Freezer Trawlers in Canada), but the shoreside sector
may disagree with you (or at least I didn't here them specifically say
this).  Or, you may want to expand on that statement to provide more
evidence.
Just my thoughts.
On Mon, Feb 8, 2016 at 2:30 PM, aaronmberger<EMAIL_ADDRESS>wrote:

feel free to change verbage.... the residual bio-economist in me I
guess.... Low utilization comes from (at least what I heard at JTC
meetings) was 1) not finding aggregations and 2) the decision to go fishing
for other things (the latter is the above economics of fisheries
translation of that; i.e., fishing for other species was preferred because
from an investment standpoint it was anticipated to be a better economical
decision)
On Mon, Feb 8, 2016 at 2:11 PM, allanhicks<EMAIL_ADDRESS>wrote:

What does this mean and where did this information come from? Management
performance subsection just before "Model Uncertainty" section
—
Reply to this email directly or view it on GitHub
https://github.com/cgrandin/hake-assessment/issues/89.

--
Aaron M. Berger, Ph.D. Research Mathematical Statistician
Fishery Resource Analysis and Monitoring Division
Northwest Fisheries Science Center
2032 SE OSU Dr. Bldg. 955
Newport, OR 97365-5275
<EMAIL_ADDRESS><EMAIL_ADDRESS>—
Reply to this email directly or view it on GitHub
https://github.com/cgrandin/hake-assessment/issues/89#issuecomment-181595535
.

I'm happy to throw that part out.  Just leave it as 'due, in part, to difficulties locating aggregations of fish.'

how about
"to difficulties locating aggregations of fish and possibly economic
reasons"
That will cover the US as well since they didn't fish much in the fall for
both reasons.
On Mon, Feb 8, 2016 at 2:41 PM, aaronmberger<EMAIL_ADDRESS>wrote:

I'm happy to throw that part out. Just leave it as 'due, in part, to
difficulties locating aggregations of fish.'
—
Reply to this email directly or view it on GitHub
https://github.com/cgrandin/hake-assessment/issues/89#issuecomment-181603709
.

done and close


How can I disable the --open browser?

Question
Description
The --open is a cli option of gatsby. How can I disable it?
docz dev --open=false takes no effect.
docz-config.js openBrowser: false takes no effect.

Hey @hbrls,
Thanks for reporting this, it should be fixed in 2.3.0-alpha.11, you can try it now with docz@next or in 2.3.0 when it is released 👍


[Feature request] Provide metric of points written per database and measurement in database internal

Proposal:
In database internal, please provide metric of points written by database and measurement
Current behavior:
In database internal, there is only metric of points written by clusterID, hostname and nodeID
Desired behavior:
Provide metric so that we can use how many points are written into what database and measurement
Use case:
This is a good feature to monitor the traffic distribution of different sources when using telegraf plugins exec, statsd, and non-telegraf agent, e.g., collectd.

By database:
SELECT sum(writePointsOk) as writePointsOk FROM "shard" WHERE time > now() - 1m GROUP BY time(10s),"database"


Moved to new lowercase logrus & go-srvlb package to avoid 'case-insensitive import collision' and other errors

Additionally: Reorder imports with impformat.
See: https://github.com/sirupsen/logrus/issues/543
This blocks further changes due to package imports that already imports new package (lowercase).
Also it is blocked by https://github.com/mwitkow/go-httpwares/pull/16
Signed-off-by: Bartek Plotka<EMAIL_ADDRESS>

Codecov Report

Merging #14 into master will decrease coverage by 1.16%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master      #14      +/-   ##
==========================================
- Coverage   44.94%   43.77%   -1.17%
==========================================
  Files          12       12
  Lines         514      514
==========================================
- Hits          231      225       -6
- Misses        260      265       +5
- Partials       23       24       +1

Impacted Files
Coverage Δ

http/lbtransport/transport.go
64.7% <0%> (-11.77%)
:arrow_down:

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 7db3a8b...e61178c. Read the comment docs.

Wut is going on with this codecov... I decreased coverage by just changing imports? xD


Filesystem based routing?

Hi,
I recently got into bun and was looking for a nice webframework which supports filesystem based routing. I like it because it - by design - enforces a clear structure for the project and you know where to find a certain route. Elysia does a few other things really really well in my opinion so I thought about using it but as far as I see it does not support fs based routes. Is this a thing you considered? Maybe also in a hybrid approach like I did here: https://github.com/m1212e/bun-fs-router-plugin

+1, I would be really interested in this, I was just about to raise a proposal for this exactly.

But Elysia doesn't really have frontend part so file based routing for api doesn't make sense..?

But Elysia doesn't really have frontend part so file based routing for api doesn't make sense..?

This has nothing to do with frontend or not.
For reference, check Next.js route handler implementation for a file-system based api.

But Elysia doesn't really have frontend part so file based routing for api doesn't make sense..?

This has nothing to do with frontend or not.
For reference, check Next.js route handler implementation for a file-system based api.

I didn't play with file based api, from one side looks like overhead of splitting everything
on the other looks like a good solution to extract those and make smaller

I don't think it would be too hard to make your own simple implementation
See the "However, it isn't too difficult to make a file-based router. Here's a file-based example code with builder:" part of the Waku docs

Here's one - https://github.com/wobsoriano/elysia-autoroutes

I also made an implementation of a file system routing plugin, based on groups, called the group router.

There are a few options, you could calculate the routes based on the current file path and just pass a helper function to spit out the correct relative path based on the file location, you could also utilize the bun.js macros/build plugins to set the correct path at build time. But what I could not get to work properly was the eden type safety. Since it work without code generation and TS does not support build time macros, I don't really seee a way to pull this off. Maybe one of the elysia devs knows how to implement something like this.

was just randomly reading the bun docs today and saw it has a native FileSystemRouter API that may be of use here
https://bun.sh/docs/api/file-system-router

@ethanniser https://github.com/wobsoriano/elysia-autoroutes uses it!

was just randomly reading the bun docs today and saw it has a native FileSystemRouter API that may be of use here
https://bun.sh/docs/api/file-system-router

elysia-autoroutes uses it!

@wobsoriano Did you manage to get eden types to work with it?

No. That's the biggest challenge @m1212e - how do we combine types from the main ElysiaApp instance with the route files?

I don't see a way to do this without running some kind of process at development time.

@m1212e what other meta framework do, like Nuxt, is to generate types for each route at dev time

@m1212e what other meta framework do, like Nuxt, is to generate types for each route at dev time

@wobsoriano Actually, I tried to do something similar here (with not much success): https://github.com/elysiajs/elysia/issues/79


Fix code scanning alert - The parameter 'local:retentionPeriod' has been declared but not used.

Tracking issue for:

[ ] https://github.com/dongaba/TVerRec/security/code-scanning/244

False positive


Support for GZIP'ed response?

According to this post http://stackoverflow.com/questions/2682483/nsurlconnection-nsurlrequest-gzip-support NSUrlRequest seems to support GZIP by adding a header:
[urlReq setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"]
I can try this and will submit a fix if it works. However I do not know what to do with "deflate", as used in HttpClientHandler:
new HttpClient(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate })

Hi. Is it possible to have an  example how to use ModernHttpCLient with gzip (Android and iOS with Xamarin Forms PCL)? I have't found it....


Remove dependency on Laravel Application

@acidjazz @pi0 i've switched to your repo, i'll take one less namespace anyday!

@jenssegers isn't this a safe solution ? and would you consider merging this ?


Resurrection

I'm thinking about trying to resurrect this package using latest ZMQ.jl (or just plain sockets) and/or Requests.jl and Matlab's webread and/or tcpclient, which did not exist when this package was written and may eliminate the need for MEX stuff.
Any words of advice, warnings, encouragement? :)

You probably also know about https://github.com/twadleigh/jlcall.
If you'd basically like to take ownership of the package, I'm happy to transfer it. If you'd prefer to leave it here, that's fine too.


Add new package bisect tool using git bisect.

This fixes https://github.com/iree-org/iree/issues/16556.
This automates the process of searching through commit history for the commit at which an iree-compile ... command started producing errors by leveraging https://git-scm.com/docs/git-bisect together with the uploaded artifacts in post-submit PkgCI runs. See the included README file for detailed documentation.
I tested that the script works by reproducing the culprit finding from https://github.com/iree-org/iree/issues/18879. Full logs from that run (after caching installed packages): https://gist.github.com/ScottTodd/cff468a50df63b65e5c5f449fabab6af. Also tested with this other regression: https://github.com/iree-org/iree/issues/19290.
Background on 'bisect'
Let's say we have 100 git commits over the last month and we know that a program started failing to compile at some point in that period:
o - main (broken)
o
o
o - nightly release
o
o
o - nightly release
o
...
o - 1 month ago (working)

We could build from source at every commit and run our test command, but this is slow, even with ccache and other tricks to speed up the build. We could also install the nightly release builds and test those, but there are gaps between them.
This scripting uses the packages built by .github/workflows/pkgci_build_packages.yml and uploaded to GitHub Artifacts, which are retained for 90 days and can be downloaded from workflow runs triggered on push events, after commits are merged to main, like on this run:

Since we have packages for every commit*, we can do a smarter search than a linear scan. We can do a bisect. Since we're looking through git commits, we can have git bisect handle the core bisect loop as long we provide a suitable test script.
* that didn't fail the build, which is unlikely
With all those pieces together, our culprit finding bisect now looks something like this, only testing O(log N) commits:
o - main (broken)
o
o                            <--- TEST 2: broken
o - nightly release
o                            <--- TEST 3: broken (culprit)
o                            <--- TEST 1: working
o - nightly release
o
...
o - 1 month ago (working)

Future work
Possible areas for improvement (after we use this a few times and see how well it works):

Improve the logging - particularly redirecting stdout/stderr for compile failures so they don't clutter the main logs
Add an interactive mode
Add a mode that uses nightly releases instead of / in addition to post-submit CI artifacts, since CI artifacts need authentication to download
Speed up artifact downloads somehow. Maybe using https://github.com/elfshaker/elfshaker or some hosted mirror of the github artifacts with a pip-compatible index. On a good network, downloading the 60MB release files still takes 10+ seconds.
Handle missing artifacts and other infrastructure issues by using git bisect skip / exit 125
Integrate with git bisect log and/or git bisect replay (https://git-scm.com/docs/git-bisect#_bisect_log_and_bisect_replay)
Run the bisect in the cloud (GitHub Actions?)
Run the bisect in parallel or distributed across multiple machines, using a project like https://github.com/talshorer/git-dissect, https://github.com/bjackman/git-brisect, or https://github.com/hoelzro/git-pisect (these would be particularly helpful when the test step takes multiple minutes, so long as all the test machines have the required test artifacts like .mlir files already cached)
Collect metrics / statistics during the run (time spent per commit on downloading and testing, data downloaded)

This is really nice

Pushed a bunch of quality of life changes and documentation improvements, then went a bit overboard on the PR description. Ready for review 😀

Pushed a few more changes, mainly removing the new venv setup script in favor of instead teaching the existing setup_venv.py how to look up workflow runs for git refs.

Thanks! This is a very cool/helpful tool, and you covered a lot of different use cases :)


Next test kicked off synchronously when plan completes?

I just updated tap and my tests started failing. I was running tests against some Reflux stores like so:
var count = 0;
var unlisten = Store.listen(() => {
    switch (count++) {
        case 0:
            // assertions for first trigger
        break;

        case 1:
            // assertions for next trigger, etc.
            unlisten();
        break;

        default:
            t.fail('Too many triggers');
        break;
    }
});

My tests started breaking, though, because apparently the last assertion before unlisten() triggered the next tests to start running, and since they caused the same store to emit data, the listen handler from the previous test was triggered, causing an error.
This seems to have been a recent change? I'd like to request it be changed back so that synchronous cleanup, which falls naturally at the end of the assertion code, can be executed before the next test in the set is run...

Can you provide a simpler use case that used to work and no longer does?  Or a way to reproduce this somehow?  I don't know what Store.listen is.


Support for DDoS Per IP SKU - Bundle Mode for GA Release

Related command
az network public-ip
Resource Provider
Microsoft.Network
Description of Feature or Work Requested
We want to allow customers to link a Ddos Protection Plan to a Public IP Resource  only if ProtectionMode = Enabled
For little more specifics:
az network public-ip
Add DDoS Protection Plan param (--ddos-protection-plan)
For reference, Vnet currently has a similar parameter - so you can probably look at that for reference for implementation
Minimum API Version Required
2022-05-01
Swagger PR link / SDK link
https://github.com/Azure/azure-rest-api-specs/pull/19985
Request Example
No response
Target Date
2022-01-31
Additional context
We need this feature finished by our targeted GA date above - thanks :)
We created this issue from this previous issue that we created a while back https://github.com/Azure/azure-cli/issues/23936

network feature


Use ::outline for line properties in CartoCSS for polygons

Context: https://github.com/CartoDB/cartodb/issues/7723.
In order to speed up and make the styles compatible between vector and raster, we need to use the ::outline approach for the CartoCSS line-* properties.
However, the current approach only allows to use flat styles, see https://github.com/CartoDB/cartodb/blob/ed553a8b34fedbb0f9a7ab429615b437ad6c9fb3/lib/carto/styles/polygon.rb + https://github.com/CartoDB/cartodb/blob/ed553a8b34fedbb0f9a7ab429615b437ad6c9fb3/lib/carto/styles/style.rb#L32.

@rochoa: Do we plan to support more nesting in the future? Something like:
my_class {
  foo: 'bar';
  ::outline {
    bla: 'bla';
    second_level {
      something: 'wadus';
      third_level {
        another: 'thing';
      }
    }
  }
}

Or one level of nesting (to support outline) is enough?

I don't know if it is a common thing (I don't think so), but it could be possible so I'd try to cover as many cases as possible. But @rochoa knows more than anyone.

I don't think so.
How does it impact your changes? Is it way more complicated to have several levels than one?

You can always workaround it with:
#layer {
  polygon-fill: red;
  ::outline {
    line-color: white;
  }
  ::outline-override {
    ...
  }
}

Keep it simple for now, just one level.

@rochoa if we want to support multiple levels of nesting, the best option is to parse these levels recursively. If we only need to support the first level (for the properties inside ::outline we can take a much simpler approach).
Let's go for one level for now then. We always have time in the future to add the recursion if needed :)
Thanks!

Marked as blocked because of the need for synchronizing merge with another PR (see @xavijam comment about this in the PR).

Ready to merge frontend part, what about tomorrow morning guys? 🙏

@xavijam I just did the acceptance of the second backend issue, I think we're ready as well. Could you please check that all issues are done? AFAIK only #12411 and #12410 were needed from our side.

Yes, only those are necessary from the Backend side, so great! 💃


Updates dockerfile to use ubuntu and node images.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 65.878%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
585

Relevant Lines:
888

💛  - Coveralls


https://elementum.surge.sh/ is dead

https://elementum.surge.sh/ shows
503 Service Unavailable
No server is available to handle this request.

https://elementumorg.github.io/ works.
But old link is used in repo description, in readme, in issue template and probably in more places.

maybe this will help
https://bit.ly/3XQLHlH
I put the necessary dlls in the archive

looks like it works now. but maybe it makes sense to migrate to second site.

@antonsoroko They have issues from time to time, with uptime or deployments.
There are not too many options that would not limit traffic or requests and won't just silently remove domain.
We added github for backup purposes, but I am still not sure if we can rely on github.

@elgatito i see. thanks for info.


Consolidate documentation between r2d and binder?

We have some duplicate documentation on mybinder's read the docs and repo2docker's read the docs.  Do we want that? Should we consolidate and link?

I'd keep the documentation on how to build different things in the r2d documentation and link to the appropriate docs from the mybinder.org documentation.

that's what I've tried to do here:
https://github.com/jupyterhub/binder/pull/116/files#diff-684a0ceb2878d48b19612ca360e277efR187
I agree we don't want them totally overlapping!

Sorry I'm a bit confused by the diff since it seems as if it were taken from the r2d docs?

yep - when conf.py runs it pulls the latest version of the howto files and the config_files pages from the repo2docker documentation.

I just added those files to .gitignore so ti's less confusing. They'll automatically be pulled when the docs are built, but won't be part of the repository itself

the content will be duplicated between the repos, yeah - I think that the target user for docs.mybinder.org and repo2docker is different enough that it's fine duplicating the content. What do you think?

I don't know.  I assume that the target audience is similar because you can use repo2docker to do local testing for binder.

using binder requires no background in docker, images, or even programming (plenty of software carpentries use binder to serve environments)...repo2docker on the other hand is more for people who know what a repository is, what a docker image is, what jupyter is, etc


388 zone facts table

Finally finished completing unit test confirming validity of zone_facts calculated values. This should wrap up #388
@NealHumphrey is this task needed: complete get_residential_permits method that is called in summarize_observations method? It was a todo note from when I pulled in summarize observations code - currently calculating rate for building_permits is incomplete but not sure if there's an actual need for it.

@jkwening thanks! I can review this tomorrow.
On your question, yes we do need that. But we can make it a separate issue  - it's adding another field to the zone_facts table. I made a separate issue for it: https://github.com/codefordc/housing-insights/issues/447


[move] Implement authentication rule for Transaction::WriteSet.

Motivation
Implemented the authentication rule for Transaction::WriteSet. The basic idea is that we add a new module called LibraWriteSetManager that contains the prologue/epilogue code to determine whether a WriteSet should be accepted or not. Due to the fact that the system is going to reconfigure after executing this transaction, LibraVM itself doesn't need to reload its configs nor need to cleanup its cache.
The code itself right now is only functional complete and probably require major code cleanup. I have a few remaining questions as well:

Do we need any rules on the submitted ChangeSet? Say no delete op as we used to?
What's the error handling policy for VM internal failures while processing those transactions?
Should VMValidator reject WriteSet with too new sequence number?

Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Added tests for following cases:

Execute and verify a well formed WriteSet transaction.
Execute and verify WriteSet transaction with bad sequence number/auth key.
Execute WriteSet transaction with bad contents (Namely writeset collides with events/writes generated by epilogue)

:umbrella: The latest upstream changes (presumably 236d747f3bcd4a74beb695848adfbd12bbdc6780) made this pull request unmergeable. Please resolve the merge conflicts.

@bors-libra r=sblackshear

:pushpin: Commit 982e0f3 has been approved by sblackshear

:hourglass: Testing commit 982e0f33ed087407cb2806d535311ff290e0a9d5 with merge ffa6f1d8fe908da69d153e6f8f8f868c632227e0...

:sunny: Test successful - checks-actions_land_blocking_test, checks-circle_commit_workflow
Approved by: sblackshear
Pushing ffa6f1d8fe908da69d153e6f8f8f868c632227e0 to master...


bazel-remote: init at 57a18163783d3d0cb199ad93bcc788c864ec4140

An HTTP/1.1 server that is intended to be used as a remote build cache for Bazel.
Depends on https://github.com/NixOS/nixpkgs/pull/55184
Motivation for this change
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Can this be closed since there is now #55188?
In general you can always update a PR by force-pushing onto the branch you used to create a PR.

@andir I created three separate PRs to replace https://github.com/NixOS/nixpkgs/pull/54996 at the request of @Infinisil

bazel-remote already exists as a package: https://github.com/NixOS/nixpkgs/blob/52dae14f0c763dd48572058f0f0906166da14c31/pkgs/top-level/all-packages.nix#L8461
You probably want to update/move the existing derivation rather than creating a new one.

closing as bazel-remote in nixpkgs from another PR now

Note that the current derivation only supports Darwin, so you'll still need to update it if you want to add it for NixOS.


Move automatic rest endpoints generation from Kogito to Drools

See https://issues.redhat.com/browse/DROOLS-7555

Implemented by
https://github.com/apache/incubator-kie-drools/pull/5548
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3248


fitsio install inconsistencies

The fitsio install (at least on ubuntu 20.04, fresh install, using conda) has inconsistent requirements that may cause the psrsigsim install to fail. pdat requires fitsio>=0.9.10, but the psrsigsim must use fitsio==0.9.12 (at least right now), and if pdat is not preinstalled this causes the install to fail (@Hazboun6 may need/want to update this as well since I think pdat will also actually require fitsio 0.9.12). We need to have some documentation somewhere that goes over how to do this.
I was able to successfully install the psrsigim on a fresh ubuntu 20.04 using anaconda with the following steps:
0. Make sure a C-compiler is installed, e.g. run: sudo apt-get install build-essential, check with which gcc

install conda for linux
create a new conda environment with python 3.7, numpy, scipy, astropy, matplotlib
install fitsio separately with: pip install fitsio==0.9.12
(Theoretically one should be able to just pip install psrsigsim now, but I also installed pdat and pint separately)
pip install git+git.psrsigsim.....

Which works fine. I know others have this issue, so we should document this somewhere, maybe the readme?

If you don't preinstall fitsio at a fixed version, which version does pdat install?

@paulthebaker I have now changed pdat so that when it is pip installed it will automatically install fitsio==0.9.12.   I've run the PsrSigSim tests, local tests and @bshapiroalbert has also tested this locally. I think we've accomplished an appropriate workaround, though of course pdat itself could use some more work.

Ditto what @Hazboun6 said. I think we can probably close this issue now unless there's anything else we should discuss regarding this now.


Add assertion example to Wiki

The Wiki has examples of how to print, but not write assertions. My assertions recently stopped compiling, perhaps because of #500 ? What is the right way to do something like:
assert (a === b, "A (%x) is not equal to B (%x) !", a, b)
If I do this I get errors like:
Caused by: java.lang.IllegalArgumentException: requirement failed: Too many arguments! More format specifier(s) expected!
    fmt = "A (%%x) is not equal to B(%%x)!"
...

Whoops. This is my fault. We do need examples but this should not have stopped working. I think the fix shouldn't be too bad.

Can you try https://github.com/ucb-bar/chisel3/pull/542 to see if it fixes your broken assertions?

Yes it fixes my issue


Refactor pkgchk tool and expose some api

Refactor the tool and expose some API so that we could reuse the pkgchk logic in other tools, especially the generator tool to check the output-folder correctness in a swagger PR

[ ] The purpose of this PR is explained in this or a referenced issue.
[ ] The PR does not update generated files.

These files are managed by the codegen framework at Azure/autorest.go.

[ ] Tests are included and/or updated for code changes.
[ ] Updates to CHANGELOG.md are included.
[ ] Apache v2 license headers are included in each file.

Hey @jhendrixMSFT could you please take a review on this PR?

This just makes some content public, it doesn't change any behavior?

This just makes some content public, it doesn't change any behavior?

Making things public and some refactor, no behavioral change except the path of a package will no longer start with / (see the changes in exceptions.txt

Hey @jhendrixMSFT any update?


Using custom fields to preserve ENUM types from postgres schema

I was not aware that the guacamole client (the war file) would use the
custom ENUM types at the top of the file (as opposed to just checking
for string equality).
To preserve these, I utilized custom fields based on this presentation
here:
https://wiki.postgresql.org/images/0/0b/Postgresql_django_extensions.pdf
Each of the models switched out CharFields for these EnumFields.
Because A) we could not automatically migrate the data and B) no one is
using (successfully) this project yet, we included two migrations, one
(0002) to remove the offending fields, and another (0003) to add in the
correct ones.
Because of the method by which we add the actual ENUM types themselves
in 0003, we needed to include sqlparse in the requirements.
Finally, our test was buffed up a little bit to prove we can still do
string comparison at the application level.

This looks good to me :+1:


goreleaser: 0.172.0 -> 0.172.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/goreleaser/goreleaser/releases.
meta.description for goreleaser is: "Deliver Go binaries as fast and easily as possible"
meta.homepage for goreleaser is: "https://goreleaser.com"
meta.changelog for goreleaser is: ""
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

/nix/store/1ghgv4lm33915nan67l0064l9kqqizx2-goreleaser-0.172.1/bin/goreleaser passed the binary check.

1 of 1 passed binary check by having a zero exit code.

1 of 1 passed binary check by having the new version present in output.

found 0.172.1 with grep in /nix/store/1ghgv4lm33915nan67l0064l9kqqizx2-goreleaser-0.172.1

found 0.172.1 in filename of file in /nix/store/1ghgv4lm33915nan67l0064l9kqqizx2-goreleaser-0.172.1

directory tree listing: https://gist.github.com/67c5419613587090cc94ca1c7da729d0

du listing: https://gist.github.com/678e387a38a0ae192f9c5f4aabd98f4c

Rebuild report (if merged into master) (click to expand)

1588 total rebuild path(s)

700 package rebuild(s)

687 x86_64-linux rebuild(s)
534 i686-linux rebuild(s)
61 x86_64-darwin rebuild(s)
306 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
DisnixWebService
abcmidi
adapta-gtk-theme
agi
alchemy
alda
aldor
amidst
ammonite
ammonite_2_12
ammonite_2_13
apache-directory-studio
apache-flex-sdk
apacheKafka
apacheKafka_2_6
apktool
archi
arduino
arduino-core
asciidoc-full-with-plugins
asciidoctorj
aspectj
astrolabe-generator
atlassian-cli
atlassian-confluence
avro-tools
aws_mturk_clt
awstats
axis2
basex
bat-extras.batdiff
bazel
bazel-watcher
bazel_0
bazel_0_26
bazel_0_29
bazel_1
bazel_3
bazel_4
bfg-repo-cleaner
bftools
bitwig-studio1
bitwig-studio2
bloop
bonnmotion
boot
briss
cage
cagebreak
ccemux

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/1ghgv4lm33915nan67l0064l9kqqizx2-goreleaser-0.172.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A goreleaser https://github.com/r-ryantm/nixpkgs/archive/a174b255dbd32629554f451a28cdffe9aafd79f8.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/1ghgv4lm33915nan67l0064l9kqqizx2-goreleaser-0.172.1
ls -la /nix/store/1ghgv4lm33915nan67l0064l9kqqizx2-goreleaser-0.172.1/bin

Pre-merge build results
NixPkgs review skipped

Maintainer pings
cc @c0deaddict @endocrimes @sarcasticadmin @kalbasit for testing.

@ryantm Is there a reason this targets staging now?

@ryantm Is there a reason this targets staging now?

probably a mistake because there where a few rebuilds at the time of creating this PR on master.

Result of nixpkgs-review pr 128720 1

1 package built:

goreleaser


Reenable app resizing in CS1-style graphics

We're having bad CI luck today! I'll see if it fails locally too


spec missing in module scope

Environment data

VS Code version: 1.35.1
Extension version: 2019.6.22090
OS and version: macOS 10.14.4
Python version: 3.6.7
Type of virtual environment: conda
Jedi or Language Server: language server

Actual behavior

Using __spec__ raises a problem (undefined variable).
Expected behavior
Reading other global attributes like __name__ doesn't so this seems inconsistent at first glance. Any reason for this?

We have a list of variables that we define in scope of a module, __spec__ is likely just missing. I think declaring it would unfortunately make every module analysis dependent on whatever module defines ModuleSpec, which is importlib.

I think declaring it would unfortunately make every module analysis dependent on whatever module defines ModuleSpec, which is importlib.

Just so I understand, why would that be a problem?

From our end, we'd need to analyze importlib, which requires analyzing everything importlib imports, and so on. It would just mean every analysis (even on code without any imports at all) would require this to happen, as every module would have a __spec__, plus the added issue of that being a circular problem (every module would have a __spec__ which can only be produced by analyzing another module, which itself is supposed to have a __spec__).
We'd sooner write a custom type to take its place rather than trying to get the "real" spec. An even quicker fix just to drop the warning would be to say that it's object.

Another "quick" fix would be to resolve #264. Then you could do
logger = get_logger(__spec__.name, log_dir)  # noqa: F821

Note that you can already disable any of the warnings we put out (other than syntax errors), for example:
"python.analysis.disabled": ["undefined-variable"]

But yes, something per-line would be good. Note that we don't have any mapping from pylint/flake8/etc "codes" to our own, so that'd be something on top of being able to disable diagnostics per-line.

Note that we don't have any mapping from pylint/flake8/etc "codes" to our own, so that'd be something on top of being able to disable diagnostics per-line.

Yeah, I thought there might be some extra work there. But it's just icing on the cake, anyway. A code-insensitive, but per-line # noqa directive already provides most of the value.

In DeclareBuiltinVariables need to add __spec__


animate model

Can the trained HumanNerf model be used to generate some new unseen poses?

Yes, it has the capability of being applied to unseen poses but we did not evaluate it carefully as it's not our focus.

Thank you for sharing the code. Could you please let me know how I can give random 3D poses (smpl param) as input to the model?

can I assume, T-pose is not in the dataset, and it can be rendered. So, does that mean, unseen pose can be rendered ?

I tested if you modify core/data/human_nerf/tpose.py (dst_poses), give it a different value, e.g. np.ones(72) * 0.1, it could render some unseen pose.
https://user-images.githubusercontent.com/1734553/187589441-e437b31f-b0f4-4315-99ab-d500b8a3cb2a.mp4
And I have a question, here, how is dst_poses represented ?
24x3 relative angles?
range from (-1,1) ?
Many thanks

Render unseen pose
If you want to change T-pose to an unseen pose (let's say Y-pose), you can reference SMPL FAQ P23. Find out the corresponding joint ids for both shoulders. And then in core/data/human_nerf/tpose.py line 140. Add 2 new lines:
dst_poses[16*3+2] =  1.0 # Left shoulder  rotate +1/pi*180 = +57 deg
dst_poses[17*3+2] = -1.0 # right shoulder rotate -1/pi*180 = -57 deg

Have fun!
https://user-images.githubusercontent.com/1734553/187606515-08c02199-78c5-4068-b8e8-5565c8c4ae56.mp4


Add bobbygeeze as a CF member

I am a new docs writer for VMware and I am requesting to become an  approver for all doc areas.

I am a new docs writer from VMware and am requesting to become an approver for all docs areas.
This affects 3 working groups and requires approval from the tech leads in each working group:

App Runtime Platform - @ameowlia
App Runtime Interfaces - @gerg
Foundational Infrastructure - @beyhan and/or @rkoster

Closing in favor of this duplicate PR.


Customised Markersize in plot_di

Reference
plot_di function
Issue
Older plot_di does not allow straightforward use of numpy.ndarray to define marker size. If the plotted inclination data contains a mix of negative and positive values, the function would throw out an error message saying that the size of marker size array "is not the same as" the inclination and declination array.
Possible Solution
To add an if block to handle markersize array.
Proposed Code
def plot_di(dec=None, inc=None, di_block=None, color='k', marker='o', markersize=20, legend='no', label='', title=None, edge=None,alpha=1):
    """
    Plot declination, inclination data on an equal area plot.

    Before this function is called a plot needs to be initialized with code that looks
    something like:
    >fignum = 1
    >plt.figure(num=fignum,figsize=(10,10),dpi=160)
    >ipmag.plot_net(fignum)

    Parameters:
        dec : declination being plotted
        inc : inclination being plotted
        di_block: a nested list of [dec,inc,1.0] (di_block can be provided instead of dec, inc in which case it will be used)
        color : the default color is black. Other colors can be chosen (e.g. 'r')
        marker : the default marker is a circle ('o')
        markersize : default size is 20, but you can also put a numpy array to define individual marker sizes
        label : the default label is blank ('')
        legend : the default is no legend ('no'). Putting 'yes' will plot a legend.
        edge : marker edge color - if blank, is color of marker
        alpha : opacity
    """
    X_down = []
    X_up = []
    Y_down = []
    Y_up = []
    color_down = []
    color_up = []

    if di_block is not None:
        di_lists = unpack_di_block(di_block)
        if len(di_lists) == 3:
            dec, inc, intensity = di_lists
        if len(di_lists) == 2:
            dec, inc = di_lists
    try:
        length = len(dec)
        for n in range(len(dec)):
            XY = pmag.dimap(dec[n], inc[n])
            if inc[n] >= 0:
                X_down.append(XY[0])
                Y_down.append(XY[1])
                if type(color) == list:
                    color_down.append(color[n])
                else:
                    color_down.append(color)
            else:
                X_up.append(XY[0])
                Y_up.append(XY[1])
                if type(color) == list:
                    color_up.append(color[n])
                else:
                    color_up.append(color)
    except:
        XY = pmag.dimap(dec, inc)
        if inc >= 0:
            X_down.append(XY[0])
            Y_down.append(XY[1])
            color_down.append(color)
        else:
            X_up.append(XY[0])
            Y_up.append(XY[1])
            color_up.append(color)

    """
    NEW STUFF to detect array-shaped markersize
    """
    if isinstance(markersize, np.ndarray):
        marker_up = []
        marker_down = []
        for n in range(len(dec)):
            if inc[n] >= 0:
                marker_down.append(markersize[n])
            else:
                marker_up.append(markersize[n])
    else:
        marker_up = markersize
        marker_down = markersize
    """
    END OF NEW STUFF
    """

    if len(X_up) > 0:
        plt.scatter(X_up, Y_up, facecolors='none', edgecolors=color_up,
                    s=marker_up, marker=marker, label=label,alpha=alpha)

    if len(X_down) > 0:
        plt.scatter(X_down, Y_down, facecolors=color_down, edgecolors=edge,
                    s=marker_down, marker=marker, label=label,alpha=alpha)
    if legend == 'yes':
        plt.legend(loc=2)
    plt.tight_layout()
    if title != None:
        plt.title(title)

Interesting. Can you describe the envisioned use case here? I am used to thinking about markersize as a single value for all points.

I can think of one already published use-case here: To plot the declination and inclination of 3D vector magnetic model voxels scaled by the inverse of the standard deviation of model declination values Miller et al., (2020).

Thanks for the example. In this case, it seems like each once can be put in with a separate call to the function with distinct parameters.
If we are putting in the functionality for variable symbology, it seems like we would want to to be generalized to be markersize and marker and color? With them all being able to be sent in as lists give that the others would be lists of strings. How does this work in default matplotlib functions (e.g. plt.scatter)?

it seems like we would want to be generalized to be markersize and marker and color?

For color, yes, I think it can be generalised as well as an alternative to showing variable markersize, but I do not see the likeliness of this being used in general publications since, in my opinion, more people can recognise shapes better than colour (colourblindness issue 😉).


MDFileManager how to get root path like "storage/emulated/0/"

Description
I tried to read the internal storage of my phone with the following code but I cannot access it.
self.file_manager.show ('storage / emulated / 0')
how can I do this?
Thanks in advance.
My code
from kivy.core.window import Window
from kivy.lang import Builder
from kivymd.app import MDApp
from kivymd.uix.filemanager import MDFileManager
from kivymd.toast import toast

KV = '''
BoxLayout:
    orientation: 'vertical'
    MDToolbar:
        title: "MDFileManager"
        left_action_items: [['menu', lambda x: None]]
        elevation: 10
    FloatLayout:
        MDRoundFlatIconButton:
            text: "Open manager"
            icon: "folder"
            pos_hint: {'center_x': .5, 'center_y': .6}
            on_release: app.file_manager_open()
'''
class Example(MDApp):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        Window.bind(on_keyboard=self.events)
        self.manager_open = False
        self.file_manager = MDFileManager(
            exit_manager=self.exit_manager,
            select_path=self.select_path,
            previous=True,
        )
    def build(self):
        return Builder.load_string(KV)
    def file_manager_open(self):
        self.file_manager.show('storage/emulated/0')  #<<<<<<<<<<<<<<<<HERE!!!!!!!!!!!!!!!!!
        self.manager_open = True
    def select_path(self, path):
        self.exit_manager()
        toast(path)

    def exit_manager(self, *args):
        self.manager_open = False
        self.file_manager.close()
    def events(self, instance, keyboard, keycode, text, modifiers):

        if keyboard in (1001, 27):
            if self.manager_open:
                self.file_manager.back()
        return True
Example().run()

Versions

OS: Ubuntu 18.04
Python: 3.7.5
Kivy: 1.10.1
KivyMD: 0.104.1

@DAMIAN-Adol Grant App Permissions

It is not "storage/emulated/0" but "/storage/emulated/0".  You are missing out "/" in front of "storage"

@HeaTTheatR @kengoon  Thanks for answering ...I did all of the above but it didn't work.
Now I found a solution to it.
I added to the header.
from android.storage import primary_external_storage_path
primary_storage_dir = primary_external_storage_path()
I changed the path  to self.file_manager.show(primary_storage_dir) ... it works perfectly.
the value of primary_storage_dir is /storage/emulated/0
thanks to https://github.com/kivy/python-for-android/pull/1598/files

But (I think) the Android features that enable implementation of this function are depreciated in Android 9, and removed in Android 10.

@Ham-Merhead it works on android 10 i used it on mine 😀.


Unused params not distinguishable from used params in VScode

I'm using the vscode extension and i find it really hard to notice unused parameters in functions. (i'm using typescript but colors should be the same.)

As you can see here, in the handleSmth function, the parameter color is almost exactly the same as in the handleConcept function.

As far as I know, the muted colors for unused parameters and variables is set by VSCode. Darkened some percent. I don't have any control over how much different they will look.

Good to know, thanks!


HARP-9897: Add support for vector2/3/4 operators.

This change introduces new operator and type conversions to
support vector2/3/4.
Signed-off-by: Roberto Raggi<EMAIL_ADDRESS>

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@541b5c1). Click here to learn what that means.
The diff coverage is 96.62%.

@@            Coverage Diff            @@
##             master    #1451   +/-   ##
=========================================
  Coverage          ?   56.17%
=========================================
  Files             ?      272
  Lines             ?    24445
  Branches          ?     5475
=========================================
  Hits              ?    13733
  Misses            ?    10712
  Partials          ?        0

Impacted Files
Coverage Δ

...tasource-protocol/lib/operators/VectorOperators.ts
96.05% <96.05%> (ø)

@here/harp-datasource-protocol/lib/Expr.ts
93.21% <100.00%> (ø)

...here/harp-datasource-protocol/lib/ExprEvaluator.ts
83.65% <100.00%> (ø)

.../harp-datasource-protocol/lib/StyleSetEvaluator.ts
88.04% <100.00%> (ø)

...metry/lib/EdgeLengthGeometrySubdivisionModifier.ts
98.38% <0.00%> (ø)

@here/harp-mapview/lib/text/FontCatalogLoader.ts
25.00% <0.00%> (ø)

@here/harp-mapview/lib/poi/PoiRendererFactory.ts
60.00% <0.00%> (ø)

...ere/harp-materials/lib/LuminosityHighPassShader.ts
100.00% <0.00%> (ø)

...re/harp-text-canvas/lib/rendering/TextMaterials.ts
100.00% <0.00%> (ø)

@here/harp-mapview/lib/AnimatedExtrusionHandler.ts
14.93% <0.00%> (ø)

... and 266 more

Continue to review full report at Codecov.

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


Fix sql proj sqlcmd table showing after loading publish profile when it shouldn't

This PR fixes #11468. This adds a couple checks for if the loaded publish profile didn't have any sqlcmd variables:

table should only be added if the profile has sqlcmd variables
table should be removed if both the profile and project don't have sqlcmd variables

Coverage decreased (-0.1%) to 39.838% when pulling 43551abc00847455cca2ace9cac3cf1cebc6fecf on kisantia/fixSqlCmdTable into c3d151fbeef3f58af25ea66a1f410bc643138f10 on main.


Testing CI workflow for NumPy 2.0 (formal release)

This patch updates NumPy to the latest when building the package. It is necessary because otherwise, the package will be built against NumPy 1.x and become incompatible with NumPy 2.x.
Note: The CI workflow covers both NumPy 1.x and 2.x, because the older Python supported by scikit-bio is 3.8, under which the latest available NumPy version is 1.24.
See also here, which states that "oldest-supported-numpy" is deprecated since NumPy 2.0.
Please complete the following checklist:

[x] I have read the contribution guidelines.

[ ] I have documented all public-facing changes in the changelog.

[ ] This pull request includes code, documentation, or other content derived from external source(s). If this is the case, ensure the external source's license is compatible with scikit-bio's license. Include the license in the licenses directory and add a comment in the code giving proper attribution. Ensure any other requirements set forth by the license and/or author are satisfied.

It is your responsibility to disclose code, documentation, or other content derived from external source(s). If you have questions about whether something can be included in the project or how to give proper attribution, include those questions in your pull request and a reviewer will assist you.

[x] This pull request does not include code, documentation, or other content derived from external source(s).

Note: This document may also be helpful to see some of the things code reviewers will be verifying when reviewing your pull request.

I will merge it since it is necessary to unblock user installation.


Any updates?

Hi,
this seems to be the only reasonable readline alternative for small MCUs.
Is this abandoned or is there a plan to include parts of the pull requests or other work?
Thanks.

Hello !
yes it is a good library for having a readline feature for small embedded system. I used it for my system.
If you want (even if it is a little bit late) i have merged a lot of interesting pull request
it is available in my fork.

I suggest you to check yourself with my version of the library. In part, it contains useful pull requests for this library, but they were reorganized according to my vision of key functions. See CHANGELOG.md to compare my version with v1.5.1

Hi @azorg,
Your link seems to 404.
Is it possible that your microrl project is private on Gitlab?
Regards,
Gb

Hi @DmiKarasev,
I'll take a look. Thanks for your effort!


Filter blocks every message random logs

{"asset":"fatigue-check-filter","component":"asset-manager","level":"info","msg":"asset does not exist","time":"2019-09-19T20:04:43+03:00"}

{"component":"pipelined","error":"ReferenceError: 'fatigue_check' is not defined","level":"error","msg":"error executing JS","time":"2019-09-19T20:04:43+03:00"}

{"assets":["fatigue-check-filter"],"check_name":"check_disk_usage","check_namespace":"default","component":"pipelined","entity_name":"sensu","entity_namespace":"default","filter":"fatigue_check","level":"debug","msg":"denying event that does not match filter","time":"2019-09-19T20:04:43+03:00"}

{"check_name":"check_disk_usage","check_namespace":"default","component":"pipelined","entity_name":"sensu","entity_namespace":"default","filter":"fatigue_check","handler":"slack","level":"debug","msg":"denying event with custom filter","time":"2019-09-19T20:04:43+03:00"}

{"component":"pipelined","error":"ReferenceError: 'fatigue_check' is not defined","level":"error","msg":"error executing JS","time":"2019-09-19T20:04:43+03:00"}

{"assets":["fatigue-check-filter"],"check_name":"check_disk_usage","check_namespace":"default","component":"pipelined","entity_name":"sensu","entity_namespace":"default","filter":"fatigue_check","level":"debug","msg":"denying event that does not match filter","time":"2019-09-19T20:04:43+03:00"}

{"check_name":"check_disk_usage","check_namespace":"default","component":"pipelined","entity_name":"sensu","entity_namespace":"default","handler":"alerta","level":"info","msg":"event filtered","time":"2019-09-19T20:04:43+03:00"}

everything was set up according to examples

Hi @chukynax, can you post your exact entries for the asset, filter, and handler?

---
type: Asset
api_version: core/v2
metadata:
  name: sensu-go-fatigue-check-filter_any_noarch
  labels:
  annotations:
    io.sensu.bonsai.url: https://bonsai.sensu.io/assets/nixwiz/sensu-go-fatigue-check-filter
    io.sensu.bonsai.api_url: https://bonsai.sensu.io/api/v1/assets/nixwiz/sensu-go-fatigue-check-filter
    io.sensu.bonsai.tier: Community
    io.sensu.bonsai.version: 0.2.1
    io.sensu.bonsai.namespace: nixwiz
    io.sensu.bonsai.name: sensu-go-fatigue-check-filter
    io.sensu.bonsai.tags: eventfilter
spec:
  url: https://assets.bonsai.sensu.io/82dc07cb79697eb041f731f9de748c4320aec07a/sensu-go-fatigue-check-filter_0.2.1.tar.gz
  sha512: 7fd5343fc1feee9277d012221df90412ab5e30287e8bf9b0fd94475f59997baec96b37412522fe3291f1fba64dd3cb9c1ffe3248a261ea72b984342a88bae10c
  filters: []

You reference the "runtime_asset" for the filter as "fatigue-check-filter", but it doesn't appear that the asset is named that way.  It's named "sensu-go-fatigue-check-filter_any_noarch" per the snippet below.  Make sure that the names line up so that the asset will be downloaded.
---
type: Asset
api_version: core/v2
metadata:
  name: sensu-go-fatigue-check-filter_any_noarch

That would account for this error (the first one you listed):
{
  "asset": "fatigue-check-filter",
  "component": "asset-manager",
  "level": "info",
  "msg": "asset does not exist",
  "time": "2019-09-19T20:04:43+03:00"
}

okay, another error i got
{"component":"pipelined","error":"ReferenceError: 'fatigue_check' is not defined","level":"error","msg":"error executing JS","time":"2019-09-20T16:58:37+03:00"}

Closing due to no further response.


Eq(12) in the paper

hello,thanks for your fantastic work!
I have some questions in the Eq(12), the shape of the former is(b,THW,THW),the shape of the latter is (b,1,THW),how about the addation.  sorry， I don't know whether my understanding is correct or not .
thank you very much!

You are right. As you can see in Fig2. (d), the latter term is first expanded then added to the former term.

You are right. As you can see in Fig2. (d), the latter term is first expanded then added to the former term.

thanks for your reply. Can you tell me how can i expand from one value to THW values.Because i have not found the DNL block.I just found the nl block.
Thank you very much!

It's done by PyTorch automatically.


TLN Update translations

Automated translations update generated using silverstripe/tx-translator

It was failing on "Final Preparation" for something completely outside our control. I reran it and it's green.


[AMP] Disallow fp16 conversion for summation-like ops

Testing fp16 conversion on the EfficientDet D2 model from TF2 detection zoo reveals that ops that involve large summation, like global_avgpool or adaptive_avgpool end up producing nan when done in fp16. To be on the safe side, we should disable these ops for fp16 conversion.
I also disabled sum and mean for the same reason, but avg_pool2d etc are not modified for now.
@AndrewZhaoLuo @comaniac

Hmm, did you get a chance to try FP32 accumulators for these operations @masahi ? If not, no worries but I'm curious if turning that on will make the data loss less.

Hmm, did you get a chance to try FP32 accumulators for these operations @masahi ? If not, no worries but I'm curious if turning that on will make the data loss less.

I haven't, since that would involve non trivial changes to attr/relay/topi that may require further discussion.

Hmm, did you get a chance to try FP32 accumulators for these operations @masahi ? If not, no worries but I'm curious if turning that on will make the data loss less.

I haven't, since that would involve non trivial changes to attr/relay/topi that may require further discussion.

Got it, I actually have time this week so I will take a look tomorrow.

@AndrewZhaoLuo A possible flaky test from test_to_mixed_precision.py: test_let_statement_simple
https://ci.tlcpack.ai/blue/organizations/jenkins/tvm/detail/PR-8810/3/pipeline


Add Scaling Workbook content to website

As previously discussed on IRC between @jnewbery and myself, this PR moves the existing workbook content from https://github.com/bitcoinops/scaling-book to the website repository.  The advantages of hosting via the website are:

More control over how the content is displayed.  E.g., we don't need to include chapter numbers in file/folder names so that they'll sort in the order we want.  This PR uses a toc.yaml file to set the chapter ordering, which can be trivially changed at any time.

This includes the ability to create redirects if we end up moving content

Integration with our existing CI testing.

At a later date, we may also be able to use CI to test creating PDF versions of the workbook.

Easier local previews (at least for people who are already setup to locally preview the site).  For previously-written content, I've had to push to GitHub in order to get a completely accurate preview.

The first commit in this PR ("[Book] Copy content almost verbatim from other repository") copies the content with the minimal set of edits necessary to get the tests to pass.  The other edits make the changes described in their commit comments. You can preview the content by visiting /en/scaling/
By default, this PR adds the scaling content to the website without linking to it from other parts of the website, so it should be safe to merge even before we're ready to announce the move.  However, for testing, you can build the website with JEKYLL_ENV=future make preview in order to see where I've added a link to the scaling content from the /en/publications/ page.
This does not add any content from https://github.com/bitcoinops/scaling-book/pull/24 since that is still under review.

Concept ACK!
I've done a few builds of master and this branch, and this doesn't seem to increase build times.

Addressed (hopefully) all @jnewbery feedback (thanks!).

Concept ACK
Lightly tested.
Great initiative, @harding !


Pre

Sorry about the noise -- I meant to go in the other direction to get my fork synchronized to yours.


can you adding autotheme false/true to android?

Hey! @agungs17 what do you mean? Having the light theme no matter phone's mode?

Hey! @agungs17 what do you mean? Having the light theme no matter phone's mode?

I need theme mode to turn off and on light and dark mode or other options such as changing background color, text color, etc.

I need theme mode to turn off and on light and dark mode or other options such as changing background color, text color, etc.

I'll label it as enhancement. Let me see what I can do.

I'll label it as enhancement. Let me see what I can do.

thankyou bro @gusparis

thankyou bro @gusparis

any update?

Hey! how's it going? it's been crazy these couple of weeks. Have a lot of issues reported on the lib that I couldn't take care of. I will work on them this week for sure.

:tada: This issue has been resolved in version 1.6.4 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Added extra keyboard mode to enable caps-lock defined as

LV_KB_MODE_TEXT_UC

Is there a reason why you closed this?

Sorry finger trouble... :-)

Open again now...

Sorry I haven't ever done any of this before, hopefully I have done it correctly!
Cheers,
Pete

Sorry I haven't ever done any of this before, hopefully I have done it correctly!

Perfect, thank you! :slightly_smiling_face:
I'm just thinking about LV_KB_MODE_TEXT_UPPER might be more intuitive. What do you think?

Sorry I haven't ever done any of this before, hopefully I have done it correctly!

Perfect, thank you! 🙂
I'm just thinking about LV_KB_MODE_TEXT_UPPER might be more intuitive. What do you think?

Totally agree...  Have pushed change... :-)

Merged, thank you! :slightly_smiling_face:


Add header description

Maybe good idea for return successCodeDescription. For 204 code or other code?

@gulivero1773 It's not obvious but you can include your success descriptions in errorDesrcriptions dictionary
It's a naming problem, I should rename errorDesrcriptions to responseDescrptions


Need to transition my company to new owner

@egdelwonk The owner of our company on Nashdev Jobs is no longer with the company. What is the process to transition our company/listings to my email?

Shoot me the company name (and id on nashdev if you have it) and i'll update.

Concert Genetics (https://jobs.nashdev.com/company/32)
My email on nashdev is<EMAIL_ADDRESS>

Should be updated now.

Thanks!


tests: 🧨 mock consensus exercises staking component

in #3588, we are building testing facilities for our App. we should write tests using the mock consensus engine that exercise the staking component.
we should write a test (or collection thereof) that performs the following:

start with a single validator, using the auto_app_state flow
run the chain for 1000 blocks
make a tx that defines a new validator, register its consensus signing key with the engine
after executing (3), check that:

4a. the validator appeared on chain in the defined state

"this is a negative test: we want to make sure that just because someone defined a validator, we don't actually do anything in the staking component's logic"

4b. the validator set did not change ("defined" validators don't affect staking logic)

make a tx that delegates more than the minimum amount (where is this defined?) to the new validator
after executing (5), check that:

6a. no changes to the validator set occur immediately

"this is another negative test, we want to be checking that (un)delegations are queued for the epoch transition rather than being effected immediately"

run to the end of the epoch (can hardcode or check epoch length), then check

7a. the validator becomes Active (it will probably skip Inactive because only one other validator)
7b. the two validators have different exchange rates

"this is also a negative test, we want to make sure that the validator exchange rate mechanism is actually doing stuff, we expect that the two validators would have different rates because the second validator is created later and the chain has already "warmed up" and run through a few epochs"

run 1000 blocks into the future, then check

8a. the new validator's uptime is being tracked correctly

"check that the mock engine is actually feeding correct-enough information to the application. the validator uptime is recorded by the app based on what validators were recorded as signing the block. i would expect there would be failures here when we first write this, and that resolving them would require co-development of the mock engine and the test. this will be a site of requirements discovery"

make a tx that undelegates some of the delegation tokens
after executing (9), check that:

10a. the client gets unbonding tokens
10b. the validator's voting power does not change immediately

run to the end of the epoch, then check

11a. the validator's voting power has decreased
"(10a/b,11a) are again checking that undelegations are only processed at epoch boundaries"

run forward for the length of the unbonding period
make a tx that claims the unbonding tokens
after executing (12), check that:

14a. the client gets staking tokens out

#3588
#3845

xref #4009

updated the description of this issue to represent a checklist, to better track incremental steps towards completion. with #4001 merged, we are now progressing to the exciting stages of this work. :tada:

#4030 may conflict with work on 8a.

this work is now complete. there is certainly more coverage that we can continue to write in the future, but for now we have working examples of exercising the application's staking component. :tada:


Release on brew

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

I want to use homebrew to download
Describe the solution you'd like

want to be able to run the command brew install kubesess
Describe alternatives you've considered

Adding arm binary to releases helps a bit
Additional context

[x] Upload formula
[x] Make it a bottle
[ ] Include alias and completion

When above 75 stars we can add this formula
class Kubesess < Formula
  desc "Manage multiple kubernetes cluster at the same time"
  homepage "https://rentarami.se/posts/2022-08-05-kube-context-2/"
  url "https://github.com/Ramilito/kubesess/archive/refs/tags/1.2.2.tar.gz"
  sha256 "237836053935a352bc61f362d1d2fd1892b0b1f49838b3c294ed1d81922d9328"
  license "MIT"

  depends_on "rust" => :build
  depends_on "kubernetes-cli" => :test

  def install
    system "cargo", "install", *std_cargo_args
  end

  test do
    shell_output("#{bin}/kubesess -v kubesess-test context")
    assert_predicate testpath/".kube/cache/kubesess-test", :exist?
  end
end

Steps to take:
brew create --rust https://github.com/Ramilito/kubesess
use the formula above
brew install --build-from-source Kubesess
brew audit --strict --new-formula --online kubesess

Reached 76 stars.. can create the brew package now :)

I think the repo was created 24 days ago, so 6 days left :(

PR up on brew, waiting for approval!
https://github.com/Homebrew/homebrew-core/pull/109171

It's now sort of in brew, It can be installed with:
brew install --build-from-source kubesess
This still requires you to manually download and source the two scripts needed, I'm working on including them and to make it possible to just type brew install kubesess
Note
If anyone does use the --build-from-source option, remember that you need the scripts from the same version that's on brew!

Submittet a new PR:
https://github.com/Homebrew/homebrew-core/pull/109456

kubesess is now available on brew!
Updated readme to highlight one issue with the script for those that don't have completion setup.


Take invalid 'value' prop off TextInputWrap (div)

☝
We weren't using it as a prop in the styled-component and it is invalid to have value as an attribute on a div.

Accidentally pushed figcaption changes into this PR. I've reverted them and force pushed the undo.


Ovh logs

This PR adds support for a ovh_log_self table.
It fetches logs for previous API calls made in OVH Public Cloud API with one's own account, using this endpoint.

There might be some design conventions errors as I am new to steampipe development
in order to fetch the logs, i type casted the LogId from int to string to use pre existing methods

Hi,
Thanks for your contribution. I'll test it later.

Hi,
I tested it, works fine, good job. Once you fix the typo in the doc I'll merge and release a new version.

Merged in ad3573f5854b13aeb0ec1c5307ae7f07f400d09d. Thanks!


specifying max parallel jobs on create-release

Related issues

https://github.com/paketo-community/ubi-base-stack/issues/32

Summary

Sets the parallel jobs that should run concurrently on push image workflow as the network cant handle it.
Use Cases

Checklist

[x] I have viewed, signed, and submitted the Contributor License Agreement.
[x] I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
[x] I have added an integration test, if necessary.
[x] I have reviewed the styleguide for guidance on my code quality.
[x] I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@mhdawson I havent tested the PR as it requires some amount of work in order to setup a dockerhub registry. But i think its safe to merge. Let me know if i should do otherwise.


Notebook 4/5

I suggest a significant change in notebook 4 (may affect notebook 5 too).
First I would like to avoid the usage of the MSM method 'coarse_grain' because that currently just calls a HMM estimation. We haven't implemented any real MSM-based coarse-graining, it is really a new estimation, and should better be accompanied by ITS, CK-test etc. So I suggest to postpone the computation of a coarse-grained transition matrix to notebook 5 and make notebook 5 part of the standard set of notebooks.
Notebook 4 can and should include PCCA (computation of metastable sets). We just can't use it to compute a coarse-grained transition matrix yet. But we can compute mfpts, equilibrium probabilities, representative structures etc.
Then I am missing TPT. TPT can be done on the metastable sets without having a coarse-grained transition matrix, because the flux can be coarse-grained. So I suggest that goes into notebook 4.
Generally NB4 is quite complex and has very extensive code cells. Think of breaking them into pieces, maybe break the whole notebook into two notebooks if needed.
Finally the visualization of the four Alanine dipeptide structures is not very useful. Maybe someone with an eye for molecular structures can revise that.

Finally the visualization of the four Alanine dipeptide structures is not very useful. Maybe someone with an eye for molecular structures can revise that.

@franknoe could you please elaborate what do you mean by usefulness? @gph82 and I have created this representation. We only visualize the backbone, as the discretization only uses the backbone interactions and for the sake of simplicity. When we show all the atoms it is quite a mess.


Covinience of the reduce?

Is there any convenience or thought about putting the $reduction as the last argument in the function that take reduce_right|left?

Maybe I misunderstand you but it should be like that already:
$callback($value, $index, $collection, $initial);

I meant : Why the $initial|$reduction is a the last argument of the function? Any thought why the notation is not: $callback($initial, $value, $index, $collection), which to me is more convenient for most operation that could involve reducing without retyping all the arguments every time I need to use.
Are you assuming that the $index and the $collection are more useful?

@jbeja ah, thanks for clarifying, misunderstood you! The reason is consistency with the other functions, where the callee signature is always $callback($value, $index, $collection). That’s why I went with adding $reduction as the fourth argument.

As changing it would be a B/C break I will close this issue. Hope that’s understandable.

Ah, this library is awesome other than this.
Typical reduce/fold implementations take a callable with the following signature, where a and b are any types:
(initial: a, item: b): a

This does break consistency with other callbacks but that's intentional. In most cases, e.g map and filter, those functions are used with a unary function. With reduce, it takes a binary function. For reduce to behave as expected, imagine PHP had a function equivalent for every binary operator:
reduce_left([1, 2, 3], 'add', 0) == 6
reduce_left([1, 2, 3], 'mul', 1) == 6

In this case, for the usability and soundness of the reduce_* functions, you should perhaps reconsider the BC change so that it's consistent with typical reduce/fold implementations. The justification for this is that reduce/fold should act as if interleaving operators that have a Monoid structure:
reduce_left([1, 2, 3], 'add', 0) == 0 + 1 + 2 + 3
reduce_left([1, 2, 3], 'mul', 1) == 1 * 1 * 2 * 3

Perhaps, so as not to break BC compatibility, you could introduce fold_left and fold_right that does exhibit this behaviour? If I need reduce a collection, the first port of call is the docs to see whether the language/library is using the name reduce or fold.


KeePass plugin KPEnhancedEntryView: Add version 2.4.1

Closes #7319
I changed the manifest name from the proposed keepass-plugin-kpenhancedentryview to keepass-plugin-kpenhentryview.json to match the name of the repository on SourceForge kpenhentryview.

/verify


Add to the Contributions

Unique programs in various languages are welcome.
Music lover? Add lyrics.

Hey, I want to contribute. Please assign me!!

Hello @sakshian , I'll like to take part in this.

I want to contribute as well

I would like to contribute too, please.

Please merge my pr @sakshian

hello @sakshian, I want to contribute too. please assign

I would like to contribute to this.


proposal: cmd/compile: expose -ptabs flag to force compiler to emit ptabs

Currently compiler only emits ptabs for package main with -dynlink, for -buildmode=plugin. Access to type information for package exports may be useful in other contexts, and is a fairly unobtrusive change.

CC @golang/runtime

Is this a format that we want to commit to supporting forever?

Good question, not sure if it's aimed at me though...? Do all gcflags fall under the compatibility guarantee? This doesn't change any behaviour in the current compiler, and I don't see how it differs from other flags like Debugpcln...

The compiler flags don't fall under the compatibility guarantee, but still once we start supporting something it's hard to stop.

Could you explain more of your use case? I think what (and whether) to emit and the format would depend on how the data will be consumed. Thanks.

I thought I'd submitted my reply to Keith but just noticed it was still in draft

Thanks--can you copy that text to this issue?

Sure, I’ve been working on a JIT compiler (https://github.com/eh-steve/goloader/tree/jit/jit#usage-and-configuration) which can build, load and unload arbitrary Go code and its dependencies from a running host binary, using the standard go toolchain (but bypassing the final link step - it uses archives directly from the compiler). It differs from std plugin because code can be unloaded/replaced, symbols are deduplicated across the host binary and the JIT code where possible, and it works with or without CGo (no dependency on libdl).
My (unsatisfying, but working) approach so far has been to first parse the JIT package and use the *syntax.FuncDecl and *syntax.VarDecl nodes to find all exports, and generate a function for each export to retrieve its *_type via reflection, and writing this temporary generated file into the package before actually compiling. This requires the package source path to be writable, and to ensure this is possible, I introduced a bunch of unnecessary module copying.
Since this is an optional gcflag, it doesn't change the current compiler behaviour except when set, and doesn't prevent linker deadcode elimination, except for selected packages where the flag is set.
I think the previous proposal wanted to always export ptabs for all exports in the main binary's moduledata to provide a string-to-function lookup (preventing deadcode elimination) which I agree would be unnecessary.

As an alternative, I'd also be happy with a flag to tell the compiler to emit type data for global functions by skipping the ir.PFUNC check in cmd/compile/internal/gc.dumpGlobal(), if we wanted to avoid depending on the ptab binary format.

dumpGlobal just affects DWARF. Is that all you need?

dumpGlobal just affects DWARF. Is that all you need?

For my particular use case, I think so?
As far as I can tell, dumpGlobal still forces the inclusion of the runtime types into the archive because TypeLinksym() is called, and this ties the type symbol and global symbol together (via GoAuxType) in a way I can reconstruct an interface{} from, though I haven't tested this end to end yet.
This would need to run dumpGlobal on Exports as well as Externs though, and would need to handle the possibility of inclusion of duplicate symbols.
If you think that's a less contentious approach, I'm happy to adjust the proposal?

Following up on this, I don't actually need to dumpGlobal at all since I don't use the DwarfGlobal, I think I'd just need this inside a conditional at the top of dumpdata():
	for _, export := range  typecheck.Target.Exports {
		s := export.Linksym()

		if strings.HasSuffix(s.Name, "..inittask") && s.OnList() {
			continue
		}

		s.Gotype = reflectdata.TypeLinksym(export.Type())
	}


Request for termination, cache implementation examples

Having fun with your library for a few days. However a bit overwhelmed by abstractions and customization abilities). A few suggestions would be helpful:

How to gracefully shutdown a server. I'm using following approach (http_server_coro_ssl.cpp example, all the code encapsulated into the Server class):

class Server {
public:
   Server(...) {
      //do initialization stuff from http_server_coro_ssl.cpp main()
   }
   ~Server() {
      // Is this correct? Do I need to close active sessions? Can I close sockets from other (main) thread?
      m_ioc.stop();
      for (auto & t : m_threads)
	t.join();
   }
protected:
   //do_listen(), do_session(), handle_request() handlers
private:
  std::vector<std::thread> m_threads;
  boost::asio::io_context m_ioc;
  ssl::context m_ctx;
}

How to properly terminate a server with fatal exception. Currently I came to the following solution (modified http_server_coro_ssl.cpp example):

static std::promise<void> terminate_promise;
static std::future<void> terminate_future = terminate_promise.get_future();
void do_listen(...) {
    try {
        //trying to listen
    } catch (...) {
      terminate_promise.set_exception(std::current_exception());
   }
}

void sig_term_handler() {
   terminate_promise.set_value();
}

int main(int argc, char* argv[]) {
  try {
    // create context, load certificates etc.

    std::vector<std::thread> v;
    v.reserve(threads);
    for(auto i = threads - 1; i >= 0; --i)
        v.emplace_back(
        [&ioc]
        {
            ioc.run();
        });
    // ioc.run(); // NOT launching io on current thread
    terminate_future.get();
    return EXIT_SUCCESS;
  } catch (...) {
      std::cerr << "terminate with exception";
      return EXIT_FAILURE;
  }
}

Is there any reasoning behind using error_codes instead of exceptions in examples (in http_server_coro_ssl.cpp do_session(), do_listen() specifically) ?

What is the best place to implement a cache. I would like to prepare an object, which will be the most ready for sending over network. I have all the data, which will not change (neither headers nor body). Memory space is not a concern.

Excuse my ignorance in HTTP details, but do I need to activate deflation explicitly? I assume I need to use /boost/beast/zlib/deflate_stream.hpp. Is there any example? Can I cache deflated response?

How to gracefully shutdown a server

Well that depends on how you define "graceful." A truly graceful shutdown would work as follows:

The listening socket is first closed, to prevent new connections
Responses already being sent are allowed to continue
Any new requests get an HTTP 503 Service Unavailable response with "Connection: close" (and the connection is closed afterwards)
Any idle connections are closed after 15 seconds
After all connections are closed the program exits normally, invoking destructors

This is a real pain to implement especially when the server is multi-threaded, which is why I have not included it in the examples.

Is this correct? Do I need to close active sessions? Can I close sockets from other (main) thread?

The code you provided will not work correctly. You need to first close the listening socket (to prevent new sessions) then loop over each session and call cancel on the socket. Asio sockets are not thread-safe, so you need to make the call to cancel from the strand using boost::asio::post:
// Without strand
boost::asio::post(
    socket_.get_executor(),
    [&]()
    {
        socket_.cancel();
    });

// With strand
boost::asio::post(
    socket_.get_executor(),
    boost::asio::bind_executor(
        strand_,
        [&]()
        {
            socket_.cancel();
        }));

After you call cancel on each socket, then you can just join all the threads. You do not want or need to call stop on the io_service. Pending I/O operations will complete with error::operation_aborted and lead to the destruction of the session. When all the sessions are destroyed the threads will exit, since there is no more pending work.

How to properly terminate a server with fatal exception. Currently I came to the following solution (modified http_server_coro_ssl.cpp example):

I do not understand what you are trying to do there. You want to handle exceptions? You want to cause the app to terminate by throwing an exception?

Is there any reasoning behind using error_codes instead of exceptions in examples (in http_server_coro_ssl.cpp do_session(), do_listen() specifically) ?

The examples are meant to illustrate a variety of uses, so I have included examples with use exceptions simply to show that it is possible. Personally I prefer to use error codes since they work better with asynchronous code.

What is the best place to implement a cache. I would like to prepare an object, which will be the most ready for sending over network. I have all the data, which will not change (neither headers nor body). Memory space is not a concern.

The best "place" to implement a cache, or anything, is in your code. I don't understand what you're asking here.

Excuse my ignorance in HTTP details, but do I need to activate deflation explicitly? I assume I need to use /boost/beast/zlib/deflate_stream.hpp. Is there any example? Can I cache deflated response?

Beast only handles the chunked Transfer-Encoding, and then only when it appears last in the list of encodings specified in the "Transfer-Encoding" field value. Anything else is up to you. You can use deflate_stream.hpp but note that it does not handle the gzip wrapper (this will be added in a future version of beast). Yes you should be able to cache compressed content bodies.

Thank you very much for detailed answers!

How to gracefully shutdown a server

Well that depends on how you define "graceful." A truly graceful shutdown would work as follows:

Yes. That is exactly what I meant. Very informative instructions.

How to properly terminate a server with fatal exception. Currently I came to the following solution (modified http_server_coro_ssl.cpp example):

I do not understand what you are trying to do there

I was asking about passing notifications from inside the server (threads) to notify the main program to close the server. Knowing the way of terminating the server somewhat clarifies this question also.

Is there any reasoning behind using error_codes instead of exceptions in examples (in http_server_coro_ssl.cpp do_session(), do_listen() specifically) ?

Personally I prefer to use error codes since they work better with asynchronous code.

It would be helpful to know the benefits of using error codes and caveats of using exceptions in listen() and accept() coroutines to not face any difficulties in future.

What is the best place to implement a cache.

The best "place" to implement a cache, or anything, is in your code. I don't understand what you're asking here.

Basically I was asking whether it's possible or makes sense to store serialized response (body + headers) or deflated body. I will go with serialized [deflated] body.

I was asking about passing notifications from inside the server (threads) to notify the main program to close the server. Knowing the way of terminating the server somewhat clarifies this question also.

You don't need to notify the main program to close the server. Instead, just take steps to make io_context::run return. And make sure that your main thread is calling io_context::run. If you close the listening socket and let all connections be destroyed, then there will be no more work remaining and your program will just naturally terminate.

It would be helpful to know the benefits of using error codes and caveats of using exceptions in listen() and accept() coroutines to not face any difficulties in future.

It all depends on your style. I find errors easier to code. Some people like exceptions though. I think exceptions are better in client code. But error codes are better in servers.

Basically I was asking whether it's possible or makes sense to store serialized response (body + headers) or deflated body. I will go with serialized [deflated] body.

If you can store a complete message with the headers already set, that would be best since you can avoid allocating and setting the headers on every response. Otherwise, caching the serialized body is also a good choice. You can create your own Body type, for example to implement a "shared body" (one that can be attached to multiple messages). The documentation explains how to do this:
http://www.boost.org/doc/libs/master/libs/beast/doc/html/beast/using_http/custom_body_types.html
This video also helps:
https://www.youtube.com/watch?v=WsUnnYEKPnI

You don't need to notify the main program to close the server... make sure that your main thread is calling io_context::run

If I want to integrate a web server functionality into the system, I would like to leave main thread to do other stuff and shutdown server independently from other parts without terminating the whole application. But I think I have enough information to terminate it correctly now.

It all depends on your style.

If I can just switch to exceptions and there are no edge cases in handling them, then... it's great.

If you can store a complete message with the headers already set, that would be best since you can avoid allocating and setting the headers on every response

Yes, that's what my initial question was about and it's great that both options are possible.

This video also helps: https://www.youtube.com/watch?v=WsUnnYEKPnI

I already watched the video. It was very helpful and the most important and useful aspect for me was the reasoning behind the abstractions.

If I can just switch to exceptions and there are no edge cases in handling them, then... it's great.

Well if you are using asynchronous I/O the errors are always delivered to the callback via error_code so you have less choice there.

If I can just switch to exceptions and there are no edge cases in handling them, then... it's great.

Unfortunately, composed asynchronous operations in both Beast and ASIO currently only provide a Basic Exception Guarantee. This means that if an exception is thrown and it interrupts such an operation, then it will never complete and the top level context has no way of determining (unless the exception has the information), which connection the exception was related to and might not be able to clean up properly (assuming you want to eat the exception, close the connection and continue running).
It should be noted, though, that as long as you use the Beast provided async operations and DynamicBuffers, then it's much harder for you to run into this issue, because at the point your Handler throws, the operation is already completed anyway and the contract of the async operation has been fulfilled by then.

How to gracefully shutdown a server. I'm using following approach (http_server_coro_ssl.cpp example, all the code encapsulated into the Server class)

While this is not graceful at all, you can terminate your server by calling stop() on the io_context and then joining all the threads. Once the io_context goes out of scope, its destructor will destroy all coroutines (but in this case, your code must gracefully handle stackful coroutine forced unwind), which will result in all resources being cleaned up (assuming your code conforms to the RAII idiom and ownership of all connection related resources is retained on the coroutine stack).

While this is not graceful at all, you can terminate your server by calling stop() on the io_context and then joining all the threads.

Are you sure about that? What happens to sockets with pending I/O?

@djarek ping

@vinniefalco
If there's a pending I/O operation, the CompletionHandler will be destroyed (without being executed) within the platform specific reactor's shutdown() function in the io_context's destructor (this implies that the CompletionHandler destructor must destroy the socket, because an I/O object must not outlive its associated io_context).

This opens up new possibilities for implementing timeouts and graceful shutdowns, thanks! I'll go ahead and close this, feel free to open a new issue if you need additional help.


[feat request] Let network connection of the Launcher go through system proxy

Is your feature request related to a problem? Please describe.
When the launcher downloads necessary configuration files, it seems to be downloading from abroad CDN servers, and the network speed rate was slow (in Jinan, Shandong, China, it's likely 3.5KB/s~30KB/S)
Describe the solution you'd like
Let network connection of the Launcher go through system proxy
Describe alternatives you've considered
Add a new CDN node that's nearer to China Mainland, and switch to the nearest CDN node automatically when the launcher is going to download some configurations.
Additional context

Add a new CDN node that's nearer to China Mainland, and switch to the nearest CDN node automatically when the launcher is going to download some configurations.

哥们没有银子这是主要问题


GPIB-462

add QRCode on the verify email page

just make PR draft, can reopen when idem go alive

Will need the to add REACT_APP_IDEM_URL in the .env example too.


example service monitoring updated with missing config

added service account, role and role binding for the prometheus frontend
example, also updated prometheus to use the correct service account
fixes #1049

Thanks! :+1:


Enable --transducer extension for ROCm

There are five transducer extension unit tests skipped on ROCm. Please refer to https://github.com/ROCmSoftwarePlatform/apex/issues/89 for the details.

test_transducer_joint_pack_relu_dropout (test_transducer_joint.TransducerJointTest)
test_transducer_joint_relu_dropout (test_transducer_joint.TransducerJointTest)
test_transducer_joint_vec_pack_relu_dropout (test_transducer_joint.TransducerJointTest)
test_transducer_joint_vec_relu_dropout (test_transducer_joint.TransducerJointTest)
test_transducer_joint_pack_relu (test_transducer_joint.TransducerJointTest)

jenkins: retest this please

jenkins: retest this please

jenkins: retest this please

test_transducer unit test results:
----------------------------------------------------------------------
Ran 17 tests in 5.940s

OK (skipped=6)


Reduce the amount of argument checking by flattening the call graph.

Reduce the amount of duplicate argument checks by flattening the call graph a bit

What are you saving? The null checks on response and file, and maybe one duplicate call to CheckRange? I'm not sure why you bothered.

@Tratcher I'm planning to use these methods from StaticFiles. I'm just cleaning up the current codez a bit before I make more changes.


[auto-merge] branch-22.02 to branch-22.04 [skip ci] [bot]

auto-merge triggered by github actions on branch-22.02 to create a PR keeping branch-22.04 up-to-date. If this PR is unable to be merged due to conflicts, it will remain open until manually fix.

FAILURE - Unable to auto-merge. Manual operation is required.
{'message': 'Pull Request is not mergeable', 'documentation_url': 'https://docs.github.com/rest/reference/pulls#merge-a-pull-request'}

Please use the following steps to fix the merge conflicts manually:
# Assume upstream is NVIDIA/spark-rapids remote
git fetch upstream branch-22.02 branch-22.04
git checkout -b fix-auto-merge-conflict-4705 upstream/branch-22.04
git merge upstream/branch-22.02
# Fix any merge conflicts caused by this merge
git commit -am "Merge branch-22.02 into branch-22.04"
git push <personal fork> fix-auto-merge-conflict-4705
# Open a PR targets NVIDIA/spark-rapids branch-22.04

IMPORTANT: Before merging this PR, be sure to change the merging strategy to Create a merge commit (repo admin only).
Once this PR is merged, the auto-merge PR should automatically be closed since it contains the same commit hashes

I will take care of this later