Apply errorConcept pattern to core-command REST Handler

Fixes #1860, supercedes #1890.
This PR contains a large refactor for core command. This PR's functionality should be verified as well as ensuring there are no regressions from the previous code.

Codecov Report

Merging #1972 into master will decrease coverage by 0.05%.
The diff coverage is 7.77%.

@@            Coverage Diff             @@
##           master    #1972      +/-   ##
==========================================
- Coverage   44.09%   44.04%   -0.06%
==========================================
  Files         186      186
  Lines       11649    11633      -16
==========================================
- Hits         5137     5124      -13
+ Misses       6216     6213       -3
  Partials      296      296

Impacted Files
Coverage Δ

internal/core/command/restDevice.go
0% <0%> (ø)
:arrow_up:

internal/core/command/device.go
33.33% <25.92%> (+2.02%)
: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 f335fca...5a798b8. Read the comment docs.

@michaelestrin I'm also seeing those four device-error failures in master. It seems like it wants the device to be missing in the database, but it's hanging up on the device being locked.
I believe I have addressed the device failures, however.

@brandonforster - still a Fuji release item?  Label Geneva?

@brandonforster - still a Fuji release item?  Label Geneva?

@jpwhitemn This is ready to go, but it's my understanding that it's low priority and review resources are needed elsewhere to manage high priority Fuji deliverables.

@jbonafide623 please do an initial review today and comment your findings.  Do not approve.

@brandonforster please rebase.

@jbonafide623 @michaelestrin Responding to all your comments in one block, I agree there's some more work that can be done here to do this right and not just have it be done, especially now that it's a Geneva item. I'm going to close the issue I was working under and create a new issue to capture this refactor effort, and we can possibly explore breaking that out into subtasks with this branch forming a basis for that work, or if we want to pivot this branch can be informing that work.


Code samples are not shown for operations without body param

Reported by @cayter in #15

@cayter fixed in the last release

Thanks a lot man.


eslinting

First shot at replacing jshint with eslint, plus enabling a couple of stylistic rules. Biggest changes so far:

quotes should always be ' rather than "
function expressions should always be named, helps aaaalot with stacktraces (+ profiling)

Theres a ton of possible configuration: http://eslint.org/docs/rules/. Any thoughts about the changes so far and rules we should apply or not?
IMO we shouldnt be too strict about all the things by enabling alot of rules. Fun coding > enforcement hell.
Fixes #433

Will take a look to this asap, thanks! :)

There are some errors in Travis, could you check that out too?

Yupp, sorry about that! I changed / broke .eslintrc just before pushing, fixed it now

FYI: I'm currently investigating actual usage of node v0.6 in the wild too justify using time debugging these breakages on Travis. There's very few module authors who still supports v0.6 which is understandable as it's quite painful atm.

node developers would yell at us if we go on officially supporting v0.6.

LGTM. I just have that doubt about the repeated eslint rule.
I don't mind dropping support for v0.6 in case it's too cumbersome to solve the test issues, but I'm interested in knowing the reason, tbh.

Great job @phillipj!

The issue with v0.6 was not the results of eslint, but running it caused an error from one of eslint dependencies.
LGTM! I drop 0.6 on .travis.yml and I merge this.

Thanks @dasilvacontin! I'll do some more v0.6 cleanup aswell


Regarding ApproxQuantile

Can you please tell me what is the purpose of  "ApproxQuantile"? I could not find it in sklearn implementation of the iForest algorithm. Also, I can't find (or I may have missed) it in the paper. the value of ApproxQuantile was giving GCoverhead error in my large dataset (130 millions of examples). Now I set it to 0.5, and it was running successfully. But I am confused what happens for setting the value to 0.5? Can you please tell?

You can set this param approxQuantileRelativeError, which is the Relative Error for Approximate Quantile Calculation (0 <= value <= 1), default is 0 for calculating the exact value, which would be expensive for large datasets.

Furthermore, ApproxQuantile is used to calculating the threshold of anomaly score for finding anomaly points according to the given param contamination. Regarding ApproxQuantile function, you can find more detail in the spark api doc:
https://spark.apache.org/docs/latest/api/python/_modules/pyspark/sql/dataframe.html#DataFrame.approxQuantile

Hi, thanks for your reply. I am still bit confused.
Suppose, the contamination value is 0.1 . In this case, what could be the best value for ApproxQuantile ?

It depends on what the relative error of the quantile value you can accept. The smaller the relative error is, the more expensive and more memory required for calculation. You can try with different values from small to large, so that it can fit your memory consume.

Thanks a lot.


Component System #2

Remove all garbage, like unwanted c-aliases
Remove thread object receiver class
Move object alias storage to the static class, from variable
Setup component creating/freeing events to work correctly (set, unset)

it's not gonna work


refaktor logic where signal for detecting player laser hit an enemy

at the moment the logic for what a players laser hit is in the player/laser.gd script.
If we want to play animations when enemy dies we might have to refactor this code or add logic so that we can keep track of an enemy got hit and if the health is 0 they should play death animation + sound and be deleted from the scene

soplved by triggering animations from laser schene


Do not modify the outbound event.

Do not assume json for empty content encoding. Preserve empty content encoding.
This adds but does not yet use a nop data encoder.
Fixes to tests to allow for non-defaulted app/json to be assumed.
Before doing these changes I touched the base64 encoding code. It is not quite finished.
fixes: https://github.com/cloudevents/sdk-go/issues/217
relates to https://github.com/cloudevents/sdk-go/issues/222

LGTM - this is moving us forward, we can raise new issues for outstanding work.


ABRT -6 when face_unlock is a subprocess

This is mysterious and going to cost a lot of time to try and solve. So currently face_unlock.py listens to mqtt as a separate looped process. Not terribly elegant and needs a bit more work, however no -6.

Now implemented on thinkpad as systemctl service.


[WIP] Magnetostriction

Hi everyone,
I have created this PR in order to introduce some improvements we have made while working on the new magnetostriction feature #299 (which is still Work In Progress).

I have finally worked on the issue #219
Some improvement for the issue #218 : I have introduced new methods, and the code can now work with indices which are not starting "linspacely" from 0 (either for nodes or cells).
The issue #225 is solved.

Best regards,
Raphaël

Thank you for your contribution :)


Use plugins and settings files for dairycart

resolves #62
resolves #25

Coverage decreased (-8.8%) to 90.535% when pulling 86ed5df545441fb59439135a2ccc88f13738f0ee on 62-database-separation into bb62c0609ad971437a6487f059ac5f9a8731f7fc on master.


earthly: add missing buildFlags and tags

Motivation for this change
Things done
closes #125463
@NobbZ  can you test this since i haven't used earthly

[X] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[X] Tested execution of all binary files (usually in ./result/bin/)
[ ] Added a release notes entry if the change is major or breaking
[X] Fits CONTRIBUTING.md.

This does not work yet, I have an idea why, but can only check when at home and kids are sleeping.
If someone else has time and opportunity to dig into this, please remove the quotes around the image name, rebuild and run an arbitrary example image.
Even earthly +foo should "work". It is fine if it doesn't error because of an invalid reference format.
Just paste error here.

works now
earthly github.com/earthly/hello-world:main+hello
           buildkitd | Starting buildkit daemon as a docker container (earthly-buildkitd)...
      buildkitd-pull | Pulling buildkitd image...
      buildkitd-pull | ...Done
           buildkitd | ...Done
             ongoing | internal (5 seconds ago)
             context | --> git context github.com/earthly/hello-world:main+hello
      busybox:1.32.0 | --> Load metadata linux/amd64
g/e/hello-world:main+base | --> FROM busybox:1.32.0
g/e/hello-world:main+base | [          ] resolve docker.io/library/busybox:1.32.0@sha256:bde48e1751173b709090c2539fdf12d6ba64e88ec7a4301591227ce925f3c678 ... 0%         [██████████] resolve docker.io/library/busybox:1.32.0@sha256:bde48e1751173b709090c2539fdf12d6ba64e88ec7a4301591227ce925f3c678 ... 100%
g/e/hello-world:main+base | [██████████] sha256:ea97eb0eb3ec0bbe00d90be500431050af63c31dc0706c2e8fb53e16cff7761f ... 100%
g/e/hello-world:main+base | [██████████] extracting sha256:ea97eb0eb3ec0bbe00d90be500431050af63c31dc0706c2e8fb53e16cff7761f ... 100%
g/e/hello-world:main+hello | --> RUN echo 'Hello, world!'
g/e/hello-world:main+hello | Hello, world!
              output | --> exporting outputs
              output | [██████████] sending tarballs ... 100%
=================================== SUCCESS ====================================

builds and and earthly github.com/earthly/hello-world:main+hello runs


[BUG] Inference predictions don't match Huggingface model's

Describe the bug
HF output:
[{'generated_text': 'DeepSpeed is the greatest force of nature. It is not only energy which, due to how well it creates energy, is very powerful. Some may say that the universe is only one such entity; others may claim that the cosmos is all a result'}]
Deepspeed output with mp size = 1,
[{'generated_text': "DeepSpeed is the greatest speed at which your avatar is at (not how fast you can reach or fall, but how far you can fall).\n\nOn iOS and Android, if the player has reached or fallen too far they won't fly."}]
To Reproduce
        modelname = "gpt2"
        pipe = pipeline("text-generation", model="gpt2", device=0, framework="pt")
        model = pipe.model
        if dtype == "fp16":
            pipe.model.half()

        query_text = "DeepSpeed is the greatest"

        torch.cuda.synchronize()
        start = time.time()
        hf_output = pipe(query_text)
        torch.cuda.synchronize()

        print("hf output", hf_output)

        import deepspeed
        pipe.model = deepspeed.init_inference(
            pipe.model,
            mp_size=1,
            dtype=torch.half,
            replace_method="auto",
            replace_with_kernel_inject=True,
        )

        torch.cuda.synchronize()
        start = time.time()
        ds_output = pipe(query_text)
        torch.cuda.synchronize()
        ds_time = time.time() - start

        print(hf_output, ds_output)

Expected behavior
Outputs expected to be the same
ds_report output
--------------------------------------------------
DeepSpeed C++/CUDA extension op report
--------------------------------------------------
NOTE: Ops not installed will be just-in-time (JIT) compiled at
      runtime if needed. Op compatibility means that your system
      meet the required dependencies to JIT install the op.
--------------------------------------------------
JIT compiled ops requires ninja
ninja .................. [OKAY]
--------------------------------------------------
op name ................ installed .. compatible
--------------------------------------------------
cpu_adam ............... [NO] ....... [OKAY]
cpu_adagrad ............ [NO] ....... [OKAY]
fused_adam ............. [NO] ....... [OKAY]
fused_lamb ............. [NO] ....... [OKAY]
 [WARNING]  please install triton==1.0.0 if you want to use sparse attention
sparse_attn ............ [NO] ....... [NO]
transformer ............ [NO] ....... [OKAY]
stochastic_transformer . [NO] ....... [OKAY]
 [WARNING]  async_io requires the dev libaio .so object and headers but these were not found.
 [WARNING]  async_io: please install the libaio-dev package with apt
 [WARNING]  If libaio is already installed (perhaps from source), try setting the CFLAGS and LDFLAGS environment variables to where it can be found.
async_io ............... [NO] ....... [NO]
utils .................. [NO] ....... [OKAY]
quantizer .............. [NO] ....... [OKAY]
transformer_inference .. [NO] ....... [OKAY]
--------------------------------------------------
DeepSpeed general environment info:
torch install path ............... ['/opt/conda/lib/python3.8/site-packages/torch']
torch version .................... 1.11.0+cu113
torch cuda version ............... 11.3
torch hip version ................ None
nvcc version ..................... 11.3
deepspeed install path ........... ['/opt/conda/lib/python3.8/site-packages/deepspeed']
deepspeed info ................... 0.7.0, unknown, unknown
deepspeed wheel compiled w. ...... torch 1.11, cuda 11.3

Screenshots
NA
System info (please complete the following information):

OS: [e.g. Ubuntu 18.04] Ubuntu
GPU count and types A100 GPU
Interconnects (if applicable) [e.g., two machines connected with 100 Gbps IB]  N/A
Python version 3.8.3
Any other relevant info about your setup

Launcher context
inference, single process
Docker context
Additional context
Add any other context about the problem here.

Even mp size 1 doesn't seem to match. Am I doing something wrong?

Why is that?
Besides even with do_sample=False, with MP size =2, predictions don't match
HF
Try without sampling the whole thing.\n\nThe first thing I did was to make a list of all the things I'd like to see in the game. I'd like to see what the game's strengths are, what its weaknesses are, what
Deepspeed
Try without sampling. of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of of in in in in in in

I believe this PR should fix the problem on multi-GPU system. Could you please try it on your end?
Thanks,
Reza

Yes this seems to work


Bug: Using cosign in gh actions with Azure KMS (KeyVault)  - Failed to refresh the Token: invalid_request

Description
Im getting an authentication error using cosign in GH actions with Azure KeyVault:
cosign sign --key  azurekms://MyKeyVault.vault.azure.net/MyKeyName myimage@digest
Error: public key: public key: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://***.vault.azure.net/keys/MyKeyName/?api-version=7.1: StatusCode=400 -- Original Error: adal: Refresh request failed. Status Code = '400'. Response body: {"error":"invalid_request","error_description":"Identity not found"} Endpoint http://<IP_ADDRESS>/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net
main.go:74: error during command execution: public key: public key: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://***.vault.azure.net/keys/MyKeyName/?api-version=7.1: StatusCode=400 -- Original Error: adal: Refresh request failed. Status Code = '400'. Response body: {"error":"invalid_request","error_description":"Identity not found"} Endpoint http://<IP_ADDRESS>/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net

The azure login works and I can also read the key via the az cli but it crashes when I use cosign.
Locally it is working without a problem. My workflow is this:
name: Docker-Build
on:
  push:

permissions:
  id-token: write
  contents: read
  packages: write

jobs:
  build:

    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Install cosign
        uses: sigstore/cosign-installer@v3

      - name: Setup Docker buildx
        uses: docker/setup-buildx-action@v2

      - name: Log into registry DockerHub
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.MY_DOCKERHUB_USER }}
          password: ${{ secrets.MY_DOCKERHUB_TOKEN }}

      - name: Log in with Azure
        uses: azure/login@v1
        with:
          client-id: ${{ secrets.AZURE_CLIENT_ID }}
          tenant-id: ${{ secrets.AZURE_TENANT_ID }}
          subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
          allow-no-subscriptions: true

      - name: Build and push Docker image
        id: build-and-push
        uses: docker/build-push-action@v4
        with:
          sbom: true
          tags: ${{ github.actor }}/myimage:${{ matrix.app }}-${{ github.ref_name }}

      - name: Sign the published Docker image
        run: |
          # Works
          az keyvault key list --id {{ secrets.COSIGN_KEY_STORE }}
          # Does not work
          cosign sign --key ${{ secrets.COSIGN_KEY_STORE }} ${{ github.actor }}/myimage@${{ steps.build-and-push.outputs.digest }}

Version
  ______   ______        _______. __    _______ .__   __.
 /      | /  __  \      /       ||  |  /  _____||  \ |  |
|  ,----'|  |  |  |    |   (----`|  | |  |  __  |   \|  |
|  |     |  |  |  |     \   \    |  | |  | |_ | |  . `  |
|  `----.|  `--'  | .----)   |   |  | |  |__| | |  |\   |
 \______| \______/  |_______/    |__|  \______| |__| \__|
cosign: A tool for Container Signing, Verification and Storage in an OCI registry.

GitVersion:    v2.0.2
GitCommit:     871448050b924a7946ebe47678f23aae09ef432d
GitTreeState:  clean
BuildDate:     2023-04-24T17:31:42Z
GoVersion:     go1.20.3
Compiler:      gc
Platform:      linux/amd64

I really dug deep into it but had no luck at first. I found this:  cosign-docs but I really wanted to use the password-less setup with Federated Identity Credentials via the AZ-CLI.
While look at sigstore/sigstore/blob/pkg/signature/kms/azure/client.go I found that cosign does indeed support AZ-CLI login but in order for that to work you have to set the env  AZURE_AUTH_METHOD=cli and this works.
So use:
      - name: Sign the published Docker image
        env:
          AZURE_AUTH_METHOD: cli
        run: |
          # Works
          az keyvault key list --id {{ secrets.COSIGN_KEY_STORE }}
          # Does not work
          cosign sign --key ${{ secrets.COSIGN_KEY_STORE }} ${{ github.actor }}/myimage@${{ steps.build-and-push.outputs.digest }}


Adding new team member via Spaceship fails due to 404 Not Found

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I read the Contribution Guidelines
[x] I read docs.fastlane.tools
[x] I searched for existing GitHub issues

Issue Description

Starting around July 7th, I've been unable to use Spaceship to add new members to my team. The attempt fails with the error "Not Found". Tracing has shown this is because the iTunesConnect endpoint ra/users/itc/create returns a 404 response.
 {
  :status=>404,
  :body=>{"data"=>nil, "messages"=>{"error"=>["Not Found"], "info"=>nil, "warn"=>nil}, "statusCode"=>"ERROR"},
  ...
}

(from calling Faraday::Response.to_hash)
Command executed

I've written an internal script that includes the following.
  # app store setup (SUCCESS)
  Spaceship::Tunes.login(username, password)
  Spaceship::Tunes.select_team(team_id: team_uuid)

  # send invite (FAILS)
  Spaceship::Tunes::Members.create!(firstname: options[:firstname], lastname: options[:lastname], email_address: options[:email_address], roles: roles)

It's Spaceship::Tunes::Members.create! that results in the 404 response failure.
Complete output when running fastlane, including the stack trace and command used

	2: from /Users/cniles/.gems/gems/fastlane-2.154.0/spaceship/lib/spaceship/tunes/members.rb:26:in `create!'
	1: from /Users/cniles/.gems/gems/fastlane-2.154.0/spaceship/lib/spaceship/tunes/tunes_client.rb:542:in `create_member!'
/Users/cniles/.gems/gems/fastlane-2.154.0/spaceship/lib/spaceship/tunes/tunes_client.rb:232:in `handle_itc_response': Not Found (Spaceship::Tunes::Error)

Environment

 ✅ fastlane environment ✅
Stack

Key
Value

OS
10.15.5

Ruby
2.6.3

Bundler?
true

Installation Source
~/.gems/bin/fastlane

Host
Mac OS X 10.15.5 (19F101)

Ruby Lib Dir
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib

OpenSSL Version
LibreSSL 2.8.3

Is contained
false

Is homebrew
false

Is installed via Fabric.app
false

Xcode Path
/Applications/Xcode.app/Contents/Developer/

Xcode Version
11.5

System Locale

Variable
Value

LANG
en_US.UTF-8
✅

LC_ALL

LANGUAGE

fastlane files:
No Fastfile found
No Appfile found
fastlane gems

Gem
Version
Update-Status

fastlane
2.154.0
✅ Up-To-Date

Loaded fastlane plugins:
No plugins Loaded
Loaded gems

Gem
Version

slack-notifier
2.3.2

atomos
0.1.3

CFPropertyList
3.0.2

claide
1.0.3

colored2
3.1.2

nanaimo
0.3.0

xcodeproj
1.17.1

rouge
2.0.7

xcpretty
0.3.0

terminal-notifier
2.0.0

unicode-display_width
1.7.0

terminal-table
1.8.0

plist
3.5.0

public_suffix
4.0.5

addressable
2.7.0

multipart-post
2.0.0

word_wrap
1.0.0

tty-screen
0.8.1

tty-cursor
0.7.1

tty-spinner
0.9.3

babosa
1.0.3

colored
1.2

highline
1.7.10

commander-fastlane
4.4.6

excon
0.76.0

faraday
1.0.1

unf_ext
<IP_ADDRESS>

unf
0.1.4

domain_name
0.5.20190701

http-cookie
1.0.3

faraday-cookie_jar
0.0.6

faraday_middleware
1.0.0

fastimage
2.2.0

gh_inspector
1.1.3

mini_magick
4.10.1

rubyzip
2.3.0

security
0.1.3

xcpretty-travis-formatter
1.0.0

dotenv
2.7.6

bundler
1.17.2

naturally
2.2.0

simctl
1.6.8

jwt
2.2.1

uber
0.1.0

declarative
0.0.20

declarative-option
0.1.0

representable
3.0.4

retriable
3.1.2

mini_mime
1.0.2

multi_json
1.15.0

signet
0.14.0

memoist
0.16.2

os
1.1.1

googleauth
0.13.1

httpclient
2.8.3

google-api-client
0.38.0

google-cloud-env
1.3.3

google-cloud-errors
1.0.1

google-cloud-core
1.5.0

rake
13.0.1

digest-crc
0.6.1

google-cloud-storage
1.27.0

emoji_regex
3.0.0

jmespath
1.4.0

aws-partitions
1.351.0

aws-eventstream
1.1.0

aws-sigv4
1.2.1

aws-sdk-core
3.104.3

aws-sdk-kms
1.36.0

aws-sdk-s3
1.75.0

json
2.3.1

forwardable
1.2.0

logger
1.3.0

stringio
0.0.2

ipaddr
1.2.2

openssl
2.1.2

ostruct
0.1.0

strscan
1.0.0

date
2.0.0

fileutils
1.1.0

etc
1.0.1

io-console
0.4.7

zlib
1.0.0

rexml
3.1.9

psych
3.1.0

mutex_m
0.1.0

webrick
1.4.2

generated on: 2020-08-04

This is probably related to all the changes Apple is doing to App Store Connect with the "new" API. Not sure if @joshdholtz already migrated the Members endpoint. 😅

Hmmmm, doesn't look like I did yet 🤔 I will add that today 🙃

🙏 for looking into this so quickly. I'll happily help verify the fix when it's ready.

@fastlane-bot it appears this issue hasn't been resolved.

https://github.com/max-ott/fastlane/commit/7fa72df295866c4c8d7c5cadffcb47ac22eac405 adds support from adding & removing users. Will try to get this merged with the next release. cc @joshdholtz

This was fixed and merged in https://github.com/fastlane/fastlane/pull/17315. This should be out in the next fastlane version this week!


JBDS-4223 [WIP] Promisify installer.detectExistingInstall() metjhods

Codecov Report

Merging #571 into master will decrease coverage by -0.48%.
The diff coverage is 93.93%.

@@            Coverage Diff             @@
##           master     #571      +/-   ##
==========================================
- Coverage   83.59%   83.11%   -0.48%
==========================================
  Files          25       25
  Lines        2377     2505     +128
  Branches      215      214       -1
==========================================
+ Hits         1987     2082      +95
- Misses        390      423      +33

Impacted Files
Coverage Δ

browser/model/cygwin.js
100% <100%> (ø)
:white_check_mark:

browser/pages/confirm/controller.js
58.5% <50%> (-14.36%)
:x:

browser/services/platform.js
87.9% <ø> (-1.58%)
:x:

browser/directives/breadcrumb.js
10% <ø> (-1.12%)
:x:

browser/services/request.js
20% <ø> (-0.84%)
:x:

browser/model/installable-item.js
97.51% <ø> (-0.39%)
:x:

browser/directives/pathValidator.js
82.97% <ø> (-0.36%)
:x:

browser/model/cdk.js
67.77% <ø> (-0.04%)
:x:

browser/pages/start/controller.js
44.79% <ø> (-0.04%)
:x:

... and 15 more

Continue to review full report at Codecov.

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


Callback broken by commenting an (unused) import of Button (variation of #3855)

This is a variation of #3855, please have a look into the description there.
This issue starts, where #3855 ended: the callback worked only once, and then not any more.
When I comment the (unused) import of Button in importtest.py, the callback is completely broken, it does not work even once.
# importtest.py - version 2
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
# from kivy.uix.button import Button
from kivy.uix.dropdown import DropDown
from kivy.uix.treeview import TreeView

if __name__ != '__main__':
    Builder.load_file('importtest.kv')

class MyTreeView(TreeView):
    def __init__(self, **kwargs):
        super(MyTreeView, self).__init__(**kwargs)

class ImportTest(BoxLayout):
    def __init__(self, **kwargs):
        super(ImportTest, self).__init__(**kwargs)
        self.treeview = MyTreeView()

class ImportTestApp(App):
    def build(self):
        return ImportTest()

Output:
[INFO              ] [Logger      ] Record log in C:\Users\mdk\.kivy\logs\kivy_15-12-20_116.txt
[INFO              ] [Kivy        ] v1.9.1-dev
[INFO              ] [Python      ] v2.7.11 (v2.7.11:6d1b6a68f775, Dec  5 2015, 20:40:30) [MSC v.1500 64 bit (
AMD64)]
[INFO              ] [Factory     ] 179 symbols loaded
[INFO              ] [Image       ] Providers: img_tex, img_dds, img_gif, img_sdl2, img_pil (img_ffpyplayer ig
nored)
[INFO              ] [OSC         ] using <thread> for socket
[INFO              ] [Window      ] Provider: sdl2
[INFO              ] [GL          ] GLEW initialization succeeded
[INFO              ] [GL          ] OpenGL version <4.5.0 NVIDIA 353.62>
[INFO              ] [GL          ] OpenGL vendor <NVIDIA Corporation>
[INFO              ] [GL          ] OpenGL renderer <Quadro 1000M/PCIe/SSE2>
[INFO              ] [GL          ] OpenGL parsed version: 4, 5
[INFO              ] [GL          ] Shading version <4.50 NVIDIA>
[INFO              ] [GL          ] Texture max size <16384>
[INFO              ] [GL          ] Texture max units <32>
[INFO              ] [Window      ] auto add sdl2 input provider
[INFO              ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO              ] [Text        ] Provider: sdl2
[INFO              ] [Base        ] Start application main loop
[INFO              ] [GL          ] NPOT texture support is available
[INFO              ] [Base        ] Leaving application in progress...

https://github.com/kivy/kivy/issues/3855#issuecomment-166520731


Look into flagged github vulnerability in FOI codebase

Task: To determine severity of the vulnerability
https://github.com/advisories/GHSA-35jh-r3h4-6jhm/dependabot?query=user:bcgov

Does this need to be actioned?


Paste an extracted region

Hello, I want to do something that I'm not sure if it's possible with this library. I've done this using node-canvas but I think there's better/faster library for the job.
I want to extract a part of an image (like a strip), then paste it to a new drawing area. Then extract another strip and paste besides the first strip.
I think extracting is not the problem, but the idea of "drawing area" and "pasting" is something I'm not familiar with this library. Can someone give me some pointers?
Thanks!

Hello, you'll probably want to experiment with multiple calls to extract, "saving" the outputs to a raw pixel format, then using these as an input in combination with extend and overlayWith to assemble a final image.

Feel free to re-open with more details if there are related questions.

In case others find this looking for examples of how to copy/paste images with sharp, I ended up using the clone method keep the extracted area separate from the initial image:
let image = sharp(file.contents);

// Get image info for calculating `overlayWith` coordinates
image.metadata((error, imageInfo) => {
  // Copy image and extract 100x100 area from top left corner
  return image.clone().extract({ left: 0, top: 0, width: 100, height: 100 })
    // "Save" extracted area
    .toBuffer((error, copy, copyInfo) => {
      // Extend image to fit copy in bottom right corner
      return image.extend({ top: 0, right: copyInfo.width, bottom: copyInfo.height, left: 0 })
        // Paste copy in bottom right corner
        .overlayWith(copy, { left: imageInfo.width, top: imageInfo.height })
        // Hand off final image to pipeline
        .toBuffer(function(error, output, info) {
          callback(null, output);
        });
    });
});

I was working on a gulp plugin so I kept the final image in a buffer, but if you just want to save the file directly you can replace that last toBuffer with a call to toFile:
        // Save to file
        .toFile('output.jpg', function(err, info) {
          callback(null, file);
        });

For reference, here's the final code I ended up using.
Thanks @lovell for all your work on sharp. Really appreciate it.


builder error: 'openssl/rand.h' not found

Hey, I tried to use your lib with a simple code but I had this error.
(I took the example code but obviously I edited it because it wasn't up to date ....)
I'm on windows.

Build it on WSL

Thanks for the answer, I'll try or maybe just switch to linux because it's not the alone issue in windows.


DsiWin32 AffinityMask functions should use DWORD_PTR

From : https://code.google.com/p/omnithreadlibrary/issues/detail?id=79
What steps will reproduce the problem?

On systems with more than 32 logical processors, OmniThread library doesn't start because of range check errors in AffinityMask functions

What is the expected output? What do you see instead?
DwiWin32's wrappers for AffinityMask functions should be upgraded to the actual Win32 API (using DWORD_PTR instead of DWORD).
Also, DSiCPUIDs should be extended to support 64 processors.
Also, loops reading DSiCPUIDs should use High(DSiCPUIDs) instead of 32 (or 64)
What version of the product are you using? On what operating system?
Most recent code. Host with 32 processors.
Please provide any additional information below.
Note, this happens on 64 bit using XE2, but probably also applies to all other supported compiler versions, and might even fail on 32 bit Windows OSes (although it's highly unlikely those support more than 32 processors).

You're correct, this indeed has to be fixed. I don't notice such problems as I don't yet have a computer with > 32 logical processors.

DSiWin32 already uses Win32 API call with DWORD_PTR parameters. It's just the mappers that map this to/from string that can't handle more than 32 cores.

Fixed. Please check if it works for you.

We finally got around to testing your fix, and there's good news and bad news to report:
The good news is, we got it to work, your 64 bit support works as excepted.
But the bad news is, we had to fix a Delphi RTL bug to get it to work!
The thing is, DSiGetThreadAffinityMask must be implemented using kernel32's SetThreadAffinityMask, since there's no GetThreadAffinityMask. Now, the problem we encountered is, that Delphi's RTL (at least, versions up to XE2) had a bug in the signature used for importing SetThreadAffinityMask; MSDN says it requires a DWORD_PRT, but the Delphi RTL specifies a DWORD. If you call this on a system with more than 32 cores (the one we tested on had 36 cores) this crashes in such a way that the entire process disappears.
Once we spotted the error and used our own import using the correct DWORD_PTR type, all went fine.
Hopefully this report helps.
Cheers,
Patrick van Logchem
Every Angle BV Nederland

For more information, see : http://qc.embarcadero.com/wc/qcmain.aspx?d=106659 and http://qc.embarcadero.com/wc/qcmain.aspx?d=121460

Thanks for the report, I'll incorporate a similar workaround into DSiWin32.


Fix syntax nit for prettier in BlockType

Just fixing a lint errors.

It appears we prefer commas in our internal Prettier config, and semicolons in the Draft.js Prettier config.
Looking into that is the real fix for this. If you get a chance @mitermayer go ahead, otherwise I'll fix it after I finish reviewing your Jest Snapshot PR.

Just quoting @vjeux  in here for history tracking (https://github.com/facebook/draft-js/issues/1492#issuecomment-342213957)

At flow's team request, prettier now uses ; instead of , but I haven't updated www yet to the version that contains this change.

We can solve this by doing one of two things

downgrade draft prettier to match facebook ones

or:

ignore internal linting since eventually it will be fixed when @vjeux  upgrade prettier internally

Any thoughts around it ?

Just talked with @vjeux, the main take a way is, lets merge this PR to fix travis, and while we are importing draft internally we can ignore the 'prettier linting' rules caused by our internal, since in the next couple weeks prettier will be bumped internally.
One thing that I was thinking is if would make sense to eventually move prettier settings and configurations to 'fbjs' so that all our open source projects use it and are on sync with 'www' future prettier versions ?
cc @zpao

Will update this PR to keep fb internal formatting and add this to fix the CI:
// https://github.com/facebook/draft-js/issues/1492
// prettier-ignore

The reason for is that our internal linting rules ignores // prettier-ignore

eslint-plugin-prettier has a config that matches FB, maybe we can piggyback on that? (https://github.com/prettier/eslint-plugin-prettier#options)
That said, I don't think this change was configurable, just an incompatability between versions. You should probably ensure you're using the same version of prettier here that is being used in www. Currently www is using ^1.6.1 and you have ^1.7.4 here, so it's not surprising to see discrepencies. Your eslint-plugin-prettier is also newer here. I would recommend you start using yarn in the repo here and lock that at the www version as well (though it should matter less since it mostly just runs prettier).

Hi @zpao,
Thanks for the suggestions.

You should probably ensure you're using the same version of prettier here that is being used in www

Would be great if this could be handled by fbjs this way would always be on sync with www. Is it possible ? I can imagine that other fb open source projects could benefit from this as well

Is it possible? Not in a great sustainable way. Could maybe hardcode it into something like fbjs's check dependencies script but if you fail to update that then all bets are off. Or maybe have a file somewhere on the internet that we (hopefully remember to) update, but if you're building on plane, the build will fail. So you'll have some manual step. I'm not sure if it's worth the effort in all honesty - Draft is the only project actively syncing out of www (couple other projects are not actively worked on/synced). When internal prettier upgrades happen, there's usually a post somewhere so when that happens you can update the version here. Or just wait for builds to fail on master and if they're formatting failures, that's the clue to upgrade your version here to match (in other words, exactly what happened but don't edit your code, edit your package.json/yarn.lock).


Migrations: Scaffold comments

Migrations should be able to scaffold comments for operations like.
// This operation may result in data loss.
migrationBuilder.DropTable("Customers");

Providers should also be able to participate, for example, SQLite may want to write something like.
// On SQLite, this operation results in a table rebuild.
migrationBuilder.DropColumn(name: "Birthday", table: "Customers");

Here are some thoughts I had on implementing this:
The model differ could pass the operations to the provider giving them a chance to add annotations like CodeGen:Comment = "This will rebuild the table.". The scaffolder would then use these special CodeGen annotations when serializing the operations.

Although a comment is helpful, I think casual users may not read the comments. When data loss is possible, could we do more assertive , such as requiring a command-line flag "--AllowDrops" or prompting y/n on migration execution?

We already log a yellow warning when operations that could result data loss are scaffolded. But there currently isn't a way for providers to influence whether an operation could result in data loss.

Here is another scenario we may want to generate comments for: Add a migrations warning for ValueGeneratedOnAdd for a non-key property for SqlServer #7295

We have already improved logging/feedback in this area, and we hope to improve it further once simple logging is implemented in EF Core. Closing this issue as there is nothing actionable here that isn't tracked elsewhere.


Fix flaky ResponseTests.FailedWritesResultInAbortedRequest.

Sometimes it throws TaskCancelledException, sometimes OperationCancelledException. Depends on how far the write that's cancelled goes.
This makes the test more deterministic so it always throws TaskCancelledException.

@pakrym Switched to ThrowsAnyAsync.

🆙 📅


Include the Leiningen template

Addresses this issue: #67
Also the README is updated.

I'll review your Readme tomorrow. Great!

Coverage remained the same at 60.942% when pulling 83268617e5c11baa7699e395beb05221ec51ebbe on move-in-template into 02b69b59d5d059062e50b009362db9d890ec04e5 on master.

Coverage remained the same at 60.942% when pulling 83268617e5c11baa7699e395beb05221ec51ebbe on move-in-template into 02b69b59d5d059062e50b009362db9d890ec04e5 on master.

👍

👍


Memory allocation failed, out of memory

I tried to mint 5 pngs (5Mb size for each) but seem it does not work fine.  Here is the log that i got. Could someone help me?
 logs: [
    'Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ invoke [1]',
    'Program log: Error: memory allocation failed, out of memory',
    'Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ consumed 200000 of 200000 compute units',
    'Program failed to complete: BPF program panicked',
    'Program cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ failed: Program failed to complete'
  ]

Hi there! This problem often occurs when you use an NFT name that is too long. It might help if you use shorter names.

you mint it from website? or from CLI? what are the steps. i think the issue is too vague

Did you fix it? i have the same issue, my name is just 1 number so it isn't too long


imagebuildah: Commit() doesn't need a parser node

The imagebuildah Executor.Commit() method doesn't use its parser node argument, and the Commit() method in the dockerclient builder in imagebuilder doesn't, so switch to match its signature.

@rh-atomic-bot r+ 42b4406


CesiumGltf: Optional properties shouldn't be initialized with the first enum value

From https://github.com/CesiumGS/cesium-native/pull/350

Now each enum member is initialized with its default value (if that was given), or with "the first" enum value otherwise.

I'm not sure that defaulting to the first enum value is a good idea. Unless you're aware that CesiumGltf is doing this under the hood it's easy to accidentally create non-conformant glTFs.
Example (from a real situation that happened): say you're creating a buffer view for some indices and you don't specify the target for whatever reason.
CesiumGltf::BufferView bufferView;
bufferView.buffer = bufferIndex;
bufferView.byteOffset = bufferByteOffset;
bufferView.byteLength = inputBufferByteLength;

This will create a buffer view with "target": 34962 (ARRAY_BUFFER) which will fail validation.
{
  "buffer": 0,
  "byteOffset": 48744,
  "byteLength": 47172,
  "target": 34962
},

I could just set bufferView.target to 34963, or I could reset the property like bufferView.reset(), but I shouldn't have to do either.
Another example: texture samplers don't have a default min and mag filter which allows runtime engines to use their own defaults if the property is omitted. But if I use CesiumGltf to create a sampler the default min and mag filter will be 9728 (NEAREST) which is generally not a good default.
Currently if someone wants to use CesiumGltf to write glTF files they have to be really careful to "post-process" the CesiumGltf::Model object to avoid bad defaults being assigned.
CC @javagl @kring

all this still refers to the "old" generator code

That's all good. We ended up building on the "old" generator for 3D Tiles https://github.com/CesiumGS/cesium-native/pull/361.


feat(server): add an endpoint for retrieving a list of files as JSON

Description
Hi there! I forked rustypaste to add a feature I need for a frontend I am building utilizing rustypaste as a backend. It occurred to me that it may be beneficial for the upstream project, although I am not sure if the feature fits with the philosophy or roadmap of the project. If it doesn't feel free to decline this PR and I'll understand completely.
Please note: I am a total Rust beginner and may have implemented this completely wrong. Feel free to critique accordingly.
Motivation and Context
I'm using rustypaste as a lightweight fileshare backend on my local network and I need a way to list all files for a frontend UI component I am building. This is also a common feature of other pastebin services and I think it may have many potential use cases beyond my own.
I only listed files in the upload dir and did not list urls, one shot files, or one shot urls. For my use case this is all I need but I could change this if requested.
How Has This Been Tested?
It hasn't been tested beyond my own manual testing on my machine. If this PR is of interest to the maintainers, I will write rust tests and proceed with any further testing requirements.
Changelog Entry
Added

Add a function that lists all files in the upload directory and transforms them into a JSON HTTP response of objects representing the files in the directory.
Add new variable to config.toml to control the endpoint used for the response.

Changed

Modified the behavior of the GET /{file} route to conditionally execute and return the transformation function if the JSON index path configuration value matches the name of the requested file.

Types of Changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
[x] Documentation (no code change)
[ ] Refactor (refactoring production code)
[ ] Other

Checklist:

[?] My code follows the code style of this project.
[x] I have updated the documentation accordingly.
[x] I have formatted the code with rustfmt.
[ ] I checked the lints with clippy.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

This looks great. I was thinking about implementing something similar. One suggestion though.
I think this should be guarded with an auth token. That is, if one is set. You can check how it was done for the /version and /upload endpoint.

I'll implement the auth guard and make the change to the expiration variable (I'm not sure why I implemented it that way and agree that the expiration date definitely makes more sense!). Thanks for the feedback, let me know if there is anything else!

I am just a user like yourself. I really only made suggestions, even though I think they made sense.
orhun is the owner of this project, so he is the one who makes all the decisions. ;-)

Oh, I have just noticed that you are using the / endpoint for retrieving the list.
I am just playing the devil's advocate here. What would happen, if someone chose version as the json_index_path? Or any other endpoint that exists? I am not sure how actix handles that.
Maybe it would be better to use a hardcoded separate endpoint. Otherwise you migth have to check for collisions (make sure that no existing endpoints) are used.
Maybe orhun has some input on this as well.

Codecov Report
Patch coverage: 46.15% and project coverage change: -0.37 :warning:

Comparison is base (a868a5f) 67.96% compared to head (bc044ce) 67.59%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #94      +/-   ##
==========================================
- Coverage   67.96%   67.59%   -0.37%
==========================================
  Files          11       11
  Lines         515      537      +22
==========================================
+ Hits          350      363      +13
- Misses        165      174       +9

Flag
Coverage Δ

unit-tests
67.59% <46.15%> (-0.37%)
:arrow_down:

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

Impacted Files
Coverage Δ

src/config.rs
66.66% <ø> (ø)

src/server.rs
76.53% <46.15%> (-2.21%)
:arrow_down:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Hello, thanks for submitting this PR, it is definitely a nice feature to have!

What would happen, if someone chose version as the json_index_path?

It is a valid concern. Having a hardcoded endpoint would be better in this case I think.

@ajbdev if you go for a hardcoded endpoint, something simple and short like /list should do. ;-)
Btw, when you are done with your frontend, I'd be interested in checking it out in case you are going to make it public on github.

This all sounds good - I will change to the hardcoded endpoint! Yes, I'll be sharing my frontend publicly, although it won't be a very traditional pastebin UI most likely.

although it won't be a very traditional pastebin UI most likely.

For me this is perfectly fine. I am just interested in what kind of frontend you are cooking up. I mostly use the command line, but now and then a UI (text or graphics based) can be useful.
I am also interested in this, because I really suck in anything frontend like. Haha.

I had some time to make these changes and add test coverage. Let me know if I missed anything or you see anything else to change.

I also like it that you added a config option to enable/disable the feature. 👍

These commits are pretty noisey, I can rebase them if you'd like just let me know (unless you'll just squash merge anyways)

orhun squashes them when he merges the PR. I haven't seen any indication that during the lifetime of a PR he wanted to squash and force-push, but I might be wrong.

I just noticed that the filename also includes the timestamp:
[
  {
    "filename": "foo.rjOq.bar.txt.1690750967938",
    "filesize": 12,
    "expires_at": "2023-07-30 21:02:47"
  }
]

Is this on purpose?
When you create a link BASE_URL + filename, the result (in a browser) is always that the file is downloaded, because the mimetype is not recognized with this (timestamp) extension.
For me this is not an issue, but might not be as intended. Maybe the timestamp should be moved to its own separate field. But I really do not know, and even if I were the person to decide, I still couldn't make the decision alone, because I am not sure what the best solution is. There are a few options and all of them have their pros/cons:

keep it as is
remove the timestamp from the filename and do nothing else
move the timestamp from the filename to a separate field

What do you guys think @orhun and @ajbdev?

I think we should just chop it off. The expiration is already a separate field.

I think we should just chop it off. The expiration is already a separate field.

Yup, let's do that.

The easiest and most performant is to just add it to the key.

Agreed!

Hey guys, I understand this PR may need further changes but for the purposes that I need its more than adequate. Unfortunately (with a newborn to take care of) I can only spend so much time tending to hobby projects, so if you'd like to merge the PR someone else will have to implement further changes.  As much as I'd love to know how to be a competent rustacean life sometimes gets in the way :) I hope you all understand.

Congrats @ajbdev! Thank you for your efforts so far and definitely no worries, we will be finishing this up with @tessus for sure!

The easiest and most performant is to just add it to the key.

Agreed!

I also thought about maybe adding one more method to the crate as_string_utc(). Because in reality with this kind of primitive transformation without any TZ awareness there are only 2 options to present a date/time to the user:

local (whatever that might be) without TZ info
UTC (also showing that it is in fact UTC)

No harm in adding the second one of these 2 options to the crate.

@orhun I think this should be ready. please also have a look at https://github.com/orhun/rustypaste/pull/94#discussion_r1279530585

I cleaned up the implementation in b9e15dcf5c965177bacb1798af053727f01b6469 (it might be worth checking out)

P.S. Would you be interested in adding this feature to rustypaste-cli as well?

I cleaned up the implementation in b9e15dc (it might be worth checking out)

Nice refactor indeed.

Would you be interested in adding this feature to rustypaste-cli as well?

Yes, I was thinking about it, but was hung up on how to present the data. When I thought about the formatting, a few options came to mind. The best would probably be a table, but I'd have to iterate through the json to find the longest filename and the largest filesize to determine the width of the columns. This also means iterating through the JSON twice.
Or the first column could be the expiry timestamp, the second column the file size, and the third column the file name. Then the column widths could be static.
Then how about the file size? Bytes or units (kb, mb, gb, tb, ...). e.g. I use the term MB, but calculate with 1024. Many, many years back they renamed the MB that is binary based to MiB (which I really hate). I grew up with learning that in IT KB/MB/GB are not factors of 1000 but 1024.
 As far as I know RAM manufacturers still use the term MB but caluclate with 1024.
Sorry for my rant, but this stuff still makes me angry every time I think about it.

While working on the cli code (almost done, btw), I have noticed that expired files are also listed. There should be a check (on the server) inverse to what is done when removing expired files when building the list of files.

 As far as I know RAM manufacturers still use the term MB but caluclate with 1024.

Lol, yeah, I can totally relate with this rant 😄


HDFS-16559 Seperate IBR thread waiting time from heart beat waiting t…

…ime.

Description of PR
IBR opeeration is seperated from heartbeat thread since HDFS-16016, which is great.
But IBR thread is using the expireTime of heart beat to deside whether wait or not. In a high load DataNode, IBR thread becomes an infinit loop without sleeping and consuming 100% cpu because of the latency of heartbeat reporting.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Logfile
Comment

+0 :ok:
reexec
1m  1s

Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s

No case conflicting files found.

+0 :ok:
codespell
0m  0s

codespell was not available.

+1 :green_heart:
@author
0m  0s

The patch does not contain any @author tags.

+1 :green_heart:
test4tests
0m  0s

The patch appears to include 2 new or modified test files.

_ trunk Compile Tests _

+1 :green_heart:
mvninstall
38m 43s

trunk passed

+1 :green_heart:
compile
1m 42s

trunk passed with JDK Ubuntu-<IP_ADDRESS>+1-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
compile
1m 42s

trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

+1 :green_heart:
checkstyle
1m 24s

trunk passed

+1 :green_heart:
mvnsite
1m 47s

trunk passed

+1 :green_heart:
javadoc
1m 25s

trunk passed with JDK Ubuntu-<IP_ADDRESS>+1-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javadoc
1m 47s

trunk passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

+1 :green_heart:
spotbugs
3m 42s

trunk passed

+1 :green_heart:
shadedclient
23m  7s

branch has no errors when building and testing our client artifacts.

_ Patch Compile Tests _

+1 :green_heart:
mvninstall
1m 23s

the patch passed

+1 :green_heart:
compile
1m 27s

the patch passed with JDK Ubuntu-<IP_ADDRESS>+1-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javac
1m 27s

the patch passed

+1 :green_heart:
compile
1m 21s

the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

+1 :green_heart:
javac
1m 21s

the patch passed

+1 :green_heart:
blanks
0m  0s

The patch has no blanks issues.

+1 :green_heart:
checkstyle
1m  2s

the patch passed

+1 :green_heart:
mvnsite
1m 26s

the patch passed

+1 :green_heart:
javadoc
0m 58s

the patch passed with JDK Ubuntu-<IP_ADDRESS>+1-Ubuntu-0ubuntu1.20.04

+1 :green_heart:
javadoc
1m 34s

the patch passed with JDK Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

+1 :green_heart:
spotbugs
3m 30s

the patch passed

+1 :green_heart:
shadedclient
22m 59s

patch has no errors when building and testing our client artifacts.

_ Other Tests _

-1 :x:
unit
421m 51s
/patch-unit-hadoop-hdfs-project_hadoop-hdfs.txt
hadoop-hdfs in the patch passed.

+1 :green_heart:
asflicense
1m 14s

The patch does not generate ASF License warnings.

533m 18s

Reason
Tests

Failed junit tests
hadoop.hdfs.server.datanode.TestTriggerBlockReport

hadoop.hdfs.server.blockmanagement.TestReconstructStripedBlocksWithRackAwareness

hadoop.hdfs.server.namenode.sps.TestStoragePolicySatisfierWithStripedFile

hadoop.hdfs.server.balancer.TestBalancerLongRunningTasks

hadoop.hdfs.TestPread

hadoop.hdfs.server.namenode.TestAddOverReplicatedStripedBlocks

hadoop.hdfs.server.datanode.TestDataNodeVolumeFailure

hadoop.hdfs.server.datanode.TestDataNodeHotSwapVolumes

hadoop.hdfs.server.datanode.fsdataset.impl.TestFsDatasetImpl

hadoop.hdfs.server.namenode.TestCacheDirectivesWithViewDFS

hadoop.hdfs.server.balancer.TestBalancer

hadoop.hdfs.TestClientProtocolForPipelineRecovery

hadoop.hdfs.server.namenode.TestCacheDirectives

hadoop.hdfs.server.namenode.ha.TestStandbyIsHot

hadoop.hdfs.server.mover.TestMover

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4233/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/4233

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient spotbugs checkstyle codespell

uname
Linux e9b3ec4e4dfd 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/bin/hadoop.sh

git revision
trunk / 2e6ab557155d77c2e91c43fefcbe5e4bae4aac08

Default Java
Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

Multi-JDK versions
/usr/lib/jvm/java-11-openjdk-amd64:Ubuntu-<IP_ADDRESS>+1-Ubuntu-0ubuntu1.20.04 /usr/lib/jvm/java-8-openjdk-amd64:Private Build-1.8.0_312-8u312-b07-0ubuntu1~20.04-b07

Test Results
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4233/1/testReport/

Max. process+thread count
3151 (vs. ulimit of 5500)

modules
C: hadoop-hdfs-project/hadoop-hdfs U: hadoop-hdfs-project/hadoop-hdfs

Console output
https://ci-hadoop.apache.org/job/hadoop-multibranch/job/PR-4233/1/console

versions
git=2.25.1 maven=3.6.3 spotbugs=4.2.2

Powered by
Apache Yetus 0.14.0-SNAPSHOT https://yetus.apache.org

This message was automatically generated.


use slideToLoop in loop mode, a slide disappear

Check that this is really a bug

[X] I confirm

Reproduction link
https://codesandbox.io/p/sandbox/swiper-loop-bug-wh9mky?file=%2Fsrc%2FApp.vue%3A44%2C7
Bug description
In loop mode, slideToLoop to a specific index, the previous slide is missing, like this, slide 4 is missing:

the reproduction link can show this every time.
Expected Behavior
No response
Actual Behavior
No response
Swiper version
10.0.0
Platform/Target and Browser Versions
macOS chrome 115
Validations

[X] Follow our Code of Conduct
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
[X] Make sure this is a Swiper issue and not a framework-specific issue

Would you like to open a PR for this bug?

[ ] I'm willing to open a PR

https://codesandbox.io/p/sandbox/swiper-loop-bug-forked-xt5lwk?file=%2Fsrc%2FApp.vue%3A42%2C25

@nolimits4web can you explain your comment a bit more or why this is closed? I'm having the same issue as @alex-ading , but it doesn't show anything new that I can tell. e.g. In your code sandbox, if you change e.slideToLoop(4, 0); to e.slideToLoop(6, 0);, there will be missing slides.

Swiper v11 comes with reworked and update loop mode. If your issue is replicated with v11, create a new one


Add CFT docs

porting contents of https://www.alluxio.io/products/aws/aws-cft-tutorial/ into docs
did not copy some of the initial setup screenshots and some content that i felt was more for carefully crafting a tutorial step by step than a doc specifically about using the CFT

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/7070/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/7084/
Test PASSed.

i originally omitted some screenshots but we want parity with the corresponding tutorial on alluxio.io so i added back all the screenshots. @LuQQiu can you take a look again

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/7118/
Test PASSed.

alluxio-bot, merge this please


Window dialog title bar's background are not visible on default theme

Ubuntu 17.04 - Godot version: master ed6baffc7
Issue description:
Title bars of window dialogs have a not visible/transparent background (affects editor and respective controls with default theme).
This is how the project manager looks:

I think this is a known theme issue but I have not seen it anywhere else.

Fixed by #8631.


Add more flot rendering options

[x] customizable line width. Currently just renders at a width of 1, but that looks a little light on Retina displays. To my eyes, 1.5 actually looks ideal on Retina (2 feels too heavy).  Allow global and per-graph overrides (time to think about refactoring how chart options are handled...)
[x] Line fill & transparency (and allowing fill w/o the line, or stacked mode w/o fill)
[x] points

Done. See b65ff7f8703f4f467e0ff0c1284995b7d525e3ff, f98acadd792fe6d22bfc3431cf04b82cda0a10d1, ef8c3ee3568254c71079374f6fedfe103853d9c2, and acf8e4b8e3205aeaaa507a2ef3cff540323c2c2a


Typescript project linting (ESLint) fails when using vue-cli-service build in Node container

Version
4.2.2
Environment info
See details
System:
    OS: Linux 4.19 Debian GNU/Linux 9 (stretch) 9 (stretch)
    CPU: (2) x64 Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
  Binaries:
    Node: 13.8.0 - /usr/local/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.13.6 - /usr/local/bin/npm
  Browsers:
    Chrome: Not Found
    Firefox: Not Found
  npmPackages:
    @vue/cli-overlay:  4.2.2
    @vue/cli-plugin-eslint: ^4.2.2 => 4.2.2
    @vue/cli-plugin-pwa: ^4.2.2 => 4.2.2
    @vue/cli-plugin-router:  4.2.2
    @vue/cli-plugin-typescript: ^4.2.2 => 4.2.2
    @vue/cli-plugin-unit-mocha: ^4.2.2 => 4.2.2
    @vue/cli-plugin-vuex:  4.2.2
    @vue/cli-service: ^4.2.2 => 4.2.2
    @vue/cli-shared-utils:  4.2.2
    @vue/component-compiler-utils:  3.1.1
    @vue/eslint-config-standard: ^5.1.2 => 5.1.2
    @vue/eslint-config-typescript: ^5.0.1 => 5.0.1
    @vue/preload-webpack-plugin:  1.1.1
    @vue/web-component-wrapper:  1.2.0
    eslint-plugin-vue: ^6.2.0 => 6.2.0
    typescript: ^3.7.5 => 3.7.5
    vue: ^2.6.11 => 2.6.11
    vue-class-component: ^7.2.3 => 7.2.3
    vue-cli-plugin-vuetify: ^2.0.5 => 2.0.5
    vue-eslint-parser:  7.0.0
    vue-hot-reload-api:  2.3.4
    vue-loader:  15.9.0
    vue-property-decorator: ^8.4.0 => 8.4.0
    vue-router: ^3.1.5 => 3.1.5
    vue-style-loader:  4.1.2
    vue-template-compiler: ^2.6.11 => 2.6.11
    vue-template-es2015-compiler:  1.9.1
    vuetify: ^2.2.12 => 2.2.12
    vuetify-loader: ^1.4.3 => 1.4.3
    vuex: ^3.1.2 => 3.1.2
    vuex-map-fields: ^1.3.6 => 1.3.6
  npmGlobalPackages:
    @vue/cli: 4.2.2

Steps to reproduce
Running vue-cli-service build in a node:13.8.0 docker container results in the following type of error for every file in the project:
error  in /src/router.ts

Module Error (from /node_modules/thread-loader/dist/cjs.js):

/src/router.ts
  0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: rc/router.ts.
The file must be included in at least one of the projects provided

✖ 1 problem (1 error, 0 warnings)

 @ /src/main.ts 3:0-35 17:12-23
 @ multi ../src/main.ts

The same command on a Windows 10 1909 machine works flawlessly. Note how the project config line says rc instead of src in the path while the file location is correct 2 lines before it.
At first I thought that this was a typescript-eslint issue so I created a ticket there, but it turns out that may not be the case, because the error does not occur when running vue-cli-service lint
Debug info when running `vue-cli-service build`
2020-02-17T14:00:08.353Z typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /rc/App.vue
2020-02-17T14:00:08.354Z typescript-eslint:typescript-estree:createWatchProgram File did not belong to any existing programs, moving to create/update. /rc/App.vue

Debug info when running `vue-cli-service lint`
2020-02-17T13:59:01.164Z typescript-eslint:typescript-estree:createProjectProgram Creating project program for: /src/App.vue
2020-02-17T13:59:01.206Z typescript-eslint:typescript-estree:createWatchProgram Found existing program for file. /src/App.vue

What is expected?
Build succeeds.
What is actually happening?
Build fails with linting errors.
tsconfig.json
{
	"compilerOptions": {
		"target": "es2020",
		"module": "esnext",
		"strict": true,
		"jsx": "preserve",
		"importHelpers": true,
		"moduleResolution": "node",
		"experimentalDecorators": true,
		"esModuleInterop": true,
		"allowSyntheticDefaultImports": true,
		"sourceMap": true,
		"baseUrl": ".",
		"types": [
			"webpack-env",
			"mocha",
			"chai",
			"vuetify"
		],
		"paths": {
			"@/*": [
				"src/*"
			],
			"components/*": [
				"src/components/*"
			]
		},
		"lib": [
			"esnext",
			"dom",
			"dom.iterable",
			"scripthost"
		]
	},
	"include": [
		"src/**/*.ts",
		"src/**/*.tsx",
		"src/**/*.vue",
		"tests/**/*.ts",
		"tests/**/*.tsx"
	],
	"exclude": [
		"node_modules"
	]
}

tsconfig.eslint.json
{
	"extends": "./tsconfig.json",
	"include": [
		".eslintrc.js",
		"vue.config.js",
		"postcss.config.js"
	],
	"compilerOptions": {
	  "allowJs": true,
	  "checkJs": true,
	  "noEmit": true
	}
}

.eslintrc.js
module.exports = {
    "env": {
        "browser": true,
        "es6": true,
        "node": true
	},
	"extends": [
		"plugin:vue/recommended",
		"@vue/typescript"
	],
    "parser": "vue-eslint-parser",
    "parserOptions": {
		"extraFileExtensions": [".vue"],
		"parser": "@typescript-eslint/parser",
        "project": ['./tsconfig.json', './tsconfig.eslint.json'],
		"sourceType": "module",
		"tsconfigRootDir": __dirname,
    },
    "plugins": [
        "@typescript-eslint",
		"jsdoc",
		"prefer-arrow",
		"vue"
    ],
    "rules": {
        "@typescript-eslint/await-thenable": "warn",
        "@typescript-eslint/class-name-casing": "warn",
        "@typescript-eslint/consistent-type-definitions": "warn",
        "@typescript-eslint/interface-name-prefix": ["warn", { "prefixWithI": "always" }],
        "@typescript-eslint/member-delimiter-style": [
            "warn",
            {
                "multiline": {
                    "delimiter": "semi",
                    "requireLast": true
                },
                "singleline": {
                    "delimiter": "semi",
                    "requireLast": false
                }
            }
        ],
        "@typescript-eslint/member-ordering": "warn",
        "@typescript-eslint/no-empty-function": "warn",
        "@typescript-eslint/no-empty-interface": "warn",
		"@typescript-eslint/no-magic-numbers": [
			"warn", {
				"ignore": [-1, 0, 1],
				"ignoreEnums": true,
			}
		],
        "@typescript-eslint/no-var-requires": "warn",
        "@typescript-eslint/prefer-namespace-keyword": "warn",
        "@typescript-eslint/semi": [
            "warn",
            "always"
        ],
        "@typescript-eslint/type-annotation-spacing": "warn",
        "arrow-body-style": "warn",
        "arrow-parens": [
            "warn",
            "as-needed"
        ],
        "camelcase": "warn",
        "comma-dangle": [
            "warn",
            "always-multiline"
        ],
        "complexity": "warn",
        "curly": [
            "warn",
            "multi-line"
        ],
        "default-case": "warn",
        "eol-last": "warn",
        "eqeqeq": [
            "warn",
            "smart"
        ],
        "guard-for-in": "warn",
        "id-blacklist": "warn",
        "id-match": "warn",
		"indent": ["error", "tab", {"SwitchCase": 1}],
		"jsdoc/check-alignment": 1,
		"jsdoc/check-param-names": 1,
		"jsdoc/check-tag-names": 1,
		"jsdoc/check-types": 1,
		"jsdoc/implements-on-classes": 1,
		"jsdoc/no-undefined-types": 1,
		"jsdoc/require-description": 1,
		"jsdoc/require-jsdoc": 1,
		"jsdoc/require-param": 1,
		"jsdoc/require-param-description": 1,
		"jsdoc/require-param-name": 1,
		"jsdoc/valid-types": 1,
        "max-classes-per-file": [
            "warn",
            1
        ],
        "new-parens": "warn",
        "no-debugger": "warn",
        "no-empty": [
            "warn",
            {
                "allowEmptyCatch": true
            }
        ],
        "no-eval": "warn",
		"no-irregular-whitespace": "warn",
		"no-magic-numbers": "off",
        "no-return-await": "warn",
        "no-throw-literal": "warn",
        "no-trailing-spaces": "warn",
		"no-underscore-dangle": "warn",
        "padding-line-between-statements": [
            "warn",
            {
				"blankLine": "always",
				"next": "return",
				"prev": "*"
            }
        ],
		"prefer-arrow/prefer-arrow-functions": "warn",
		"quotes": ["error", "single", { "allowTemplateLiterals": true }],
		"sort-keys": "warn",
        "space-before-function-paren": [
            "warn",
            "never"
        ],
		"spaced-comment": "warn",
		"vue/html-indent": ["warn", "tab"],
		"vue/html-self-closing": ["warn", {
			"html": {
				"component": "never",
				"normal": "never",
				"void": "never"
			},
			"math": "never",
			"svg": "never"
			}
		],
        "yoda": "warn",
	}
};

Thanks for submitting this issue! Due to our limited time, we ask you to include a reproduction link to a minimal full reproduction of your problem (for example in a GitHub repository) so we can find what is causing the issue. Thank you for your understanding!

Thank you for getting back to me. I've been meaning to create such a repo, but couldn't get around to do it until now. Here it is:
https://github.com/Tallyrald/vue-cli-issue-5191
Please see the readme for info on how it was created and how to reproduce my issue.
Thank you for your time!

Strange, I was hitting the same issue. In my case I have
rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off' } in my .eslintrc.js and some file was doing "console.log". Then locally vue-cli-service build was completing just fine, while in a container it was properly failing. What I noticed was that locally I had node 10, where on the container it was node 12. After I upgraded locally to 12, the error started to appear.

I'm having the same issue. Even specifying the full path to the tsconfig file in .eslintrc.js I still get the error. Has anyone had any luck fixing this one?


completed assignment-1

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Adding two versions of function anagram_checker to assignment-1.ipynb
What did you learn from the changes you have made?
I learnt the usage of sort method and how to define and call functions.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Checking each letter of word_a in word_b one by one.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Terminal wouldn't start. Had to restart computer.
How were these changes tested?
By running suggested tests in the notebook.
A reference to a related issue in your repository (if applicable)
Checklist

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

You did a great job here!
Please go ahead and close this pull request now. Thanks!


[Question]: How to integrate models in tranformers in llama index

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
How can I integrate other models for text to sql conversion. For example -How can I integrate "defog/sqlcoder-7b-2" in NLSQLTableQueryEngine method.

We have a few examples. The main thing is ensuring proper prompt formatting
Here's an example with zephyr
https://colab.research.google.com/drive/1C55IGyJNDe14DsHkAIIpIjn76NvK5pc1?usp=sharing#scrollTo=lMNaHDzPM68f


query uninterruptible sleep state with python sql

I Attached trace thread 3492 has a ANR happen, so I check the status from perfetto UI and got below image:

I would like to query "uninterruptible sleep" with python api.
I try below statement but not find "uninterruptible sleep" slice:
`   sql = 'select ts, dur, cpu, end_state, priority, process.name, thread.name from sched_slice left join thread using(utid) left join process using(upid)'
And what maybe the reason cause a 39 secs "uninterruptible sleep"?
Uploading boottrace.perfetto-trace.zip…
`

Hi. This issue is not related with python API, you are just not querying the right table.
SELECT
ts,
dur,
cpu,
utid,
upid,
thread.name AS thread_name,
process.name AS process_name,
state
FROM thread_state
LEFT JOIN thread USING (utid)
LEFT JOIN process USING (upid)


WIP: Erikdstock/inquiry error banner

The type of this PR is: TYPE

This PR resolves [CX-]
Description

PR Checklist (tick all before merging)

[ ] I have included screenshots or videos to illustrate my changes, or I have not changed anything that impacts the UI.
[ ] I have added tests for my changes, or my changes don't require testing, or I have included a link to a separate Jira ticket covering the tests.
[ ] I have documented any follow-up work that this PR will require, or it does not require any.
[ ] I have added an app state migration, or my changes do not require one. (What are migrations?)
[ ] I have added a CHANGELOG.yml entry or my changes do not require one.

Closing because I ended up working on this with @lilyfromseattle and we are going with her work.


[HOLD Web-E 35085] Display message to user when account is closed

Details

Display success message when account is closed
Supports Offline functionality

Fixed Issues

$ https://github.com/Expensify/App/issues/10224
Tests

Tap on profile
Go to Security > Close Account
Enter email
Click Close Account
Verify "Account closed successfully" message appears on Login page as in screenshot
Enter a new email in the login page
Click "Go Back" from the password page. Verify that "Account closed successfully" message is not there

Offline mode

Tap on profile
Go to Security > Close Account
Enter email
Close Account should be disabled

[x] Verify that no errors appear in the JS console

PR Review Checklist

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

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

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] Any functional components have the displayName property
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed

[ ] I have verified the author checklist is complete (all boxes are checked off).
[ ] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[ ] I checked that screenshots or videos are included for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

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

[ ] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[ ] I verified proper code patterns were followed (see Reviewing the code)

[ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[ ] I verified that comments were added to code that is not self explanatory
[ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[ ] I verified any copy / text shown in the product was added in all src/languages/* files
[ ] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[ ] I verified the JSDocs style guidelines (in STYLE.md) were followed

[ ] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[ ] I verified that this PR follows the guidelines as stated in the Review Guidelines
[ ] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[ ] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[ ] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[ ] If a new component is created I verified that:

[ ] A similar component doesn't exist in the codebase
[ ] All props are defined accurately and each prop has a /** comment above it */
[ ] Any functional components have the displayName property
[ ] The file is named correctly
[ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[ ] The only data being stored in the state is data necessary for rendering and nothing else
[ ] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[ ] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[ ] All JSX used for rendering exists in the render method
[ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[ ] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

QA Steps

Tap on profile
Go to Security > Close Account
Enter email
Click Close Account
Verify "Account closed successfully" message appears on Login page as in screenshot
Enter a new email in the login page
Click "Go Back" from the password page. Verify that "Account closed successfully" message is not there

Offline mode

Tap on profile
Go to Security > Close Account
Enter email
Close Account should be disabled

[ ] Verify that no errors appear in the JS console

Screenshots

Web

https://user-images.githubusercontent.com/32012005/195408730-55ca2ac6-1b2d-49a5-8944-476f0fbd08cc.mov
Mobile Web - Chrome

Mobile Web - Safari

Desktop

iOS

Android

cc @Expensify/design

This is ready for a re review. Updated testing and QA steps and added screen recording of the edge case @Beamanator pointed out. Thanks for pointing it out and helping with it!

The code looks good, and the first test passed. But confusingly I'm not getting the offline state on web 😕

@Julesssss hope this was not consistent and something flakey with network?

Hey @MonilBhavsar, actually yeah. I'm pretty sure now that this is an unrelated issue on my side. But for that reason, I'm unable to verify the tests 😞

I unassigned myself because I won't be able to review it by tomorrow. If this continues for next week, I will jump in again 😄

Off hold

Honestly I'm having lotsss of trouble with my VM today so I think it's up to you @Julesssss 😅

Okay, offline functionality is finally working for me. Tested on all platforms:
Desktop

Web

Android

iOS

PR Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

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

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product was added in all src/languages/* files
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by tagging the marketing team on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Thank you @Julesssss for testing and reviewing!
@Beamanator all yours

Sorry all, was battling VM issues the last few days, but I think I'm back and ready to review!

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

I'm 99.9% sure I saw all tests were passing before merging 🤔

🚀 Deployed to staging by @Beamanator in version: 1.2.18-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
failure ❌

🕸 web 🕸
success ✅

🚀 Deployed to production by @chiragsalian in version: 1.2.18-10 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

Heads up @MonilBhavsar  @Beamanator  @Julesssss ! This PR caused a bug here: https://github.com/Expensify/App/issues/13506
Not a big deal, though. I think is more a change in approach than a bug.

Yeahhhh I agree it's more of a change in approach - I think I argued that it was better to keep the closed account message for longer, but no big arguments / opinions either way :D 👍


remaining review comments from #1613

Description

closes: #XXXX
Commit Message / Changelog Entry
type: commit message

see the guidelines for commit messages. (view raw markdown for examples)

Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

[ ] Targeted PR against the correct branch (see CONTRIBUTING.md).
[ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
[ ] Code follows the module structure standards and Go style guide.
[ ] Wrote unit and integration tests.
[ ] Updated relevant documentation (docs/) or specification (x/<module>/spec/).
[ ] Added relevant godoc comments.
[ ] Provide a commit message to be used for the changelog entry in the PR description for review.
[ ] Re-reviewed Files changed in the Github PR explorer.
[ ] Review Codecov Report in the comment section below once CI passes.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (26fd1e0) 81.09% compared to head (8573214) 81.31%.
Report is 7 commits behind head on main.

Additional details and impacted files

@@            Coverage Diff             @@
##             main    #5539      +/-   ##
==========================================
+ Coverage   81.09%   81.31%   +0.21%
==========================================
  Files         197      197
  Lines       15234    15212      -22
==========================================
+ Hits        12354    12369      +15
+ Misses       2412     2383      -29
+ Partials      468      460       -8

see 5 files with indirect coverage changes


[AS-4029] Adding new event to track address validation

The type of this PR is: Feature

This PR resolves EMI-1285
Description
This PR adds a new event to Cohesion to track when an user clicks on the buttons on the address verification modals
More details here
PR Checklist (tick all before merging)

[ ] If I've added a new file to the tree I've exported it from the common index.ts
[ ] I've added comments with examples for any new interfaces and ensured that they're in the docs
[ ] No platform-specific terminology has been used outside of click and tap (platform is inferred by the DB storing events)

@erikdstock do you have comments or can I merge it?

@erikdstock good point!

Maybe I can rename the event to make clear it's the buttons.
I would maybe use the label to identify which button. I forgot sharing this.
Yes! I was not sure if we needed a special event when the user sees the modal. I thought it was like a pageview. I'll create one then.

hey, im taking over for adding the address validation event tracking from @erikdstock, and had a follow up question about if there will also need tracking events for when the modal is closed along with when the user sees it?

Hi @TMcMeans!
I changed again a bit... I got confused with Erik's comments.
What we want is...

Tracking if the modal opened (for that I am using impression event)
If the modal opened, what are the clicks (for that I am using click event)

I added here.
Let me know if it makes sense 😊
cc @louislecluse

added option selected 😊

:rocket: PR was released in v4.134.0 :rocket:

@daytavares Sorry if this is discussed but I have some followup questions:

Maybe we can differentiate which modal is viewed by users, especially given one of the button copy is identical. This way we can analyze what gets triggered.
Re-iterate @TMcMeans 's question above. Do you think we should track modal close, such as clicking the "X" button or outside the modal to dismiss it?

@starsirius I pushed a pr with a small change to the event tracking schema for the modal types which should cover the distinction between modalTypes here: https://github.com/artsy/cohesion/pull/445

@daytavares would love your opinion on tracking the modal close- currently I can add it to three places which would be on each button press (edit or use this address) and on closing the modal by clicking the "x" button or away from the modal on the screen.


Misc changes related to v0.28

Fixed some definitions in the code-samples (+ try to reduce complexity from some samples).
Add the automatic filter by indexUid if the user calls index.GetKeysAsync.
Add a use-case to cover optional uid in the KeysTests.

@alallema, as we aligned internally, I'll merge this, but I would like to have your feedback in any case.


Conduit closes when terminal is terminated

Just want to note down one of the causes of conduit not closing down.

This is now solved with the latest release (0.0.4)


transmission_tint?

@brechtvl wrote:
I would suggest to have a distinct non-physical transmission_tint parameter, that works in addition to the colors to control the volume scattering and absorption.

Seems like this could be closed, the existing behavior of transmission_color is reasonable.


[GHSA-8xc6-g8xw-h2c4] YARP Denial of Service Vulnerability

Updates

Description
References

Hi there @MihaZupan! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.
This change will be reviewed by our highly-trained Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory

Hey @kurt-r2c, thanks for the many additions. Do you have any referencing linking this commit to the advisory? I can't find anything calling out this commit specifically and it's not clear reading the commit itself that it's related to a denial of service issue.

This was the only meaningful change I found in the patch diff between
advisory versions. The commit also exists in a backport branch - multiple
versions were marked as having a patched version available.
Furthermore, the commit improves error handling on client hangups - I am
not familiar with the entire codebase but my suspicion is the denial of
service condition arose from clients holding health check requests open
indefinitely, which would eventually lead to resource exhaustion.
Maintainers should confirm.
On Mon, May 2, 2022, 1:34 PM Jon @.***> wrote:

Hey @kurt-r2c https://github.com/kurt-r2c, thanks for the many
additions. Do you have any referencing linking this commit to the advisory?
I can't find anything calling out this commit specifically and it's not
clear reading the commit itself that it's related to a denial of service
issue.
—
Reply to this email directly, view it on GitHub
https://github.com/github/advisory-database/pull/239#issuecomment-1115339339,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AXRXFK4CFKLYX4HRMWNI7W3VIA347ANCNFSM5UQPJTVA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi, I can confirm that the linked commit is the patch for this advisory


App downloads a random video when current url doesn't exist

I have a bunch of IDs I want to download, I don't know whether they are video or photo items and I don't know the username either so I have built all urls using placeholder for the username and /video/.
When one url doesn't exist instead of reporting and skiping it the app downloads a random video/photo (I think it's from the recommended/home?)
Here is one url: https://www.tiktok.com/@placeholder/video/7128671073558174010

Hi @parasiteoflife,
Looks like I missed adding a check to stop, log, and skip the download when a URL doesn’t exist or doesn't have the intended video/photo. As you pointed out, the app currently grabs random recommended videos/photos from TikTok when the URL is invalid.
I’ll work on a fix when I get a chance, but life’s pretty busy right now, so I’m not sure when it’ll be ready.

@parasiteoflife Issue is Fixed now, Thanks Reporting :)


Incorrect behaviour with multiple media queries

import { useMediaQuery } from "react-responsive";

export default function App() {
  const isMobile = useMediaQuery({ maxWidth: 599 });
  const isTablet = useMediaQuery({ minWidth: 600, maxWidth: 899 });
  const isDesktop = useMediaQuery({ minWidth: 900 });
  console.log(isMobile, isTablet, isDesktop);

  return null;
}

If you resize it both ways you can see there is always one extra update with incorrect state (all tree queries don't match or two of them match in the same time). Tried with both latest 9.0.0-beta.10 and 8.2.0

false false false
false true false

true true false
true false false

https://codesandbox.io/s/multiple-media-queries-fd0w5z?file=/src/App.js

Hey @Panda-ref I had the same issue, may I know why did you close this issue?