this.$el and this.$refs not populated in mounted() hook on first client-side page render

When navigating to a page on the client side, if the page is being navigated to for the first time from the client side and if the root element of the page being navigated to is another component, then this.$el in the page component is a comment instead of the other component and this.$refs is an empty object when accessed in the mounted() lifecycle hook.
Versions

nuxt: v2.15.3
node: Not sure how to check this in Code Sandbox...

Reproduction

Link to Code Sandbox where you can see the issue.
Load the /about page first (refresh if needed to ensure the /index page has not been loaded from the client side) and then navigate to the /index page so that it is being rendered on the client for the first time.
Steps to reproduce

Create a pages/index.vue file with the following code:

<template>
  <Dummy refs="dummy" />
</template>

<script>
export default {
  mounted() {
    console.log("index", this.$el);
    console.log("index", this.$refs);
  },
};
</script>

Create a pages/about.vue file with the following code:

<template>
  <NuxtLink to="/">To Index</NuxtLink>
</template>

Create a components/Dummy.vue file with the following code:

<template>
  <NuxtLink to="/about">To About</NuxtLink>
</template>

<script>
export default {
  mounted() {
    console.log("dummy", this.$el);
  },
};
</script>

Run the project, and from the client start on the /about page first.
Navigate to the /index page. Note in the console that in the mounted() lifecycle hook in index.vue, this.$el is a comment and this.$refs is an empty object.

What is Expected?
As far as all Vue documentation seems to indicate, by the time mounted() is called this.$el should be the DOM element at the root of the template or the Vue component at the root of the template, and this.$refs should be populated. In a project I'm working on, I need to access this.$el in the mounted() hook, but since it is a comment I am not able to.
What is actually happening?
When navigating to a page on the client side, if the page is being navigated to for the first time from the client side and if the root element of the page being navigated to is another component, then this.$el in the page component is a comment instead of the other component and this.$refs is an empty object when accessed in the mounted() lifecycle hook.

I did some more digging on this and discovered that if you remove components: true from nuxt.config.js and then manually import the Dummy component, everything works fine.
After reading this StackOverflow answer, I suspect this may be because the components are imported differently in v2 of @nuxt/components. I recently upgraded from Nuxt v2.14 to v2.15 and only then did I start seeing this issue. Can anyone confirm that this is indeed the problem?

I love Nuxt, and it's a shame I can't take advantage of the components: true feature. For now it seems I'll have to manually import all components across my application to ensure reliable mounting behavior.

I love Nuxt, and it's a shame I can't take advantage of the components: true feature. For now it seems I'll have to manually import all components across my application to ensure reliable mounting behavior.

I found this https://github.com/nuxt/nuxt.js/issues/8879. FYI.

#8879

This solved my problem.
What do you think about update docs?

@liqueflies It's not guaranteed to work - and we're currently waiting on vuejs/vue#11963 which will solve the issue properly.

Closing since is duplicate of #8879. Explanation and workarounds: https://github.com/nuxt/nuxt.js/issues/8879#issuecomment-784172819
Also for clarification vue/11963 won't solve this issue.

@pi0 I don't think that other issue exactly matches this one. As you shared, it does make senses for $refs to be empty until the component is rendered, but I'm seeing$el is also not the correct value. Per the Vue docs, the mounted() hook is called "after the instance has been mounted, where el is replaced by the newly created vm.$el." This means that either Vue or Nuxt's behavior is incorrectly documented, because $el should not be an empty comment in the mounted() hook, correct?

Actually, for async components, it is a different story. Until the actual component is being resolved, a placeholder is used in place. Please see this codepen using async components and ref with vue 2.x: https://codepen.io/pi0/pen/BaQEqbL

Options to resolve this issue are:

Not using async components (by using loader: true or directly importing component)
Using a timeout that gives enough windows for render to happen
Use updated instead of mounted

Also related issue: https://github.com/vuejs/vue/issues/2247

Sorry @pi0 and thank you for reply,
can't understand why if I roll back to nuxt 2.14.x is working with components: true and no one of that workarounds.
Is something that should solve maybe at $nextThick but no with timeouts.
This also is breaking functional components I guess.
Thank you!

I would like to propose that this new behavior is potentially very confusing in a number of different circumstances. I just ran into another situation where the usage of async components led to a bug which was very hard to find.
See the Code Sandbox link below for an example:
https://codesandbox.io/s/boring-bassi-et0fb?file=/pages/index.vue
In the example, when the root <Test /> component of the index.vue page is being loaded async, the id attribute on the <Nuxt /> component in the parent default.vue layout does not get added. So any styles that rely on the existence of that particular id do not get applied, and the styling of the page is broken.


Change main entry to index.js and export module name

With this PR it is possible to to do:
import angularXeditable from 'angular-xeditable';

angular.module('app', [angularXeditable]);

and have on less verbose string to worry about in Angular 1 ;)

do all the tests still pass?

I followed https://github.com/vitalets/angular-xeditable/blob/master/CONTRIBUTING.md with node 10 and node 4 on the master branch.
npm run build produces an error  (something about jsdoc) - npm run start works. Some docs tests pass - none of the dev tests do.
So - since the master do not work with my setup - I did not bother to test with this PR.
I cannot see any references to the main entry anywhere in the code though...

Might be the version of npm you have.
When you run the site (http://localhost:8000), does everything still work?

Well - I ran yarn run start and clicked around a little bit. Looked O.K.

I ran the tests with these changes and they all passed.

@madflow thanks for your PR.
Could you also update the Readme here https://github.com/vitalets/angular-xeditable#insert-dependency
I suggest we also switch to this way of importing in our docs https://github.com/vitalets/angular-xeditable/blob/master/docs/js/app.js to prove it works

@eugef The use case for this is only when some kind of asset/module bundling is in place (Webpack, Rollup, Parcel). "Importing" angular-xeditable has always worked - but now it simply exports the module name, too. This is, because Webpack uses the main entry in the package.json file. I can document this in the Readme - no problem. Switching the docs is a story that would exceed my intentions with this PR.

@madflow ok, let's not touch the docs. Thanks for updating the readme.


working parallelization for different OS's

running be_func_parallel (i.e. request >1 nproc) uses multiprocessing.Pool. This has a different default depending on operating system, but only fork works with our code (not spawn, the default with iOS, and maybe not the newer standard forkserver)
To fix, we need to simply specify explicitly that multiprocessing uses fork:
multiprocessing.set_start_method('fork')

Did #75 fully fix this issue for now? If so, we could maybe close this issue.


Launching vanilla Doom (only Doom Core) sandbox hits error

[X] I have searched the FAQ and the documentation for solutions.
[X] I have searched the issue tracker for similar issues (the closed issues too).
[X] I have searched the Discourse for any errors and solutions.
[X] I can reproduce my issue on the latest commit of Doom Emacs.
[X] I have read How to Debug Issues and found no solution.

What did you expect to happen?
When launching an empty sandbox with vanilla Doom (only Doom core), should launch a sandbox emacs with vanilla doom.
What actually happened?
Hit an error when launching the sandbox:
setq: Symbol’s function definition is void: doom-system-cpus

(not sure if there is a way to get backtrace for this?)
Describe your attempts to resolve the issue
Saw https://github.com/hlissner/doom-emacs/issues/4715, thought it might have been related. Updated to latest commit as of writing (https://github.com/hlissner/doom-emacs/commit/ce11a98b70027462f207aadc59d26ca95ca03325), and doom clean and doom sync-ed, but but issue persists.
Steps to reproduce

Open emacs
Open sandbox (SPC h E)
Try to open vanilla Doom (only Doom core) (C-c C-d)

System Information
https://pastebin.com/XcqNAwJH

As of 6d2c6b4 this issue should be resolved. Let me know if that isn't the case and I'll reopen it. Thanks for bringing it to my attention!

Can confirm the fix resolved the issue, thanks!


slowloris defense breaks websockets

This line: https://github.com/boinkor-net/tsnsrv/commit/5e8893178f65d535143d741e34238acb77651b11#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261R249 breaks websocket connections; they just hang in "pending" before transmitting any messages.
Maybe the easiest fix is to have the main server listen without header-reading deadlines, but the slowloris attack mitigation exists for a reason. When we're on the tailnet, the clients are kinda more trusted. But a funnel service would be exposed on the entire internet. Hrm.

I could track down this problem with the following script and using git bisect:
#!/usr/bin/env bash

set -ue -o pipefail -x

DOMAINNAME=foobar.example-com.ts.net

(websocat -s 9090) &
(go run ./ -name foobar -readHeaderTimeout 0s http://<IP_ADDRESS>:9090) &
trap 'exitcode=$? ; kill -9 $(jobs -p) ; killall tsnsrv || true ; exit $exitcode' EXIT

wait_for_it() {
    for i in `seq 1 10` ; do
        curl https://"$DOMAINNAME" && return 0
        sleep 1
    done
}

test_it() {
    timeout 1 websocat wss://"$DOMAINNAME" <<EOF
hi.
EOF
}

wait_for_it
if ! test_it ; then
    exit 1
else
    exit 0
fi


Add profile page & edit settings page

Description
This (larger) PR creates the profile page for a user to find user-specific information, see progress, and edit decks/pins. It sets up the profile page as a container with tabs for specific things (decks). It also creates a review/activity heatmap which is going to be really cool.
Screenshots

YUGE Pull Request.
Great job, this was a big undertaking and stylistically it looks great.
As far as UX there are three things:

Couldn't access the user account page without being logged in using the URL to my account
http://localhost:3000/5b99b9c6d3080f0004730d35/overview

Could we include a preview of the private decks that we have on the Overview page? A lot like what we have on the Pinned Deck section. Feel like it would also be a good place to advertise "Upgrade To Pro" for the users without private decks.

Could we change the URL of the overview page? To make it http://localhost:3000//overview and using that username ID that was there before as their "default" userID until they set it.

@NickEngmann Thanks for checking it 🙏

I was planning to limit the access to the profile page until we fully support public profiles. This work is captured in a separate ticket. How does that sound?

That's probably a good idea. Do you want to include that in this PR or a separate one?

To see your own profile you go to www.flashcardsfordevelopers.com/overview ? We don't have usernames yet but would like to change the url to something like www.flashcardsfordevelopers/@nlaz/overview but we will have to use their userID for now. Does that answer the question?

Dope, sounds good.
I know this PR is already heavy but I think this should be included.
Yeah, something like /@nlaz/overview/ but use whatever their temporary userID is until they set their userID to be @nlaz. This can definitely be a separate PR.


Rails/Date advice changes return value from Date to Time

Expected behavior
Warn the user that their program behaviour may change because of this advice, e.g. arithmetic on time and date objects, or loss of methods like cwday.
The advice should make it clearer that it wants you to stop using Date objects and use Time objects instead, because changing from Date to Time objects changes the object interfaces and method semantics. For instance Date#- is very different from Time#-.
I'd change the suggestion from Time.zone.today to Time.zone.today.to_date and adding some text / link warning about using Date objects.
Actual behavior
The advice makes it sound like you'll still get given a Date object and your program will just work, having extracted the appropriate date from the time-zone.
Steps to reproduce the problem
Use Date.today in your app or tests and run the linter (in Atom in my case).
RuboCop version
0.58.2 (using Parser <IP_ADDRESS>, running on ruby 2.4.3 x86_64-darwin17)

It looks like the implementation of Time.zone.today already returns a Date object. Am I missing something?

Thanks for the sanity check! I think I messed up and typed Time.zone.now somewhere out of habit then didn't spot the difference when debugging.


Uncaught No grammar found for language babel

This happens when I try to restart the kernel (I'm running jp-babel). Everything works fine though (as far as I can tell), it's pretty much a cosmetic thing.
Atom Version: 1.3.2
System: Mac OS X 10.10.5
Thrown From: Hydrogen package, v0.6.5
Stack Trace
Uncaught No grammar found for language babel
At /Users/gnl/.atom/packages/Hydrogen/lib/kernel.coffee:343

undefined

Commands
     -0:46.3.0 vim-mode-plus:move-down (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:42.8.0 hydrogen:show-kernel-commands (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:42.8.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:41.8.0 core:cancel (atom-text-editor.editor.mini.is-focused)
     -0:41.8.0 blur (atom-text-editor.editor.mini.is-focused)
     -0:41.6.0 core:cancel (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:40.8.0 hydrogen:run (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:17.6.0 vim-mode-plus:move-right (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:17.6.0 vim-mode-plus:move-left (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:16.9.0 vim-mode-plus:reset-normal-mode (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
  2x -0:16.7.0 vim-mode-plus:move-down (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
  2x -0:16.4.0 vim-mode-plus:move-up (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:15.3.0 hydrogen:show-kernel-commands (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:15.2.0 blur (atom-text-editor.editor.vim-mode-plus.normal-mode.is-focused)
     -0:14.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)
     -0:14.1.0 blur (atom-text-editor.editor.mini.is-focused)

Config
{
  "core": {
    "openEmptyEditorOnStart": false,
    "projectHome": "/Users/gnl/Documents",
    "disabledPackages": [
      "ide-purescript",
      "language-purescript",
      "language-java",
      "language-go",
      "language-c",
      "language-clojure",
      "language-csharp",
      "language-mustache",
      "language-make",
      "language-perl",
      "language-python",
      "language-ruby",
      "language-ruby-on-rails",
      "language-toml",
      "language-yaml",
      "wrap-guide",
      "tabs",
      "background-tips",
      "welcome",
      "open-on-github",
      "floobits",
      "color-picker",
      "metrics",
      "package-generator",
      "styleguide",
      "linter-elm-make",
      "language-elm",
      "ide-haskell",
      "ide-haskell-repl",
      "ide-haskell-cabal",
      "haskell-hoogle",
      "haskell-ghc-mod",
      "language-haskell",
      "autocomplete-haskell",
      "linter-hlint",
      "haskell-pointfree",
      "spell-check",
      "update-package-dependencies",
      "snippets",
      "asciidoc-preview",
      "hover-tooltips-hdevtools",
      "linter-hdevtools",
      "php-debug",
      "language-swift",
      "linter-swiftc",
      "swift-debugger"
    ],
    "packagesWithKeymapsDisabled": [
      "sensible-tab",
      "last-cursor-position",
      "goto-last-edit",
      "zentabs",
      "external-open",
      "linter-flow",
      "git-diff",
      "git-history",
      "tree-view-git-modified",
      "autocomplete-plus",
      "script",
      "term3",
      "open-on-bitbucket",
      "project-manager",
      "goto",
      "ide-flow",
      "tab-switcher",
      "symbols-view",
      "atom-beautify",
      "scratch",
      "lazy-motion",
      "project-ring",
      "blame",
      "linter",
      "merge-conflicts",
      "clang-format",
      "recent-files-fuzzy-finder",
      "git-plus"
    ],
    "themes": [
      "one-dark-ui",
      "slime"
    ]
  },
  "Hydrogen": {
    "languageMappings": "{\"JavaScript (JSX)\": \"babel\", \"JavaScript\": \"babel\"}"
  }
}

Installed Packages
# User
Hydrogen, v0.6.5
atom-fuzzy-grep, v0.9.0
atom-ternjs, v0.12.1
clip-history, v0.1.12
cursor-blink-interval, v0.3.1
cursor-history, v0.5.9
external-open, v0.6.1
file-icons, v1.6.13
git-diff-details, v0.21.0
git-history, v3.2.0
hyperclick, v0.0.35
ide-flow, v0.8.0
imdone-atom, v1.3.14
js-hyperclick, v1.4.1
language-asciidoc, v0.12.0
language-javascript-semantic, v0.2.1
lazy-motion, v0.1.16
linter, v1.11.3
linter-eslint, v5.2.6
linter-flow-plus, v3.1.0
linter-phpmd, v1.3.2
mac-fix-path, v0.0.0
open-on-bitbucket, v0.4.0
package-settings, v1.0.1
package-sync, v1.0.0
pigments, v0.19.3
project-folder, v0.1.8
react, v0.12.10
recent-files-fuzzy-finder, v0.2.4
remember-file-positions, v0.2.1
scratch, v0.3.1
slime, v1.4.0
split-diff, v0.5.0
symbol-gen, v1.0.0
tab-switcher, v1.3.3
tablr, v0.9.0
tabs-to-spaces, v1.0.1
vim-mode-plus, v0.10.1
zentabs, v0.8.6

# Dev
No dev packages

@gnl Interesting. I'll investigate this. Never caught the same

This is from https://github.com/willwhitney/hydrogen/blob/master/lib/kernel.coffee#L346
We need to include a reverse lookup for user-specified language mappings. He's got a mapping from "JavaScript" to "babel", so when we look for a grammar called "babel" in Atom, it can't find one.

Setting languageMappings to { "babel": "javascript" } should fix this issue.
@gnl Please, feel free to reopen if the above doesn't work for you.


Upgrade to solr 5

Upgrade lucene/solr to 5.0.0.

Please also release this to maven central. Because this is an incompatible change I'd suggest to increase the major version and release it as 2.0.0 (at least the lucene and solr modules).

Merged into branch 'solr5' (as version 2.0.0)

Thanks! Are you going to release this version?

Yes, see https://bintray.com/renekrie/maven/querqy v1.2.0 (Solr 4.10.x) and v.2.2.0 (Solr 5)

Great, thanks!


Group workspaces by icon type in list view

With multifolder support an additional grouping would not look great. Put on hold until later


error message using shovel or tunnel

When using shovel or tunnel, I got an error message then the program stop.
For example, using shovel <deck file> then the first choice 1) Start the review, it shows the front, then show an error :
Front ==================================================
深い

Try recalling the back of the card.
Once you've tried your best, press Enter to flip the card.

/usr/local/bin/shovel: 246: read: arg count

My current test deck file :
 深い    ふかい profond⋅e, épais⋅se 深い森

My system :
Linux 5.15.39_1 #1 SMP Fri May 13 11:39:37 UTC 2022 VoidLinux GNU/Linux

Hello lambda2501, thank you for trying the project and posting this issue.
Line 246 of shovel is read -r. I think what's going on is that your shell's read implementation requires a variable to be provided, which isn't the case here. On my system, your deck file works fine, since my read doesn't require a variable:

In oksh, which I've been using, it works, but with dash, which I just tried, it doesn't work. To confirm this, try installing the version I made on the standard_read branch:
cd "<the directory you have tunnel in>"
git pull
git checkout standard_read
su -c "cp shovel /usr/local/bin/"

and see if it solves the issue. If it does, I can merge it into the main branch.

It seems to work on my machine, and I haven't received any follow-up from lambda, so I'm just going to merge it and close this issue. Feel free to open it back up if, after updating, you're still encountering the problem.

(Since it's in the main branch, you can just git pull from your original installation. The default_branch has been deleted.)

https://github.com/michaelskyba/tunnel/commit/dd4c44347f179dfb45771c728e42d9bd21ff4852


Feature idea: Ban generics.

The language already provide casting. So using object should be enough.

We can just ban C# versions greater than 1.


@Shopify/react-native-skia/web

Built with API compatibility in mind, this should not break any existing ways to use Skia.
Idea
Have a @Shopify/react-native-skia/web import which does not import React Native or Reanimated at all 🎉
This was not possible without removing support for the React Native asset loading logic, so there is also a @Shopify/react-native-skia/react-native-web package which still allows you to import assets RN-style. You would use this if you also use React Native Web, hence this name. If you use @Shopify/react-native-skia/react-native-web, you still need the Webpack override.
This will make RN Skia more plug and play on the web, because less Webpack configuration is needed. Granted you still need an override for CanvasKit.wasm, but maybe in the future with canvaskit-js, we can support the web with no config.
Why
Currently, using it on the Web has friction:

Importing @Shopify/react-native-skia/src/web as a TSX file is uncommon on the web and may require configuring the bundler to transpile it.
In my case, it causes a type error because TypeScript wants to typecheck @Shopify/react-native-skia/src/web.ts, even though it is in node_modules and skipLibCheck is enabled. Skia source files becomes part of the user TypeScript project. Only way to get rid of the error for me was to use a .js extension.
Webpack override is necessary to disable React Native imports. Those shouldn't be there in the first place.
Webpack override is necessary to configure looking to resolve for .web.ts files. It's uncommon on the web.

How it works
Uses the Bun bundler to bundle both package/src/index.ts and package/src/web.ts into one entry point and removes all RN stuff.
I replace some modules with other ones that I defined to do this. I could have used the .web.ts convention but feared this could break existing Web workflows. This means Web users import everything from 1 entry point:
// Old way (still works):
import {LoadSkia} from '@Shopify/react-native-skia/src/web'
import {Canvas} from '@Shopify/react-native-skia'

// New way (no Webpack override necessary):
import {LoadSkia, Canvas} from '@Shopify/react-native-skia/web';

Those bundles are being placed into lib/web/pure.js and lib/web/react-native-web.js (arbitrary decision).
Two TypeScript files pure.d.ts and react-native-web.d.ts were placed mapping to the type declarations generated from source.
To make the @Shopify/react-native-skia/web import actually work, a web.js and react-native-web.js file was placed in the root of the package. The convention nowadays is to use the "exports" field, but I fear that once React Native is going to add support for it, the React Native version may break (cannot import any modules that are not explicitly defined in "exports"...)
You need bun to create the 2 bundles. It's very fast though (only takes 0.1sec).

This would be great!
is this likely to be submitted soon, even if flagged as 'experimental'?

@feresr yes this is what we are inclined to do. This come with a really big caveat the import name will be different but we are still considering all of our options there.

@wcandillon Yes, asset resolving like in React Native is not supported on @Shopify/react-native-skia/web.
But there is @Shopify/react-native-skia/react-native-web – so if you want to get rid of it on the web, we can just delete this entry point

This is very compelling. I will build a test package from this branch and play with it a bit.
As mentioned, we could ship this into the package as a test and then work our way up on having it the official bundle for web.
Below are some thoughts:

I suggest the following: lib/module/index.js would be the bun generated bundle (so it would keep the name module name). This assume that React Native Web would only be supported with metro. Which I think might be fair tradeoff.
Could we update the plugin to use top level async NativeSetup.ts that would make the CanvasKit loading completely transparent and would be huge improvement for web installation.
is it possible to throw an error if bun is not installed on the machine that runs the script?


[Doc improvement][Deploy an app to cloud][2334505]

added link to create and deploy an azure cloud service

Docs Build status updates of commit cdb0fa9:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/toolkit/deploy.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/toolkit/deploy.md
96
1
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.


2.4 - SESSION instead of JSON

It might be more convenient to just work with SESSION instead of JSON.

We would move the JSON to 2.9 and rework the 2.4 for SESSION.
We would need to prepare in advance URL for SESSION cleanup.

As history in gut has shown - this is invalid.


rolo 0.6 dispatching breaks with GenericAlias params

https://github.com/localstack/rolo/pull/14 added native support for Pydantic.
In order to detect Pydantic classes, the annotations / arguments of an endpoint function are traversed here:
https://github.com/localstack/rolo/blob/f3c553df646dedc43052e1a33f9c0bf75dc0875d/rolo/dispatcher.py#L86
Unfortunately, this breaks if you use any types which are not allowed to be used with issubclass like GenericAlias (something like dict[str,str].
This breaks our dependency upgrade in LocalStack, as you can see in  our pipeline run here: https://app.circleci.com/pipelines/github/localstack/localstack/26921/workflows/2d5104c2-600f-43de-a6ad-775f091fe7a2/jobs/229933
Here's a simple reproducer (which doesn't really make sense, but shows the issue):
import pydantic  # noqa
from rolo import Request, Response, Router
from rolo.dispatcher import handler_dispatcher, ResultValue
from werkzeug.serving import run_simple

def foo(request: Request, matrix: dict[str, str] = None) -> ResultValue:
    return Response()

router = Router(dispatcher=handler_dispatcher())
router.add(
    "/",
    endpoint=foo,
)

# convert Router to a WSGI app and serve it through werkzeug
run_simple("localhost", 8080, router.wsgi(), use_reloader=True)

I can add onto that.
The CI failure was related to one router using incorrect typing for the kwargs  argument, using a dictionary instead of a value type. This was an issue which should be resolved with https://github.com/localstack/localstack/pull/11246
I thought that would be one of the only cases where we would use something "a bit wrong" which clashed with this conditional check.
However, looking into how to type kwargs, we can now use typing.Unpack in combination with TypedDict. This also does not work with the conditional check above.
This is the related data, related to PEP692: https://typing.readthedocs.io/en/latest/spec/callables.html#unpack-kwargs
Snippet:
import pydantic  # noqa
from rolo import Request, Response, Router
from rolo.dispatcher import handler_dispatcher, ResultValue
from werkzeug.serving import run_simple

class Test(TypedDict, total=False):
    path: str
    random_value: str

def func(request: Request, **kwargs: Unpack[Test]) -> ResultValue:
    return Response()

router = Router(dispatcher=handler_dispatcher())
router.add(
    "/",
    endpoint=func,
    defaults={"path": "", "random_value": "dev"},
)

# convert Router to a WSGI app and serve it through werkzeug
run_simple("localhost", 8080, router.wsgi(), use_reloader=True)

thanks for the excellent reproducers @alexrashed and @bentsku! added both of them as tests and fixed the issue (or rather - explicitly ignored it for now)


VM/VMSS to support Azure Metadata Security Protocol

Preconditions

Need to release Python SDK support 2023-09-01

Related command
az vm create [--enable-proxy-agent {false, true}]  [--proxy-agent-mode {Audit, Enforce}]
az vm update
az vmss create [--enable-proxy-agent {false, true}]  [--proxy-agent-mode {Audit, Enforce}]
az vmss update
Resource Provider
Microsoft.Compute
Description of Feature or Work Requested
PM doc: https://microsoft.sharepoint.com/:w:/r/teams/CPlat-PM/_layouts/15/Doc.aspx?sourcedoc={DD02825F-7D23-4C67-B21C-6352733A8858}&file=Wire-Server Endpoint Security PM Spec.docx&action=default&mobileredirect=true&share=IQFfggLdI31nTLIcY1JzOohYAV82cMdRnCluKCTcaCyt91E
User can opt-in the Azure metadata security protocol for their VM by specifying the newly introduced VM or VMSS property, thus their VM can be protected from SSRF and Scorpin heart attack to IMDS and WireServer endpoints.
Need to support for vm create, vm update, vmss create, vmss update.
Minimum API Version Required
2023-09-01
Swagger PR link / SDK link
[ProxyAgentSettings swagger by hmyan90 · Pull Request #26145 · Azure/azure-rest-api-specs (github.com)](https://github.com/Azure/azure-rest-api-specs/pull/26145/)
Request Example
VM: https://github.com/Azure/azure-rest-api-specs/blob/c9d9a0180149e72541752672790ed642a439adfa/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-09-01/examples/virtualMachineExamples/VirtualMachine_Create_WithProxyAgentSettings.json
VMSS: https://github.com/Azure/azure-rest-api-specs/blob/c9d9a0180149e72541752672790ed642a439adfa/specification/compute/resource-manager/Microsoft.Compute/ComputeRP/stable/2023-09-01/examples/virtualMachineScaleSetExamples/VirtualMachineScaleSet_Create_WithProxyAgentSettings.json
Target Date
2023-12-30
PM Contact
<EMAIL_ADDRESS>Engineer Contact
<EMAIL_ADDRESS>Additional context
No response

Thank you for opening this issue, we will look into it.

Target Date
2023-12-30

May I ask if this ETA refers to before or around December 30th? We have two close release dates around this time, one is 2023-12-05 and the other is early January 2024, which do you prefer?

This feature is planning to be GA at the end of December, so would need to go to 2023-12-05 release if possible. thanks!

Target Date
2023-12-30

May I ask if this ETA refers to before or around December 30th? We have two close release dates around this time, one is 2023-12-05 and the other is early January 2024, which do you prefer?

This feature is planning to be GA at the end of December, so would need to go to 2023-12-05 release if possible. thanks!

Hi @hmyan90  This new feature appears in the 2023-09-01 version, but the current Comte python SDK does not yet have this version. Could you please release a new version SDK to support it as soon？

 Hi @hmyan90 This new feature appears in the 2023-09-01 version, but the current Comte python SDK does not have this version. Could you please fix the swagger PR(Azure/azure-rest-api-specs/pull/26145]) to generate python SDK and release new SDK as soon?

@grizzlytheodore can we check when Python SDK will be released?

 Hi @hmyan90 This new feature appears in the 2023-09-01 version, but the current Comte python SDK does not have this version. Could you please fix the swagger PR(Azure/azure-rest-api-specs/pull/26145]) to generate python SDK and release new SDK as soon?

Hi, jingsong, checked with SDK team, the python SDK to support 2023-09-01 will be released in third week of December. So, we need to adjust the ETA to be early Jan 2024 - I'll double check with the feature's PM, most likely we are fine. thanks!


fix: import azion.config.js (presets)

Description:
This pull request addresses an issue with module imports in the lib/env/vulcan.env.js file. The previous implementation attempted to use require() for ES Modules, which is not supported and caused errors.
Changes Made:

Dynamic Import Handling:

Implemented import() for loading ES Modules.
Added a fallback to require() for CommonJS modules when import() fails with ERR_REQUIRE_ESM.

Add mathjs temporarily until the new version of the azion/config package is released.

:tada: This PR is included in version 4.3.0-stage.1 :tada:
The release is available on:

npm package (@stage dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 4.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


ConnectedToRelay is registered too late

Latest change breaks connecting to relay:
```
private void OnEnable()
{
clientToServerTransport.OnClientConnected = ConnectedToRelay;
...

If I have "Connect on Awake" checked then `ConnectToRelay()` is called before `OnEnable()` so `ConnectedToRelay()` is never called and LRMTransport doesn't know it was actually connected(_connectedToRelay remains false).

Been fixed, just forgot to close issue.


Bugfix default behaviour on Ops.Boolean.ToggleBool_v2.js

Bug is that when ToggleBool default is set to TRUE, then on load it takes two triggers to get it to be FALSE.
To reproduce:
-Go to this patch https://cables.gl/edit/E3h58l
-Select the ToggleBool op
-Notice that the ToggleBool is default TRUE
-Press Toggle and notice you have to press it twice for the correct behaviour to start happening
-If you refresh the patch you will get the same bug.
Underlying problem is that the loading callback sets the output to the default but doesn't also set the internal variable (theBool) to the default.
Demo of the proposed bugfix is also on the patch.

omg...

thank you! and congratulations on the first bugfix pull request of open source cables! <3


./nvm-help missing

nvm use iojs-v1.6.2

module.js:340
    throw err;
          ^
Error: Cannot find module './nvm-help'

Same here.

Perhaps did you npm install nvm? The nvm on npm is not the correct one. Please uninstall that, and use the install instructions in the README.
Duplicate of #304.

Yes, exactly. Saw it latter. :+1:


Make the link list icons clickable

I keep clicking on (say) the YT icon next to a link list item and expecting it do do something - so put the icon inside the clickable link

In dev, branch = feature/issue-271-clickable-link-list-icons

Fixed by PR #272


Add linting command

I noticed there is no linting npm script.
I can recreate the setup from fastify, I assume the goal is to have the same formating and linting ?

I think we have linting enabled for every package. Where is it missing?

In which package did you not find the linting test?

My bad.
I just checked every package.json.
In some places it is part of the test command, not stand alone, but I don't see this as an issue since you will always run the tests before commiting.


fix(IAM Policy Management): regenerate based on minor API update to operator

PR summary

This is a minor regeneration based on update to enum for operators in v2/policies.
Issue: https://github.ibm.com/IAM/AM-issues/issues/2212
PR Checklist
Please make sure that your PR fulfills the following requirements:

[x] The commit message follows the Angular Commit Message Guidelines.
[x] Tests for the changes have been added (for bug fixes / features)
[x] Docs have been added / updated (for bug fixes / features)

Current vs new behavior

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Tests:
pytest test/integration/test_iam_policy_management_v1.py
================================================================== test session starts ===================================================================
platform darwin -- Python 3.9.17, pytest-7.4.4, pluggy-1.4.0
rootdir: /Users/shaunsmacibm/Desktop/cloud-platform/iam/sdk/platform-services-python-sdk
plugins: cov-4.1.0
collected 27 items

test/integration/test_iam_policy_management_v1.py ...........................                                                                      [100%]

================================================================== 27 passed in 23.54s ===================================================================

pytest examples/test_iam_policy_management_v1_examples.py
================================================================== test session starts ===================================================================
platform darwin -- Python 3.9.17, pytest-7.4.4, pluggy-1.4.0
rootdir: /Users/shaunsmacibm/Desktop/cloud-platform/iam/sdk/platform-services-python-sdk
plugins: cov-4.1.0
collected 28 items

examples/test_iam_policy_management_v1_examples.py ............................                                                                    [100%]

=================================================================== 28 passed in 7.33s ===================================================================

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


Update AirGradient-DIY.ino

Update Hostname for automatic Dynamic DNS/DHCP address assignment for services like Pi-Hole

Would this make it so you can access the device over [device-id-here].local using mDNS?

This doesn't enable MDNS, but that Arduino Library can be added.
If you have a Pi-Hole instance, the device will always show up with it's
programmed Hostname (Usually something like ESP-XXXX) in your DHCP
interface list of clients.
If you're Pi-hole or DNS server does automatically append a search domain
onto your hostnames. Then yes, theoretically this should work to allow you
to access it via a hostname of your choice.
Mark Gilbert
Systems Administrator | Cloud Engineer
Primary mobile: +1-918-917-9378
FCC Technician License: KF5NTR
On Sat, Dec 25, 2021 at 12:04 AM Jeff Geerling @.***>
wrote:

Would this make it so you can access the device over
[device-id-here].local using mDNS?
—
Reply to this email directly, view it on GitHub
https://github.com/geerlingguy/airgradient-prometheus/pull/11#issuecomment-1000979633,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACUAUFF4TEAJUNNECIQZ32TUSVNILANCNFSM5KWJ72JQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

I am pseudo-familiar with mDNS, if you want I can add that before we commit this.

@Makr91 - No, I'd be okay without it; didn't think about how it would show up in Pi-hole!

@Makr91 - One quick question, didn't think about this until just now — if the deviceId is set to empty string, it shouldn't be used for the hostname. Could you do a follow-up PR to put an if around the set hostname bit and make sure the deviceId isn't empty?


Update code owners for Azure.DevCenter SDK

Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

@ronniegeraghty could you please include this tag in the bot as well. Also, please bear with me while I add other service contacts as well :)

@pallavit I am no longer a code owner for devcenter SDK, I just did the initial generation (although I have context here so please feel free to leave me in this list). I believe @sebrenna and @mharlan would be the appropriate contacts for both DevCenter and DevTestLabs (please correct me if I'm wrong on the DTL owners Sean/Matt!)

@pallavit I am no longer a code owner for devcenter SDK, I just did the initial generation (although I have context here so please feel free to leave me in this list). I believe @sebrenna and @mharlan would be the appropriate contacts for both DevCenter and DevTestLabs (please correct me if I'm wrong on the DTL owners Sean/Matt!)

Thank you @chrissmiller. I will wait for the ack from @sebrenna and @mharlan and update the list.

@pallavit I am no longer a code owner for devcenter SDK, I just did the initial generation (although I have context here so please feel free to leave me in this list). I believe @sebrenna and @mharlan would be the appropriate contacts for both DevCenter and DevTestLabs (please correct me if I'm wrong on the DTL owners Sean/Matt!)

Thank you @chrissmiller. I will wait for the ack from @sebrenna and @mharlan and update the list.

Yes, @sebrenna and @mharlan are the appropriate points of contact! :)

@ronniegeraghty : Do you mind doing the bot rules for this? The label has been created.

No problem.

/check-enforcer override


Change clean.ps1 (and clean.cmd) to restore deleted files after cleaning

#6845

/fyi @tebeco

Bump. Could someone please approve?


Runner can't connect to external prometheus and alertmanager

Describe the bug
I have multicluster setup with separate monitoring cluster. For metrics querying i use Thanos Query and it works fine in-cluster robusta runner can connect through thanos query service and alertmanager throurn alertmanager service. I expose hosts for Thanos Query and Alertmanager with JWT auth through Ambassador Edge Stack. I able to request thanos and alert manager from my machine successfully but robusta runner return errors for thanos query 401 code for Alertmanager 400 code.
To Reproduce
Steps to reproduce the behavior:

Setup two clusters cluster A and cluster B
Expose prometheus and alert manager on cluster A with JWT authorization
Install robusta to clusters and add to robusta on cluster B url to prometheus and aletmanager in cluster A
See error in rubusta on cluster B

Expected behavior
No errors in robusta logs on external cluster and available app metrics in robusta UI
Robusta runner logs
2023-09-23 06:02:39.386 ERROR    Failed to connect to prometheus. Couldn't connect to Prometheus found under https://thanos-query.areon.io
Caused by HTTPError: 401 Client Error: Unauthorized for url: https://my-prometheus.url/api/v1/query?cluster=dev)
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/prometrix/connect/custom_connect.py", line 101, in check_prometheus_connection
response.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://my-prometheus.url/api/v1/query?cluster=dev
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/src/robusta/core/sinks/robusta/prometheus_health_checker.py", line 61, in prometheus_connection_checks
prometheus_connection.check_prometheus_connection(params={})
File "/usr/local/lib/python3.9/site-packages/prometrix/connect/custom_connect.py", line 103, in check_prometheus_connection
raise PrometheusNotFound(
prometrix.exceptions.PrometheusNotFound: Couldn't connect to Prometheus found under https://my-prometheus.url
Caused by HTTPError: 401 Client Error: Unauthorized for url: https://my-prometheus.url/api/v1/query?cluster=dev)
Caused by HTTPError: 400 Client Error: Bad Request for url: https://my-alertmanager.url/api/v2/silences)
Traceback (most recent call last):
File "/app/src/robusta/utils/silence_utils.py", line 113, in get_alertmanager_silences_connection
response.raise_for_status()
File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://my-alertmanager.url/api/v2/silences
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/src/robusta/core/sinks/robusta/prometheus_health_checker.py", line 97, in alertmanager_connection_checks
get_alertmanager_silences_connection(params=base_silence_params)
File "/app/src/robusta/utils/silence_utils.py", line 116, in get_alertmanager_silences_connection
raise AlertsManagerNotFound(
robusta.core.exceptions.AlertsManagerNotFound: Could not connect to the alert manager [https://alertmanager.areon.io]
Caused by HTTPError: 400 Client Error: Bad Request for url: https://my-alertmanager.url/api/v2/silences)

Hi @smoug25,
I don't think we currently support JWT authorization in prometheus but we do support adding a custom prometheus authorization headers in robusta.
https://docs.robusta.dev/master/configuration/alertmanager-integration/outofcluster-prometheus.html#authentication-headers
Does something like this help?

Hi @Avi-Robusta
Thanks for reply.
No, it doesn't help unfortunately, I have use JWT as bearer token already.
This is my robusta helm values file
`
robusta:
clusterName: dev
enablePrometheusStack: false
disableCloudRouting: false
globalConfig:
alertmanager_url: "https://(my-alertmanager.url)"
grafana_url: ""
prometheus_url: "https://(my-prometheus.url)"
chat_gpt_token: "{{ env.CHAT_GPT_TOKEN }}"
prometheus_additional_labels:
  cluster: dev

signing_key: "{{ env.ROBUSTA_GLOBAL_SIGNING_KEY }}"
account_id: "{{ env.ROBUSTA_GLOBAL_ACCOUNT_ID }}"

prometheus_auth: "Bearer {{ env.JWT_TOKEN }}"
alertmanager_auth: "Bearer {{ env.JWT_TOKEN }}"
prometheus_url_query_string: "cluster=dev"

sinksConfig:

discord_sink:
name: areon_discord_sink
url: "{{ env.DISCORD_WEBHOOK }}"
robusta_sink:
name: robusta_ui_sink
token: "{{ env.ROBUSTA_TOKEN }}"
enablePlatformPlaybooks: true
runner:
additional_env_vars:

name: GRAFANA_KEY
valueFrom:
secretKeyRef:
name: robusta-secrets
key: grafana_key
name: DISCORD_WEBHOOK
valueFrom:
secretKeyRef:
name: robusta-secrets
key: discord_webhook
name: ROBUSTA_TOKEN
valueFrom:
secretKeyRef:
name: robusta-secrets
key: robusta_token
name: ROBUSTA_GLOBAL_SIGNING_KEY
valueFrom:
secretKeyRef:
name: robusta-secrets
key: robusta_global_signing_key
name: ROBUSTA_GLOBAL_ACCOUNT_ID
valueFrom:
secretKeyRef:
name: robusta-secrets
key: robusta_global_account_id
name: CHAT_GPT_TOKEN
valueFrom:
secretKeyRef:
name: robusta-secrets
key: chat_gpt_token
name: JWT_TOKEN
valueFrom:
secretKeyRef:
name: robusta-secrets
key: jwt_token
name: PROMETHEUS_SSL_ENABLED
value: "true"
sendAdditionalTelemetry: false
rsa:
private:  -- secret --
public: -- secret --
playbookRepos:
chatgpt_robusta_actions:
url: "https://github.com/robusta-dev/kubernetes-chatgpt-bot.git"

customPlaybooks:
Add the 'Ask ChatGPT' button to all Prometheus alerts

triggers:

on_prometheus_alert: {}
actions:
chat_gpt_enricher: {}
`

Can you try running this with your url and token to see what thanos responds?
curl --location 'https://MY-PROMETHEUS.URL/api/v1/query?query=up' \
--header 'Authorization: Bearer JWT_TOKEN'

I have had users that have had issues with thanos because their either needed to specify port or make the link http instead of https, so if the curl doesn't work try either or both of those

@Avi-Robusta after sending your request to my thanos I got valid response with metrics. Let me narrow down one point. I use thanos without auth but it behind proxy with  auth by JWT that expected in header 'Authorization: Bearer JWT_TOKEN'. And my alertmanager sites behind the same proxy but I get 400 code in response.

Hi @smoug25 ,
I wasnt able to replicate the issue, Would you like to jump on a call for me to debug this with you?
You can pick a time from my Calendly.

Hi @Avi-Robusta,
Do you have any ideas that we could do for better issue understanding?

Hi @smoug25 . Avi is currently not available. It will be easier to discuss in the Slack community in the #support channel.

@smoug25 can you confirm if this is still happening or if it was fixed?

Weird. If you run the curl command from the robusta-runner pod, does it work? I am trying to figure out what is different about the way the runner connects.

If I make a Curl request from the robusta-runners Pod, it works fine and I receive a status code of 200 (OK).

I've found cause of problem. Something wrong with templating.
I used, and this did not work:
   prometheus_auth: "Bearer {{ env.JWT_TOKEN }}"     alertmanager_auth: "Bearer {{ env.JWT_TOKEN }}"
After I added "Bearer " to kubernetes secret and live only env in template I got:
   prometheus_auth: "{{ env.JWT_TOKEN }}"     alertmanager_auth: "{{ env.JWT_TOKEN }}"
With this template all works like a charm.

Thanks, if I understand correctly we need to update the auth section on this page regarding Thanos. Is that correct?

@pavangudiwada Hi!
In case if user stores token in kubernetes secrets then  secret must contain all auth header value " Basic <USER:PASSWORD base64-encoded> ".
If use none secure way then this
globalConfig: prometheus_auth: Bearer <YOUR TOKEN> # Replace <YOUR TOKEN> with your actual token or use any other auth header as needed alertmanager_auth: Basic <USER:PASSWORD base64-encoded> # Replace <USER:PASSWORD base64-encoded> with your actual credentials, base64-encoded, or use any other auth header as needed
should works as expected.


Rename to "rust" to better align with Paketo naming convention

The naming convention in Paketo is to name a top level family buildpack just the name of the language or framework (e.g. go, ruby, php, etc). We should change the name of this repository to align with that naming convention.

Done.


vendor: updated deps

Updating helmclient and pinning microerror and micrologger.

Tested on ghost. Going with a ping.


Encryption: Add ingress encryption metrics and monitor output

IMPORTANT
I use the upper bit of the reason field in the trace_notify message to indicate if a packet is encrypted or not. Any objects processing the trace notify event will need to be able to parse the bit, this can be as simple as masking it out. It is also only used when encryption is enabled users that do not enable encryption will not need to do anything. The change in datapath_trace.go is,
 r := reason & ^TraceReasonEncryptMask

Add metrics and trace output to ingress side of Encryption.
On the monitor add an "encrypt" flag to denote that the flow was decrypted. So now we see
<- overflow ...
<- overflow decrypted
Then on metrics side add a new ingress bytes/packets count to show decrypted packets,
REASON                       DIRECTION   PACKETS   BYTES
Interface                  Ingress     305164    61427600
Interface Decrypted        Ingress     298241    44024299

This change is

test-me-please

@tgraf any opinions on using a  bit of the reason field in the trace msg? Do we consider trace output stable API?

Coverage decreased (-0.02%) to 41.75% when pulling d77ffdc9a05a4275793ba763081d2e549423d598 on xfrm-metrics into 22970ea50bafe060f2fa032ccd58e3651e81f759 on master.

resolved merge conflict,  by updating bpf.sha will retest now.

test-me-please

Failed connectivity test, retesting all that has changed is bpf.sha so should be unrelated,
https://jenkins.cilium.io/job/Cilium-PR-Ginkgo-Tests-Validated/12499/artifact/76e6cadd_K8sServicesTest_Checks_ClusterIP_Connectivity_Checks_service_on_same_node.zip

test-me-please

test-me-please

test-me-please

test-me-please

test-me-please

ah adding a '-' to monitor broke runtime tests using regex to pull out fields.

test-me-please

fixed regex CI tests by changing monitor output from "encrypted-flow" to "encrypted flow" this way when encryption is disabled we don't have this "-flow" which broke regex tests over monitor output in CI.

test-me-please

OK actually the regex is white space sensitive and I added an extra space in the case without encryption. I guess this is not desired so if/else case if the string exists or not and only print the encryption reason if its not the empty string. This way we don't have extra spaces on the line.

test-me-please

The handful of errors above are due to CI regex not matching now that its resolved I'll merge this.


Bug appveyor

Fixed indexing errors to prevent trying to access an index in an array that's too large. This was happening when the prefix length was longer than the token list because the token list was empty.

Coverage remained the same at 73.061% when pulling a36a146708f3b8314e7d69518861a65da37804d9 on bug_appveyor into c446c6269b4cdce25d142ff6bfecef23f33a6718 on master.

Coverage remained the same at 73.061% when pulling a36a146708f3b8314e7d69518861a65da37804d9 on bug_appveyor into c446c6269b4cdce25d142ff6bfecef23f33a6718 on master.

Coverage remained the same at 73.061% when pulling a36a146708f3b8314e7d69518861a65da37804d9 on bug_appveyor into c446c6269b4cdce25d142ff6bfecef23f33a6718 on master.


Pass through props inside the decorator

This allows custom properties on inputs. Example:
<Input label="What is your first name?" name='firstName' required/>

The prop label is now available within a custom input:
export default class Input extends React.Component {
	render() {
		return (

				{this.props.label}
				<input type="text" className="form-control"/>

		)
	}
}

It looks like there is something wrong with the travis ci setup for one of the test runs. 3 of the 4 runs succeed though.

Hi @blittle,
Thanks for this. Yes, I am going through the tests for next release. New version of node etc. have to fix it :-)


Add IcedTea-Web as an optional part of the install

Signed-off-by: Charlie Gracie<EMAIL_ADDRESS>

This PR is adding support to make IcedTea-Web be an optional part of the AdoptOpenJDK installer. Currently the changes expect and IcedTea-Web artifact to be present and the installer build will fail if it does not exist.
Is this the correct behaviour? Or should the build just create the installer without optionally adding IcedTea-Web if it does not exist?

I have tested this with the latest OpenJ9 JDK 8 release. I will test it with HotSpot JDK 8 shortly.

@charliegracie , please build a installer with job
"standalone_create_installer_windows" (pointing to  refs/pull/87/head ) to show us the result when you think it is ready

the installer build will fail if it does not exist.
Is this the correct behaviour?

Yes, We start to include icedtea into installer so it must always be included

I do not see that job on Jenkins. Maybe I do not have rights to launch it.

I do not see that job on Jenkins. Maybe I do not have the rights to launch it.

I don't see the job there either - https://ci.adoptopenjdk.net/view/IcedTea-Web/ contains the IcedTea-Web builds that we know of.  Perhaps @douph1 was suggesting to create a new job?

I do not see that job on Jenkins. Maybe I do not have the rights to launch it.

I don't see the job there either - https://ci.adoptopenjdk.net/view/IcedTea-Web/ contains the IcedTea-Web builds that we know of. Perhaps @douph1 was suggesting to create a new job?

I speeking about the Installer job
I have let a msg this morning on slack to @charliegracie  wich seem absent.
I have run the standalone job

heat.exe : error HEAT5052 : The directory 'C:\Users\jenkins\workspace\build->scripts\release\standalone_create_installer_windows\wix\SourceDir\icedtea-web-image' could not be >found.
"Failed to generating Windows Installer XML Source files for IcedTea-Web (.wxs)"
Build step 'Execute Windows batch command' marked build as failure

I dont know exactly how it works but I think we must configure installer job to get artifact (icedtea-web/icedtea-web-*.win.bin.zip ? ) from icedtea-web_build_x86-64_windows
so we can re-use installer job with artifact created by icedtea job

Sorry I am unavailable on Slack until later today.  Yes however the installer job gets an OpenJDK zip file it should get the IcedTea-Web zip file from the Jenkins job.  Once you put the zip in the SourceDir with the OpenJDK zip everything else should work the same as before.

https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/test_installer_windows/1/
Finished: SUCCESS
and I have tested OpenJDK8-jre_x64_windows_hotspot-<IP_ADDRESS>.msi for installer work as expected and JNLP are well associated with javaws.

I'm OK with us adding this in but only once we have a stable 1.8.1 ITW released.

I definitely don't want HKCU - due to regulations imposed on us, installing things per-user is a major pain and we want deployed software to apply to all users by default.

I definitely don't want HKCU - due to regulations imposed on us, installing things per-user is a major pain and we want deployed software to apply to all users by default.

Dont worry, this is not the default behaviour.
We use ALLUSERS=2
See https://docs.microsoft.com/en-us/windows/desktop/msi/allusers

PS: @kelderek I dont have mentionned HKCU but HKMU
http://wixtoolset.org/documentation/manual/v3/xsd/wix/simple_type_registryroottype.html
https://docs.microsoft.com/fr-fr/windows/desktop/Msi/registry-table (- 0x001)

PS: @kelderek I dont have mentionned HKCU but HKMU
http://wixtoolset.org/documentation/manual/v3/xsd/wix/simple_type_registryroottype.html
https://docs.microsoft.com/fr-fr/windows/desktop/Msi/registry-table (- 0x001)

Ok, thanks.  I have never seen HKMU before so I assumed it was a typo.  I did Google HKMU before posting, but the first page had no relevant results.  Thanks again!

@douph1 I have rebased on master and updated the registry keys to HKMU.

I have trigger a new build with last change:
https://ci.adoptopenjdk.net/job/build-scripts/job/release/job/test_installer_windows/2/

@charliegracie  what do you think of letting FeatureIcedTeaWeb at INSTALLLEVEL=2
but moving FeatureJNLPFileRunWith at INSTALLLEVEL=3 because it one level deeper in the tree
And doesn't we spacing the INSTALLLEVEL to allow adding feature in the midle ?
INSTALLLEVEL=1
INSTALLLEVEL=10
INSTALLLEVEL=20
So later we can add Update-notifier at LEVEL 5 or 15 ( between existing )

I think changing the JNLP association to LEVEL=3 makes sense. I will change it now.
I think changing all of the LEVELs like you mentioned may make sense but probably best left for a future PR.


'AttributeError: 'Graph' object has no attribute 'find_one''

I tried your project, but got error,
'AttributeError: 'Graph' object has no attribute 'find_one''

https://stackoverflow.com/questions/52056004/py2neo-v4-attributeerror-graph-object-has-no-attribute-find-one
I ran into that issue also.  I ended up having to do everything in a different way.

https://stackoverflow.com/questions/52056004/py2neo-v4-attributeerror-graph-object-has-no-attribute-find-one
I ran into that issue also. I ended up having to do everything in a different way.

I found that post,... as you said you have ended up doing everything in a different way, ... do you mind providing a working version by sharing your own new GitHub project? ...
Thanks for any help.

@maiziheimei if you have any issue, please be clear on your question by sharing a code sample and were the error occurred.

sooo glad that  @taiwotman saw my problem.
Neo4j is on with empty DB; app is running on localhost:5000; Since for the first time, I hit 'singup', then filled the 'name' and 'email', then here comes the error messages:

from 'http://<IP_ADDRESS>:5000/signup', it shows 'Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.'

from neo4j db, I saw Node 'User', with Property keys 'email', 'name','username', but no actual values what I just filled

from the terminal, I got,

...
'

Running on http://<IP_ADDRESS>:5000/ (Press CTRL+C to quit)
<IP_ADDRESS> - - [15/Jul/2020 19:24:17] "GET / HTTP/1.1" 302 -
<IP_ADDRESS> - - [15/Jul/2020 19:24:17] "GET /login HTTP/1.1" 200 -
<IP_ADDRESS> - - [15/Jul/2020 19:24:18] "GET /static/dist/js/main.min.js HTTP/1.1" 200 -
<IP_ADDRESS> - - [15/Jul/2020 19:24:18] "GET /static/dist/img/logo.png HTTP/1.1" 200 -
<IP_ADDRESS> - - [15/Jul/2020 19:24:18] "GET /static/dist/img/backgroundimg2.jpeg HTTP/1.1" 200 -
<IP_ADDRESS> - - [15/Jul/2020 19:24:18] "GET /static/dist/js/includes/jquery.min.js HTTP/1.1" 200 -
<IP_ADDRESS> - - [15/Jul/2020 19:24:20] "GET /signup HTTP/1.1" 200 -
[2020-07-15 19:24:45,836] ERROR in app: Exception on /signup [POST]
Traceback (most recent call last):
File ".../python3.8/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File ".../python3.8/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File ".../.local/share/virtualenvs/quizApp-s1G4uskn/lib/python3.8/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File ".../.local/share/virtualenvs/quizApp-s1G4uskn/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File ".../.local/share/virtualenvs/quizApp-s1G4uskn/lib/python3.8/site-packages/flask/app.py", line 1949, in full_dispatch_request
rv = self.dispatch_request()
File ".../.local/share/virtualenvs/quizApp-s1G4uskn/lib/python3.8/site-packages/flask/app.py", line 1935, in dispatch_request
return self.view_functionsrule.endpoint
File ".../application/auth.py", line 97, in signup_page
existing_user = user.find()
File ".../application/models.py", line 28, in find
user = db.graph.find_one('User', 'email', self.email)
AttributeError: 'Graph' object has no attribute 'find_one'
<IP_ADDRESS> - - [15/Jul/2020 19:24:45] "POST /signup HTTP/1.1" 500 -
<IP_ADDRESS> - - [15/Jul/2020 19:24:46] "GET /favicon.ico HTTP/1.1" 404 -"

Really appreciate your help and I am completely new to this kind of app. THANK YOU.

find_one is deprecated.  Either downgrade to  Py2neo 2.0.9  or try the following code lines.
from py2neo import NodeMatcher

matcher = NodeMatcher(db.graph)
matcher.match("User", email=self.email).first()

I wrote this an entirely different way.  If you want more ideas check out https://github.com/josh-thurston/FlaskNeo4jStarter

from py2neo import NodeMatcher
matcher = NodeMatcher(db.graph)

Thanks, @taiwotman , I put these code into the 'model.py', I got the error from the same place,

find_one is deprecated. Either downgrade to Py2neo 2.0.9  or try the following code lines.
from py2neo import NodeMatcher

matcher = NodeMatcher(db.graph)
matcher.match("User", email=self.email).first()

Specifically in the model python script
def find(self):
        user = matcher.match("User", email = self.email).first()
        return user

def get_id(self):
        query = 'match (n:User) where n.email = {email} return ID(n)'

        user = matcher.match("User", email = self.email).first()
        id = db.graph.run(query, parameters = {'email': user['email']}).evaluate()

        return id

Thanks, @taiwotman , I put these code into the 'model.py'.
In case let you know what is going on, .... I got the error from the same place,

'<IP_ADDRESS> - - [15/Jul/2020 21:03:44] "GET /signup HTTP/1.1" 200 -
[2020-07-15 21:04:16,297] ERROR in app: Exception on /signup [POST]

and

'
raise GraphError.hydrate(metadata)
py2neo.database.ClientError: SyntaxError: The old parameter syntax {param} is no longer supported. Please use $param instead (line 1, column 32 (offset: 31))
"MATCH (_:User) WHERE _.email = {1} RETURN _"
^
<IP_ADDRESS> - - [15/Jul/2020 21:04:16] "POST /signup HTTP/1.1" 500
'

very tried, I will debug it tomorrow, ... hopefully eventually with all your help, this project can work from my pc. THANKS.

hey,  Good Morning @taiwotman, your project is very interesting,  I want to try it out locally. Now I have new problems, wish you could help me.
First, the following is working for me,

def find(self):
user = matcher.match("User", email=self.email).first()
return user
def get_id(self):
    query = 'match (n:User) where n.email="{vemail}" return ID(n)'
    user = matcher.match("User", email=self.email).first()
    id = db.graph.run(query, vemail=user['email']).evaluate()
    return id

def set_lastlogin(self):
    query = 'MATCH (p:User) SET p.last_login="{v_last_login}" return p'
    db.graph.run(query, v_last_login=self.last_login)

Now I have two problems,

after signup, I tried to log in, inside neo4j, the 'last_login' is set as

''"last_login": "{v_last_login}",

it never goes to 'dash_board', instead it goes to 'login' page

' return redirect(next or url_for('main_bp.dashboard'))', line 49 of 'auth.py'
or

return redirect(url_for('main_bp.dashboard')), line 102 of 'auth.py'

Thank you.

Moved deleted comment to new issue: Redirect to dashboard page.


[Discussion] The future of Ghost's admin UI

There has been much discussion, originally starting here: #951, and most recently in IRC around the future of Ghost's admin UI and the frameworks and tools that it should use.
This discussion is driven by a number of problems that are present in the existing implementation. Any discussion around solutions needs to carefully to consider all the problems that we face in the admin:

The admin is halfway between a one-page app, and a multi-page app, resulting in confusion between what goes where, and code split between the client and the server.
The confusion and disarray has lead to really poor mobile support
A complete lack of data binding, leading to code like this (see #550)
No memory management for views (views are never destroyed) (see #951)
Views are doing transitions (animations) manually (see #951)
Really ugly routing (see #951)
Most of our stuff is rendered client side, but is this bad? interesting article
Our code is really really fragile. It's easy to break saving, or uploading, or something else critical.

Discussion point 1: What other problems does the admin suffer from? Can you help us better quantify any of these problems?
It would be great to develop a set of principles / statements that need to be true for any new solution like:

Data-binding is handled automatically.
Sub-page routing is easy

Do you have examples of bits of the admin UI that you think are particularly dire? Are their problems you anticipate we might have if we moved from Backbone? Etc..
Discussion point 2: What is the best structure for a complex client side app like this?
This sort of depends on the tool used to build it, but also has implications for choosing a tool.
Is the Ghost admin a single page app, or a collection of single page apps? If you take the dashboard into consideration, I believe that alone is a single page app. The editor is probably the same.
Do you have ideas on how to structure the admin UI, and how to ensure it works as a whole?
Discussion point 3: Is backbone the best framework for the job?
There are many other potential tools we could use, and there are a few main solutions that we consider to be on the table:

Improving the current backbonejs implementation by adding more underlying structure and using additional tools like marionette and rendr
Switching to emberjs
Switching to angular
Something else entirely?

Do you have some relevant experience with one of these solutions that you can tell us about? Are you able to put together a code example or demo that shows what it might look like, or specifically how a problem is solved?
Do you have time to implement a more complete demo / example of one of the key features, like the editor, or the post-settings menu?
Please note:
Discussions on topics like these can be hard to keep objective, so I'm going to lay out some ground rules. Comments on this issue should contribute something of real value to one of the above discussion points:

experience or insight that is relevant to one of the discussion points
an interesting article providing insight on how other people have solved
a demo or code example showing how a tool could solve a relevant problem

Please do not post subjective comments suggesting which is your preferred framework, and although we all know the hamster IS a valid reason to choose ember, please keep those sorts of comments to IRC (please)! I have the power to delete comments, and for this thread, I may make use of it without warning :smiling_imp:
Next steps:
This is a call to action for our community, a place to come to put your thoughts, ideas, examples and other contributions. We will then use one of the public development meetings to discuss this further and come up with a decision. I propose that we aim for the meeting on Tuesday 25th February.
update: moved back from 18th to 25th

Damn, two years too late... Is it still on ( gasp ) Ember?

Still? What do you mean?

vs React or Angular 2 or Vue or ...

I work on React. Ember is a perfectly good choice here and it should be unsurprising, not surprising, that they are still on the same framework they chose 2 years ago.

One of Ember's philosophies is "stability without stagnation", so it's a perfect fit.

@malixsys you're still not using...pause for dramatic effect...a static site generator?

@malixsys what specifically do you expect to gain by rewriting the admin to either of your choices?

Apologies for speaking out of turn. But for one thing, a rewrite in React will gain you more support from the OSS community. But you'll need to be ready for a barrage of support issues from n00bs, and potential artchiectural slips due to relative inexperience in the React community.

@jhabdas is Ghost suffering from not having enough contributors to their admin app?

@zeppelin is that a rethorical question? Or are you just being defensive? In my opinion Ghost, with the funding received, should have been much further along by now. No offense, but I've seen unfunded open source projects with more forward momentum. Not to discredit Erin's work, but Ember was the wrong choice.

@jhabdas Not rhetorical at all! I'm honestly curious if this is is a fact or an just general assumption.

@zeppelin fact. If you rewrite in React expect to see Ghost see a renaissance of development activity across the board.

@jhabdas I was asking if the lack of contributors was pronounced by someone from the Ghost team.

There's no I in team. If you're running a serious open source project on Node your UI is running React.

@jhabdas ok, never mind.

@jhabdas I think Ghost has been running for a while now on Ember and have had no problems with it, why switch to something else if what they have is already working? Plus this is a closed case, they have chosen, I don't think they will change unless they find a limitation in what they have chosen.

Argumentum ad Ignorantiam. If it's not broke don't fix it isn't valid. And two- going on three-year old decisions don't cut it in the development world, which demands continuous improvement in the face of legitimacy. Given that point, I'm not a stakeholder. Just here to drop some candid feedback.

This an open source ptoject you're welcome to create a PR that introduces a replacement in React. My guess is that feature pairity would be a

Oops... pressed send to early.
I'm assuming feature pairity would be a minimum requirement. There are no guaranteees that the PR would be accepted however because Ghost team knows Ember already. They'd need to learn a new tool because you think that it would attract more contributors.
All in all, Ghost team made a pragmatic decision 2 years ago that resulted in a good app that's maintainable and the team seems to be happy with it. Pragmatic decision at this point seems to be to keep what exists and works.
I hope you understand that not every team is bound by the same endless urge to rewrite their working applications in latest popular tech.

I am locking this down. I'm surprised and disappointed at this conversation - this is a 2 year old issue, which was until now, a stand out example of open source in action. There were 100 comments, all written with great depth and care, which helped us to overcome a major challenge in our growth and capabilities.
I didn't open my inbox this morning because I was busy planning a talk - in which the awesome work done in this issue and since feature heavily. I will be exercising my power to delete non constructive comments. If anyone wants to talk about this further, you're welcome to join our slack channel.

I had a response to this half-typed before I had to take a phone call.
There are multiple people here who are huge fans of React, myself included. There was nothing wrong with the content of your argument. But the second you started shitting on our momentum,  accusing people of obtuse logical fallacies, and spouting meaningless drivel such as "If you're running a serious open source project" -- you lost all credibility.
Try being friendly and respectful next time instead of arrogant and dismissive. It doesn't matter how good of an engineer you are if nobody wants to work with you.
All of this is also covered in our (extremely liberal) code of conduct.


Candlestick chart won't render candlesticks while loading around 5000 - 10000 candles

Lightweight Charts Version: 3.1.5
Steps/code to reproduce:
Easiest way to reproduce is to call candleStickSeries.setData([candles]) with 5000 - 10000 candles.
I used the example from JSFiddle as base to reproduce this problem, making sure this isn't a config problem on my end.
Actual behavior:
Chart starts spamming "Value is null" errors in the developer console and won't render the candlesticks.
Expected behavior:
Longer wait time since the chart is loading a large amount of data, but render all the candlesticks.
Screenshots:

CodeSandbox/JSFiddle/etc link:
https://jsfiddle.net/markverkiel/j3syf4dr/4/

Just got this error as well, stepping through the stack trace I see SeriesCandlesticksPaneView.prototype._internal__createRawItem calling colorer._internal_barStyle(time);, which then calls this._private__findBar(barIndex, precomputedBars) which returns null because precomputedBars wasn't passed around (and doesn't exist yet?)
I'm going to try testing with a smaller number of bars to see if that changes the result.

I added some code to your fiddle to check if you had duplicate times in your data, and you do.  The following times were duplicated:
["1593663300", "1593664200", "1593665100", "1593666000", "1593666900", "1593667800", "1593668700", "1593669600", "1593670500", "1593671400", "1593672300", "1593673200", "1593674100", "1593675000"]

Also your times aren't integers, which is kind of weird, you should use Math.round to make them into whole numbers instead of floating point.

Thanks for the fast feedback much appreciated!
I've tested this against my own data and it seems that duplicate candles are indeed the problem for this issue.
Since this is currently breaking the chart, maybe it's an idea to cancel the rendering and throw an error for duplicate time entries? Or throw a warning indicating that the data consist duplicate entries.

Since this is currently breaking the chart, maybe it's an idea to cancel the rendering and throw an error for duplicate time entries? Or throw a warning indicating that the data consist duplicate entries.

See #315

I guess the issue is solved now?

It seems this error can mean many different things. I had no duplicates and only 4 items in the array. The timestamp was an integer. I couldn't work out why it infinitely spewed out "Value is null", since that error message means nothing, and is actually deceptive in this case. Debugging with Firefox was difficult because the infinite loop kept hanging the browser. It was a bit easier in Chrome.
In my case it was simply that the order of the items in the array was most recent to least recent. Reversing it fixed the problem.
Maybe this will help someone else.

I guess the issue is solved now?

Yes this issue is resolved, closing it.
This won't cause confusion anymore when issue #315 is finished.


Feature Request: There seems to be no good way to handle non-general flat-footed conditions

Lets say for example I'm a Mastermind racket Rouge, and successfully identify a creature, then the target would be flat-footed for me until the start of my next turn (or 1 minute if critical success).
Currently for the Rouge it is possible to use the toggle "Enable abilities that require a flat-footed target", which effects things like Sneak Attack damage dice, but this doesn't work to enable the AC -2 penalty to the DC on the attack roll.
I'm not exactly sure what the best way would be to handle this, though. Maybe some character specific effect item, very similar to the flat-footed condition, but with a predicate to make it only valid for attacks from a single character ID. But I don't think it's currently possible to do this with predicates, and also I see no existing way to generate character-specific effects. Of course it would be possible to hard-code this and link it to the 'target:condition:flat-footed', but I guess that would not be preferred.

When we have conditional visibility then this would be a logical extension


How can I use another deps?

I want to use get_current_client_user like this.
but, this is not working....
only reusable_oauth2 is working
from typing import Generator

from fastapi import Depends, HTTPException, status
from fastapi.security import OAuth2PasswordBearer
from jose import jwt
from pydantic import ValidationError
from sqlalchemy.orm import Session

from app import crud, models, schemas
from app.core import security
from app.core.config import settings
from app.db.session import SessionLocal

reusable_oauth2 = OAuth2PasswordBearer(
    tokenUrl=f"{settings.API_V1_STR}/login/access-token"
)

client_reusable_oauth2 = OAuth2PasswordBearer(
    tokenUrl=f"{settings.API_V1_STR}/client/login/access-token"
)

def get_db() -> Generator:
    try:
        db = SessionLocal()
        yield db
    finally:
        db.close()

def get_current_user(
    db: Session = Depends(get_db), token: str = Depends(reusable_oauth2)
) -> models.User:
    try:
        payload = jwt.decode(
            token, settings.SECRET_KEY, algorithms=[security.ALGORITHM]
        )
        token_data = schemas.TokenPayload(**payload)
    except (jwt.JWTError, ValidationError):
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="Could not validate credentials",
        )
    user = crud.user.get(db, id=token_data.sub)
    if not user:
        raise HTTPException(status_code=404, detail="User not found")
    return user

def get_current_active_user(
    current_user: models.User = Depends(get_current_user),
) -> models.User:
    if not crud.user.is_active(current_user):
        raise HTTPException(status_code=400, detail="Inactive user")
    return current_user

def get_current_active_superuser(
    current_user: models.User = Depends(get_current_user),
) -> models.User:
    if not crud.user.is_superuser(current_user):
        raise HTTPException(
            status_code=400, detail="The user doesn't have enough privileges"
        )
    return current_user

def get_current_client_user(
    db: Session = Depends(get_db), token: str = Depends(client_reusable_oauth2)
) -> models.ClientUser:
    try:
        payload = jwt.decode(
            token, settings.SECRET_KEY, algorithms=[security.ALGORITHM]
        )
        token_data = schemas.TokenPayload(**payload)
    except (jwt.JWTError, ValidationError):
        raise HTTPException(
            status_code=status.HTTP_403_FORBIDDEN,
            detail="Could not validate credentials",
        )
    client_user = crud.client_user.get(db, id=token_data.sub)
    if not client_user:
        raise HTTPException(status_code=404, detail="User not found")
    return client_user

def get_current_active_client_user(
    current_user: models.ClientUser = Depends(get_current_client_user),
) -> models.ClientUser:
    if not crud.client_user.is_active(current_user):
        raise HTTPException(status_code=400, detail="Inactive user")
    return current_user

It sounds like get_current_user is working, even though I call get_current_client_user

Code seems ok for me, but I only looked at it a little, maybe check what crud.client_user.get is doing?

@karolzlot It is working on development.
But authentication is required for get_current_user, not get_current_client_user on Swagger UI. like this

.

it would be easier if you show code of one example endpoint

it would be easier if you show code of example endpoint

@karolzlot Thanks!
endpoint here
Do you need any other information?

from sqlalchemy.orm import Session
from fastapi import APIRouter, Body, Depends, HTTPException
from app import crud, models, schemas
from app.api import deps

router = APIRouter()

@router.get("/casts", response_model=List[schemas.Cast])
def search_casts(
    db: Session = Depends(deps.get_db),
    skip: int = 0,
    limit: int = 100,
    current_user: models.ClientUser = Depends(deps.get_current_active_client_user),
) -> Any:
    """
    Retrieve casts.
    """
    scope = current_user.get_rank_scope()
    casts = crud.cast.get_filtered_cast(db, scope=scope, skip=skip, limit=limit)
    return casts

For me it looks ok.
If it still doesn't work then you can make example GitHub repo so this issue can be reproduced. You can remove any code which you don't want to share.

@karolzlot OK,thanks a lot.


Meteor recipe fails to handle meteor restarting after a code change.

Meteor will restart when a file is modified. VSCode node debugger will close, and the process will exit. Ideally the the debugger should wait for meteor to restart. I do not know of a setting in the launch.json that could solve this.
Expected output:
> testapp@ debug /Users/user/meteor/vscode-meteor-test
> meteor run --inspect

[[[[[ ~/meteor/vscode-meteor-test ]]]]]

=> Started proxy.
=> Started MongoDB.
W20171228-16:39:44.698(-5)? (STDERR) Debugger listening on ws://<IP_ADDRESS>:9229/8c29a2af-059f-4322-8d67-210ee4f80f8b
W20171228-16:39:44.724(-5)? (STDERR) For help see https://nodejs.org/en/docs/inspector
I20171228-16:39:45.070(-5)? !! Change me !! 2131
=> Started your app.

=> App running at: http://localhost:3000/
W20171228-16:39:54.710(-5)? (STDERR) Debugger listening on ws://<IP_ADDRESS>:9229/90b51542-3f8f-453c-944e-c89a1578d474
W20171228-16:39:54.715(-5)? (STDERR) For help see https://nodejs.org/en/docs/inspector
I20171228-16:39:55.161(-5)? !! Change me !! 21315
=> Meteor server restarted

Received output:
Debugging with inspector protocol because a runtime executable is set.
Verbose logs are written to:
/var/folders/0b/zk7t542s1sj_31mwpwyk3cy81gy8z8/T/vscode-node-debug2.txt
/usr/local/bin/npm run debug
> testapp@ debug /Users/ebajumpa/Code/meteor/vscode-meteor-test
> meteor run --inspect
[[[[[ ~/Code/meteor/vscode-meteor-test ]]]]]
=> Started proxy.
=> Started MongoDB.
W20171228-16:37:13.433(-5)? (STDERR) Debugger listening on ws://<IP_ADDRESS>:9229/1db82e6c-83e1-42b5-a005-fb0c34b77248
W20171228-16:37:13.531(-5)? (STDERR) For help see https://nodejs.org/en/docs/inspector
W20171228-16:37:13.532(-5)? (STDERR) Debugger attached.
I20171228-16:37:14.187(-5)? !! Change me !!
=> Started your app.
=> App running at: http://localhost:3000/
=> Server modified -- restarting...

I've put a sample meteor project on github using the example project meteor provides.
osx 10.12.6
vscode 1.91.1
meteor <IP_ADDRESS>

To reproduce this issue, follow the steps

Clone the sample project git clone https://github.com/SteelPhase/vscode-meteor-test vscode-meteor-test
CD into the directory cd vscode-meteor-test
install npm dependencies meteor npm install
open vscode without extentions code --disable-extensions .
launch Meteor: Node launch config
wait util meteor launch, and debugger attaches
modify !! Change me !! on line 6 of server/main.js to any value
save file
wait for => Server modified -- restarting...
debugger will disconnect, and in doing so kills the npm, and meteor node processes

I've had exact same problem all week and I've been trying hard to get it going. I finally succeeded with server side debugging, havn't quite worked out server/client at same time, but Im happy.
Try this

launch.json:

    "version": "0.2.0",
    "configurations": [
        {
            "type": "node",
            "request": "attach",
            "name": "server",
            "restart": true,
            "port": 9229,
        },
    ],
}

run meteor in its own terminal
meteor run --inspect

Start up vscode debugger.
Take note of debugger attached output in meteors terminal

Open up browser localhost:3000 and go for it!

For client side as well:
5. Chrome devtools > Sources: Add your work directory, then add client breakpoints there.
Has worked flawlessly for me so far.


multi-model Query process

How does multi-model query processing work?How can queries across models be implemented？Can someone tell me some technical details？

Short answer: it just works. ArangoDB was designed to support different data models with a single query language from the very beginning. A lot of the complexity that makes this possible is hidden on the surface for ease of use. For example, every record is a JSON object to the user, regardless of the data model.
You can write queries in AQL that retrieve documents based on their ID, which would be a key-value style lookup (the ID being the key and the whole document being that value). If you filter by attribute values, return a subset of stored attributes, compute new attributes or append values to an array in a document, then you are using the document data model. Creating and using edge collections e.g. by doing AQL traversals means that you use the graph data model. You can perform a graph traversal in a subquery and then use that result to iterate over and filter a collections, as well as lookup extra information by key - such a query would involve all three major data models.
Does this answer your question or do you want to know more, e.g. about how the query or storage engine work?

Hi @LilyQahh0208,
Did you have a chance to read Simran-B's previous comment? Was it helpful?


error in ./installLibrealsense.sh

I am installing R200 in Ubuntu 14.04 Jetson TK1 (armhf) with Kernel 3.10.40.
I followed all the tutorial and an error occurs in running ./installLibrealsense.sh
The bottom shows the outputs when running each line from ~/installLibrealsense/installLibrealsense.sh
ubuntu@tegra-ubuntu:~/librealsense$ git checkout v0.9.2
M	librealsense.qtcreator/realsense.pro
M	src/uvc-v4l2.cpp
HEAD is now at c5d6b82... Merge pull request #236 from mdhorn/add-udev-debian

when I run the line patch -p 1 -i ~/installLibrealsense/arm.patch I pressed enter key at every question
ubuntu@tegra-ubuntu:~/librealsense$ patch -p 1 -i ~/installLibrealsense/arm.patch
patching file librealsense.qtcreator/realsense.pro
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file librealsense.qtcreator/realsense.pro.rej
patching file src/uvc-v4l2.cpp
Reversed (or previously applied) patch detected!  Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file src/uvc-v4l2.cpp.rej

sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo cp config/uvc.conf /etc/modprobe.d/
sudo udevadm control --reload-rules && udevadm trigger

These three lines had no outputs
and finally, an error when executing 'make'
ubuntu@tegra-ubuntu:~/librealsense$ make
g++ src/uvc-v4l2.cpp -std=c++11 -fPIC -pedantic -Ofast -Wno-missing-field-initializers -Wno-switch -Wno-multichar -DRS_USE_V4L2_BACKEND `pkg-config --cflags --libs libusb-1.0` -mfpu=neon -mfloat-abi=hard -ftree-vectorize -c -o obj/uvc-v4l2.o
In file included from src/uvc-v4l2.cpp:31:0:
/usr/local/include/libusb-1.0/libusb.h:750:55: warning: ISO C++ forbids zero-size array 'iso_packet_desc' [-Wpedantic]
  struct libusb_iso_packet_descriptor iso_packet_desc[0];
                                                       ^
src/uvc-v4l2.cpp: In constructor 'rsimpl::uvc::context::context()':
src/uvc-v4l2.cpp:69:128: error: 'libusb_error_name' was not declared in this scope
                 if(status < 0) throw std::runtime_error(to_string() << "libusb_init(...) returned " << libusb_error_name(status));
                                                                                ^
In file included from src/uvc.h:8:0,
                 from src/uvc-v4l2.cpp:6:
src/uvc-v4l2.cpp: In destructor 'rsimpl::uvc::device::~device()':
src/uvc-v4l2.cpp:354:115: error: 'libusb_error_name' was not declared in this scope
                     if(status < 0) LOG_ERROR("libusb_release_interface(...) returned " << libusb_error_name(status));
                                                                                ^
src/types.h:61:131: note: in definition of macro 'LOG'
     #define LOG(SEVERITY, ...) do { if(static_cast<int>(SEVERITY) >= rsimpl::minimum_log_severity) { std::ostringstream ss; ss << __VA_ARGS__; rsimpl::log(SEVERITY, ss.str()); } } while(false)
                                                                                ^
src/uvc-v4l2.cpp:354:36: note: in expansion of macro 'LOG_ERROR'
                     if(status < 0) LOG_ERROR("libusb_release_interface(...) returned " << libusb_error_name(status));
                                    ^
src/uvc-v4l2.cpp: In function 'std::string rsimpl::uvc::get_usb_port_id(const rsimpl::uvc::device&)':
src/uvc-v4l2.cpp:410:72: error: 'libusb_get_port_number' was not declared in this scope
                 std::to_string(libusb_get_port_number(device.usb_device));
                                                                        ^
src/uvc-v4l2.cpp: In function 'void rsimpl::uvc::claim_interface(rsimpl::uvc::device&, const rsimpl::uvc::guid&, int)':
src/uvc-v4l2.cpp:428:128: error: 'libusb_error_name' was not declared in this scope
                 if(status < 0) throw std::runtime_error(to_string() << "libusb_open(...) returned " << libusb_error_name(status));
                                                                                ^
src/uvc-v4l2.cpp:432:135: error: 'libusb_error_name' was not declared in this scope
             if(status < 0) throw std::runtime_error(to_string() << "libusb_claim_interface(...) returned " << libusb_error_name(status));
                                                                                ^
src/uvc-v4l2.cpp: In function 'void rsimpl::uvc::bulk_transfer(rsimpl::uvc::device&, unsigned char, void*, int, int*, unsigned int)':
src/uvc-v4l2.cpp:440:133: error: 'libusb_error_name' was not declared in this scope
             if(status < 0) throw std::runtime_error(to_string() << "libusb_bulk_transfer(...) returned " << libusb_error_name(status));
                                                                                ^
src/uvc-v4l2.cpp: In function 'std::vector<std::shared_ptr<rsimpl::uvc::device> > rsimpl::uvc::query_devices(std::shared_ptr<rsimpl::uvc::context>)':
src/uvc-v4l2.cpp:586:135: error: 'libusb_error_name' was not declared in this scope
             if(status < 0) throw std::runtime_error(to_string() << "libusb_get_device_list(...) returned " << libusb_error_name(status));
                                                                                ^
make: *** [obj/uvc-v4l2.o] Error 1

Thanks in advance!

Which version of L4T are you using?

I thought that following the tutorial will lead to L4T 21.4 but do you recommend me to install specific jetpack before I install librealsense? I found your another tutorial about installing jetpack 2.0 on jetson tk1 and was wondering if that would suffice

JetPack installs L4T, as I recall JetPack 2.0 installs L4T 21.4.
Your error messages above suggest that you do not have libusb installed. That is installed in the installLibrealsense script. I could not tell if you manually installed everything, or whether you ran the script once and then tried to reinstall things again. The error messages suggest the latter.

Yes, I ran the script once and tried again line by line to see where the error occured. I don't recall if I installed jetpack so I will try to install jetpack 2.0 and try again. Thank you for your timely reply and I will update on this

One of the issues appears to be that libusb was not installed. In the script, this is the line:
sudo apt-get install libusb-1.0-0-dev


Nested unions issue/question

Why flow can't infer that OneActionType can be used where ActionType is used in following example:
/* @flow */

type ActionTypes = 'ONE' | 'TWO' | 'THREE'

type ActionType = {
  type: ActionTypes
}

type OneActionType = {
  type: 'ONE';
  payload: string
}

// this is ok:
// (x:OneActionType) => (x.type:ActionTypes)
// this is not:
(x:OneActionType) => (x:ActionType)

Try Flow

ActionType.type is read/write. OneActionType.type is only 'ONE' but if is treated as a ActionType it could have 'TWO' or 'THREE' assigned to it, violating its type.
You need to mark ActionType.type as covariant (read only): Try Flow

@jesseschalken thank you!
Leave here good reading about variance in flow.


httpstat.us is down?

httpstat.us is reporting no service every time I attempt to use it
https://downforeveryoneorjustme.com/httpstat.us seems to agree that it's fully down at the moment

See #135


(FM-2626) Add DSC Beaker Helper Library

Add a helper library for testing DSC. Also, I added one test to verify
that the helper library actually works and a test runner script.

@zreichert Fixed, ready for review again.


no print window capability

VS Code 1.18.1
OS Windows 7
It's a text editor. There should be a print capability. Like every other text editor ever created.
Unless the expectation is that when we want to print that we'll open our files in a real IDE.

dup of https://github.com/Microsoft/vscode/issues/5953


example: classifying dogs with a naïve Bayes model

This in the matter of #128.

I love the context for the example! I have a few comments for the example code. I think it needs some more inline comments and hand holding. Maybe we can try to separate out the data-creation and the machine learning parts too. But really it only needs some mild changes.
I guess the bigger issue is the feature flag... I'll see if I can find a way to fix that using the stats feature (maybe we can hide the example behind the feature flag?). Otherwise it might be best to just use the rand crate here for the Gaussians?

OK; sometime in the next few days I'll add comments and change it to use rand::distributions::normal::Normal

I've merged in #133 which has some breaking changes (going into the 0.5.0 release). Let me know if you need any help resolving. It's mostly modifications to trait imports and some behind-the-scenes naive bayes changes (shouldn't affect you).

(updated and force-pushed)

OK; more commentary later

@zackmdavis did you need anything from me for this?
Not rushing you at all - take as long as you like!

Alternatively, merge now and accept improvements later if I (or—we can unrealistically hope—someone else) happen to get around to it??


broken exception argument re-raising

import traceback

def foo():
        raise ValueError('test from foo')

def bar():
        try:
                foo()
        except ValueError, exc:
                raise ValueError, exc

try:
        foo()
except ValueError as exc:
        print(traceback.format_exc())
        print(repr(exc.args))
try:
        bar()
except ValueError as exc:
        print(traceback.format_exc())
        print(repr(exc.args))

futurize transforms this into:
@@ -8,8 +9,8 @@
 def bar():
        try:
                foo()
-       except ValueError, exc:
-               raise ValueError, exc
+       except ValueError as exc:
+               raise ValueError(exc)

Actual behavior:
The second print prints:
(ValueError('test from foo',),)
Expected behavior:
The second print prints:
ValueError: test from foo

Working on this at the PyCon sprint. The FixRaise fixer doesn't attempt to detect if exc is an instance of ValueError, as it probably should. This can only be detected at runtime. I propose that we call future.utils.raise_() in cases where the second argument to raise is not an obvious literal (5, None, "foo", etc.), i.e.
raise ValueError, exc

would be rewritten to
from future.utils import raise_
raise_(ValueError, exc)

I'll add code to raise_() to handle this case which, incidentally, should fix #387, too.


Adding a constrained counterpart of yabbob

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Motivation and Context / Related issue
Constraints are cool.
How Has This Been Tested (if it applies)

Checklist

[x] The documentation is up-to-date with the changes I made.
[x] I have read the CONTRIBUTING document and completed the CLA (see CLA).
[x] All tests passed, and additional code has been covered with new tests.

Modified for dividing by 4 the computational cost.

new version from scratch coming.