macOS build fails due to external dependency.

Problem
Building from source fails on macOS 10.13.6 due to an external dependency on snmalloc.
Steps

cargo run -p tremor-cli -- server run

Traceback
error: failed to run custom build command for `snmalloc-sys v0.2.24`

Caused by:
  process didn't exit successfully: `/Users/sanskarjaiswal/Development/tremor-runtime/target/debug/build/snmalloc-sys-429e275e57af8c94/build-script-build` (exit code: 101)
  --- stdout
  running: "cmake" "/Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc" "-DSNMALLOC_RUST_SUPPORT=ON" "-DCMAKE_INSTALL_PREFIX=/Users/sanskarjaiswal/Development/tremor-runtime/target/debug/build/snmalloc-sys-348e6b631faf3bf9/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -arch x86_64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  -- The C compiler identification is AppleClang <IP_ADDRESS>01044
  -- The CXX compiler identification is AppleClang <IP_ADDRESS>01044
  -- Check for working C compiler: /usr/bin/cc
  -- Check for working C compiler: /usr/bin/cc - works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: /usr/bin/c++
  -- Check for working CXX compiler: /usr/bin/c++ - works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Performing Test CONST_QUALIFIED_MALLOC_USABLE_SIZE
  -- Performing Test CONST_QUALIFIED_MALLOC_USABLE_SIZE - Failed
  -- Looking for pthread.h
  -- Looking for pthread.h - found
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Looking for backtrace
  -- Looking for backtrace - found
  -- backtrace facility detected in default set of libraries
  -- Found Backtrace: /usr/include
  -- Adding test: perf-contention-1
  -- Single threaded test: perf-contention-1
  -- Adding test: perf-contention-16
  -- Single threaded test: perf-contention-16
  -- Adding test: perf-contention-oe
  -- Single threaded test: perf-contention-oe
  -- Adding test: perf-contention-malloc
  -- Single threaded test: perf-contention-malloc
  -- Adding test: perf-external_pointer-1
  -- Single threaded test: perf-external_pointer-1
  -- Adding test: perf-external_pointer-16
  -- Single threaded test: perf-external_pointer-16
  -- Adding test: perf-external_pointer-oe
  -- Single threaded test: perf-external_pointer-oe
  -- Adding test: perf-external_pointer-malloc
  -- Single threaded test: perf-external_pointer-malloc
  -- Adding test: perf-low_memory-1
  -- Single threaded test: perf-low_memory-1
  -- Adding test: perf-low_memory-16
  -- Single threaded test: perf-low_memory-16
  -- Adding test: perf-low_memory-oe
  -- Single threaded test: perf-low_memory-oe
  -- Adding test: perf-low_memory-malloc
  -- Single threaded test: perf-low_memory-malloc
  -- Adding test: perf-singlethread-1
  -- Single threaded test: perf-singlethread-1
  -- Adding test: perf-singlethread-16
  -- Single threaded test: perf-singlethread-16
  -- Adding test: perf-singlethread-oe
  -- Single threaded test: perf-singlethread-oe
  -- Adding test: perf-singlethread-malloc
  -- Single threaded test: perf-singlethread-malloc
  -- Adding test: func-bits-1
  -- Adding test: func-bits-16
  -- Adding test: func-bits-oe
  -- Adding test: func-bits-malloc
  -- Adding test: func-external_pagemap-1
  -- Adding test: func-external_pagemap-16
  -- Adding test: func-external_pagemap-oe
  -- Adding test: func-external_pagemap-malloc
  -- Adding test: func-first_operation-1
  -- Adding test: func-first_operation-16
  -- Adding test: func-first_operation-oe
  -- Adding test: func-first_operation-malloc
  -- Adding test: func-fixed_region-1
  -- Adding test: func-fixed_region-16
  -- Adding test: func-fixed_region-oe
  -- Adding test: func-fixed_region-malloc
  -- Adding test: func-malloc-1
  -- Adding test: func-malloc-16
  -- Adding test: func-malloc-oe
  -- Adding test: func-malloc-malloc
  -- Adding test: func-memory-1
  -- Adding test: func-memory-16
  -- Adding test: func-memory-oe
  -- Adding test: func-memory-malloc
  -- Adding test: func-memory_usage-1
  -- Adding test: func-memory_usage-16
  -- Adding test: func-memory_usage-oe
  -- Adding test: func-memory_usage-malloc
  -- Adding test: func-pagemap-1
  -- Adding test: func-pagemap-16
  -- Adding test: func-pagemap-oe
  -- Adding test: func-pagemap-malloc
  -- Adding test: func-release-rounding-1 only for release configs
  -- Adding test: func-release-rounding-16 only for release configs
  -- Adding test: func-release-rounding-oe only for release configs
  -- Adding test: func-release-rounding-malloc only for release configs
  -- Adding test: func-sandbox-1
  -- Adding test: func-sandbox-16
  -- Adding test: func-sandbox-oe
  -- Adding test: func-sandbox-malloc
  -- Adding test: func-sizeclass-1
  -- Adding test: func-sizeclass-16
  -- Adding test: func-sizeclass-oe
  -- Adding test: func-sizeclass-malloc
  -- Adding test: func-statistics-1
  -- Adding test: func-statistics-16
  -- Adding test: func-statistics-oe
  -- Adding test: func-statistics-malloc
  -- Adding test: func-thread_alloc_external-1
  -- Adding test: func-thread_alloc_external-16
  -- Adding test: func-thread_alloc_external-oe
  -- Adding test: func-thread_alloc_external-malloc
  -- Adding test: func-two_alloc_types-1
  -- Adding test: func-two_alloc_types-16
  -- Adding test: func-two_alloc_types-oe
  -- Adding test: func-two_alloc_types-malloc
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/sanskarjaiswal/Development/tremor-runtime/target/debug/build/snmalloc-sys-348e6b631faf3bf9/out/build
  running: "cmake" "--build" "." "--target" "snmallocshim-1mib-rust" "--config" "Release" "--"
  Scanning dependencies of target snmallocshim-1mib-rust
  [100%] Building CXX object CMakeFiles/snmallocshim-1mib-rust.dir/src/override/rust.cc.o

  --- stderr
  CMake Warning at CMakeLists.txt:78 (message):
    Not generating clangformat target, no clang-format tool found
  Call Stack (most recent call first):
    CMakeLists.txt:356 (clangformat_targets)

  CMake Warning:
    Manually-specified variables were not used by the project:

      CMAKE_ASM_COMPILER
      CMAKE_ASM_FLAGS

  In file included from /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/rust.cc:1:
  In file included from /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/../mem/slowalloc.h:1:
  In file included from /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/../mem/globalalloc.h:3:
  In file included from /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/../mem/../ds/helpers.h:3:
  /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/../mem/../ds/bits.h:81:26: error: constexpr if condition is not a constant expression
        else if constexpr (std::is_same_v<unsigned long long, std::size_t>)
                           ^
  /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/../mem/../ds/bits.h:85:26: error: constexpr if condition is not a constant expression
        else if constexpr (std::is_same_v<unsigned int, std::size_t>)
                           ^
  /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/../mem/../ds/bits.h:162:26: error: constexpr if condition is not a constant expression
        else if constexpr (std::is_same_v<unsigned long long, std::size_t>)
                           ^
  /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/snmalloc-sys-0.2.24/snmalloc/src/override/../mem/../ds/bits.h:166:26: error: constexpr if condition is not a constant expression
        else if constexpr (std::is_same_v<unsigned int, std::size_t>)
                           ^
  4 errors generated.
  make[3]: *** [CMakeFiles/snmallocshim-1mib-rust.dir/src/override/rust.cc.o] Error 1
  make[2]: *** [CMakeFiles/snmallocshim-1mib-rust.dir/all] Error 2
  make[1]: *** [CMakeFiles/snmallocshim-1mib-rust.dir/rule] Error 2
  make: *** [snmallocshim-1mib-rust] Error 2
  thread 'main' panicked at '
  command did not execute successfully, got: exit code: 2

  build script failed, must exit now', /Users/sanskarjaiswal/.cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.45/src/lib.rs:894:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Possible Solution(s)

The problem is the compiler that cmake is using. The /usr/bin/c++ compiler does not have support for C++17 which is required by snmalloc. Instructing cmake to use the g++-10 compiler compiles snmalloc successfully.  Related issue: https://github.com/microsoft/snmalloc/issues/275
Notes
Output of rustup --version: rustup 1.21.1 (7832b2ebe 2019-12-20)
Output of rustup show:
Default host: x86_64-apple-darwin
rustup home:  /Users/sanskarjaiswal/.rustup

installed toolchains
--------------------

stable-x86_64-apple-darwin
nightly-2021-01-25-x86_64-apple-darwin
1.49.0-x86_64-apple-darwin

active toolchain
----------------

1.49.0-x86_64-apple-darwin (overridden by '/Users/sanskarjaiswal/Development/tremor-runtime/rust-toolchain')
rustc 1.49.0 (e1884a8e3 2020-12-29)

Hi @aryan9600,
Thank you for the bug report. Do you have access to a recent Mac OS X release such as 10.15.7
more recent which are known working configurations that are still Apple supported?
Per @mjp41 @davidchisnall we would recommend updating to a recent OS X with security patches,
and it looks like the workaround you highlighted above is a workable workaround.
We'll clarify the docs around building on OS X so that there's another path for folk on older OS X
revisions to more easily find the workaround.
Cheers,
Darach.

it looks like the workaround you highlighted above is a workable workaround.

@darach It works for building snmalloc from source, but I can't figure out how to configure cmake to use the desired compiler when I run cargo run -p tremor-cli -- server run. Even changing the default compiler for cmake doesn't seem to do the trick as it seems like the cmake command generated has the compiler flags specified explicitly. Is there any workaround for this?
Thanks
Sanskar

Hi Sanskar,
Cmake/Cargo can be a bit of a puzzle at the best times individually, let alone together! Perhaps try:
rustc --print target-list
Then, pick an available target triple and use it via cargo --target <triple> ... and see if this helps to switch the compiler options passed to cmake. Another workaround might be via configuring your cargo ini via setting your linker and ar paths in a [target.<triple>] section where the target-list is one of the available targets. The former might help find a workable target. The latter would mean you can avoid having to set it for each invocation.
We'll have a look as well and feed back here if we find something ( and then update the docs subsequently ).
Cheers,
Darach.

Hi @aryan9600,
To switch the C++ compiler that cmake is using during snmalloc compilation, you can try:
# substitute with the path where g++ is in your machine
CXX=/usr/local/bin/g++-10 cargo run -p tremor-cli

It's an option documented for cmake and is working on my linux box (with cmake version 3.13.4).
Let us know if that does not work and we can look into this further.

could it be that xcode and the xcode cli utils are not installed?

Let us know if that does not work for you and we can look into this further.

@anupdhml this works, snamlloc does compile successfully, but another external dep blake3 fails to compile on macOS 10.13 unfortunately. The traceback is rather nasty with errors being related to assembler instructions so I don't think it's easily resolvable.

@aryan9600 can you please share the whole traceback and the exact command you executed and, most important, which OS and CPU you are running this on? What is you compiler version?
is it something along the lines of: https://github.com/BLAKE3-team/BLAKE3/issues/149 or https://github.com/BLAKE3-team/BLAKE3/issues/79 ?

The traceback is more than 13,000 lines, but after skimming through it, seems like it is related to AVX-512 similar to https://github.com/BLAKE3-team/BLAKE3/issues/79.
Command: cargo run -p tremor-cli -- server run
OS: macOS 10.13.6
CPU: Intel Pentium Core 2 Duo
Compiler: gcc-10

so, the Blake3 build.rs script is determining if your compiler supports compiling AVX512, so it tries to compile the AVX512 assembler it has included. I honestly dont know why gcc-10 fails here.
I am on macOs 10.15.7 and tried with gcc-10 from homebrew and it compiled fine: CC=/usr/local/bin/gcc-10 CXX=/usr/local/bin/g++-10 cargo build -p tremor-cli.
This leaves me puzzled as to why your compiler complains.
Did you try clang as your CC and CXX yet?

@aryan9600 I think you solved this issue?

The snmalloc issue can be avoided by using CXX=/usr/local/bin/g++-10 cargo run -p tremor-cli.
The BLAKE3 issue seems to be unfixable at least on my machine.


Prepare for release 4.0.0-rc3

Used by h3-py in its upgrade to 4.0.0.

Coverage remained the same at 98.66% when pulling c5bb7c9fd8f6dbb9acf91bb5a58208ae881808d0 on isaacbrodsky:changelog-4.0.0-rc3 into a36c614b477fb5409a0a87e0111d347ce550e40d on uber:master.


Added Leaflet to page and types of incidents issue #10

LGTM, have a couple linting issue if you want to check on those.


Not found

If you search for xamarin.livereload through Nuget Package Manager GUI the package isn't found. (Yes I have the pre-release check ticked on)
If you use the Nuget Package Manager Console and issue the command:
install-package xamarin.livereload -prerelease -project myprojectname
It installs fine.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: e40394ca-9a55-d9b5-d427-7c2a2c00cfc8
Version Independent ID: 5a5c17e2-a683-88f6-07a9-2002e814d54c
Content: Live Reload - Xamarin
Content Source: docs/xamarin-forms/xaml/live-reload.md
Service: unspecified
Product: xamarin
GitHub Login: @pierceboggan
Microsoft Alias: piboggan

You need to make sure your Package source is set to 'All'.

@tlhintoq the Live Reload NuGet is on a custom feed, and requires the source be set to All as noted above by @yelkereb, and also in the doc.

In case anyone needs the package source url, it was this after installing: https://nugetized.blob.core.windows.net/live-reload/index.json

good job Microsoft as always, it doesnt work :)


Subtask 5: Implement Timer Overlay - BE

Implement timer countdown overlay that will be displayed if the user chooses to start at a delayed time. #184

The logic is developed. worked successfully.


Trying to understand how SST works

We're currently running our infra on GCloud functions, moving to AWS. Came across SST because of the live deployment feature set, but I'm having issues.

I've created a set of endpoints following the guide here https://serverless-stack.com/chapters/create-a-hello-world-api.html
I've deployed them to prod using npx sst deploy --stage prod
I've tested them remotely, and they work.

The issue however is that I have to keep my local terminal running all the time.  I'm pretty sure I'm understanding this wrong, or doing something wrong - but can't figure out what.
Also, I get logs locally using console.log() - how do I get these logs remotely?

Hi there!
So when you run sst start it proxies requests from the remote endpoint to your local machine. If you kill that process locally and hit those endpoints again, you'll get an error.
When you want to deploy your app to prod, you run sst deploy --stage prod. This creates a completely separate environment.
For the logs, if you are not running locally, you'll need to look at the logs in the CloudWatch console in AWS. It's not easy to use but we are thinking of addressing this in the future.
Hope that makes sense!
PS: Join us over on Slack, and we can help you get started.

Solved this issue over slack


Shush make by default

poudriere can generate a lot of output, so try and keep it quieter in normal case

Why?
I don't really think this is a good idea.

Most of the time when using poudriere you've already built the code at least once. Even if not, its quite common to using -s for the first build.
when doing tasks like:
[00:00:00] Copying /usr/src to /poudriere/jails/amd64-matches-host/usr/src... done

seeing all the rm -f and install commands is just noise. make(1) already tells you what its done if something went wrong.

Make does not show the failing command on a build failure with -s. This is critical debugging information. Too bad we used -v in jail already or this could be gated on VERBOSE from the standard -v.

What do you mean "you've already built the code at least once"?
I always build everything inside poudriere, so, if poudriere never shows me what it is doing, how can I see what is happening?

What do you mean "you've already built the code at least once"?
There are three possible cases:
(a) you've already built and now you're just installing (-b)
(b) you've already built, and you rebuild for poudriere (-b, but you have tested previously)
(c) the first time you're building the tree is for poudriere.

I suspect for most people (c) is far less common. Even when portmgr tests a patch, hopefully the provider of the patch has already tested it at least once.
For cases (a) and (b) poduriere produces excessive output which makes following the logs harder, and possibly slows down the update.

As is this won't be taken as it is critical to see the build output somewhere for debugging failures.


regex problem for apache "common" access log format

In the default patterns.yml, there is a problem with the regex for the apache "common" access log format:
sourceName: !!js/regexp /httpd|access_log|apache2|nginx/
type: access_common

The regex is:
^(\S+)\s+(-|.+?)\s+(-|.+?)\s+\[(.*)\]\s\"(\S+)\s(\S+)\s(\S+)\s(\d+)\s([\d+|\"-\"|-])

Two problems:

http version contains quote
size string not parsed correctly

Test:
bash-4.4# echo '<IP_ADDRESS> - frank [10/Oct/2000:13:55:36 -0700] "GET /apache_pb.gif HTTP/1.0" 200 456' | /usr/local/bin/logagent -y -n httpd -f /root/patterns.yml
2019-05-29T18:59:58.619Z pid[655] init filter: inputFilter
2019-05-29T18:59:58.625Z pid[655] init filter: outputFilter
2019-05-29T18:59:58.626Z pid[655] init plugins
2019-05-29T18:59:58.627Z pid[655] ../lib/plugins/input/stdin
2019-05-29T18:59:58.732Z pid[655] ../lib/plugins/output/stdout
2019-05-29T19:00:00.363Z pid[655] Logagent initialized
logSource:    httpd
_type:        access_common
client_ip:    <IP_ADDRESS>
remote_id:    -
user:         frank
method:       GET
path:         /apache_pb.gif
http_version: HTTP/1.0"
status_code:  200
size:         4
@timestamp:   Tue Oct 10 2000 20:55:36 GMT+0000 (Coordinated Universal Time)

To fix this, the regex should be:
^(\S+)\s+(-|.+?)\s+(-|.+?)\s+\[(.*)\]\s\"(\S+)\s(\S+)\s(\S+)\"\s(\d+)\s(\d+|\"-\"|-)

@mnoky could you please confirm that the issue is fixed in the latest logagent release?

Works as expected, thanks!


feat(osmomath): log2 approximation

Closes: #XXX
What is the purpose of the change
This is a POC of a base 2 logarithm implementation using a lookup table.
It is based on: https://stackoverflow.com/questions/4657468/fast-fixed-point-pow-log-exp-and-sqrt
Currently, there are several optimizations and improvements possible to improve performance and accuracy.
The core idea is based on:
$$log_{2}{x} = log_{2}{(2*x/2)} = log_{2}{2} + log_{2}{(x / 2)} = 1 + log_{2}{(x / 2)}$$
We iteratively repeat this expansion, calculating the number of iterations (y), until $$1 <= x < 2$$
Then, the number of iterations (y) equals to the whole part of the exponent while x is used to lookup mantissa in the pre-computed table. The two values are added together to get the final result.
I'm also still exploring some other / simpler designs such as:
http://www.claysturner.com/dsp/BinaryLogarithm.pdf
Additionally, Taylor series is still under consideration. So far the information about its use I found is conflicting
Testing and Verifying
This change added tests
Documentation and Release Note

Does this pull request introduce a new feature or user-facing behavior changes? no
Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? no
How is the feature or change documented? not applicable

Benchmark at commit: d6324f4
goos: linux
goarch: amd64
pkg: github.com/osmosis-labs/osmosis/v12/osmomath
cpu: 12th Gen Intel(R) Core(TM) i7-1260P
BenchmarkLog2-16    	   10000	    101134 ns/op	   67700 B/op	    1231 allocs/op
BenchmarkLog2-16    	   10000	    145882 ns/op	   67965 B/op	    1237 allocs/op
BenchmarkLog2-16    	    5715	    177965 ns/op	   68150 B/op	    1241 allocs/op
BenchmarkLog2-16    	    6957	    417276 ns/op	   67861 B/op	    1235 allocs/op
BenchmarkLog2-16    	    5710	    188281 ns/op	   67831 B/op	    1234 allocs/op
BenchmarkLog2-16    	    6952	    181742 ns/op	   68041 B/op	    1239 allocs/op
BenchmarkLog2-16    	    7924	    142498 ns/op	   68228 B/op	    1242 allocs/op
BenchmarkLog2-16    	    8320	    145017 ns/op	   67667 B/op	    1231 allocs/op
BenchmarkLog2-16    	    7587	    152439 ns/op	   67778 B/op	    1233 allocs/op
BenchmarkLog2-16    	    7418	    139766 ns/op	   67921 B/op	    1236 allocs/op
PASS
ok  	github.com/osmosis-labs/osmosis/v12/osmomath	27.615s

According to benchmarks, reducing the log to be between [1, 1.0001) ends up being much less performant. More than 5500 iterations for log base 2 of 3. With the current implementations, there are approximately 300 iterations.
The reason is that we have to continuously be looping and dividing by the upper bound to normalize the number to be below 1.0001. Since the denominator is small, it ends up taking many iterations, reducing the performance.
I don't have the exact benchmark in nanoseconds for the [1, 1.0001) approach but it is higher than the current implementation even before reaching Taylor series step.
Upon exploring the properties of log base 2, I discovered the current method that required fewer iterations:
http://www.claysturner.com/dsp/BinaryLogarithm.pdf
It is implemented here and provides strong accuracy guarantees relative to the Wolfram Alpha results.
The benchmark for the latest commit is added up top


broken packages in haste-inst

Hi,
it seems as packages that are installed with haste-boot are marked as broken. In particular, Cabal is missing dependencies. It seems as not all package IDs are set during the boot process.
Could a second boot stage solve that problem by recompiling all packages?
In case a second boot stage should prove useful, it would be great if the current and the second boot stage would be executable independently. That could help with integrating Haste into a distribution like e.g. NixOS.
Also, I would prefer if haste-inst would be called cabal-haste, or maybe also haste-cabal. It would make the analogy between GHC and Haste much clearer.

This is fixed on master; haste-inst is now haste-cabal, and broken packages are no longer present in the package database.


how to update dynamicly from json value

Hello,
Is there any way to support dynamic update from json value?
like update from user input , and only allow update special fields
if the input json field is null, need set None value for activemodel,
so it need get None value from column:
struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    pub name: String,
    pub addr: Option<String>,
    pub other: Option<String>,
    ...
}
...
let allow_change_fields = vec![Column::Name, Column::Addr];

let mut actives = table::ActiveModel::new();
actives.set(Column::Id, 1.into());

// json is from user input, dynamic
let mut json = json!{addr: "new address"};

for col in allow_change_fileds{
   if let Some(json_val) =  json.get(col.to_string()) {
     let new_val = if json_val.is_null() {
       col.null_value() // Value::from(None::<i32>) or Value::from(None::<String>)
     } else {
       json_value_to_sea_value(json_val)
     };
     actives.set(col, new_val);
   }
}

actives.update(db).await?;
...

Any better suggestion?
https://github.com/qyihua/sea-orm/commit/0fa0f33ac1ebfa1444e8b4de1411a11e59bd4533

Hey @qyihua, thanks for the suggestions!
Are you integrating sea-orm with other web API? I'm interested in your use case.
I think it's common to take a Json / key-value pair from user and updating the corresponding rows in the database.

Hey @qyihua, thanks for the suggestions!
Are you integrating sea-orm with other web API? I'm interested in your use case, can you tell me more?
I think it's common to take a Json / key-value pair from user and updating the corresponding rows in the database.

Hi, @billy1624
I am integrating sea-orm with axum,
demo web page like this:

it's very common to update dynamicly from json value in web api, so i need a None SeaValue.
I am not very familiar with github, i think i make a wrong commit

Wow, you got some serious use case here!!
I'm thinking a mass assignment API similar to Laravel Eloquent, where you need to explicitly define what column is allowed to be mass assigned. Then, passing in a PHP array as input data.

https://laravel.com/docs/8.x/eloquent#mass-assignment

We could did similar things in sea-orm

explicitly define what column is allowed to be mass assigned
taking in serde_json::Value as input
returning ActiveModel fill with mass assigned values

@tyt2y3 any thoughts?

explicitly define what column is allowed to be mass assigned
I think the columns can be changed at runtime, special in RBAC , diffirent role has diffirent permission, it need some variable vecs

We could provide two methods for mass assignment

set_attributes(input: Json) it will mass assign all keys defined in fillable vec
set_attributes_with_keys(input: Json, keys: &[Column]) it will mass assign all keys in keys slice
(I just name the method randomly, we can rethink it later)

Hello, @billy1624 @tyt2y3
I had make a commit for set_from_json.
Can you give me some suggestion ? Thank you.
https://github.com/qyihua/sea-orm/commit/6d3f693453f3897aaa49189b7ce4ec44d8bb782d
struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    pub name: String,
    pub addr: Option<String>,
    pub other: Option<String>,
    ...
}
...
let allow_change_fields = vec![Column::Name, Column::Addr];

let mut actives = table::ActiveModel::new();
actives.set(Column::Id, 1.into());

// json is from user input, dynamic
let mut json = json!{addr: "new address"};
for col in allow_change_fileds{
   if let Some(json_val) =  json.get(col.to_string()) {
    // before
    /*
         let new_val = if json_val.is_null() {
           col.null_value() // Value::from(None::<i32>) or Value::from(None::<String>)
         } else {
           json_value_to_sea_value(json_val)
         };
         actives.set(col, new_val);
    */
    // now just one line
    actives.set_from_json(col, json_val)?;
   }
}
actives.update(db).await?;
...

I'm checking the changes you made with following link

https://github.com/SeaQL/sea-orm/compare/master...qyihua:test-json

It looks reasonable to me but I think we need some helper methods in ActiveModel as well. So, we don't need to manually iterate the attributes in it and update it one by one like you did here.

// json is from user input, dynamic
let mut json = json!{addr: "new address"};
for col in allow_change_fileds{
   if let Some(json_val) =  json.get(col.to_string()) {
    // before
    /*
         let new_val = if json_val.is_null() {
           col.null_value() // Value::from(None::<i32>) or Value::from(None::<String>)
         } else {
           json_value_to_sea_value(json_val)
         };
         actives.set(col, new_val);
    */
    // now just one line
    actives.set_from_json(col, json_val)?;
   }
}
actives.update(db).await?;
...

All in all, this is a good starting point & demo :))

Thank you in advance for your attention to this issue.
I think so. waiting for your good news :))

Thank you for the contribution! I think this is pretty close.
Though, I believe there could be a way to avoid adding the impl inside the DeriveActiveModel.
Instead, I believe it is possible to default implement it inside ActiveModelTrait by relying on set.
And perhaps the method could be set_json_value.
Because in my opinion I thought set_from_json is a massive assignment that would iterate over the json keys.

Hey @qyihua, please check PR #492

Thank

Hey @qyihua, please check PR #492

Hi, @billy1624 Thank you for your attention . The PR work for me
But in my use case, a web crawler, and the primary keys come from json. I think we also need to set primary keys come from json.
       // Restore primary key values
        for (col, active_value) in primary_key_values {
            match active_value {
                ActiveValue::Unchanged(v) | ActiveValue::Set(v) => self.set(col, v),
                // NotSet => self.not_set(col),
                NotSet => (), // do nothing
            }
        }

But in my use case, a web crawler, and the primary keys come from json. I think we also need to set primary keys come from json.
       // Restore primary key values
        for (col, active_value) in primary_key_values {
            match active_value {
                ActiveValue::Unchanged(v) | ActiveValue::Set(v) => self.set(col, v),
                // NotSet => self.not_set(col),
                NotSet => (), // do nothing
            }
        }

If it's implemented in this way the set_from_json method might be confusing. Consider the following cases...

Given the original ActiveModel with primary key which is NotSet. After calling set_from_json method, primary key value will be Set(JSON_primary_key_value)

Given the original ActiveModel with primary key which is Set(some_primary_key_value) or Unchanged(some_primary_key_value). After calling set_from_json method, primary key value will stay unchanged as Set(some_primary_key_value) or Unchanged(some_primary_key_value)

Thoughts? @qyihua @tyt2y3

To case 1, we can implement an associated function named from_json, this function will not backup or restore primary key values.
What do you think about it?

Hey @qyihua, yeah, this make sense. Check https://github.com/SeaQL/sea-orm/pull/492/commits/50aeb1c42631781341dfc8ef240b4e83f13a0563


Sonos_Restore restores the state after the sonos_snapshot service was called instead of the state before

Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (hass --version):
0.65.4
Python release (python3 --version):
3.6.4
Component/platform:
Sonos
Description of problem:
Using sonos_snapshot/restore to resume playback of Spotify on sonos after a TTS
sonos_restore recalls the state of the player after the sonos_snapshot.
Spotify --> TTS --> TTS Plays again --> stops all playback, does not resume Spotify
Expected:
Spotify --> TTS --> Spotify resumes
Problem-relevant configuration.yaml entries and steps to reproduce:
sonos_tts:
  alias: Sonos Text To Speech
  sequence:
    - service: media_player.sonos_snapshot
      data_template:
        entity_id: "{{ 'media_player.' ~ where }}"
    - service: tts.google_say
      data_template:
        entity_id: "{{ 'media_player.' ~ where }}"
        message: "{{ what }}"
    - delay:
        seconds: 1
    - delay: >-
        {% set duration = states.media_player[where].attributes.media_duration %}
        {% if duration > 0 %}
          {% set duration = duration - 1 %}
        {% endif %}
        {% set seconds = duration % 60 %}
        {% set minutes = (duration / 60)|int % 60 %}
        {% set hours = (duration / 3600)|int %}
        {{ [hours, minutes, seconds]|join(':') }}
    - service: media_player.sonos_restore
      data_template:
        entity_id: "{{ 'media_player.' ~ where }}"

Have Spotify playing
Run above script

Traceback (if applicable):

Additional info:
It worked flawlessly the first time I ran it. All subsequent attempts results in above issue. Problem persists even after restart and after upgrade from 65.2 --> 65.4

Update:
I have figured out what causes it and what doesn't, and I'm not sure it's a HA problem after all.
I have discovered that if I start Sonos through Spotift Connect it causes the bug above and doesn't restore. If I begin Spotify through the Sonos app then it restores fine.
My guess is that Sonos doesn't store the state information the same way if it's called from a third party system (Like Spotify Connect.)
I am going to close this ticket as "not your problem".


Added dialog element

Fixes https://github.com/Microsoft/TypeScript/issues/16880

Experimental technologies that aren't widely adopted in browsers shouldn't be added, IMO.


GEODE-8614: Add LowMemoryException exceptions

Added LowMemoryException to be thrown in the client whenever the server
runs out of memory.
Added QueryExecutionLowMemoryException to be thrown in the client whenever
the monitoring queries feature on the server detects that the member is running
low on memory.
Added UTs to verity error to exception translation is working.
Added new integration tests for both exceptions.

Maybe @moleske @pivotal-jbarrett @mreddington @pdxcodemonkey you could throw some comments?
Thanks!

Codecov Report

Merging #688 (3525c10) into develop (9279098) will decrease coverage by 0.05%.
The diff coverage is 55.71%.

@@             Coverage Diff             @@
##           develop     #688      +/-   ##
===========================================
- Coverage    74.06%   74.01%   -0.06%
===========================================
  Files          644      644
  Lines        51189    51063     -126
===========================================
- Hits         37914    37795     -119
+ Misses       13275    13268       -7

Impacted Files
Coverage Δ

cppcache/include/geode/ExceptionTypes.hpp
39.84% <50.00%> (+0.34%)
:arrow_up:

cppcache/src/ExceptionTypes.cpp
44.31% <51.92%> (-12.83%)
:arrow_down:

cppcache/test/ExceptionTypesTest.cpp
78.57% <66.66%> (-8.93%)
:arrow_down:

cppcache/src/ThinClientRegion.cpp
56.13% <100.00%> (+0.08%)
:arrow_up:

cppcache/src/ClientMetadataService.cpp
62.24% <0.00%> (-2.75%)
:arrow_down:

cppcache/src/PdxTypeRegistry.cpp
77.94% <0.00%> (-2.21%)
:arrow_down:

cppcache/src/TcrEndpoint.cpp
54.27% <0.00%> (-1.55%)
:arrow_down:

cppcache/src/TcrConnection.cpp
72.48% <0.00%> (-0.48%)
:arrow_down:

cppcache/src/ThinClientPoolDM.cpp
75.80% <0.00%> (-0.43%)
:arrow_down:

... and 1 more

Continue to review full report at Codecov.

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


Moved tests inside holoviews package

Moves tests inside the HoloViews package, which will allow upstream libraries (like bokeh) to run our test suite to ensure compatibility and downstream libraries (like geoviews) to reuse interface tests, which will allow us to finally move the iris interface.

[x] Closes https://github.com/ioam/holoviews/issues/2580

If this passes I'll probably just go ahead and merge so I can make progress on moving the iris interface.


Add all line breaking whitespace to splitLines and lineSplitter

Adheres to http://www.unicode.org/versions/Unicode7.0.0/ch05.pdf

LGTM. This is a breaking change but it is also a bugfix, so that should be OK.

I agree it's a breaking change, but a very minor one and we need to follow the Unicode standard. I prefer to categorize it as a bugfix. I would have originally written it this way, but did not know that the Unicode standard had words on the topic.


Add python 3.6 in tox.ini

Summary of 3.6:
  py36-django18: commands succeeded
  py36-django19: commands succeeded
  py36-django110: commands succeeded
  py36-django111: commands succeeded
  congratulations :)

@jezeniel Thanks but I'm not sure about the changes to travis config. The build page now looks like this:

While as earlier it used to look like this:

This meant more parallelism but more importantly more visibility. I could see from the build page exactly which combination of django and python were failing. Now I'll need to dig into logs to find this info. Can we change the config back to what it was and just add a new target?


Support "combined" (CLF) log format

I've took the implementation from #72, rebased it on top of master, dropped most of the (questionable) package.json changes, adjusted the implementation based on the review (mostly renaming to clfFormat), extracted the datetime helper into a separate module and added a primitive test, which just verifies the current output.
I've also tested this in my own application, where it seems to work fine. I'm not sure how good the actual log format is, so the test may just confirm that the implementation is wrong.
As to the question from #72 why "basic-auth" is needed: Its used to output the ":remote-user" part, as far as I can tell.

Also the test failed on node 0.12, which is weird, since that is what I tested with locally. It expected "ms", but got "1ms" - maybe the template doesn't output anything for response time of 0...?

Should set a fixed response time on the response mock. I haven't yet figured out how to do that...

I tried this, but it doesn't do anything:
res = mocks.createResponse();
res.responseTime = 5;
res.status(200);

I'll have a look at this soon.

Response time isn't part of either the Common or (Combined)[https://httpd.apache.org/docs/trunk/logs.html#combined] Log Formats...?
FYI: Here are the regexes to match the two of them.  I have a total love-hate thing with regex.
var commonLogRegex = /^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})|-) (.*|-) (.*|-) \[\d{1,2}\/.{3}\/\d{4}:\d{2}:\d{2}:\d{2} [+-]\d{4}\] "(GET|HEAD|POST|PUT|PATCH|DELETE|TRACE|CONNECT) \/.{0,} HTTP\/\d\.\d" \d{3} \d{1,}$/;

var combinedLogRegex = /^((\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})|-) (.*|-) (.*|-) \[\d{1,2}\/.{3}\/\d{4}:\d{2}:\d{2}:\d{2} [+-]\d{4}\] "(GET|HEAD|POST|PUT|PATCH|DELETE|TRACE|CONNECT) \/.{0,} HTTP\/\d\.\d" \d{3} \d{1,} ".*?" ".*?"$/;

We probably should have both available...?
Also, you're going to have to add the httpVersion to the req right around here in the setUp() function, since it expects something:
req = mocks.createRequest(reqSpec);
req.httpVersion = '1.0';
Also, res._headers["content-length"] should default to 0, not -.

In the 3 days since I created the PR, requirements on my project changed and I now need a winston format that I can't implement with this module. You're welcome to use the code from this PR and make it mergable.

:+1: @floatingLomas what do we do there?

@bithavoc, as of right now, I'd say nothing.  I'll go poke whoever submitted #72 and see if they want to get it passing/tested/etc, but if someone really wants this, they can always just use a custom msg anyways.


Support load-edit-save keeping formatting

Hi,
can you please add a new feature for supporting "edit" of configuration file.
use case is that you read empty property and then on your code you can update keys and then store it back to the file.
for example :
a.conf:
p1 =
p2 =
code :
Config cfg = ConfigFactory.parseFile("a.conf")
Config updatedCfg = //manipulate cfg and edit him
updatedCfg.storeToFile(destFile)
//storeToFile api should support keeping a.conf exactly as it was i.e keep brackets ,
//and comments of the source file ("a.conf)

Hmm. I guess I made #272 which is the same issue but has the active discussion, so I will close this one.
I don't think we will ever support this for .properties though since we don't have a .properties parser in the library.


Fixed Timezone.fromString and added missing flags

Timezone.fromString now replaces / with _ so it correctly matches values from enum.

Added missing India flag to assets/svgs/flags/countries as country_in.svg (copied from assets/svgs/flags/languages/language_hi.svg)

Thank you so much for taking time to help the community 💙

For the modification of Timezone.fromString(), I have updated it a little bit to apply the full time zone names convention of the package at the comparison to cover all the cases for the given string. ✅

And for India Flag (in), it was not missing, it is prefixed with c_ because in is a reserved keyword in the Dart, so I couldn't name the enum member with that name. ✅
I have prefixed the in country code in timezonesCodes map to match the convention, so it became c_in and it is now working fine.
NOTE: The issue wasn't just in India, the same issue existed for other time zones and I fixed them all.

The Pull Request is now ready to merge, thank you so much again 🙏🏻💙


Question: 'boost/operators.hpp' file not found

react-native-cli: 2.0.1
react-native: 0.59.9
npm: 6.9.0
yarn: 1.16.0
node: v12.4.0
os: macos 10.14.5
xcode: 10.2.1
when I use 'react-native run-ios', there is some error, 'boost/operators.hpp' file not found.
I can not build and run my project:
▸ Compiling JSIDynamic.cpp

❌  /Users/lidongbo/WorkBentch/ReactNative/AwesomeProject/node_modules/react-native/React/../third-party/folly-2<IP_ADDRESS>/folly/dynamic.h:63:10: 'boost/operators.hpp' file not found

#include <boost/operators.hpp>
              ^

▸ Analyzing JSCRuntime.cpp
▸ Analyzing jsi.cpp
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening AwesomeProject.xcodeproj

I resolve the  problem.
boost_1_63_0.tar.gz
double-conversion-1.1.6.tar.gz
folly-2<IP_ADDRESS>.tar.gz
glog-0.3.5.tar.gz
These files are not completely downloaded due to network reasons.

I tried with this command  yarn clean:ios and worked


Why does Desktop.Files.JSON keeps on showing up after I delete it?

I thought my laptop was infected with a virus but then I uninstalled "Files" and it was gone. Should I ignore them or is it a bad thing?

This is the website repo. Please post this issue on the Files repo: https://github.com/files-community/Files.


Cluster InfoWindow disappears

Hi,
I've recently upgrade from one of the very first version of the library to the latest one. The issue is that now whenever I click on cluster, the infoWindow pop-up and them almost immediately disappears - so I can't click on it. When I click on the individual item, everything works fine. When over my code several times, but can't find anything that might lead to this behavior. Did anyone had similar issue?
Thanks,

I got this behaviour due to that I was recreating markers in onCameraChanged listener (which is triggered when centering on the selected cluster).

Hallo,
how can I unsubscribe this mails.
I couldnt find any informations.
Thank you in advance.
Greetings
Alex
Am 12.10.2015 um 10:52 schrieb willgurht:

I got this behaviour due to that I was recreating markers in
onCameraChanged listener (which is triggered when centering on the
selected cluster).
—
Reply to this email directly or view it on GitHub
https://github.com/googlemaps/android-maps-utils/issues/198#issuecomment-147332114.


Allow to change culture in a test

Closes #313, which describes the issue in more detail.
It adds the ChangeCulture class which changes the current culture
during a test. It enables testing on specific cultures, that were harder
to test before. It is a simple wrap on the current culture property on
the current thread.
I also added on every await on the base and helper test classes a
.ConfigureAwait(true) so that every test always returns on the same
thread as it started. If we did not do this then the thread that
continues a test may be different from the one that started it, causing
a problem on the current culture setting.

Coverage remained the same at 89.82% when pulling cd16f8f050b9d22148eb8862c8d2dc5302f4c574 on giggio:change-culture into b3cd494823d15a375f112d935c5b17da773150a6 on code-cracker:master.

@giggio I didn´t understand relationship between culture problem and configureawait()


Improve model run function to providing the data stream instead completely results of modelling

Now we have function run that can input some settings and returns results when it's completely computed. But in some cases we need to resend partial results to another place to continue to work with this results.
I think that can be implemented by providing the function into run method and send results to it method, and it's a good if it can be completed by non-blocking call of this method. In this way we should not store all results into temporary dictionary.

Regards,
Alexey from sdCloud.io development team

I think that handler can looks like this
def modelling_results_handler(context, currentTime, currentTimeFrame):
     # Handle and store results

Where the context should be an dictionary like this
context = {
    'modelInstance': ..., # Instance of the current model object
    'initials': ..., # Dictionary with initial values for modeling
    'externalData': ..., # Optional. The additional object with data that provided with calling the run method of model. This required to provide additional external meta information to handler and allow use one handler to multiple modelling results from different models and allow correctly route result data.
}

The simple use case:
import pysd
model = pysd.read_xmile('highComplexityModel.xmile')

def modelResultsHandler(context, currentTime, currentTimeFrame):
    # Stream results into document oriented storage
    db.models.saveTimeFrame({
        'modelId': context['externalData']['modelDbIdentifier'],
        'time': currentTime,
        'data': currentTimeFrame
    })

model.run(
    eachFrameHandler = modelResultsHandler,
    handlersExternalData = {
        'modelDbIdentifier': '<SOME GUID IDENTIFIER>'
    })

or compute average value for specific time period of model value without using over resources for storing the full model results
import pysd
model = pysd.read_xmile('highComplexityModel.xmile')

totalCountOfPeopleAtDayTime = 0.0
totalHoursForStats = 0

def modelResultsHandler(context, currentTime, currentTimeFrame):
    timeOfTheDay = currentTime % 24
    externalData = context['externalData']
    if (timeOfTheDay >= externalData['beginOfTheDay'] and timeOfTheDay <= externalData['endOfTheDay']):
        countOfPeopleAtCurrentTime = currentTimeFrame['peopleCountInMainHall']
        totalCountOfPeopleAtDayTime += countOfPeopleAtCurrentTime
        totalHoursForStats++

model.run(
    eachFrameHandler = modelResultsHandler,
    handlersExternalData = {
        'beginOfTheDay': 8.0,
        'endOfTheDay': 18.0
    })

averageCountOfPeopleAtDayTime = (totalCountOfPeopleAtDayTime / totalHoursForStats) if totalHoursForStats > 0 else 0

It would be nice to keep the run function simple for folks who are just doing normal usage.
One thing we could do is put more of the contents of the for loop in the _integrate function into the _euler_step function, write a generator that basically handles the loop, and put the lines which save the values the user wants to see into another function.
outputs = []
        for t2 in time_steps[1:]:   #<- move to generator
            if self.time() in return_timestamps: #<- move to a separate output-processing function
                outputs.append({key: getattr(self.components, key)() for key in capture_elements})
            self._euler_step(t2 - self.time())  #<- move to generator
            self.time.update(t2)   # <- move to _euler_step?

Then, normal operation of pysd would call that generator through the _integrate function, which would make sure that the right components go to the user.
A streaming handler could then call the generator directly, which would return only the model state in the nested np.array format. It could use a second process to deal with the results each timestep, and save them. The state array given by the generator could then be used to initialize another model model.state= saved_state on another machine if you wanted to pick up computation somewhere else.
Now all your handler would need is a generator yielding a state object, the ability to set a new model state using the same object the generator yields (for moving computation to another machine) and a function (which can be run on other cores) which translates the state object into the outputs the user wants. That could be generic to any simulation model that obeys the markov property.

It may even make sense to think about https://github.com/JamesPHoughton/pysd/issues/12 as we structure this, in case we ever get around to working on speed using those packages.


Ability to use without the UI?

Type of issue

[ ] Bug report
[ ] Feature request
[X] Support request

Uploader type

[ ] Traditional
[X] S3
[ ] Azure

Support Request
Fine Uploader version
5.15.0
Question
I'd like to know if it'd be possible to use the core of this library without using the UI (buttons, etc.). All I really need to use this for is chunked uploading and my UI is already built out.

Yes. Please read the getting started guide at https://docs.fineuploader.com/quickstart/01-getting-started.html.

@rnicholus thank you very much :)


Added team ImageNomeR

Finished with team-leaders-2022 checklist

Hey, @aorliche! Thanks for the update. The only other suggestion I have is to modify your table of contents.
I apologize if we were unclear there.
Make sure you put your requirements in a heading similar to what is here: https://github.com/u-brite/HeriVar

Your repo looks amazing, @aorliche .


JS solution for dojo 20221011

Language
What language was used for the solution?
Javascript
Challenge
What is the name of the challenge being completed?
Find Three Largest Numbers

It seems that this solution doesn't actually work.  The existing tests pass, but the returned arrays were not correct.
In the assert part of the unit tests, we need to use .toBe(true); instead of .toBeTruthy;
This has been corrected and the code will be reworked so it can pass the updated tests.

@brehberg Want to PR a fix to the JS tests?

Went ahead and merged to get the test fixes in.


Only three supported locales?

Hi Blake,
Quick question. It looks like you have only supported 3 locales. Are those the only locales where the case mapping are different and for all other languages the normal toLowerCase will suffice (which I see is what your code does anyways)? I just wanted to make sure that I could use your module reliably for locales other than az, tr, and lt.
Thanks!

Correct, all locales can be correctly handled with toLowerCase (upper case and lower case are completely different alphabets) and the only overrides are the languages which conflict. Of course, I don't speak and write in dozens of languages, this was based on my own research - if something appears to be off, open an issue 👍


Applies to doesn't mention Azure SQL database and Azure SQL Managed Instance

Hi team,
The 'Applies to' of this article doesn't mention Azure SQL database and Azure SQL Managed Instance although setting OPTIMIZE_FOR_AD_HOC_WORKLOADS is available and can be enabled or disabled on them.
See also the 'Applies to' of https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql?view=sql-server-ver15 where they're included. If applicable, Azure SQL database and Azure SQL Managed Instance are mentioned separately in other docs.
Please review if the 'Applies to' is eligible for improvement.
Thank you and kind regards,
Inge van der Zouw-Beumer
#MSFTadvocate

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c10ea3a3-427f-c8ce-f3c0-c85b8d72c821
Version Independent ID: 191aa689-fd15-6a0a-cb07-7e33a3c5a6a5
Content: optimize for ad hoc workloads Server Configuration Option - SQL Server
Content Source: docs/database-engine/configure-windows/optimize-for-ad-hoc-workloads-server-configuration-option.md
Product: sql
Technology: configuration
GitHub Login: @markingmyname
Microsoft Alias: maghan

PS. The 'Applies to' of https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql?view=sql-server-ver15 doesn't include Azure SQL Managed Instance although MI is mentioned later in the document. See screenshot in original post. If applicable, Azure SQL Managed Instance is mentioned separately in other docs.
Please also review if the 'Applies to' of https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql?view=sql-server-ver15 is also eligible for improvement. This document doesn't seem to have a feedback button.
Thx.

@ingebeumer -- Inge, thank you for your well-researched feedback.
@markingmyname -- Mark, please look into this issue.

@ingebeumer
Thank you for your suggestion.
the article will be updated later this week.
thank you for your contribution.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion, and we will reopen the issue. To see what the community is wanting, please visit the SQL Server User Feedback site.

Thank you @markingmyname
Can you please check the article in my comment as well? It's missing Azure SQL Managed Instance in the Applies to section.
https://github.com/MicrosoftDocs/sql-docs/issues/6573#issuecomment-874628310


Update the version of kubernetes' go-client

@wlu2016 This PR sets the correct commit sha for Kubernetes go-client. Previously we were using the git tag but bazel doesn't support that well.

Merging this to unblock subsequent commit. Comments have been tracked by #19 .


代码行数的问题

看到这个vscode插件在运行的时候是在页面源码的body中注入了inject.js，但是这样我写在body标签后面的script代码在控制台console的时候显示的代码行数会增加37，影响判断，有没有一种解决方法？或者把注入的这段代码提出来使用script的src属性外部引入进源码？或者是把inject.js加入在源码的最后面？

Google translation (accuracy unknown):
"Seeing this vscode plugin is inject.js injected into the body of the page source when running, but the code line that I write after the body tag will increase the number of lines displayed in the console console by 37, affecting the judgment. Is there a solution? Or put the injected code into the source code using the src attribute of the script? Or is it to add inject.js to the end of the source code?"

Translation (manually):
Live server would inject inject.js into <body> tag of the page. However, this affect the behavior of line number counting in my own script, which is after <body> tag, increasing the line number by 37.
It there a work around for it ?


Handling polymorphic references for records

[x] Build test data
[x] Identify the problem
[ ] Fix it

This addresses issue #24

So, I think I know where I went wrong. I made the assumption that you would have a model for every content type inside of Contentful. In that assumption, I also assumed that the name of your model would be pulled from the content_type when it appears that you'd rather have the model name you give it inside the hasMany reference. (e.g. section from the test data above.)
Does that sound correct @bretmorris?
/cc @davidpett

@morganick i just pushed a failing polymorphic demo to https://github.com/davidpett/ember-data-contentful/tree/failing-polymorphic if you ember s and visit http://localhost:4200/test-page and look at the ember inspector, you will see 1 module all with undefined values and 1 'module-contentwith actual values. logging the contentType of each module rendersundefined`
{{#each model.modules as |module|}}
  {{log module.contentType}}
{{/each}}

@davidpett Thanks for doing that. I'll take a look.

I finally got some time to dive into this and try to find a solution to this issue. Here are a couple of things that I have noticed; let me know if I'm missing something.
When we are parsing the relationships for the page model, we pass in the relationship name of module. So at that point I have a type of module and an id of the entity inside Contentful. This is, currently, all I have for the resource linkage. (http://jsonapi.org/format/#document-resource-object-linkage) That's all fine and good until we parse the includes which is where the related models are loaded. (e.g. module-content in the case of the dummy app)
When we parse the includes, we use the contentType from Contentful to tell ember-data which model it is and push it into the store. With a non-polymorphic hasMany this works as intended. This is how module model gets initialized but there is no data, and model-content gets data but is not linked to the page via the hasMany.
I've also looked through the 0.2.1 code to see what the differences where and where I broke this since it appears to work in 0.2.1. So far it has eluded me. My next step here will be to pull in the 0.2.1 serializer up to where we have the test suite and see if my tests pass there.
The other thing I was looking at doing was supporting true polymorphic hasMany for this. This used to be something that ember-data handled out of the box but seems to have been removed when they switched over to JSONAPI. I've read a couple of closed PRs with grumblings towards that.
Also, if we don't support polymorphic then you lose the ability to do findRecord and queryRecord on the related content types. module-content is what you would use for those not the generic module which has no meaning outside of the page model in Contentful.
@davidpett & @bretmorris just wanted to give you an update on the status of this issue. Let me know if you have other ideas or suggestions.

@morganick @davidpett Were y'all able to get any further with this issue? I'm in the same boat of needing polymorphic references.


Question Is this project dead ?

Is this project dead ?
Thanks!

I'm wondering the same

turndown needs to be updated and be able to select extra turndown options, I also would like to add two enhancements, machine learning for code language detection for pre elements, So I can clip tutorial webpage beautifully formatted, and also I need some other YAML metadata

Wondering the same. Are there alternative libraries out there with active development?

+1

I'm moving my project to this API: https://rapidapi.com/fivefilters/api/full-text-rss/
More in: https://txtify.it/ and http://ftr.fivefilters.org/

@phms this is an API though right? I need a library

Maybe https://github.com/mozilla/readability?

Yep I found that, haven't tried it yet though. There is also https://github.com/flickz/newspaperjs (haven't tried it either)

Hello! Maintenance has been slow but this project is not dead. Please feel free to open new issues or PRs with any updates you'd like to see to Mercury. Thank you!


Create binding with one href only

Hi,
I run into an issue having just one href while "createBindings".
I am not really sure what the intent is of
https://github.com/thingweb/thingweb/blob/master/thingweb-server/src/main/java/de/thingweb/servient/impl/MultiBindingThingServer.java#L245-L248
@mkovatsc  I think you created it...  it somehow breaks because you try to add a value to a list while iterating over this list..
I commented it out... and all tests passed. My test with just one href fails otherwise..
see https://github.com/thingweb/thingweb/blob/master/thingweb-server/src/test/java/de/thingweb/servient/HrefBindingTest.java
Can you check what I did?

Hope is resolved


Fix tmp deletion

Signed-off-by: Darren Stahl<EMAIL_ADDRESS>
- What I did
Tmp deletion was only deleting the tmp-old folder when it failed to rename the tmp folder. This fixes it.
- How I did it
Delete tmp-old on rename success, not failure.
- How to verify it
Daemon no longer throws warnings on every other start.
/cc @mlaventure FYI 👼

Hm, can you try rebasing?
19:05:49 # github.com/docker/docker/cli/command/formatter
19:05:49 cli/command/formatter/history_test.go:13:2: cannot find package "github.com/docker/docker/pkg/testutil/assert" in any of:
19:05:49 	/go/src/github.com/docker/docker/vendor/github.com/docker/docker/pkg/testutil/assert (vendor tree)
19:05:49 	/usr/local/go/src/github.com/docker/docker/pkg/testutil/assert (from $GOROOT)
19:05:49 	/go/src/github.com/docker/docker/pkg/testutil/assert (from $GOPATH)
19:05:49 FAIL	github.com/docker/docker/cli/command/formatter [setup failed]

Not related to this PR, but a package was changed today I think. Thought it was fixed already, but possibly not

Rebased. Looks like it was fixed just after I pulled this morning.


handle deepObject and explode: true

Fixes #970 .
Changes proposed in this pull request:

handle deepObject style and explode true params introduced in OAS3

question: this new feature is opnly available in OAS3. if i correctly checked the tests, then there is currently no scenario set up for this (different results when using OAS3 vs. OAS2), or? since i believe there will be more things like this in the future, how would you rather handle this?

@hjacobs @prawn-cake @jmcs this is the PR we talked in chat about ...

It's been a while since I worked on this, but IIRC there was some part of this that needed to happen early in the request flow (maybe before schema validation?).
Have you seen this file: https://github.com/zalando/connexion/blob/master/connexion/decorators/uri_parsing.py#L149 ?
I think object-level and array-level decoding was happening in that file, and then basic type casting happens later on.
Hopefully that's more helpful than it is confusing - I'll have to sit down and re-read the code to get more insight.

@dtkav it was absolutely helping. i was wondering already why i had to implement param parsing twice. but this file was the key, now i just once disect the object :+1:
converted this PR to a real one, to triger the tests

I consider this now ready4review ...

@dtkav thx a lot for the thorough review. i pushed some changes regarding your comments.
please check again @hjacobs @jmcs @dtkav @prawn-cake

@dtkav thx again for the feedback! i adopted your changes!

Hey @drummerwolli - I played around with your branch a bit - have a look and see if any of my modifications look interesting?
https://github.com/zalando/connexion/compare/master...dtkav:fix_exploded_obejcts

blocked by: https://github.com/zalando/connexion/issues/991

@drummerwolli could you check if your code will work with #1002 example specs?

@dtkav sry that it took me so long, but here again my changes. feel free to check again. @jmcs @hjacobs as well, if you want.
@danie1k i added your yaml changes into one test file quickly but got some new errors. i think this PR wont fix this issue :cry:

@ancelotpinto @hjacobs @dtkav @jmcs @prawn-cake can we get this reviewed and merged somehow?

:+1:

thx @hjacobs

The default setting code in the PR isn't scoped properly, so (for example) it will take query defaults and set the request.form to the query defaults.
I'll try to put up a minimal working example that shows this behavior and a fix.

#1092 shows the bug also


default presets to mainnet

currently, to use spec code from this library, you need to select an explicit preset, e.g.
use ethereum_consensus::altair::mainnet::*;

and this repo intends to host both mainnet and minimal presets as "hard-coded" configurations
but it would be a nice convenience to default to mainnet and only expose minimal as an explicit choice.
e.g. to get the same types as above you only would need:
use ethereum_consensus::altair::*;

and with minimal left as is:
use ethereum_consensus::altair::minimal::*;

this involves some reconfiguring of the export declarations but imo is nicer

this would be nice but doesn't really make sense given the structure this repo has taken...
the suggested way is still through the presets and it can be abstracted away with an import alias:
use ethereum_consensus::altair::mainnet as spec;

or


General purpose best transaction implementation

Fixes #6023

@mattsse do this look ok?

only a few more nits :)


[Migration] document sfx configuration settings equivalents

Documents equivalents of configuration settings from sfx.
Manual instrumentation to be documented in following PR.

Will review this one next week if that's OK. :)


Dont work

If i open the app i get this  http://prntscr.com/bap1by
I run on android 4.2

Try updating cast companion library to 2.8.4 and the support libraries to 23.2.1 or newer.

How i update that

Under the moble folder in the build.gradle file. You can see the changes here https://github.com/googlesamples/android-UniversalMusicPlayer/pull/79/files

http://prntscr.com/bbi26z

http://prntscr.com/bbi2jp

It should look something like this:
dependencies {
compile 'com.google.android.gms:play-services-cast:8.4.0'
compile 'com.google.android.support:wearable:1.3.0'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:mediarouter-v7:23.2.1'
compile 'com.android.support:leanback-v17:23.2.1'
compile 'com.google.android.libraries.cast.companionlibrary:ccl:2.8.4'
compile 'com.android.support:design:23.2.1'
testCompile 'junit:junit:4.12'
testCompile 'org.mockito:mockito-core:1.10.19'
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support:support-annotations:23.2.1'
androidTestCompile 'com.android.support.test:runner:0.4.1'
androidTestCompile 'com.android.support.test:rules:0.4.1'
}

I just updated all support libraries, gradle, gradle plugin, cast and ccl. Please, update it, take a look and reopen the bug if you still have issues. Make sure you have all Android SDK up to date. (Android Studio -> Tools -> Android -> SDK Manager -> Launch Standalone SDK Manager -> Install XX packages, if the button is enabled).


ValueError: Variable DoppelGANgerGenerator/attribute_real/layer0/linear/matrix/Adam/ already exists, disallowed.

I have just follow the instructions and run the script driver.py. Here is the error message:
Traceback (most recent call last):
  File "/home/runwei/NetShare/netshare/models/model.py", line 27, in train
    log_folder=log_folder)
  File "/home/runwei/NetShare/netshare/models/doppelganger_tf_model.py", line 176, in _train
    gan.build()
  File "/home/runwei/NetShare/netshare/models/doppelganger_tf/doppelganger.py", line 293, in build
    self.build_loss()
  File "/home/runwei/NetShare/netshare/models/doppelganger_tf/doppelganger.py", line 708, in build_loss
    self.g_loss, var_list=self.generator.trainable_vars
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/training/optimizer.py", line 413, in minimize
    name=name)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/training/optimizer.py", line 597, in apply_gradients
    self._create_slots(var_list)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/training/adam.py", line 131, in _create_slots
    self._zeros_slot(v, "m", self._name)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/training/optimizer.py", line 1156, in _zeros_slot
    new_slot_variable = slot_creator.create_zeros_slot(var, op_name)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/training/slot_creator.py", line 190, in create_zeros_slot
    colocate_with_primary=colocate_with_primary)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/training/slot_creator.py", line 164, in create_slot_with_initializer
    dtype)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/training/slot_creator.py", line 74, in _create_slot_var
    validate_shape=validate_shape)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/ops/variable_scope.py", line 1500, in get_variable
    aggregation=aggregation)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/ops/variable_scope.py", line 1243, in get_variable
    aggregation=aggregation)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/ops/variable_scope.py", line 567, in get_variable
    aggregation=aggregation)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/ops/variable_scope.py", line 519, in _true_getter
    aggregation=aggregation)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/ops/variable_scope.py", line 868, in _get_single_variable
    (err_msg, "".join(traceback.format_list(tb))))
ValueError: Variable DoppelGANgerGenerator/attribute_real/layer0/linear/matrix/Adam/ already exists, disallowed. Did you mean to set reuse=True or reuse=tf.AUTO_REUSE in VarScope? Originally defined at:

  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 1748, in __init__
    self._traceback = tf_stack.extract_stack()
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3426, in _create_op_internal
    op_def=op_def)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 3357, in create_op
    attrs, op_def, compute_device)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/util/deprecation.py", line 507, in new_func
    return func(*args, **kwargs)
  File "/home/runwei/anaconda3/envs/netshare/lib/python3.6/site-packages/tensorflow_core/python/framework/op_def_library.py", line 794, in _apply_op_helper
    op_def=op_def)

Hi, thank you for your interest in NetShare. To reproduce the error on our end, could you please let us know:

Which dataset are you running? We have not fully tested the framework in the main branch but we never saw this error before.
Are you running NetShare on a cluster or on a single machine?
Is Ray package installed and turned on (ray.config.enabled=True)?

I'm running on a single machine and turn Ray off.
The driver.py looks:
import netshare.ray as ray
from netshare import Generator

if __name__ == '__main__':
    ray.config.enabled = False

    generator = Generator(config="netflow/config_example_netflow_nodp.json")
    generator.train_and_generate(work_folder='../results/netflow/test')

Thanks. We will look into it and get back to you.

Sorry for the delay. It took us some time to pinpoint the issue as we mainly use Ray=ON and a cluster for dev/test.
The problem is that when Ray is OFF and using a single machine, everything will be running sequentially such that there are multiple TF instances in the same process, which will cause the "graph exists" error.
The solution is to add the following code snippet to train/generate function to reset the TF graph every time it starts:
https://github.com/netsharecmu/NetShare/blob/e737d73a97a8bf50719658bd4bad2d868817bcc1/netshare/models/doppelganger_tf_model.py#L25-L27
https://github.com/netsharecmu/NetShare/blob/e737d73a97a8bf50719658bd4bad2d868817bcc1/netshare/models/doppelganger_tf_model.py#L191-L193
We have updated the scripts and README. Please pull the latest codebase and check the README and let us know if you encounter any problems further.
Side note: running on a single machine with Ray=OFF will take infinitely long for the code to finish. We would recommend using a cluster if possible. Alternatively, for quick validation purposes regardless of fidelity, you may follow Tip 1 of Example Usage to set a very small training iteration number to get a sense of running NetShare end-to-end.


Reduce ceremony to use common public services in Gradle scripts

Using common public Gradle service from scripts requires unnecessary ceremony in some cases. This issue is about removing the ceremony thus making it easier to write Gradle scripts, including binary plugins authored as precompiled scripts.
Expected Behavior
Injected services listed in the userguide can all be used from all Gradle scripts without ceremony.
Let's say for example that in a project script I want to add a doLast action to an existing task that does some file system operations.
// The existing task
tasks.register("some")

// Adding my doLast task action
tasks.named("some") {
    doLast {
        fs.delete { delete("thing") }
    }
}

The above is with an hypothetical access to the FileSystemOperations service as DefaultTask.fs. This is one potential option but not an implementation goal. Deciding how the services can be accessed depending on the use cases should be considered as part of this issue.
Current Behavior
In project scripts one can already directly use ObjectFactory, ProjectLayout and ProviderFactory. None of the public service can be used directly in scripts settings or init scripts. Note that ProjectLayout does make sense when targeting a Project only.
With no possible direct usage one need to write a full blown plugin class in order to get the service injected:
// The existing task
tasks.register("some")

// Adding my doLast task action
abstract class MyPlugin : Plugin<Project> {

    @get:javax.inject.Inject
    abstract val fs: FileSystemOperations

    override fun apply(project: Project): Unit = project.run {
        tasks.named("some") {
            doLast {
                fs.delete { delete("thing") }
            }
        }
    }
}
apply<MyPlugin>()

This is a lot of ceremony.
Context
Faced while moving away from project.delete() in favor of the FileSystemOperations service because the former isn't allowed when the configuration cache is enabled.
Also faced while writing settings scripts that access system properties, wanting to use ProviderFactory.systemProperty(..).

More issues requesting Gradle services in build script context

#14171
#21517

A duplicate of this issue: #22536


Permission denied @ unlink_internal

What did you do?
I ran the command /usr/local/bin/bundle clean --force

What did you expect to happen?
I expected Bundler to remove all the gems from my system

What happened instead?
Instead, it removed a few and stopped. Can't go on with bundle clean

Error details
Errno::EACCES: Permission denied @ unlink_internal - /usr/local/lib/ruby/gems/2.2.0/cache/sdoc-0.4.1.gem
  /usr/local/lib/ruby/2.2.0/fileutils.rb:1450:in `unlink'
  /usr/local/lib/ruby/2.2.0/fileutils.rb:1450:in `block in remove_file'
  /usr/local/lib/ruby/2.2.0/fileutils.rb:1455:in `platform_support'
  /usr/local/lib/ruby/2.2.0/fileutils.rb:1449:in `remove_file'
  /usr/local/lib/ruby/2.2.0/fileutils.rb:793:in `remove_file'
  /usr/local/lib/ruby/2.2.0/fileutils.rb:571:in `block in rm'
  /usr/local/lib/ruby/2.2.0/fileutils.rb:570:in `each'
  /usr/local/lib/ruby/2.2.0/fileutils.rb:570:in `rm'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:204:in `block in clean'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:204:in `each'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/runtime.rb:204:in `clean'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/cli/clean.rb:11:in `run'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/cli.rb:373:in `clean'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/cli.rb:10:in `start'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/bin/bundle:20:in `block in <top (required)>'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
  /usr/local/lib/ruby/gems/2.2.0/gems/bundler-1.10.6/bin/bundle:18:in `<top (required)>'
  /usr/local/bin/bundle:23:in `load'
  /usr/local/bin/bundle:23:in `<main>'

Environment
Bundler   1.10.6
Rubygems  <IP_ADDRESS>
Ruby      2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
GEM_HOME  /usr/local/lib/ruby/gems/2.2.0
GEM_PATH  /usr/local/lib/ruby/gems/2.2.0:/home/user/.gem/ruby/2.2.0
Git       1.9.1

Thanks for the error report! At the very least, this should fail with a friendly error.

@segiddins What is the desired end behavior regarding this?
Would the command stop and fail on trying to remove a file/directory you don't have permission for and output a more helpful error message?
vs.
Would the command print a helpful error message for that instance of deletion, and then keep going and attempting to delete the other files/directories it's supposed to delete?

@RochesterinNYC just using SharedHelpers.filesystem_access in clean for now should suffice

Gotcha, thanks for the point in the right direction.

Think this can be closed now.
@oka-haist, your original error was probably caused by a lack of bundler system access to a directory that contained a gem that was being removed. Now, the same error should have an error message stating this lack of permissions/access.

Ok, thank you.


Latest release (0.3.0) not in Maven

I am assuming once a release appears here, shortly after it will be available in Maven. It has ben quite a few hours since the release and it still not in the Maven repo. I have checked here:
https://repo1.maven.org/maven2/de/tototec/de.tobiasroeser.mill.jbake_mill0.10_2.13/
@lefou Just to let you know in case something went wrong. No hurry on this one.

Thanks for notifying me. Indeed, the publish tasks didn't run after I renamed the master branch to main but forgot to update the GHA setup. Fixed in #17.

@lefou  Just tested. Working. Thank you.


Add decode URL

@farhadmpr thanks for your contribution.
Please add unit tests for this function

@farhadmpr thanks for your contribution.
Please add unit tests for this function

@farhadmpr Great. Thanks

@farhadmpr Great. Thanks


Create Subject Registration Mono Repo With Frontend and Backend

I have implemented the monorepo according to the requirements in #12. Additionally, the docker directory contains docker-compose.yml files to bootstrap a development environment.

Backend dev

docker-compose up -d

Frontend dev

docker-compose -f docker-compose.yml -f docker-compose.frontend-dev.yml up -d

I also edited the hsa-realm.json used in keycloak to provide a test user for developers. Though I am unsure about the consequences of the changes. Are there any restrictions on the configuration of the keycloak instance in production?
Additionally, I'd appreciate a review of the pipeline. Does the separation into a test and release pipeline make sense? How should I handle pull requests and tagging in a release? Should dev builds get their own release?

"Are there any restrictions on the configuration of the keycloak instance in production?"
There are no restrictions. We will have a different realm later, with different admin users and maybe a different theme.
But: all this can be done via mounts and environment variables.
„Additionally, I'd appreciate a review of the pipeline. Does the separation into a test and release pipeline make sense?“
Makes totally sense to me.
„How should I handle pull requests and tagging in a release? Should dev builds get their own release?“
In my point of view you should enable the release pipeline on the dev branch.
We are using the following Action to calculate tags: https://github.com/docker/metadata-action

Could you also add the ISSUE_TEMPLATES again? Great for new issues / bugs 😄
Moreover we should create Templates for PRs. (Definition of Done)

Could you also add the ISSUE_TEMPLATES again? Great for new issues / bugs 😄 Moreover we should create Templates for PRs. (Definition of Done) -> but that is another issue

The ISSUE_TEMPLATE's were added after I pulled the repo, thus they were not included. I think they should automatically be included in the merge.


Question: How to render Sidebar Menu on a custom page

Greeting!
I would like to render the 'openapi-sidebar-default' sidebar menu on a custom page. But I am unable to import the apiMetadata on a custom page. Any help would be greatly appreciated.
Thank you in advance!

I'm not precisely sure what you mean by "custom page." Is that referring to a file located inside the /src/pages directory? If so, those pages don't have sidebars.
The next question I'd have for you is what do you mean by openapi-sidebar-default? You can specify which sidebar is displayed on a given doc using the frontmatter:
---
title: Custom Sidebar Here
displayed_sidebar: 'openapi-sidebar-default'
---

This doc will display the specified sidebar, even if it's not a doc _in_ the sidebar.

All that said, this openapi plugin doesn't really mess with your already-configured sidebars. So, if you want to display those sidebars you may need to do some configuring. Check out this page for some details on that.


Help for subcommands is difficult to read

My journey trying to read the help for my own subcommands:
app~$ help

  Commands:

    help [command]    Provides help for a given command.
    exit [options]    Exits instance of Vorpal.

  Command Groups:

    type *            2 sub-commands.
    record *          3 sub-commands.

app~$ record

  Command Groups:

    record add *  3 sub-commands.

app~$ help record

  Command Groups:

    record add *  3 sub-commands.

app~$ help record add

  Command Groups:

    record add *  3 sub-commands.

app~$ record help add

  Invalid Command. Showing Help:

  Commands:

    help [command]    Provides help for a given command.
    exit [options]    Exits instance of Vorpal.
    repl              Enters REPL mode.
    erase [options]   erases db

  Command Groups:

    type *            2 sub-commands.
    record *          3 sub-commands.

I still don't know how to do it, but perhaps vorpal shouldn't group the help for commands below a threshold? Maybe if the command group does not have more than 5 commands grouped than the help for them all will be shown on help? Perhaps this number is configurable? Or, better, we should have to group commands explicitly (or maybe we could ungroup explicitly)?

I've been thinking that too. I really don't like how it is currently.
Perhaps it only does that if the length of the help is greater than the screen height? How does that sound?

Is that possible? Sounds like an awesome solution.

Yeah should be pretty easy.

Meanwhile, how do I read the help for these subgrouped commands? Should I ask this on StackOverflow?

Yeah - that would be a good SO question. But quick answer:
help [command]
such as:
help type

Any reason you closed this? I still would like to implement this!

I related this to https://github.com/dthree/vorpal/issues/66 in my mind, and thought they were treating of the same issue, but now that I reread what I had written I see this is a totally different issue.

Okay cool.

Your journey is over. Fixed in v1.10.5.


[C#] Slice value buffers when writing slices of list arrays and binary arrays

Describe the enhancement requested
This is a follow up to #40517, which made round-tripping of sliced arrays via the IPC format work. When writing list arrays and binary/string arrays the full values buffer is written and the value offsets and validity buffer are sliced, but to reduce file sizes the value buffer should be sliced and the value offsets adjusted. Eg. see the C++ implementation.
Component(s)
C#

Issue resolved by pull request 41230
https://github.com/apache/arrow/pull/41230


Test that IsOldProtobufNode returns true for pb2ld output

Fix the implementation of IsOldProtobufNode to match the LD format that
changed.
I'm confused, I forgot to change IsOldProtobufNode when I changed the LD format.

I'd prefer if you consider merging PR #13 instead


[$1000] Infinite loading when returning back from Plaid if user hits CTRL+SHIFT+K before the Plaid page opens up

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

Action Performed:

Go to web chrome
Go to Payments
Click on Add payment method
(Very important Step) Click on Bank account and immediately click on CTRL+SHIFT+K key to open up the new group page (The shortcut keys should be pressed before the Plaid URL bank account page opens up )
Now click on exit
Notice that there is infinite loading on the right side menu

Expected Result:
There should not be infinite loading on returning back from Plaid URL if user hits CTRL+SHIFT+K key before the plaid URL opens up
Actual Result:
There is infinite loading on the right hand side menu
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[ ] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[ ] MacOS / Desktop

Version Number: 1.3.1
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/43996225/232846760-fbe53728-60a4-484c-9b2d-10d6add99ab2.mp4
https://user-images.githubusercontent.com/43996225/232846788-b55d4e56-9f7b-4767-8494-5e6fa1be3fe2.mp4
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681740790785869
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01bb5f680944cd2fd8
Upwork Job ID:<PHONE_NUMBER>123245056
Last Price Increase: 2023-04-26

Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

Bug0 Triage Checklist (Main S/O)

[ ] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
[ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)

If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead

[ ] This bug is reproducible using the reproduction steps in the OP. S/O

If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
If the reproduction steps aren't clear and you determine the correct steps, please update the OP.

[ ] This issue is filled out as thoroughly and clearly as possible

Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.

[ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

Job added to Upwork: https://www.upwork.com/jobs/~01bb5f680944cd2fd8

Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new.

Triggered auto assignment to Contributor-plus team member for initial proposal review - @0xmiroslav (External)

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

Looks like something related to react-navigation may have been mentioned in this issue discussion.
As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.
Feel free to drop a note in #expensify-open-source with any questions.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Infinite loading when returning back from Plaid if user hits CTRL+SHIFT+K before the Plaid page opens up
What is the root cause of that problem?
unhandled error in the code
What changes do you think we should make in order to solve the problem?
modify the AddPersonalBankAccountPage component by adding a new state variable hasError and a componentDidCatch method to catch any errors that may occur during rendering of the component
class AddPersonalBankAccountPage extends React.Component {
constructor(props) {
super(props);
    this.validate = this.validate.bind(this);
    this.submit = this.submit.bind(this);

    this.state = {
        selectedPlaidAccountID: '',
        hasError: false,
    };
}

componentWillUnmount() {
    BankAccounts.clearPersonalBankAccount();
}

componentDidCatch(error, errorInfo) {
    this.setState({hasError: true});
    console.error(error, errorInfo);
}

/**
 * @returns {Object}
 */
validate() {
    return {};
}

submit() {
    const selectedPlaidBankAccount = _.findWhere(lodashGet(this.props.plaidData, 'bankAccounts', []), {
        plaidAccountID: this.state.selectedPlaidAccountID,
    });

    BankAccounts.addPersonalBankAccount(selectedPlaidBankAccount);
}

render() {
    if (this.state.hasError) {
        return
Something went wrong.
;
    }

    const shouldShowSuccess = lodashGet(this.props, 'personalBankAccount.shouldShowSuccess', false);

    return (
        <ScreenWrapper includeSafeAreaPaddingBottom={shouldShowSuccess}>
            // ... rest of the code
        </ScreenWrapper>
    );
}

}
Now thAT the componentDidCatch method is used to set the hasError state variable to true if an error occurs during rendering of the component. Then, in the render method, we check if hasError is true and display an appropriate message to the user.
What alternative solutions did you explore? (Optional)
add a check to verify if the component is mounted before setting the state in the AddPersonalBankAccountPage component's onSelect function
onSelect={(selectedPlaidAccountID) => {
if (this._isMounted) {
this.setState({selectedPlaidAccountID});
}
}}
also add a lifecycle method componentDidMount to set _isMounted to true and a componentWillUnmount method to set _isMounted to false

@0xmiroslav bump for review ^^

no overdue

@0xmiroslav Thank you very much, solution A has been updated

The problem is there even before you close the Plaid modal and get the infinite loading:

The group page url doesn't make sense with the plaid modal. Also, if you finish with the plaid setup, you land in the group page.
I think this should be stopped before, either by preventing the plaid modal from opening if you are no longer in the bank account page, or disabling navigating to the group page (disable shortcuts). Solutions like this one: https://github.com/Expensify/App/issues/17598#issuecomment-1516025668 even if they fix that closing the plaid modal takes you to the right page, they leave the wrong url while the plaid modal is open and don't handle well the case if you complete the plaid setup.

@huzaifa-99 I don't suggest to add another keyboard listener on other pages. It's more like case-by-case fix. The solution should be general. Also there's Search page shortcut.

@0xmiroslav while I too appreciate more general solutions, maybe in this case we should just think about this specific case. This is only happening with the Plaid modal and nothing else, right? so maybe thinking in general may complicate things unnecessarily.
I'm at the moment inclining to block the short cut when the plaid modal is opened (or being opened), this could be like this proposal https://github.com/Expensify/App/issues/17598#issuecomment-1514638320  or write a function that checks the route and possibly other things in the future and use it here: https://github.com/Expensify/App/blob/6a111a5b5c16aaa52ea68ae8e83a014d660a38fa/src/libs/Navigation/AppNavigator/AuthScreens.js#L128-L133
like:
this.unsubscribeGroupShortcut = KeyboardShortcut.subscribe(groupShortcutConfig.shortcutKey, () => {
    if (canUseNavigationShortcut()) {
        Modal.close(() => Navigation.navigate(ROUTES.NEW_GROUP));
    }
}, groupShortcutConfig.descriptionKey, groupShortcutConfig.modifiers, true);

@huzaifa-99 I do like the result of your second proposal here: https://github.com/Expensify/App/issues/17598#issuecomment-1514638320
https://user-images.githubusercontent.com/87341702/234847436-1f4e80f8-f04e-4e98-b7c7-c34776093c10.mov
The part I'm not so convinced about is having to repeat the shortcuts in this component each time you add new navigation shortcuts to AuthScreen. Meanwhile, if you blocked the shortcut with some function in AuthScreen like this, the code ends up being more centralized...
@0xmiroslav thoughts?

Thanks @0xmiroslav , I'm still divided on the path to choose. I'll just ask in slack so we can get some votes.

@laurenreidexpensify @aldo-expensify @0xmiroslav this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@laurenreidexpensify @aldo-expensify @0xmiroslav this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

I had a chat about this one with Florent and I'll spend a bit more time investigating the options before making a decision. I'll try to get it done today.

I failed to check all I wanted to check today, I'll have to do it tomorrow. Sorry for the delay!

Tested more the option of blocking based on the URL and we ended up deciding that it blocks the shortcut for more time (views) that we would like.
We are going to go with @huzaifa-99 's first option in this proposal, but with slightly different parameters to not block the shortcuts when the plaid modal is gone:
this.unsubscribeGroupShortcut = KeyboardShortcut.subscribe(
    groupShortcutConfig.shortcutKey,
    () => {}, // do nothing
    groupShortcutConfig.descriptionKey,
    groupShortcutConfig.modifiers,
    false,
    () => lodashGet(this.props.plaidData, 'bankAccounts', []).length > 0,
);

The redefinition of shortcuts to block them is also a pattern here:  https://github.com/Expensify/App/blob/bb13d03b6ef8abfe3bdaf553a4a81b20018c016a/src/components/KeyboardShortcutsModal.js#L74-L93
Also, to keep things easier to maintain.. we could consider is to adding a property these shortcut constants like this:
        SEARCH: {
            descriptionKey: 'search',
            shortcutKey: 'K',
            modifiers: ['CTRL'],
            trigger: {
                DEFAULT: {input: 'k', modifierFlags: keyModifierControl},
                [PLATFORM_OS_MACOS]: {input: 'k', modifierFlags: keyModifierCommand},
                [PLATFORM_IOS]: {input: 'k', modifierFlags: keyModifierCommand},
            },
+.         type: NAVIGATION_SHORTCUT_TYPE
        },

where NAVIGATION_SHORTCUT_TYPE is just a string. Then we could iterate KEYBOARD_SHORTCUTS to subscribe and block all shortcuts that could navigate (type === NAVIGATION_SHORTCUT_TYPE).

Note to self: offers sent to @priya-zha @0xmiroslav @huzaifa-99 in Upwork

No overdue, PR under review

PR merged

Everyone has been paid - @0xmiroslav let me know when you've completed steps above so we can close. Thanks!

Ah sorry folks I missed that was during the weekend. Will issue a bonus now.

bonuses issued. confirmed no further regression steps. closing. thanks everyone!


Pass github secrets into values.yaml

Hi! I try to use werf 1.2 with github actions. I've had problem with passing secrets from Github to helm. I've tried different combination but i didn't get how to use values to helm release.
My workflow:
---
      - name: Converge
        uses<EMAIL_ADDRESS>        with:
          env: staging
          kube-config-base64-data: ${{ secrets.KUBE_CONFIG_BASE64_DATA }}
        env:
          JWT_SECRET: ${{secrets.JWT_SECRET}}

My values.yaml
---
secrets:
  api-secret:
    JWT_SECRET: ""

I tried WERF_SET_JWT_SECRET: ${{secrets.JWT_SECRET}}; WERF_SET_JWT_SECRET=secrets.api-secret.jwt_secret=${{secrets.JWT_SECRET}}; JWT_SECRET=secrets.api-secret.jwt_secret=${{secrets.JWT_SECRET}}
but nothing helps

Hi!
Based on your values.yaml you should use the following environment variable:
env:
  WERF_SET_JWT_SECRET: secrets.api-secret.JWT_SECRET=${{ secrets.JWT_SECRET }}

Thank you so much! It works!


FileOperation: use the newly introduced FileOperationChecker class throughout the codebase

The current code base has a number of file read and write operations. A few of them employs the newly introduced FileOperationChecker class to perform permission check etc., but many others use various strategies to do so. To improve code reuse, we should re-factor all of the file operations.
Here's an example where we can do a refactor.
https://github.com/NCAR/VAPOR/blob/b1655c54e1a8f1b811c015372ec10d7281fafdca/apps/vaporgui/MainForm.cpp#L2180-L2193

No longer applicable.


freegeoip.net will look up your IP address for you.

From their site.

If no IP or hostname is provided, then your own IP is looked up.

It would definitely make this system more user friendly to people who pack up their smart mirror and move across the country.
You can also use this data to determine the country code, so you only need to over ride it should you want news from another country. Now, all they need to do is get an api token for weather information!

Good point, I didn't think about that. If you make a pr I can merge it in. Otherwise, I can change it tonight.

This got covered in #4 and #6.


Support for gateway and api version 6

https://discordapp.com/developers/docs/change-log
Older versions will be out of service Oct 16th.

In addition to this, EndpointAPI should probably actually specify a version number. Otherwise it'll just break as soon as a breaking update comes along. Ouch.

Added to the develop branch

New changes on Game Object
https://discordapp.com/developers/docs/change-log#august-16-2017-—-breaking-change


Fixed null reference exceptions when FormsMap or Map are null

I think you missed one of the fixes I sent before, but this time I've done the merge request from dev to dev, so hopefully you can accept it easier :)

Thank you Cliff!


Improve message validation

Revert previous change that tries to ignore message content
Add checks for properties from the msg namespace - there must not be
any in the message content

works on integrationtest