Rework test/run_tests.pl to support selective verbosity and TAP copy

This includes a complete rework of how we use TAP::Harness, by adding
a TAP::Parser subclass that allows additional callbacks to be passed
to perform what we need.  The TAP::Parser callbacks we add are:

ALL
to print all the TAP output to a file (conditionally)
to collect all the TAP output to an array (conditionally)
EOF
to print all the collected TAP output (if there is any) if any subtest failed

To get TAP output to file, the environment variable HARNESS_TAP_COPY
must be defined, with a file name as value.  That file will be
overwritten unconditionally.
To get TAP output displayed on failure, the environment variable
HARNESS_VERBOSE_FAILURE must be defined with a non-emoty value.
Additionally, the output of test recipe names has been changed to only
display its basename.

This also includes Travis modifications to only get verbose test output on failure.

This is an alternative to #9854

For demonstration purposes, I added a test recipe that always fails.  That commit should not be merged

Impressive!  This is way cool!

Looking at one of the Travis jobs:
( cd test; \

  mkdir -p test-runs; \

  SRCTOP=../../_srcdist \

  BLDTOP=../. \

  RESULT_D=test-runs \

  PERL="/usr/bin/perl" \

  EXE_EXT= \

  OPENSSL_ENGINES=`cd .././engines 2>/dev/null && pwd` \

  OPENSSL_MODULES=`cd .././providers 2>/dev/null && pwd` \

  OPENSSL_DEBUG_MEMORY=on \

    /usr/bin/perl ../../_srcdist/test/run_tests.pl  )

00-wrong.t ......................... 1/1

1..1

# text

version: Option unknown option -x

version: Use -help for summary.

/home/travis/build/openssl/openssl/_build/util/shlib_wrap.sh /home/travis/build/openssl/openssl/_build/apps/openssl version -x => 1

not ok 1 - running openssl version -x

#   Failed test 'running openssl version -x'

#   at ../../_srcdist/test/recipes/00-wrong.t line 8.

# Looks like you failed 1 test of 1.

00-wrong.t ......................... Dubious, test returned 1 (wstat 256, 0x100)

Failed 1/1 subtests

01-test_abort.t .................... ok

01-test_sanity.t ................... ok

01-test_symbol_presence.t .......... ok

01-test_test.t ..................... ok

02-test_errstr.t ................... ok

02-test_internal_context.t ......... ok

02-test_internal_ctype.t ........... ok

02-test_internal_provider.t ........ ok

02-test_lhash.t .................... ok

02-test_ordinals.t ................. ok

02-test_sparse_array.t ............. ok

02-test_stack.t .................... ok

03-test_exdata.t ................... ok

03-test_fipsinstall.t .............. ok

03-test_internal_asn1.t ............ ok

03-test_internal_asn1_dsa.t ........ ok

03-test_internal_bn.t .............. ok

03-test_internal_chacha.t .......... ok

03-test_internal_curve448.t ........ ok

03-test_internal_ec.t .............. ok

03-test_internal_mdc2.t ............ ok

03-test_internal_modes.t ........... ok

03-test_internal_namemap.t ......... ok

03-test_internal_poly1305.t ........ ok

03-test_internal_rsa_sp800_56b.t ... ok

03-test_internal_siphash.t ......... ok

03-test_internal_sm2.t ............. ok

03-test_internal_sm4.t ............. ok

03-test_internal_ssl_cert_table.t .. ok

03-test_internal_x509.t ............ ok

03-test_params_api.t ............... ok

03-test_property.t ................. ok

03-test_ui.t ....................... ok

04-test_asn1_decode.t .............. ok

04-test_asn1_encode.t .............. ok

04-test_asn1_string_table.t ........ ok

04-test_bio_callback.t ............. ok

04-test_bioprint.t ................. ok

04-test_err.t ...................... ok

04-test_param_build.t .............. ok

04-test_params.t ................... ok

04-test_params_conversion.t ........ ok

04-test_pem.t ...................... ok

04-test_provider.t ................. ok

05-test_bf.t ....................... ok

05-test_cast.t ..................... ok

05-test_des.t ...................... ok

05-test_hmac.t ..................... ok

05-test_idea.t ..................... ok

05-test_md2.t ...................... skipped: md2 is not supported by this OpenSSL build

05-test_mdc2.t ..................... ok

05-test_rand.t ..................... ok

05-test_rc2.t ...................... ok

05-test_rc4.t ...................... ok

05-test_rc5.t ...................... skipped: rc5 is not supported by this OpenSSL build

06-test-rdrand.t ................... ok

10-test_bn.t ....................... ok

10-test_exp.t ...................... ok

15-test_dh.t ....................... ok

15-test_dsa.t ...................... ok

15-test_ec.t ....................... ok

15-test_ecdsa.t .................... ok

15-test_ecparam.t .................. ok

15-test_genrsa.t ................... ok

15-test_mp_rsa.t ................... ok

15-test_out_option.t ............... ok

15-test_rsa.t ...................... ok

15-test_rsapss.t ................... ok

20-test_enc.t ...................... ok

20-test_enc_more.t ................. ok

20-test_kdf.t ...................... ok

20-test_mac.t ...................... ok

20-test_passwd.t ................... ok

20-test_pkeyutl.t .................. ok

20-test_provider.t ................. ok

25-test_crl.t ...................... ok

25-test_d2i.t ...................... ok

25-test_pkcs7.t .................... ok

25-test_req.t ...................... ok

25-test_sid.t ...................... ok

25-test_verify.t ................... ok

25-test_x509.t ..................... ok

30-test_aesgcm.t ................... ok

30-test_afalg.t .................... ok

30-test_engine.t ................... ok

30-test_evp.t ...................... ok

30-test_evp_extra.t ................ ok

30-test_evp_kdf.t .................. ok

30-test_evp_pkey_dparam.t .......... ok

30-test_pbelu.t .................... ok

30-test_pkey_meth.t ................ ok

30-test_pkey_meth_kdf.t ............ ok

40-test_rehash.t ................... ok

60-test_x509_check_cert_pkey.t ..... ok

60-test_x509_dup_cert.t ............ ok

60-test_x509_store.t ............... ok

60-test_x509_time.t ................ ok

70-test_asyncio.t .................. ok

70-test_bad_dtls.t ................. ok

70-test_clienthello.t .............. ok

70-test_comp.t ..................... ok

70-test_key_share.t ................ ok

70-test_packet.t ................... ok

70-test_recordlen.t ................ ok

70-test_renegotiation.t ............ ok

70-test_servername.t ............... ok

70-test_sslcbcpadding.t ............ ok

70-test_sslcertstatus.t ............ ok

70-test_sslextension.t ............. ok

70-test_sslmessages.t .............. ok

70-test_sslrecords.t ............... ok

70-test_sslsessiontick.t ........... ok

70-test_sslsigalgs.t ............... ok

70-test_sslsignature.t ............. ok

70-test_sslskewith0p.t ............. ok

70-test_sslversions.t .............. ok

70-test_sslvertol.t ................ ok

70-test_tls13alerts.t .............. ok

70-test_tls13cookie.t .............. ok

70-test_tls13downgrade.t ........... ok

70-test_tls13hrr.t ................. ok

70-test_tls13kexmodes.t ............ ok

70-test_tls13messages.t ............ ok

70-test_tls13psk.t ................. ok

70-test_tlsextms.t ................. ok

70-test_verify_extra.t ............. ok

70-test_wpacket.t .................. ok

80-test_ca.t ....................... ok

80-test_cipherbytes.t .............. ok

80-test_cipherlist.t ............... ok

80-test_ciphername.t ............... ok

80-test_cms.t ...................... ok

80-test_cmsapi.t ................... ok

80-test_ct.t ....................... ok

80-test_dane.t ..................... ok

80-test_dtls.t ..................... ok

80-test_dtls_mtu.t ................. ok

80-test_dtlsv1listen.t ............. ok

80-test_ocsp.t ..................... ok

80-test_pkcs12.t ................... ok

80-test_ssl_new.t .................. ok

80-test_ssl_old.t .................. ok

80-test_ssl_test_ctx.t ............. ok

80-test_sslcorrupt.t ............... ok

80-test_tsa.t ...................... ok

80-test_x509aux.t .................. ok

90-test_asn1_time.t ................ ok

90-test_async.t .................... ok

90-test_bio_enc.t .................. ok

90-test_bio_memleak.t .............. ok

90-test_constant_time.t ............ ok

90-test_fatalerr.t ................. ok

90-test_gmdiff.t ................... ok

90-test_gost.t ..................... skipped: No test GOST engine found

90-test_ige.t ...................... ok

90-test_includes.t ................. ok

90-test_memleak.t .................. ok

90-test_overhead.t ................. skipped: Only supported in no-shared builds

90-test_secmem.t ................... ok

90-test_shlibload.t ................ ok

90-test_srp.t ...................... ok

90-test_sslapi.t ................... ok

90-test_sslbuffers.t ............... ok

90-test_store.t .................... ok

90-test_sysdefault.t ............... ok

90-test_threads.t .................. ok

90-test_time_offset.t .............. ok

90-test_tls13ccs.t ................. ok

90-test_tls13encryption.t .......... ok

90-test_tls13secrets.t ............. ok

90-test_v3name.t ................... ok

95-test_external_boringssl.t ....... skipped: No external tests in this configuration

95-test_external_krb5.t ............ skipped: No external tests in this configuration

95-test_external_pyca.t ............ skipped: No external tests in this configuration

99-test_ecstress.t ................. ok

99-test_fuzz.t ..................... ok

Test Summary Report

-------------------

00-wrong.t                       (Wstat: 256 Tests: 1 Failed: 1)

  Failed test:  1

  Non-zero exit status: 1

Files=177, Tests=1663, 78 wallclock secs ( 3.85 usr  0.35 sys + 68.76 cusr  9.50 csys = 82.46 CPU)

Result: FAIL

This is exactly what @richsalz asked for, I think

This is exactly what @richsalz asked for, I think

Yes. This is awesome.  I really think this, coupled with the travis_terminate changes will make reviewing CI results painless.  Thank you.

I had forgotten to tweak appveyor.yml...

Okie, functionality confirmed on Travis and Appveyor.  That makes it time to remove the temporary commit (the one that adds test/recipes/00-wrong.t)

I squashed and rebased to a fresher master while I was at it.
Time for final review

To get TAP output displayed on failure, the environment variable
HARNESS_VERBOSE_FAILURE must be defined with a non-emoty value.

Why not just make the default behavior? Why does it require such a long argument to enable such a useful feature?

HARNESS_VERBOSE is already a known environment variable in Test::Harness which we have made use of for its documented purpose, so we need to make another.

Then maybe as a compromise add short make parameter? Like VF=1 for enabling 'verbose on failure'? So we can write
nmake VF=1 tests

instead of
nmake HARNESS_VERBOSE_FAILURE=yes tests

But thinking once more about it: why can't  make tests just add HARNESS_VERBOSE_FAILURE=yes by default? Wouldn't this be the optimal behaviour? Then we don't have to ask users which report test failures to rerun specific tests with V=1.

As for your review request: I will do some usability tests as soon as I find the time, but I doubt that my perl-fu is already sufficient to review the code thoroughly.

There is nobody on the project who can do anything other than trivial review of Richard's perl code.

I like the VF=1 idea. I dislike it being a default, 'cause you can be sure that someone will ask "how the he'll do I turn it off???"

someone will ask "how the he'll do I turn it off???"

This argument does not really convince me yet. If a test fails, who wouldn't like to know why it fails? Just think of all the times you have to instruct people on GitHub to rerun the test using make V=1 TESTS=...  test?  Making verbose-on-failure the default would safe us one roundtrip.
And for those preferring the old behaviour, you could add a silent flag (something like S=1 or SILENT=true).

Making verbose-on-failure the default would safe us one roundtrip.

Until it hits an error in one of those huge tests, like test_evp, and someone quotes that last three lines...

You win. I‘m satisfied with VF=1 too.

Fixup that adds VERBOSE_FAILURE as well as VF, plus changes to INSTALL and CHANGES

Ping

Ping

Sigh. How fortunate you are to be able to work 24/7 on OpenSSL...  ;-)

Sigh. How fortunate you are to be able to work 24/7 on OpenSSL... ;-)

What, feeling pressured? ;-)


indicatif 0.17.4 breaks rendering

❯ cargo msrv
  [Meta]   cargo-msrv 0.16.0-beta.14

Compatibility Check #1: Rust 1.51.0
◓                  Elapsed 0s
◓ Rust 1.51.0      Elapsed 6s

❯ cargo msrv
  [Meta]   cargo-msrv 0.16.0-beta.14

Compatibility Check #1: Rust 1.51.0
◓                  Elapsed 0s
  [FAIL]   Is incompatible

  ╭───────────────────────────────────────────────────────────────────────────────────────╮
  │ warning: `rust-version` is not supported on this version of Cargo and will be ignored │
  │                                                                                │
  │ this Cargo does not support nightly features, but if you                              │
  │ switch to nightly channel you can add                                                 │
  │ `cargo-features = ["rust-version"]` to enable this feature                            │
  │     Updating crates.io index                                                          │
  │ error: failed to select a version for the requirement `clap = "=4.1.10"`              │
  │ candidate versions found which didn't match: 3.2.25, 3.2.24, 3.2.23, ...              │
  │ location searched: crates.io index                                                    │
  │ required by package `cargo-msrv v0.16.0-beta.8 (/home/foresterre/cargo-msrv)`      │
  │                                                                                │
  ╰───────────────────────────────────────────────────────────────────────────────────────╯

Compatibility Check #2: Rust 1.61.0

❯ cargo msrv
  [Meta]   cargo-msrv 0.16.0-beta.14

Compatibility Check #1: Rust 1.51.0
◓                  Elapsed 0s
  [FAIL]   Is incompatible

  ╭───────────────────────────────────────────────────────────────────────────────────────╮
  │ warning: `rust-version` is not supported on this version of Cargo and will be ignored │
  │                                                                                │
  │ this Cargo does not support nightly features, but if you                              │
  │ switch to nightly channel you can add                                                 │
  │ `cargo-features = ["rust-version"]` to enable this feature                            │
  │     Updating crates.io index                                                          │
  │ error: failed to select a version for the requirement `clap = "=4.1.10"`              │
  │ candidate versions found which didn't match: 3.2.25, 3.2.24, 3.2.23, ...              │
  │ location searched: crates.io index                                                    │
  │ required by package `cargo-msrv v0.16.0-beta.8 (/home/foresterre/cargo-msrv)`      │
  │                                                                                │
  ╰───────────────────────────────────────────────────────────────────────────────────────╯

Compatibility Check #2: Rust 1.61.0
[1]    7914 killed     cargo msrv

windows:
  [Meta]   cargo-msrv 0.16.0-beta.14

Compatibility Check #1: Rust 1.51.0
◓                  Elapsed 0s
  [FAIL]   Is incompatible

  ╭───────────────────────────────────────────────────────────────────────────────────────╮
  │ warning: `rust-version` is not supported on this version of Cargo and will be ignored │
  │                                                                                │
  │ this Cargo does not support nightly features, but if you                              │
  │ switch to nightly channel you can add                                                 │
  │ `cargo-features = ["rust-version"]` to enable this feature                            │
  │     Updating crates.io index                                                          │
  │ error: failed to select a version for the requirement `clap = "=4.3.0"`               │
  │ candidate versions found which didn't match: 3.2.25, 3.2.24, 3.2.23, ...              │
  │ location searched: crates.io index                                                    │
  │ required by package `cargo-msrv v0.16.0-beta.14 (C:\Marwen\ws\cargo-msrv)`            │
  │                                                                                │
  ╰───────────────────────────────────────────────────────────────────────────────────────╯

Compatibility Check #2: Rust 1.61.0
memory allocation of<PHONE_NUMBER>0 bytes failed

present in:

latest git
beta.14
beta.13
beta.12
beta.10

unable to check: beta's before at least beta.7 when installed via cargo install cargo-msrv version, because of vergen lacking repo data.
Could also be windows-terminal (first printed output above is from ubuntu via windows-terminal, last one is pwsh7 via windows-terminal); I've not observed this issue before. I did recently update windows terminal. Also reproduce in cmd
This is probably the Rust compilers fault (1.70) or a dependency.

Running with --output-format json works as intended.
cargo binstall cargo-msrv cargo-msrv --version 0.16.0-beta.14 --force: works as intended
cargo install cargo-msrv --version 0.16.0-beta.14 --force --no-default-features --locked: works as intended
setting indicatif = "=0.17.3" in the manifest, and recompiling cargo install cargo-msrv --path . --force: works as intended

Issue is almost certainly caused by the upgrade from 0.17.3 to 0.17.4. Since this is a patch release, it would also fail for older beta builds, since I wasn't using --locked.

I opened an issue on the indicatif repo: https://github.com/console-rs/indicatif/issues/546
I also opened an attempt at a fix: https://github.com/console-rs/indicatif/pull/547


Adding Custom CFN Stack for unsupported types fails

Describe the bug
After following the procedure described here to add an API Gateway to an Amplify project, the amplify push command results in an error.
To Reproduce
Steps to reproduce the behavior:

Follow the process described in the third bullet of this documentation to setup a custom category name of 'gateway' with a custom resource name of 'proxy' in an Amplify project with a successfully deployed GraphQL API, Hosted App and Lambda function.
Do an amplify env checkout nickenv, followed by amplify push
See

Current Environment: nickenv

| Category | Resource name   | Operation | Provider plugin   |
| -------- | --------------- | --------- | ----------------- |
| Gateway  | proxy           | Create    | awscloudformation |
| Function | proxyfn         | Update    | awscloudformation |
| Api      | graphz          | No Change | awscloudformation |
| Hosting  | S3AndCloudFront | No Change | awscloudformation |
? Are you sure you want to continue? Yes
✖ An error occurred when pushing the resources to the cloud

ENOENT: no such file or directory, stat '...amplify/backend/gateway/proxy/src/package.json'
An error occured during the push operation: ENOENT: no such file or directory, stat '...amplify/backend/gateway/proxy/src/package.json'

Expected behavior
A clear and concise description of what you expected to happen.
I expect the custom cloudformation template in the file amplify/backend/gateway/proxy/template.json to be pushed to the cloud.
Desktop (please complete the following information):

OS: macOS 12.4
Amplify CLI Version 3.10.0

@nick-town Can you please share your amplify/backend/backend-config.json or amplify/backend/amplify-meta.json file?

I worked around this by manually running the Cloudformation template using aws-cli. I had kept the files in the amplify/backend/gateway/proxy/ directory and just removed the following entries from amplify/backend/backend.config.json:
"gateway": {
         "proxy": {
                 "service": "APIGateway",
                 "providerPlugin": "awscloudformation",
                    "dependsOn": [
                         {
                                 "category": "function",
                                 "resourceName": "proxyfn",
                                 "attributes": [
                                         "Arn"
                                 ]
                         }
                 ]
         }
 },

When I added them back and did amplify env checkout <myenv>, followed by amplify pushthe templates were executed as I expected. Unless I made a typo previously the only difference was that I'm now on version 3.11 of the amplify-cli.
You'll notice that I got dependencies and parameter references to work too. You should perhaps document this, or warn against it, if it will be unsupported in future releases.
Thanks, you can close this now.


Add _pulse_height.csv file generation to watcher

If you haven't already, please read through our contributing guidelines before opening your PR
What is the purpose of this PR?
Closes #261. Adds pulse height file generation to the real-time monitoring notebook, to shorten the length of time it takes to run the 4b notebook.
How did you implement your changes
Create the FOV level callback generate_pulse_heights and implement in notebook 3a. Also add corresponding test cases and validation functions.
Remaining issues

[x] clean up the test cases and variable names in fov_watcher_test.py
[x] notebook uses mass args start_offset=0.3  stop_offset=0, but the function write_mph_per_mass itself has 0.5 set as defaults for both?

Looks good. Will you try out the actual watcher notebook with some bin files (can be generated already) to make sure everything works

All good!


fix: allows policy result in after check callbacks as mentioned in docs

As mentioned in the docs, we can override results after the checks has been passed in after callback checks.
https://laravel.com/docs/11.x/authorization#intercepting-gate-checks
Scenario:

in my project I want to first check if user is allowed to access some api or not, and that is all resolved by default using sanctum.
now in after check, I want to fire up extra sql queries to make sure initial checks are passed.

We actually have tests specifically preventing this, so we may want to adjust the docs instead.

I see based on failing test cases, it is intentional, but we want to still override results even if it is true, so if we both are on same page, I can fix test cases for this PR, please let me know.
also if you do not agree with this, then please help me how i can do this


Add render with context

for addressing https://github.com/Zetoff/accounts-material-ui/issues/18
In UIs like material ui it needs the context.  This should allow the parent context to be passed down.

@timbrandin if you have a better way this should be handled let me know :)

@timbrandin could we have a look at this? I have the permissions to merge, however, I want to confirm it with you, so we can also publish it.


Three double quote marks

In the result of SHOW CREATE TAG/EDGE, the ttl_col has three double quote marks, which is weird. There should be two of them, right?

The first two quote means empty string.


Add unit tests for all existing UI code

Includes a few very minor changes to non-test files. This should be backported to prevent those changes from causing conflicts.

Ivanchuk backport details:
$ git log -1
commit c28d784ef58f36d05c0d9259b647847f8a39f606
Author: Milan Zázrivec<EMAIL_ADDRESS>Date:   Tue Aug 6 11:25:13 2019 +0200

    Merge pull request #7 from mturley/unit-tests

    Add unit tests for all existing UI code

    (cherry picked from commit fb88ef031846d6efd2b4b1f9b81d9e0753edbc98)


Breaking changes

Replaced all snake_case keys with camelCase.
Renamed visited_zones to just zones since it contains every zone.
Renamed collection xp to amount
Moved /leaderboard/ to /leaderboards/

Merged in https://github.com/skyblockstats/skyblock-api/commit/4fd4e4fdbd444466fd22827327eb36da1219eb9f


ref: Split settings into sub-pages

Fixes #3572
This is the first of many PR's for https://github.com/snapshot-labs/snapshot/milestone/3
Changes

Split settings into sub-pages
Add danger zone for changing controller
Add danger variant to BaseButton
Refactor quorum into a single component and composable

For another PR:

Add delete space to danger section
Add warning for user leaving the settings, when space settings have changed
Adding view only for and disabling input

@bonustrack do you approve the design?

Why we need view only mode for settings? I mean if it is all inputs should be disabled.

We can add red border to danger zone just like in Github

Why we need view only mode for settings? I mean if it is all inputs should be disabled.

@j0hnfl0w, this because:

A technical limitation with space controller, the space controller is pretty heavy and we don't want to have to make that query every time a users visits the space page.
Some communities value transparent governance so it makes sense to let their members see the settings.

For adding view only more we have an issue already https://github.com/snapshot-labs/snapshot/issues/3571


Problems re-indexing

While re-indexing with 1.7.1:
can't find files in several repos (empty?):
INFO:root:Parsing file ids from repository dcppc/dcppc-deliverables
INFO:root:Parsing file ids from repository dcppc/dcppc-bot
ERROR:root:ERROR: could not get commits from repository dcppc/guids
Traceback (most recent call last):
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/centillion-1.7.1-py3.6.egg/centillion/search/__init__.py", line 1055, in update_index_ghfiles
    last = commits[0]
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 55, in __getitem__
    self.__fetchToIndex(index)
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 73, in __fetchToIndex
    self._grow()
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 76, in _grow
    newElements = self._fetchNextPage()
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 196, in _fetchNextPage
    headers=self.__headers
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/Requester.py", line 262, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/Requester.py", line 273, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 409 {'message': 'Git Repository is empty.', 'documentation_url': 'https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository'}
INFO:root:Parsing file ids from repository dcppc/dcppc.github.io
ERROR:root:ERROR: could not get commits from repository dcppc/test-dcppc-deliverables
Traceback (most recent call last):
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/centillion-1.7.1-py3.6.egg/centillion/search/__init__.py", line 1055, in update_index_ghfiles
    last = commits[0]
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 55, in __getitem__
    self.__fetchToIndex(index)
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 73, in __fetchToIndex
    self._grow()
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 76, in _grow
    newElements = self._fetchNextPage()
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/PaginatedList.py", line 196, in _fetchNextPage
    headers=self.__headers
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/Requester.py", line 262, in requestJsonAndCheck
    return self.__check(*self.requestJson(verb, url, parameters, headers, input, self.__customConnection(url)))
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/github/Requester.py", line 273, in __check
    raise self.__createException(status, responseHeaders, output)
github.GithubException.GithubException: 409 {'message': 'Git Repository is empty.', 'documentation_url': 'https://developer.github.com/v3/repos/commits/#list-commits-on-a-repository'}
INFO:root:Parsing file ids from repository dcppc/crosscut-metadata
INFO:root:Parsing file ids from repository dcppc/project-management
INFO:root:Parsing file ids from repository dcppc/dcppc-milestones
INFO:root:Parsing file ids from repository dcppc/dcppc-workshops
INFO:root:Parsing file ids from repository dcppc/2018-may-workshop

then problems with github files:
INFO:root:Indexing github file update_calendars.sh from repo dcppc/calendars
INFO:root:Indexing markdown doc USERSTORY-45.md from repo dcppc/use-case-library
INFO:root:Indexing github file style.css from repo dcppc/dcppc.github.io
ERROR:root:ERROR: Failed to find file info.
Traceback (most recent call last):
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/centillion-1.7.1-py3.6.egg/centillion/search/__init__.py", line 554, in add_ghfile
    furl = d['url']
KeyError: 'url'
ERROR:root:dict_keys(['path', 'mode', 'type', 'sha', 'org', 'repo'])
INFO:root:Indexing github file gtex from repo dcppc/crosscut-metadata

later:
INFO:root:Indexing github file old from repo dcppc/dcppc-bot
INFO:root:Indexing markdown doc hooks.md from repo dcppc/uncle-archie
INFO:root:Indexing github file TEAM-Nitrogen-Ma'ayan.csv from repo dcppc/project-management
INFO:root:Indexing github file samples.py from repo dcppc/crosscut-metadata
ERROR:root:ERROR: Failed to find file info.
Traceback (most recent call last):
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/centillion-1.7.1-py3.6.egg/centillion/search/__init__.py", line 554, in add_ghfile
    furl = d['url']
KeyError: 'url'

later:
INFO:root:Indexing github file github_files.py from repo dcppc/crosscut-metadata
ERROR:root:ERROR: Failed to find file info.
Traceback (most recent call last):
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/centillion-1.7.1-py3.6.egg/centillion/search/__init__.py", line 554, in add_ghfile
    furl = d['url']
KeyError: 'url'

also google drive pandoc problems, this error shows up multiple times:
INFO:root:Indexing Google Drive document "FAIR Rubrics and Assessments" of type document
INFO:root: > Extracting content
ERROR:root: > XXXXXX Failed to index Google Drive document "FAIR Rubrics and Assessments"
Traceback (most recent call last):
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/centillion-1.7.1-py3.6.egg/centillion/search/__init__.py", line 383, in add_drive_file
    outputfile=fullpath_output
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/pypandoc/__init__.py", line 140, in convert_file
    outputfile=outputfile, filters=filters)
  File "/home/ubuntu/centillion/vp/lib/python3.6/site-packages/pypandoc/__init__.py", line 325, in _convert_input
    'Pandoc died with exitcode "%s" during conversion: %s' % (p.returncode, stderr)
RuntimeError: Pandoc died with exitcode "1" during conversion: b"pandoc: couldn't parse docx file\nCallStack (from HasCallStack):\n  error, called at src/Text/Pandoc/Error.hs:55:28 in pandoc-<IP_ADDRESS>-HbfKWUyODESBIy0vGktOwX:Text.Pandoc.Error\n"

fixed - see 1cbed8e0


[$500] Profile - Notification preference displayed when no comment in report

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

Version Number: 1.3.24
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Issue found when executing PR https://github.com/Expensify/App/pull/33387
Action Performed:

Launch app
Tap fab
Tap start chat
Select a new user with whom no previous chat history
Tap on header

Expected Result:
In profile page, notification preference must not be displayed when there is no comment in report.
Actual Result:
In profile page, notification preference section is displayed when there is no comment/chat in report.
Workaround:
Unknown
Platforms:

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

[x] Android: Native
[x] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/68ca2a92-2cc0-4364-bdb3-fa45cf4eb2e9
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01cb16322001847cf2
Upwork Job ID:<PHONE_NUMBER>694226432
Last Price Increase: 2024-01-09

Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
When deciding whether to show the notification preference, we only check it to be not hidden, and the report object to be not empty:
https://github.com/Expensify/App/blob/ffbf5da2c04fe9812c206f75213481c2998bd664/src/pages/ProfilePage.js#L137
What changes do you think we should make in order to solve the problem?
We should explicitly check if the chat is not empty, similar to how we do it on the HeaderView:
const lastVisibleMessage = ReportActionsUtils.getLastVisibleMessage(props.report.reportID);
    const isEmptyChat = !props.report.lastMessageText && !props.report.lastMessageTranslationKey && !lastVisibleMessage.lastMessageText && !lastVisibleMessage.lastMessageTranslationKey;
    const shouldShowNotificationPreference = !_.isEmpty(props.report) && !isEmptyChat && props.report.notificationPreference !== CONST.REPORT.NOTIFICATION_PREFERENCE.HIDDEN;

https://github.com/Expensify/App/blob/ffbf5da2c04fe9812c206f75213481c2998bd664/src/pages/ProfilePage.js#L137
What alternative solutions did you explore? (Optional)

Proposal
Please re-state the problem that we are trying to solve in this issue.
Notification preference displayed when no comment in report
What is the root cause of that problem?
The profile page is not checking:

if the chat is empty
if there's no old deleted conversation

What changes do you think we should make in order to solve the problem?
1- We need to check if the chat is empty same as in HeaderView
https://github.com/Expensify/App/blob/76e5b1cbd80e7dc55c52f47c5572b2984a7f7ed6/src/pages/home/HeaderView.js#L114
2- We need to check if there was a discussion before
function  areDatesEqual(lastReadTime, lastVisibleActionCreated) {
  // Removing the milliseconds part from the date-time strings
  const  lastReadTimeWithoutMillis  =  lastReadTime.substring(0, 19);
  const  lastVisibleActionCreatedWithoutMillis  =  lastVisibleActionCreated.substring(0, 19);

  // Creating Date objects
  const  lastReadDate  =  new  Date(lastReadTimeWithoutMillis);
  const  lastVisibleActionCreatedDate  =  new  Date(lastVisibleActionCreatedWithoutMillis);

  // Returning true if dates are equal, false otherwise
  return  lastReadDate.getTime() ===  lastVisibleActionCreatedDate.getTime();
}

const  result  =  areDatesEqual(props.report.lastReadTime, props.report.lastVisibleActionCreated);

3- Add to shouldShowNotificationPreference those 2 checks to make sure we can display the notifications setting.
https://github.com/Expensify/App/blob/ad583bb9605fa9ecf38312eba271fcdb49cbfafd/src/pages/ProfilePage.js#L137
Explaining:
The bug reported here is for the 1st time conversation, but I noticed if there's an old conversation and it's deleted, checking only if the chat is empty will not allow editing notifications settings.
And I think if someone receive a lot of messages (with lots of notifications) then those  messages got deleted by the sender, I think the receiver still get the right to mute (or edit) notification.
I am not sure what's the righ way to do this (checking if there's an old deleted conversation) but I noticed there's a difference between lastReadTime and lastVisibleActionCreated in report details. I will try to ask the team on Slack about this.
What alternative solutions did you explore? (Optional)
Add an utility on ReportUtils to handle this case.

I'm a little confused about the expected result here.
Could someone kindly explain how showing the notification preference when no messages have been sent is a bad thing? Does someone have to chat first before you can adjust the preference?

@Victor-Nyagudi check https://github.com/Expensify/App/pull/33387

And I think if someone receive a lot of messages (with lots of notifications) then those messages got deleted by the sender, I think the receiver still get the right to mute (or edit) notification.

At first, I was thinking about this scenario as well, but it looks super unlikely considering the sender will have to remove each message manually. Moreover, if the chat report is empty, it disappears from LHN in both "Last seen" and "Focus" modes, so in such a case the recipient will have to go to the search, type in the sender's details, and mute them.
Therefore, making such a calculation for a super edge case each time a profile page is opened looked like an overkill for me.

@paultsimura Let's agree to disagree :)

I was thinking about this scenario as well

It's not mentioned in your proposal even in the alternative solution

it looks super unlikely considering the sender will have to remove each message manually

it can be just one msg, mistake, wrong file..

it disappears from LHN

You can see on the video I attached, it doesn't disappear. The chat is open, msg removed and user (receiver) is not able to mute cayse msg deleted.

such a calculation

I don't see any calculation, it's just a condition.

super edge case

This is how great apps are built. Most of the issues areb super edge case  but we enroll to make the app perfect.
Thanks for the details, I have confidance that the C+ will take the right decision.

@akinwale what do you think of the above proposals?

@dragnoir I reviewed both proposals, and the expected behaviour here is that there shouldn't be a notification preference displayed whenever the report is empty, so it doesn't matter if there were previous chats that have been deleted. As long as the report is empty, the preference should not be displayed.
After reviewing the proposals, we can move forward with @paultsimura's proposal.
🎀👀🎀 C+ reviewed.

Hmm @srikarparsi do you mind taking over this one since it has a lot to do with https://github.com/Expensify/Expensify/issues/330506, and specifically your changes in these two PRs?

https://github.com/Expensify/Auth/pull/9531
https://github.com/Expensify/App/pull/33387

@akinwale I don't agree with you. For an app like expensify, perfection and focus on details is very important. The video I posted show the UX issue when someone is spamming then removing messages. Even when the app and the chat is open.
I totally repect you decision but I don't agree with you. It will be another issue opened later for sure.

Hey! I don't believe this is reproducible anymore since the Auth PR  hit production yesterday. This makes sure that new DMs are set to hidden by default and the App PR ensures we don't show the hidden notification preference in the settings pane.

I believe we should be able to close this out?

That's sad but seems like you're right @srikarparsi, I cannot reproduce either 🙂

That's great! Happy to close this out

@paultsimura that was a nice debate, thx for the spirit :)

@paultsimura that was a nice debate, thx for the spirit :)

You too, man 💪


Kestrel send empty response over custom SSL

I have constantly repeated exceptions:
Microsoft.AspNetCore.Server.Kestrel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60: Error: ConnectionFilter.OnConnection

System.AggregateException: One or more errors occurred. ---> System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionFilter.<OnConnectionAsync>d__3.MoveNext()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.IO.IOException: Authentication failed because the remote party has closed the transport stream.
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionFilter.<OnConnectionAsync>d__3.MoveNext()<---

Microsoft.AspNetCore.Server.Kestrel, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=adb9793829ddae60: Error: ConnectionFilter.OnConnection

System.AggregateException: One or more errors occurred. ---> System.IO.IOException: The handshake failed due to an unexpected packet format.
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionFilter.<OnConnectionAsync>d__3.MoveNext()
   --- End of inner exception stack trace ---
---> (Inner Exception #0) System.IO.IOException: The handshake failed due to an unexpected packet format.
   at System.Net.Security.SslState.InternalEndProcessAuthentication(LazyAsyncResult lazyResult)
   at System.Net.Security.SslState.EndProcessAuthentication(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.AspNetCore.Server.Kestrel.Https.HttpsConnectionFilter.<OnConnectionAsync>d__3.MoveNext()<---

My Main is like:
        public static void Main(string[] args)
        {
            ContainerBuilder builder = new ContainerBuilder();
            string folder = Directory.GetCurrentDirectory() + "\\";

            // register configuration
            builder.RegisterInstance(
                new ConfigurationBuilder()
                    .SetBasePath(folder)
                    .AddJsonFile("config.json")
                    .AddEnvironmentVariables()
                    .AddCommandLine(args)
                    .Build()
                ).As<IConfiguration>();

            Container = builder.Build();

            X509Certificate2 httpsCert = new X509Certificate2(folder + Container.Resolve<IConfiguration>()["Hosting:PfxPath"], Container.Resolve<IConfiguration>()["Hosting:PfxPassword"]);

            // build and launch web server
            new WebHostBuilder()
                .UseConfiguration(Container.Resolve<IConfiguration>())
                .UseContentRoot(folder)
                .UseKestrel(options => {
                    options.NoDelay = true;
                    options.UseHttps(new HttpsConnectionFilterOptions() {
                         ServerCertificate = httpsCert,
                         SslProtocols = SslProtocols.Tls12
                    });
                })
                .UseUrls(Container.Resolve<IConfiguration>()["Hosting:HttpUrl"], Container.Resolve<IConfiguration>()["Hosting:HttpsUrl"])
                .UseStartup<Startup>()
                .Build()
                .Run();
        }

My project.json:
{
  "dependencies": {
    "Autofac": "4.0.0-*",
    "Hangfire": "1.5.4",
    "Hangfire.Autofac": "2.2.0",
    "HttpMultipartParser": "2.1.3",
    "ImageProcessor": "2.3.3",
    "Lucene.Net": "3.0.3",
    "AutoMapper": "4.2.1",
    "NReco.PdfGenerator": "1.1.12",
    "MySql.Data": "6.9.8",
    "Nancy": "1.4.3",
    "Nancy.Validation.DataAnnotations": "1.4.1",
    "Nancy.Owin": "1.4.1",
    "Nancy.Bootstrappers.Autofac": "1.4.1",
    "Newtonsoft.Json": "8.0.3",
    "Nancy.Serialization.JsonNet": "1.4.1",
    "MailKit": "1.2.23",
    "IdentityServer3": "2.5.0",

    "Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Owin": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
    "Microsoft.AspNetCore.Server.Kestrel.Https": "1.0.0-rc2-final",

    "Microsoft.EntityFrameworkCore": "1.0.0-rc2-final",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-rc2-final",

    "Microsoft.Extensions.Configuration": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.CommandLine": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
    "Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
    "Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
    "Microsoft.Extensions.Options": "1.0.0-rc2-final",
    "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-final",
    "Autofac.Extensions.DependencyInjection": "4.0.0-*"
  },

  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
      "version": "1.0.0-preview1-final",
      "imports": "portable-net45+win8+dnxcore50"
    }
  },

  "frameworks": {
    "net461": {
      "frameworkAssemblies": {
        "System.Runtime": "",
        "System.Runtime.Serialization": "",
        "System.Runtime.Serialization.Primitives": "",
        "System.Reflection": "",
        "System.Data": "",
        "System.ComponentModel": "",
        "System.Drawing": "",
        "System.Collections": ""
      }
    }
  },

  "buildOptions": {
    "emitEntryPoint": true,
    "preserveCompilationContext": true
  },

  "publishOptions": {
    "include": [
      "wwwroot",
      "web.config",
      "cert.pfx",
      "config.json"
    ]
  },

  "scripts": {
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
  }
}

My config contains:
  "Hosting": {
    "HttpUrl": "http://localhost:4748/",
    "HttpsUrl": "https://localhost:4747/",
    "PfxPath": "cert.pfx",
    "PfxPassword": "testPassword"
  },

I trieed:

many different certs include test one in samples folder;
admin / user rights;
install certs into different locations;
all SslProtocols avaiable;
VS and console dotnet run.
My windows is 8 x64. I am using 4747 tcp port.

UPD: when i am trying UseConnectionLogging and Null Exception throw. It is strange behavior.
UPD: i tried different ports (and 443) and it is same exception.

What's in your Startup.cs? Can you upload the app (or a stripped down version of it) somewhere so we can try to reproduce the issue?

@Ph47 Does HTTPS work for you when you run the KestrelSampleApp?
If you can't provide use with a full repro, since this is an issue with the handshake, maybe you dould take a look at the connection with message analyzer or something similar?

Sample work well.
Purified project what runs and work not very well:
WebApp.zip
I am going to Troubleshooting TLS.

I found one strange behavior. Copypasting test config into my project:
.UseKestrel(options =>
                {
                    // options.ThreadCount = 4;
                    options.NoDelay = true;
                    options.UseHttps(httpsCert);
                    options.UseConnectionLogging();
                })

breaks with exception from DI "Value can not be null" at UseConnectionLogging.
This means there are differences in the projects that I have not noticed.

@Ph47 we have an issue with Autofac and Kestrel in RC2.

I just figured it out. There are ways to get around?

My SSL problem depends on this. Revert to standart DI solve primary problem. Link Autofac issue please.

https://github.com/autofac/Autofac/issues/755

My workaround while issue in Autofac discussed listed below:
#region Autofac integration
   ContainerBuilder servicesUpdateBuilder = new ContainerBuilder();
   servicesUpdateBuilder.Populate(services.Reverse());
   servicesUpdateBuilder.Update(Container);
   return Container.Resolve<IServiceProvider>();
#endregion

https://msdn.microsoft.com/en-us/library/bb358497(v=vs.100).aspx

Dividing all DI registration into two flow (dotnet and others include my owns) and merging them at very end of registration process with inversion what i posted before temporary solve problem until Autofac updates.

@cesarbs Could you investigate please?

@halter73 and @mikeharder have some ideas about this one.

@Ph47 I took a look at WebApp.zip, and I think I found the remaining problem. You populate Container twice with services from the IServiceCollection. Once in the "Autofac DI" region where you call builder.Populate(services.Reverse()); and then builder.Update(Containter). You then make the same two calls in the "Autofac integration" region, but with servicesUpdateBuilder instead of builder.
This causes your UseKestrel() callback gets invoked twice (Options callbacks are wrapped by a service and registered with DI) which in turn options.UseHttps(...) to also be called twice. The end result is that Kestrel attempting to double decrypt/encrypt leading to the exceptions you see an no response.
It's possible, but a little complicated, to try to catch this type of error a bit sooner so we can give a clearer error.
The lowest level we could probably catch this is inside of OptionsManager. If OptionsManager resolves multiple identical instances of IConfigureOptions<TOptions> that's almost surely a registration error. I think this is the best approach if we decide this double registration error is worth proactively identifying and reporting.
Alternatively, we could throw an error in the HttpsConnectionFilter if the previous IConnectionFilter is also an HttpsConnectionFilter. This wouldn't catch the issue if the UseKestrel() callback registers multiple filters (such as logging and HTTPS like our sample app does) or if now connection filters were used at all.
P.S. You might want to look into using IHostingEnvironment.ContentRootPath instead of Directory.GetCurrentDirectory() to find the cert file. This would probably require calling options.ApplicationServices.GetService<IHostingEnvironment>() in the UseKestrel() callback.


Minecart self propulsion

I really love the concept of this mod and want to put it in my packs. However, the fact that connecting 2 minecarts causes them to move without any assistance kind of breaks it for me. In addition to making it difficult to work with, it kind of messes up the balance a bit.
Any chance that behavior could be changed?

I'll see what I can do about it but it may need quite some work
On Wed, 28 Mar 2018 03:33 Danny<EMAIL_ADDRESS>wrote:

I really love the concept of this mod and want to put it in my packs.
However, the fact that connecting 2 minecarts causes them to move without
any assistance kind of breaks it for me. In addition to making it difficult
to work with, it kind of messes up the balance a bit.
Any chance that behavior could be changed?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jglrxavpok/Entity-Spring/issues/2, or mute the thread
https://github.com/notifications/unsubscribe-auth/AFLSsk3i5NsLcbDj7Hp9ChZBuw1NIMzaks5tiuhvgaJpZM4S94gC
.

Fixed in 2.0.0


Add command to go to last highlight

So that I don't have to follow and unfollow to see what someone else is looking at.

Maybe clicking on icon does this, and or adding a context menu.

Did this.


Homework 5 6

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Completed Homework 5 & 6
What did you learn from the changes you have made?
Update, Insert and Alter
Cross join, self join
CTE and sub-queries
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Use of update for updating the qty can be easily done using left join. I tried both and both worked well.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Last question was quite time taking to understand and solve.
First question wording was not clear, what does 5 means here ? Does it mean each customer will perform 5 transactions ? Price was not mentioned in the question, I assumed it as the latest price from inventory table.
How were these changes tested?
I performed select * after every step to confirm the results look fine.
Estimation of number of rows was also helpful
A reference to a related issue in your repository (if applicable)
Checklist

[x] I can confirm that my changes are working as intended

You have unfortunately made a pull request to the wrong repo. You shouldn't be making a pull request to uoft-dsi/sql, but rather your own forked sql repo. Please read the instructions on your onboarding Assignment Submission Guide more carefully.


feat: Vite

Closes https://github.com/iotaledger/firefly/issues/7517
Replace Webpack with Vite
I thought I would be able to first replace the frontend, and then in another PR, do the electron code, but that's not really possible as webpack is hooked in both places, so I just went all in and replaced it in both places
Maybe I'll also replace jest with vitest

Not worth migrating as of now. Rollup is very slow, slower than webpack. Perhaps, when Vite's rolldown comes out, we can try again.


EXPLAIN SQL statement docs

Doc for EXPLAIN.
@RaduBerinde –– Can I get more detail about the Element column in EXPLAIN (TYPE) and the Ordering column of EXPLAIN (VERBOSE)? And if I could get you to do an overall review, that would be great, as well, because I'm just inferring a lot of this.
Closes #430

This change is

I'm not sure what's the best way to explain these to a user - they're mostly of use to developers. We should say that they are mostly of use to developers aware of internal implementation details (even if we do explain briefly what they mean).
The Ordering describes a known ordering of the rows at that particular level. For example if we read from a table, we know the rows are ordered according to the primary key columns. An ordering is described as a list of columns and directions (a - indicates descending) similar to the list of columns in an ORDER BY statement.
CC @knz for Element in EXPLAIN (TYPE)

Review status: 0 of 3 files reviewed at latest revision, 4 unresolved discussions.

explain.md, line 9 at r1 (raw file):

The `EXPLAIN` [statement](sql-statements.html) provides debugging and analysis details for `DELETE`, `INSERT`, `SELECT` or `UPDATE` statements.

For example, you might want to explain the a `SELECT` statement's plan to ensure it has [an efficient index to use](indexes.html#selection).

remove "the". And "ensure it uses an [efficient index]"

explain.md, line 11 at r1 (raw file):

For example, you might want to explain the a `SELECT` statement's plan to ensure it has [an efficient index to use](indexes.html#selection).

{{site.data.alerts.callout_info}}Explained statements are not executed.{{site.data.alerts.end}}

EXPLAIN (TRACE) is executed

explain.md, line 27 at r1 (raw file):

| Parameter | Description |
|-----------|-------------|
| `PLAN` | *(Default)* Explain the indexes or number of columns the statement uses in the **Description** column.

Also includes **Level** and **Type** columns |

I would say "Explain the execution plan, which includes the indexes and table columns used".

explain.md, line 28 at r1 (raw file):

|-----------|-------------|
| `PLAN` | *(Default)* Explain the indexes or number of columns the statement uses in the **Description** column.

Also includes **Level** and **Type** columns |
| `TYPES` | Explain the columns and values the statement uses in the **Description** column

Also includes the **Level**, **Type**, and **Element** columns. |

Could say "Similar to PLAN, but adds extra detail on types" (and perhaps point to the typing system blog post https://www.cockroachlabs.com/blog/revisiting-sql-typing-in-cockroachdb/)

Comments from Reviewable

Review status: 0 of 3 files reviewed at latest revision, 8 unresolved discussions.

explain.md, line 11 at r1 (raw file):
Previously, RaduBerinde wrote…
> `EXPLAIN (TRACE)` is executed

I'd actually recommend we do not document EXPLAIN(TRACE) and instead put a notice "there is also a feature called EXPLAIN(TRACE) which is meant for troubleshooting during development. We reserve the right to change this feature at any time without advance notice."
(It's even possibly disappearing soon, Andrei has been cooking a replacement)

explain.md, line 38 at r1 (raw file):

| Column | Description |
|--------|-------------|
| **Level** | The order in which the operations are performed, starting at the highest number and decrementing to 0 |

This is not what the level is. The execution plan is actually a tree of nodes (not "operations"). However because a tree does not fit in a table, we try to "encode" it in the following way: the root is at level 0; then all the nodes with the root as ancestor are at level 1, and so on. The children of a node at level 1 are directly below the level 1 node, with level 2, before the next node at level 1 (and its own children).
So for example you could see:
0 root
1 child1
2 granchild1
2 granchild2
1 child2
2 granchild3
2 granchild4

explain.md, line 39 at r1 (raw file):

|--------|-------------|
| **Level** | The order in which the operations are performed, starting at the highest number and decrementing to 0 |
| **Type** | The operation's type, for example `scan` for finding values in tables |

The node type, for example ...

explain.md, line 40 at r1 (raw file):

| **Level** | The order in which the operations are performed, starting at the highest number and decrementing to 0 |
| **Type** | The operation's type, for example `scan` for finding values in tables |
| **Element** | ¯\\\_(ツ)\_/¯ |

"Element" is a variable/attribute inside the node which determines how it performs its computation.

explain.md, line 43 at r1 (raw file):

| **Description** | See the [parameters table above](#parameters) for explanation of the **Description** column |
| **Columns** | A comma-separated list of columns or values the operation uses |
| **Ordering** | ¯\\\_(ツ)\_/¯ |

This indicates which columns are used to order the results by this node, if any.

Comments from Reviewable

Closing PR because this needs substantial rework


Use Jest test runner

As discussed in #272 , this is a variation of a terrific idea from @tejasbubane .
It greatly simplifies our scaffolding around this project.  My goals were:

Replace Jasmine, Gulp, and Babel with Jest and Babel-Jest.
Retain eslint for linting support

As suggested by @rchavarria, the babel config is in the package.json file.  I was also able to move the eslint config here as well.
I had one issue with an array matcher in the "Palindrome Products" exercise that was not behaving, so I had to add some JS functions to specfile to get the desired test results.
This is a big PR in appearance, but mostly removes some existing scaffolding.  The changes are conceptually small but are duplicated many times.
UPDATE: I realized I missed changing two of the /doc files, so I have updated those.

I wonder what the issue with palindrome-products is since jest also has the array toContain matcher.

@tejasbubane I don't know either why the matcher isn't working.  It looks like the Jest version of the matcher does not handle nested arrays, EG it doesn't see [ [3, 3], [1, 9]] as containing [3, 3].  I had to unpack both arrays and compare them element by element.

One more commit to copy the new package.json file with jest --watch to all the exercise dirs.

Awesome! Awesome! Awesome! Many, many thanks for this great work!!!


Unable to Delete Notes by IDs, Need to Investigate ID Storage

Problem:
Our current note deletion process relies on tracking notes by names, lacking a mechanism for efficient deletion using associated IDs. This limitation hinders precise note management. Notes are currently stored and identified solely by names, restricting our system's flexibility.
Suggested Approach:
To enable note deletion by IDs, we must first identify and modify the storage mechanism for note IDs. Investigate the codebase to understand how IDs are generated and stored. Implement a system to track notes by both names and IDs, ensuring this modification does not compromise existing functionalities. Integrate a mechanism for deleting notes using their associated IDs, validating the process to ensure seamless functionality.
Expected Outcome:
Upon successful implementation, users should seamlessly delete notes using their IDs, providing a more flexible and robust note management system. It is essential to conduct comprehensive testing to identify and address potential issues, document changes for future reference, and set a deadline for completing this investigation and implementation. Assign relevant team members for efficient resolution and implementation.

Issue has been resolved.
Note Entity Fix
I added the functionality for the setID and getID methods throughout the Note entity files. The attribute was there, but we had note actually implemented it yet.
DAO Fix
I added functions to the NoteDataAccessObject which enabled us to actually work with the note ID.


chore: add missing categories to Next.js

They are not listed in https://www.wappalyzer.com/technologies/static-site-generator/

Thanks! The aim is to have one or two main categories, let me know which ones you think we should use.


Efficient (de)serialization of gluon values from Rust

Hi there.
I'm considering Gluon as the primary embedded language in a event sourcing server.
Users would define event types and projections (basically a fold over events) in Gluon.
These would be received by the server in some format, passed to Gluon code where validation and folding would happen. Then these types would have to be serialized to some format like bincode for persisting them in some underlying storage.
So, to clarify, an example flow:

server receives data in a serialization format (json, bincode, ...)
data is deserialized to types defined by gluon code
Gluon code works with the data and potentially produces new data
The resulting data is then serialized by Rust code and stored somewhere

Is there a way to do this reasonably efficiently?
Is there any kind of integration between Gluon and serde?
Or are there any other suggestions on how to handle this?

Depending on the specific needs here this might all work already or may take a bit of work to get working nicely.
If you know the shape of the data you take as input and output well enough to define rust structs for it then there shouldn't be any issue going serialization format -> rust struct -> gluon value -> rust struct -> serialization format  (HashMaps don't work out of the box though #514 ).
If the shape is dynamic I have just added JSON support which works fairly well #586. Other self-describing could be added without much work as well but non-self describing formats like bincode won't work out of the box.

Is there a way to do this reasonably efficiently?

So it depends, there is an intermediate layer for JSON right now but it is something I'd like to eliminate (where it is possible). It could be rather complicated however so it could take some time to get done.

Is there any kind of integration between Gluon and serde?

There is an integration to serialize gluon values to and from self-describing formats using serde at https://github.com/gluon-lang/gluon/blob/master/vm/src/api/ser.rs and https://github.com/gluon-lang/gluon/blob/master/vm/src/api/de.rs . However this API is only usable from Rust (not pure gluon) as it needs to deal with gluon types.

Is it currently possible to create gluon Json value from rust?
My goal is to pass serde_json::Value to gluon, without to_string and deserialize steps.


Added websocket and OHLC converter

New update :)

Looking much better now :) I still think moving the 'get product list' functionality out of websocket would be worthwhile. Would also be nice to see the ohlc adaptor used in the chart (if it isn't already?)

I still think moving the 'get product list' functionality out of websocket would be worthwhile

Agreed - I'll create an issue for this.

Would also be nice to see the ohlc adaptor used in the chart (if it isn't already?)

Definitely - I'll add an issue for this too :)

See #77


cdogs-sdl: 0.11.1 -> 0.12.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/cdogs/versions.
meta.description for cdogs-sdl is: "Open source classic overhead run-and-gun game"
meta.homepage for cdogs-sdl is: "https://cxong.github.io/cdogs-sdl"
meta.changelog for cdogs-sdl is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS

The tests defined in passthru.tests, if any, passed

/nix/store/h5z8qn3in7pfvl2lcjcy6xfghaq3gx89-cdogs-0.12.0/bin/cdogs-sdl passed the binary check.

/nix/store/h5z8qn3in7pfvl2lcjcy6xfghaq3gx89-cdogs-0.12.0/bin/cdogs-sdl-editor passed the binary check.

1 of 2 passed binary check by having a zero exit code.

2 of 2 passed binary check by having the new version present in output.

found 0.12.0 with grep in /nix/store/h5z8qn3in7pfvl2lcjcy6xfghaq3gx89-cdogs-0.12.0

found 0.12.0 in filename of file in /nix/store/h5z8qn3in7pfvl2lcjcy6xfghaq3gx89-cdogs-0.12.0

directory tree listing: https://gist.github.com/b5531cae60f8d4b9fc3ab2215c3e326b

du listing: https://gist.github.com/389d7b3378943788c98748a877e9cbc7

Rebuild report (if merged into master) (click to expand)

4 total rebuild path(s)

1 package rebuild(s)

1 x86_64-linux rebuild(s)
1 i686-linux rebuild(s)
1 x86_64-darwin rebuild(s)
1 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
cdogs-sdl

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/h5z8qn3in7pfvl2lcjcy6xfghaq3gx89-cdogs-0.12.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A cdogs-sdl https://github.com/r-ryantm/nixpkgs/archive/51f861a25c2d80c955dc3139da31a3aef2f9d03b.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/h5z8qn3in7pfvl2lcjcy6xfghaq3gx89-cdogs-0.12.0
ls -la /nix/store/h5z8qn3in7pfvl2lcjcy6xfghaq3gx89-cdogs-0.12.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

cdogs-sdl

Maintainer pings
cc @nixinator for testing.

LGTM!


Education Profile

Added implementation for user to add education / school
Utilized an API from a GitHub repo: https://github.com/Hipo/university-domains-list
Slightly changed the profile schema to include school
Created a new search query for education

Testing something.


Failed scaling request cause duplicate entries of result in scalingAction.log

Please see weblogic-kubernetes-operator-master/src/scripts/scaling/scalingAction.sh
...
if [ $? -ne 0 ]
then
echo "Failed scaling request to WebLogic Operator" >> scalingAction.log
echo $result >> scalingAction.log
exit 1
fi
echo $result >> scalingAction.log

Missed: exit 1


Setting terminal path via terminal.integrated.env.osx has paths backwards

I set this:
	"terminal.integrated.env.osx": {
		"PATH": "/fake/path:${env:PATH}"
	}

Then in the terminal I ran echo $PATH and it output this:
dantup-macbookpro:flutter_hello_world dantup$ echo $PATH
/usr/local/git/current/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:~/Dev/dart-sdk/latest/bin:/fake/path

I put my new path on the front, yet it ended up on the end. Note: the existing paths are set in /etc/path and /etc/path.d and not added in a terminal script running at startup so I don't think it's just that the other ones are being prepended (and it seems unlikely path would have 0 items in it to start, and I'd expect to see a trailing colon if that was the case).

@DanTup does your .bashrc/.bash_profile scripts manipulate $PATH? I can't reproduce this and it looks like it could be because of those scripts (which is as designed as they're run after terminal init).

@Tyriar I don't have any path manipulation in any bash files (I set all my paths in /etc/path.d files because otherwise they only apply to the terminal). I can reproduce on both my MacBooks.

So I'm still guessing somehow your environment is doing it. Does it repro on any other machines for you?

I've only tried two, but it repros on them both - a MacBook (personal) and MacBook Pro (Google corp). So my guess is whatever it is is fairly common. I tried spawning bash from within bash to see if there was anything weird happening, but this outputs my PATH normally:
bash --login -c 'echo "$PATH"'
(though I don't know I've done it right)
What's bootstrap in your code?

but this outputs my PATH normally

As in the order you expect?

What's bootstrap in your code?

Sets up module importing and logging basically, I don't think it modifies the environment.

Correct, they where in the order I expected. That said, I don't know exactly what you're doing to spawn the terminal versus what I wrote there - is there a way to tell exactly what you're invoking to actually create the terminal? If I can repro this issue outside of Code, I might be able to figure it out.
(Also, do you have easy access to a Mac to test whether it's just me? Seems weird that it happens on two of them with completely stock shells and almost nothing in any startup scripts).

Probably unrelated, but I've opened another issue where PATH seems to be totally messed up on Travis during test runs (the changes are significant; I can't figure it out - my guess is there's something in some login scripts on Travis that maybe Code is causing to run again):
https://github.com/Microsoft/vscode-extension-vscode/issues/104
I don't think it's related (that's not related to Terminals) but thought it maybe worth mentioning!

@DanTup this is what happens on my mac:

Which is expected as everything to the left of /fake/path is set in the init scripts. You could try this to prevent bashrc/bash_profile from running:
  "terminal.integrated.shellArgs.osx": [
    "--noprofile",
    "--norc"
  ],
  "terminal.integrated.env.osx": {
    "PATH": "/fake/path:${env:PATH}"
  }

In my case this is what I see then:

Ok, I got a weird prompt asking for permission when I added them and spawned a terminal, but it did solve the issue - the path is now as expected.
I can't explain what's causing this though - my .bash_profile is practically empty and I don't have any other files I could imagine messing with path:

On one MacBook I added things to my path by editing /etc/path and on the other one I put files in to /etc.path.d/google (though it already has a /etc/path), so maybe whatever processes them does weird things, but I'm not sure why you don't see it. Something re-ordering PATH seems like an pretty broken thing to do :-/

Not sure what's causing it, but I think I've proven the problem is on your side :smile:

@Tyriar Maybe, but I'm certain I don't have anything others may not, so I don't think this issue is isolated to me.
Are you able to confirm exactly what commands/args you're using to spawn this, so I can try and repro outside of Code to figure out what's going on?

You can follow the code through if you want:
https://github.com/Microsoft/vscode/blob/da9720b39b1a912ce8009587731d824a890797ad/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts#L683
https://github.com/Microsoft/vscode/blob/da9720b39b1a912ce8009587731d824a890797ad/src/vs/workbench/parts/terminal/node/terminalProcess.ts
https://github.com/Tyriar/node-pty/blob/5868fd9da4150c73d9661119bed4e5e79d5866db/src/unixTerminal.ts#L45
https://github.com/Tyriar/node-pty/blob/5868fd9da4150c73d9661119bed4e5e79d5866db/src/unix/pty.cc#L139


Allow the default VM nic to be adjusted for all ACM/ZTP manifests and…

… set it to enp1s0

cc @tingxueca Could you give it a try.


Compare at price logic

What are you trying to accomplish with this PR?
Fixes https://github.com/Shopify/slate/issues/96

Always render markup for compare at price, so JS can update it.
On featured product page, use current_variant information so the initial prices displayed reflect the option selectors.

New stuff:
The changes in product.js have to do with how we are handling compare_at information when the variant is on sale.  We are always leaving the "compare_at" text on screen for screenreaders, even when we were hiding the sale price. Now it hides that text if the variant isn't on sale.
I also update the strikethrough price when the variant isn't on sale.  It was already being hidden with the hide class, but it just felt odd to leave a strikethrough price in the markup if we had no intention of using it.
/cc @Shopify/themes-fed
Checklist
For contributors:

[ ] I have updated the docs to reflect these changes, if applicable.

For maintainers:

[ ] I have :tophat:'d these changes.
[ ] I have bumped the package.json version in a separate PR, if applicable.

Same approach approved here: https://github.com/Shopify/narrative/pull/114


Printer demo needs a little further help

With the printer demo, it seems if you try to print just a fixed string like "hello world" instead of a line read from Serial, the program crashes, because PrinterOut is a null pointer.
I guess some extra logic is needed to check for PrinterOut being null, and it would be most instructive and helpful if you could add this.
Or perhaps a better approach would use some callback to tell when the printer is ready to accept data?

With the printer demo, it seems if you try to print just a fixed string like "hello world" instead of a line read from Serial, the program crashes, because PrinterOut is a null pointer.

PrintOut is initialized as follows so is not NULL.
    err = usb_host_transfer_alloc(endpoint->wMaxPacketSize*PRINTER_OUT_BUFFERS, 0, &PrinterOut);
    if (err != ESP_OK) {
      PrinterOut = NULL;
      Dbg_printf("usb_host_transfer_alloc Out fail: %x", err);
      return;
    }

The following is a an older version of the program that prints "Hello" instead of reading from terminal.

"The following" seems to be missing...
Maybe there is a race condition?
I was trying this on an ESP32S3 and v 3.0.2 of the Arduino ESP32 package.
If I use this modification of the loop, printing basically works, but if I leave out the test for PrinterOut being Null, the program just crashes with an illegal memory access exception and restarts, over and over again.
`int times = 0;
void loop()
{
usbh_task();
if ( (PrinterOut != NULL) && (times < 5) ) {
String aLine = String(times)+"\n";  // Read line ending with newline
Serial.printf("%d\n",times);
// readStringUntil removes the newline so add it back
PrinterOut->num_bytes = aLine.length();
memcpy(PrinterOut->data_buffer, aLine.c_str(), PrinterOut->num_bytes);
esp_err_t err = usb_host_transfer_submit(PrinterOut);
if (err != ESP_OK) {
ESP_LOGI("", "usb_host_transfer_submit Out fail: %x", err);
}
times++;
}
}
`

This is the older version that just prints hello.
https://github.com/touchgadget/esp32-usb-host-demos/blob/ce8088f4dd3fbf12a8e81b16ee273ae8c30cbc27/examples/usbhprinter/usbhprinter.ino

I note that older version also has a test (PrinterOut != NULL) in it. My example is pretty much the same, except that it prints several lines using a counter, rather than a Boolean flag. If you remove the test for PrinterOut being Null, your old program also crashes.
It seems that, from start up, it takes a time for PrinterOut to become non-Null, and essentially, we must wait for this before trying to print.


bgpv1: Remove inappropriate comments and fix typo

At the end of the PolicySelection function, it would normally return the selected policy. The comments here are not appropriate and are misleading.
Additionally, a typo in another comments has been fixed.

/test

/test

/test