Cannot redeclare block-scoped variable

I've so had it with TS that I feel like just ripping it right back out of my damn project.
  I've searched and tried so many things.
This test passes - if you run it ALONE:
import { expect } from "../../test.imports";
const request = require('supertest');
import app from '../../../server/api';

describe('Company - Integration Tests', () => {
  let req;

  beforeEach(() => {
    req = request.agent(app);
  });

  it('returns featured companies', async () => {
    const uri = '/api/v1/companies/featured',
      response = await req.get(uri);

    expect(response.body.length).to.equal(8);
  });
...
});

As soon as you introduce more tests, it starts bitching about the famous Cannot redeclare block-scoped variable:
TS2451: Cannot redeclare block-scoped variable 'test_imports_1'.
company.link.set.spec.tsx
import { expect, mount, React } from "../../test.imports";
import { LinkItem, LinkSet } from "../../../client/Company/CompanyList";
import { Company, Country } from "../../../Interfaces";
import { companyStub, countryStub } from "../../test.stubs";

describe('Company - Link Set', () => {
  it('shows a company header and company link for US companies', () => {
    const links: Array<any> = [],

It's not liking the fact that I am importing stuff from test.imports now in more than one test.  If I comment out the import from test.imports and try straight up imports such as:
import { mount } from 'enzyme';
import React from 'react';
import { expect } from 'chai';

then it gives me the same damn error for chai.
I tried telling it to ignore this in my src/test/tsconfig.json via skipLibCheck but it has no effect:
{
  "compilerOptions": {
  "skipLibCheck": true,
  "noEmit": true,
  "rootDir": "./",
  "moduleResolution": "node",
  "target": "ES2020",           /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
  "module": "commonjs",         /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
  "types": ["node", "enzyme", "mocha", "chai"],
  "lib": ["es6", "dom"],
  "jsx": "react",
  "sourceMap": false,
  "esModuleInterop": true,
  "allowSyntheticDefaultImports": true,
  "resolveJsonModule": true
  },
  "include": ["./**/*spec.tsx"],
  "exclude": ["node_modules"]
}

Here's how I'm running mocha:
"test": "mocha -r ts-node/register src/test/integration/**/*.spec.tsx -r src/test/compiler.ts --color --watch"
TypeScript is so not worth this pain.  And if I can't get this resolved, I'm unfortunately going to have to try Jest instead.

Then of course after I post I have a revelation and fix it.
The problem was I had this in my compile.ts which was overriding my entire .tsconfig.json:

require('ts-node').register({
	compilerOptions: {
		module: 'commonjs'
	},
});


Notification not working on Chinese Custom ROM like oppo, vivo, huawei, one plus...

Please Help. i stuck 4 days already.

@lyseiha Can you explain in more details, do you mean firebase_messaging? Which version do you use, is there any error or they simply don't come?

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v'  please.
All system setups can be slightly different so its always better to open new issues and reference related issues.

When application kill ( oppo and vivo device ) notification not receive. If app in background then receive. Can you help me on that ?

Make sure you app is in protected apps category on these phones it will work.


outputFile umd support？

Suggestion
Use --outputFile for bundling umd or cjs modules
Use Cases

to build a single file, which I can publish to npm
just use tsc, without rollup or any others

Examples
  "compilerOptions": {
    "module": "umd",
    "outFile": "./dist/doux.js",
    "rootDir": "./src"
  }

There are a lot of great bundlers these days and we don't really think it's worth it for TS to invest a bunch of time for something that's ultimately duplicative of existing tools.


[CPU] Adding direct vectorization support for tensor.pack

I have prototyped support for direct tensor.pack vectorization, and I am now looking at codegen for the vectorized tensor.pack operation. The example I have been testing with is a fused transpose + truncf + pack coming from a batch_matmul in llama2:
#map = affine_map<(d0, d1, d2) -> (d2, d0, d1)>
#map1 = affine_map<(d0, d1, d2) -> (d0, d1, d2)>
#map2 = affine_map<()[s0] -> (s0 ceildiv 16)>
module {
  func.func @trunc_pack(%arg0: tensor<?x32x128xf32>) -> tensor<32x?x64x16x2xbf16> {
    %c0 = arith.constant 0 : index
    %cst = arith.constant 0.000000e+00 : bf16
    %dim = tensor.dim %arg0, %c0 : tensor<?x32x128xf32>
    %0 = tensor.empty(%dim) : tensor<32x128x?xbf16>
    %1 = linalg.generic {indexing_maps = [#map, #map1], iterator_types = ["parallel", "parallel", "parallel"]} ins(%arg0 : tensor<?x32x128xf32>) outs(%0 : tensor<32x128x?xbf16>) {
    ^bb0(%in: f32, %out: bf16):
      %5 = arith.truncf %in : f32 to bf16
      linalg.yield %5 : bf16
    } -> tensor<32x128x?xbf16>
    %2 = tensor.empty() : tensor<32x1x64x1x2xbf16>
    %3 = affine.apply #map2()[%dim]
    %4 = tensor.empty(%3) : tensor<32x?x64x16x2xbf16>
    %pack = tensor.pack %1 padding_value(%cst : bf16) outer_dims_perm = [0, 2, 1] inner_dims_pos = [2, 1] inner_tiles = [16, 2] into %4 : tensor<32x128x?xbf16> -> tensor<32x?x64x16x2xbf16>
    return %pack : tensor<32x?x64x16x2xbf16>
  }
}

Without direct support for tensor.pack vectorization, we get tensor.empty() ops that turn into memref.alloca when bufferized, as discussed in https://github.com/openxla/iree/issues/15600 (gist) (dump)
With direct support, the tensor.empty for the pack goes away (gist) (dump)
The performance is not improved in the llama2 model when I use direct vectorization of the tensor.pack, and it is actually slightly worse. Maybe the shape_cast is turning out to add some overhead. Also, there is still a tensor.empty turning into an alloca coming from the transpose + truncf linalg.generic op in both cases, and it seems to me like we would want that to go away as well.
Steps to reproduce

Checkout this IREE branch: https://github.com/Max191/iree/tree/pack-direct-vectorization
Add remote in third_party/llvm-project: https://github.com/Max191/llvm-project
git submodule update --init
iree-compile --iree-hal-target-backends=llvm-cpu --iree-llvmcpu-target-cpu=znver4 --iree-stream-resource-index-bits=64 --iree-vm-target-index-bits=64 --iree-llvmcpu-debug-symbols=true --mlir-print-ir-after-all --mlir-disable-threading --debug-only=iree-llvmcpu-vector-lowering trunc_pack.mlir -o /tmp/trunc_pack.vmfb 2> dump.mlir

I think there will be some extra work to get good performance in this particular case. Here is the inner tile after GenericVectorization with a direct tensor.pack lowering:
%32 = affine.min affine_map<(d0, d1) -> (16, d0 - d1 * 16)>(%25, %arg5)
%33 = affine.apply affine_map<(d0) -> (d0 * 16)>(%arg5)
%34 = affine.apply affine_map<(d0) -> (d0 * 2)>(%arg7)
%extracted_slice = tensor.extract_slice %28[%33, %arg3, %34] [%32, 1, 2] [1, 1, 1] : tensor<?x16x64xf32> to tensor<?x1x2xf32>
%35 = tensor.empty(%32) : tensor<1x2x?xbf16>
%36 = vector.create_mask %32, %c1, %c2 : vector<16x1x2xi1>
%37 = vector.transfer_read %extracted_slice[%c0, %c0, %c0], %cst, %36 {in_bounds = [true, true, true]} : tensor<?x1x2xf32>, vector<16x1x2xf32>
%38 = vector.create_mask %c1, %c2, %32 : vector<1x2x16xi1>
%39 = arith.truncf %37 : vector<16x1x2xf32> to vector<16x1x2xbf16>
// First transpose
%40 = vector.transpose %39, [1, 2, 0] : vector<16x1x2xbf16> to vector<1x2x16xbf16>
%41 = vector.transfer_write %40, %35[%c0, %c0, %c0], %38 {in_bounds = [true, true, true]} : vector<1x2x16xbf16>, tensor<1x2x?xbf16>
%dim = tensor.dim %41, %c2 : tensor<1x2x?xbf16>
%42 = vector.create_mask %c1, %c2, %dim : vector<1x2x16xi1>
%43 = vector.transfer_read %41[%c0, %c0, %c0], %cst_0, %42 {in_bounds = [true, true, true]} : tensor<1x2x?xbf16>, vector<1x2x16xbf16>
%44 = vector.shape_cast %43 : vector<1x2x16xbf16> to vector<1x1x2x1x16xbf16>
// Second transpose
%45 = vector.transpose %44, [0, 3, 1, 4, 2] : vector<1x1x2x1x16xbf16> to vector<1x1x1x16x2xbf16>
%46 = vector.transfer_write %45, %arg8[%arg3, %arg5, %arg7, %c0, %c0] {in_bounds = [true, true, true, true, true]} : vector<1x1x1x16x2xbf16>, tensor<16x?x32x16x2xbf16>
scf.yield %46 : tensor<16x?x32x16x2xbf16>

The first transpose (coming from the fused linalg.generic op) transposes the inner dimension
%40 = vector.transpose %39, [1, 2, 0] : vector<16x1x2xbf16> to vector<1x2x16xbf16>
Then the second transpose transposes it back to the innermost dimension
%45 = vector.transpose %44, [0, 3, 1, 4, 2] : vector<1x1x2x1x16xbf16> to vector<1x1x1x16x2xbf16>
Ideally, the transpose from the linalg.generic should fuse with the pack to just change the outer_dims_perm. Then the inner dimension would not be transposed at all, and it would stay as the inner dimension. This is important because if we want to bitcast the 2xbf16 dimension into a 32 bit type, then we will need it to be innermost.
One potential solution would be to have a higher level rewrite in Flow (maybe somewhere around FusionOfTensorOps) that finds linalg.generic->tensor.pack, and folds any transposing from the linalg.generic into the tensor.pack. This seems useful to me because as the ops get lowered, this would ensure that there is only one transpose operation being created in general. What do you think @hanhanW?

I misread the IR and thought that this is packing for LHS. Now I realized that this is packing for RHS.
Taking a step back, can you check where is the transpose op come from? Is it in linalg.transpose named op form? If so, we are adding some patterns to fold transpose into pack/unpack ops. So far, only pack->transpose is folded. And transpose -> pack is WIP (which is very close to land): https://github.com/llvm/llvm-project/pull/75658
The patterns are added in materialization patterns, so they should be folded if you cherry-pick the change. You can check the IR after these passes: https://github.com/openxla/iree/blob/852684a23661dd4c9fdca733f7520cf3aa28f372/compiler/src/iree/compiler/GlobalOptimization/Passes.cpp#L139-L146
The input becomes
  func.func @trunc_pack(%trunc: tensor<?x32x128xbf16>) -> tensor<32x?x64x16x2xbf16> {
    %c0 = arith.constant 0 : index
    %cst = arith.constant 0.000000e+00 : bf16
    %dim = tensor.dim %arg0, %c0 : tensor<?x32x128xbf16>
    %0 = affine.apply #map()[%dim]
    %1 = tensor.empty(%0) : tensor<32x?x64x16x2xbf16>
    %pack = tensor.pack %arg0
      padding_value(%cst : bf16)
      outer_dims_perm = [1, 0, 2]
      inner_dims_pos = [0, 2]
      inner_tiles = [16, 2] into %1
      : tensor<?x32x128xbf16> -> tensor<32x?x64x16x2xbf16>
    return %pack : tensor<32x?x64x16x2xbf16>
  }

The transpose permutation is [2, 0, 3, 1, 4] and then we can use the trick. There is a bug in the patch, and I haven't looked into the fix yet. Can you cooperate with the author (or help review the PR) and use it in the prototype?

Taking a step back, can you check where is the transpose op come from? Is it in linalg.transpose named op form?

I think it is at the very top level, but it eventually gets generalized and fused with the truncf, creating a linalg.generic op. This all happens before data tiling happens, so the transpose won't get folded even with the new pattern. I can add an extension upstream to linalg.generic op transposes though.
My one question before adding this extension would be: If we fold linalg.generic transposes, should we also fold away transposed indexing maps on fused transpose+elementwise ops (i.e., rewrite linalg.generic->pack into different linalg.generic->pack)?
I would think it's helpful for the reason I explained above, but I'm not sure if that should be part of the PackOp folding patters, or if it should live in IREE somewhere. I'm leaning towards an upstream folding pattern, but I don't have a lot of context on what the typical scopes of op folding patterns are, so it would be good to hear your insights (or maybe from @MaheshRavishankar since Hanhan is traveling).

it eventually gets generalized and fused with the truncf, creating a linalg.generic op.

Is it transpose -> trunc -> matmul? Does transpose propagation help to push it down to right before matmul? Elementwise fusion happens at flow level. We don't need to worry about transpose op with generic form.

I can add an extension upstream to linalg.generic op transposes though.

I asked the author to do support in my first round of review comments, but it is not happening. This is what we want in general.. We can add it if this is the case.

I'm not sure if that should be part of the PackOp folding patters, or if it should live in IREE somewhere.

Today we add the folding patterns in Materialization, which is not an ideal place to me. This is a graph level optimization and I think we should explicitly run folding (transpose, pack/unpack) pass like what we've done for pack/unpack simplification patterns.
The flow to me is:

Push down some transpose ops down to right before matmul.
Fold transpose ops into matmuls. (we might leave some transpose ops in the graph, but that's fine.)
Set encodings on matmuls.
Materialize encodings if this is a single target.
Fold transpose ops into pack/unpack, which is a graph level optimization.

Does it make sense?

Is it transpose -> trunc -> matmul? Does transpose propagation help to push it down to right before matmul? Elementwise fusion happens at flow level. We don't need to worry about transpose op with generic form.

You are right. I had forgotten the fact that I made my test case from IR after Flow, so the transpose was already generalized. I think with the new folding patterns I will probably get what I want here.

The flow to me is:
1. Push down some transpose ops down to right before matmul.
2. Fold transpose ops into matmuls. (we might leave some transpose ops in the graph, but that's fine.)
3. Set encodings on matmuls.
4. Materialize encodings if this is a single target.
5. Fold transpose ops into pack/unpack, which is a graph level optimization.

We had some discussion yesterday, and I'm thinking of a slightly different approach. I am going to put the pack vectorization codegen on hold for a moment to work on generalizing SetEncoding and MaterializeEncoding to allow linalg.generic contraction ops to be data tiled. In my mind this will remove the need for graph level pack/unpack folding after materialization:

Push down transpose ops to right before contraction ops
Fold transpose ops into contraction ops. Allow generalization of matmuls in order to fold transposes
Set encodings on all contraction ops, including generics
Materialize encodings

Folding transposes into matmuls should be the same as folding the packs after materialization as long as we can handle all transposed cases of matmuls. What do you think?
This will also remove the need for LiftGenericToTransposeBatchMatmul, which was the original main point of discussion yesterday. This is creating the extra transpose before the pack right now, which isn't getting folded. Ideally, we won't need this pass, and we will generate the correct pack/unpack without needing any folding.

SGTM, let me know if there are other issues!

For your MLIR pack vectorization patch, you need to consider pack op without padding value. I think the below patch is needed.
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
index e54c3eb6bed2..ce5d3b31c391 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
@@ -1452,16 +1452,21 @@ static LogicalResult
 vectorizeAsTensorPackOp(RewriterBase &rewriter, tensor::PackOp packOp,
                        ArrayRef<int64_t> inputVectorSizes,
                        SmallVectorImpl<Value> &newResults) {
-  auto padValue = packOp.getPaddingValue();
+  OpBuilder::InsertionGuard g(rewriter);
+  rewriter.setInsertionPoint(packOp);
+
   Location loc = packOp.getLoc();
+  auto padValue = packOp.getPaddingValue();
+  if (!padValue) {
+    padValue = rewriter.create<arith::ConstantOp>(
+        loc, rewriter.getZeroAttr(packOp.getSourceType().getElementType()));
+  }
   int64_t inputRank = inputVectorSizes.size();
   int64_t outputRank = packOp.getDestRank();
   auto maskType = VectorType::get(inputVectorSizes, rewriter.getI1Type());
   auto vectorType = VectorType::get(inputVectorSizes, padValue.getType());

-  OpBuilder::InsertionGuard g(rewriter);
-  rewriter.setInsertionPoint(packOp);
-
   ReifiedRankedShapedTypeDims reifiedReturnShapes;
   LogicalResult status =
       cast<ReifyRankedShapedTypeOpInterface>(packOp.getOperation())
@@ -1704,7 +1709,7 @@ static LogicalResult
 vectorizePackOpPrecondition(tensor::PackOp packOp,
                            ArrayRef<int64_t> inputVectorSizes) {
   auto padValue = packOp.getPaddingValue();
-  if (!padValue) {
+  if (padValue && getConstantIntValue(padValue) != std::nullopt) {
     LDBG("pad value is not constant: " << packOp << "\n");
     return failure();
   }

After taking a look at this, I found that it will break the transpose vectorization. Because we lower vector.transfer_read/write first, and the transpose op is removed. I'm working on a patch that can fix the issue.
minor comment on pack op vectorization changes in IREE:

We don't need vectorize-packing flag. (A flag is needed for pad op because there are a few ways to handle it.)
Masking is not required for pack vectorization. We should treat it like LinalgOp. We should vectorize the static cases even if enable-vector-masking is false.

I am making performance improvements in terms of codegen (without direct vectorization). The optimized generic+pack is as fast as generic on single-threaded. It is improved on multi-threaded for few cases, but there are still some room. The performance are similar if I run them at 8 threads. However, the performance drops when I scale it to 16 threads. My guess is that we are penalized by stack allocation. If that's the case, direct vectorization will help. (Def. need more work to put it in a good shape).
This is the microbenchmark I used. There are three cases:

generic
generic + pack
pack

Here are benchmark numbers for generic and fusion:
Optimized generic+pack, single threaded with 127x32x128xf32 shape: 0.369 ms
Single generic without optimization: 0.374 ms
In my fixes, I also improve the generic (which is actually a transpose) performance. So the optimized generic result is: 0.256 ms.
Therefore, we have more room to optimize! I think direct vectorization will help the case.
For single pack op case, I also have other patches to improve it a lot. But it does not help fusion.
Anyway, my fix is not just a hack, I'm going to send them out for review.


Image type should be picked up from headers instead of file name

It is more reliable to use the ContentType header to get the file type instead of the filename, so I recommend you to change the following code :

to this  :
func _on_HTTPRequest_request_completed(result, response_code, headers, body):
	if response_code == 200:
		var image = Image.new()
		var image_error = null

		# determine image type from http headers
		for h in headers:
			var hh = h.to_lower()
			if "content-type" in hh:
				if "image/png" in hh:
						image_error = image.load_png_from_buffer(body)
				if ("image/jpg" in hh) or ("image/jpeg" in hh):
						image_error = image.load_jpg_from_buffer(body)
				if "image/webp" in hh:
						image_error = image.load_webp_from_buffer(body)

		if image_error == null:
			# determine image type from filename extension
			if file_ext == "png":
				image_error = image.load_png_from_buffer(body)
			elif file_ext == "jpg" or file_ext == "jpeg":
				image_error = image.load_jpg_from_buffer(body)
			elif file_ext == "webp":
				image_error = image.load_webp_from_buffer(body)

		if image_error != OK:

etc...

Thank you very much, I will make the change.


Addressing security issues

Added company number to home page and before you file page.
If user provides valid company number redirect to confirm company page
added unit tests
added middleware to extract company parameter from the url

CI: No security warnings found

CI: No security warnings found

CI: No security warnings found

CI: No security warnings found

CI: No security warnings found

CI: No security warnings found

CI: No security warnings found


[MM-33083] Use HTTP request like payload to invoke lambda

Summary
Because the Apps expect HTTP-like requests we have to adopt the payload that is used to invoke the lambda function. The format is documented here. I didn't fill out all fields given that we only need a handful.
There is some double JSON Unmarshaling in the code that I couldn't prevent. Maybe we need to optimize that later.
Given that there is no per path mapping to function right now, all calls go to the first defined function. Hence, the PR kind of drops support for more then one function.
I've tested the PR with the Zendesk app and can confirm that it works.
Ticket Link
https://mattermost.atlassian.net/browse/MM-33083

Thank you, this should make the app developer's job easier.

Codecov Report

Merging #74 (e46ec7d) into master (3380a59) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #74   +/-   ##
=======================================
  Coverage   23.49%   23.49%
=======================================
  Files          20       20
  Lines         613      613
=======================================
  Hits          144      144
  Misses        463      463
  Partials        6        6

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 3380a59...e46ec7d. Read the comment docs.

@iomodo I don't think that assumption is valid. E.g. /install is the default path which would ever be valid then. We've decided offline that we want multi function apps, but I'm hesitant to add support for that in this PR. @levb is working on that anyway.

This PR will work only for a single function. I'm OK merging as is. We can track the multi-function effort in the separate PR


Optional Admin section & avoid timeout failure

If I check for presence of admin_port I can make it conditional for production installations where the admin port does not have to be exposed.

This project is no longer maintained. I recommend you check out golja/influxdb for an updated Puppet module for InfluxDB.


RSA generatekey, unsupported algorithm

This is literally the only package I have found that supports webcrypto with react native...
But I really need to be able to generate the following RSA key (for compatibility with the rest of our system)...
await crypto.subtle.generateKey(
    {
      name: "RSA-PSS",
      hash: "SHA-256",
      modulusLength: 4096,
      publicExponent: new Uint8Array([1, 0, 1]),
    },
    true,
    ["sign", "verify"],
  );

Any plans to support this? I would be really appreciative.

The react native implementation of WebCrypto is in js, so generating an RSA key would be remarkably slow. The original version of msrCrypto didn't support this, but perhaps the latest version does. I intend to integrate the latest version at some point (no timeline), but you're welcome to test it: https://github.com/microsoft/MSR-JavaScript-Crypto.

If the latest supports it I will definitely test it :)
Even if it takes 20 or 30 seconds, if I generate it the second the app launches and the user doesn't make any action that requires it for that time, it is ok, and I will also be caching the result in localstorage.

Ah, I see. Because it's all in js, you'll lock RN's js thread for that time. The app would basically freeze. That said, there may be a workaround, but I haven't investigated.
As for the latest msrCrypto, after a brief glance, it appears to support generating RSA keys, but I haven't tried it. If you do, lmk.

The javascript appears to run in a worker, so shouldn't hang the main thread. But I'm having no luck getting the code to run in react native.

RN doesn’t support workers, so you have to hardcode it to work in a single
thread (that’s how I modified the old msrCrypto). I’d test it in a browser.
If it works in a browser, I’ll modify it to work in RN.
On Fri, Aug 7, 2020 at 16:20 David Callanan<EMAIL_ADDRESS>wrote:

The javascript appears to run in a worker, so shouldn't hang the main
thread. But I'm having no luck getting the code to run in react native.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kevlened/isomorphic-webcrypto/issues/34#issuecomment-670697166,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHJHMDRRF7C4IBFE6BTC3DR7RO2VANCNFSM4PX5H6RA
.

Not looking promising, it's hung my chrome window, no results after a few minutes.

I hope this method of generation would be implemented soon. It would be really helpful in my project to have full WebCrypto support.

@cryptoAlgorithm If I remember correctly, in the end I just created a rest api for this and ran the crypto code on the backend. Not the best solution, but might be a hackish option for the time being.

Hmm i guess i could do that, but the entire reason i wrote the app in React Native (other than being cross platform) was that i could mostly reuse code from our web client which is also written in React. Unfortunately, there aren't libraries that support this RSA algorithm, which is a bit disappointing.

It’s possible to generate these keys in a WebView. The catch is the WebView must be in the render tree (it can be hidden though). Here’s an implementation that renders a hidden webview and proxies WebCrypto calls: https://github.com/webview-crypto/react-native-webview-crypto

Yeah but if i understand correctly the key generation will still be running in JavaScript but not natively right(?) If thats the case, what's the difference between running it in react native itself?

Regarding that library, that might help with my issue. I'll give it a try right now

In real browsers, WebCrypto is implemented in native code, you just access it with js. The performance is significantly better.

Yeah I made a mistake in one of my comments. I commented before looking at the library, and assumed that they were running a JS implimentation of webcrypto in a WebView, which I found rather meaningless. Turns out they were using the native browser implimentation. Although now that I've added the libraries, my app no longer compiles for some duplicated method/symbol error...

@kevlened That's a genius idea to use a WebView

@cryptoAlgorithm

Hmm i guess i could do that, but the entire reason i wrote the app in React Native (other than being cross platform) was that i could mostly reuse code from our web client which is also written in React.

This is a big problem I see all the time. For one of my recent projects I decided to access all dependencies through dependency injection (passing in dependencies into functions) and I used factory functions to abstract away implementation details of certain dependencies. I refused to ever import a dependency directly (like a singleton).
With that in place, 90% of my code was reusable. I was able to switch my entire frontend to React Native in a day without needing to rewrite the majority of my core logic. For any libraries that were not available in React Native (such as cryptography or fetch api), I would just dependency inject an alternative library.
When I failed to find a webcrypto implementation, I just quickly wrote a hackish implementation that communicated with my backend to do it, and I didn't have to change any other code in my project. Obviously only a short-term solution, but I think it is very important to organize your code in a way that allows you to easily plug in and out different implementations for dependencies.
(Sorry this is just me ranting about architecture, feel free to ignore this message).

@davidcallanan that seems like a very interesting approach... Might try it with a future project. But if the RSA keypair is generated in the backend, there are so many things that can go wrong. Like man in the middle attacks, backend vulnerabilities etc. Even if everything could be 100% secure you no longer have truly end to end encryption since the key originates from your server. That's one of the shortcomings that came to my mind when you mentioned this hackish method. (Not trying to be negative or anything, just trying to point out potential security flaws)

@cryptoAlgorithm This idea with the backend is only supposed to be a temporary solution until a better one arises. I was mostly trying to show my approach for code re-use and how you should be able to switch between different solutions as they come to being without sacrificing code re-use. I definitely agree that using a backend defeats the purpose of end-to-end encryption. (In my case I wasn't using it for end-to-end encryption so it didn't affect me).

@cryptoAlgorithm @davidcallanan The recommended library runs code in the WebView without hitting a remote server. Here's the code for the suggested library (basically loads an empty html file, then injects js that runs client side). The WebView method is more secure than the js version today, because it's built on top of the platform's native crypto APIs.
There is one real limitation to any polyfill I've seen in React Native: non-exportable keys. In a browser, you can generate key pairs where the private portion can't be serialized to a jwk or pem. This prevents an xss from exfiltrating a private key. In the browser, not being able to serialize the key means you have to store the key in IndexedDB if you want to use it in future sessions (IndexedDB can store some objects without serializing them). There is no way to simulate the functionality in React Native unless you use a WebCrypto polyfill built on top of the iOS and Android crypto primitives.
The WebView method is certainly the most secure, reliable, and up-to-date method. I've considered moving this library to use the WebView method by default. The only caveat is the extra step of including the WebView in the render tree. This extra step just becomes cumbersome if you're shipping a library built on top of isomorphic-webcrypto to end-users.
Hope that helps with your decision.

@kevlened, I've ran into some issues with this WebView WebCrypto approach, namely the fact that Safari on iOS doesn't fully support RSA-OEAP encryption/decryption with SHA-512/SHA-256 hashes. Only SHA-1 is supported, which won't do. I look forward to the day when Safari finally decides to fix this (its a bug that has been around for ages), but for now I can't really use this approach.


Enhancement/bug - Add manual sync button on App

If I update (add a tag) to a bookmark in Chrome on one machine the change gets pushed to the server (as indicated by the bookmark toolbar getting rebuilt).  However, on another machine running Chrome the sync does not automatically get triggered.  If I then add a tag to a bookmark on the 2nd machine I get a Data out of Sync warning and lose the local change (the warning message gets clipped).
How/when does the App check for changes on the server?
Enhancement request:

Add a Force Download or Manual Download button in the App Settings panel to force a sync/download from the server, and call out any sync conflicts.
In the App Setting panel, add the lastUpdated info from the Server/API and the lastUpdated info for the local bookmarks.  Suggest putting this info next to the Force Download button.

Client app information
App Platform:  Chrome on Win10 and Centos7
App Platform Version:   1.3.1
Other info
Running the API server V1.1.0 on the local Centos machine, with Apps referencing an an external ddns service URL.

The sync/update eventually made to the 2nd machine.  What is the sync update check period?  The manual sync/download button and lastUpdated display would be helpful.

How/when does the App check for changes on the server?

The app checks every 5 minutes for updates to your synced bookmarks. I think this could be reduced to one a minute to help reduce the risk of conflicts occurring. This would increase the load on the service but shouldn't be an issue.

Add a Force Download or Manual Download button in the App Settings panel to force a sync/download from the server, and call out any sync conflicts.

I agree there should be a better interface for resolving conflicts, though I'd hope it should be a very edge case especially if the time between checking for updates is reduced.

+1

This will be added in the next release (v1.4.1).


Reset NCMC statistics before nonequilibrium switching

Fixes #368.
Since #1870, the development version of OpenMM has Context.getIntegrator() return the correct Python subclass, so the restore_properties() workaround should no longer be needed (and would also interfere with the ability to call integrator.reset()).
We may also have to update openmmtools.ContextCache() to streamline the RestorableIntegrator scheme, but this will only work with OpenMM 7.2 and later, so we should hold off on that if we can.
Docstrings have also been clarified.

Can you double check this branch runs locally with the latest openmm dev version? Or does the Travis testing actually covers the application?

Can you double check this branch runs locally with the latest openmm dev version? Or does the Travis testing actually covers the application?

Will check.

Looks like this runs fine locally. Merging.


Accessing Project Online Project specific Custom Fields

Hello Guys,
I have the following issue/question. I would like to access
https://oneproject-prod-torus-weu-azsc-000.project.microsoft.com/pss/api/v1.0/projects( dynamics-org )/tasks/fields
this is the API for retrieving the fields including the project online-specific user custom fields.
I analyzed the corresponding request which is done when you open the project page, and it seems like a token is used with the authority of the Power Platform Application User of the Project Online Application:

If I used the token I extracted from my browser's request, everything works fine. However I am unable to find a way to access this API by using my application, even if I register the App as an application in Azure and also assign the same security roles in the Dataverse Admin Center, I always receive a 401, no matter which rights I give that application.
So it seems this API is only usable by tokens issued by the Application which is used by the Microsoft Project Application User.
Does anyone know how if there is another way to get the project-specific custom fields? I mean the best solution would be to include the Custom Fields which you can create in the Dataverse Table and the Project Online Web View, but currently, this seems not to be supported.
I would be very thankful for any help or recommendations, thank you very much.

That API is for internal use by the project team's applications.
You might look in the graph API though I do not believe they are surfacing their stuff outside of Dataverse for non-system consumption.
Your best bet would be to contact them via the custom fields documentation page on learn.


Random "no such file" Error

Hi,
I love this plugin but I usually have to run 'Upload folder' two or three times to make sure all files and folders has been scp-ed, as I often catch "No such file Error" randomly.
And It would be nice if we have a shortcut/settings to enable/disable the plugin output. When I upload many files, the output is huge.
Thanks for great effort.

Hi,
we see the same behaviour especially when uploading a large number of files.
Looks like too many connections are opened in parallel, since we see the following in /var/log/secure on the remote target.
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Jun 13 15:48:17 server 123 sshd[28502]: [ID - authpriv.err]  error: no more sessions
Is there any way on how to handle the amount of sessions that get opened by the package ?
Cheers


When using RGBLED(pwm=False) the component doesnt work

Describe the bug
When a RGBLED is created using pwm=False blink doesnt appear to do anything. Should it?
I understand why pulse and cycle would be supported. Should they raise an exception when called i.e. "not support when pwm=False"
To Reproduce
from picozero import RGBLED

rgb = RGBLED(0,1,2, pwm=False)

rgb.blink()

Ok, more on this. I dont think any methods for RGBLED(pwm=False) work.
I cant seem to make the LED output using on() or value

Is it reasonable to state that if you want to use an RGBLED you have to use the PWM pins? The functionality is significantly reduced without using pwm....

Note - There is inconsistency between RGBLED & LED when setting whether to use pwm / or use_pwm.

Pretty sure it's this line which is wrong.
https://github.com/RaspberryPiFoundation/picozero/blob/master/picozero/picozero.py#L882
It's setting the brightness which is an alias of value for PWMLED but not for DigitalLED. I think changing it to value should fix it.

Fixed in dev branch.

Release with v0.3.0


PHP syntax highlight bug

VSCode Version: Code 1.9.1 (f9d0c687ff2ea7aabd85fb9a43129117c0ecf519, 2017-02-08T23:31:51.320Z)
OS Version: Darwin x64 16.4.0

Steps to Reproduce:

Give the PHP syntax highlighter the following code<?php

class Foo
{
    function bar(
        $baz,
        $boo
    ) {

    }
}

Final param is never correctly highlighted

Seems that this has been fixed


[2.2.1] Use non-pinnable buffer for zero byte read

Re-targeted https://github.com/aspnet/AspNetCore/pull/4059
/cc @Eilon

@halter73 merge when you're ready.


Update fs2-core, fs2-io to 3.2.4

Updates

co.fs2:fs2-core
co.fs2:fs2-io

from 3.1.6 to 3.2.4.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "co.fs2" } ]

labels: library-update, early-semver-minor, semver-spec-minor, commit-count:1

Superseded by #280.


ArchiSteamFarm Out-of-date: <IP_ADDRESS> -> <IP_ADDRESS>

Checklist

[x] Checked the nixpkgs master branch
[x] Checked the nixpkgs pull requests

Project name
current version: <IP_ADDRESS>
desired version: <IP_ADDRESS>
Notify maintainers
maintainers: @SuperSandro2000
Note for maintainers
Please tag this issue in your PR.

I've upgraded the application: https://github.com/IvarWithoutBones/nixpkgs/commit/67452523ae7b4dc94dbd40927e7a08a1acfa59ca. The binary launches, and unit tests succeed but I haven't tested it in any real-world scenarios. If you could confirm this works, I'll PR the change :)

It works fine for me! Thanks for contribution <3

Just bump it. I have mine still running in Docker and didn't get around changing that yet.

https://github.com/NixOS/nixpkgs/pull/145542


Hi,
Can you provide more info about what you mean please?
If you are using one of my WordPress themes, please note that I provide support for them at https://support.webmandesign.eu
Best regards,
Oliver

hi! i want destroy hoverdir effect on small width display, judging by the code, this function is available, but I do not know how to use the syntax correctly
https://github.com/webmandesign/jquery.hoverdir/blob/master/jquery.hoverdir.js#L198

Hi,
Please note that this is a very old code I no longer maintain and it was derived from https://github.com/codrops/DirectionAwareHoverEffect as mentioned in the code head.
However, please note that this particular code only applies CSS classes on the HTML elements. Any hoverdir effect is provided via your CSS. So to remove the effect on smaller screens it is much easier to tackle the CSS code.
Like I've mentioned if you are using one of my WordPress themes, please log a support ticket at https://support.webmandesign.eu where I will be able to provide you with more specific help.
Otherwise please check your CSS code to remove the effect for small screens. Or you can even fork this code and adapt it to your needs and use it on your project that way.
Best regards,
Oliver


ESP32-S2 Kaluga dev board Display test (IDFGH-9988)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report
Hello. I have recently purchased ESP32-S2 Kaluga development board.
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html
Currently, I develop on esp-idf v4.4.3 hence I havent been able to use the Kaluga dependacy via the component registry as it requires esp-idf v5.0 but that is not an issue.
I have been able to build and flash the example code that I found:
esp\esp-idf\examples\peripherals\lcd\tjpgd

I just changed the display pins as shown below:
#define EXAMPLE_PIN_NUM_DATA0          9  /*!< for 1-line SPI, this also refered as MOSI */
#define EXAMPLE_PIN_NUM_PCLK           15
#define EXAMPLE_PIN_NUM_CS             11
#define EXAMPLE_PIN_NUM_DC             13
#define EXAMPLE_PIN_NUM_RST            16

#define EXAMPLE_PIN_NUM_BK_LIGHT       6

The example flashed and surprisingly it seemed to work (I can see the image being displayed on the Kaluga dev board)
Questions:
1. I do not fully understand why the image is messed up a little bit. See the image below:
https://imgur.com/a/KmljNgR
Do I need to adjust the parameters in the code to ensure the image in the correct format is displayed? Can you please clarify how to do that?
2. Is there any simple way to control the SPI display?
I just simply want to display some text or numbers, Is there a function that would allow to do that?
Full code:
/* LCD tjpgd example

   This example code is in the Public Domain (or CC0 licensed, at your option.)

   Unless required by applicable law or agreed to in writing, this
   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_lcd_panel_io.h"
#include "esp_lcd_panel_vendor.h"
#include "esp_lcd_panel_ops.h"
#include "esp_heap_caps.h"
#include "driver/spi_master.h"
#include "driver/gpio.h"
#include "pretty_effect.h"

// Using SPI2 in the example, as it aslo supports octal modes on some targets
#define LCD_HOST       SPI3_HOST
// To speed up transfers, every SPI transfer sends a bunch of lines. This define specifies how many.
// More means more memory use, but less overhead for setting up / finishing transfers. Make sure 240
// is dividable by this.
#define PARALLEL_LINES 16
// The number of frames to show before rotate the graph
#define ROTATE_FRAME   30

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////// Please update the following configuration according to your LCD spec //////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define EXAMPLE_LCD_PIXEL_CLOCK_HZ (10 * 1000 * 100)
#define EXAMPLE_LCD_BK_LIGHT_ON_LEVEL  0
#define EXAMPLE_LCD_BK_LIGHT_OFF_LEVEL !EXAMPLE_LCD_BK_LIGHT_ON_LEVEL
#define EXAMPLE_PIN_NUM_DATA0          9  /*!< for 1-line SPI, this also refered as MOSI */
#define EXAMPLE_PIN_NUM_PCLK           15
#define EXAMPLE_PIN_NUM_CS             11
#define EXAMPLE_PIN_NUM_DC             13
#define EXAMPLE_PIN_NUM_RST            16

#define EXAMPLE_PIN_NUM_BK_LIGHT       6

// The pixel number in horizontal and vertical
#define EXAMPLE_LCD_H_RES              320
#define EXAMPLE_LCD_V_RES              240
// Bit number used to represent command and parameter
#define EXAMPLE_LCD_CMD_BITS           8
#define EXAMPLE_LCD_PARAM_BITS         8

#if CONFIG_EXAMPLE_LCD_SPI_8_LINE_MODE
#define EXAMPLE_PIN_NUM_DATA1    7
#define EXAMPLE_PIN_NUM_DATA2    8
#define EXAMPLE_PIN_NUM_DATA3    9
#define EXAMPLE_PIN_NUM_DATA4    10
#define EXAMPLE_PIN_NUM_DATA5    11
#define EXAMPLE_PIN_NUM_DATA6    12
#define EXAMPLE_PIN_NUM_DATA7    13
#endif // CONFIG_EXAMPLE_LCD_SPI_8_LINE_MODE

// Simple routine to generate some patterns and send them to the LCD. Because the
// SPI driver handles transactions in the background, we can calculate the next line
// while the previous one is being sent.
static uint16_t *s_lines[2];
static void display_pretty_colors(esp_lcd_panel_handle_t panel_handle)
{
    int frame = 0;
    // Indexes of the line currently being sent to the LCD and the line we're calculating
    int sending_line = 0;
    int calc_line = 0;

    // After ROTATE_FRAME frames, the image will be rotated
    while (frame <= ROTATE_FRAME) {
        frame++;
        for (int y = 0; y < EXAMPLE_LCD_V_RES; y += PARALLEL_LINES) {
            // Calculate a line
            pretty_effect_calc_lines(s_lines[calc_line], y, frame, PARALLEL_LINES);
            sending_line = calc_line;
            calc_line = !calc_line;
            // Send the calculated data
            esp_lcd_panel_draw_bitmap(panel_handle, 0, y, 0 + EXAMPLE_LCD_H_RES, y + PARALLEL_LINES, s_lines[sending_line]);
        }
    }
}

void app_main(void)
{
    /*
    gpio_config_t bk_gpio_config = {
        .mode = GPIO_MODE_OUTPUT,
        .pin_bit_mask = 1ULL << EXAMPLE_PIN_NUM_BK_LIGHT
    };
    // Initialize the GPIO of backlight
    ESP_ERROR_CHECK(gpio_config(&bk_gpio_config));
    */

    spi_bus_config_t buscfg = {
        .sclk_io_num = EXAMPLE_PIN_NUM_PCLK,
        .mosi_io_num = EXAMPLE_PIN_NUM_DATA0,
        .miso_io_num = -1,
        .quadwp_io_num = -1,
        .quadhd_io_num = -1,
        .max_transfer_sz = PARALLEL_LINES * EXAMPLE_LCD_H_RES * 2 + 8
    };
#if CONFIG_EXAMPLE_LCD_SPI_8_LINE_MODE
    buscfg.data1_io_num = EXAMPLE_PIN_NUM_DATA1;
    buscfg.data2_io_num = EXAMPLE_PIN_NUM_DATA2;
    buscfg.data3_io_num = EXAMPLE_PIN_NUM_DATA3;
    buscfg.data4_io_num = EXAMPLE_PIN_NUM_DATA4;
    buscfg.data5_io_num = EXAMPLE_PIN_NUM_DATA5;
    buscfg.data6_io_num = EXAMPLE_PIN_NUM_DATA6;
    buscfg.data7_io_num = EXAMPLE_PIN_NUM_DATA7;
    buscfg.flags = SPICOMMON_BUSFLAG_OCTAL;
#endif
    // Initialize the SPI bus
    ESP_ERROR_CHECK(spi_bus_initialize(LCD_HOST, &buscfg, SPI_DMA_CH_AUTO));

    esp_lcd_panel_io_handle_t io_handle = NULL;
    esp_lcd_panel_io_spi_config_t io_config = {
        .dc_gpio_num = EXAMPLE_PIN_NUM_DC,
        .cs_gpio_num = EXAMPLE_PIN_NUM_CS,
        .pclk_hz = EXAMPLE_LCD_PIXEL_CLOCK_HZ,
        .lcd_cmd_bits = EXAMPLE_LCD_CMD_BITS,
        .lcd_param_bits = EXAMPLE_LCD_PARAM_BITS,
        .spi_mode = 0,
        .trans_queue_depth = 10,
    };
#if CONFIG_EXAMPLE_LCD_SPI_8_LINE_MODE
    io_config.spi_mode = 3;  // using mode 3 to simulate Intel 8080 timing
    io_config.flags.octal_mode = 1;
#endif
    // Attach the LCD to the SPI bus
    ESP_ERROR_CHECK(esp_lcd_new_panel_io_spi((esp_lcd_spi_bus_handle_t)LCD_HOST, &io_config, &io_handle));

    esp_lcd_panel_handle_t panel_handle = NULL;
    esp_lcd_panel_dev_config_t panel_config = {
        .reset_gpio_num = EXAMPLE_PIN_NUM_RST,
        .color_space = ESP_LCD_COLOR_SPACE_BGR,
        .bits_per_pixel = 16,
    };
    // Initialize the LCD configuration
    ESP_ERROR_CHECK(esp_lcd_new_panel_st7789(io_handle, &panel_config, &panel_handle));

    // Turn off backlight to avoid unpredictable display on the LCD screen while initializing
    // the LCD panel driver. (Different LCD screens may need different levels)
    //ESP_ERROR_CHECK(gpio_set_level(EXAMPLE_PIN_NUM_BK_LIGHT, EXAMPLE_LCD_BK_LIGHT_OFF_LEVEL));

    // Reset the display
    ESP_ERROR_CHECK(esp_lcd_panel_reset(panel_handle));

    // Initialize LCD panel
    ESP_ERROR_CHECK(esp_lcd_panel_init(panel_handle));

    // Swap x and y axis (Different LCD screens may need different options)
    ESP_ERROR_CHECK(esp_lcd_panel_swap_xy(panel_handle, true));
    ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, true));

    // Turn on backlight (Different LCD screens may need different levels)
    ESP_ERROR_CHECK(gpio_set_level(EXAMPLE_PIN_NUM_BK_LIGHT, EXAMPLE_LCD_BK_LIGHT_ON_LEVEL));

    // Initialize the effect displayed
    ESP_ERROR_CHECK(pretty_effect_init());

    // "Rotate or not" flag
    bool is_rotated = false;

    // Allocate memory for the pixel buffers
    for (int i = 0; i < 2; i++) {
        s_lines[i] = heap_caps_malloc(EXAMPLE_LCD_H_RES * PARALLEL_LINES * sizeof(uint16_t), MALLOC_CAP_DMA);
        assert(s_lines[i] != NULL);
    }

    // Start and rotate
    while (1) {
        printf("test \n");
        // Set driver configuration to rotate 180 degrees each time
        ESP_ERROR_CHECK(esp_lcd_panel_mirror(panel_handle, is_rotated, is_rotated));
        // Display
        display_pretty_colors(panel_handle);
        is_rotated = !is_rotated;
    }
}

@krupis

I do not fully understand why the image is messed up a little bit.

Please disable the color inverting function by calling   ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, false));.  This is not a bug in the software but something depends on your LCD module.

Is there any simple way to control the SPI display?

esp_lcd component is a driver component, which doesn't include GUI rendering stuffs. You may want to try some GUI library like lvgl

@krupis I'm sorry that the BSP does not work for you. For you initial tests, you can use Kaluga BSP v1.2.0 that supports IDF v4.4 https://components.espressif.com/components/espressif/esp32_s2_kaluga_kit/versions/1.2.0
and a basic example from tag examples_v4.4 https://github.com/espressif/esp-bsp/tree/examples_v4.4/examples/display_audio
These older version might miss some of the new features introduced in newer version of the BSP. We plan to re-introduce support for IDFv4.4 releases to BSP soon

@krupis I'm sorry that the BSP does not work for you. For you initial tests, you can use Kaluga BSP v1.2.0 that supports IDF v4.4 https://components.espressif.com/components/espressif/esp32_s2_kaluga_kit/versions/1.2.0
and a basic example from tag examples_v4.4 https://github.com/espressif/esp-bsp/tree/examples_v4.4/examples/display_audio
These older version might miss some of the new features introduced in newer version of the BSP. We plan to re-introduce support for IDFv4.4 releases to BSP soon

Would you be able to explain how to run esp32_s2_kaluga_kit example project?
https://components.espressif.com/components/espressif/esp32_s2_kaluga_kit/versions/1.2.0
or
https://github.com/espressif/esp-bsp/tree/examples_v4.4/esp32_s2_kaluga_kit
Does not actually explain how can I create and build the project..

@krupis

I do not fully understand why the image is messed up a little bit.

Please disable the color inverting function by calling  ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, false));. This is not a bug in the software but something depends on your LCD module.

Is there any simple way to control the SPI display?

esp_lcd component is a driver component, which doesn't include GUI rendering stuffs. You may want to try some GUI library like lvgl

Sure I can add:
ESP_ERROR_CHECK(esp_lcd_panel_invert_color(panel_handle, false));

Only thing that does is invert colors. Now the background is orange color and the letters are blue.

But the whole image is still messed up (warped and mirrored).
Is this example supposed to generate this kind of image effect or it should be displayed as image.jpg
Actual image displayed:
https://ibb.co/KXt4M8Y

I think this is warping effect is referred to as "pretty effect" implemented in the example source code, please check https://github.com/espressif/esp-idf/blob/3cec3a0026098d1b027f2103ec154a15baf97318/examples/peripherals/lcd/tjpgd/main/pretty_effect.c.

I think this is warping effect is referred to as "pretty effect" implemented in the example source code, please check https://github.com/espressif/esp-idf/blob/3cec3a0026098d1b027f2103ec154a15baf97318/examples/peripherals/lcd/tjpgd/main/pretty_effect.c.

Thanks for pointing that out! I should have checked it before. Now it makes sense why the displayed image is warped but I dont believe it should be mirrorred right? By looking at the displayed image, you can hardly tell it says "ESP32".
Do you think this is also a part of pretty effect or there is some issue with the display initialization?

I think this is warping effect is referred to as "pretty effect" implemented in the example source code, please check https://github.com/espressif/esp-idf/blob/3cec3a0026098d1b027f2103ec154a15baf97318/examples/peripherals/lcd/tjpgd/main/pretty_effect.c.

Thanks for pointing that out! I should have checked it before. Now it makes sense why the displayed image is warped but I dont believe it should be mirrorred right? By looking at the displayed image, you can hardly tell it says "ESP32".
Do you think this is also a part of pretty effect or there is some issue with the display initialization?

Hi.
I've had this problem as well. I don't remember exactly what and where I've done it, but there should be the orientation settings in the display driver ST7789.c or so. You can change the rotation, but somewhere closer to the end of this file there is the code which overrides your settings. You have to write your screen rotation settings in there. Check that.

Indeed settings such as rotation and mirroring may differ from display to display, and this basic IDF example does not attempt to get this right for every type of a development board. In esp-bsp components we do make sure that for each board the display is initialized with the correct settings. However if you are starting from a basic example, some DIY will probably be required, as pointed out by @payday1991.

Indeed settings such as rotation and mirroring may differ from display to display, and this basic IDF example does not attempt to get this right for every type of a development board. In esp-bsp components we do make sure that for each board the display is initialized with the correct settings. However if you are starting from a basic example, some DIY will probably be required, as pointed out by @payday1991.

Thanks for clarifying. Yeah that makes sense.
I just installed v5.0.1 and able to build the example project for kaluga by creating a new project using command
idf.py create-project-from-example "espressif/esp32_s2_kaluga_kit^2.2.3:display_audio"

as described in component registry:

I will let you know if I am able to get the display working properly with this example

@igrr
I have flashed the official kaluga kit example to my kaluga devboard and I can say that everything works fine! I am impressed!
Just having one issue with touch pad.
I refer to the documentation here:
https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-esp32-s2-kaluga-1-kit.html
In order to get touch pad display to work, I must put switch positions to OFF

And thats exactly what I have done:

I have connected the touch pad to dedicated connect, (the clear plastic that came with the touch pad is on the bottom side of the touch pad).

As soon as I turn ON the devboard, it is constantly rebooting (I believe the issue is because touch pad clicked callback is constantly being called but I am  not touching the buttons)
H¬\[Z±¹ation scheme version is Line Fitting[1B][0m
[1B][0;32mI (753) adc button: Calibration Success[1B][0m
[1B][0;32mI (753) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (763) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (763) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (773) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (773) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (783) LVGL: Starting LVGL task[1B][0m
[1B][0;32mI (783) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [1B][0m
btn handler
[1B][0;31mE (793) ES8311: es8311_voice_volume_get(380): I2C read/write error[1B][0m

assert failed: disp_set_volume disp_example.c:48 (volume_arc)

Backtrace: 0x40025bda:0x3ffcdde0 0x4002d3a5:0x3ffcde00 0x4003318d:0x3ffcde20 0x40088149:0x3ffcdf40 0x40087e38:0x3ffcdf60 0x4002f78d:0x3ffce000

ELF file SHA256: d23d4b603e268197

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x40025665
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6108,len:0x1760
load:0x4004c000,len:0xabc
load:0x40050000,len:0x31b4
entry 0x4004c1c0
[1B][0;32mI (24) boot: ESP-IDF v5.0.1 2nd stage bootloader[1B][0m
[1B][0;32mI (24) boot: compile time 08:06:50[1B][0m
[1B][0;32mI (24) boot: chip revision: v0.0[1B][0m
[1B][0;32mI (26) boot.esp32s2: SPI Speed      : 80MHz[1B][0m
[1B][0;32mI (31) boot.esp32s2: SPI Mode       : DIO[1B][0m
[1B][0;32mI (36) boot.esp32s2: SPI Flash Size : 4MB[1B][0m
[1B][0;32mI (41) boot: Enabling RNG early entropy source...[1B][0m
[1B][0;32mI (46) boot: Partition Table:[1B][0m
[1B][0;32mI (50) boot: ## Label            Usage          Type ST Offset   Length[1B][0m
[1B][0;32mI (57) boot:  0 nvs              WiFi data        01 02 00009000 00006000[1B][0m
[1B][0;32mI (64) boot:  1 phy_init         RF data          01 01 0000f000 00001000[1B][0m
[1B][0;32mI (72) boot:  2 factory          factory app      00 00 00010000 00100000[1B][0m
[1B][0;32mI (79) boot:  3 storage          Unknown data     01 82 00110000 002f0000[1B][0m
[1B][0;32mI (87) boot: End of partition table[1B][0m
[1B][0;32mI (91) esp_image: segment 0: paddr=00010020 vaddr=3f000020 size=1502ch ( 86060) map[1B][0m
[1B][0;32mI (117) esp_image: segment 1: paddr=00025054 vaddr=3ffc47e0 size=01cdch (  7388) load[1B][0m
[1B][0;32mI (119) esp_image: segment 2: paddr=00026d38 vaddr=40024000 size=092e0h ( 37600) load[1B][0m
[1B][0;32mI (132) esp_image: segment 3: paddr=00030020 vaddr=40080020 size=56238h (352824) map[1B][0m
[1B][0;32mI (202) esp_image: segment 4: paddr=00086260 vaddr=4002d2e0 size=074f4h ( 29940) load[1B][0m
[1B][0;32mI (218) boot: Loaded app from partition at offset 0x10000[1B][0m
[1B][0;32mI (218) boot: Disabling RNG early entropy source...[1B][0m
[1B][0;32mI (230) cache: Instruction cache 	: size 8KB, 4Ways, cache line size 32Byte[1B][0m
[1B][0;32mI (230) cache: Data cache 		: size 8KB, 4Ways, cache line size 32Byte[1B][0m
[1B][0;32mI (233) esp_psram: Found 2MB PSRAM device[1B][0m
[1B][0;32mI (238) esp_psram: Speed: 80MHz[1B][0m
[1B][0;32mI (242) cpu_start: Pro cpu up.[1B][0m
[1B][0;32mI (464) esp_psram: SPI SRAM memory test OK[1B][0m
[1B][0;32mI (472) cpu_start: Pro cpu start user code[1B][0m
[1B][0;32mI (472) cpu_start: cpu freq: 160000000 Hz[1B][0m
[1B][0;32mI (472) cpu_start: Application information:[1B][0m
[1B][0;32mI (475) cpu_start: Project name:     bsp-kaluga-display-audio-exampl[1B][0m
[1B][0;32mI (482) cpu_start: App version:      1[1B][0m
[1B][0;32mI (486) cpu_start: Compile time:     Apr 28 2023 08:06:28[1B][0m
[1B][0;32mI (492) cpu_start: ELF file SHA256:  d23d4b603e268197...[1B][0m
[1B][0;32mI (498) cpu_start: ESP-IDF:          v5.0.1[1B][0m
[1B][0;32mI (503) cpu_start: Min chip rev:     v0.0[1B][0m
[1B][0;32mI (508) cpu_start: Max chip rev:     v1.99 [1B][0m
[1B][0;32mI (513) cpu_start: Chip rev:         v0.0[1B][0m
[1B][0;32mI (518) heap_init: Initializing. RAM available for dynamic allocation:[1B][0m
[1B][0;32mI (525) heap_init: At 3FFC7428 len 00034BD8 (210 KiB): DRAM[1B][0m
[1B][0;32mI (531) heap_init: At 3FFFC000 len 00003A10 (14 KiB): DRAM[1B][0m
[1B][0;32mI (537) heap_init: At 3FF9E000 len 00002000 (8 KiB): RTCRAM[1B][0m
[1B][0;32mI (544) spi_flash: detected chip: generic[1B][0m
[1B][0;32mI (548) spi_flash: flash io: dio[1B][0m
[1B][0;32mI (582) cpu_start: Starting scheduler on PRO CPU.[1B][0m
[1B][0;32mI (583) example: Initializing SPIFFS[1B][0m
[1B][0;32mI (723) example: Partition size: total: 2293769, used: 303662[1B][0m
[1B][0;32mI (723) gpio: GPIO[45]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 [1B][0m
[1B][0;31mE (723) ES8311: es8311_init(329): I2C read/write error[1B][0m
[1B][0;32mI (733) gpio: GPIO[10]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [1B][0m
[1B][0;32mI (723) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (743) adc button: calibration scheme version is Line Fitting[1B][0m
[1B][0;32mI (753) adc button: Calibration Success[1B][0m
[1B][0;32mI (753) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (763) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (763) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (773) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (773) button: IoT Button Version: 2.5.1[1B][0m
[1B][0;32mI (783) LVGL: Starting LVGL task[1B][0m
[1B][0;32mI (783) gpio: GPIO[13]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 [1B][0m
btn handler
[1B][0;31mE (793) ES8311: es8311_voice_volume_get(380): I2C read/write error[1B][0m

as

@krupis The issue you are seeing seems to be related to I2C:
[1B][0;31mE (793) ES8311: es8311_voice_volume_get(380): I2C read/write error[1B][0m

— which is probably because the ESP8311 codec's I2C interface is connected to GPIOs 7 and 8. If you flip the "touch switch" for the corresponding GPIOs to "OFF", I2C interface will no longer be connected and I2C communication will fail.
Please try setting these 2 switches back on; as far as i can tell from the touch extension board schematic diagram, GPIOs 7 and 8 aren't used to connect any touch pads, anyway. Only GPIOs

Given this part of Kaluga board schematic diagram, GPIOs 7 and 8 correspond to the 7th switch on SW3 and 1st on SW4.

Thanks for clarifying


added default save plot behaviour,

and settings class to configure processing

coverage: 94.322% (+4.7%) from 89.626%
when pulling 59dfe765266bbdb1b0f87797216fc386aa497b76 on 24-add-default-save-for-plots-and-also-let-user-configure
into 8a2c9d05b01409042af53e8cce8416b7577cd5d1 on main.


Escape special characters like " from SKU before building predicate for fetching existing products

Here spacial characters like " should be escaped:
https://github.com/sphereio/sphere-product-import/blob/8d98933b319244dfee34cd2ccc3c8a7e73564bf3/lib/product-import.coffee#L133
https://github.com/sphereio/sphere-product-import/blob/8d98933b319244dfee34cd2ccc3c8a7e73564bf3/lib/product-import.coffee#L138
Otherwise API will produce an error:
{
  "statusCode": 400,
  "message": "Malformed parameter: where: Syntax error while parsing 'where'. Invalid input 't', expected comma or ')' (line 1, column 20):\nvariants(sku in (\"\"test\")) or masterVariant(sku in (\"\"test\"))\n                   ^",
  "errors": [
    {
      "code": "InvalidInput",
      "message": "Malformed parameter: where: Syntax error while parsing 'where'. Invalid input 't', expected comma or ')' (line 1, column 20):\nvariants(sku in (\"\"test\")) or masterVariant(sku in (\"\"test\"))\n                   ^"
    }
  ],
  "originalRequest": {
    "endpoint": "/product-projections?where=variants(sku%20in%20(%22%22test%22))%20or%20masterVariant(sku%20in%20(%22%22test%22))&staged=true"
  }
}

@butenkor Thanks for reporting this! You are right, SKUs should be escaped before sending the request, but the right spot for this is here actually.

Related to this


Data for a different division returned error

Data for a different division returned, requested: 0af902c2-8060-43fe-af00-aab395711ce7
https://courageleague.azurewebsites.net/division/Division One/teams/Summer 24

Cached data:
{
"result": [
{
"_id": null,
"_model": "Team",
"_where": null,
"_created": "2024-06-19T07:36:53.7329889Z"
},
{
"_created": "2024-06-19T07:40:04.666293Z",
"Filter": {
"date": null,
"divisionId": [],
"seasonId": "0af902c2-8060-43fe-af00-aab395711ce7",
"teamId": null,
"excludeProposals": false,
"ignoreDates": false
},
"Type": "GetDivisionData"
},
{
"_created": "2024-06-19T07:36:53.7360333Z",
"Filter": {
"date": null,
"divisionId": [
"0af902c2-8060-43fe-af00-aab395711ce7",
"6e616fa0-4c61-474e-8a17-2bef77c82a40"
],
"seasonId": null,
"teamId": null,
"excludeProposals": false,
"ignoreDates": false
},
"Type": "GetDivisionData"
},
{
"_id": null,
"_model": "Season",
"_where": null,
"_created": "2024-06-19T07:36:53.6910531Z"
},
{
"_created": "2024-06-19T07:35:11.3649355Z",
"Filter": {
"date": null,
"divisionId": [],
"seasonId": null,
"teamId": null,
"excludeProposals": false,
"ignoreDates": false
},
"Type": "Get"
}
],
"success": true,
"trace": [],
"messages": [],
"errors": [],
"warnings": []
}

Relevant (division) cached keys:
[
    {
        "_created": "2024-06-19T07:40:04.666293Z",
        "Filter": {
            "date": null,
            "divisionId": [],
            "seasonId": "0af902c2-8060-43fe-af00-aab395711ce7",
            "teamId": null,
            "excludeProposals": false,
            "ignoreDates": false
        },
        "Type": "GetDivisionData"
    },
    {
        "_created": "2024-06-19T07:36:53.7360333Z",
        "Filter": {
            "date": null,
            "divisionId": [
                "0af902c2-8060-43fe-af00-aab395711ce7",
                "6e616fa0-4c61-474e-8a17-2bef77c82a40"
            ],
            "seasonId": null,
            "teamId": null,
            "excludeProposals": false,
            "ignoreDates": false
        },
        "Type": "GetDivisionData"
    }
]

Given this api request:
https://courageleague.azurewebsites.net/data/api/Division/0af902c2-8060-43fe-af00-aab395711ce7/Data?seasonId=363b17a3-d954-4956-9d14-429ba0779d9b

The division id is 0af902c2-8060-43fe-af00-aab395711ce7
The season id is 363b17a3-d954-4956-9d14-429ba0779d9b
However there is a cached entry where the division id is stored in the season id part of the filter:
{
        "_created": "2024-06-19T07:40:04.666293Z",
        "Filter": {
            "date": null,
            "divisionId": [],
            "seasonId": "0af902c2-8060-43fe-af00-aab395711ce7",  /* <----- this is a division id */
            "teamId": null,
            "excludeProposals": false,
            "ignoreDates": false
        },
        "Type": "GetDivisionData"
    }

It is possible that the return url after login has produced a 'corrupt' query string where the divisionId was passed in as the seasonId, but this needs to be proven further

Prior to the recent url encoding change (#914) the logout url would have looked something like this:
https://localhost:7247/api/Account/Logout/?redirectUrl=https://localhost:44426/teams/Summer%2024/?division=Div%20One

Resulting in the browser returning to:
https://localhost:44426/teams/Summer%2024/?division=Div%20One

https://localhost:7247/api/Division/Data?seasonId=0af902c2-8060-43fe-af00-aab395711ce7

For this url to be produced:

requestedSeasonId must have been resolved to 0af902c2-8060-43fe-af00-aab395711ce7 (a division id)

Cache url (when logged in)
https://courageleague.azurewebsites.net/data/api/Status/Cache

Looks like an API mapping issue:
{
    "_created": "2024-06-19T10:05:41.0644014Z",
    "Filter": {
        "date": null,
        "divisionId": [],
        "seasonId": "0af902c2-8060-43fe-af00-aab395711ce7",
        "teamId": null,
        "excludeProposals": false,
        "ignoreDates": false
    },
    "Type": "GetDivisionData",
    "ApiUrl": "https://courageleague.azurewebsites.net/data/api/Division/0af902c2-8060-43fe-af00-aab395711ce7/Data?seasonId=363b17a3-d954-4956-9d14-429ba0779d9b",
    "ReferringUrl": ""
}

Given the ApiUrl 0af902c2-8060-43fe-af00-aab395711ce7 should be treated as a divisionId and 363b17a3-d954-4956-9d14-429ba0779d9b as a seasonId

Working theory is that aspnet would have selected different routes based on query parameters, for example:
[HttpGet("/api/Division/{seasonId}/Data")]

May have been selected by the router if there is a season id on the query string


[BUG] azure-cosmos attempts making telemetry connection even though disabled

Describe the bug
The azure-cosmos client (CosmosAsyncClient) attempts making a connection to telemetry endpoint <IP_ADDRESS> in its init-routine, even though CosmosClientBuilder.clientTelemetryEnabled is false. In our case, we have not allowed our application to make connections to the telemetry service. This results in the client logging it is "not on azure vm", and also Netty logging a generic warn in reactor.netty.http.client.HttpClientConnect: "The connection observed an error". In our case it seems to happen consistently from the reactor-http-epoll-2 thread, but I don't know if it is tied to that.
We would prefer not to have this warn when we start up our application, but we can't simply suppress it because we would like to log warns happening from other reasons with the Netty connections. Preferably we would like cosmos-azure to not attempt to make any telemetry connections unless we have asked it to do so.
Exception or Stack Trace
io.netty.handler.proxy.HttpProxyHandler$HttpProxyConnectException: http, none, /w.x.y.z:3128 => /<IP_ADDRESS>:80, status: 403 Forbidden
	at io.netty.handler.proxy.HttpProxyHandler.handleResponse(HttpProxyHandler.java:200)
	at io.netty.handler.proxy.ProxyHandler.channelRead(ProxyHandler.java:257)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:436)
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:324)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251)
	at io.netty.handler.proxy.HttpProxyHandler$HttpClientCodecWrapper.channelRead(HttpProxyHandler.java:272)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795)
	at io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe$1.run(AbstractEpollChannel.java:425)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:469)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:384)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:831)

To Reproduce
Block access to <IP_ADDRESS> and call CosmosClientBuilder.buildAsyncClient()
Code Snippet
https://github.com/Azure/azure-sdk-for-java/blob/edfedd946d8e79d39aeeb9f1ba992a6fbc437999/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/RxDocumentClientImpl.java#L451
Expected behavior
Do not expect azure-cosmos to make connection to telemetry, unless explicitly enabled. (default documentet as false)
Setup (please complete the following information):

OS: linux
Library/Libraries: [e.g. com.azure:azure-cosmos:1.19.1 (groupId:artifactId:version)]
Java version: 16
App Server/Environment: Azure Kubernetes Service
Frameworks: Spring Boot

Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

[x] Bug Description Added
[x] Repro Steps Added
[x] Setup information Added

@lmolkova @kushagraThapar could you please follow up with @runeflobakk's github issue?

@simplynaveen20  - can you please take a look at this ?

This has been fixed in the recent PR by @xinlian12

This has been fixed in the recent PR by @xinlian12

@kushagraThapar I am facing same issue (while using latest maven azure-cosmos library v4.x)
Can you please point out which PR fixed it and which version is this available from ?

@AshutoshNirkhe - I doubt if you are facing the same issue, because you are getting error on i.o.e.internal.grpc.OkHttpGrpcExporter which is not cosmos code, looks like some grpc code from your application.
Also, if you notice, you are trying to connect to the localhost. Our telemetry did not go to the localhost.
So I would recommend debugging your application to see why this is happening, nevertheless here is the PR that fixed it for the above original issue reported: https://github.com/Azure/azure-sdk-for-java/pull/34889


the class that error, success, warning changed

hello there, I really need this plugin now, but there is some change in bootstrap 3.2.0, look, the error, warning and success class add a prefix 'has-', would you please update this plugin to match the bootstrap ? thanks

They already have these prefixes.

ouch! I'm so sorry, I mistake used another plugin called jqBootstrapValidation, it's their problem,ohhhhh ,sorry


Add missed integration tests

Pull Request Test Coverage Report for Build 448327577

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

Totals

Change from base Build 448271966:
0.0%

Covered Lines:
497

Relevant Lines:
512

💛  - Coveralls


Header props

So right now rest props are being applied on a element instead of the header so we can't able to pass any props such as a custom style and seems like only way is to override bx--header class. Is this intended? Thanks
<header role="banner" aria-label="{ariaLabel}" class:bx--header="{true}">
  <slot name="skip-to-content" />
  {#if ($shouldRenderHamburgerMenu && winWidth < 1056) || persistentHamburgerMenu}
    <HamburgerMenu bind:isOpen="{isSideNavOpen}" />
  {/if}
  <a
    href="{href}"
    class:bx--header__name="{true}"
    bind:this="{ref}"
    {...$$restProps}
    on:click
  >
    {#if company}
      <span class:bx--header__name--prefix="{true}">{company} </span>
    {/if}
    <slot name="platform">{platformName}</slot>
  </a>
  <slot />
</header>

Yes, in this specific case it was intended.
The reasoning is that the a element has more arbitrary props that a consumer may want to control. It does feel inconsistent because some components $$restProps is top-level.


bug on getTitle($bForceLocal = false)

getTitle($bForceLocal = false) can not get both title and original
only get original title
please fix it

Please provide some debug information.

@drlearn use this function two times.
$original = getTitle($bForceLocal = true);
$title = getTitle($bForceLocal = false);
@FabianBeiner can be closed.


clear out cache of local simulation after a certain size

Use Case
when running a simulation on the front end, you can just keep adding frames infinitely
Acceptance Criteria
The cache should have an upper size limit,
possibly a setting that lets you define how much you want to keep (number of frames? or a size?)
Details
Please provide any helpful specifications

This will also be helpful for visualizing large NERDSS trajectories

how large to the NERDSS trajectories get @blairlyons


[Ziro] Rose Pine Dawn

All the buttons show up with the original Spotify colors, so they are black rather than what it is supposed to be.
Hovering over playlist and other things also make it turn black, I do not know if I am doing anything wrong though.
I have the most recent versions of both of the applications, and I followed the install instructions
Here are images of it:

The reason for this is because the theme isn't compatible/styled for the new sidebar layout yet.  You can go back to the old sidebar layout if you want by going into experimental features and disabling your library x. Otherwise, you're going to have to wait until someone decides to contribute and update the theme.

Thank you, this worked!! I was scared I couldn't use this cute theme www
Hope someone fixes it for the new library though


refactor: upgrade to go 1.17.9

Signed-off-by: ankitm123<EMAIL_ADDRESS>Most of the packages are updated to 1.17.9.

/cc @vbehar

/lgtm


defold: Add version 1.2.170

https://github.com/defold/defold/tree/dev/editor#requirements

Java 11 (installation instructions - Note that we do not yet officially support development with a newer version of Java than 11.
Leiningen (install instructions)

https://github.com/defold/defold/tree/dev/editor#windows

This seems to be instructions for building from source code. The zip archive already contains jdk11.
Changed checkver to https://d.defold.com/stable/ (however zip always has the same filename - issues with scoop cache?)
Also, if there is a way to fake LOCALAPPDATA env var, it could be used for persist

What is up with this now? Should it be added or what? I don't understand..


RingModN has division

So maybe it should be renamed to FieldModN ?

@xrmonitors : Thanks for your question. But RingModN implements actually "Multiplicative group of integers modulo N". It's not necessarily a field. You could see its definition in wiki


Blacklisted recommendation should come with docs

I like the idea of blacklisting plugins that duplicate existing node module functionality. However, the gulp plugins generally have very good documentation specifically for gulp while the npm packages are more general.
It would be nice if there was at least a small example about integrating the npm package with gulp. Perhaps a default example:
use the xxxx module directly

_link to module_ _example_

Closing this because the plugin page has been rewritten and integrated with our main website: https://github.com/gulpjs/gulpjs.github.io
The blacklist isn't currently applied to the new plugin page. It is still used by --verify but that might change soon.


Dev Research: Vault

Describe the task
Research Hashicorp's Vault, we seem to have direction from OCIO(?) to use this.  It provides additional security in OpenShift
Acceptance Criteria

[ ] Review viability of using Vault, understand trade-offs, pricing if any
[ ] Review with Om - are there any bcgov specific Vault packages or anything bcgov we should use?
[ ] Answer if creating a POC is viable.

Additional context

Vault will provide trade-offs between team velocity and security, but likely are worth it (i.e. we will be slightly slower, but significantly more secure).
Docs: https://beta-docs.developer.gov.bc.ca/vault-secrets-management-service/

Added docs: https://beta-docs.developer.gov.bc.ca/vault-secrets-management-service/

Hashicorp's Vault application is deployed The Platform Services team

Free of cost

Available to all BC Government Development Teams on both the Silver and Gold service clusters

Hosted at https://vault.developer.gov.bc.ca/

Details for login

Enter platform-services for the Namespace
Select OIDC for the Method
license_plate for the Role (Need more info on this)
Important links
https://github.com/bcgov/how-to-workshops/tree/master/vault
https://github.com/BCDevOps/openshift-wiki/blob/master/docs/Vault/VaultGettingStarted.md

This repo might be able to provide some hints on implementation details.
https://github.com/bcgov-nr/nr-broker

Recording Om's observations

I don’t see good references to creating/updating secrets in vault using pipelines, I have asked the question but I doubt there is anything. https://chat.developer.gov.bc.ca/channel/devops-vault?msg=zgte3YTN28anXxmWn
The vault sidecar needs resources which could be used for applications and apis otherwise.

Hey team! Please add your planning poker estimate with Zenhub @mariaye-aot @midhun-aot @mishraomp @nikhila-aot @RyanBirtch-aot @sakthi-aot

@acoard-aot  - can we close this issue given that we are not using vault


Voting system

Add a feature to allow for calling a vote in a fashion similarly to below:
~call_vote @Committee Buy more bananas
This would call a vote with a topic of "Buy more bananas", and will constrain the vote to close either when all members of the role Committee have voted or after a predetermined amount of time has passed.
Calling a vote would cause the bot to create a new message with the topic of the vote and add 3 reactions, one for each of For, Against or Abstain. After closing the vote, the bot would count the number of valid votes for each category and record them in the original message. A vote would be classed as invalid if someone outside of the constrained role cast a vote or if a member has voted more than once.

Hello! I got tagged here? :)

My bad, trying to emphasise something that's common on our Discord server

Due to a lack of interest in this I'm closing it out. Feel free to request reopening if this is something you can contribute.


EDC - Vault Token renew feature

Related to: https://github.com/eclipse-edc/Connector/issues/3610

Ongoing work on upstream EDC: https://github.com/eclipse-edc/Connector/issues/3610


MOSEK ensure any license tokens are checked in after initialisation

Proposed to fix issue #197
Tested with Python 3.10.11 Mosek 10.1.16 and Linopy 0.31 in a Linux Ubuntu machine.

great thanks @jotaigna


ImportError: ./lib/caffe-action/python/caffe/_caffe.so: undefined symbol: _ZN5caffe4mtx_E

Hi,Thank you for your work first!
when i run the code like below,it makes some mistake,and i didn't how it happened , can you give me some suggestion about this ? Thank you .
zhou@Gaming:~/temporal-segment-networks-master$ sudo python tools/eval_net.py ucf101 1 rgb /home/zhou/temporal-segment-networks-master/Dataset/flows/ucf101  models/ucf101/tsn_bn_inception_rgb_deploy.prototxt models/ucf101_split_1_tsn_rgb_reference_bn_inception.caffemodel  --num_worker 1 --save_scores home/zhou/temporal-segment-networks-master/Dataset/defen
[sudo] password for zhou:
Namespace(caffe_path='./lib/caffe-action/', dataset='ucf101', flow_x_prefix='flow_x_', flow_y_prefix='flow_y_', frame_path='/home/zhou/temporal-segment-networks-master/Dataset/flows/ucf101', gpus=None, modality='rgb', net_proto='models/ucf101/tsn_bn_inception_rgb_deploy.prototxt', net_weights='models/ucf101_split_1_tsn_rgb_reference_bn_inception.caffemodel', num_frame_per_video=25, num_worker=1, rgb_prefix='img_', save_scores='home/zhou/temporal-segment-networks-master/Dataset/defen', split=1)
Traceback (most recent call last):
File "tools/eval_net.py", line 38, in
from pyActionRecog.action_caffe import CaffeNet
File "./pyActionRecog/action_caffe.py", line 4, in
import caffe
File "./lib/caffe-action/python/caffe/init.py", line 1, in
from .pycaffe import Net, SGDSolver
File "./lib/caffe-action/python/caffe/pycaffe.py", line 13, in
from ._caffe import Net, SGDSolver
ImportError: ./lib/caffe-action/python/caffe/_caffe.so: undefined symbol: _ZN5caffe4mtx_E

./lib/caffe-action/python/caffe/_caffe.so: undefined symbol: _ZN5caffe4mtx_E
Do you have multiple versions of Caffe installed and happen to have them in the linker path?

yeah ,I had  make  a official latest vision caffe before it,should i  make clean  it ?

No idea. Just make sure you _caffe.so is linked with the correct one. This can be checked with commands like ldd _caffe.so.

Thank you so much ! i just run the build_all.sh again ,now it's working !
but i just have another question ,if i had a TitanX only ,is the OpenMPI is necessary to install ?

No. But please read the README carefully about the batchsize settings if you want to run training.

Thank you!


fix: restore position setting on unmount #135

This PR makes it so that the position is properly reset whenever the drawer is unmounted.
@emilkowalski You can use this page for testing (although you need to unset the overflow: hidden's on the body in globals.css).
page.txt
Fixes #135.

When will this be released you think? @emilkowalski

@bjcgg Just released a new version!

@bjcgg Just released a new version!

Thanks a lot!

@emilkowalski 0.7.1 still seems to suffer from this issue. 🤔  Or is it just me? Here's the updated CodeSandbox with v.0.7.1: https://codesandbox.io/p/sandbox/body-scroll-lock-bug-on-unmount-v-0-7-1-cnxlvt?file=%2Fpackage.json%3A6%2C23
I'm wondering if the build succeeded, because when I try to pnpm run build it I get a:

src/index.tsx(788,14): error TS2742: The inferred type of 'Drawer' cannot be named without a reference to '.pnpm/@types+react@18.2.21/node_modules/@types/react'. This is likely not portable. A type annotation is necessary.

✅ This seems to be fixed in the latest release (0.7.5).


Missing the scopes attribute from the response

@mujehoxe Hello, thank you for the report. Why do you need the scopes from the response? They should be the same ones you are requesting.

Well, let's say i am used to it being in the response while using the google-sign package

@mujehoxe If it's possible to retrieve them from the SignInClient, a PR would be welcome to implement them :)

From what i read it is not possible, scopes require consent screen


migrate SCVMM replications

in reference to this https://docs.microsoft.com/en-us/azure/site-recovery/scvmm-site-recovery-deprecation?source=docs
the deprecation of VMM as a management source for ASR, is there a method to convert current replicated VMs to Hyper-V based replications or do you need to delete what you have and resetup the VMs to replicate via a Hyper-V site?
Thanks

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

ID: 67d4a458-6594-5501-e3f4-803afbd872aa
Version Independent ID: e2c6a08b-13fd-6974-0e74-3a1f68c8f94a
Content: Upcoming deprecation of DR between customer owned sites using Hyper-V and between sites managed by SCVMM to Azure
Content Source: articles/site-recovery/scvmm-site-recovery-deprecation.md
Service: site-recovery
GitHub Login: @Rajani-Janaki-Ram
Microsoft Alias: rajanaki

Thanks for your comment. We are actively investigating and will get back to you shortly. Thanks for your patience.

@Rajani-Janaki-Ram  - any insight on this please?

Thanks for your feedback! There's no conversion option. Disable/reenable is needed.

@smithcl167 There is no convert from VMM-to-Azure to Hyper-V-to-Azure option now, customers
would need to disable and re-enable replicatoin.
Closing this issue for now. Please tag me in your reply if need any further assistance in this matter.


Fix nullability mismatch

Description
Fixes a nullability mismatch in GraphQL query.
Add error middleware
Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] My changes generate no new errors

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


chore: proof v1 docs

Changes

#1529  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


IDWH-1372 Fix union validation bug

I don't think you really needed the new exception but it should work

The exception is there because if we use the normal exception,  the prettified exception message is gigantic


MoveVM API for system pallet

Develop API to call Substrate MoveVM from the system pallet.
Involves also dealing with different Move status codes.

This task involves creating move-vm-backend with everything around.
Probably we can slice it into some minor sub-tasks.


deploy correct image to staging cloud run

This PR fixes the GH Action file to deploy the correct version of the GCR image to staging cloud run

Coverage remained the same at 89.831% when pulling bb8db3a3235df46ce8b472887d1947283ce59eb5 on fix-action-2 into 92e3a837178009eaa1c797938381c4d2a40604e1 on master.


Can't find a way to open popups by default and keep them open while playing

I'm using GeoJSON with addLastPoint: true which creates a marker on the last point. I'd like to bind a popup to this marker (done in pointToLayer), immediately open the popup (not been able to do), and, more importantly, keep the popup open even during playback (ie, after clicking "play" on the player control).
Is this possible at all? Would you accept it as feature request?
EDIT: Reading through the bugs, I found the timeloading event mentioned. Listening on that event and (re)opening the popup at each invocation produces flickering and is not a viable solution.

The way I would solve it : create your own popup using L.popup and move/update it on timeloading.

The way I would solve it : create your own popup using L.popup and move/update it on timeloading.

Unfortunately, for moderate to high frame rate that is virtually unusable due to flickering. Furthermore, I'd like the popup to stay open even when the user pauses the playback.

I did not test but i'm guessing that if you add your own popup without binding it to a marker. You can then move it opened.
var popup = L.popup()
    .setLatLng(lastpointCoordinates)
    .setContent('
Hello world!
This is a nice popup.
')
    .openOn(map);

On timedimension changes, find the last point and update the position using popup.setLatLng.
I'm sorry if it's already what you've done. I will have to test this.

Ah, that's a nice idea. I'll check it tomorrow and let you know. Thanks!

if you add your own popup without binding it to a marker. You can then move it opened.

This needed a few adjustments but set me on the right track. It works very well. Thanks!


Add trash notification

Adds notification for reminder to keep out trash.

[x] Reminds 1 week, then two days and the day before.
[x] Add actionable notification to send "done" to prevent notifications if task is done.

see https://www.smarthomelab.ca/advanced-ios-notifications/

added in commit and before : 2b01311ac0db3ed9c453b301fd778bab03fd679f


The find/replace functionality

The find/replace functionality should only happen when the user has selected another checkbox requesting it. We can also use this to warn them it will take extra long to perform.

@ewsopp can you explain/describe what you mean saying "find/replace"? We already do content search/replace on fly when needed.
This option:

At this point, I think the best way forward is to not modify the post content and use filters to find/replace on the fly (without actually modifying database).


Job directory change detected: Job file 'Connections.config' timestamp differs between source and working directories.

After a major change in my stack and some deployment issues, my webjobs stops working with the following error:
Job directory change detected: Job file 'Connections.config' timestamp differs between source and working directories.

I see that in code, there is something that sets the timestamp here:
// we need to restore the previous last update time so our file write
// doesn't cause the job directory to be considered dirty
fileInfo.LastWriteTimeUtc = lastWriteTime;

But it doesn't seem to work.
I look the two directory that I believe are supposed to be interesting, and I see that most files have the correct timestamp, but all directory and connections.config does not.

So I ran the webjobs in_place, and it was failing on start with no errors.
So I tried again on my computer and I get an error at startup in Main().
Now, I could close this bug as I got an answer, but the real error has never been reported to the Kudu webjob dashboard. And it was randomly failing on a different thing.
I will let you decide if you want to close or not.

That does seem like strange error handling. I'm not able to repro this with a trivial crashing continuous WebJobs:
        static void Main(string[] args)
        {
            Console.WriteLine("Hello");
            throw new Exception("Foo");
        }

Which gives me this pretty explanatory log in the WebJobs dashboard:
[04/02/2018 18:53:16 > 0c6040: SYS INFO] Status changed to Starting
[04/02/2018 18:53:16 > 0c6040: SYS INFO] WebJob singleton setting is False
[04/02/2018 18:53:17 > 0c6040: SYS INFO] Run script 'ConsoleAppNet471.exe' with script host - 'WindowsScriptHost'
[04/02/2018 18:53:17 > 0c6040: SYS INFO] Status changed to Running
[04/02/2018 18:53:21 > 0c6040: INFO] Hello
[04/02/2018 18:53:22 > 0c6040: ERR ]
[04/02/2018 18:53:23 > 0c6040: ERR ] Unhandled Exception: System.Exception: Foo
[04/02/2018 18:53:23 > 0c6040: ERR ]    at ConsoleAppNet471.Program.Main(String[] args) in D:\tmp\ConsoleAppNet471\ConsoleAppNet471\Program.cs:line 14
[04/02/2018 18:53:23 > 0c6040: SYS ERR ] Job failed due to exit code -532462766
[04/02/2018 18:53:23 > 0c6040: SYS INFO] Process went down, waiting for 60 seconds
[04/02/2018 18:53:23 > 0c6040: SYS INFO] Status changed to PendingRestart

Maybe there is something different in how your WebJob was crashing that was causing the different behavior?

I appreciate you checked about this. I also tried to spin up a new project myself with limited details and I could not make it happen again with the limited project.
Here is the exact log:
[04/02/2018 07:29:09 > 910117: SYS INFO] Job directory change detected: Job file 'Connections.config' timestamp differs between source and working directories.
[04/02/2018 07:29:12 > 910117: SYS INFO] Run script 'HBTI.ServiceTech.WebJobs.exe' with script host - 'WindowsScriptHost'
[04/02/2018 07:29:12 > 910117: SYS INFO] Status changed to Running
[04/02/2018 07:29:16 > 910117: ERR ]
[04/02/2018 07:29:16 > 910117: ERR ] Unhandled Exception:
[04/02/2018 07:29:16 > 910117: SYS ERR ] Job failed due to exit code -532462766
[04/02/2018 07:29:16 > 910117: SYS INFO] Process went down, waiting for 60 seconds
[04/02/2018 07:29:16 > 910117: SYS INFO] Status changed to PendingRestart
[04/02/2018 07:30:16 > 910117: SYS INFO] Job directory change detected: Job file 'Connections.config' timestamp differs between source and working directories.

My code was failing on parsing a CSHTML file with
var file = System.IO.File.ReadAllText("File.cshtml");
RazorEngine.Engine.Razor.Compile(file, "random", typeof(FileModel));

And in my CSHTML I was reaching for properties that didn't exist in FileModel.
I was on .NET 46, nuget <package id="RazorEngine" version="3.10.0" targetFramework="net46" />
If you have any ideas you can think about why the error was not showing up. Otherwise you can close.
Thanks again!

I have a similar issue related to dates in Azure Web jobs when i convert dates to Rfc3339String for API requests.
public static string ToRfc3339String(this DateTime dateTime)
{
return dateTime.ToString("yyyy-MM-dd'T'HH:mm:ss.fffzzz", DateTimeFormatInfo.InvariantInfo);
}
The result you get is different in WebJobs often yeilding to BadRequest types in API calls.
2019-10-30T21:55:07.000-00:00
2019-10-30T21:55:07.000+00:00


OCL settings

goals:
implement OCL settings menu

open window on settings command
option to change shortcut
button to give a list of all commands

implemented


JMX access control : readOnly and readWrite access

[Moved from carbon-kernel jira]
Current Carbon JMX implementation doesn't allow to control the access level of users. Anyone logged on to JMX server has full access.
Need to control access,
readOnly and readWrite

Asma (@azinneera) is now looking into this.


Module 2 exercises [Celestina Deku]

Road Density.pdf
Soil Ph Suitability .pdf
Health Accessibility.pdf
Proximity to Education Facility .pdf

Please "drag & drop" exercise 1 pdf file below.

Please "drag & drop" exercise 2 pdf file below.

Please "drag & drop" exercise 3 pdf file below.

Please "drag & drop" exercise 4 pdf file below.

Please UPDATE THE TITLE of this "Issue" in the title bar above with your name.

If you haven't done so, please go back to Module 2 and make sure to take
the post-training survey. Participating in surveys is required for receiving
the "GALUP Certificate" by the University of Florida.

Well done, Celestina. You clearly grasped the material outlined in Module 2 and successfully applied it to these exercises. I really like that you added symbols for the health facilities located across the region. My only suggestion with this is to make sure this layer is laid on top of the polygon layers if you are going to include it, to increase visibility of the points.
I noticed a minor issue in your symbology for Exercise 4, in which there is 4th green symbol in your legend (there only needs to be 3). This can be fixed by doing the following:

Opening the SpH_re layer properties and go to the Symbology tab
Select the dark green symbol that says "all other values" next to it
Press the red minus symbol at the bottom of the window
Re-select the green color ramp
Now you should just have 3 items in your legend with the correct colors assigned. I understand this step wasn't included in the instructions, so I hope this helps. Feel free to correct the map and resubmit that exercise above.

Overall, great work and thank you for your participation!