text:
Build: bazel build failed on aarch64/arm64

The envoy-build-arm64 build failure after change https://github.com/envoyproxy/envoy/pull/7555 .
Looks like we should do some upgrade on the build script? [1]
The failure log as below, and the complete log could be found in [2].
2019-07-17 04:36:30.704351 | ubuntu-xenial-arm64 | ERROR: /root/.cache/bazel/_bazel_root/d1453b47f357d0031ad1ec60e06d06b3/external/com_github_grpc_grpc/BUILD:470:1: Linking of rule '@com_github_grpc_grpc//:grpc_cpp_plugin' failed (Exit 1) gcc failed: error executing command /usr/bin/gcc -o bazel-out/host/bin/external/com_github_grpc_grpc/grpc_cpp_plugin -pthread -pthread -Wl,-S '-fuse-ld=gold' -Wl,-no-as-needed -Wl,-z,relro,-z,now -B/usr/bin -pass-exit-codes ... (remaining 3 argument(s) skipped)
2019-07-17 04:36:30.704649 | ubuntu-xenial-arm64 |
2019-07-17 04:36:30.705050 | ubuntu-xenial-arm64 | Use --sandbox_debug to see verbose messages from the sandbox

// ... ...

2019-07-17 04:36:31.467814 | ubuntu-xenial-arm64 | bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/common.o:common.cc:function google::protobuf::internal::LogMessage::Finish(): error: undefined reference to 'std::exception::~exception()'
2019-07-17 04:36:31.468882 | ubuntu-xenial-arm64 | bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/common.o:common.cc:function google::protobuf::internal::LogMessage::Finish(): error: undefined reference to '__cxa_free_exception'
2019-07-17 04:36:31.469947 | ubuntu-xenial-arm64 | bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/common.o:common.cc:typeinfo for google::protobuf::FatalException: error: undefined reference to 'typeinfo for std::exception'
2019-07-17 04:36:31.471155 | ubuntu-xenial-arm64 | bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/repeated_field.o:repeated_field.cc:function google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int): error: undefined reference to 'typeinfo for char'
2019-07-17 04:36:31.472402 | ubuntu-xenial-arm64 | bazel-out/host/bin/external/com_google_protobuf/_objs/protobuf_lite/repeated_field.o:repeated_field.cc:function google::protobuf::internal::RepeatedPtrFieldBase::InternalExtend(int): error: undefined reference to 'typeinfo for char'
2019-07-17 04:36:31.472712 | ubuntu-xenial-arm64 | collect2: error: ld returned 1 exit status
2019-07-17 04:36:31.653533 | ubuntu-xenial-arm64 | Target //source/exe:envoy-static failed to build
2019-07-17 04:36:31.656353 | ubuntu-xenial-arm64 | Use --verbose_failures to see the command lines of failed build steps.
2019-07-17 04:36:31.766152 | ubuntu-xenial-arm64 | INFO: Elapsed time: 1057.765s, Critical Path: 218.77s
2019-07-17 04:36:31.766644 | ubuntu-xenial-arm64 | INFO: 1135 processes: 1135 linux-sandbox.
2019-07-17 04:36:31.787151 | ubuntu-xenial-arm64 | FAILED: Build did NOT complete successfully
2019-07-17 04:36:31.795969 | ubuntu-xenial-arm64 | FAILED: Build did NOT complete successfully

[1] https://github.com/envoyproxy/envoy/blob/master/.zuul/playbooks/envoy-build/run.yaml#L10-L23
[2] https://logs.openlabtesting.org/logs/periodic-4/16/github.com/envoyproxy/envoy/master/envoy-build-arm64/7df5468/

cc @lizan

what version of bazel are you using?
On Mon, Jul 22, 2019 at 8:05 PM Yikun Jiang notifications@github.com
wrote:

cc @lizan https://github.com/lizan
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/envoy/issues/7686?email_source=notifications&email_token=AAHYB353HXWZB3X4CY7CNWTQAZYPFA5CNFSM4IF7MPTKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2RY3UY#issuecomment-514035155,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAHYB36ZGU4VPTRLCVII6DTQAZYPFANCNFSM4IF7MPTA
.

@lizan The original bazel version is 0.24, but I also updated the bazel to latest version: 0.28.1, and then got the same error.

Do you have a log based on 0.28.1? Are you pulling the same .bazelrc?

Do you have a log based on 0.28.1?

Now I try to build using bazel 0.28.1 with 14dd85d969325bb76feb85035a1668c6cbd8f6e2 , the job is running. and I will paste the error log after job complete.

Are you pulling the same .bazelrc?

I guess no, because the env will be rebuild in every and code was reset to the 14dd85d969325bb76feb85035a1668c6cbd8f6e2
[1] https://github.com/Yikun/arm-openlab-test/pull/19

I had a short period with a similar issue but have compiled aarch64 today on master without issue

@moderation thanks for the info, and the last job is also successful, I will try again to build the latest master.

The latest result [1] is successful, the mater branch with the 0.28.1 version bazel.
[1] http://status.openlabtesting.org/build/5e25a7c9521b41779b38e69e69e868a5

The arm64 build successfully in recent 3 times, so close the issue.

authors: Yikun lizan moderation


text:
Update com_github_zlib_ng_zlib_ng: 2.0.6 (current: 2.0.5)

Signed-off-by: Faseela K faseela.k@est.tech
Fixes #19352

/lgtm deps

cc @phlax

source: gharchive/pull-request

authors: kfaseela moderation

repo: envoyproxy/envoy

license_type: permissive

license_source: github-api


text:
Update jwt_verify_lib to latest commit

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

cc @qiwzhang

Updates look OK but DCO needs to be fixed first

Updates look OK but DCO needs to be fixed first

Fixed.

/retest

authors: bochengchu moderation phlax


text:
http: json_to_metadata filter response support

Commit Message:
Additional Description:
Risk Level:low
Testing:unit tests
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

/retest

/retest


text:
Add getter for last downstream header byte received

Commit Message: Add getter for last downstream header byte received
Additional Description: Used for latency measurements
Risk Level: WCPGW?
Testing:  Added unit test.
Docs Changes: None
Release Notes: None
Platform Specific Features: None

Also unit test :-)
/wait

I added a unit test. There appears to be an unrelated tcmalloc compile failure at HEAD, so I can't seem to run it locally, but let's see what the automatic checks on the github side does.
For reference, this is the unrelated error:
$ bazel test test/common/stream_info:stream_info_impl_test
INFO: Analyzed target //test/common/stream_info:stream_info_impl_test (1 packages loaded, 28844 targets configured).
INFO: Found 1 test target...
ERROR: /usr/local/google/home/habets/.cache/bazel/_bazel_habets/de688f6285cfa010ac620e8961bfaa1b/external/com_github_google_tcmalloc/tcmalloc/BUILD:296:11: Compiling tcmalloc/arena.cc failed: (Exit 1): gcc failed: error executing command (from target @com_github_google_tcmalloc//tcmalloc:common) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++14' -MD -MF ... (remaining 35 arguments skipped)

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
In file included from external/com_github_google_tcmalloc/tcmalloc/internal/lifetime_tracker.h:21,
                 from external/com_github_google_tcmalloc/tcmalloc/huge_page_filler.h:32,
                 from external/com_github_google_tcmalloc/tcmalloc/huge_region.h:24,
                 from external/com_github_google_tcmalloc/tcmalloc/huge_page_aware_allocator.h:26,
                 from external/com_github_google_tcmalloc/tcmalloc/page_allocator.h:25,
                 from external/com_github_google_tcmalloc/tcmalloc/static_vars.h:40,
                 from external/com_github_google_tcmalloc/tcmalloc/arena.cc:18:
external/com_github_google_tcmalloc/tcmalloc/internal/lifetime_predictions.h:179:20: error: declaration of 'const int tcmalloc::tcmalloc_internal::LifetimeDatabase::kMaxStackDepth' changes meaning of 'kMaxStackDepth' [-Wchanges-meaning]
  179 |   static const int kMaxStackDepth = 64;
      |                    ^~~~~~~~~~~~~~
external/com_github_google_tcmalloc/tcmalloc/internal/lifetime_predictions.h:107:18: note: used here to mean 'constexpr const int tcmalloc::tcmalloc_internal::kMaxStackDepth'
  107 |     void* stack_[kMaxStackDepth];
      |                  ^~~~~~~~~~~~~~
In file included from external/com_github_google_tcmalloc/tcmalloc/common.h:37,
                 from external/com_github_google_tcmalloc/tcmalloc/arena.h:23,
                 from external/com_github_google_tcmalloc/tcmalloc/arena.cc:15:
external/com_github_google_tcmalloc/tcmalloc/internal/logging.h:49:22: note: declared here
   49 | static constexpr int kMaxStackDepth = 64;
      |                      ^~~~~~~~~~~~~~
Target //test/common/stream_info:stream_info_impl_test failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 5.532s, Critical Path: 3.47s
INFO: 10 processes: 8 internal, 2 linux-sandbox.
FAILED: Build did NOT complete successfully
//test/common/stream_info:stream_info_impl_test                 FAILED TO BUILD

Executed 0 out of 1 test: 1 fails to build.

Risk Level: WCPGW?
famous last words =P

I added a unit test. There appears to be an unrelated tcmalloc compile failure at HEAD, so I can't seem to run it locally, but let's see what the automatic checks on the github side does.

Use clang instead or pass --define tcmalloc=gperftools in the build. I think it's some compiler weirdness with old gcc AFAIR.

We usually pass --config=clang or --config=libc++ since there are a bunch of other flags that need to be set. This one would probably resolve with libc++.

Both of those give me the same error as the CC=clang, FWIW.

authors: ThomasHabets alyssawilk kyessenov


text:
codec: Raise max_request_headers_kb limit to 96 KiB

Signed-off-by: Auni Ahsan auni@google.com
Bump up max configurable max_request_headers_kb to 96 KiB.
Add a check to http1/codec_impl.cc for headers size.
Raise the default library limits in http_parser (at compilation) and nghttp2 (at options) to 0x7fffffff, so we'll rely on our own codec check.
Risk Level: Medium.
Testing: Moved all the large request headers tests to ProtocolIntegrationTest.
Part of #5626.

What's missing this PR is an actual runtime call of http_parser_set_max_header_size. That will go in the Http conn manager config, but it's impossible to test AFAIK because the proto validator limit is lower than the http_parser default limit. When the limit is bumped past 80kb, i'll add an http1 integration test and a settings call to conn manager/config.cc.

Hey Auni, as discussed offline, ping me when CI is happy?
/wait

Hi! I need some input on how to resolve this. Essentially, my test is failing because the nghttp2 library max request headers check, which I now manually configure, trips differently from the existing codec check. The codec check at codec_impl.cc:563 will check if the headers exceed the limit and reset the stream if so, while the nghttp2 library check will just flat-out close the stream.
How should I resolve this? Two ideas:

In the onStreamClose callback check if the nghttp2 limit was reached and interrupt with a reset stream if so. (Not sure if this is possible or logical.)
Set the nghttp2 limit to something arbitrarily higher and solely rely on our own check, whose behaviour we're in more control of. I was thinking either the max configurable limit from envoy; though since that would have to be edited twice each time the config limit is changed, maybe the configured limit + 1 would work.

Thoughts?

Ahh, some more details. The library check triggers before any header bytes are dispatched to the library, so server_callbacks_.newStream() is never called (and so it's never reset, which is why my test fails). So yeah again, I could configure the library check up high as I suggested to never get hit, or we could decide that behaviour is useful.

OK so I went with an arbitrarily hard-coded nghttp2 max-header-len setting of 100kb. This can be easily changed or be configurable later, but this changes no envoy behaviour. (Both before and after this PR, the nghttp2 max check will not ever be triggered.)

/retest

Hi @mattklein123, working on some changes to this. I'm having an issue with the http codec configuration I could use some input on.
Basically, to set the http parser limits you need to call http_parser_set_max_header_size(x). What I'm finding from my testing is that this setting persists across test runs, i.e. making that call in one http1/codec_impl test affects the success of a different test. I had thought previously that each envoy codec would be instantiating its http parser separately, but it looks like these settings are global. Does that make sense?

I had thought previously that each envoy codec would be instantiating its http parser separately, but it looks like these settings are global. Does that make sense?

Did you look at the http_parser code? I'm guessing it's setting some global variable (unfortunately).

Indeed it is. I think for now I'll make this http_set_parser call just one time, in the conn manager config. This could be messy if we ever set up per-service header limiting or something like that.

Alright, I did a bunch of cleanup here. Notable changes:

http_parser_set_max_header_size is called by conn manager/config.cc. In my codec tests I manually set the limits on instantiation, and the limits are tested in integration test. Unfortunately I was unable to add a unit test to conn manager/config_test.cc, because this sets a static global variable my test has no way of accessing.
I changed the expected error code to 400. This should be 431, but I need to work out how to do that. The 431 error code came from the conn manager impl rejecting the request, but now the HPE_HEADER_OVERFLOW dispatch error comes from the http_parser codec library before the conn manager checks it. I need to catch that dispatch error and reject the request at the http1 codec, but I'm not sure of what the neatest way to do that is.

@mattklein123: OK, how about this. I have DEFAULT_MAX_REQUEST_HEADERS_KB defined in codec.h. I'll add a MAX_CONFIGURABLE_MAX_REQUEST_HEADERS_KB, which will be equal to the maximum setting in the conn manager proto. (If there's to infer the max proto invalidation programmatically that would be cool.)
In response to your comment on nghttp2: yes, a different codec could theoretically exceed this limit, but that can't actually happen because the hard-coded 100kb I set is higher than the max configurable (96kb) in the conn manager.
On the http1 side, I'm fine with doing the same thing and just never touching the http_parser max limit once it's been set super high. An HTTP/1-specific check is totally doable, but also maybe not even needed since the conn manager has its own check. The reason this http_parser check is coming up now is because I'm bumping the limit up, so if it's just by default set higher than the max configurable of 96 that's chill.

Cleaned up comments with KiB.

Set both libraries' max request headers checks to 0x7fffffff, effectively disabling them and relying on our own checks. This fixes the 431 error code problem too.

Remove http1/codec_impl_test.cc tests for headers being rejected, since the http1 codec now never rejects large request headers. In the integration test, http1 large headers will hit the codec_impl.cc check.

OK bless got, did the following:

Added back reject-case tests to http1/codec_impl_test.
Added a check in http1/codec_impl onHeaderValue. Lmk if there's a better spot for that, but tests pass!!!!

Wahu my tests pass, had to make some kind of clunky test interface changes (these need a bigger refactor).

Okaaay so did the following:

max_request_headers_kb_ -> max_headers_kb_ in the ConnectionImpl.

ServerConnectionImpl passes stuff in the same.

ClientConnectionImpl gets a max_response_headers_kb_ parameter, but it's just default set to a big number. DIdn't want to expose the max_response interface in this PR without more testing around it. As well, the exception itself has to be request/response agnostic, "headers are too large", though that could be reworked later.

Oky I changed the ClientConnectionImpl max response headers from a default parameter to a class constant, added a test for large response headers rejection, and tweaked the API comment.

Ok, updated with Matt's suggestion on the API commenting + added a note on nghttp2 to the test file. I got a mysql_integration_test failure, hoping that was a flake bc idk how I'd have touched that.

Yep, that's a known and fixed flake.  If you merge master you'll pick up the fix

!rekick

/retest

cc @RyanTheOptimist @yanavlasov @KBaichoo also on ^

@ramaraochavali Can you file an issue about there were we can discuss the details? I think that's probably better than a 4 year old already committed PR :) Please feel free to link to this PR or any related issues there.

@RyanTheOptimist  created https://github.com/envoyproxy/envoy/issues/26690


text:
log: add upstream TLS info

Description: add upstream TLS info for logging purposes
Refactor SSL connection info to be a shared pointer.
Use read-only interface.
Cache computed values in the SSL info object (this allows transition to remove the underlying SSL object if necessary).
Risk Level: medium due to use of bssl::SSL to back ConnectionInfo
Testing: unit
Docs Changes: none
Release Notes: add upstream TLS info

Maintainers: I'm looking for feedback how to deal with SSL info lacking ownership of the underlying cert data. I think we need to turn the SSL info into a struct, since the underlying upstream TLS connection can go away before logging is done.

since the underlying upstream TLS connection can go away before logging is done.

Do you have any test case / reproducer to validate this? We do defer delete upstream connection (which holds Ssl::ConnectionInfo) so it should outlive the logging phase.

Do you have any test case / reproducer to validate this? We do defer delete upstream connection (which holds Ssl::ConnectionInfo) so it should outlive the logging phase.

This is trying to write upstream TLS info into the downstream log. It definitely can go away before the downstream log is written.
@kyessenov yeah this has come up before, and IMO we need to decouple TLS info from the TLS connection and make it into a shared pointer. I think it could even be lazily created from the upstream connection the first time it is created/requested?

@mattklein123 thanks for confirming. Yes, I'm thinking the same, create a new info object holding TLS info, and then change stream info to hold a shared pointer to it. We can generate the info in the logging phase, to make it lazily created.
@lizan I'm trying to make an example, but found that upstream SSL info is not populated at all, so it was a good exercise after all.

OK, I guess we can latch a shared_ptr of Ssl::ConnectionInfo which holds a bssl::UniquePtr so the info is still live after the upstream connection is gone. Though you may need to change the interface of connection or do some hack around it.

@lizan I am not an expert in SSL library -- do you think it's a good idea to wrap BIO buffers into the info? My concern is that r/w buffers are owned by bssl::UniquePtr so extending its lifetime past the connection might also cause extending the lifetime of these buffers which are not needed for the info.

We end up copying the requested data out of boringssl anyway, so IMO I would just lazily populate the info from the SSL and not reference the SSL at all after that is done.

cc @PiotrSikora for SSL internally, latching a shared_ptr is exactly for lazily populate.

Existence of SSL_clear in the API makes me worried that two connections might interfere for the same SSL object.

@kyessenov no, at least how we use it. You shouldn't worry too much about SSL itself, just latch a Ssl::ConnectionInfo shared_ptr (which is provided by a SslSocket). IIUC it is safe to refer SSL object itself to read certificate data etc, after SSL_shutdown and it won't affect underlying connection BIOs.

This is mostly done for changes in source/ and manually tested. I'll keep adding tests to bump the coverage and docs for the new access log symbols.

Still working on tests... Will update once this is ready.

Updated with tests.

@kyessenov can you merge master to resolve confilicts? (due to the cel-cpp PR I guess)

Master is merged.

@kyessenov are you splitting out the SSL part to another PR?

No, I wasn't planning to split it further. Can you clarify what you mean by the SSL part?

Changing SslConnectionInfo to shared_ptr and related refactor in tls_socket.cc/h. I thought that's @mattklein123 requested https://github.com/envoyproxy/envoy/pull/7911#discussion_r314907292 and you're going to do that.

Ah, OK. I misunderstood. I thought he was referring to access log formatter changes. I'll focus this on shared_ptr change then.

Minimized the change as requested. Still pretty large.

@lizan can you suggest what can be done to move this forward?

I think this can be merged, right?

authors: kyessenov lizan mattklein123


text:
Refactor TCP IR

Takes forward PR https://github.com/envoyproxy/gateway/pull/1976 and https://github.com/envoyproxy/gateway/pull/1798
Fixes: https://github.com/envoyproxy/gateway/issues/1635

@arkodg I rebased your branch https://github.com/arkodg/gateway/tree/tls-ir-fix on the latest main branch, and adjusted TCPListener and TCPRoute fields according to BackendTrafficPolicy support for TCP Listener.
BTW, TCPListener.TCPKeepalive is not filled, because current main branch uses TCPKeepalive from BackendTrafficPolicy in both xDS TCP Listener and xDS Cluster. Which is not correct. We should use TCPKeepalive from ClientTrafficPolicy in xDS TCP Listener after https://github.com/envoyproxy/gateway/issues/3163 is implemented.

thanks for taking the PR forward @aoledk ! will try to review this one soon before another round of merges making this refractor hard
the keep alive issue is being tracked with https://github.com/envoyproxy/gateway/issues/3032 :)

hey @aoledk there are some CI failures, running make generate and fixing the new format for the xds test should fix it

authors: aoledk arkodg

repo: envoyproxy/gateway


text:
feat: support custom dev image in kube-deploy

Fixes: #323

Deploy custom EG image

Deploy latest EG image

Deploy released EG image

Signed-off-by: Xunzhuo bitliu@tencent.com

Codecov Report

Merging #385 (717d711) into main (8fa9a68) will decrease coverage by 0.14%.
The diff coverage is n/a.

:exclamation: Current head 717d711 differs from pull request most recent head b662e53. Consider uploading reports for the commit b662e53 to get more accurate results

@@            Coverage Diff             @@
##             main     #385      +/-   ##
==========================================
- Coverage   60.26%   60.11%   -0.15%
==========================================
  Files          35       35
  Lines        3430     3430
==========================================
- Hits         2067     2062       -5
- Misses       1249     1254       +5
  Partials      114      114

Impacted Files
Coverage Δ

internal/gatewayapi/runner/runner.go
60.27% <0.00%> (-4.11%)
:arrow_down:

internal/provider/kubernetes/httproute.go
62.00% <0.00%> (-3.34%)
:arrow_down:

internal/xds/translator/runner/runner.go
85.18% <0.00%> (+11.11%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

authors: Xunzhuo codecov-commenter


text:
EDPUB-1372: Repurpose DAAC Selection Page to DAAC Assignment Page

Description
EDPUB-1372: Repurpose DAAC Selection Page to DAAC Assignment Page
Spec
See Ticket: EDPUB-1372

Validation
Go to DAAC selection page and you will see all the DAACs are enabled now

This db update won't be ready to merge until the rest of the feature updates are complete, so I'm going to close for now. Specifically, the DAAC selection page shouldn't be available until later in the workflow before this PR is created and merged

authors: acharya-deepak camposeddie

repo: eosdis-nasa/earthdata-pub-api


text:
Email Alerting for EVM Infrastructure Health Checks

As part of an epic for a unified metrics and alerting system around EVM infrastructure, this ticket is to send alerts relating to the EVM AWS infrastructure health checks to arbitrary email addresses.

This was completed 2023-08-21.

source: gharchive/issue

repo: eosnetworkfoundation/engineering

license: MIT


text:
Add support for line crossing events

Unifi protect at some point added "Line crossing" events that are separate from motion or smart detect events. This tool should handle those too.

It seems new detection types have been added too: alarms, packages

First off, amazing package, thanks very much! Just set this up recently for an offsite backup.
I'm happy to attempt a PR for this - wanted to check here first if my understanding is correct.
New Types to add: "package", "animal", "smartDetectLine". There's a whole bunch of sound alarm types as well now too, but I'm not sure how much specificity is useful.

The new types already exist in pyunifiprotect
Add them to DETECTION_TYPES
Add a new set of conditionals to event_listener._websocket_callback - depending on your thoughts about alarm types, I may refactor a teensy bit here.

That sounds about right, and would definitely appreciate a PR!
I can see the audio events being useful, they're just not something I've tested yet within unifi protect. I'm not sure if they are sent in the same structure so it would need some investigation.
That function has a lot of conditions in it, I'm open to suggestions on how to improve it if you have any. It was done this way to try and keep the filtering of events readable and easy to reason about. Pattern matching might be a potential alternative approach but I worry with that many conditions it might become less readable.


text:
fix: used double quotes for env vars in .env files

A certain DIAL user experienced issues while running the appication quick-start docker-compose in the following environment:
$ uname -a
Linux dial 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64
$ cat /etc/os-release | grep NAME
PRETTY_NAME="Ubuntu 24.04 LTS"
NAME="Ubuntu"
$ echo $BASH_VERSION
5.2.21(1)-release
$ cat /etc/passwd | grep dial
dial:x:1000:1000:dial:/home/dial:/bin/bash

The following sequence of commands:
git clone https://github.com/epam/ai-dial.git
cd ai-dial/dial-docker-compose/application
docker compose up

led to DIAL Core failing with error complaining about missing Core config file.
It turned out that docker compose didn't pick up $DIAL_DIR variable from .env. And thus the variable was unset when the common.yml was interpolated. As a result aidial.config.files was pointing to a wrong directory which was missing DIAL core config.json.
The env file looked like this:
DIAL_DIR=./application

After many hours of debugging, it turned out that the following env file with double-quotes actually works:
DIAL_DIR="./application"

It's still unclear why the original env var wasn't picked up properly in the given environment.

That was a red herring actually.
See https://github.com/epam/ai-dial/pull/105 for the actual fix.

repo: epam/ai-dial


text:
🛑 Eastbrook Web Site is down

In e1f615e, Eastbrook Web Site ($EASTBROOK_MAIN_SITE) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Eastbrook Web Site is back up in b97edb8 after 20 minutes.

repo: epederson/Eastbrook-Upptime


text:
[feature] new search

add EPNET
add actu.epfl.ch
add missing icones from https://ponsfrilus.github.io/searchplugins/

Instead of EPNET?

Instead of EPNET?

Yes.

Instead of EPNET?

Yes. EPNET, which stands for EPFL Network, is broader than the directory.

Here you go (force pushed and reordered commits).

authors: obieler ponsfrilus

repo: epfl-si/startpage


text:
[HOLD] Upgrade to Scala 2.12

All deps. support Scala 2.12, even lightbend-emoji, just bumping the version.

Have you tried with socket.io? If so, let's merge this as it is a big asset for deploy lighter jars :)

The socket library works fine except that it logs everything as an error.

authors: mukel zifeo

repo: epflbot/epflbot

license_source: bigquery


text:
Added guide on how to upload model

"MODEL_UPLOAD.md" file explaining how to bring a task with a model to disco added in "disco/docs/"

following this morning's meeting, I think we might want to merge MODEL_UPLOAD.md with TASK.md

repo: epfml/disco


text:
Error update catalog

Error after update catalog command
python --version
Python 3.6.6
same pb with : Python 3.7.0
same pb with : pipenv run ./lcurse
same pb with the fork Alar : https://github.com/alarofrunetotem/lcurse
Traceback (most recent call last):
File "/home/philippe/lcurse-master/modules/waitdlg.py", line 424, in run
self.retrieveListOfAddons()
File "/home/philippe/lcurse-master/modules/waitdlg.py", line 414, in retrieveListOfAddons
lastpage = self.retrievePartialListOfAddons(page)
File "/home/philippe/lcurse-master/modules/waitdlg.py", line 401, in retrievePartialListOfAddons
href=link.get("href").replace("/download",'')
AttributeError: 'NoneType' object has no attribute 'replace'
Abandon (core dumped)

Will have a look! Thanks for the report

Error is the result of Curse's "Enjoy this mod? Support the mod author!" dialog, which appears on some addons. Fix contained in proposed pull request.

authors: Philmore971 ephraim vellistaulan

repo: ephraim/lcurse

license: unlicense


text:
getCurvePoints() - returns empty array when points are empty

Hey! Thanks for a useful module. 👍
I'm using getCurvePoints(...) to get a smoothened list of points for an SVG graphs. At times, my list of points are empty, and passing this empty list to getCurvePoints(...) throws an error.
To me, it makes more sense to return empty results for empty inputs. However, I don't know the rest of this package well, so just close this PR if it doesn't make sense elsewhere.
Cheers

Thanks @alexanderwallin. I agree, it makes more sense to return an empty array and it would correspond with the documentation. I did a manual merge but couldn't see the change. I have however added the check slightly modified. Works fine with the other versions as well.

authors: alexanderwallin epistemex

repo: epistemex/cardinal-spline-js


text:
How to properly remove "data" prefix ?

Hello,
In first, I'd like to say thank you for this amazing package.
I'd like to know if it's properly possible to remove the "data" prexfix of the errors?
Example:
console.log(ajv.errorsText(validate.errors, { separator: '\n' }));

data.email doit correspondre au format "email"
data.password ne doit pas faire moins de 6 caractères
data.language doit être égal à une des valeurs prédéfinies

Ajv error object:
[
  {
    keyword: 'format',
    dataPath: '.email',
    schemaPath: 'email.json#/definitions/email/format',
    params: { format: 'email' },
    message: 'doit correspondre au format "email"'
  },
  {
    keyword: 'minLength',
    dataPath: '.password',
    schemaPath: 'password.json#/definitions/password/minLength',
    params: { limit: 6 },
    message: 'ne doit pas faire moins de 6 caractères'
  },
  {
    keyword: 'enum',
    dataPath: '.language',
    schemaPath: 'language.json#/definitions/language/enum',
    params: { allowedValues: [Array] },
    message: 'doit être égal à une des valeurs prédéfinies'
  }
]

Thank you 🙏

There is a setting in errorsText method to replace "data" with some other string (e.g. "") with which you can make it into .email (or /email if you use JSON pointers in errors) - see the docs in Ajv. The first character can be dropped in your code.

authors: epoberezkin rimiti

license: mit


text:
NPM: Latest AJV Push causing failure to execute node_modules (multiple dependencies and users affected)

What version of Ajv are you using? Does the issue happen if you use the latest version?
Latest version
Ajv options object
node_modules/ajv/lib/keyword.js:65
      throw new Error('custom keyword definition is invalid: '  + this.errorsText(validateDefinition.errors));
      ^

Error: custom keyword definition is invalid: data.errors should be boolean
    at Ajv.addKeyword (/home/mmacheerpuppy/git/fsa/react-application/node_modules/ajv/lib/keyword.js:65:13)
    at module.exports (/home/mmacheerpuppy/git/fsa/react-application/node_modules/ajv-errors/index.js:10:7)
    at Object.<anonymous> (/home/mmacheerpuppy/git/fsa/react-application/node_modules/schema-utils/src/validateOptions.js:22:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)

What results did you expect?
Expected to be able to build node_modules but experiencing above stacktrace.
Are you going to resolve the issue?
No
** Reproduction **
Try using the below node_modules (at least one of them runs ajv as a dependency, not sure which one) and run npm start)

Here is my package.json if you want to reproduce. Will fail to install.
{
  "name": "food-standards",
  "version": "0.1.0",
  "private": true,
  "dependencies": {

    "axios": "^0.18.0",
    "bootstrap": "^4.2.1",
    "react": "^16.8.1",
    "react-dom": "^16.8.1",
    "react-scripts": "2.1.3",
    "reactstrap": "^7.1.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ],
  "devDependencies": {
    "axios-mock-adapter": "^1.16.0",
    "eslint": "5.6.0",
    "eslint-config-airbnb": "^17.1.0",
    "eslint-plugin-import": "^2.14.0",
    "eslint-plugin-jsx-a11y": "^6.1.1",
    "eslint-plugin-react": "^7.11.0",
    "react-testing-library": "^5.5.3"
  }
}

Same error for me #942 here using vue.js

Is there a workaround to use an earlier release?

I hope it get noticed fast

Using nuxt for view. My solve is doing npm i -d ajv@5.0.0 and i can run npm run dev again. This was a fresh nuxt project I started.

This is certainly related to the latest changes made in the commit history.

Add
  "resolutions": {
    "ajv": "6.8.1"
  }

to your package.json will create a work around (I am using yarn, don't know if it will work for nom)

@epoberezkin can we roll back?

Can confirm, this is happening for me too when scaffolding Vue JS projects. Currently on Vue CLI 3.4.0, Mac OS 10.13.4. Please fix soon as this is causing serious delays.

@velocity-360 see my comment, use the work around! 😄

Seeing the same thing when using latest storybook, reproducible by simply running the bin build-storybook included in the same package. This entirely breaks a very large ecosystem.

@velocity-360 see my comment, use the work around! 😄

@yooouuri thank you however, I am currently contracted to create a Vue tutorial series for a large educational software company and do not think it would be wise to kick off the series with a work-around immediately on the first step. I will wait for resolution.

@velocity-360 makes sense

@velocity-360 I'm trying to write a technical test for a job interview in React! :D

lol @mmacheerpuppy exact same situation for me

@rickyTony Seems like "ajv": "6.8.1" is implemented in ESLint. You can use npm ls ajv to check this out.

workaround for yarn users:
add
  "resolutions": {
    "ajv": "6.5.5"
  }

to your package.json and re run yarn install

looks like https://github.com/epoberezkin/ajv/issues/941#issuecomment-462087631 beat me to that 😅

@mmacheerpuppy I kinda ran out of time for the day debugging, so hopefully it's fixed when I get back to it tomorrow

  "dependencies": {     "react": "^16.8.1",     "react-dom": "^16.8.1",     "react-scripts": "2.1.3",     "ajv": "6.8.1"   }
this worked for me using npm

@gregoriB I'm using create-react-app and unfortunately, I'm still getting the error after adding that 😞

webpack is completely broken by this. This is why people hate front-end development.

https://stackoverflow.com/questions/52416312/npm-equivalent-of-yarn-resolutions

@ChuntaoLu You say that as if we don't have dependency chains on the back-end! @andrewtet can you kindly show your packages-json?

@andrewtet did you run npm install afterwards?

i think npm users can use this workaround https://github.com/rogeriochaves/npm-force-resolutions

Can confirm for React users it's ESLint (and ESLint addons) which are causing the issue. So if you're in a hurry to get back on it, its time to get naked with React!

just add
  "resolutions": {
    "ajv": "6.8.1"
  }

to your package.json
and re-run yarn install if you use yarn
or
rm -rf node_modules
npx npm-force-resolutions
npm install

if you use npm.

@gregoriB Yeah, I ran npm i after the update and it didn't work.
I then ran rm -rf node_modules, npm cache clean --force, and then npm i and that did the trick. I've now got create-react app up and running.

For yarn add this to your package.json:
"resolutions": {
    "**/ajv": "6.8.1"
  }

Then run yarn install.

@andrewtet yeah I just did the it "proper" way too.  Not sure why the other way worked for me and not you though

I fixed this issue by resorting to an old version that I knew worked.  Ran this npm install --save ajv@6.6.2

@ChuntaoLu You say that as if we don't have dependency chains on the back-end! @andrewtet can you kindly show your package.json?

Wrong @ ?

@ChuntaoLu yes, sorry!

I have applied the workaround and it worked. Thanks.

same issue and everything is failed now
node_modules\ajv\lib\keyword.js:65
throw new Error('custom keyword definition is invalid: '  + this.errorsText(validateDefinition.errors));

@epoberezkin I proposed a temporary fix which, hopefully, fixes the problem in dependent packages and removes the need for a full rollback. Let me know if you see any other issues regarding this. Perhaps you prefer a different solution, that's fine too. I'm just trying to help speed up the resolution

For vue.js project, it still doesn't work

it is 3:30am london time, so a few more hours before @epoberezkin wakes up and releases a new version, time to go do something else for a bit!

Released right before going to bed, I figured as much. Typical :)

Hey @epoberezkin we have reported upstream workaround in our linked issue webpack/webpack#8768 so hopefully this reduces the chatter while this is being tackled by your team or other AJV contributors.
If there is anything we can do to help, let us know. - webpack team

Thanks for the patience, going to fix https://github.com/epoberezkin/ajv/commit/7079aed19599fd13c95412b181fd2c08feb1debb - I think I know what the issue is.
errors can also be "full"...

released 6.9.1

released 6.9.1

thanks, just test with ajv@6.9.1 and it works now.

Please let me know if somebody is still affected. The validation of custom keyword was simply incorrect, and now it is fixed. But it is still a bit more restrictive than it was - it would only fail though if e.g. somebody used 0 instead of false, which seems unlikely.

I probably is possible to make travis CI run tests of some dependencies against the new tags (e.g. webpack and eslint).

@epoberezkin thanks for the fix!

closing

authors: ChuntaoLu Rickytony TheLarkInn aaaguirrep andrewtet audiolion cenfun csvan epoberezkin fkleuver gregoriB mcrawshaw mmacheerpuppy puiiyuen rusye sky-coding tetreault velocity-360 viankakrisna yooouuri

repo: epoberezkin/ajv


text:
Create magazine subscription component

Relates to #1251

magazine landing page (and magazine template) should always have a subscribe promotion in place at the bottom of the page (above the footer).

Figma design: https://www.figma.com/file/F2OnKFEoMwFaANMgeGRGqE/CMS?node-id=5977%3A90557

Title
Ingress
Action
Image
Background colour

Component should be configured in Sanity on the Magazine index page only, and be displayed with the same comment on the landing page and on each magazine article.

Acceptance criteria

[ ] Can edit the footer component in Sanity on the magazine index page
[ ] Footer component shows in the web on magazine index page
[ ] Footer component shows in the web on individual magazine articles
[ ] Can disable footer component for individual magazine articles in Sanity
[ ] Footer component does not show in the web for magazine articles that have footer component disabled

Hi @SvSven, looks very good! ✅ Just left a couple of suggestions for you.
I also think that the feature we discussed with Nick, about toggling on/off the footer component for specific magazine pages could be done together with this issue. What do you think?

I also think that the feature we discussed with Nick, about toggling on/off the footer component for specific magazine pages could be done together with this issue. What do you think?

Ah right, I had forgotten about that one. Good point.

Have added the option to hide the footer component on individual articles ✅

LGTM

@nicholas-haggerty @meols this is the shared component between the magazine landing page and the individual articles - and is ready for review

Approved good stuff.

authors: NickHaggerty1 SvSven fernandolucchesi padms

repo: equinor/energyvision


text:
Refactor how news and localNews are fetched

The way news is currently being fetched is not optimal because it always require an extra check and additional logic to manipulate the news data.
We should standardise the way different documents are fetched to simplify our code and make it easier to understand.

Looks good! love the refactoring, easier to follow how it is fetched

@fernandolucchesi - today I am at the office, and preview doesn't work:

And FYI @fernandolucchesi Knut Jarle will escalate the ticket in ServiceNow (RITM2624670)

And FYI @fernandolucchesi Knut Jarle will escalate the ticket in ServiceNow (RITM2624670)

these are not working from the office because of #1244 😅

@fernandolucchesi - there is preview (tab) and then there is preview (image) :smile: - but neither are working. Assuming this was related to the preview tab then (and #1379)

authors: fernandolucchesi meols millianapia


text:
Hard crash when 503 Service Unavailable

When Sumo is unavailable, uploader stops hard. Should rather wait a few seconds then try again.
Stack from example:
Traceback (most recent call last):
  File "<redacted>/root/bin/sumo_upload", line 8, in <module>
    sys.exit(main())
  File "<redacted>/root/lib/python3.6/site-packages/fmu/sumo/uploader/scripts/fm_fmu_uploader.py", line 33, in main
    case_metadata_path=case_metadata_path, sumo_connection=sumo_connection
  File "<redacted>/root/lib/python3.6/site-packages/fmu/sumo/uploader/_caseondisk.py", line 79, in __init__
    self._sumo_parent_id = self._get_sumo_parent_id()
  File "<redacted>/root/lib/python3.6/site-packages/fmu/sumo/uploader/_caseondisk.py", line 127, in _get_sumo_parent_id
    search_results = self.sumo_connection.api.searchroot(query, search_size=2)
  File "<redacted>/root/lib/python3.6/site-packages/fmu/sumo/uploader/_connection.py", line 32, in api
    name = self._api.userdata().get("name")
  File "<redacted>/root/lib/python3.6/site-packages/sumo/wrapper/_call_sumo_api.py", line 34, in userdata
    return self.callAzureApi.get_json(url, bearer)
  File "<redacted>/root/lib/python3.6/site-packages/sumo/wrapper/_call_azure_api.py", line 106, in get_json
    _raise_request_error_exception(response.status_code, response.text)
  File "<redacted>/root/lib/python3.6/site-packages/sumo/wrapper/_call_azure_api.py", line 12, in _raise_request_error_exception
    raise TransientError(code, message)
sumo.wrapper._request_error.TransientError: Transient Error with status code 503 and text <title>503 Service Unavailable</title>
Service Unavailable
.

As a temporary solution to ensure FMU workflows continue when something fails in the uploader, suggest to implement a catch-all.

repo: equinor/fmu-sumo


text:
Redesign of the internal oneDNN execution graph for automated primiti…

…ve fusion.

Tensor class is the owner of the oneDNN memory object, knows all its characteristics and only he is allowed to change it.

Node is directly linked to oneDNN primitives, know all about the operation it has to make as well as it's input, ouputs and attributes.

Node is the base class that has all the graph related logic, it's inherited by the "primal nodes", they implement the oneDNN primitive specific creation and I/O handling.

Added support for Binary, MatMul, Cast, Elementwise, SkipLayerNorm and Bias GeLU operators.

Binary primitives have selective post-oping by checking if the broadcasting shape required is optimized.

Description

Motivation and Context

dnnl_graph_design.zip

This code change is huge and I am not even close to completing a full review.
Question: how different are the primal_nodes from the core nodes we currently are using?

Currently out nodes focus on implementing a specific ONNX operator, in this case the primal_nodes focus on implementing a specific oneDNN primitive in the best possible way using all oneDNN's recommendations, and by using these nodes we can implement ONNX operators. In the diagram you can see an example of this and how it links to automated post-op generation

repo: eralmual/onnxruntime


text:
cant set datechooser disable

When I try to use setEnable for datechooser, program gives error.

solved()

authors: erdikoch nazlikaralar


text:
Client crashes after connection close

Hi,
Describe the bug
To tunnel WireGuard, I'm starting the client like so:
.\wstunnel.exe client -L 'udp://51820:192.168.1.1:51820?timeout_sec=0' wss://192.168.1.221:443
Connection works fine. When I terminate the Wireguard connection, I can reconnect when I try it after a few seconds. If I wait for a bit, I'm receiving an error message on the client end:
2024-02-08T19:21:53.304550Z  INFO wstunnel::udp: Starting UDP server listening cnx on 127.0.0.1:51820 with cnx timeout of 0s
2024-02-08T19:22:05.335432Z  INFO wstunnel::udp: New UDP connection from 127.0.0.1:57732
2024-02-08T19:22:05.360856Z  INFO wstunnel::tcp: Opening TCP connection to 192.168.1.221:443
2024-02-08T19:22:05.404362Z  INFO wstunnel::tls: Doing TLS handshake using sni IpAddress(192.168.1.221) with the server 192.168.1.221:443
2024-02-08T19:22:16.460025Z  INFO wstunnel::udp: New UDP connection from 127.0.0.1:50675
2024-02-08T19:22:16.482888Z  INFO wstunnel::tcp: Opening TCP connection to 192.168.1.221:443
2024-02-08T19:22:16.495257Z  INFO wstunnel::tls: Doing TLS handshake using sni IpAddress(192.168.1.221) with the server 192.168.1.221:443
2024-02-08T19:22:40.173788Z ERROR wstunnel::udp: Cannot read from UDP server. Closing server: An existing connection was forcibly closed by the remote host. (os error 10054)

At this point Wireguard cannot connect any more. Restarting the client fixes the problem.
To Reproduce
Run wstunnel, connect wireguard, disconnect wireguard, wait, try reconnecting wireguard
Expected behavior
After disconnecting, wstunnel can accept new connections even after remote host closure.
Screenshots
N/A
Desktop (please complete the following information):

OS: Windows
Version 9.2.2

Additional context
This does only seem to be happening with the native Windows version, but not when running wstunnel inside WSL.

try to keeplive the connection.

Hello,
I will to look into, I keep you in touch.
At first glance
 Cannot read from UDP server. Closing server: An existing connection was forcibly closed by the remote host. (os error 10054)

this message means to me that it is the OS that closed the socket of the UDP server. If you a security/antivirus software on your machine it may be the cause.
Will try to rep-roduce the issue in any-case

Well, this is a corporate device, so besides Windows Defender there might be more "security" on it. If you cannot reproduce it, maybe it is one of those. I'm to debug this on my device, if you can provide instructions.

I tried to reproduce the issue on my windows, but it works as expected for me :'(
Regarding how to debug that, I don't have much clue, as I don't use widows much. Maybe if you have some system/activity logs you can find something

Should be fixed in 9.2.5, but regarding the why the original issue arise, it is still unclear to me

This is still happening for me in v9.3.0.  Same error and symptoms as described in the OP.
I tried both:  wstunnel_9.3.0_windows_386.tar.gz   and    wstunnel_9.3.0_windows_amd64.tar.gz.  Issue still happening.
I tried disabling Windows built in Real-Time Virus Protection.  Issue still happening.
FWIW, I'm on Windows ARM inside a VMware Fusion VM (although I doubt think this makes a difference)

authors: erebe hanjo kociubin nxtreaming

repo: erebe/wstunnel


text:
Small delta imports cause errors because non existing history files

I was cutting over today and did some very small incremental imports and one of them (the last one) did not contain any direct chats, but it did still contain group posts. migratemost threw the following error:
2019-09-23 06:29:40,446 - INFO - Concat all migration files into mm_all_data.jsonl
Traceback (most recent call last):
File "migratemost/migratemost.py", line 1323, in
main()
File "migratemost/migratemost.py", line 1253, in main
concat_files(input_files, OUTPUT_ALL_IN_ONE_FILENAME)
File "migratemost/migratemost.py", line 582, in concat_files
with open(input_file_path, 'r') as input_file:
IOError: [Errno 2] No such file or directory: '/data/import/2019-09-23/mm_direct_channels.jsonl'
root@anx-i-mattermost0401:/persistent/opt/migratemost# vi /
I could fix that by creating an empty json file (only [] as content) at the location it complained about, but I think migratemost should do that automatically if there's not data to be found in the import.

The script now only warns about missing files when concatenating. Setting the content as empty would not work, as the bulk importer does not accept JSONL files without data (only version header).

repo: ergon/migratemost


text:
Support derived addresses from public key on read-only mode

In order to have a smoother experience between the Ergo's wallets, it would be great if a way to derive addresses from the wallet's Extended Public Key was implemented by reading its QR Code.

Yoroi provides the public key at Settings > Wallet > Export.
Ergo Paper Wallet also provides the same key on the printed wallet.

It would be nice for these users could securely track their balances through this feature.

[ ] Add xpubkey to db scheme
[ ] Make add read only screen support using xpubkey (and save it for later use)
[ ] Support deriving addresses from xpubkey
[ ] Add way to show xpubkey in wallet config screen

authors: MrStahlfelge anon-br

repo: ergoplatform/ergo-wallet-app


text:
Building logic update

Updating the logic from random choice to a more organized operation.

Find the facility with the closest capacity difference where supply is larger than demand and deploy it
If the demand - supply is very large, deploy the fewest facilities as possible by deploying the largest facility first, and then re-evaluating and deploying the next largest facility to be as close as possible.

closed with https://github.com/ergs/d3ploy/pull/40 and https://github.com/ergs/d3ploy/pull/47

authors: FlanFlanagan gwenchee


text:
Windows 无法使用二维码扫描添加配置信息

Your os

The version of electron-ssr

What's the problem

App log here

请把问题描述清晰


text:
csv_final.py retornando erro

Após a finalização da conversão de XML para CSV feita pelo run.py, ao tentar criar o CSV contendo todos os metadados, o script csv_final.py retorna o seguinte erro:

... line 9, in df_final
data = time.strftime("%Y-%m-%d_%H%-M%-S") # Define o dia e a hora
ValueError: Invalid format string

Resolução: correção de erro de digitação: de "%H%-M%-S" para "%H-%M-%S"

Merge #12

authors: ericbrasiln jhsbarbosa


text:
import pup in code

Hi,
fairly new to Go, I don't know how to use pup in my code, without relying on pup binary.
(I would like to transform a script using curl to a pure Go solution).
How to call ParseHTML(pupIn, pupCharset) as it's in main package?
How is it best feasible. Sorry if the question is trivial and if it is more about documentation or packaging as a dependency than a real issue.
Thanks in advance.

Hi @jgranduel! Questions like this are better suited for Go general forms than developer issues.
You can't import a main package in Go, so you won't be able to import pup.
However pup just uses the golang.org/x/net/html package for parsing HTML. You can easily use that to do all of your HTML parsing.
Here's a program which does what you're describing: https://gist.github.com/ericchiang/4cbefb674c9a4c0b33c2
If you need help understanding the program I posted, please ask for help on the golang-nuts form or the IRC channel (see the link at the top of this comment). They're really nice and that's what they're there for!

Thank you very much for you answer and the useful Gist.
My question was mainly about using Pup as a library for the ease of use the CSS Selectors. But it'll remain a program. So I'll stick with (and learn) golang.org/x/net/html as you showed in your gist.
Thanks again.

My question was mainly about using Pup as a library for the ease of use the CSS Selectors.

see https://godoc.org/github.com/ericchiang/css for experimental support for this

Is there any example rendering JSON (using your JSONDisplayer{}) instead of HTML?

authors: ericchiang jgranduel john-bonachon

repo: ericchiang/pup


text:
Avoid the use of Adventure Text in common package

This prevent the plugin from working with SpongeForge.
Related: https://github.com/ericgrandt/TotalEconomy/issues/420

https://github.com/ericgrandt/TotalEconomy/blob/e0232267b63265579a27de2d6c0bd6ea972e21c0/totaleconomy-common/src/main/java/com/ericgrandt/totaleconomy/common/game/CommonSender.java#L6
We'll need to use a String instead of a Component and remove net.kyori.adventure from the common dependencies. The Sponge and Bukkit implementations, since they're both bundled with net.kyori.adventure, can use something like LegacyComponentSerializer.legacyAmpersand().deserialize(message). This should work, though not tested yet.

adventure-platform has a sponge adapter so you could sticl use it: https://github.com/KyoriPowered/adventure-platform/tree/main/platform-spongeapi

Simple fix seems to be to exclude net.kyori when shadow jarring the Sponge plugin; this avoids the duplicate classes and uses the one built into Sponge. Still doing testing, but so far things seem to be working for both SpongeForge and Vanilla

repo: ericgrandt/TotalEconomy


text:
SQLite Error 26: 'file is not a database' when using EF Core 3.1.2 and SQLitePCLRaw.bundle_e_sqlcipher

I feel sure it is me doing something wrong but I have been trying this for hours and no matter what I try I keep getting the exception below about the file is not a database. I have quadruple checked the location and password and they are correct and my older EF Core 2.1.X code can open the file and read from it just. It is the EF Core 3.1.2 project that I cannot get working. I also tried calling Batteries_V2 like the older code but that did not help.
Any suggestions?
I am using two nugets in my .NET Standard 2.0 project with EF Core 3.1.2 to created my entities assembly.
  <ItemGroup>
    <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="3.1.2" />
    <PackageReference Include="SQLitePCLRaw.bundle_e_sqlcipher" Version="2.0.2" />
  </ItemGroup>

The Entities DbContext Code:
public class MyDbContext : DbContext
{
  public MyDbContext(DbContextOptions<MyDbContext> options) : base(options)
  {
  }
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  {
  SQLitePCL.Batteries.Init();
  }

  public DbSet<Form> Forms { get; set; }
}

The code that uses the Entities is a .NET Core 3.1 MSTest app.
var connectionStringBuilder = new Microsoft.Data.Sqlite.SqliteConnectionStringBuilder
{
    DataSource = @"Data Source=C:\Temp\MYDbLite.db",
    Password = "KDSLKJLSDFJLSKDFKLDSKLFJSDFJKLSDFJKLSDF"
};
var dcob = new DbContextOptionsBuilder<MyDbContext>()
    .UseSqlite(connectionStringBuilder.ConnectionString);
var db = new MyDbContext(dcob.Options);
var forms = await db.Forms.ToListAsync();

Message I get:
Test method HealthWare.Entities.POCLite.Tests.UnitTests.InstantiateTest threw exception:
Microsoft.Data.Sqlite.SqliteException: SQLite Error 26: 'file is not a database'.

Stack Trace:
SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
SqliteCommand.GetStatements(Stopwatch timer)+MoveNext()
SqliteDataReader.NextResult()
SqliteCommand.ExecuteReader(CommandBehavior behavior)
SqliteCommand.ExecuteReader()
SqliteCommand.ExecuteNonQuery()
SqliteConnectionExtensions.ExecuteNonQuery(SqliteConnection connection, String commandText, SqliteParameter[] parameters)
SqliteConnection.Open()
DbConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken)
RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken)
RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
AsyncEnumerator.MoveNextAsync()
EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)     EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)
UnitTests.InstantiateTest() line 25
ThreadOperations.ExecuteWithAbortSafety(Action action)

Out of curiosity I tried a database that was not encrypted and got the same exception but I was able to open that database in the SQLite Toolbox in Visual Studio so I know the path and database were valid SQLite databases.
If I open an unencrypted database with a connection string containing a password, it will be encrypted using that password the next time it is opened, correct?

If this problem showed up when you upgraded from EF Core 2 to 3, then you probably have some dependencies mixed up.
EF Core 2.x was based SQLitePCLRaw 1.x.
EF Core 3.x is based on SQLitePCLRaw 2.x.
SQLitePCLRaw 2.x contains breaking changes and is not compatible with 1.x.  Mixing packages from 1.x and 2.x can cause problems.
Exactly what packages do you have?

@ericsink I thought I had put that in the information above but I must have pasted over it with the next thing I pasted in. Here are the two packages I am using and I believe they are supposed to work together based on what I read. Then following are the MS Test project packages. Also, I actually created a brand new .NET Standard 2.0 class for this and shared the entities classes from using a shared project and created a new dbcontext in the new project, which I pasted above.
Entities Class

Unit Test

Still trying to figure this out so first thing today I grabbed an unencrypted copy of the same database and removed the password from the SqliteConnectionStringBuilder and the same code works. I am thinking that indicates the packages I have do work together.

So taking from this https://www.bricelam.net/2016/06/13/sqlite-encryption.html and I wrote a quick Console app and created a new unencrypted SQLite database with one table and tried to encrypt it by passing in the password in the connection string as shown above. When I do this I get
Microsoft.Data.Sqlite.SqliteException: 'SQLite Error 26: 'file is not a database'.'
If I remove the password from the connection string it opens the database and executes the query just fine.
So maybe I am just totally misunderstanding but I thought based on what I read above that opening an unencrypted database with a password would then key that database to the password supplied in the connection string and then that password would be required from then on.
I attached the example console app.
Do I need to call something other than SQLitePCL.Batteries.Init() or call it in a different place? Should I use the Batteries_V2? I tried a number of combinations, but they all had the same results but I definitely could be doing it wrong.
Hope the sample helps and thank you so much for looking at this.
SQLiteEncryption.zip

I'm able to repro this without Microsoft.Data.Sqlite:
using System.Diagnostics;
using static SQLitePCL.raw;

class Program
{
    static void Main()
    {
        SQLitePCL.Batteries_V2.Init();

        var rc = sqlite3_open("TestEncrypted.db", out var db);
        Debug.Assert(rc == SQLITE_OK);

        rc = sqlite3_exec(db, "PRAGMA key = 'br549';");
        Debug.Assert(rc == SQLITE_OK);

        rc = sqlite3_exec(db, "SELECT count(*) FROM sqlite_master;");
        Debug.Assert(rc == SQLITE_OK); // Fails, SQLITE_NOTADB
    }
}

Humph.
Okay, so this ball is in my court.
I'll take a closer look.  It's not immediately obvious how code as simple as that can fail when my test suite passes.

@bricelam in your test program is TestEncrypted.db a preexisting database and if so how was it created?

@sjlombardo assuming he used the database I sent in the test project above it was created with the latest version of ErikEJ's SQLite/SQL Server Compact Toolbox extension from the latest version of Visual Studio 2019.

The problem here is that you are trying to open a SQLCipher 3 (the version used in the 1.x bundle) using SQLCipher 4 (the version used in the 2.x bundle) without properly migrating or setting backwards compatibility.

Ah yes, I had wondered about that SQLCipher 3-vs-4 issue, but I hadn't yet looked closely enough to verify.

@sjlombardo so is this migration required even though that database has not yet been encrypted at all? TestEncrypted.db was not previously encrypted with any version of SQLCipher.

cc @ErikEJ

Not sure if this is required since this database has never been encrypted before but just to be sure I modified the code from @bricelam example above and I added the following before trying to open the database with the Microsoft.Data.Sqlite with a password.
            var rc = sqlite3_open(file, out var db);
            Debug.Assert(rc == SQLITE_OK);

            rc = sqlite3_exec(db, "PRAGMA cipher_migrate;");
            Debug.Assert(rc == SQLITE_OK);

            db.Close();

I then ran the sample again and still get the following when opening the connection.
Microsoft.Data.Sqlite.SqliteException: 'SQLite Error 26: 'file is not a database'.'

@bricelam I am using System.Data.Sqlite 1.0.110 currently, but I guess I should update to 1.0.113 https://github.com/ErikEJ/SqlCeToolbox/issues/835

@wjvii The original problem you mentioned, opening an encrypted database created with SQLCipher 3 using SQLCipher 4, would require migration or backwards compatibility.
The second issue you mentioned herein, opening a standard SQLite (plaintext) database with SQLCipher is separate and unrelated. You can't open an unencrypted database using SQLCipher by supplying a password, that is not the way SQLCipher works. If you want to encrypt an unencrypted database you should (attach and export)[https://discuss.zetetic.net/t/how-to-encrypt-a-plaintext-sqlite-database-to-use-sqlcipher-and-avoid-file-is-encrypted-or-is-not-a-database-errors/868).

@sjlombardo that appears to be the answer here. I was mistakenly under the impression that it encrypted the data once the password was set, at least on an empty database with only schema, but the attach and export article makes that super clear, it must brand new in order to encrypt it with SQLCipher. I have not done a lot more testing yet but in a quick test I was able to attach my example unencrypted database, export it to a new encrypted database per the instructions in the article above, and then open the encrypted database using Microsoft.Data.Sqlite with the password supplied in its connection string. AWESOME.
@bricelam maybe you can update the article on your website to make it clear that you cannot encrypt an existing unencrypted database by only supplying the password in the connection string and point them to the attach and export article if they are trying to encrypt an existing database.
My sincere thank you to everyone that responded here and for the fact that the responses were so quick!

Hello @bricelam, no, that behavior did not change with SQLCipher 4. The library has worked this way since the initial release.

@bricelam I can definitely say this was a source of confusion for me as well and I have read many articles on the Internet about SQLite encryption that never mention having to use the attach and export method with an existing database. Glad to get that cleared up!

@wjvii I'm not really sure which articles you are referring to, however it is a significant oversimplification to say that all SQLite encryption is the same. Every implementation is different, independent, and incompatible with each other. Functionality and security features differ very substantially between products. About the only commonality is that encryption can usually be enabled using PRAGMA key.
With respect to SQLCipher, the FAQ on how to encrypt a plaintext database is in the top two or three google for searches similar to "encrypting a database with SQLCipher". Likewise the details on migration and backwards compatibility were widely communicated and documented for the SQLCipher 4 release (and have also been for every major version release prior).

@sjlombardo I was referring to SQLCipher in particular and I am very glad you directed me to the FAQ and other articles on the Zetetic website as they definitely cleared things up for me and I will now use it as a primary resource for SQLite encryption information. I am sure the fact that I had used SQL CE for many years influenced my thinking on this because it encrypted an existing database when you supplied a password and since many articles did not specifically mention the need to attach and export an existing database to encrypt it, it never occurred to me it could be a requirement.
Thank you again for your help and all the great information.

I know this is an older post, but I just started using SQLCipher and happened to come across this error while performing a "bad password" test.  I created the database using a password and then opened with the same password.  I then intentionally used a bad password to verify it would fail and it did.  However, it failed with the SQLite Error 26: 'file is not a database' error.
Just thought I'd pass this on in case someone in the future is searching for something similar.

Closing old/stale issue.

authors: ErikEJ bricelam ericsink sjlombardo tblack2200 wjvii


text:
No gem update for a fix of class options vs hep

thor gem version 0.19.1 does not contain fix of an issue with class options and help command.

When will the next release of Thor be?

@JZO This is an old issue, but can it be closed? 😄

authors: JZO SynVisions p8

repo: erikhuda/thor


text:
Add .eslintrc -- add eslint and babel-eslint to devDependencies?

If add an appropriate .eslintrc and add eslint and babel-eslint to devDependencies, project will get correct linting behaviour in text editors like atom by default.  Want a pull request for this?

Please, yes. I'm a fan of AirBnB's. If it could mimic that, great.

authors: breathe erikras


text:
change prop is unbound

Are you submitting a bug report or a feature request?
bug report
What is the current behavior?
In a handleSubmit function which looks like:
handleSubmit(data, dispatch, { updateAccount, change, untouch }) {
  return updateAccount(data)
    .then(() => {
      dispatch(change("password", null));
      dispatch(change("current_password", null));
      untouch("password", "current_password");
    })
    .catch(parseFormErrors);
}

I had to dispatch change function in order to actually fire it. Just calling change("current_password", null) does nothing, moreover while docs stats that change is a bound function which returns nothing, console.log(change("password", null)) outputs:
Object
  meta: {form: "AccountForm", field: "password", touch: false, persistentSubmitErrors: false}
  payload: null
  type: "@@redux-form/CHANGE"

What is the expected behavior?
change should be bound, so I can just call it to fire an action, like how I do with untouch.
What's your environment?
"redux-form": "^6.5.0"
Node: v7.4.0
Mac OS latest, with latest versions of Firefox & Safari

Wow, this is an interesting one. change is bound to dispatch before it is passed into your decorated form component, but it has not yet been bound in the Form higher order component when it is passing props to the submit function.
For example, if you did this, it would work:
class MyForm extends React.Component {
  constructor() {
    super()
    this.submit = this.submit.bind(this)
  }

  submit(data) {
    // change is bound in this.props, but not in the props given as a param
    const { updateAccount, change, untouch } = this.props
    return updateAccount(data)
      .then(() => {
        change('password', null)
        change('current_password', null)
        untouch('password', 'current_password')
      })
  }

  render() {
    const { handleSubmit } = this.props
    return <form onSubmit={handleSubmit(this.submit)}> ... </form>
  }
}

The props given as a parameter to your submit function is mainly for allowing the container component of your form to pass in some additional information, e.g. what path to forward to after submit.

Ok, got it, thanks for quick fix!

Fix published in v6.6.0.

authors: almassapargali erikras

repo: erikras/redux-form


text:
No data in async validation

Hi!
I have problem with async validation. I'm using Material UI DatePicker - I already had to create wrapper around it to fire custom onChange function, where I just fire this.props.onChange(value). Then I added at the end of it one more line with this.props.asyncValidate() (because asyncValidate doesn't fire after selecting date), but it doesn't work - function does trigger, but it's too early - in values parameters inside asyncValidate my field is still empty.
I realize that probably this problem isn't related strictly to redux-form, but I have an impression that it would be easier to fix it from here than from material UI side. :)

Hi, thanks for reaching us!
This is a usage question, and we encourage you to ask it on StackOverflow instead. We try to use the issue tracker for bug reports and feature requests, as well as some discussions, but this appears to be a very localized question.
This is the only way to ensure the same question doesn’t get asked many times in a row, and that folks who have the same question in the future will be able to find it.
I’m closing for these reasons.


text:
Accept function as first argument in form value selector

We run into a situation where we needed to retrieve a form field value of a form field value we didn't know, but was passed in by prop. To handle this in an appropriate way, we suggest to also accept functions as a first argument of the formValues selector which will resolve the according form field values.
(This code has not been tested, it should act as a proposal. I can try to run it and adjust tests if we see that there is a chance to have this in the master.)

Codecov Report

Merging #3333 into master will not change coverage.
The diff coverage is 100%.

@@          Coverage Diff           @@
##           master   #3333   +/-   ##
======================================
  Coverage     100%    100%
======================================
  Files          68      68
  Lines        1522    1523    +1
======================================
+ Hits         1522    1523    +1

Impacted Files
Coverage Δ

src/createFormValues.js
100% <100%> (ø)
:arrow_up:

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 639d45e...c269fd7. Read the comment docs.

Seems okay to me. Probably needs a test or two and the docs also need to be updated.

@delijah, is this still needed?

Yes it is. Sorry for delay. I will try to implement tests as soon as possible.

Reopened as #3432

authors: codecov-io delijah erikras


text:
Simplify travis and prepublish build

The thing is that prepublish currently runs:

npm run test
npm run test:flow

On top of prepublish Travis also runs

npm run lint
npm test
npm run test:cov
npm run test:codecov

(so test is running 3 times currently on CI...).
Proposal
Would make more sense (and speed up travis a lot up) if prepublish ran:

npm run lint
npm run test:flow
npm run test:cov

And Travis additional step ran

npm run test:codecov

I was working on this when you submitted it. 👍

@erikras might be a good idea to configure github so we cannot merge if travis hasn't completed.
Running linting (which is new on CI) shows these errors:
/home/travis/build/erikras/redux-form/src/__tests__/createFieldArrayProps.spec.js
    9:26  warning  'size' is assigned a value but never used          no-unused-vars
  344:13  warning  'reduceResult' is assigned a value but never used  no-unused-vars
✖ 2 problems (0 errors, 2 warnings)

authors: erikras skovhus


text:
error when build _ext module

Hello,
Thanks for updating the pytorch 1.0 version.
My environment is:
python 2.7, pytorch 1.0, Ubuntu 16.04, Cuda 9.0.176, cudnn 7.1.3, gcc 5.5, Nvidia GPU driver: 390.87
I got following errors when run 'python setup.py build_ext --inplace'
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9220): error: argument of type "const void *" is incompatible with parameter of type "const float *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9231): error: argument of type "const void *" is incompatible with parameter of type "const float *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9244): error: argument of type "const void *" is incompatible with parameter of type "const double *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9255): error: argument of type "const void *" is incompatible with parameter of type "const double *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9268): error: argument of type "const void *" is incompatible with parameter of type "const float *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9279): error: argument of type "const void *" is incompatible with parameter of type "const float *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9292): error: argument of type "const void *" is incompatible with parameter of type "const double *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9303): error: argument of type "const void *" is incompatible with parameter of type "const double *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9316): error: argument of type "const void *" is incompatible with parameter of type "const int *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9401): error: argument of type "const void *" is incompatible with parameter of type "const long long *"
/usr/lib/gcc/x86_64-linux-gnu/5/include/avx512fintrin.h(9410): error: argument of type "void *" is incompatible with parameter of type "float *"
...
I am guessing it is caused by the gcc version or cuda version problem.
May I know your environment? or any suggestions?
Thanks in advance.

@bigsheep2018  I have tried your approach, but it doe snot work, donot figure out

license: Unlicense


text:
This Plugin is FANTASTIC, but what are the hotkeys?

This plugin is fantastic, and exactly what I have been looking for.
The README states that you can use hotkeys to do all of this functionality, however, nowhere in either the settings of the plugin, or in the readme are these hotkeys defined?
What are they?  Can we add this to the documentation in the README?

Oh

I just learned that you can set these hotkeys dynamically via the settings menu in Obsidian.
Sorry for the false alarm!

repo: erincayaz/obsidian-colored-text


text:
Possible Heisenbug

I noticed that with a really simple example, it is possible to get drastically different evaluations, because of drastically different inferred values.
It is possible the test was too simplistic, but I just want to make sure there is an explanation for this.
The experiment and logs are committed here:
https://github.com/nkini/PSLTesting/commit/86026980e6ef7162c54070c5d51d7f62c3c74371
https://github.com/nkini/PSLTesting/commit/1390860a4a28125543eaf1f0050620cdabd9c0ef
Problem:
In one run, this is the output:
SAME('A', 'B') Truth=[0.24]
SAME('B', 'A') Truth=[0]
SAME('B', 'C') Truth=[0.63]
SAME('C', 'B') Truth=[0]
SAME('A', 'C') Truth=[0.4]
SAME('C', 'A') Truth=[0.39]
In another, this is:
SAME('A', 'B') Truth=[0]
SAME('B', 'A') Truth=[0.24]
SAME('B', 'C') Truth=[0.64]
SAME('C', 'B') Truth=[0.63]
SAME('A', 'C') Truth=[0.39]
SAME('C', 'A') Truth=[0]
Note that symmetry was turned off. I ran experiment about 20 times and about three times I got the latter output.
Possible explanations:

Local minimum? There can't be one in a convex objective.
Could it be that the residual calculations are off by a little so that early stopping occurs?

Have not been able to recreate after turning on symmetry (https://github.com/nkini/PSLTesting/commit/d7da646e772ee883f2ae446d6ce9a6ed20cdc7ab). Symmetry really should have been on the whole time, so I can't decide if this is a modeling gotcha or a real bug. But one should be able to expect the same results with the exact same input, no?

I have solved these potentials by hand, and both inferred values yields the same distance to satisfaction (0.02).
Note that I only bothered solving the transitivity rule since the other two are pretty static.
Remember that PSL will find only one solution to the HL-MRF, but is is possible for there to be many solutions (especially in simple problems like this).

authors: eriq-augustine nkini

repo: eriq-augustine/psl


text:
full api documentation

namely, all the options. Docs for custom flavors/suffixes/suffixGroups/formats are all missing too.

https://erosson.github.io/swarm-numberformat/
npm run push-doc

repo: erosson/swarm-numberformat


text:
[feature] Custom Image Sources

Hello,
want to thank you first for your wonderful small lib. I have a feature request that might be useful for other users. What do you think about introducing a custom source concept for the images? The changes that are needed I quite trivial:

rename ImageFileLoader to DeviceMediaSource (may be you can pick a better name, but hopefully you've got the idea)
extract an ImageSource interface from it with two methods: loadImages(boolean isFolderMode,ImageLoaderListener listener) and abortLoadImages()
introduce new configuration option and builder method (like imageSource) and use it's value as parameter for ImagePickerPresenter (of course with DeviceMediaSource as fallback if it is not set)

that is actually it. I tried these changes on a local copy as proove-of-concept and it works like a charm. With this change it becomes possible to select images from some custom sources which are not available to media scanner (like external app dirs) or even some internet resources (if somebody ever needs a functionality like these).

@chpasha
Hello, and thank you for using this lib, glad i could help.
I actually been thinking about this. How the implementation for passing the source class to ImagePickerActivity?
Currently a custom ImageLoader use Serializeable but i think about a Singleton that as a source for ImagePickerActivity
WDYT?

yes, for now I have to pass serializable ImageSources (like Loaders) which is a bit awkward but I had to make changes quickly, so making class Serializable was not a problem. Not sure what would be a better solution, I think serilizables are better than singletons

With custom component already added to the lib, we can have custom image source.

authors: chpasha esafirm

repo: esafirm/android-image-picker


text:
[esdoc-ecmascript-proposal-plugin] Optional catch binding not supported

"esdoc": "^1.1.0",
"esdoc-ecmascript-proposal-plugin": "^1.0.0",
"esdoc-standard-plugin": "^1.0.0"

I get the following error :
warning: could not parse the following code
When the parser encounter an optional catch binding:
try {
  const fileStats = await promises.stat(file);
  if (!fileStats.isFile()) return false;
  return Finder.isWindows ? this._checkFileExtension(file) : this._checkFilePermissions(fileStats);
}

catch { // <= optional catch binding
  return false;
}

In the generated documentation, the whole file is skipped.

I close this issue because we have just exceeded one year of seniority 😴

I'm having this issue as well, it's failing my build process. Can we reopen this and get this fixed please?

@fab1o Sure... but I think @h13i32maru has moved on: he doesn't seem to maintain this project anymore.

@cedx I started it but I think I'm missing something cos npm test is not passing, could you take a look? https://github.com/esdoc/esdoc-plugins/pull/101

repo: esdoc/esdoc-plugins


text:
Enhance default package docs with TS-extended options and behavior

Some of the rules that are extended through the TS package have incomplete documentation in the default rule docs. It's currently difficult to go back and forth between the default rule page and the TS rule page (or @typescript-eslint's page) to reference extended options and whether certain behavior is supported - which is a pain point for adoption.
Rules with extended options include (not exhaustive, but covers the ones I'm encountering while setting up a config):

comma-dangle
padding-line-between-statements
lines-around-comment
lines-between-class-members

It's also not entirely clear whether certain behavior has been extended. One issue I found in the past was when our team tried enforcing "allman" through @typescript-eslint/brace-style - it had an unintended effect of forcing our interfaces to adhere to this style, which forced us to turn off the override (yes, we're aware of other issues with this setting lol).
// This is what we wanted
if (bool)
{
  ...
}

// This was incorrect
interface A {
  ...
}

// But this was ok!
type B = {
  ...
}

So it would be nice to also be alerted ahead of time if a default rule will have behavior beyond what's expected on the docs.
With how our docs our set up in metadata, it would be nice to have your input on how to proceed @antfu

They now have a TypeScript Specific section (if any) in the docs: https://eslint.style/rules/default/comma-dangle#typescript-specific

authors: antfu park-jemin

repo: eslint-stylistic/eslint-stylistic


text:
Configuring two ledc channels (IDFGH-9748)

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.

IDF version.
5.1
Operating System used.
Linux
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
None
What is the expected behavior?
I expected to control two ledc channels with different pwm signals .
What is the actual behavior?
While one channel is working, the other channel is not .
Steps to reproduce.

Step
Step
Step
...

Build or installation Logs.
No response
More Information.
Hello, ı want to configure two gpıos with different pwm values . When ı try to use two different ledc_channel, one channel working fine but the other channel not. Working channel is the step channel .
Here is the my code
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/mcpwm.h"
#include "driver/ledc.h"
#include "esp_log.h"
#define STEP_MOTOR_GPIO_EN       21
#define STEP_MOTOR_GPIO_DIR      22
#define STEP_MOTOR_GPIO_STEP     19 //ledc
#define FAN_GPIO                 18 //ledc
#define LEDC_TIMER_STEP              LEDC_TIMER_0
#define LEDC_MODE_STEP               LEDC_HIGH_SPEED_MODE
#define LEDC_CHANNEL_STEP            LEDC_CHANNEL_1
#define LEDC_DUTY_RES_STEP           LEDC_TIMER_12_BIT // Set duty resolution to 13 bits
#define LEDC_DUTY_STEP               (2048) // Set duty to 50%. ((2 ** 12) - 1) * 50% = 4095
#define LEDC_FREQUENCY_STEP          (5000) // Frequency in Hertz. Set frequency at 5 kHz
#define LEDC_TIMER_FAN              LEDC_TIMER_1
#define LEDC_MODE_FAN               LEDC_HIGH_SPEED_MODE
#define LEDC_CHANNEL_FAN            LEDC_CHANNEL_6
#define LEDC_DUTY_RES_FAN           LEDC_TIMER_8_BIT // Set duty resolution to 13 bits
#define LEDC_DUTY_FAN               (0)     // İnitially set 0 we change between 0 - 255
#define LEDC_FREQUENCY_FAN          (5000) // Frequency in Hertz. Set frequency at 5 kHz
static const char *TAG = "STEPPER MOTOR";
static void ledc_init(void);
static void step_gpio_init(void);
void app_main()
{
ledc_init();
step_gpio_init();
gpio_set_level(STEP_MOTOR_GPIO_EN,0);
gpio_set_level(STEP_MOTOR_GPIO_DIR,0);
/* Step */
ESP_ERROR_CHECK(ledc_set_duty(LEDC_MODE_STEP, LEDC_CHANNEL_STEP, LEDC_DUTY_STEP));
// Update duty to apply the new value
ESP_ERROR_CHECK(ledc_update_duty(LEDC_MODE_STEP, LEDC_CHANNEL_STEP));
/* Fan */
ESP_ERROR_CHECK(ledc_set_duty(LEDC_MODE_FAN, LEDC_CHANNEL_FAN, 50));
// Update duty to apply the new value
ESP_ERROR_CHECK(ledc_update_duty(LEDC_MODE_FAN, LEDC_CHANNEL_FAN));

}
static void ledc_init(void)
{
ledc_timer_config_t step_ledc_timer = {
.speed_mode       = LEDC_MODE_STEP,
.timer_num        = LEDC_TIMER_STEP,
.duty_resolution  = LEDC_DUTY_RES_STEP,
.freq_hz          = LEDC_FREQUENCY_STEP,  // Set output frequency at 5 kHz
.clk_cfg          = LEDC_AUTO_CLK
};
ESP_ERROR_CHECK(ledc_timer_config(&step_ledc_timer));
ledc_channel_config_t step_ledc_channel = {
    .speed_mode     = LEDC_MODE_STEP,
    .channel        = LEDC_CHANNEL_STEP,
    .timer_sel      = LEDC_TIMER_STEP,
    .intr_type      = LEDC_INTR_DISABLE,
    .gpio_num       = STEP_MOTOR_GPIO_STEP,
    .duty           = 0, // Set duty to 0%
    .hpoint         = 0
};
ESP_ERROR_CHECK(ledc_channel_config(&step_ledc_channel));

/* FAN */
ledc_timer_config_t fan_ledc_timer = {
    .speed_mode       = LEDC_MODE_FAN,
    .timer_num        = LEDC_TIMER_FAN,
    .duty_resolution  = LEDC_DUTY_RES_FAN,
    .freq_hz          = LEDC_FREQUENCY_FAN,  // Set output frequency at 5 kHz
    .clk_cfg          = LEDC_AUTO_CLK
};
ESP_ERROR_CHECK(ledc_timer_config(&fan_ledc_timer));

ledc_channel_config_t fan_ledc_channel = {
    .speed_mode     = LEDC_MODE_FAN,
    .channel        = LEDC_CHANNEL_FAN,
    .timer_sel      = LEDC_TIMER_FAN,
    .intr_type      = LEDC_INTR_DISABLE,
    .gpio_num       = FAN_GPIO,
    .duty           = 0, // Set duty to 0%
    .hpoint         = 0
};
ESP_ERROR_CHECK(ledc_channel_config(&fan_ledc_channel));

}
static void step_gpio_init(void)
{
ESP_LOGI(TAG, "Initialize EN + DIR GPIO");
gpio_config_t step_config =
{
.mode = GPIO_MODE_OUTPUT,
.intr_type = GPIO_INTR_DISABLE,
.pin_bit_mask = 1ULL << STEP_MOTOR_GPIO_DIR | 1ULL << STEP_MOTOR_GPIO_EN,
};
ESP_ERROR_CHECK(gpio_config(&step_config));
}

Hi @onurdof, I have tried your code on the current master. I see two PWM signals outputting correctly from the pins with a logic analyzer. If your conclusion of one PWM is not working is drawn from the working status of the motor/fan, then maybe you can check the wiring or hardware.

authors: onurdof songruo

repo: espressif/esp-idf


text:
Provision succeed, but seems not saved, require provision again after reboot (IDFGH-11266)

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
Hi,
I'm using esp32c3, with esp-idf v4.4.2 in ubuntu 20.04.
I'm trying to do wifi provision by a http server, it works well(pass the provision process then works in station mode correctly), but when I reboot the board, it can't find provision info by app_prov_is_provisioned() and require to do provision again.
So seem it can't save the provision info to nvs, which I thought should be done by esp_wifi_set_config(), which had been run successfully in the process of bring station mode up.
I don't want to add custom nvs field for this.
Any ideas?

Excuse me , how do you fix it at last,  could you share me please?

authors: lhr-tom zzzh


text:
components/esp_system/panic.c:58:10: fatal error: esp_gdbstub.h: No such file or directory (IDFGH-12162)

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.

IDF version.
f68c131
Operating System used.
Windows
How did you build your project?
Command line with Make
If you are using Windows, please specify command line type.
None
What is the expected behavior?
everything compiles
What is the actual behavior?
see title
Steps to reproduce.
set(COMPONENTS "main") in CMakeLists.txt, and CONFIG_ESP_SYSTEM_PANIC_GDBSTUB=y in sdkconfig
Build or installation Logs.
No response
More Information.
None

Thanks for reporting the issue to us @moefear85. I can confirm that this issue is reproducible. We shall work on a fix. Thanks!