Build error: Unable to parse build spec: bad indentation of a mapping entry

Before opening, please confirm:

[X] I have checked to see if my question is addressed in the FAQ.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[x] I have removed any sensitive information from my code snippets and submission.

App Id
d1d4m4xrhdcqdv
AWS Region
us-east-1
Amplify Hosting feature
Not Applicable
Describe the bug
For the app:

Local build did not have any errors
Pushed to Aws CodeCommit

The following policies were attached to the service role:

AWSCodeCommitReadOnly
AdministratorAccess-Amplify

"Reconnect repository" button was clicked and code branch was confirmed.
The build setting amplify.yml is copied from this article. I'm also pasting it below in the build setting box.
Expected behavior
Be able to build and deploy
Reproduction steps

In AWS Amplify console, go to our app
Trigger a build from master
Build fails as it cannot read the amplify.yml

Build Settings
version: 1
frontend:
  phases: null
  preBuild: null
  commands:
    - 'curl -sSL https://dot.net/v1/dotnet-install.sh > dotnet-install.sh'
    - chmod +x *.sh
    - ./dotnet-install.sh -c 6.0 -InstallDir ./dotnet6
    - ./dotnet6/dotnet --version
  build: null
commands:
  - ./dotnet6/dotnet publish -c Release -o release
artifacts:
  baseDirectory: /release/wwwroot
  files:
    - '**/*'
  cache: null
  paths: []

Log output

# Put your logs below this line

2022-12-02T23:51:57.819Z [INFO]: # Cloning repository: https://git-codecommit.us-east-1.amazonaws.com/v1/repos/myapp
022-12-02T23:51:57.819Z [INFO]: # Cloning repository: https://git-codecommit.us-east-1.amazonaws.com/v1/repos/myapp
2022-12-02T23:52:18.997Z [INFO]:
2022-12-02T23:52:19.079Z [INFO]: Cloning into 'myapp'...
                                 remote:
remote: Counting objects: 0
remote: Counting objects: 101
remote: Counting objects: 101
remote: Counting objects: 101, done.

                                 Resolving deltas:   0% (0/23)
Resolving deltas:   4% (1/23)
Resolving deltas:   8% (2/23)
Resolving deltas:  13% (3/23)
Resolving deltas:  17% (4/23)
Resolving deltas:  21% (5/23)
Resolving deltas:  26% (6/23)
Resolving deltas:  30% (7/23)
Resolving deltas:  34% (8/23)
Resolving deltas:  39% (9/23)
Resolving deltas:  43% (10/23)
Resolving deltas:  52% (12/23)
Resolving deltas:  56% (13/23)
Resolving deltas:  60% (14/23)
Resolving deltas:  65% (15/23)
Resolving deltas:  69% (16/23)
Resolving deltas:  73% (17/23)
Resolving deltas:  78% (18/23)
Resolving deltas:  82% (19/23)
Resolving deltas:  86% (20/23)
Resolving deltas:  91% (21/23)
Resolving deltas: 100% (23/23)
Resolving deltas: 100% (23/23), done.
2022-12-02T23:52:19.080Z [INFO]: # Switching to commit: 1467cb859283404dbfd35dabc00c07a70a25325d
2022-12-02T23:52:19.093Z [INFO]: Note: switching to '1467cb859283404dbfd35dabc00c07a70a25325d'.
                                 You are in 'detached HEAD' state. You can look around, make experimental
                                 changes and commit them, and you can discard any commits you make in this
                                 state without impacting any branches by switching back to a branch.
                                 If you want to create a new branch to retain commits you create, you may
                                 do so (now or later) by using -c with the switch command. Example:
                                 git switch -c <new-branch-name>
                                 Or undo this operation with:
                                 git switch -
                                 Turn off this advice by setting config variable advice.detachedHead to false
                                 HEAD is now at 1467cb8 changes
2022-12-02T23:52:19.133Z [INFO]: Successfully cleaned up Git credentials
2022-12-02T23:52:19.134Z [INFO]: # Checking for Git submodules at: /codebuild/output/src164832248/src/myapp/.gitmodules
2022-12-02T23:52:19.140Z [ERROR]: !!! CustomerError: Unable to parse build spec: bad indentation of a mapping entry (2:10)
                                  1 | version: 1
                                  2 |  frontend:
                                  --------------^
                                  3 |  phases:
                                  4 |  preBuild:
2022-12-02T23:52:19.140Z [INFO]: # Starting environment caching...
2022-12-02T23:52:19.686Z [INFO]: # Environment caching completed
Terminating logging...

Additional information
No response

As the error says, the problem is that the buildspec is incorrectly indented. You can see the error in any YAML validator tool online too:

You can read more about YAML indentation here: https://www.tutorialspoint.com/yaml/yaml_indentation_and_separation.htm

Thank you for the reply, I have updated the yml file indent, tried two online validators and passed both. The file content has been updated in the original post.
Now the build error is:

2022-12-03T00:52:54.552Z [ERROR]: !!! CustomerError: The artifacts key was not provided in the build spec


Rename interfaces to spawner

In principle we are just implementing different ways of spawning compute tasks on different queuing system.

Done in https://github.com/pyiron/executorlib/pull/398


Include Python and Django badges in TECH stack ( README )

GO GET IT!

@kavyashree2001 hey will like to work on this ?

@himanshu007-creator  I would like to work on this issue...please assign me this issue!

Great @kavyashree2001  I will like to  help  you in this !!
Those batches are added from https://github.com/Ileriayo/markdown-badges This repository !! You have to add  the links of Python and Django as told by @himanshu007-creator  !! in read me file !! Please let me know if you need any help !!

Great @kavyashree2001  I will like to  help  you in this !!
Those batches are added from https://github.com/Ileriayo/markdown-badges This repository !! You have to add  the links of Python and Django as told by @himanshu007-creator  !! in read me file !! Please let me know if you need any help !!

Yeah sure!

@kavyashree2001 , umm it appears , you created a PR to self.  Thats no the way,
What you need to do now?

in your forked repo, open the include-badges  branch
click on compare, make sure the following:-
Base repository  = himanshu007-creator/SFC-foundations
base= master
head repository = kavyashree/SFC-foundations
compare = include-badges
Ahter checking all four, create the PR, in  description  type Resolves #235


Reader changes external reference

Describe the bug
Microsoft.OpenApi.Readers 1.3.2 changes external references, that contains the character #.
The behavior of Microsoft.OpenApi.Readers 1.2.3 is as expected. It does not change external references. I did not check other Versions.
Example:
Reference in the OpenAPI file: https://gigantic-server.com/schemas/Monster#/?id=foo
After reading: https://gigantic-server.com/schemas/Monster#/components/schemas//?id=foo
To Reproduce
Use the following code to read 'readFile' and write 'writeFile'.
Open the two files in a compare tool.
Code:
        using var stream = new FileStream(readFile, FileMode.Open);
        var doc =
            new OpenApiStreamReader(
                    new OpenApiReaderSettings
                    {
                        ReferenceResolution = ReferenceResolutionSetting.DoNotResolveReferences
                    })
               .Read(stream, out _);

        var sb = new StringBuilder();

        var writer = new OpenApiYamlWriter(new StringWriter(sb, new CultureInfo("en_us")));

        doc.SerializeAsV3(writer);

        File.WriteAllText(writeFile, sb.ToString());

readFile:
    openapi: 3.0.1
    info:
      title: anyOf-oneOf
      license:
        name: MIT
      version: 1.0.0
    paths: { }
    components:
      schemas:
        Nested:
          type: object
          properties:
            AnyOf:
              anyOf:
                - $ref: '#/components/schemas/OneOf'
                - $ref: file:///C:/MySchemas.json#/definitions/ArrayObject
                - $ref: https://gigantic-server.com/schemas/Monster#/?id=foo
                - $ref: '#/components/schemas/ExtRef'
            OneOf:
              oneOf:
                - $ref: ../foo/schemas.yaml#/components/schemas/Number
                - $ref: '#/components/schemas/ExtRef'
                - $ref: '#/components/schemas/AnyOf'
                - type: string
        OneOf:
          oneOf:
            - $ref: ../foo/schemas.yaml#/components/schemas/Number
            - $ref: file:///C:/MySchemas.json#/definitions/ArrayObject
            - $ref: https://gigantic-server.com/schemas/Monster#/?id=foo
            - $ref: '#/components/schemas/ExtRef'
            - $ref: '#/components/schemas/AnyOf'
            - type: string
        AnyOf:
          anyOf:
            - $ref: '#/components/schemas/OneOf'
            - $ref: ../foo/schemas.yaml#/components/schemas/Number
            - $ref: file:///C:/MySchemas.json#/definitions/ArrayObject
            - $ref: https://gigantic-server.com/schemas/Monster#/?id=foo
            - $ref: '#/components/schemas/ExtRef'
        ExtRef:
          $ref: https://www.mid.de/OpenAPI/Schema/foo#/

writeFile:
    openapi: 3.0.1
    info:
      title: anyOf-oneOf
      license:
        name: MIT
      version: 1.0.0
    paths: { }
    components:
      schemas:
        Nested:
          type: object
          properties:
            AnyOf:
              anyOf:
                - $ref: '#/components/schemas/OneOf'
                - $ref: file:///C:/MySchemas.json#/components/schemas//definitions/ArrayObject
                - $ref: https://gigantic-server.com/schemas/Monster#/components/schemas//?id=foo
                - $ref: '#/components/schemas/ExtRef'
            OneOf:
              oneOf:
                - $ref: ../foo/schemas.yaml#/components/schemas/Number
                - $ref: '#/components/schemas/ExtRef'
                - $ref: '#/components/schemas/AnyOf'
                - type: string
        OneOf:
          oneOf:
            - $ref: ../foo/schemas.yaml#/components/schemas/Number
            - $ref: file:///C:/MySchemas.json#/components/schemas//definitions/ArrayObject
            - $ref: https://gigantic-server.com/schemas/Monster#/components/schemas//?id=foo
            - $ref: '#/components/schemas/ExtRef'
            - $ref: '#/components/schemas/AnyOf'
            - type: string
        AnyOf:
          anyOf:
            - $ref: '#/components/schemas/OneOf'
            - $ref: ../foo/schemas.yaml#/components/schemas/Number
            - $ref: file:///C:/MySchemas.json#/components/schemas//definitions/ArrayObject
            - $ref: https://gigantic-server.com/schemas/Monster#/components/schemas//?id=foo
            - $ref: '#/components/schemas/ExtRef'
        ExtRef:
          $ref: https://www.mid.de/OpenAPI/Schema/foo#/components/schemas//

Expected behavior
The content of writeFile and readFile should be equal.
Screenshots/Code Snippets

Additional context

Thank you for reporting this.  This issue seems to be as a result of us adding support for inlining external references to OpenAPI descriptions.  We currently don't support external references to files that are not OpenAPI descriptions (what we call fragments).   However, we should not be changing the URL to external files that are fragments.  I will investigate.


[clang-tidy] Display errors from all non-system headers

Use -header-filter=.* to display errors from all non-system headers.

I think we should introduce a switch to be able to retain the old behavior.
--no-reports-from-headers or similar

 Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- web/tests/libtest/codechecker.py  1
- analyzer/codechecker_analyzer/analyzers/clangtidy/analyzer.py  1

See the complete overview on Codacy

 Here is an overview of what got changed by this pull request:

Complexity increasing per file
==============================
- analyzer/codechecker_analyzer/analyzers/clangtidy/analyzer.py  1
- web/tests/libtest/codechecker.py  1

Clones removed
==============
+ analyzer/codechecker_analyzer/cmd/check.py  -1
+ analyzer/codechecker_analyzer/cmd/analyze.py  -1

See the complete overview on Codacy

@gyorb We have test cases for this, so it should work.
I also tried it by analyzing tmux with the default configuration. It doesn't show me new warnings too. However when I analyzed it with the --enable-all option it introduced me a couple of new bugs.


Showing shortforms of BSL skills in search result cards

We need to show shortforms of the BSL skill labels in the search result cards for better scalability. I already added them in the translations (bs1lShort, bsl2Short, bsl3Short, bsl4Short) but didn't want to push it too far with blindly (i. e. without working search results on my local build) changing anything more. 😁
Can you take care of this Philipp? I'm also interested in a short explanation of how this is set up in case I do need to change it again in the future.

Can you have a look @topialla @frwms? So I basically changed the displaying of BSL skills in the search results card. If you think this is ok close the issue @topialla :)

Sorry, I missed this. Looks fine to me! Paging @topialla in case he also missed the notification 😄

I actually now discovered the notification feature in git hub tbh ;-p


Promote UseGardenerNodeAgent feature gate to beta

How to categorize this PR?

/area open-source
/kind enhancement
What this PR does / why we need it:
Promote UseGardenerNodeAgent feature gate to beta and turn it on by default.
Which issue(s) this PR fixes:
Part of https://github.com/gardener/gardener/issues/8023
Special notes for your reviewer:
/cc @oliver-goetz
Release note:

The `UseGardenerNodeAgent` feature gate has been promoted to beta and is now turned on by default.

/retest

/lgtm

/approve


Skip empty bucket creation by default

Hive on Tez does not create them, so other readers support that by
necessity.

Does CDH Hive support this?

Does CDH Hive support this?

By default, Hive doesn't do bucket pruning.
And actually I don't know how to force it do this.
I remember I once tried and failed.

@pettyjamesm does Athena correctly read bucketed data created by e.g. Tez (some bucket files missing)?


Parsing HTML with regular expressions

I've hit the bug illustrated by this failing test in which ' + generate() + ' is fed into Sass.
I'm not terribly excited about patching this regex; what are your thoughts on using Nokogiri/Oga here instead? How much of a concern is performance?

This is working now that YorickPeterse/oga#56 is resolved.

I don't think we want to do this for v3-stable, can you re-target at master and I'll merge it in


Add after_validation_lambda lambda callback + support batching.

Hi,
This commit is adding a after_validation_lambda to return validated lines with data and error messages if not valid.
You can as well batch this lambda with a batch option if you wanna get 1000 results by 1000 results for example.
See README.md for more information.
Regards,

Ok now it's working well.


Added -zstd_implementation=cgo option.

Allows to select cgo implementation of zstd if compiled in.
The cgo implementation is more performant than pure go implementation,
see https://github.com/buchgr/bazel-remote/issues/482 for actual benchmarks and dicussion.
Stats show that with cgo implementation the overhead of zstd compression itself is much lower -  40% vs 160% for downloading. It increases possible bandwidth for downloading from bazel-remote from 100MB/s to 190MB/s per single cpu the bazel-remote runs on, so roughly 2x.
For uploading the difference is smaller - 310% vs 490%, the overhead is big mainly because a) compression is slower than decompression in zstd case, and b) bazel-cache needs to perform also sha256 computation, which from basic observations is similarly expensive as zstd compression at faster levels. It increases upload of whole bazel-remote from 45MB/s to 64MB/s.
See https://github.com/glukasiknuro/go-zstd-benchmarks/tree/master/bazel-remote-load-test#results---download

This landed in #559.

Uh, thanks Mostyn for taking care of it!


Improve startup time

its jumped to 4 secs. Sorry. Fixing :rose:

It's sub second at the moment so closing. Haven't found a way to make a further massive difference.


Add AsRef for Binary

This is mostly just for convenience.

Thanks for the pull request! Out of curiosity, when is .as_ref() preferable over the existing .as_slice() function?

Thanks for the pull request! Out of curiosity, when is .as_ref() preferable over the existing .as_slice() function?

I believe as_slice doesn't let you do polymorphism, i.e. you cannot specify an input type parameter. I know I'm pretty much using the same definition for the as_ref here, the difference being the input type. I think this behaves a bit more appropriately when inter-oping with erlang refs. I'll try n find some example code where I hit rustler complaining that AsRef wasn't implemented for Binary, hence this draft :)

Hey @vihu, did you manage to find an example of rustler complaining about AsRef?

Hey @vihu, did you manage to find an example of rustler complaining about AsRef?

Oh man, this was a while ago, I don't quite recall where I saw it. I think it was somewhere in rocker when I was trying to update it to use new ruslter api.
In any case, I think this PR is probably stale now, so I'm fine if you just want to close it.

@vihu Thanks for the reply! I will close this for now. We can reopen if someone stumbles over the problem again.


Adjust browser view width

The browser view is too narrow to properly view images and full-text side by side.
The iframe should be allowed to take over the entire screen width.
Additionally, in our testing, we noticed that just having the image view by default is not practical for quickly identifying if the OCR-D results are useful.
If possible we would like to have the text view open by default. @bertsky is there a setting in browse-ocrd to support this?

If possible we would like to have the text view open by default. @bertsky is there a setting in browse-ocrd to support this?

The default is a Page view, but also the default fileGrp is OCR-D-IMG, so there are no annotations to be shown.
We could change that (select the deepest/latest annotation by default) in the future, yes. I have created an issue.

Also, if possible, we should open the "window" in "full-screen" inside Broadway's page pane

Fantastic – much obliged @hnesk!

@hnesk The --fullscreen mode has no effect within the iFrame. Currently, we are using the-mr modes for this reason. Is this a bug in the OCR-D Browser, or does this option not work in iFrames or browser windows in general? If possible, it would be optimal to add an option for hiding the GTK decoration.

The iFrame is now being stretched across the entire window with the PR #40 . Only the navigation menu is still visible above it.


Remove version: Ryujinx.Ryujinx.Ava version 1.1.1125

All InstallerUrls returned 404 Not Found

https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1125/test-ava-ryujinx-1.1.1125-win_x64.zip

Microsoft Reviewers: Open in CodeFlow

URL: https://github.com/Ryujinx/release-channel-master/releases/download/1.1.1125/test-ava-ryujinx-1.1.1125-win_x64.zip
Response status code does not indicate success: 404 (Not Found).
(Automated message - build 896)


Switch to official logging library

Let's start using the slog package instead of go-kit logger.

Fixed by https://github.com/promhippie/dockerhub_exporter/pull/184


Cron, MongoDB example

This example show periodic ingress from MongoDB with cron.

LGTM

For this to show up in docs it needs to be added to the TOC

@joey, it is linked under examples: http://pachyderm.readthedocs.io/en/latest/examples/readme.html


Reserve cancel rockets

In this branch, I implemented the following:

Cancel and Reserve reducers;
Toggle button to switch between reserve and cancel rockets;
Styling to match the original wireframe buttons;

Hi @RicardoEgas  ,
Your project is complete!  There is nothing else to say other than... it's time to merge it :shipit:
Congratulations! 🎉
To Highlight 💯

No linters errors ✔
Descriptive pull request ✔
Descriptive commit messages ✔
Good use of GitHub flow ✔

[x]  Please check the comments under the review.

Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
[OPTIONAL] You have done a good project so far, but if allow me, I kindly suggest you improve your design by making it responsive.
Cheers, and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me on( @MenendezON  ) in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


[Script]: Add Sorting visualiser in python

Aim
Visualise different sorting algorithms
Details
The py script will visualise the sorting algorithms
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

Go Ahead @MisterMickey


Login via Google OAuth2

use passport.js

@burtonjc The feature with this where  login button doesn't appear when someone is already signed in, I have a question of where to begin.  Would this be best done by writing js in the passport.js file,  or with angular then including that in the index.jade?


padding in D2QuestDataStrc  / D2QuestGUIDStrc

struct D2QuestDataStrc
{...
D2QuestGUIDStrc tPlayerGUIDs;			        //0x1C
uint16_t dw9E;							//0x9E
struct D2QuestGUIDStrc						//sizeof 0x84
{
uint32_t nPlayerGUIDs[32];				//0x00 - players that have entered the quest zone
uint16_t nPlayerCount;					//0x80
uint8_t pad0x82[2];						//0x82
};
If the padding of 2 bytes is in D2QuestGUIDStrc and the size 0x84, then it shouldn't also be in D2QuestData, right?

Thanks, it was indeed an error. Fixed !


Using the model to compute embeddings

Hello,
Big thanks for your work!!
I would like to compute the audio embeddings to try to cluster several bioacoustic events.
Therefore, I would like the pretrained model to be trained on AnimalSpeak (BioLingual model).
In the huggingface description/documentation looks like BioLingual can only be used with the pipeline, and that to get the audio embeddings it is necessary to load the CLAP pretrained weights.
I was wondering if this code below would be correct?
`
import torch
import torchaudio
from transformers import ClapModel, ClapProcessor
waveform, fs = torchaudio.load('wav_example.wav')
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = ClapModel.from_pretrained("davidrrobinson/BioLingual").to(device)
processor = ClapProcessor.from_pretrained("davidrrobinson/BioLingual", sampling_rate=fs)
inputs = processor(audios=waveform[0, :], return_tensors="pt", sampling_rate=fs).to(device)
audio_embed = model.get_audio_features(**inputs)
`
Thank you for your advice!
Best,
Clea

Hi, yes this looks right to me. You'll just need to make sure the audio is already at 48khz, as I don't believe the huggingface processor will resample automatically.
If you do get any results on clustering performance for unseen classes, I'd be curious to learn how it performs.

Hi David,
Yes indeed I was resampling it to 48kHz. The clusters I get are actually pretty good (I apply a UMAP reduction to the feature space before clustering). I just submitted the paper where I used it, so I can share it once it is (hopefully) accepted :)


[WIP] E2E tests for network connectivity

Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes #(issue)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

[ ] Test A
[ ] Test B

/rebase

/hold

Pull Request Test Coverage Report for Build 252739618

0 of 0   changed or added relevant lines in 0 files are covered.
2 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.02%) to 50.774%

Files with Coverage Reduction
New Missed Lines
%

internal/liqonet/tunnelEndpointCreator-operator.go
2
65.4%

Totals

Change from base Build 249972862:
-0.02%

Covered Lines:
6754

Relevant Lines:
13302

💛  - Coveralls


 in Previous with UTF-8 mode enabled

Hello,
Consider this simple example. (with the UTF-8 mode enabled)
+ i am *
- <set name=<star>> You are <get name>.

+ no
% you are <get name>
- Ok.

It works with
- I am Jim.
- You are Jim.
- No.
- Ok.

But does not works with
- I am Léon
- You are Léon.
- No.
No response found

I know that

[UTF-8 mode] is considered an experimental feature because all of the edge cases of supporting Unicode haven't been fully tested.

But it is the first trouble we got with the utf-8 mode so I report it.

Hello,
I get another trouble with utf-8 mode. When utf-8 mode is enabled, if the last character of an alternative expression  is accented, then the trigger don't work with the expression concerned.
Consider this simple example. (with the UTF-8 mode enabled):
+ hello [andré|léon]
- Hello human

It works with:
+ hello léon
- Hello human

But doesn't work with:
- hello andré
No response found


[FEATURE REQUEST] Enhancing Footer Component Hover Effects

Description
Is your feature request related to a problem? Please describe.
The current footer components lack hover effects or have underwhelming ones. This creates a bland user experience and reduces the potential for user engagement with the footer's functionalities.
Describe the solution you'd like
Improve the visual appeal and interactivity of the website's footer by implementing engaging hover effects on all its components.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional Information
Context
Provide any additional context or information that helps explain the feature request.
Potential Implementation (optional)
If you have any ideas or suggestions on how the feature could be implemented, please share them here.
Screenshots or Mockups (optional)

Priority (optional)
Please indicate the priority level of this feature request (e.g., High, Medium, Low).
Additional Notes (optional)
Add any other notes or comments about the feature request here.

Under GSSOC 24,
we can add underline effects while hover and can change the color also when we hover on the name .
please assign this problem to me as I'm a frontend developer I can make the footer better.

Please assign me this issue under ssoc


add fairingrey to rust async team roster

I'd like to add myself to the rust async team roster! Hopefully I'm doing this right.

Description

Motivation and Context

How Has This Been Tested?

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.

You're doing basically the same thing every additional team member has done (see #108, #87, #47, and #45 for details). This is how the team grows: interested parties add themselves to the roster.
I, for one, really appreciate your work so far. Welcome to the team!


Default install suggests adding heartbeat_interval

We should consider setting plugin.rabbitmq.heartbeat_interval for RMQ connector.

Hello:
Is this still needed?

I would close this, the two values are being set as of this commit: 7477246

thanks for the report


feat: add github-url-prefix to .yfm

@arcadia-devtools Ship it!

@yndx-birman, please agree to the CLA (https://github.com/catboost/catboost/blob/master/CONTRIBUTING.md#provide-contributions)

@kizill, internal review request created: 2003003


Interpreter discovery experiment: Relative interpreter path shown doesn't have ~

Environment data

VS Code version: 1.53.0-insider, commit 8490d3dde47c57ba65ec40dd192d014fd2113496
Extension version (available under the Extensions sidebar): 2021.2.531887795-dev
OS and version: macOS Big Sur (11.2)
Opted into all experiments ('All')

[NOTE: If you suspect that your issue is related to the Microsoft Python Language Server (python.languageServer: 'Microsoft'), please download our new language server Pylance from the VS Code marketplace to see if that fixes your issue]
Expected behaviour
If the interpreter path shown is relative to the user home folder, prefix it with ~. Otherwise, show absolute path.
Actual behaviour
Some relative paths don't start with ~:

Related #15289


Account Verification Enhancements

Tasks

[x] Update account verify behavior to force the user to click a "Verify" button instead of basing verification on the page visit.  This was causing issues due to Outlook visiting the page with the BingPreview bot before the user actually clicked on the link.  (Issue)
[x] Make account verification mandatory before first login.

[x] Do not automatically sign users in upon successful registration
[x] Display a flash message to users directing them to open their email and verify
[x] Do not allow unverified accounts to log in
[x] Add a flash message to login flow for unverified users

[x] Don't delete verification codes that have already been exchanged.
[x] Create messaging around "expired" verification codes (to prevent confusion from errors being thrown for repeated verification attempts)

Tasks per review with @bchiaruttini :

[ ] when inactive users activate their account via password reset flow, mark them verified as well
[ ] update all current 'active' users to be verified
[ ] update verified status when admin changes active status from false -> true in the admin ui

I have a question about the account verification error messages that we can discuss on Wed.  thanks.


Is it possible to start the drag immediately, on mouse down?

I've noticed that when I click and start dragging an element, I have to move the mouse around 4px before the drag event actually starts. This is happening in all the examples, as well as in the dragstart event docs, so I think this is just a limitation of the HTML5 drag API.
Is it possible to manually start the drag as soon as the click happens? Maybe adjust the "tolerance" somehow so that the dragstart event fires immediately?

See the new Draggable library from Shopify.
I would really like to see a backend that supported "mouse events" instead of the native HTML5 API. Draggable uses mouse events by default, and it's a much more responsive user experience: https://github.com/Shopify/draggable#options

I'm quite sure this is a limitation of Html5 in general.
You might have a look at https://github.com/zyzo/react-dnd-mouse-backend, which has stagnated but would be a good starting point for a mouse events backend.

@cormacrelf Awesome, thanks for the link! I was just starting to work on my own mouse backend using mouse events. I think I might have to continue working on my new backend though, because this looks like it's very out of date.

I'm going to start working on it over here - https://github.com/FormAPI/react-dnd-mouse-backend

Watching your repo because I target IE10 ☹  Did you actually try it? I don't think the backend interface has changed very much.
It might be worth stealing some code from something like https://github.com/bevacqua/dragula or even Draggable JS itself. Getting cloned elements and tracking the mouse is a pretty well beaten to death problem.

Haha wow, I should have tried it first. I didn't expect it to work after a year of no updates, but yeah, it actually works perfectly fine. Wow that makes such a big difference to my app.
There might be a few missing things, but I haven't run into anything problems yet. I'm also not sure if @zyzo is still maintaining it, but everything seems fine for now.

@gaearon - Would it be possible to merge the react-dnd-mouse-backend into react-dnd and provide official support for this?

I doubt it, but at least a section in the docs to list more backends and frontends would help.
My upcoming Angular front end deserves a shout out even if it’s Facebook policy to pretend Angular doesn’t exist :) I wish I could use React, I really do. I don’t know of many other front ends (someone copied this repo and called it preact-dnd), but there’s also react-dnd-multi-backend for switching backends based on browser capability. Very cool.


Challenge 2

Fixes https://github.com/scaffold-eth/se-2-challenges/issues/16
Frontend, contracts, tests, and deploying works as expected
Some questions:

Should I add Install node/yarn/git to readme or it should be only in the first challenge?
Should I remove gitpod?
Should I add that million console.logs from original scaffold-eth frontend?
Do we need usd equivalent for tokens? We show user balance in Eth by default, so it's strange to show that usd.

Should I show transfer/sell blocks if a user didn't buy tokens? Currently, I hide it.
Should I move part of readme before install to home page?

TODO:

[x] Remove/comment Solidity code
[x] Remove/comment Frontend code
[x] Fix Todos

Hey @rin-st! Thanks for working on this.

Should I add Install node/yarn/git to readme or it should be only in the first challenge?

I think we can keep them. They do not take up much space, and it can be useful if someone skip some of the first challenges.

Should I remove gitpod?

Yep, at least for now.

Should I add that million console.logs from original scaffold-eth frontend?

haha. No. You can have some of them if you think they are useful.

Do we need usd equivalent for tokens? We show user balance in Eth by default, so it's strange to show that usd.

Yep, maybe not. It looks a bit confusing.

Should I show transfer/sell blocks if a user didn't buy tokens? Currently, I hide it.

Not a strong preference. Whatever you think is best.

This is not live yet, so happy to merge this even if is not perfect, and iterate over it.

Added some changes. I didn't remove solidity code for now, just commented. Probably we'll need it to fix things. Also, moved Vendor balances to the top block, so it becomes clear how tokens move.
If you need to test things, checkout to e559ee1 - commit before commenting code
Current version:

This is looking great @rin-st
Maybe we can remove the contract code now.
@ZakGriffith is going to take a look (he has a lot of context with the SRE challenges) too.

Thanks @Pabl0cks ! Regarding tests, check hardhat:test script, it's the same. So it seems it's easier to change readme than duplicate scripts

about the testcommand:
yarn hardhat:test is the official for SE-2 (thinking that in the future we might have front-end tests) But I guess yarn test has more historical weight, so we added also it to the other challenges (could be seen like an alias?)

I agree, this is solid and is very close to being complete. @Pabl0cks I see you're adding some changes to the PR, would you prefer we wait to merge this PR until those are complete?

I agree, this is solid and is very close to being complete. @Pabl0cks I see you're adding some changes to the PR, would you prefer we wait to merge this PR until those are complete?

I've just pushed my changes on the README, not going to make more changes for now. Can merge if you see them fine 👌

Great job all!
Merging this since it looks pretty solid. Let's iterate on it in new PRs if needed.


waylock: 0.4.2 -> 0.5.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/ifreund/waylock/releases.
meta.description for waylock is: A small screenlocker for Wayland compositors
meta.homepage for waylock is: https://github.com/ifreund/waylock
Updates performed

Version update

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.5.0 with grep in /nix/store/ha8wwg5rqrcxjgyxsw61zamgzraa7s5s-waylock-0.5.0
found 0.5.0 in filename of file in /nix/store/ha8wwg5rqrcxjgyxsw61zamgzraa7s5s-waylock-0.5.0

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

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
waylock

Instructions to test this update (click to expand)

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

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

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

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

1 package built:

waylock

Maintainer pings
cc @jordanisaacs for testing.

Since it hasn't been merged yet, could line 41 be tweaked to address https://github.com/NixOS/nixpkgs/issues/185665?
The general approach taken by many packages right now seem to be to add -Dcpu=baseline (although I have some doubts[0]).
[0] - https://github.com/NixOS/nixpkgs/issues/185665#issuecomment-1328295046


Add a limit of 5000 lines to the web app runner

I left make run running for a few days straight with the fancy runner enabled, and it managed to start lagging because of how much output it had saved up
Release Note
NONE

I'm going to skip the second dev review since, as far as I know, I'm literally the only person using this way of running the web app


Crash when we can't run main()

Also, in testing, crash when we can't load a library off disk.

LGTM


Output save UI

Summary
The save functionality on the output display has a more detailed save UI.
New Behavior
When you click on the "Save" button in the sidebar of the output result page, the section on the right side of the page (where patient data and logger messages normally display) will show a save form. The form lets the user pick an output folder, select whether they want to save the logger messages, and select which patient files they want to save. When the user hits "Save" in the form, the data they selected will be saved to the folder they selected. An alert will appear informing the user if the save process succeeded or if there were any issues.
Code Changes

Changes to the functionality of the "Save" button in the sidebar
Added SaveOutputForm component
Renamed PatientData.js to OutputDisplay.js to more accurately describe its purpose
Made changes to save-related functions in preload.js and electron.js
CSS / styling changes

Testing Guidance
Launch the app with npm start. Click on "Extract New". Run extraction with any valid data. In the result page, click on "Save" in the sidebar. Click on "Cancel", a patient, or "Logger Messages" to leave the save form. Try selecting various options in the form (include / exclude logger messages, no folder selected, select all, no files selected, some files selected, etc.) and then saving.

If you choose to include logger messages, a file called "logger-messages.log" will be included in the output folder
Patient data files will be named in the same manner as how the extraction framework would name them
If a patient is not checked, their file won't be included
If no files are checked, a yellow warning alert will appear
If no folder is selected, a red error alert will appear and display the error message
When you click "Select All", all patients will be selected. If you then de-select a patient, "Select All" will also be de-selected
If the save process succeeds, a green success alert will appear

I have emphasized the "Select All" checkbox by making the label bold and an accent color. Do you guys think this is enough to distinguish it, or should I try one of the other options (like indenting the rest of the list)?

For me I think the SelectAll looks good as is 😄

Last thing I can think of: Having the select log messages checkbox at the top of the page is a little unintuitive.

Could we maybe move that checkbox below the others, and add a label above it (maybe something like "Additional Save Options") to act as a header above the checkbox?
Thinking about that, could we maybe change "Select Files to Save" to be "Select Patients to Save"?

Was a little too quick with my approval, but I think the additional changes requested are small enough 😄

This is looking really good. One thing I noticed though, which I'm not sure if I tested this before or not, but when I deselect the log messages, they still download. Have either of you seen this behavior?


ARROW-11070: [C++] Implement power / exponentiation compute kernel

This is to resolve https://issues.apache.org/jira/projects/ARROW/issues/ARROW-11070.

I'm not sure about two things:

Is Exponentiate a good name or should we go with Power? I picked Exponentiate as all the other operation names are verbs so Power feels inconsistent.
Should we add overflow checking logic?

I'm not sure about two things:
* Is `Exponentiate` a good name or should we go with `Power`? I picked `Exponentiate` as all the other operation names are verbs so `Power` feels inconsistent.

I prefer power which is used widely. But I'm bad at naming, so would like to hear other comments.

* Should we add overflow checking logic?

I don't think so. Let it be infinity looks okay.

Thanks for the feedback @cyb70289. I'll do another commit tomorrow and kindly ask for feedback after.

@cyb70289 Could you please have another look?
I've added the docs and some tests.
As for 0 raised to negative integers I'm leaning more towards the way R/C++ way as it is more general mathematically and can be de-generalized in other layers.

Should we also add a benchmark? I see other kernels have them.

Yes we should. It can be in another pr.
Thanks for persistent in improving this pr. Will review soon.

Should we also add a benchmark? I see other kernels have them.

Yes we should. It can be in another pr.

I've added the benchmark. I hope I've not missed something there.

Thanks for persistent in improving this pr. Will review soon.

Thanks for the feedback! :)

@cyb70289 is this good to merge now? (The RTools35 CI failure has been fixed on master)

Will merge when CI is green.

Record things to improve, will create Jira to track.
Power kernel is modified from add/sub/mul/div kernels. But power is much more complicated than basic arithmetic operations. Some limitations in current implementation:

Base and exponent must be the same type, this is not reasonable
Null handling is delayed to the end, and power is always calculated even for nulls (with whatever base/exponent happen to be in the slots). This is a big waste of time for expensive power calculations.

CI failure is unrelated, will merge this. @rok please link on here the followup JIRA when you make it.

Created jira task to track improving power kernel: https://issues.apache.org/jira/browse/ARROW-12413


Scrape from list

I've been using your Collab notebook and your blog post about building a text-generating Twitter bot with GPT-2. I would like to train a bot on tweets from an entire Twitter list, as opposed to a single user.
Twint supports scraping a list but doesn't remove replies like this script does, and that's important as you point out in your blog post.
Ideally, a user of this script could use something like this:
python3 download_tweets.py <twitter_list_URL>
This is my first issue or feature request. Very open to feedback!

The script has been updated to include the ability to scrape tweets from multiple accounts, which are listed in a text file.  It isn't as turnkey as your recommendation, but now, you don't have to scrape each Twitter account independently.


[CT-948] [Feature] Adding Metric Tree Parsing Helper Functions to dbt Core

Is this your first time opening an issue?

[X] I have read the expectations for open source contributors

Describe the Feature
Right now, the dbt_metrics package uses a macro called get_metric_tree to traverse the graph in reverse order and get the following information for each metric that is used:

full_set: the full list of metrics that are used in the macro call.
parent_set: the list of metrics upstream of the metrics used in the macro call. NOT inclusive of expression metrics - this list is only comprised of base metrics
expression_set: the list of expression metrics used in the macro call. Inclusive of ones listed or upstrea
base_set: the list of metrics listed in the macro call.
ordered_expression_set: the list of expression metrics + their depth. Starting at 999 and moving donwards to limit to 1k. Ex:

metric a: 999
metric b (downstream of a): 998

Helper Functions
This is a list of helper functions that I believe would satisfy the same needs that we currently use the metric tree for:

get_full_metric_list:

Function: This function would traverse through the dag in the opposite direction of 1 or more provided metrics and return a list of all metrics upstream of them. Inclusive of metrics listed in input
Input: 1+ metrics via the format metric('metric_name')

get_base_metric_list:

Function: This function would traverse through the dag in the opposite direction of 1 or more provided metrics and return a list of all base (non-expression) metrics upstream. Inclusive of metrics listed in input
Input: 1+ metrics via the format metric('metric_name')

get_expression_metric_list:

Function: This function would traverse through the dag in the opposite direction of 1 or more provided metrics and return a list of all expression metrics upstream of them. Inclusive of metrics listed in input
Input: 1+ metrics via the format metric('metric_name')

get_ordered_expression_metric_list:

Function: This function would traverse through the dag in the opposite direction of 1 or more provided metrics and return a list of all expression metrics upstream of them. It would also contain a numeric representation of the depth of the expression metric  Inclusive of metrics listed in input
Input: 1+ metrics via the format metric('metric_name')
Output: A list of dictionaries like: ['metric_a':1, 'metric_b':2]

I believe we can get away from having a get_base_metric_list because we can have that just be the input from the macro now that we don't need to iterate recursively over a dictionary like we're doing now. Additionally we might be able to get away with just the second expression metric list .`
Describe alternatives you've considered
The alternative is the current implementation in the dbt_metrics package.
Who will this benefit?
Anyone using the dbt_metrics package (ie anyone using the Semantic Layer) and the developer/maintainers of the package!
Are you interested in contributing this feature?
Yes! I'd love to try and write some of these helper functions.
Anything else?
This is the link to the jinja code that currently accomplishes similar functionality.

@callum-mcdata Thanks for the thorough write-up! I believe we must prioritize some or all of this refactoring work, ahead of declaring metrics + the dbt-metrics package ready for mature use.
There's one important piece I don't see here, which is constructing the relations for models upstream of metrics. Currently, the dbt-metrics package does that via graph introspection. I think we should investigate using real ref resolution instead, provided by a dbt-core helper. It yielded the issue in #5525. We can resolve that one by other means, but we can't guarantee that we won't run into more weird edge cases.

There's one important piece I don't see here, which is constructing the relations for models upstream of metrics. Currently, the dbt-metrics package does that via graph introspection. I think we should investigate using real ref resolution instead, provided by a dbt-core helper. It yielded the issue in https://github.com/dbt-labs/dbt-core/issues/5525. We can resolve that one by other means, but we can't guarantee that we won't run into more weird edge cases.

I'd hoped using a ref resolution would be a simple swap in the dbt_metrics package but unfortunately it ran into some issues as seen here. Would a dbt-core helper allow us to sidestep the conditional block ref issue?


SES.confine: find better exception-unwrapping solution

SES.confine (in a child realm) delegates directly to r.evaluate on the enclosing (parent) RootRealm. To avoid leaking the parent Realm's exception objects, if that r.evaluate throws an exception, we replace the exception object with one we build from the child realm. The code we use for this is identical to the code that r.evaluate uses when wrapping exceptions raised in the child: https://github.com/Agoric/SES/blob/f32edcb77101c052d3a6e5696f8ff7d6c4060dba/src/bundle/createSES.js#L61
As a result, when SES.confine sees an exception, we rewrite it twice: once from child to parent, then again from parent back to the same child. This feels a bit silly, and it'd be nice to have a better approach. Fundamentally, SES.confine is the two-argument safe eval() that we wish javascript had to begin with. If we could arrange to expose this from within the realm, rather than only on the parent's controller object, then we wouldn't need to map/rewrite/wrap exceptions at all.
This might take the form of Realm.evaluate, which would be a static method on the Realm constructor object (as opposed to r.evaluate, which is a normal method on the constructed object). It would simply be equal to the existing internal safeEvaluator() defined by the Realms shim (used to implement both eval() and the Function constructor).
const r = Realm.makeRootRealm();
const a = r.evaluate(code);
const b = r.evaluate('Realm.evaluate(code)', { code });
// a and b are equivalent

Of course having two methods named evaluate is probably too confusing. Calling it Realm.confine might work, given that it behaves the same way as the SES.confine that this module creates.

Overall:

Rewriting exceptions to avoid cross-realm leaks is no longer necessary.
Realm.confine and/or Realm.evaluate are not sufficiently granular.

If there is a need for an evaluator that supports endowments, we could consider Compartment.evaluate(). However, in SES, endowments are only necessary to emulate a lexical scope in order to support modules. However:

In SES 2.0, endowment are part of the options bag of evaluate().
Endowments on the evaluator are not supported on XS, and any code relying on it won't be portable on that engine.
Endowments on the evaluator are also not normative (not part of the SES proposal).

Performance:

If an application needs an evaluator that takes endowments, we must first ask why?, because creating an extra scope of resolution is expensive (it adds to the resolution scope).
If an application wants to reuse one compartment, freeze the global, and reuse it with multiple evaluations parametrized with different endowments, this won't provide a clear performance gain:

First, compartments are lightweight, and designed so their creation is cheap.
Second, supporting endowments in the shim is expensive, because the scope proxy needs to be recreated at each evaluation and cannot be reused.

Still, if an application needs to provide a parametrized evaluator inside a compartment, it can create a global for that use case:
const cmp = new Compartment();
const evaluate = (src, options) => cmp.evaluate(src, options);
cmp.global.evaluate = evaluate;

Closing, not required.

A further note on how to cope with an apparent need for a per-module endowment. (This came up during the TC53 meeting yesterday, Feb 25 2020.)
Common JS (CJS) Modules, the module system Node uses prior to standard EcmaScript Modules (ESM), has per-module bindings of require and module. If we supported per-evaluation endowments, that would have been a natural way to support CJS modules on SES when that is desired. In its absence, however, we can support CJS modules on SES in the same way that Node itself supports CJS: Threat the CJS module body as a function body, wrap it in a function providing require and module parameters, and effectively provide per-module bindings for those bindings by invoking that function. Rather than wrapping the module textually, we can use the SES Function constructor to do that wrapping. This works because CJS modules are syntactically EcmaScript scripts, not EcmaScript modules, and any syntactically valid EcmaScript script is also a syntactically valid EcmaScript function body. Unlike EcmaScript scripts, and like EcmaScript function bodies, CJS modules have no completion value.
More generally, anytime we might have wanted to do
evaluate(src, { endowments });

ignoring completion value; assuming a predicate varName that tests whether a string is a valid EcmaScript variable name, we can instead do
const names = getOwnPropertyNames(endowments).filter(varName);
new Function(`{ ${names.join(',')} }`, src)(endowments);

Thus, there's no significant loss of generality in removing per-evaluation endowments from direct support in SES. We lose only the ability to capture the completion value, which is not an issue for the one known use case: emulating CJS modules.


3d particle texture atlas

make it so that in the 3d particle effect editor (Flame), if a texture region
is used, the name of the sub-image (region) is stored. This makes it so that if a texture atlas is updated, the uv-coordinates of the region can be read from the atlas rather than having the uv coordinates stored in the particle effect save file.

(sorry, didn't mean to close the request)


bot.unload_module doesn't work

Describe the bug
A clear and concise description of what the bug is.
Are you using TwitchIO within a Discord Bot?
No
What commit of TwitchIO are you using?
?
To Reproduce
Steps to reproduce the behaviour:
bot.unload_module("Cogs.lsn")
Expected behaviour
A clear and concise description of what you expected to happen.
want to unload the cog lsn.
Screenshots
If applicable, add screenshots to help explain your problem.
Ignoring exception in command: module 'Cogs.lsn' has no attribute 'breakdown': Traceback (most recent call last):   File "C:\Users\gmjal\.virtualenvs\TBot-G7gHstML\lib\site-packages\twitchio\ext\commands\bot.py", line 526, in handle_commands     await ctx.command._callback(ctx, *ctx.args, **ctx.kwargs)   File "F:\TBot\bot.py", line 31, in reload_commands     bot.unload_module(f"Cogs.{filename[:-3]}")   File "C:\Users\gmjal\.virtualenvs\TBot-G7gHstML\lib\site-packages\twitchio\ext\commands\bot.py", line 216, in unload_module     module.breakdown(self) AttributeError: module 'Cogs.lsn' has no attribute 'breakdown'
(please complete the following information):

OS: Windows 10 20H2

Additional context
Nothing

Please add a function called breakdown to your module. It should remove any cogs that belong to the module

Additionally, this is not actually an issue with twitchio, please join the discord server for help with the library, as the readme recommends


docs: add cross reference for default constraint

Add cross reference of option to use default constraint with latest-allowed or min-required.
Fixes: https://github.com/tofuutils/tenv/pull/124#issuecomment-2102510145

@apeabody looks great, thank you for contribution!


fix cassandra multi-dc timed out when run migrations bootstrap

Summary
Following the issue #7451, this fix ensures CREATE TABLE propagated through in the C* cluster eventually before INSERT

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@mikefero @locao Can you review it? ^^

Hello @mrpk1906,
Thanks for the contribution. I did followed your exchange with @mikefero in #7451 as well but this fix does raises the following concerns for me:

The fact that INSERT was moved to teardown still doesn't guarantee that the CREATE was actually fully propagated before executing INSERT. It is more about adding a random delay after CREATE, but I think the actual race condition is still there, just less often.
Moving the cluster_id generation to the teardown phase doesn't seems to be the right approach. Suppose the user started the blue/green deployment and upgraded part of the cluster to a newer version, those Kong instances are going to be looking for it's cluster_id but wouldn't be able to find. Since the user can theoretically run in this state (without teardown being executed) for a long time, this doesn't seems to be the expected behavior either. Usually in teardown we only do things that would break older versions of Kong, generating the cluster_id certainly doesn't fall under that category.

Not an C* expert here, but does anyone know if there is any way we can wait for C* schema change to reach an agreement before executing the INSERT inside the up portion of the migration?

It is more about adding a random delay after CREATE, but I think the actual race condition is still there, just less often.

Completely agree with you here; Apache Cassandra is eventually consistent and each query can use a different set of nodes based on the coordinator chosen during query execution. It is very hard to have guarantees.

Not an C* expert here, but does anyone know if there is any way we can wait for C* schema change to reach an agreement before executing the INSERT inside the up portion of the migration?

The Lua Cassandra driver should be handling the schema agreement during query execution, but I think we might want to change the migration consistency ALL => LOCAL_ONE; see migrations options here. This of course has its own drawbacks as the data may not get fully replicated around the cluster and when executing kong start and the admin API is used some tables may not be available in the Cassandra cluster causing runtime errors.
Another (slightly better) option might be to use the value defined in cassandra_write_consistency and cassandra_read_consistency during the migrations instead of relying on the overloaded ALL in the helper class. This would put the onus on Kong Gateway OSS configuration instead of trying to infer a users Cassandra cluster configuration.
Besides those, to answer your real question, we could move to up_f and use the exposed wait_schema_consensus and check_schema_consensus from the Lua Cassandra driver and create a wrapper method to handle the logic.
Note: If a issue exists in the driver related to schema agreement (which I am pretty sure it does not) we should fix the issue in the driver for the reasons @dndx mentioned in the comments above.

@mikefero

use the exposed wait_schema_consensus and check_schema_consensus from the Lua Cassandra driver and create a wrapper method to handle the logic.

This definitely sounds like the much better approach, and if done correctly should basically prevent this kind of problems from ever occurring again.


[WIP] chore(Carbon): update to v10.17.0

Closes #1323
Closes #1469
Smoke testing our v10.17 release candidate (with a bonus v10.16 bump coming along for the ride :surfer:)
To test
I'll include a list of bug fixes per relevant packages to check for bugs and breaks:
carbon-components-react

fix(dropdown): add ...other prop (#6479) (810168bf8)
fix(Copy): avoid label text mismatch (#6428) (177a6bd77)
fix(SideNav): a11y fixes for SideNavMenu, MenuItem (#6468) (efa7a9bb1)
fix(dropdown,multiselect): add support for refs on buttons (#6441) (2485371ed)
fix(react): update downshift to 5.2.1 (#6418) (69151cc8c)
fix(multiselect): remove aria-selected prop (#6440) (2692813cc)
fix(pagination-nav): add data-page attributes (#6437) (8c84f349b)
fix(react): add prop adapter for downshift changes (#6427) (0037736f7)
fix(react): update useId to match id on server and client (#6369) (6d3e3dc6c)
fix(data-table): sortable, boolean column, and overflow menu row fixes (#6268) (5d7986990)
feat(CodeSnippet): allow copy button to be optional (#6505) (ad4d9a298)
feat(grid): add narrow grid mode (#6520) (2c7f9aab5)
feat(modal): support alertdialog aria role (#5955) (825f03ab7)
feat(text-input): add warn prop (#5918) (a5e27b74c)

carbon-components

fix(text-area): apply disabled text token to textarea content (#6495) (b8ff37f69)
fix(Copy): avoid label text mismatch (#6428) (177a6bd77)
fix(time-picker): remove extra css reset (#6483) (b08054434)
fix(button): ensure rem in variable definition level (#6470) (ba5afb6ef)
fix(SideNav): a11y fixes for SideNavMenu, MenuItem (#6468) (efa7a9bb1)
fix(theme-tokens): increase button padding to match spec (#6457) (6aeb25fe5)
fix(tooltip): change default styles (#6451) (af9543160)
fix(layout): adjust z-index values (#6365) (c2a8be5cb)
fix(form): fix rerender issue with helpertext on safari (#6394) (066cec250)
fix(InlineLoading): update success svg color (#6359) (082b7e4a0)
fix(dropdown): add list-box import as dependency (#6414) (83d0df577)
fix(inline-dropdown): set min width to prevent shrinkage (#6297) (2c9c98108)
fix(data-table): sortable, boolean column, and overflow menu row fixes (#6268) (5d7986990)
feat(CodeSnippet): allow copy button to be optional (#6505) (ad4d9a298)
feat(grid): add narrow grid mode (#6520) (2c7f9aab5)
feat(text-input): add warn prop (#5918) (a5e27b74c)

@carbon/themes

feat(ContentSwitcher): add support for light variant (#6442) (c5445a57f)

👍  I'm working through this PR to resolve testing failures and complete the upgrade on our end, we have a couple related issues to fix as part of this.

@dakahn if you wouldn't mind giving me access to push to your fork I can push the fixes directly to this PR instead of opening a new one.
I've got all test failures resolved except an issue with ComboBox that I'm still working to figure out.

I can also just close this PR and we can reopen another one if that's cleaner :surfer:

This is now ready to review while I tie up some loose ends
I need to finish increasing test coverage for ComboBox (it's slightly below 80% after the refactor to remove CarbonComboBox). I also updated with latest from master and there's 2 newly failing tests I'll fix.

@tay1orjones Awesome! Latest master is v10.18. Do you mean this includes that release now?

@dakahn No, sorry for the confusion - I meant the latest from our repo.

Release notes working draft below. I'll update it with notable items as we review this. Once published, I'll edit the release notes in github and copy/paste the markdown, and make note of it in slack so consumers are aware of items they'll have to mitigate.

Important items to note when upgrading:
This release updates our Carbon version to v10.17.0
Modifications to dropdown listbox rendering

This update includes a new version of downshift. All dropdowns (Dropdown, ComboBox, etc) no longer render the ListBox until the list has been opened. This means that any automated tests that assert or interact with listbox items will need to be refactored to first open the dropdown. You can see in the PR how we refactored many of our tests to fix this.

Tooltips that are snapshot tested need an id

A bug was introduced with the unique IDs of Tooltips. Any tooltip that you snapshot test will need to have an id that is identical to tooltipId, otherwise every time the snapshot is updated it will have a new value and continually fail. We've opened PR https://github.com/carbon-design-system/carbon/pull/6744 to address this in Carbon.

@davidicus focus issue has been fixed and I believe all other comments addressed, please re review
@sstone2423 I've responded to your comments - I think we're good to go pending your re-review.

:tada: This PR is included in version 2.114.4 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Improve error message for wrong environment in config

Thanks a lot @Samox for the contribution :)
Sorry it slipped under our radar and totally forgot about it until today


Concatenate 3D array with 2D array

The 3D array has three dims: z, y and x.
The 2D array has two dims: y and x.
When I try to concatenate them by expanding the 2D array with z dim, there's something wrong in _dataset_concat
MCVE Code Sample
import xarray as xr
import numpy as np

x = 2
y = 4
z = 3
data = np.arange(x*y*z).reshape(z, x, y)

# 3d array with coords
a = xr.DataArray(data, dims=['z', 'y', 'x'], coords={'z': np.arange(z)})

# 2d array without coords
b = xr.DataArray(np.arange(x*y).reshape(x, y)*1.5, dims=['y', 'x'])

# expand 2d to 3d
b = b.expand_dims('z')

# concat
comb = xr.concat([a, b], dim='z')

Expected Output
Same as np.concatenate:
concat_array = np.concatenate((a, b))
comb = xr.DataArray(concat_array, dims={'z', 'y', 'x'})

<xarray.DataArray (z: 4, x: 2, y: 4)>
array([[[ 0. ,  1. ,  2. ,  3. ],
        [ 4. ,  5. ,  6. ,  7. ]],

       [[ 8. ,  9. , 10. , 11. ],
        [12. , 13. , 14. , 15. ]],

       [[16. , 17. , 18. , 19. ],
        [20. , 21. , 22. , 23. ]],

       [[ 0. ,  1.5,  3. ,  4.5],
        [ 6. ,  7.5,  9. , 10.5]]])
Dimensions without coordinates: z, x, y

Problem Description
    comb = xr.concat([a, b], dim='z')
  File "E:\miniconda3\envs\satpy\lib\site-packages\xarray\core\concat.py", line 135, in concat
    return f(objs, dim, data_vars, coords, compat, positions, fill_value, join)
  File "E:\miniconda3\envs\satpy\lib\site-packages\xarray\core\concat.py", line 455, in _dataarray_concat
    join=join,
  File "E:\miniconda3\envs\satpy\lib\site-packages\xarray\core\concat.py", line 395, in _dataset_concat
    raise ValueError("%r is not present in all datasets." % k)
ValueError: 'z' is not present in all datasets.

As suggested by @dcherian, assigning the coordinate label by changing b = b.expand_dims('z') to b = b.expand_dims(z=[3]) makes it work.
Versions
Output of `xr.show_versions()`

INSTALLED VERSIONS
commit: None
python: 3.7.6 | packaged by conda-forge | (default, Jan  7 2020, 21:48:41) [MSC v.1916 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
libhdf5: None
libnetcdf: None
xarray: 0.15.1
pandas: 1.0.3
numpy: 1.18.1
scipy: 1.4.1
netCDF4: None
pydap: None
h5netcdf: None
h5py: None
Nio: None
zarr: None
cftime: <IP_ADDRESS>
nc_time_axis: None
PseudoNetCDF: None
rasterio: 1.1.3
cfgrib: None
iris: None
bottleneck: None
dask: 2.10.1
distributed: 2.14.0
matplotlib: 3.2.1
cartopy: 0.17.0
seaborn: 0.10.0
numbagg: None
setuptools: 46.1.3.post20200325
pip: 20.0.2
conda: None
pytest: None
IPython: 7.13.0
sphinx: 2.4.4

Hi, @zxdawn
Thank you for raising the issue.
I think you need an actual value of z as your b.expand_dims('z') does not have a value for z but it only knows the z is the dimension name.
You can do like
b['z'] = 3  # add a scalar coordinate named 'z'

to add a value (we call it coordinate) for z
Then, your script will work,
b = b.expand_dims('z')  # expand 2d to 3d
comb = xr.concat([a, b], dim='z')

Thanks, @fujiisoup .
@dcherian decided to improve the error message later. So, I will leave this open.

Ah, OK. Makes sense. Thanks.

import xarray as xr
import numpy as np
x = 2
y = 4
z = 3
data = np.arange(xyz).reshape(z, x, y)
3d array with coords
a = xr.DataArray(data, dims=['z', 'y', 'x'], coords={'z': np.arange(z)})
2d array without coords
b = xr.DataArray(np.arange(x*y).reshape(x, y)*1.5, dims=['y', 'x'])
expand 2d to 3d
b = b.assign_coords({'z':3})
comb = xr.concat([a, b], dim='z')
perhaps you need another thing.
http://xarray.pydata.org/en/stable/generated/xarray.concat.html
** consist of variables and coordinates with matching shapes
if you compare your shape are differents a.shape and b.shape
Regards.
Javier Ruano.
El mié., 8 abr. 2020 a las 1:36, Xin Zhang<EMAIL_ADDRESS>escribió:

The 3D array has three dims: z, y and x.
The 2D array has two dims: y and x.
When I try to concatenate them by expanding the 2D array with z dim,
there's something wrong in _dataset_concat
MCVE Code Sample
import xarray as xrimport numpy as np
x = 2
y = 4
z = 3
data = np.arange(xyz).reshape(z, x, y)
3d array with coords
a = xr.DataArray(data, dims=['z', 'y', 'x'], coords={'z': np.arange(z)})
2d array without coords
b = xr.DataArray(np.arange(x*y).reshape(x, y)*1.5, dims=['y', 'x'])
expand 2d to 3d
b = b.expand_dims('z')
concat
comb = xr.concat([a, b], dim='z')
Expected Output
Same as np.concatenate:
concat_array = np.concatenate((a, b))
comb = xr.DataArray(concat_array, dims={'z', 'y', 'x'})
<xarray.DataArray (z: 4, x: 2, y: 4)>
array([[[ 0. ,  1. ,  2. ,  3. ],
[ 4. ,  5. ,  6. ,  7. ]],
   [[ 8. ,  9. , 10. , 11. ],
    [12. , 13. , 14. , 15. ]],

   [[16. , 17. , 18. , 19. ],
    [20. , 21. , 22. , 23. ]],

   [[ 0. ,  1.5,  3. ,  4.5],
    [ 6. ,  7.5,  9. , 10.5]]])

Dimensions without coordinates: z, x, y
Problem Description
comb = xr.concat([a, b], dim='z')

File "E:\miniconda3\envs\satpy\lib\site-packages\xarray\core\concat.py", line 135, in concat
return f(objs, dim, data_vars, coords, compat, positions, fill_value, join)
File "E:\miniconda3\envs\satpy\lib\site-packages\xarray\core\concat.py", line 455, in _dataarray_concat
join=join,
File "E:\miniconda3\envs\satpy\lib\site-packages\xarray\core\concat.py", line 395, in _dataset_concat
raise ValueError("%r is not present in all datasets." % k)
ValueError: 'z' is not present in all datasets.
If I change b = b.expand_dims('z') to b = b.expand_dims(z=3) as suggested
by @dcherian https://github.com/dcherian , I still get the same error.

Reply to this email directly, view it on GitHub
https://github.com/pydata/xarray/issues/3954, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIGDFO45LDV75NEZWY5FKLDRLPILFANCNFSM4MDRZJZQ
.


bug with 1.32.3

Bug
Operating system: PC
Game version:  Phantom Liberty
CET version: 1.32.3
GPU: GEForce RTX 4090
Description
When I upgraded from 1.32.2 to 1.32.3 and the mods menu disappeared from the game.  Also, some mods (like night vision) no longer worked, and my key binding to bring up CET no longer worked.  Reverting to 1.32.2 corrected the issues.
Expected behaviour
Write here what you expect to happen instead.
Reproduction
Write here step by step how to reproduce the issue if applicable.

Download latwst VC redist, you probably have outdated one.
Download abd install both of these, reopen in case it doesnt help.
https://aka.ms/vs/17/release/vc_redist.x86.exe
https://aka.ms/vs/17/release/vc_redist.x64.exe

CET always uses latest VC2022 runtime when it gets updated so first thing to try is definitely installijg newer redist.


Can't compile on OSX / llvm 3.8.1 / #30fdda9a

I'm trying to compile on OSX with llvm 3.8.1 and latest commit ( https://github.com/crystal-lang/crystal/commit/30fdda9a3b9b5d690505ef9f3be94ee152451cbf atm )
I get the error:
○ git log|head -n 1
Tue Jul 19 10:55:22 2016 -0300 30fdda9 (HEAD -> master, upstream/master) Merge pull request #2991 from crystal-lang/feature/ecr_dash  [Ary Borenszweig]

Then compiling, here is the output:
○ make clean crystal
rm -rf .build
rm -rf ./doc
rm -rf src/llvm/ext/llvm_ext.o
rm -rf src/ext/sigfault.o src/ext/libcrystal.a
c++ -c -o src/llvm/ext/llvm_ext.o src/llvm/ext/llvm_ext.cc `/opt/boxen/homebrew/bin/llvm-config --cxxflags`
cc -I/opt/boxen/homebrew/include -fPIC   -c -o src/ext/sigfault.o src/ext/sigfault.c
ar -rcs src/ext/libcrystal.a src/ext/sigfault.o
CRYSTAL_CONFIG_PATH=`pwd`/src ./bin/crystal build  -o .build/crystal src/compiler/crystal.cr -D without_openssl -D without_zlib
Deprecation: The build command was renamed to compile and will be removed in a future version.
Error in ./src/fiber.cr:26: this 'initialize' doesn't explicitly initialize instance variable '@stack_top' of Fiber, rendering it nilable

The instance variable '@stack_top' is initialized in other 'initialize' methods,
and by not initializing it here it's not clear if the variable is supposed
to be nilable or if this is a mistake.

To fix this error, either assign nil to it here:

  @stack_top = nil

Or declare it as nilable outside at the type level:

  @stack_top : (Pointer(Void))?

  def initialize(@name : String? = nil, &@proc : ->)
      ^~~~~~~~~~

make: *** [.build/crystal] Error 1

Please tell me if this information is not enough and need to inform anything else.
🙇

I'm building using crystal v0.18.0 I think this is the problem, I'll downgrade llvm on machine and upgrade to crystal 0.18.7 before build using master

Yes, please always updated to the latest release before trying to compile master.

writing my solution as future reference (and if someone get here):
brew switch llvm 3.6.2 # or other working version you have
# install crystal 0.18.7
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/1397338efe0037f9edd655fe662794cb4c01cad1/Formula/crystal-lang.rb
brew switch llvm 3.8.1
# then install from source

correctly @jhass , my bad 😢 ... thank you!


Validate version when writing systemVM's checksum in metadata.ini

Description
When building ACS, module engine-schema downloads the system VMs' checksums from https://download.cloudstack.org/systemvm/X/ through templateConfig.sh and puts them into metadata.ini. The method that gets the checksums only validates the hypervisor name, which works fine when we have only the major version; however, when we also have minor versions, it ends up adding all checksums of a hypervisor into metadata.ini:
lab@management:~$ cat /usr/share/cloudstack-management/templates/systemvm/metadata.ini

[ovm3]
templatename = systemvm-ovm3-4.16.0
checksum = 38f84087c5d96548c50a2b52a2856fef
d889b6e490018360f93e54240d74bf93
downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-ovm.raw.bz2
filename = systemvmtemplate-4.16.0-ovm.raw.bz2

[xenserver]
templatename = systemvm-xenserver-4.16.0
checksum = 6015c93583c7388e6b3e0e7bc6e3517c
3ccf327c1b0a9c96c506547bf1a6869a
downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-xen.vhd.bz2
filename = systemvmtemplate-4.16.0-xen.vhd.bz2

[vmware]
templatename = systemvm-vmware-4.16.0
checksum = 606db78c5d138e96d53b4699e77789b2
f55d3b858b708f3103660d83021cb702
downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-vmware.ova
filename = systemvmtemplate-4.16.0-vmware.ova

[hyperv]
templatename = systemvm-hyperv-4.16.0
checksum = 88fe0da9ebaa27d710af708131b9bf32
2d21855fe179a7ce214ffc46c77fac8d
downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-hyperv.vhd.zip
filename = systemvmtemplate-4.16.0-hyperv.vhd.zip

[lxc]
templatename = systemvm-lxc-4.16.0
checksum = 2f3747a597396d4ee6a2605648808d1a
5108eeb0547912a41cb2bc508985f89f
downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-kvm.qcow2.bz2
filename = systemvmtemplate-4.16.0-kvm.qcow2.bz2

[kvm]
templatename = systemvm-kvm-4.16.0
checksum = 2f3747a597396d4ee6a2605648808d1a
5108eeb0547912a41cb2bc508985f89f
downloadurl = https://download.cloudstack.org/systemvm/4.16/systemvmtemplate-4.16.0-kvm.qcow2.bz2
filename = systemvmtemplate-4.16.0-kvm.qcow2.bz2

When we run the management-server, this behavior causes an error that blocks ACS bootstrap:
2022-02-23 01:49:14,993 ERROR [c.c.u.SystemVmTemplateRegistration] (main:null) (logid:) Failed to parse systemVM template metadata file: /usr/share/cloudstack-management/templates/systemvm/metadata.ini
org.ini4j.InvalidFileFormatException: parse error (at line: 5): d889b6e490018360f93e54240d74bf93
	at org.ini4j.spi.AbstractParser.parseError(AbstractParser.java:53)
	at org.ini4j.spi.AbstractParser.parseOptionLine(AbstractParser.java:85)
	at org.ini4j.spi.IniParser.parse(IniParser.java:101)
	at org.ini4j.spi.IniParser.parse(IniParser.java:62)
	at org.ini4j.Ini.load(Ini.java:109)

This PR intends to validate also the version when getting the system VMs' checksums.
Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity
Bug Severity

[x] BLOCKER
[ ] Critical
[ ] Major
[ ] Minor
[ ] Trivial

How Has This Been Tested?
I built the packages, installed into a local lab, verified the file metadata.ini (which must have only the checksum of the version being built) and started the management-server.

@blueorangutan package

@GutoVeronezi could you please share with which version did you face this issue, as it was addressed and the following: https://github.com/apache/cloudstack/blob/main/engine/schema/templateConfig.sh#L64 should handle it.

Hi @Pearl1594, I faced this issue in 4.16, however, I didn't noticed that #5863 solved it. I'll close this PR. Thanks.


[FLINK-14282] Simplify DispatcherResourceManagerComponent hierarchy

What is the purpose of the change
Remove unnecessary subclasses of AbstractDispatcherResourceManagerComponent
and rename this class into DefaultDispatcherResourceManagerComponent. Moreover,
this commit removes the unnecessary generics from the DispatcherRunnerFactory
to further simplify the code base.
Verifying this change
This change is already covered by existing tests, such as (please describe tests).
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable)

I've pushed a fixup commit which removes the subclasses of the DefaultDispatcherResourceManagerComponentFactory @TisonKun.


Pin Ubuntu 22.04 on validate-images job to unblock the CI

A permanent solution that works on ubuntu-latest (24.04) will be investigated.

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

Project coverage is 86.68%. Comparing base (88fdc1c) to head (48eea4e).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
+ Coverage   83.03%   86.68%   +3.65%
==========================================
  Files         138       84      -54
  Lines       17266    14290    -2976
  Branches      486        0     -486
==========================================
- Hits        14336    12387    -1949
+ Misses       2747     1903     -844
+ Partials      183        0     -183

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Since node-sass v.2 error returns an object

When setting errLogToConsole the output now is: [gulp-sass] [object Object]. That is because node-sass since v.2 now returns an object instead of an string.
When using your own callback by setting onError an object is now returned instead of a string. That object looks like this:
{
    status: int,
    file: '',
    line: int,
    column: int,
    message: '',
    code: int
}

I'm seeing this in the output of gulp:
[15:34:09] Starting 'sass'...
[15:34:09] [gulp-sass] [object Object]
[15:34:09] [gulp-sass] [object Object]
[15:34:09] Finished 'sass' after 14 ms

Could this be related?

Yep. Because gulp-sass tries to write an object as an string. You can try handling the error with your own function until it's fixed. Do that by using the onError option, something like:
.pipe(sass({
    errLogToConsole: false,
    onError: function(err) {
        gutil.log('[gulp-sass] ' + err.message + ' on line ' + err.line + ' in ' + err.file);
    );
}

pr merged. thanks!


SQLx is significantly slower than postgres / tokio-postgres

Bug Description
I've been using sqlx for a long time until recently I discovered its performance is really, really bad. I did a benchmark on my laptop and it yielded a ridiculous 150x speed difference with regards to tokio-postgres.
Benchmark code

Things I've tried:

Using a single connection instead of connection pool: That sped up around 2x, but a 70x difference still exists.
Using sqlx::query!: Nothing changed.
Enabling / disabling TLS: Nothing changed.

Info

SQLx version: 0.6.3
SQLx features enabled: ["runtime-tokio-native-tls", "postgres", "time", "chrono"]
Database server and version: Postgres 15.2 (Ubuntu 15.2-1.pgdg22.04+1)
Operating system: Ubuntu 22.04.2 LTS
rustc --version: rustc 1.68.0 (2c8cc3432 2023-03-06)

Could you also try with 0.7.0-alpha.2 or with the main branch?
There have been many changes in 0.7 and some of them could also be performance improvements

Could you also try with 0.7.0-alpha.2 or with the main branch? There have been many changes in 0.7 and some of them could also be performance improvements

Tried both but nothing changed.
c.bench_function("sqlx", |b| {
    let opt = DATABASE_URL
        .parse::<PgConnectOptions>()
        .unwrap()
        .disable_statement_logging();
    let rt = Runtime::new().unwrap();
    let db = rt
        .block_on(PgPoolOptions::new().max_connections(50).connect_with(opt))
        .unwrap();
    b.to_async(rt).iter(|| async {
        sqlx::query("select db_id from lc_map where lc_id = $1")
            .bind(rand_token())
            .fetch_optional(&db)
            .await
            .unwrap();
    });
});

I would expect this to be related with connection pipelining (which tokio-postgres does by default AFAIK).
See also https://github.com/launchbadge/sqlx/issues/408

I found the cause. My table schema is:
create table lc_map(
  lc_id char(24) primary key,
  db_id int not null
);

To execute the statement (fetch_optional), both SQLx and tokio-postgres have to fetch parameter types from the server. The difference is, SQLx specifies the parameter type to be TEXT (from here), while tokio-postgres specified nothing.
As a result, the parameter type returned from the server is still TEXT for SQLx, but is BPCHAR for tokio-postgres. Then, in the encoding phase, SQLx encodes the String as TEXT while tokio-postgres encodes it as BPCHAR. For some reason, using TEXT as encoding format is significantly slower than BPCHAR.
To prove that this is the reason, I specified BPCHAR instead of TEXT in SQLx and then everything works fine.
If we stop specifying the parameter types then the problem shall be resolved. But I'm not sure if that's the best solution.

then everything worked fine

So? The results with this edit?

So? The results with this edit?

I'd say a fairly high portion of the time SQLx takes still comes from the connection pool, as I mentioned in the issue, but I had difficulties writing a single connection version (it panics with this functionality requires a Tokio context)

Changing the column type from CHAR(24) to TEXT or VARCHAR(24) also significantly reduces the time, though being slightly slower than the edit above (~200μs)

Okay. I checked the query plans for select * from lc_map where lc_id = 'id'::text and select * from lc_map where lc_id = 'id'::char(24), and found that the former one uses a SeqScan while the later one uses IndexScan. That's the root cause.

I fail to see how this is a SQLx bug, honestly. Even the Postgres manual recommends against using the char(N) type: https://www.postgresql.org/docs/current/datatype-character.html

While character(n) has performance advantages in some other database systems, there is no such advantage in PostgreSQL; in fact character(n) is usually the slowest of the three because of its additional storage costs. In most situations text or character varying should be used instead.

Theoretically it should still be able to perform an index scan with a text value, but this is obviously triggering some sort of pessimization in the query planner because it doesn't think the types should be compatible. It's worth checking if this is a known bug in Postgres, because the char(N) type is probably not used all that much.

I'd say a fairly high portion of the time SQLx takes still comes from the connection pool, as I mentioned in the issue, but I had difficulties writing a single connection version (it panics with this functionality requires a Tokio context)

That's because SQLx executes I/O in the same async task where it's invoked while tokio-postgres spawns its own task for managing the connection and communicates via channels, so it cares less about the actual async context where it's invoked as long as the Tokio runtime it started on is still running. If the code was similar to what you posted, I don't see why there would be an issue as Criterion should be using the same Tokio runtime for both.
I've thought about changing to the same execution strategy as tokio-postgres which would fix a number of issues and also allow pipelining, but that's a non-trivial refactor.

@NiiightmareXD interesting!

My comment in Discord from a few months ago: https://discord.com/channels/665528275556106240/665528275556106243/1224663060707541022

[...] it's not fair to compare the SQLx benchmark to the axum [postgresql] benchmark because the latter gets a separate connection and single-threaded Tokio runtime per core, so it has zero contention.
The SQLx benchmark includes the overhead of the pool, which is unfortunately not insignificant. However, it falls within an order of magnitude of the axum [postgresql - deadpool] benchmark, and the salvo [postgres-sqlx] benchmark even gives the axum/salvo+deadpool benchmarks a run for their money by checking out a connection at the top of the response handler to amortize the overhead.
Despite them technically being our competitors, I honestly think Diesel has fairer benchmarks, and they show us as quite competitive, with significant improvements over the past year: https://github.com/diesel-rs/metrics

I thought this was curious as well.
So I looked into the code at https://github.com/TechEmpower/FrameworkBenchmarks/tree/master/frameworks/Rust/axum
I suspect that a major performance difference relates to prepared statements.
pg (which uses tokio-postgres) uses prepared statements.
let world = cl.prepare(common::SELECT_WORLD_BY_ID).await.unwrap();

pub async fn fetch_world_by_id(&self, id: i32) -> Result<World, PgError> {
        self.client
            .query_one(&self.world, &[&id])
            .await
            .map(|row| {
                Ok(World {
                    id: row.get(0),
                    randomnumber: row.get(1),
                })
            })?
    }

main_sqlx does not use prepared statements.
for id in ids {
        let world: World = ::sqlx::query_as(common::SELECT_WORLD_BY_ID)
            .bind(id)
            .fetch_one(&mut *db.acquire().await.unwrap())
            .await
            .expect("error loading world");
        worlds.push(world);
    }

A user on Discord managed to get some pretty impressive improvements by optimizing the benchmarks with my help: https://discordapp.com/channels/665528275556106240/665528275556106243/1224793179698626700
I dunno if they ever opened a PR though.

@abonander

A user on Discord managed to get some pretty impressive improvements by optimizing the benchmarks with my help: https://discordapp.com/channels/665528275556106240/665528275556106243/1224793179698626700
I dunno if they ever opened a PR though.

I'm not able to open the link. Do I need to join the channel first? Which channel?

It's the most recent result if you search #general for "techempower"

@abonander Which server? Is there an sqlx discord server?

Yes, it's in our README as the "chat" badge, although admittedly that is really easy to miss:


Do not parse numeric values in Point coordinate setters

At the moment every value is parsed (even if it's already float) which means that parsing 0.00001 fails because (string) 0.00001 is 1.0E-5 and that fails in geo-parser (see https://github.com/creof/geo-parser/pull/7).

The is_numeric check is not sufficient, probably is_int || is_float should be used.
php -r "var_dump(is_numeric('+0123.45e6'));"
// true

@djlambert could you please take a look at this PR? :)

@JanJakes would you please reopen this PR against the develop branch? We moving to a GitFlow work flow and the code for the next release is being staged there. I'll add some tests and we'll get 1.1.2 released.

Reopened as https://github.com/creof/doctrine2-spatial/pull/141.


AdderNet for SR

Hi,
I see recent you have applying addernet for EDSR quantization, which is a great work.
But for some other SR, like EDVR, using deformable conv for the frame alignment.
I wonder whether addernet also be efficient, or even can be applied to this kind of network?
Since the DCNv2 using in EDVR is a irregular conv, how to adjust quantization int8 loss introduced by adderNet?
Do you have some thought over this kind of op?
Thx,
Lei

We have not try to replace the deformable conv by adder operation. AdderNet can also be efficient for this kind of network if successfully applied.
For the int8 quantization, we use the post-quantization (no retrain, no loss) and you may refer to https://arxiv.org/pdf/2101.10015 for more information.


Workflows are referencing vulnerable actions

Hello, there!
As part of the university research we are currently doing regarding the security of Github Actions, we noticed that one or many of the workflows that are part of this repository are referencing vulnerable versions of the third-party actions. As part of a disclosure process, we decided to open issues to notify GitHub Community.
Please note that there are could be some false positives in our methodology, thus not all of the open issues could be valid. If that is the case, please let us know, so that we can improve on our approach. You can contact me directly using an email: ikoishy [at] ncsu.edu
Thanks in advance

The workflow dotnet-core.yml is referencing action gittools/actions/gitversion/setup using references v0.9.7. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.
The workflow dotnet-core.yml is referencing action gittools/actions/gitversion/execute using references v0.9.7. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.
The workflow new-release.yml is referencing action gittools/actions/gitversion/setup using references v0.9.7. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.
The workflow new-release.yml is referencing action gittools/actions/gitversion/execute using references v0.9.7. However this reference is missing the commit 90150b4 which may contain fix to the vulnerability.

The vulnerability fix that is missing by actions' versions could be related to:
(1) CVE fix
(2) upgrade of vulnerable dependency
(3) fix to secret leak and others.
Please consider updating the reference to the action.
If you end up updating the reference, please let us know. We need the stats for the paper :-)

Fixed with 92cc46070a2f6647fcc0c147ca0a91a1e2ed3bfa


Endpoint for uploading profile picture

Description
We need an endpoint for mentors to specifically upload their profile picture. This should take in an image, hit the Imgur API, upload it, and finally store the Imgur URL.
You can reference the way YMCA handled this, but you'll also have to handle setting up our app with Imgur, etc.
Files
views/main.py
Tasks

[ ] Set up Imgur API
[ ] Hit Imgur API in endpoint
[ ] Store uploaded image URL in MentorProfile
[ ] Test on Postman- include the entire flow if you can record your screen (sending the request w/ the image, showing that the img was properly uploaded & the url works and is stored in profile)