defineProperty trap makes property non-CEW in React Native (Hermes engine)

Summary
This issue describes the bug reported in https://github.com/pmndrs/valtio/pull/752#issuecomment-1644968041 and #764. In both cases, Valtio was added to a React Native project with the Hermes engine enabled. Assigning a new value to a property on a proxy store object marked the property as non-configurable and non-writable, effectively "freezing" the property and preventing future mutations.
The source of the bug was initially attributed to #752. However, I suspect that the actual cause is #760. My own investigations (https://github.com/pmndrs/valtio/discussions/764#discussioncomment-6517634 and https://github.com/pmndrs/valtio/discussions/764#discussioncomment-6521744) indicate that the bug occurs on 1.11.0 (with #760), but not on 1.10.7 (with #752) or 1.10.6. Also, the bug affects proxy objects (affected by #760) rather than their snapshots (affected by #752).
The root cause appears to be a bug in the Proxy implementation of Hermes. I opened a bug report (https://github.com/facebook/hermes/issues/1065) and am waiting for confirmation from the Hermes devs.
Meanwhile, it would be nice if we handled this ourselves. Hermes and React Native are large projects and move slower than the rest of the JS ecosystem. Even if Hermes fixes the problem immediately (if at all), it would take a long time for the fix to propagate to downstream projects. Many people are using React Native today and we need to support them too.
Link to reproduction
See following discussion comments

https://github.com/pmndrs/valtio/discussions/764#discussioncomment-6517634
https://github.com/pmndrs/valtio/discussions/764#discussioncomment-6521744

Check List
Please do not ask questions in issues.

[x] I've already opened a discussion before opening this issue, or already discussed in other media.

Please include a minimal reproduction.

[ ] I've added a link to a typescript playground or codesandbox with a minimal reproduction.

I suggest two options:

Revert #760. Which would fix the issue but also make a useful pattern (#759) somewhat harder to use. I am OK with this since I can always fork and patch Valtio for personal use.
Alternatively, we can add a workaround for React Native.

But I'm hesitant for option 2 because it's convoluted.
We already know that the [[Set]] internal method invokes [[DefineOwnProperty]] when the property already exists and is a data property. We could check this condition by detecting whether the defineProperty trap is invoked by the set trap:
// Inside proxyFunction()
let isExecutingProxySetTrap = false
const proxy = new Proxy(target, {
  set: (target, prop, value, receiver) => {
    isExecutingProxySetTrap = true
    try {
      // Actual set trap logic goes here
      return Reflect.set(target, prop, value, receiver)
    } finally {
      isExecutingProxySetTrap = false
    }
  },
  defineProperty: (target, prop, desc) => {
    if (isExecutingProxySetTrap) {
      // If the defineProperty trap is triggered while processing the set trap,
      // then we know that 'desc' must have 'value' prop and nothing else
      // according to the ECMAScript spec.
      // So we can strip all other properties (erroneously added by Hermes)
      desc = { value: desc.value }
    }
    // Actual defineProperty trap logic goes here
    return Reflect.defineProperty(target, prop, desc)
  },
})

Admittedly this is convoluted. It's also not foolproof; it might fail if the set trap invokes another set trap. In which case we'd need to use a counter instead of a boolean flag. But there may still be other pitfalls with this trick. Not to mention degrading performance.

For now, I suggest we wait for confirmation from another person that 1.11.0 is indeed the culprit. Then we can revert #760.

I make some tests and found something interesting.
import { Text, View } from 'react-native'
import React from 'react'
import { proxy, snapshot, useSnapshot } from 'valtio'

const store = proxy({
  foo: {
    1: 22,
  },
})

export default function App() {
  const { foo } = useSnapshot(store)
  const fooContent = JSON.stringify(foo, null, 2)
  return (
    <View style={{ flex: 1, marginVertical: 100 }}>
      <Text>foo: {fooContent}</Text>
    </View>
  )
}

If I change foo: { 1: 22 } to foo: { a: 22 }, there is no error. The difference is using number as key or not.
If I change useSnapshot to snapshot, there is no error, even using number as key.

This issue is still present in latest RN + latest valtio using the steps in https://github.com/pmndrs/valtio/issues/765#issuecomment-1647148884

@sharathprabhal I do not use React Native, so unfortunately I cannot verify right now that the issue has been fixed. However, Valtio 1.11.1+ is supposed to be OK for RN.
Could you specify the exact version of Hermes/RN and Valtio, rather than "latest"? A reproduction repository would also help.

@pastelmind Thanks for the response!
The versions are
RN = 0.72.4
Valtio = 1.11.2

The repro repo is at https://github.com/sharathprabhal/valtio-765-repro/blob/main/App.tsx#L34 . Its a brand new RN app with the basic valtio store. Thanks in advance!

I also had the same problem today:
import { proxy, useSnapshot } from "valtio";

export interface FilterState {
  brands: string[];
  gender: string[];
}

const state = proxy<FilterState>({
  brands: [],
  gender: []
});

export default function useFilter() {
  const snap = useSnapshot(state);

  return {
    ...snap,
    toggleBrand(brand: string) {
      if (state.brands.includes(brand)) {
        state.brands = [...state.brands.filter(b => b !== brand)];
      }
      else {
        state.brands = [...state.brands, brand];
      }
    }
  }
}

Error when I using toggleBrand function:

TypeError: ownKeys target is non-extensible but key is missing from trap result

@pastelmind Are you around?
@sharathprabhal Maybe you want to open a new issue with the reproduction.

I'm nor available at the moment. Hopefully I'll be able to dig into this before the weekend.

I was able to work around the issue by disabling Hermes. All set for now.

I also had the same problem today，Snapshot will cause loss of some abilities.


update reference answers for oops PR

Description
Update answers for pending OOPS PR with same branch name.

3dvar answers changed because qc filters are now only being applied once, at the beginning.

Dependencies

https://github.com/JCSDA/oops/pull/799 needs to be merged first

We plan to merge the oops PR soon (tomorrow, hopefully). This soca PR was merged early, and then reverted; I think you'll need to resurrect the branch and reopen the PR.


AUDIT_GUID - Availability Group scenario

Whilst database mirroring is one of the underlying technologies used in Availability Groups, highlighting this for others that may not realise.

@sravanisaluru
Can you review the proposed changes?
Important: When the changes are ready for publication, adding a #sign-off comment is the best way to signal that the PR is ready for the review team to merge.
#label:"aq-pr-triaged"
@MicrosoftDocs/public-repo-pr-review-team


Is it possible for a saga to "trace" the effect "chain"?

I'm curious if there's any way for a generator to get information about where it is being used in the effect "chain" to put some trace clues in logs. I'm thinking something like so:
function* sagaOne() {
  const sagaInfo = yield call(getSagaInfo);
  console.log('something important', sagaInfo.effectIds);
  const value = yield call(sagaTwo);
  console.log('the value is', value, sagaInfo.effectIds);
}

function* sagaTwo() {
  const sagaInfo = yield call(getSagaInfo);
  console.log('something else important', sagaInfo.effectIds);
  return 2;
}

I'm imagining the log output might be something like so:
something important [1, 2]
something else important [1, 2, 3]
the value is 2 [1, 2]

And we could then reconstruct a trace of effects that are all strung together. Since there may be any number of effects going on simultaneously, our logs are hard to trace, as async things are not sequential.

Did you tried  simlple-saga-monitor  ?

I assumed using the saga monitor would be part of the equation. I'm just not sure if there's a way to match up monitor data and an effect, i.e.: yield call(getSagaMonitorDataForCurrentEffect)

You will be able to inspect the payload as well.

Saga monitor is where, historically, our effort has gone into tracability.
Having said that, saga-query is a new experimental library that acts as a middleware system for your sagas using express-like middleware.
Using that system, tracability is dramatically improved because you can easily attach loggers to most of your sagas.


Home-Assistant Lovelace stays at page Initializing

Describe the bug
When connecting to http://<IP_ADDRESS>:8123 the page loads with the HA logo and stays on 'Initializing'. At the bottom the is shortly a long URL that looks like a URL redirect.
Expected behavior
Load the page :)
Smartphone (please complete the following information):

Device: Samsung GTN8013
OS: Android 6.01 (cyanogenmod 13.0-201)
Browser: standard chrome
Version: 79.0.3945.93

Additional context
I tried with legacy version and latest but same result.
Opening the HA page with chrome works.
I changed HA to authorize with trusted networks in stead of multiple users but same result.
Nothing to see in the log of HA.

This is not a bug with the application, this is either browser incompatibility with the HA page or an issue with HA.

thanks mister thanksmister,
yes I look further and for the legacy I didn't see that there was a config setting for the browser. I choose the crosswalk browser and it loaded. Sorry for my mistake.
Maybe I will post this behaviour on HA forum (or buy a new tablet, but it still works :().
BTW Tx for your app and KUTGW (it is all what is needed for a wallpanel :p)
Mario


Revel installation failing

I have started getting this issue from last 1 hour

failed installing packages: failed cloning repo for package github.com/revel/revel: exit status 1 [exit status 1 github.com/dkulchenko/bunch/packages.go:90: failed cloning repo for package github.com/revel/revel github.com/dkulchenko/bunch/packages.go:593: ]

Please help

@paritosh90 how do you install revel

go get github.com/revel/cmd/revel
On Tue, Aug 22, 2017, 5:11 AM Rambone<EMAIL_ADDRESS>wrote:

@paritosh90 https://github.com/paritosh90 how do you install revel
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/revel/revel/issues/1227#issuecomment-324007071, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABUsBmGP8jErgAe2E-cHTglsBXcN6wkBks5sasVcgaJpZM4O9X35
.

There was an issue in cloning of repository. Sorry for trouble.
I am using Bunch (https://github.com/dkulchenko/bunch) for dependency management.

We use a similar one, see process here revel/meta#11


Encode array of tuples

Is there a way to encode an array of tuples?  Would like to do the following in ethc but didn't seem like it was supported
from eth_abi.abi import encode

print(encode(("(uint64,uint64)[]",),([(1,2),(3,4)],)).hex())

Is there a way to encode an array of tuples? Would like to do the following in ethc but didn't seem like it was supported
from eth_abi.abi import encode

print(encode(("(uint64,uint64)[]",),([(1,2),(3,4)],)).hex())

Hello brother. If you are asking encoding of ABI that contains array, You can do like this
for Instance, when u decode a data for uniswap's getAmountsOut method, u can code like this
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ethc/abi.h>
#include <ethc/unit.h>
#include <ethc/hex.h>
#include <string.h>

using namespace std;
#define ok(ethcop) assert(ethcop >= 0)

int main()
{
   string pathA="0x55d398326f99059ff775485246999027b3197955", pathB="0xe9e7cea3dedca5984780bafc599bd69add087d56", exchangeAddress="0xe9e7cea3dedca5984780bafc599bd69add087d56";
   uint64_t amt=10000000000;
    char *a, *b, *c;
    a = strdup(pathA.c_str());
    b = strdup(pathB.c_str());

    struct eth_abi abi;
    string function = "getAmountsOut(uint256,address[])";
    char *fn = strdup(function.c_str()), *hex;
    uint64_t arraySize = 2;
    size_t hexlen;
    eth_abi_init(&abi, ETH_ABI_ENCODE);
    eth_abi_call(&abi, &fn, NULL);
    eth_abi_uint64(&abi, &amt);
    eth_abi_array(&abi, &arraySize);  //array begin
        eth_abi_address(&abi, &a);
        eth_abi_address(&abi, &b);
    eth_abi_array_end(&abi);          //array end
    eth_abi_call_end(&abi);
    ok(eth_abi_to_hex(&abi, &hex, &hexlen));
    ok(eth_abi_free(&abi));
    cout <<"0x"<< hex << endl;
}

@mhw0 @DerXanRam thanks for the quick response!  I actually tried that and a got different result than my python script
Python result
000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004

Using nested array
#include <stdio.h>
#include <stdlib.h>
#include <ethc/abi.h>
#include <ethc/hex.h>

int main(void) {
  struct eth_abi abi;

  uint64_t a = 1, b = 2, c = 3, d = 4;
  eth_abi_init(&abi, ETH_ABI_ENCODE);
  eth_abi_array(&abi, NULL);
    eth_abi_array(&abi, NULL);
      eth_abi_uint64(&abi, &a);
      eth_abi_uint64(&abi, &b);
    eth_abi_array_end(&abi);
    eth_abi_array(&abi, NULL);
      eth_abi_uint64(&abi, &c);
      eth_abi_uint64(&abi, &d);
    eth_abi_array_end(&abi);
  eth_abi_array_end(&abi);

  char *hex;
  size_t hexlen;
  eth_abi_to_hex(&abi, &hex, &hexlen);

  printf("%s\n", hex);
  eth_abi_free(&abi);
  free(hex);
  return 0;
}

Result
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004

Also tried this
#include <stdio.h>
#include <stdlib.h>
#include <ethc/abi.h>
#include <ethc/hex.h>

int main(void) {
  struct eth_abi abi;

  char* fn = "(uint64,uint64)";
  uint64_t a = 1, b = 2, c = 3, d = 4;
  eth_abi_init(&abi, ETH_ABI_ENCODE);
  eth_abi_array(&abi, NULL);
    eth_abi_call(&abi, &fn, NULL);
      eth_abi_uint64(&abi, &a);
      eth_abi_uint64(&abi, &b);
    eth_abi_call_end(&abi);
    eth_abi_call(&abi, &fn, NULL);
      eth_abi_uint64(&abi, &c);
      eth_abi_uint64(&abi, &d);
    eth_abi_call_end(&abi);
  eth_abi_array_end(&abi);

  char *hex;
  size_t hexlen;
  eth_abi_to_hex(&abi, &hex, &hexlen);

  printf("%s\n", hex);
  eth_abi_free(&abi);
  free(hex);
  return 0;
}

Result
000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040a111f3f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020a111f3f00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004

@mhw0 @DerXanRam thanks for the quick response!  I actually tried that and a got different result than my python script
Python result
000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004

Using nested array
#include <stdio.h>
#include <stdlib.h>
#include <ethc/abi.h>
#include <ethc/hex.h>

int main(void) {
  struct eth_abi abi;

  uint64_t a = 1, b = 2, c = 3, d = 4;
  eth_abi_init(&abi, ETH_ABI_ENCODE);
  eth_abi_array(&abi, NULL);
    eth_abi_array(&abi, NULL);
      eth_abi_uint64(&abi, &a);
      eth_abi_uint64(&abi, &b);
    eth_abi_array_end(&abi);
    eth_abi_array(&abi, NULL);
      eth_abi_uint64(&abi, &c);
      eth_abi_uint64(&abi, &d);
    eth_abi_array_end(&abi);
  eth_abi_array_end(&abi);

  char *hex;
  size_t hexlen;
  eth_abi_to_hex(&abi, &hex, &hexlen);

  printf("%s\n", hex);
  eth_abi_free(&abi);
  free(hex);
  return 0;
}

Result
00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004

Also tried this
#include <stdio.h>
#include <stdlib.h>
#include <ethc/abi.h>
#include <ethc/hex.h>

int main(void) {
  struct eth_abi abi;

  char* fn = "(uint64,uint64)";
  uint64_t a = 1, b = 2, c = 3, d = 4;
  eth_abi_init(&abi, ETH_ABI_ENCODE);
  eth_abi_array(&abi, NULL);
    eth_abi_call(&abi, &fn, NULL);
      eth_abi_uint64(&abi, &a);
      eth_abi_uint64(&abi, &b);
    eth_abi_call_end(&abi);
    eth_abi_call(&abi, &fn, NULL);
      eth_abi_uint64(&abi, &c);
      eth_abi_uint64(&abi, &d);
    eth_abi_call_end(&abi);
  eth_abi_array_end(&abi);

  char *hex;
  size_t hexlen;
  eth_abi_to_hex(&abi, &hex, &hexlen);

  printf("%s\n", hex);
  eth_abi_free(&abi);
  free(hex);
  return 0;
}

Result
000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040a111f3f000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020a111f3f00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004

Do u tried  @mhw0 solution ? I think that's the correct solution .

@DerXanRam Yes, the first code block is his solution, although I didn't set the len field because it's ignored during encoding.

Okay, I think the library can't encode tuples. I'll open an issue. Thanks!


style: prefer string template

Codecov Report

Merging #98 (0093916) into master (d526a0f) will not change coverage.
The diff coverage is 86.95%.

@@           Coverage Diff           @@
##           master      #98   +/-   ##
=======================================
  Coverage   90.62%   90.62%
=======================================
  Files          30       30
  Lines         736      736
  Branches      113      113
=======================================
  Hits          667      667
  Misses         69       69

Flag
Coverage Δ

unittests
90.62% <86.95%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/command/email/exit-helper.ts
90.90% <0.00%> (ø)

src/command/slack/exit-helper.ts
88.23% <0.00%> (ø)

src/services/rss/snowball/message.ts
100.00% <ø> (ø)

src/command/on-exit.ts
100.00% <100.00%> (ø)

src/command/post-manager/producer.ts
100.00% <100.00%> (ø)

src/command/qq/consumer-handler.ts
100.00% <100.00%> (ø)

src/services/qq-service.ts
100.00% <100.00%> (ø)

src/services/rss/snowball/service.ts
100.00% <100.00%> (ø)

src/services/slack-service.ts
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

Codecov Report

Merging #98 (0093916) into master (d526a0f) will not change coverage.
The diff coverage is 86.95%.

@@           Coverage Diff           @@
##           master      #98   +/-   ##
=======================================
  Coverage   90.62%   90.62%
=======================================
  Files          30       30
  Lines         736      736
  Branches      113      113
=======================================
  Hits          667      667
  Misses         69       69

Flag
Coverage Δ

unittests
90.62% <86.95%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

src/command/email/exit-helper.ts
90.90% <0.00%> (ø)

src/command/slack/exit-helper.ts
88.23% <0.00%> (ø)

src/services/rss/snowball/message.ts
100.00% <ø> (ø)

src/command/on-exit.ts
100.00% <100.00%> (ø)

src/command/post-manager/producer.ts
100.00% <100.00%> (ø)

src/command/qq/consumer-handler.ts
100.00% <100.00%> (ø)

src/services/qq-service.ts
100.00% <100.00%> (ø)

src/services/rss/snowball/service.ts
100.00% <100.00%> (ø)

src/services/slack-service.ts
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


<type_traits> for HLSL

Is your feature request related to a problem? Please describe.
Now that HLSL supports C++ templates with SFINAE, we should ship a set of C++-compatible type_traits interfaces.
Describe the solution you'd like
We should audit the C++ type_traits header and ship most (or all) of it for HLSL.
Describe alternatives you've considered
We could just extend the HLSL language with more and more compile-time reflection capabilities, but matching C++ would be more in line with the language direction.

Well, as for the reflection, you could merge the Clang Reflection TS and use the C++20 concepts based reflection, I've used it before to autogen WASM embind bindings for C++ classes and structs in a production-like environment (my reflection utility header was over 1000 lines).
Its quite nice and I found it to be just as stable as DXC (some select things you can work around crash it).
It could probably also help push the Reflection TS across the finish like for actual C++29 or something
https://clementpirelli.wordpress.com/2021/12/08/cpp-reflection-ts-first-look/
P.s. I have a permissively licensed (Apache 2.0) header which tries to polyfill for type_tratis although in a different namespace to std:: because we have a tendency to include our HLSL2021 headers in both C++ and HLSL.
https://github.com/Devsh-Graphics-Programming/Nabla/blob/41be49ce6c9d4bbab52abfab488e1027e71c4e2e/include/nbl/builtin/hlsl/type_traits.hlsl

This may be useful for https://github.com/microsoft/hlsl-specs/blob/main/proposals/0003-numeric-constants.md as well.

This may be useful for https://github.com/microsoft/hlsl-specs/blob/main/proposals/0003-numeric-constants.md as well.

C++ style Numeric constants won't work in HLSL because you don't have constexpr methods.
This makes any numeric_limits<float> impossible (cause floats can't be constexpr or const static inline member initialized then considered a compile time constant)
What we've had to do, is work around this stuff with storing floatN_t as uintN_t because HLSL's asuint and asfloat behave as-if they're supposedly constexpr!?

Capturing this blurb of template goop on this issue since it is useful:
template<typename T>
struct IsVectorType {
  constexpr static bool Value = false;
};

template <typename T, uint N>
struct IsVectorType<T __attribute__((ext_vector_type(N)))> {
  constexpr static bool Value = true;
};

template <typename T>
struct VectorTypeInfo;

template <typename T, uint N>
struct VectorTypeInfo<T __attribute__((ext_vector_type(N)))> {
  using Type = T;
  constexpr static uint Size = N;
};

export uint Test() {
  if (IsVectorType<VectorTypeInfo<float2>::Type>::Value)
    return VectorTypeInfo<uint3>::Size;
  if (IsVectorType<float4>::Value)
    return VectorTypeInfo<uint2>::Size;
};

This is something we should include in our type traits header.


Nightly macOS app crashes at launch

Lapce Version
nightly
System information
macOS 14.0 (23A344)
Describe the bug
As a macOS app, lapce nightly / current master crashes right after launch.
Running lapce via cargo run is not affected by this.
Additional information
2023-10-25T20:46:44.663584Z ERROR wgpu::backend::direct: Handling wgpu errors as fatal by default
thread 'main' panicked at /Users/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.17.0/src/backend/direct.rs:3056:5:
wgpu error: Validation Error

Caused by:
    In Device::create_texture
      note: label = `atlas_texture`
    Texture format Rgba8Unorm can't be used due to missing features
    Features Features(DEPTH_CLIP_CONTROL) are required but not enabled on the device

stack backtrace:
   0:        0x103cd8928 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h6d4268b2ed62fb94
   1:        0x102bc7fe4 - core::fmt::write::h5d55d44549819258
   2:        0x103cb2ca8 - std::io::Write::write_fmt::hc515897f91abd6cf
   3:        0x103cdcf00 - std::sys_common::backtrace::print::h2c300c1ebedfc73c
   4:        0x103cdcb48 - std::panicking::default_hook::{{closure}}::h0aa9be5c44269370
   5:        0x103cdda2c - std::panicking::rust_panic_with_hook::h84c8637cb6e56008
   6:        0x103cdd590 - std::panicking::begin_panic_handler::{{closure}}::h25482adda06c7b7f
   7:        0x103cdd504 - std::sys_common::backtrace::__rust_end_short_backtrace::h0c6f3beb22324a29
   8:        0x103cdd4f8 - _rust_begin_unwind
   9:        0x1044af428 - core::panicking::panic_fmt::h9072a0246ecafd14
  10:        0x10404869c - core::ops::function::Fn::call::h1d88c092ed5dcb25
  11:        0x1040ecad0 - <T as wgpu::context::DynContext>::device_create_texture::hbf23c7e3c487d6ae
  12:        0x103e5f58c - vger::glyphs::GlyphCache::new::he0b8c620d45de478
  13:        0x102d4340c - floem::app_handle::ApplicationHandle::new_window::ha2f62eaab3947a66
  14:        0x10374f638 - lapce_app::app::launch::hba813e443164f54e
  15:        0x102b4a3ac - std::sys_common::backtrace::__rust_begin_short_backtrace::hfd082b4bb1f4c56a
  16:        0x102b4a604 - _main

Has been fixed recently. Probably by an update of floem.


Problem connecting things and channels using SDK

When i try to connect things and channels aI get follwing error using SDK
mainflux-cli -m http://mainflux.ml provision connect conns $TOK
failed to connect thing to channel : 400 Bad Reques
➜  certs git:(master) ✗ cat conns
{
    "thing_ids": [
        "173f51a0-fcb7-414e-983c-e7f139adb47b",
    ],
    "channel_ids": [
        "a584642e-0225-4d5c-b4af-8d21ec9210a6",
    ]
}

@mteodor I just tested and it works. The JSON that you are using is not good, you have an extra , after IDs.

yes @manuio it works, file needs extension .json or .csv which wasnt clear to me from the docs

@mteodor which docs and were the docs fixed?

Fixed with https://github.com/mainflux/docs/pull/31


Can't init enough connections amount

Hi,
I am trying to connect to redis using RedissonClient. When I create the client without any configuration it works. However, whenever I try to pass the configuration as parameter it gives the following error,
" org.redisson.client.RedisConnectionException: Can't init enough connections amount! from /<IP_ADDRESS>:6397"
By default it is using the same port and host. But when I try to enter it using the config param it gives me the error.
Following is the code snippet,
Config config = new Config();
String address = "<IP_ADDRESS>:6397";
config.useSingleServer().setAddress(address).setConnectionPoolSize(10);
client = Redisson.create(config);
Redis version : 3.0.6
Redisson version: 2.2.4
Jdk 1.8
Any suggestion?
Thanks.

oh! it seems like you have misprint in port number 6397 but default port is 6379

Thanks. How silly it was!!


GH-47 Multi-select support for

Multi-select support for Dropdown

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
3
❗

❗ custom/widgets-heart-rate--hint-opened__[w1920px]:

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w390px]:

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w900px]:

Before
After

Shot Type
Count
Status

Added
24
🟡

Deleted
0
❌

Regression
8
❗

🟡 storybook/components-multiple-dropdown--basic__[w1440px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--basic__[w1920px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--basic__[w390px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--basic__[w900px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--custom__[w1440px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--custom__[w1920px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--custom__[w390px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--custom__[w900px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--no-items__[w1440px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--no-items__[w1920px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--no-items__[w390px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--no-items__[w900px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--opened__[w1440px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--opened__[w1920px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--opened__[w390px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--opened__[w900px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--simple__[w1440px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--simple__[w1920px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--simple__[w390px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--simple__[w900px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--single__[w1440px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--single__[w1920px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--single__[w390px] (click to expand)

Image

🟡 storybook/components-multiple-dropdown--single__[w900px] (click to expand)

Image

❗ storybook/components-card--item-card__[w1440px] (click to expand)

Before
After

❗ storybook/components-card--item-card__[w1920px] (click to expand)

Before
After

❗ storybook/components-card--item-card__[w390px] (click to expand)

Before
After

❗ storybook/components-card--item-card-action__[w390px] (click to expand)

Before
After

❗ storybook/components-card--item-card-action__[w900px] (click to expand)

Before
After

❗ storybook/components-card--item-card-avatar__[w1440px] (click to expand)

Before
After

❗ storybook/components-card--item-card-avatar__[w1920px] (click to expand)

Before
After

❗ storybook/components-card--item-card-avatar__[w900px] (click to expand)

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
4
❗

❗ custom/widgets-heart-rate--hint-opened__[w1440px]:

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w1920px]:

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w390px]:

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w900px]:

Before
After

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
0
❗

Shot Type
Count
Status

Added
0
🟡

Deleted
0
❌

Regression
2
❗

❗ custom/widgets-heart-rate--hint-opened__[w1440px]:

Before
After

❗ custom/widgets-heart-rate--hint-opened__[w1920px]:

Before
After


Here is the Clean up

These are my ideas for some clean up. When you get time please take a look. If there is anything you want changed, or changed back, let me know. I tried to remove some unclear wording I had. Also fixed some errors in descriptions and a few wrong Parameters listed. etc.

I was wondering if you remember what changes you didn't like in these commits? I just noticed you reverted these and there's some errors I corrected that I'll need to go and re-fix. But wanting to know what part you didn't like so I can skip those pieces.

Will take a look in GHDesktop tomorrow.

Okay, thank you.


Add a Gitter chat badge to README.md

drepl/drepl now has a Chat Room on Gitter
@wilzbach has just created a chat room. You can visit it here: https://gitter.im/drepl/drepl.
This pull-request adds this badge to your README.md:

If my aim is a little off, please let me know.
Happy chatting.
PS: Click here if you would prefer not to receive automatic pull-requests from Gitter in future.

argh - the bot isn't that smart. will open a PR manually :/


Images missing - Dataflow

Hi,
I am trying to create the cluster for dataflow by following the examples. But could see the images are not available. Is there anyway to test this example.
browseservice:-
Failed to pull image "gcr.io/cloud-solutions-images/sample-browse-service:latest": rpc error: code = 2 desc = Error: Status 405 trying to pull repository cloud-solutions-images/sample-browse-service: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with dockerd --disable-legacy-registry. See https://cloud.google.com/container-registry/docs/support/deprecation-notices"
Error syncing pod, skipping: failed to "StartContainer" for "sample-browse-service" with ErrImagePull: "rpc error: code = 2 desc = Error: Status 405 trying to pull repository cloud-solutions-images/sample-browse-service: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with dockerd --disable-legacy-registry. See https://cloud.google.com/container-registry/docs/support/deprecation-notices""
home-service
Failed to pull image "gcr.io/cloud-solutions-images/sample-home-service:latest": rpc error: code = 2 desc = Error: Status 405 trying to pull repository cloud-solutions-images/sample-home-service: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with dockerd --disable-legacy-registry. See https://cloud.google.com/container-registry/docs/support/deprecation-notices"
Error syncing pod, skipping: failed to "StartContainer" for "sample-home-service" with ErrImagePull: "rpc error: code = 2 desc = Error: Status 405 trying to pull repository cloud-solutions-images/sample-home-service: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with dockerd --disable-legacy-registry. See https://cloud.google.com/container-registry/docs/support/deprecation-notices""
container "sample-home-service" in pod "home-service-xlp42" is waiting to start: trying and failing to pull image
container "sample-browse-service" in pod "browse-service-nq94f" is waiting to start: trying and failing to pull image

Will somebody ever fix this problem?
Handler for GET /v1.27/images/apache-docker-apache.bintray.io/beam/go:latest/json returned error: No such image: apache-docker-apache.bintray.io/beam/go:latest

Error syncing pod a46640608edd9da05bf3cee5415014a3 ("dataflow-go-job-1-1540507485039991-10251544-rbkn-harness-bffj_default(a46640608edd9da05bf3cee5415014a3)"), skipping: failed to "StartContainer" for "sdk" with ImagePullBackOff: "Back-off pulling image \"apache-docker-apache.bintray.io/beam/go:latest\""

while reading 'google-dockercfg' metadata: http status code: 404 while fetching url http://metadata.google.internal./computeMetadata/v1/instance/attributes/google-dockercfg

I assume this bug is one year old already

Not including the images in such an official demo gives a quite depressing learning experience.

This happens to me - I tried to rebuild the container and push to a container registry as suggested in https://stackoverflow.com/questions/53823677/google-cloud-data-flow-jobs-failing-with-error-failed-to-retrieve-staged-files (and also in the beam docs https://github.com/apache/beam/blob/master/sdks/CONTAINERS.md).
But even though I can list the container:
gcloud  container images list-tags gcr.io/myproj-batch/ingo-beamgo
DIGEST        TAGS           TIMESTAMP
19aad44544ab  custom,latest  2019-02-18T09:13:16

the Stackdriver logs on Cloud Dataflow indicate it can't be fetched.
2019-02-18 10:56:23.618 CET
Handler for GET /v1.27/images/gcr.io/myproj-batch/ingo-beamgo:latest/json returned error: No such image: gcr.io/cuh-batch/ingo-beamgo:latest

while reading 'google-dockercfg-url' metadata: http status code: 404 while fetching url http://metadata.google.internal./computeMetadata/v1/instance/attributes/google-dockercfg-url

while reading 'google-dockercfg' metadata: http status code: 404 while fetching url http://metadata.google.internal./computeMetadata/v1/instance/attributes/google-dockercfg

As of the most recent merge, the images have been renamed.  They have also been rebuilt and persisted in the GCP Container Registry.

@googledrew I have some issue, and I rebuild the image and push to the container register on GCP, however, the error keeps coming back as:

failed to "StartContainer" for "sdk" with ImagePullBackOff:

Any Idea? Thank you


libcommon: Provide RSS details metrics

What problem does this PR solve?
Issue Number: ref #9032
Problem Summary:
What is changed and how it works?
Provide detailed RSS metrics (since Linux 4.5), so that we can learn mmap RSS usage. This is important for Vector Search.
Note: After this PR, libprocess_metrics is always used no matter TiFlash proxy is enabled or not. But it will not produce duplicated metrics and only provide extra metrics (like RSS details) when TiFlash proxy is enabled.

Linux 4.5 is shipped with these distributions:
- Ubuntu 18.04 LTS
- CentOS 8.0
Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/retest


Feature: Quote of the Day

Overview:
This feature enhances the user experience by displaying a motivational or thought-provoking quote each day. It adds a creative and engaging touch to the homepage, encouraging users to revisit the application daily.
Functionality:
Sun Icon in Navbar:
A sun icon is added to the navigation bar, symbolizing positivity and a new day. The icon is easily recognizable and accessible, making it intuitive for users to click.
Random Quote Generation:
Upon clicking the sun icon, a random quote is fetched from an external quote API, such as "Quote Garden" or "They Said So". This quote will serve as the "Quote of the Day" for the user.
User Experience:
Once clicked, a pop-up or modal will appear, displaying the randomly fetched quote.
The "Quote of the Day" remains consistent throughout the day for each user, only updating at the start of a new day.
API Integration:
The feature integrates with a third-party quote API, which provides a vast array of quotes. This ensures that each day's quote is unique and inspirational, enhancing user engagement.

Please assign this issue to me under hacktoberfest24


[SMALL] Low-hanging cleanups

Changes

Move OperationHandlers.cs for easier debugging
Remove short form of --schema (fixes #4677)
Remove #if DNX451
Canonicalize project.json

Superseded by #4733


Zookeeper 3.5.1-alpha

Would you be open to a PR adding 3.5.1-alpha (not as latest, just the tag)?

I just pushed up a 3.5.1-alpha tag to docker hub.  Can you try it out?

Thank you. Works great.


Fix unnest for array of rows

The Unnest operator unfolds arrays of rows into a single column containing the row elements, which is referred to as legacy unnest in Presto. Unnest is expected to unfold each row element into as many columns as the row's cardinality, which is currently not supported in Velox. The following error is therefore seen in Prestissimo, since four integer columns are expected in the output but the legacy implementation of unnest returns two columns of row elements:
select * from unnest(ARRAY[row(2, 3), row(3, 5)], ARRAY[row(20, 30), row(30, 50)]) AS r(r1, r2, r3, r4);:

Field not found: field_1. Available fields are: field, field_0.

This PR adds support to unnest arrays of rows completely and fixes the above error. Legacy unnest will not be supported in Prestissimo and a follow-up PR in Prestodb will add the check to fail fast in case legacy unnest is requested. Resolves https://github.com/prestodb/presto/issues/20643

@pramodsatya : There were bunch more changes to get this right. We should close this in favor of https://github.com/facebookincubator/velox/pull/7477


kvm: use diagnostic messages for diagnostics

This switches the kvm package to using a diagnostic logger whose
messages are only sent to stderr when debugging is switched on.
Otherwise messages are discarded.

This is another go at what  PR #2689 was doing. This doesn't require methods to have an added debug parameter.

LGTM


Dockerize Clearance UI

Details in commits.

I'll actually add the publishing action to this PR as well.


Feature/versionable documentation module

Module with documentation that will go to GitHub wiki.
I hereby agree to the terms of the Knot.x Contributor License Agreement.

Merge conflicts


Allow changing the model to use

This PR adds a -m flag which lets the user switch between the tts-1 and tts-1-hd models.

This would fix https://github.com/simonw/ospeak/issues/10

I'm going to merge this and then apply Tom's suggestion.


Add an option to specify port or port range to use

As far as I can tell, playactor has a "bind-port" option, but it doesn't look like this plugin has any way of setting that up in the config to be passed through to the playactor library.
I'm using a firewall on my Raspberry Pi and because the plugin seems to use a completely random port, I've had to set it up to allow all ports coming from the PS5. It's not a big deal, but it would definitely be better to have the option of specifying a port to use instead.

Thanks for the suggestion - I can try to implement something like that.


Suggestion: URL logging for API calls

I have not found a way to easily turn on logging of API calls (the URL that is formatted by the SDK, and the exact endpoint that is actually hit), and the exact response. Ideally you would be able to set various "verbose" logging as well, and set a log file to write out to.

This may be related to issue #52, albeit that issue only requested endpoint information when an exception occurs, rather than allowing a developer to trace all endpoint calls (which is also handy!).

This is a bit different, because you are looking for the actual REST API calls that are actually part of the symphony-java-api language binding and not SJC.
SJC -->symphony-java-api-->REST API Endpoints
Here's some good news as the binding is Jersey2 and supports LoggingFeature, which is accessible from SJC!  With the following you will see all underlying calls.  If you really want to log it to a file, you can always create your own client with a logger to capture messages..or use logback and set by namespace.
Try this:
  //Create an initialized client
        symClient = SymphonyClientFactory.getClient(
                SymphonyClientFactory.TYPE.V4,symphonyClientConfig);

        symClient.getAgentHttpClient().property(
        LoggingFeature.LOGGING_FEATURE_VERBOSITY_CLIENT,
        LoggingFeature.Verbosity.PAYLOAD_ANY);

        symClient.getAgentHttpClient().property(
        LoggingFeature.LOGGING_FEATURE_LOGGER_LEVEL_CLIENT,
       "WARNING");

Please close if you are happy with this response...


Ability to have the coverage table only show coverage information for the files that changed in the PR.

Hi, first of all I love this action! However, with a massive project with a lot of files, I think it would be awesome if there was a way to filter the coverage comment to only show coverage information for the files that were changed in the PR, rather than ALL files. Thanks!

I've already implemented this feature in v1.0.6 (the current version is v1.0.8).
you can just pass report-only-changed-files: true more-info
example:
- name: Jest coverage comment
  uses: MishaKav/jest-coverage-comment@main
  with:
    coverage-summary-path: ./coverage/coverage-summary.json
    coverage-path: ./coverage.txt
    report-only-changed-files: true

oh ok thank you!!!


Add a very simple plugin to call issue Dash queries from the command-line

Description pretty much says it all.

Checkout #2557

Merged #2557 instead.


grandorgue: 0.3.1-r2333 -> 3.8.0-1, add darwin support

Description of changes
https://github.com/GrandOrgue/grandorgue/releases/tag/3.8.0-1
Things done

Built on platform(s)

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

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

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

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

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

[x] Fits CONTRIBUTING.md.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-ready-for-review/3032/1279


Command not found

Following
yarn add svelte-sitemap --dev

It says I get<EMAIL_ADDRESS>version
When I try to run svelte-sitemap in some way in terminal on mac I get:

zsh: command not found: svelte-sitemap

It's the same with installing the npm package

Hi @Lelelo1,
It looks like you have the library installed locally in the project folder (which is correct).
But then it has to be called like this:
yarn svelte-sitemap
# npm run svelte-sitemap

Let me know how it works ;)

@bartholomej I am having the same problem and it seems the documentation is not complete. Can you define better where to put the JS content (which file and context) and how to run the script when you build the site?
Even after installing locally, it doesn't work. Thanks!!!!

Hi @silvestrevivo,
I have slightly edited the documentation to make it clear that there are two different ways how to use this library.
As you can see, I recommend the CLI option as a postbuild hook. In the vast majority of cases, this is what you want ;)
Also see this example
{
  "name": "my-project",
  "scripts": {
    "postbuild": "npm run svelte-sitemap --domain https://mydomain.com"
  }
}

PS: If you prefer the JS/TS option, then TypeScript version is automatically available for you.
I hope it's clear now and will work for you ;)

@bartholomej thanks for the answer. For that I have to install the dependency globally. I would like to know how to run the package when I am in development or production, but installing locally. Thanks!

@silvestrevivo
Honestly, I'm not quite sure what problem you're solving :)
Can you write a bit more about how you proceeded?
Is it that the package now can't be called and says command not found: svelte-sitemap, as originally mentioned in this issue?
Where are you calling the script from and how are you calling it?
Is it necessary to install the package globally for you? It's always better to install it locally – directly to the project.
If you install it locally, then you can call npm run svelte-sitemap and it will work in some CI/CD container as well.

@bartholomej I am installing the package locally and then adding the "postbuild" script as you mentioned in my package.json and I get this error when I run npm run build:
missing script: svelte-sitemap
Since the package is globally installed, the script is missed locally. I hope this makes sense :)


Add Django Util With Decorator and Views

This Django extension adds the views, decorators, and signals to oauth2client.
This is heavily based on the work @jonparrott did for oauth2client/flask_util.
Currently the only storage offered uses Django sessions. Based on issue #319 more storage options are planned along with integration to the existing CredentialsField in django_orm.
This adds an environment variable to the tox script. This might not be strictly necessary, but it did simplify the tests a lot, since Django settings get looked up at import time and cached so it's easiest if they have an environment variable pointing to an existing settings module when the tests are started.
This could have been squeezed into a single file, but  I spilt it into separate files based on existing Django extension conventions.

All new files added should have 100% coverage (towards #212).
From:
https://coveralls.io/builds/3925551
The following have less than 100%:

django_util/apps.py: 0%
django_util/storage.py: 89.47%
tests/test_django_util.py: 98.05% (every line that isn't run should be removed or pragma: NO COVERed)

Running tox -e cover locally it also looks like
oauth2client/django_util/storage.py         19      2      4      0    83%   51-52
oauth2client/django_util/views.py           62      0     10      1    99%   133->135

If running the tests create db.sqlite3, you should add it to the .gitignore.

@dhermes thanks for taking a look, I now I have 100% coverage on all the main files and fixe the gitignore. The test file is still missing 3 lines, I added #pragma: no cover, since they are test views and the point is that the decorator redirects before they are run. I could maybe mock them but I think it's clearer to have them as functions with the decorator...but for some reason coverage isn't respecting the pragma. Investigating why...

Check out .coveragerc the NO COVER has to be uppercase. (I just did git grep -i pragma to get an idea.)

Wow, thanks for the headsup on the pragma case sensitivity, it was really confusing me, forgot to check all the hidden files! Ok, now I should have 100% test coverage. I also added NO COVER to apps.py as well, it's covered in 2.7+ but it skips the code in 2.6, and since the 2.6 case isn't run by coverage the 'else' branch isn't covered. It's basically just a metadata class for recent Django versions, which dropped support for 2.6 and so the version of Django tox installs for 2.6 doesn't have the imports.
So I think this is ready for further review or merge whenever you or nathaniel find the time. jonparrot already did a review.

Summoning @anthmgoogle, he should give this a review as well.

Sorry, I don't plan on reviewing (not enough cycles). I was just "protecting" my work towards #212 by making sure big changes were fully tested.
I actually took a stab at testing django_orm.py and stopped at the point that I'd need a test DB. Now that you've added one, maybe you could easily cover the rest of django_orm.py (just the Storage class) and get us one step closer to 100% coverage?

I am able to review this but it would be best if I were last. Poke me after both @jonparrott and @anthmgoogle are satisfied?

@dhermes Will do, thanks for the help. I planned to do that in a separate PR as part of Storage improvement efforts but I could add it onto this one. Also curious if it would make sense to move django_orm into this package or if that's not ok since it breaks existing code (I'm guessing it's ok since this library has releases).
@nathanielmanistaatgoogle sounds good to me, @jonparrott already took a look (and it's a lot of extremely similar code to his own) but I'll hold off for @anthmgoogle and ping you after.

I'm satisfied in terms of overall approach, parity with flask_util, documentation, and style (though I'm not nearly as thorough as Nathaniel). @anthmngoogle to confirm it fits with his expectations to satisfy #223.

@waprin You should do it in a separate PR. The smaller a PR is, the easier it is on everyone. As for moving django_orm, it seems like the right thing to do. An alias could be set up and deprecated slowly over time (@jonparrott has ideas to this effect).

Finished a review pass. I suggested one follow up feature that could be done at a later time. Some minor suggestions about error messages.
Looking great. Really exciting to see this functionality.

@anthmgoogle Thanks for review, sorry for delay in turnaround. Let me know if you can +1 now and I can pass it along to Nathaniel.
I agree that missing the optional oauth was a major oversight so I added it. Now there are two decorators oauth_required and oauth_enabled, with similar semantics to the webapp2 and flask decorators.  The biggest difference is they attach their instance to the Django request object.
Also based on your comments, I also improved the error messages in the oauth2callback, and reference the Github issue for the pluggable storage feature in the TODO. That is next up on our radar along with some other refactoring.

LGTM.

@nathanielmanistaatgoogle ready for your pass when you have a chance.

I am oversubscribed for the next few weeks but happy to accommodate if necessary; how time-sensitive is this?

I suppose that's up to @anthmgoogle.
I don't want to start on #326, #319, and #225 until this is in, but those are rather long-tail issues.

I've completed a first pass.

@nathanielmanistaatgoogle thanks for taking time to review. I addressed all your comments (by doing what they asked for). Ready for another pass when you are.

@nathanielmanistaatgoogle friendly ping this is still waiting.

@nathanielmanistaatgoogle PTAL now that you're not OOO (not sure if you'll have time in the shortened week)

@nathanielmanistaatgoogle It's the season of giving, perhaps you are ready to give this another pass. I know you are tied up in storage PR atm, just your weekly friendly ping this is still here.

Thank you for your patience; I am finally getting to this in the next hour.
I apologize if this is slow to swap back into my working memory and I ask the same questions I asked last month.

I'm somewhat bothered by the structure of this - rather than a new package with a non-empty __init__.py and several other modules, I would sort of expect behavior like this to land in a django_util.py module in the oauth2client package with other behavior included in package-private helper modules. How much control do we have over how this code is arranged into modules and packages? How strongly is Django pushing the design of this code into its current shape?

Not sure exactly what you mean by package-private helper modules - I am guessing you mean everything that is part of the public API goes in oauth2client/django_util.py and everything else goes into a helper module or two? I originally did this PR as one file, and it wouldn't be too much work to go back. Django doesn't really force you in any technical sense. However, I laid it out the way I did so it mirrors other Django apps/extensions I looked at:
From the Django project::
https://github.com/django/django/tree/master/django/contrib/admin
https://github.com/django/django/tree/master/django/contrib/auth
In the wild:
https://github.com/ui/django-rq/tree/master/django_rq
https://github.com/omab/django-social-auth/tree/master/social_auth
So it's a choice between being closer to Django style or other extensions in this library (like Flask). @jonparrott suggested I make it closer to Django which made sense to me. Also, keep in mind we are probably going to move this to a contrib package anyway, #326, which also tilts my opinion towards keeping closer to Django style.
But, ultimately I'm not super committed to one way or the other, and if you have something else in mind, I'm fine to change it to whatever you'd like.

Yeah, I'm now persuaded that the way this is laid out is just fine.
What's with the failing test result?
Does this need to wait for anything else to go in before it can be merged?

Fix the broken RST in the docstring
Warning, treated as error:
/home/travis/build/google/oauth2client/oauth2client/django_util/decorators.py:docstring of oauth2client.django_util.decorators.oauth_enabled:27: WARNING: Field list ends without a blank line; unexpected unindent.

@nathanielmanistaatgoogle had to rebase, ready to merge when you are.

Now that the contrib directory exists, should this code be placed there?

Yes, if you've rebased, @waprin, might as well go ahead and move it. Otherwise I can just move it when I move everything else.

Ok I'll move it now

Ok, moved to contrib and I did some double manual checking so I think it's good to go. @nathanielmanistaatgoogle

Yay!

Great to see this feature. Thanks all.


AR test cases fails against AR 4.0

 1) DatabaseCleaner::ActiveRecord::Transaction#start using begin_transaction should increment open transactions if possible
     Failure/Error: connection.should_receive(:increment_open_transactions)
       (Mock "connection").increment_open_transactions(any args)
           expected: 1 time with any arguments
           received: 0 times with any arguments
     # ./spec/database_cleaner/active_record/transaction_spec.rb:25:in `block (5 levels) in <module:ActiveRecord>'
  2) DatabaseCleaner::ActiveRecord::Transaction#start using begin_transaction should tell ActiveRecord to increment connection if its not possible to increment current connection
     Failure/Error: ::ActiveRecord::Base.should_receive(:increment_open_transactions)
       (<ActiveRecord::Base (class)>).increment_open_transactions(any args)
           expected: 1 time with any arguments
           received: 0 times with any arguments
     # ./spec/database_cleaner/active_record/transaction_spec.rb:31:in `block (5 levels) in <module:ActiveRecord>'
  3) DatabaseCleaner::ActiveRecord::Transaction#start using begin_db_transaction should increment open transactions if possible
     Failure/Error: connection.should_receive(:increment_open_transactions)
       (Mock "connection").increment_open_transactions(any args)
           expected: 1 time with any arguments
           received: 0 times with any arguments
     # ./spec/database_cleaner/active_record/transaction_spec.rb:25:in `block (5 levels) in <module:ActiveRecord>'
  4) DatabaseCleaner::ActiveRecord::Transaction#start using begin_db_transaction should tell ActiveRecord to increment connection if its not possible to increment current connection
     Failure/Error: ::ActiveRecord::Base.should_receive(:increment_open_transactions)
       (<ActiveRecord::Base (class)>).increment_open_transactions(any args)
           expected: 1 time with any arguments
           received: 0 times with any arguments
     # ./spec/database_cleaner/active_record/transaction_spec.rb:31:in `block (5 levels) in <module:ActiveRecord>'
  5) DatabaseCleaner::ActiveRecord::Transaction#clean manual accounting of transaction count should decrement open transactions if possible
     Failure/Error: connection.should_receive(:decrement_open_transactions)
       (Mock "connection").decrement_open_transactions(any args)
           expected: 1 time with any arguments
           received: 0 times with any arguments
     # ./spec/database_cleaner/active_record/transaction_spec.rb:65:in `block (4 levels) in <module:ActiveRecord>'
  6) DatabaseCleaner::ActiveRecord::Transaction#clean manual accounting of transaction count should decrement connection via ActiveRecord::Base if connection won't
     Failure/Error: ::ActiveRecord::Base.should_receive(:decrement_open_transactions)
       (<ActiveRecord::Base (class)>).decrement_open_transactions(any args)
           expected: 1 time with any arguments
           received: 0 times with any arguments
     # ./spec/database_cleaner/active_record/transaction_spec.rb:82:in `block (4 levels) in <module:ActiveRecord>'

It seems that https://github.com/bmabey/database_cleaner/issues/150 was incomplete.

I still observe this issue with database_cleaner 1.4.1

Still an issue for 1.5.3

Still an issue for 1.6.1


Failed to run config for laravel.nvim - attempt to call method 'executable' (a nil value)

Upon entering a laravel project I now get the following error, though it worked before my vacation:

This is my configuration
local laravel = {
	"adalessa/laravel.nvim",
	dependencies = {
		"nvim-telescope/telescope.nvim",
		"tpope/vim-dotenv",
		"MunifTanjim/nui.nvim",
		"nvimtools/none-ls.nvim",
	},
	cmd = { "Sail", "Artisan", "Composer", "Npm", "Yarn", "Laravel" },
	keys = {
		{ "<leader>la", ":Laravel artisan<cr>" },
		{ "<leader>lr", ":Laravel routes<cr>" },
		{ "<leader>lm", ":Laravel related<cr>" },
		{
			"<leader>lt",
			function()
				require("laravel.tinker").send_to_tinker()
			end,
			mode = "v",
			desc = "Laravel Application Routes",
		},
	},
	event = { "VeryLazy" },
	config = function()
		require("laravel").setup() -- Line 251
		require("telescope").load_extension("laravel")
	end,
}

And my .zshrc contains
export NVIM_LARAVEL_ENV=local

This for sure puzzles me. Since in the code before calling the executable there is a check for nil. Are you still in v1 or have you updated.  I assume you have updated since I the lines matches the last version.
If you run again after loading require('laravel').setup() does it return the same error ?
If still happen, could you do a vim.print(M.environment) on the file laravel/environment/init.lua on line 63?
Tyring to understand what is assigning if is not null but also does not have the expected function.

Closing it for now due to inactivity. If you think this is still an issue please re-open with details.


better dependency resolution in notebooks

Dependency resolution in notebooks is SLOW. Average notebook with dependencies (like some spark packages and custom libs in maven and bintray) loads for ages and gives 2K+ log messages in the browser. And it does not seem to cache dependencies, when I shutdown the notebook and open it again it downloads everything from the network, why do not you use something like coursier cache?
I get about 2K+ browser log messages for average spark-notebook session. Is it also possible to decrease log output somehow or to put it to UI instead of keeping in the browser log? For instance, it writes all attempts to resolve, even if it happens after trying several repos, maybe it is possible to write to log only once and give only attempt with successful resolution?

not sure which spark-notebook/scala versions you have in mind.
hmm, scala 2.11 since very recently already uses the coursier/coursier-cache.
regarding the slowliness  with spark packages, I guess the problem is that coursier doesn't know that core spark libs (and their transitive deps) are already included in the spark-notebook/classpath.
Ideas:

user needs add explicit exclusion rules. e.g. "- org.apache.spark % _ % _" in notebook metadata
SN could somehow generate the default exclusion rules automatically, e.g. based on SN/spark libs.
Another thing to check: whether the exclusion also excludes the transitives of the excluded package.

I think the localRepo should be helpful here
That makes me wonder if we shouldn't inverse the current behavior - all notebooks by default would use the same repo (predefined one like /$(tmp)/spark-notebook-repo). And then for cases where there are potential conflicts because some libraries are under development, the localRepo can be used per notebook to override...
Currently a new repo is created per notebook sessions => download deps funky dance

I also have problems with "io.monix %% monix % 2.3.0" resolution. spark-notebook fails to resolve it for weird reasons

I've added a comment here that might be relevant: https://github.com/monix/monix/issues/379#issuecomment-311896969
If you're having resolution problems, then Coursier might be to blame (because otherwise the only other culprit would be Maven Central's servers and I think Maven Central is pretty reliable).
See for example: https://github.com/coursier/coursier/issues/429


Debug hover information disappears too easily

Type: Bug

Type out the following code into index.js

let x = { a: 1, b: 2, c: 3 };

debugger;

Run node index.js in a debug terminal
Hover x to see its contents
Move your mouse from x to the popup in a diagonal, such that the mouse briefly leaves "x" and the popup, and then moves to the popup

What I would expect:
The popup remains open, because even though the mouse left "x" and the popup for a moment, it is now over the popup.
What actually happens:
The popup remains open for a brief moment, and then closes, even though the mouse is over it.
I recorded a short video illustrating the issue. It's for an older VSCode version but the issue remains the same:
https://github.com/microsoft/vscode/assets/1611595/18845ba5-555c-441f-bbe5-05a922345af0
VS Code version: Code 1.89.0 (b58957e67ee1e712cebf466b995adf4c5307b2bd, 2024-05-01T02:09:22.859Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 6.1.69

System Info

Item
Value

CPUs
AMD Ryzen 5 3600 6-Core Processor               (12 x 3600)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: enabled

Load (avg)
undefined

Memory (System)
31.95GB (10.52GB free)

Process Argv
--crash-reporter-id 83c0d656-767e-4a63-9216-9ad55f624068

Screen Reader
no

VM
0%

Item
Value

Remote
SSH: localhost

OS
Linux x64 6.1.69

CPUs
AMD Ryzen 5 3600 6-Core Processor (4 x 3600)

Memory (System)
15.63GB (13.85GB free)

VM
75%

Extensions (2)

Extension
Author (truncated)
Version

remote-ssh
ms-
0.110.1

remote-explorer
ms-
0.4.3

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492:30256859
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593:30376534
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
ccp2r3:30993541
dsvsc020:30976470
pythonait:31006305
jchc7451:30973076
chatpanelt:31018789
dsvsc021:30996838
jg8ic977:31013176
pythoncenvpt:31022790
dwnewjupytercf:31035177

There's been some overall discussion about this in hovers, @benibenj please fold this into an existing issue if you have one.

Haven't seen such an issue yet. Assigning @aiday-mar as she owns editor-hovers and has been doing work in this area.

Hi yes, I believe the issue here concerns the debug hover which is mostly independent of the editor hover. The editor hover has a configurable hiding delay in the settings which controls how long to wait before hiding the hover when the mouse is outside of the hover.

I'm not familiar with this project, but it seems to me that the issue is about canceling a closing action. The "close later" timer should be started, but when the mouse moves onto the hover, that timer should be cancelled.
My video shows that the mouse is able to get onto the hover, but it closes after that.
https://github.com/microsoft/vscode/assets/1611595/18845ba5-555c-441f-bbe5-05a922345af0

Oh, got it, I misunderstood. That may actually just be a bug in debug land, separate from previous discussion about the 'closer' logic. I'll look into it.

The short delay makes copying variable values on hover very difficult, whereas in prior versions it was working better.
https://github.com/microsoft/vscode/assets/1051118/feaf1b14-4d9f-4daf-9ca2-2dda65128214
Version: 1.89.1 (user setup)
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631


MakerSuite does not work -- instructions ignored.

Hello, I am evaluating Google Palm 2 API and I am using MakerSuite for testing. I must be doing something wrong, but I am not understanding how the "context" prompt input works in MakerSuite. I simply write the following context: "Do not talk about baseball." and also provided an example user/model input stating not to talk about baseball, but when I run the test and ask "What is baseball?", the model responds back talking about baseball:

So, what am I doing wrong?

I don't think you're doing anything wrong. System instructions aren't strictly enforced. This may be better with the Gemini models, but I don't have data on this.

Quick test with the gemini model:
response = model.generate_content(
"""Important: You must not mention baseball in your response.

What are some popular sports in the united states?
- Hockey: Players use sticks to shoot a puck into a net, while other players try to prevent them from doing so.
- Tennis: Players use rackets to hit a ball over a net, with points awarded for successful hits and faults for missed hits or out-of-bounds shots.
- Lacrosse: Players use long-handled sticks with netted ends to catch, carry, and throw a ball, aiming to score by throwing it into a goal.
- Cricket: Players use wooden bats to hit a hard leather ball bowled by an opponent, with runs scored by running between wickets or hitting the ball out of bounds.

and
response = model.generate_content(
"""Important: You must not mention baseball in your response.

How do you play baseball?""")

response.text

I cannot answer this question as I am not supposed to mention baseball in my responses.


feat: After updating nvim-tresitter to 0.9.2 doesn't detect tests in TypeScript

Any simple test case doesn't work with the newest version of treesitter. It simply shows No tests found.
Downgrading it to 0.9.1 helped.

Having the same issue here, and indeed, downgrading Treesitter to v0.9.1 works, but everything else on my setup just crashes randomly.

Me and my colleague have the same issue.

Same here! I've just disabled neotest-jest for now. For the record, the neotest logs are printing this:
ARN | 2024-02-12T22:51:36Z+0100 | ...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:161 | CHILD | Error in remote call ...im/0.9.5/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 494 for language typescript
stack traceback:
	[C]: in function '_ts_parse_query'
	...im/0.9.5/share/nvim/runtime/lua/vim/treesitter/query.lua:259: in function 'parse_query'
	...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:104: in function 'normalise_query'
	...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:161: in function 'parse_positions_from_string'
	...re/nvim/lazy/neotest/lua/neotest/lib/treesitter/init.lua:207: in function 'func'
	...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:153: in function <...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:152>
	[C]: in function 'xpcall'
	...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:152: in function <...l/share/nvim/lazy/neotest/lua/neotest/lib/subprocess.lua:151>

thanks, i fixed mine also by downgrading treesitter to 0.9.1
i was wondering why my tests could not be run
would help if I could, but is there any plan this will be fixed?

Same problem, except that when I reverted back to 0.9.1, lots of issues with syntax highlighting, etc.
It's pretty unusable until this is fixed.

I still have the same issue, even after the merge of #100.
And as the edwards mentioned, I can't downgrade treesitter because it breaks other things for me.
I'd be willing to look into this further myself, but I don't really know where to start.

Thanks for this plugin and eco system. I am having the same issues in lunarvim + treesitter 0.9.5. I downgraded neotest-jest to a previous commit (c2118446d770fedb360a91b1d91a7025db86d4f1) which works as expected even with treesitter @0.9.5. All that said, now 0.9.5 is causing problems elsewhere.

Thanks for this plugin and eco system. I am having the same issues in lunarvim + treesitter 0.9.5. I downgraded neotest-jest to a previous commit (c211844) which works as expected even with treesitter @0.9.5. ~All that said, now 0.9.5 is causing problems elsewhere.~ Needed to run TSUpdate.

Just tried with commit (c211844) too, doesn't work for me :/
I'm using typescript-tools by the way, not sure if that could have an effect on this.

I'm using typescript-tools as well, and it was completely fixed aster #100
Even the "summary" is listing all the tests on the file.

To me everything works fine after fix.

@carlos-algms I have the opposite experience (using ts-tools as well). I was not able to see the summary nor was I able to run any tests.
This is what the summary looks like if I use the latest version of the plugin.

Downgrading to https://github.com/nvim-neotest/neotest-jest/commit/c2118446d770fedb360a91b1d91a7025db86d4f1 works for me as well

c211844

This worked for me also

Downgrading to c211844 works for me as well

this worked. thanks so much


Update name

@sevenEng can you check I've not missed anything before merging
Cheers
Tosh

That shoud be all in the running code.
But I'm wondering if worth also changing the names in build/config/distribute files too, eg:
https://github.com/me-box/core-export-service/blob/master/Dockerfile#L16
https://github.com/me-box/core-export-service/blob/master/pkg/pkg.ml#L7
and others, and If we'are changing those too, shoud I change databox-export-service' to core-export-service' or `export-service'?

Looking at those I'd go with  export-service

That should be all.


Using argument --train_text_encoder causes crash with an error: ERROR:torch.distributed.elastic.multiprocessing.api:failed

Describe the bug
Training with 8GB vram card works fine, when adding an argument "--train_text_encoder", the script crashes with an error: "ERROR:torch.distributed.elastic.multiprocessing.api:failed", log provided.
Reproduction
Training with the argument "--train_text_encoder" on 8GB vram video card.

[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
/usr/local/lib/python3.10/dist-packages/accelerate/accelerator.py:231: FutureWarning: `logging_dir` is deprecated and will be removed in version 0.18.0 of 🤗 Accelerate. Use `project_dir` instead.
  warnings.warn(
[2023-02-17 09:34:41,016] [INFO] [comm.py:654:init_distributed] Initializing TorchBackend in DeepSpeed with backend nccl
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
[W socket.cpp:601] [c10d] The client socket cannot be initialized to connect to [localhost]:29500 (errno: 97 - Address family not supported by protocol).
/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py:195: FutureWarning: It is deprecated to pass a pretrained model name or path to `from_config`.If you were trying to load a scheduler, please use <class 'diffusers.schedulers.scheduling_ddpm.DDPMScheduler'>.from_pretrained(...) instead. Otherwise, please make sure to pass a configuration dictionary instead. This functionality will be removed in v1.0.0.
  deprecate("config-passed-as-path", "1.0.0", deprecation_message, standard_warn=False)
Caching latents: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:23<00:00,  4.30it/s]
[2023-02-17 09:35:09,847] [INFO] [logging.py:68:log_dist] [Rank 0] DeepSpeed info: version=0.7.7, git-hash=unknown, git-branch=unknown
02/17/2023 09:35:09 - INFO - torch.distributed.distributed_c10d - Added key: store_based_barrier_key:2 to store for rank: 0
02/17/2023 09:35:09 - INFO - torch.distributed.distributed_c10d - Rank 0: Completed store-based barrier for key:store_based_barrier_key:2 with 1 nodes.
[2023-02-17 09:35:10,030] [INFO] [logging.py:68:log_dist] [Rank 0] DeepSpeed Flops Profiler Enabled: False
[2023-02-17 09:35:10,030] [INFO] [logging.py:68:log_dist] [Rank 0] Removing param_group that has no 'params' in the client Optimizer
[2023-02-17 09:35:10,030] [INFO] [logging.py:68:log_dist] [Rank 0] Using client Optimizer as basic optimizer
[2023-02-17 09:35:10,053] [INFO] [logging.py:68:log_dist] [Rank 0] DeepSpeed Basic Optimizer = AdamW
[2023-02-17 09:35:10,053] [INFO] [utils.py:52:is_zero_supported_optimizer] Checking ZeRO support for optimizer=AdamW type=<class 'torch.optim.adamw.AdamW'>
[2023-02-17 09:35:10,053] [INFO] [logging.py:68:log_dist] [Rank 0] Creating fp16 ZeRO stage 2 optimizer
[2023-02-17 09:35:10,053] [INFO] [stage_1_and_2.py:140:__init__] Reduce bucket size 500,000,000
[2023-02-17 09:35:10,053] [INFO] [stage_1_and_2.py:141:__init__] Allgather bucket size 500,000,000
[2023-02-17 09:35:10,053] [INFO] [stage_1_and_2.py:142:__init__] CPU Offload: True
[2023-02-17 09:35:10,053] [INFO] [stage_1_and_2.py:143:__init__] Round robin gradient partitioning: False
Using /home/username/.cache/torch_extensions/py310_cu117 as PyTorch extensions root...
Emitting ninja build file /home/username/.cache/torch_extensions/py310_cu117/utils/build.ninja...
Building extension module utils...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module utils...
Time to load utils op: 0.10493111610412598 seconds
Rank: 0 partition count [1] and sizes[(982581444, False)]
[2023-02-17 09:35:13,148] [INFO] [utils.py:827:see_memory_usage] Before initializing optimizer states
[2023-02-17 09:35:13,148] [INFO] [utils.py:828:see_memory_usage] MA 3.87 GB         Max_MA 5.18 GB         CA 4.12 GB         Max_CA 5 GB
[2023-02-17 09:35:13,148] [INFO] [utils.py:836:see_memory_usage] CPU Virtual Memory:  used = 9.52 GB, percent = 30.4%
[2023-02-17 09:35:23,685] [INFO] [utils.py:827:see_memory_usage] After initializing optimizer states
[2023-02-17 09:35:23,691] [INFO] [utils.py:828:see_memory_usage] MA 3.87 GB         Max_MA 3.87 GB         CA 4.12 GB         Max_CA 4 GB
[2023-02-17 09:35:23,692] [INFO] [utils.py:836:see_memory_usage] CPU Virtual Memory:  used = 19.95 GB, percent = 63.8%
[2023-02-17 09:35:23,692] [INFO] [stage_1_and_2.py:525:__init__] optimizer state initialized
[2023-02-17 09:35:23,743] [INFO] [utils.py:827:see_memory_usage] After initializing ZeRO optimizer
[2023-02-17 09:35:23,743] [INFO] [utils.py:828:see_memory_usage] MA 3.87 GB         Max_MA 3.87 GB         CA 4.12 GB         Max_CA 4 GB
[2023-02-17 09:35:23,744] [INFO] [utils.py:836:see_memory_usage] CPU Virtual Memory:  used = 19.95 GB, percent = 63.8%
Traceback (most recent call last):
  File "/home/username/ShivamShriraoDiffusers/examples/dreambooth/train_dreambooth.py", line 869, in <module>
    main(args)
  File "/home/username/ShivamShriraoDiffusers/examples/dreambooth/train_dreambooth.py", line 684, in main
    unet, text_encoder, optimizer, train_dataloader, lr_scheduler = accelerator.prepare(
  File "/usr/local/lib/python3.10/dist-packages/accelerate/accelerator.py", line 943, in prepare
    result = self._prepare_deepspeed(*args)
  File "/usr/local/lib/python3.10/dist-packages/accelerate/accelerator.py", line 1173, in _prepare_deepspeed
    engine, optimizer, _, lr_scheduler = deepspeed.initialize(**kwargs)
  File "/usr/local/lib/python3.10/dist-packages/deepspeed/__init__.py", line 125, in initialize
    engine = DeepSpeedEngine(args=args,
  File "/usr/local/lib/python3.10/dist-packages/deepspeed/runtime/engine.py", line 330, in __init__
    self._configure_optimizer(optimizer, model_parameters)
  File "/usr/local/lib/python3.10/dist-packages/deepspeed/runtime/engine.py", line 1210, in _configure_optimizer
    self.optimizer = self._configure_zero_optimizer(basic_optimizer)
  File "/usr/local/lib/python3.10/dist-packages/deepspeed/runtime/engine.py", line 1455, in _configure_zero_optimizer
    optimizer = DeepSpeedZeroOptimizer(
  File "/usr/local/lib/python3.10/dist-packages/deepspeed/runtime/zero/stage_1_and_2.py", line 532, in __init__
    self._param_slice_mappings = self._create_param_mapping()
  File "/usr/local/lib/python3.10/dist-packages/deepspeed/runtime/zero/stage_1_and_2.py", line 544, in _create_param_mapping
    lp_name = self.param_names[lp]
KeyError: Parameter containing:
tensor([[[[-0.0306,  0.0856,  0.0961],
          [-0.0310, -0.2236,  0.1437],
          [-0.0229, -0.0176,  0.0335]],

         [[ 0.0575, -0.0858, -0.0020],
          [ 0.2028, -0.1363, -0.0154],
          [ 0.0056, -0.0035, -0.0050]],

         [[ 0.0284, -0.0120,  0.0429],
          [-0.0232,  0.0714,  0.0815],
          [-0.0006, -0.0079, -0.0421]],

         [[ 0.0213, -0.0481,  0.0459],
          [ 0.0588, -0.1469,  0.0871],
          [ 0.0160, -0.0206,  0.0467]]],

        [[[ 0.0040, -0.0283, -0.0498],
          [-0.0012,  0.0363,  0.1064],
          [-0.0128,  0.0153,  0.0205]],

         [[ 0.0036,  0.0103, -0.0124],
          [-0.0005,  0.0883,  0.0136],
          [ 0.0017,  0.0496,  0.0354]],

         [[ 0.0054,  0.0634,  0.0172],
          [ 0.0334, -0.2232,  0.0301],
          [ 0.0217, -0.0625,  0.0174]],

         [[-0.0254, -0.0479,  0.0177],
          [-0.0207,  0.0799,  0.0045],
          [-0.0218,  0.0142, -0.0304]]],

        [[[-0.0639, -0.0994, -0.0292],
          [ 0.0400,  0.0553,  0.0007],
          [ 0.0372,  0.0677,  0.0411]],

         [[-0.0172,  0.0785,  0.0417],
          [ 0.0257, -0.0919, -0.0552],
          [-0.0086,  0.0187, -0.0073]],

         [[-0.0062,  0.0763, -0.0165],
          [-0.0697,  0.2127, -0.0291],
          [-0.0024, -0.0885, -0.0085]],

         [[-0.0094, -0.0079, -0.0073],
          [-0.0123,  0.0632,  0.0640],
          [-0.0473,  0.0229, -0.0265]]],

        ...,

        [[[-0.0281,  0.0648, -0.0033],
          [ 0.0046,  0.0937, -0.0111],
          [ 0.0093, -0.0373,  0.0167]],

         [[ 0.0242,  0.0179,  0.0409],
          [ 0.0571,  0.0838, -0.0234],
          [-0.0122,  0.0471, -0.0046]],

         [[ 0.0317,  0.0052,  0.0059],
          [ 0.0648,  0.0198,  0.1066],
          [ 0.0247, -0.0276,  0.0881]],

         [[ 0.0699,  0.0481,  0.0511],
          [ 0.0502, -0.1165,  0.0168],
          [ 0.0134, -0.0013,  0.0407]]],

        [[[-0.0119,  0.0146,  0.0268],
          [ 0.0594, -0.0296,  0.0532],
          [ 0.0069,  0.0775, -0.0472]],

         [[-0.0390, -0.0125,  0.0228],
          [ 0.0482,  0.0641,  0.0502],
          [ 0.0292,  0.0352, -0.0029]],

         [[ 0.0824, -0.0152,  0.0623],
          [-0.0185,  0.0547, -0.0074],
          [-0.0610, -0.1374, -0.1008]],

         [[-0.0064,  0.0069, -0.0249],
          [ 0.0226, -0.0157,  0.0029],
          [ 0.0493,  0.0859,  0.0077]]],

        [[[-0.1221, -0.0880,  0.0061],
          [ 0.0974, -0.0250,  0.0491],
          [ 0.0509,  0.0339,  0.0598]],

         [[ 0.1167,  0.0466,  0.0113],
          [ 0.0593, -0.0068, -0.0049],
          [-0.0960,  0.0353, -0.0544]],

         [[-0.0608, -0.0522, -0.0227],
          [-0.0295,  0.0705, -0.0385],
          [ 0.0194,  0.0134, -0.0071]],

         [[-0.0370, -0.0483, -0.0071],
          [ 0.0369,  0.0301,  0.0346],
          [ 0.0528, -0.0056,  0.0150]]]], device='cuda:0', requires_grad=True)
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 14351) of binary: /usr/bin/python3

System Info

diffusers version: 0.12.1
Platform: Linux-5.15.0-60-generic-x86_64-with-glibc2.35
Python version: 3.10.6
PyTorch version (GPU?): 1.13.1+cu117 (True)
Huggingface_hub version: 0.11.1
Transformers version: 0.16.0
Accelerate version: not installed
xFormers version: 0.0.16
Using GPU in script?:
Using distributed or parallel set-up in script?:

Deep speed training isn't properly supported. Haven't been tested with it.


Add/Fix the doc strings for PyT serving support for T4R models in TorchScript

Reviewed API documentation (generated by docstrings in code) for Transformers4Rec/transformers4rec codebase. Details are available here: https://docs.google.com/document/d/1GzM1q9Pc6amecRspbWKG0PSXbU-fCy13hSOC6UMnWWU/edit

This is a duplicate of https://github.com/NVIDIA-Merlin/Transformers4Rec/issues/664


Prepare v0.1.5

Codecov Report

Merging #23 (21650bd) into master (c174536) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            2         2
  Lines           21        21
  Branches         3         3
=========================================
  Hits            21        21

Impacted Files
Coverage Δ

flake8_no_implicit_concat/_version.py
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


pandas.plotting._tools not supported in pandas 0.25.0

I have not extensively tested this, but it seems the
from pandas.plotting._tools import (_subplots, _flatten)
does not work in the new pandas (0.25.0, released July 18th)
Error is:
    from pandas.plotting._tools import (_subplots, _flatten)
ModuleNotFoundError: No module named 'pandas.plotting._tools'
The code works perfectly fine in pandas 0.24.2

It seems that starting from 0.25, pandas had moves those internal functions into
pandas.plotting._matplotlib.tools.
You are welcome to open a PR with a fix - a quick one could be to use a try/except block.
The real longer-term solution would be to stop relying on those 2 internal functions that are not guaranteed to be broken by newer releases.

Fixed by #39


Pin hypothesis

Due to bug with 3.69.11 and log capture
Should hopefully unbreak master

Issue is reported here https://github.com/HypothesisWorks/hypothesis/issues/1546


duplicates tenants created

Run the docker container locally for example on host
Do a http PUT http://<IP_ADDRESS>:9000/v1/tenants
{
    "instance": "openwhisk",
    "namespace": "whisk.system"
}

response is
{
  "instance": "openwhisk",
  "id": "b07770ab-8a63-4606-b3db-07186e4bb457",
  "namespace": "whisk.system"
}

Run the same PUT again, I get a different id/guid:
{
  "instance": "openwhisk",
  "id": "1c114db8-60b0-429b-b416-74220e7163c0",
  "namespace": "whisk.system"
}

This should not be the case

@csantanapr Is this happening for the local gateway? I believe I fixed this issue in a previous commit, and I am unable to reproduce it. Try pulling down the latest version and see if you are still seeing this.

@csantanapr confirmed that this isn't present in develop. Closing this.


Make API generation more maintainable and readable

Right now, it can be somewhat brittle when e.g. Sphinx changes how HTML is generated, which caused the issues in https://github.com/Qiskit/documentation/issues/67. (Although, Axel did a great job writing tests!)
I think probably this looks like adding more testing where possible.
Originally, I thought we should consider switching from Sphinx to https://vemel.github.io/handsdown/. But we decided this is not a good option, including because cross-references are extremely important for the API docs.
--
Update Jan 3: @frankharkins, @arnaucasau, and I agreed this issue is high priority before we add more complexity via https://github.com/Qiskit/documentation/pull/522, https://github.com/Qiskit/documentation/issues/454, and https://github.com/Qiskit/documentation/issues/479.
Rough plan:

Improve test coverage:

https://github.com/Qiskit/documentation/pull/581 adds some
Should determine if mergeClassMembers.ts, updateLinks.ts, and generateToc.ts still need better testing. For example, I don't think generateToc.ts is teesting all the differente edge cases adequately
We have a lot of non-trivial logic in updateApiDocs.ts - what can we move to lib so that we can test it?

Refactor sphinxHtmlToMarkdown.ts, our most complex file. Split out the huge function into smaller helper functions & write more focused unit tests for those. Right now our unit tests are a bit hard to read and update since they have to mock so much.
Refactor convertHtmlToMarkdown, which right now does a lot. Is there a better level of abstraction?

We've made a lot of progress on this. The remaining work can be tracked by https://github.com/Qiskit/documentation/issues/845 and https://github.com/Qiskit/documentation/issues/715.


sbt-scalafmt 2.0.0

This is incremental.
Too bad that this comes with more format change.

All the formatting changes look good, except for the try/finally ones.
I think you can work around them by dropping the block.

I think AppVeyor failure is a bug - https://github.com/scalameta/scalafmt/issues/1404


gpioSerialRead reading hex data problem

Hi,
I am trying to receive hex data over a bit-bang serial, but it seems to can transfer only text data with a \n delimiter. Also, I notified, that the count size is always one in this case, bc everytime it prints the sent pattern only one time, no matter how long is the sent string.
Do you have an idea how I can read the hex data.
Thank you in advance.
#include<stdio.h>
#include<stdint.h>
#include<string.h>
#include<unistd.h>
#include<pigpiod_if2.h>
//#include "pigpio.h"
#define UART1 21
#define UART2 6
#define UART3 7
#define UART4 8

 uint8_t buffer[256];
int main()
{
    int pi = pigpio_start(NULL,NULL);
    int i = 0;
    printf("%d",pi);
    set_mode(pi,UART1,PI_INPUT);
            printf("Hello world!");
bb_serial_read_open(pi,UART1,4800,8);
int count = 0;
    while(1)
    {
        count = bb_serial_read(pi,UART1,buffer,sizeof(buffer));
        for(i=0;i<count;i++)
        {
            printf("%s",buffer);
            memset(buffer,0,sizeof(buffer));
        }
        sleep(5);
    }
    return 0;
}

I'm able to receive binary data but I'm using a different client.  Is your sender using standard 8N1?  It should work.

I tried both with Tera Term and Termite, all of them using 8N1.
I think the printf maybe is the problem, because The "Hello world" on line 18 is printed after receiving the first string from UART.

Print count the size of bytes received.  Also, you will not be able to see non-printable characters, ie, binary data values less than 30 or greater than 127, unless you using a different format specifier or write a function to convert each character to a "printable" hexadecimal value.


includes folders should be ignored automatically

Enter your suggestions in details:
Example:
site.use(sass({
  includes: "sass"
}));

The folder /sass should be ignored automatically without need to do site.ignore("sass").

Documentation for SASS plugin:
"By default, the plugin is configured to look into the _includes directory to find the imported files (you can change this behaviour by editing the includes option)"
I have tried putting files under "_includes" but they are not getting picked up. I did a bit of debugging and the processor when going through pages does not include files under "_include" thus the ".scss" files are not found.
Using a top level "sass" works if I do not use a custom includes like in this bug.
In summary, the SASS plugin includes seem broken. I am new to Lume so I can log a bug with confidence.

@patroytall Do you have any .scss file outside the _includes folder that imports these files? For example, let's say you have the following structure:
styles.scss
_includes/colors.scss

In your styles.scss file, you can have the following code:
@import colors.scss

and this import should be resolved to _includes/colors.scss.

OK, thank you. So yes, to get it working I added a /styles outside the "_includes". I now understand that "_includes" is for imports. Documentation is correct as is.


New Extension: create-t3-app

Description
Raycast interface for the create-t3-app CLI tool for creating Next.js apps.
It's just a form that passes the options you choose through to the CLI tool. It opens a terminal window to do this (if there's a better way, please let me know - child_process wasn't working for me).
Requires npm, yarn, or pnpm to be installed (you pick which one to use in the preferences).
Screenshot

That's pretty much it
Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Sorry for the delay, checking again now 🧑🚒


Add micros() and millis() functions

Wraps Zephyr kernel timing calls in Arduino API. This completes the Arduino Time functions.

Could we perhaps add a sample to demonstrate this? I'll add it if the consensus is yes..
Otherwise this LGTM
Haven't got the chance to test it but it looks alright to me.

These are standard Arduino functions. I tested them by adding this inside the loop of blinky_arduino:
printk("micros: %ld", micros());
printk("millis: %ld", millis());

My feeling is that they don't really belong in the blinky sample. We could do a "kitchen sink" sample that demonstrates everything. Or maybe some type of test app for that purpose?

Or else I feel we shouldn't over do on the samples either, I think these are pretty simple and standard in the arduino docs and any user can just google it and get to know how it is used


feat: composable implementation of Icon button style [wip]

Here I just made the style of icons customizable using getCSSProps function.
Side benefit: this also will probably have higher performance because the tw macro is called lazily depending on the given configuration (in contrast to calculating all the styles for all the configurations and storing it in an array).

Hey thanks for submitting this.

Side benefit: this also will probably have higher performance because the tw macro is called lazily depending on the given configuration (in contrast to calculating all the styles for all the configurations and storing it in an array).

When you say this, what kind of performance are you talking about? Runtime performance, or faster build time?
The tw macro is a 'macro' which is tranformed at build time to convert to a javascript object with only the styles used, so I can't imagine there's any performance loss from using twin.macro.

When you say this, what kind of performance are you talking about? Runtime performance, or faster build time?
The tw macro is a 'macro' which is tranformed at build time to convert to a javascript object with only the styles used, so I can't imagine there's any performance loss from using twin.macro.

No, I was talking about the memory used to store the only used style (vs all styles for all the configurations), and the time it takes to create the object for the only used configuration (vs instantiating all the objects for all the configurations).

What happened to this PR?

@aminya It's been labelled as WIP for over a month.

Because you didn't give feedback I only did it for the button component.

As discussed in the Discord server a while ago, it isn't really matching our priorities. But thanks for the PR regardless!


Request to modify databaseUrl optional in firebase-app ios module

https://github.com/GitLiveApp/firebase-kotlin-sdk/blob/master/firebase-app/src/iosMain/kotlin/dev/gitlive/firebase/firebase.kt
actual class FirebaseApp internal constructor(val ios: FIRApp) {
    actual val name: String
        get() = ios.name
    actual val options: FirebaseOptions
        get() = ios.options.run { FirebaseOptions(bundleID, APIKey!!, databaseURL!!, trackingID, storageBucket, projectID) }

    actual fun delete() { }
}

In the firebase-app ios module, even though databaseUrl is nullable when creating FirebaseOption There are situations where an !! operator causes force close. I know that databaseUrl is a value used when using Realtime Database, but it must be treated as an optional value.

Seems straightforward to fix this, perhaps you can submit a PR for it?


[Bug] Undo after first drawing on a Canvas with background image set not working properly

Instead of going back after the first brush drawing(erasing it from the canvas) it goes further and removes also the background image, meanwhile doing a redo() after this makes the canvas with the first brush drawing and the background image reappear.

I think this info should be in document.


HomePage

From initial commit to a video demonstration of functioning extension.
The extension pulls a randomly generated quote and changes to a random background with each new opening/refresh.
There is a hardcoded set of common links added.
I used CSS Grid and left some room for future additions.

Video: https://github.com/Jordan-Morales/2020-04-08-Roll-your-own-Chrome-dashboard/blob/master/functionality.mov


[BUG] :  The TAB button is not working in kanban board when outliner plugin is enabled . When disabled it is working .please fix it

Describe the bug
[BUG] :  The TAB button is not working in kanban board when outliner plugin is enabled . When disabled it is working .please fix it
To Reproduce
Steps to reproduce the behavior:

Enable outliner
enable kanban plugin
create card
try to type text and intent something under it
tab will not work
disable outliner
tab button will work

Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

OS: Windows
Obsidian Version: 0.12.5

Additional context
Add any other context about the problem here.

@skillhacker-code Thank you for your feedback. Should be fixed in https://github.com/vslinko/obsidian-outliner/releases/tag/2.0.2


Make test case name consistent

Just some minor changes for more convenient integration test.
Replace Tty with TTY in all test case names so that we can run
a bundle of TTY related test cases with TESTFLAGS like
-check.f TestExecTTY*
Edit: Right now some test cases are using "Tty" and some others are using "TTY",
that's why I think they need to be consistent.
Signed-off-by: Zhang Wei<EMAIL_ADDRESS>

Makes sense :)
LGTM

LGTM