Adding url decoding function to extend template functionality in easegress builder filters

I have submitted an issue regarding the content of the template field in the builder filters' spec. The template is defined using Golang's text/template package, with additional functions from the sprig package and custom functions defined by Easegress.
I encountered a situation where I received URL encoded data and needed to decode it within the builder filter's template. However, neither the sprig package nor the extra functions provided by Easegress have a built-in function for URL decoding.
To resolve this issue, I have added a custom 'urldecode' function to the extra functions as follows:
   var extraFuncs = template.FuncMap{
	"addf": func(a, b interface{}) float64 {
		x, y := toFloat64(a), toFloat64(b)
		return x + y
	},
       ........
	"urldecode": func(s string) string {
		ds, _ := url.QueryUnescape(s)
		return ds
	},
}

Within the template, I can now use the 'urldecode' function as follows:
 {{.responses.DEFAULT.JSONBody.data | urldecode}}

My question is: Are there any other recommended approaches or best practices for extending template functions in a more elegant and maintainable manner?

URL decoding (encoding) is a common scenario in the traffic orchestration system. I suggest providing users with helper functions for use in builder filters or predefined filter options.

As far as I know, I can't find a better way to extend the template functions except make a new pr for it? So, if you like, feel free to make a pr for it and please make sure to update the corresponding documentation.
By the way, with newest easegress, you can simplify  {{.responses.DEFAULT.JSONBody.data | urldecode}} to  {{. resp.JSONBody.data | urldecode}}.
Please check https://github.com/easegress-io/easegress/blob/main/docs/07.Reference/7.02.Filters.md#template-of-builder-filters for more details.

As far as I know, I can't find a better way to extend the template functions except make a new pr for it? So, if you like, feel free to make a pr for it and please make sure to update the corresponding documentation.
By the way, with newest easegress, you can simplify
{{.responses.DEFAULT.JSONBody.data | urldecode}}

to
{{.resp.JSONBody.data | urldecode}}

Please check https://github.com/easegress-io/easegress/blob/main/docs/07.Reference/7.02.Filters.md#template-of-builder-filters for more details.

Thank you for your suggestion. I will create a pull request to address this issue by adding the 'urlQueryEscape' and 'urlQueryUnescape' template functions to the builtin extraFuncs .

#1194


Login Page UI alignment issue

In Login page UI, the "For the students by the students" image and text are not centrally aligned properly. They are making ui look unclean. Assign me this issue under GSSOC'23 to make sure about proper alignment.

This comment is to assign the issue of "For the students by the students" image and text not being centrally aligned properly to @aashi-ihsaa
The issue is making the UI look unclean, and it needs to be fixed.
Please ensure that the image and text are centrally aligned properly, and that the UI looks clean and professional.
Thank you for your time and attention to this issue.


eco mode

would it be possible to add eco mode to the intergration?

Hi,
Unfortunately not at the moment. because in the app this option is not present and therefore we don't know how to send the encrypted value to the Airco.

According to the manual, all that ECO mode does is:

The unit operates 1.5 °C higher than the setting temperature during cooling or 2.5 °C lower than that during heating.

So no real function that needs to be implemented. This should also answer #66


update readme

Codecov Report

Merging #6 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master       #6   +/-   ##
=======================================
  Coverage   37.71%   37.71%
=======================================
  Files           2        2
  Lines         403      403
=======================================
  Hits          152      152
  Misses        251      251

Continue to review full report at Codecov.

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


feat(truncation): add truncation classes

Adds in Truncation Classes
Frontline truncation: .bx--front-line
Endline truncation: .bx--end-line
The user will need to add title to populate the tooltip when the truncated text is hovered over. The user will also need to configure the width of the container (or the text element itself) to calculate when truncation will start.
Example Usage:

  123456789

.container {
  width: 65px;
}

.bx--front-line {
  width: 100%;
  display: inline-block;
  direction: rtl;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

Result:

Midline truncation: Will create an example since this will require javascript.
Added

_helper-classes.scss file under globals/scss
@import 'helper-classes' in _layout.scss
.bx--front-line and .bx--end-line classes

Testing / Reviewing
Can use the example above to test out both classes

Currently, this is creating a new file _helper-classes.scss and is being imported in to _layout.scss. Wondering what @carbon-design-system/ui thinks of this structure, as it seems like we will have more helper classes being added in the near future.

It's not immediately clear to me that the classes bx--front-line and bx--end-line are related to truncation, could we maybe do something like bx--truncation-front-line or is that too long?

@marijohannessen I agree, the discoverability isn't great. Open to suggestions

I'm down for some variation of .bx--truncate--front or .bx--truncate--end, or if we need to organize around additional utility classes maybe some pattern like:
.bx--[type]-[behavior]--[variant]

Some ideas:
.bx--text-trunc--front
.bx--text-truncation--front
.bx--text-truncate--front
...


DOCS-452 Add orders creation to top level summary

Added 1 line to describe orders creation functionality.

 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.


Search UX Improvements

Audit the UX of our search experience. Considerations:

[ ] Should/can we build a full search results page?
[ ] Are search results behaving as expected/desired?
[ ] Is there any way we could restructure our metadata to improve search performance?
. . .

possibly duplicate of https://github.com/carbon-design-system/carbon-website/issues/588 ?

Don't think this is a duplicate. . . 588 is about search as a component in the design system, not the search on the carbon site itself.


validator crashes when def:Structure is absent in the define.xml

When developing SDTM mappings, we do not always exactly know the structure of the datasets in advance. In such cases, we do not have def:Structure being present yet in the define.xml. In such cases, when validating all the XPT files in the folder (we still are in our SDTM development state), validation crashes (see snapshot attached).
I realize absence of def:Structure raises an XML-Schema error when validating against the XML-Schema. So, when there is a define.xml file present, is there the requirement that it must at least be XML-Schema compliant? And that when it is not Schema-compliant, the validation crashes?
Maybe this should generate a warning, and not let crash the validation?
Version used is "development" on 2023-03-11.
We can discuss this in one of the next meetings ...

Solution AC

create a flag to allow xml syntax validation and schema validation of the define.xml.

if user chooses to allow schema validation and schema validation fails

continue validation of rules that do not involve define.xml
skip rules that do involve define.xml
Create a message within the report explaining that define.xml rules were skipped due to define.xml not validating against schema

If a user chooses not to allow schema validation,

If a rule fails due to a define.xml schema issue

Create a message within the report explaining that define.xml rules were skipped due to define.xml not validating against schema

Some test files attached (all for SENDIG-3.1)

SEND_define_DM_test_defStructure_absent.xml: define.xml file for DM without def:Structure
SEND_define_DM_test_defStructure_present.xml: define.xml for DM with def:Structure
SEND_DM_test_defStructure_absent.xlsx:  SEND file (Excel format) corresponding to the define.xml-s

You can use any CORE rule that uses the define.xml.
For SEND, e.g. rule SEND6, which tests the labels of the variables versus the one in the define.xml
For questions, please do not hesitate to contact me.

I could now also reproduce the issue using the CLI.
I attach a document about how to reconstruct the issues in both the YAML rule editor as well as using the CLI (in the "test" mode, as the rule for which this happens hasn't been formally published yet).
I also attach all the files as a zip.
CDISC-CORE Github Issue 295 validator.pdf
Define_no_defStructure_Github_Issue_295_test_files.zip

AC:
When validate Define-XML flag is set to true, perform validation and add error message to summary page if validation fails
When validate Define-XML flag is set to false, skip validation
Default flag to "TRUE"


Allow passkeys

Passkey portability is being developed, and once developed, passkeys may become widespread.
Strictly speaking they may not meet the definition of MFA, but I think they should be permitted. They're way better than passwords. Let's make that clear.

Need input from others on whether passkey is an acceptable alternative to MFA.

I can see arguments either way. However, I think there's a very good chance that passkeys will become more common, so it needs to be clear.
It is possible to implement passkeys in a way that also meets MFA. However, the most likely approaches are client-side use of a password or biometric check to unlock use of the passkey private key. An organization could have a policy requiring this, but it's impractical to have any kind of automated check for that, and it's the sort of policy that would be trivially ignored.


allow introspection field types to skip authentication

Hello,
Would you be open to making it configurable for users of graphql-guard to indicate that introspection fields should not be checked for authentication?
We've worked around this by using a policy_object, and checking for type.introspection? in the guard method of the policy_object itself, but it does feel like this should be offered out of the box.
If yes, I would even suggest it should be the default option, so that introspection fields would by default be "guard free", and if someone wants to hide their schema they would explicitly have to flip that option (but perhaps that's just me).
Happy to submit a PR if you think this is a sensible idea.
Cheers,
Vlad

Hey Vlad!
Thanks for opening the issue!
Do I understand correctly that you don't want to perform authentication to the fields like the following?
query {
  __schema {
    types {
      name
    }
  }
}

By default graphql-guard is disabled. So, it basically performs an authentication only if you specified guard on your field:
field :posts, !types[!PostType] do
  guard ->(obj, args, ctx) { false }
end

Or your policy object with the guard method doesn't return nil:
class GraphqlPolicy
  def self.guard(type, field)
    ->(obj, args, ctx) { false }
  end
end

If you use '*' with the policy objects, then you can either whitelist the fields:
class GraphqlPolicy
  RULES = {
    QueryType => {
      '*': ->(obj, args, ctx) { false },
      __schema: ->(obj, args, ctx) { true } # always accessible
    }
  }

  def self.guard(type, field)
    RULES.dig(type, field)
  end
end

Or don't use '*' and blacklist the fields:
class GraphqlPolicy
  RULES = {
    QueryType => {
      posts: ->(obj, args, ctx) { false }
    }
  }
end

Please let me know whether the solutions work for you.

Hi exAspArk,
yes that's exactly what I was referring to, thank you for the thorough walkthrough.
We opted for a whitelist policy, using a policy object very similar to the one in your example.
The reason I thought it might make sense to bake an option into the the gem to allow someone to whitelist all introspection types in one go, is that following the sample code in the usage guidelines we started enumerating all of them in the RULES hash and it quickly started feeling very hacky. Listing GraphQL(-ruby) types in the whitelist rules felt very out of place. Also as new types are added to the graphql-ruby gem in the future it implies things will break at some point.
We worked around this by using:  type.introspection? in the guard method, which is simple enough and catches all introspection types (__Schema, __Field, _InputType, etc).
if type.introspection? || WHITELIST.dig(type,field)

So that works fine and doesn't feel too hacky. It should be future proof too.
Also I realize from reading your response above that if someone opts for the WHITELIST approach then they should be prepared to whitelist everything - including having to deal with introspection fields - even if they come as a surprise :). After all that's the definition of a whitelist.
It may still make sense to give introspection fields some special treatment, only because I can't imagine anyone wanting to whitelist just a few of them. They'll either be whitelisted as a group, or not at all.
But I am just thinking out loud at this point. :)

Hey, @stanishev!

It may still make sense to give introspection fields some special treatment, only because I can't imagine anyone wanting to whitelist just a few of them.

Your point makes perfect sense 👍
However, seems like I was wrong, the following code doesn't affect introspection queries (at least in my case):
QueryType => {
  __schema: ->(obj, args, ctx) { false }
}

I'm still able to send an introspection query succesfully. Seems like graphql-ruby itself treats them differently:
query IntrospectionQuery {
  __schema {
    queryType { name }
    mutationType { name }
    subscriptionType { name }
    ...
  }
}

We worked around this by using: type.introspection? in the guard method, which is simple enough and catches all introspection types (__Schema, __Field, _InputType, etc).

Could you please describe what was the problem in your case? What do you have in the schema and which queries do you send? Which versions of graphql and graphql-guard do you use? If you remove type.introspection?, how does it affect the response?

Happy to submit a PR if you think this is a sensible idea.

Will be glad to accept your PR if we're able to identify and reproduce the problem  🙌

hi @exAspArk

However, seems like I was wrong, the following code doesn't affect introspection queries (at least in my case):
QueryType => {
__schema: ->(obj, args, ctx) { false }
}

yes, having that snippet in the whitelist rules did not work for us either as written. For this to work we'd have to use fully qualified graphql-ruby types (some pseudo code below, won't compile):
class GraphqlWhitelistPolicy
  @no_login_required = ->(_, _, _) { true }
  WHITELIST = {
      GraphQL::Introspection::FieldType => Set[:description, etc],
      GraphQL::Introspection::TypeType => Set[:kind, etc.]
      # etc
  }.freeze

  def self.guard(type, field)
    return @no_login_required if(WHITELIST[type] && WHITELIST[type].include?(field))
    ->(_, _, ctx) { // some login logic }
  end
end

but in any case, we moved away from enumerating these in the WHITELIST hash, and instead used the type.introspection? method as mentioned.
so the first line in the self.guard method above becomes:
return @no_login_required if type.introspection? || (if(WHITELIST[type] && WHITELIST[type].include?(field)))

Could you please describe what was the problem in your case?

I wouldn't call it a problem because the graphql-guard gem's whitelist policy does work as advertised and because handling the introspection fields turned out to be so simple. But it could be a nice to have, or perhaps even just including the workaround in the Readme file would be enough. We ran into this because:

we use the graphiql app to test.
the right most pane of the graphiql app - called Documentation Explorer displays the schema being served by the client. graphiql populates that pane after querying the server with an introspection query.
you can manually request a reload of the schema from graphiql if hit Ctl+R (and graphiql will send an introspection query).
we do this all the time during development because as we're building our endpoints we frequently change the schema and retest.
and when we switched to a WHITELIST approach for the guard gem, we started getting errors like  "message": "Not authorized to access __Schema.queryType",
this is where we realized that if we want to use a whitelist approach and if we wanted introspections initiated by graphiql to work, then we'd have to do something about it.

I raised this as an issue because I think most graphql servers take the approach of making their schema publicly available (github's schema for example) and so I thought that it's likely others will run into the same surprise (or perhaps already have, but have kept quiet).

@stanishev thanks a lot for explaining!!
I was confused by the fact that guard wasn't triggered for __Schema but it works for __Schema.queryType.
I think that for now, we can mention your type.introspection? solution in the README file 👍  Don't want to make the gem complicated with multiple configuration options unless it's being used very often :)
If you want, feel free to open a PR to mention it. Perhaps, we could add a separate section for it, something like Introspection query authorization after the Error handling with a simple example of the policy object?

If you want, feel free to open a PR to mention it. Perhaps, we could add a separate section for it, something like Introspection query authorization after the Error handling with a simple example of the policy object?

👍
will do

Can you release this in 1.0.1 please?

I tried with the master branch in my Gemfile but it still doesn't work: #7


303 error contacting radarr and sonarr

Upgraded everything to latest stable and seeing these errors:
2021/09/12 10:46:25.855081 sonarr.go:102: [ERROR] Sonarr (http://<IP_ADDRESS>:8989): api.Get(queue): failed:  (status: 303 See Other): invalid status code, <200||>299: ,
2021/09/12 10:46:25.852616 radarr.go:102: [ERROR] Radarr (http://<IP_ADDRESS>:7878): api.Get(queue): failed:  (status: 303 See Other): invalid status code, <200||>299:

Just correct the URLs for your apps. You're missing the /path you configured in their settings.

Ah, that was it. Just had to append the base_url.


Name hashing invalidation is sensitive to private members

Compile:
// A.scala
object A {
  private def foo: Int = 1
  def bar: Int = 29
  def xyz: Int = 101
}
// B.scala
class B {
  private def foo: Int = 1
  def baz(): Unit = println(foo, A.xyz)
}

Modify A.scala to become:
object A {
  private def foo: String = "1"
  def bar: String = "29"
  def xyz: Int = 101
}

Compile again and notice that B.scala is recompiled. It's not expected because bar is not used by B.scala and foo is private.

Fixed by #2325.


Multiple Wording

German teachers have different flavours for the same Wortart.

Nomen or Substantive or Namenwörter
Verben or Tunwörter
Adjektive or Wie-Wörter or Eigenschaftswörter

Right now we use Substantiv for a Substantiv. A young student might have a problem with this wording because his/her teacher uses Namenwort for the same thing.
@xamiam Can we find a way of displaying all different versions on the same view or do we have to solve this with a I18n translation table?

And the list above isn't even complete. Hauptwörter, Bindewörter …

And the list above isn't even complete. Hauptwörter, Bindewörter …

@cabotine Anything else?

I ll have to ask our german didactics specialist.

I have spoken to her:
we have three options:
Nomen Verben Adjektive
Substantive Verben Adjektive
Namenwörter Tu-Wörter wie-Wörter
and two for genus:
Maskulinum Feminum Neutrum
männlich weiblich sächlich

[ ] Einstellung für  Singular/Plural - Singularwort/Pluralwort, Einzahl/Mehrzahl - Einzahlwort/Mehrzahlwort


Opening a solution in VS test pro 2017

There is a steps of Associating your test
"Open your solution in Visual Studio 2017 Enterprise, Professional, or Test Professional, or a later version."
https://docs.microsoft.com/en-us/azure/devops/test/associate-automated-test-with-test-case?view=vsts
Can you actually open a solution on VS 2017 Test Pro? There is only a thick client MTM but couldn't find a VS IDE.

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

ID: 7d8a7e40-73d6-795f-7b8c-77104ef606e8
Version Independent ID: 8f15995b-bd94-8d9f-1e8b-82f1f364d221
Content: Associate automated tests with test cases - Azure Test Plans
Content Source: docs/test/associate-automated-test-with-test-case.md
Product: devops
GitHub Login: @alexhomer1
Microsoft Alias: ahomer

Also from https://visualstudio.microsoft.com/vs/pricing/ for Test Professional

No Visual Studio IDE included in subscription, but subscribers can use Visual Studio Code (free for anyone) and Visual Studio Community (free for open source projects, classroom learning, and academic research, plus for any use by up to 5 people in small organizations)

@alexhomer1 - mention of Test Professional is incorrect. There is no IDE for that edition. Also, we need to make this agnostic of VS versions, now that VS 2019 Preview 1 is available. The steps are applicable to VS 2017 and above versions. Can you please fix the docs?

Updates to teh topic will be published soon.


Setting property to nil via generated Swift api is ignored

Describe the bug
I use Amplify iOS with GraphQL Transform and Codegen to generate a Swift api for AppSync.
In the generated code I set a property to nil. After applying a mutation nothing happens, the previous value is not erased in DynamoDB.
To Reproduce
Steps to reproduce the behavior:

Given the following schema

type User @model
{
  id: ID!
  name: String
   ...
}

Given the current value for name in DynamoDB is Peter

Given the following Swift code for a UserMutation

let input = UpdateUserInput(
    id: "someId",
    name: nil,
    ...
)
let updateUserMutation = UpdateUserMutation(input: input)
...

After executing the mutation the existing value for name in DynamoDB still is Peter

Expected behavior
I would expect the value in DynamoDB to be null, or the name property to be removed.

This seems to be a problem with the AppSync SDK, rather than CodeGen--it looks like the SDK isn't transmitting fields with nil values as part of the mutation payload. I'm investigating from the SDK side.

I'm tracking this on https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/180. @yuth, please feel free to close this bug in favor of the AppSync iOS issue.


Include LICENSE file in manifest

Required for conda packaging https://github.com/conda-forge/staged-recipes/pull/4192

@r0fls could we include this in 0.6.1?


Create health check script for node status report

We must create a shell script for full nodes/components report (windows, CNIs, k8s objects), this way we can have a big picture of what is working/not.
Some examples:
Istio have a verify-install for sanity report.
https://istio.io/latest/docs/reference/commands/istioctl/#istioctl-verify-install.

https://github.com/Microsoft/SDN/blob/master/Kubernetes/windows/test/ValidateKubernetes.Pester.tests.ps1


nnbd annotations in flutter_goldens_client

Description
Add nnbd annotations in packages/flutter_goldens_client
Related Issues

dart-lang/sdk#40146

Tests
None
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I updated/added relevant documentation (doc comments with ///).
[x] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.

[x] No, no existing tests failed, so this is not a breaking change.
[ ] Yes, this is a breaking change. If not, delete the remainder of this section.

[ ] I wrote a design doc: https://flutter.dev/go/template Replace this with a link to your design doc's short link
[ ] I got input from the developer relations team, specifically from: Replace with the names of who gave advice
[ ] I wrote a migration guide: https://flutter.dev/go/breaking-changes-template Replace this with a link to a pull request that adds the migration guide to https://flutter.dev/docs/release/breaking-changes

It may be useful to comment somewhere that this file is in the process of migration, just to explain all the notations. :)

What do you think about a /*!*/ as comment? :D
More seriously I'm not sure it's worth to add a comment to all 2959 *.dart files in the migration process. The migration tool works at package level and this comment (if exists) should rather be at this level.
Finally I wonder what prevent the migration to be applied. I will give it a try.


Installation of dm-acme fails based on PyPI issue with dependency rlax

Following the pip installation instructions from the README I get the following error:
ERROR: Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
dm-acme depends on rlax@ git+git://github.com/deepmind/rlax.git#egg=rlax

Related recent issue: https://github.com/deepmind/acme/issues/98
Here is the full output of my commands:
➜  Development python3 -m venv acme
➜  Development source acme/bin/activate
(acme) ➜  Development pip install --upgrade pip setuptools wheel
Collecting pip
  Using cached https://files.pythonhosted.org/packages/ca/31/b88ef447d595963c01060998cb329251648acf4a067721b0452c45527eb8/pip-21.2.4-py3-none-any.whl
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/c4/c1/aed7dfedb18ea73d7713bf6ca034ab001a6425be49ffa7e79bbd5999f677/setuptools-58.0.4-py3-none-any.whl (816kB)
     |████████████████████████████████| 819kB 4.4MB/s
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/04/80/cad93b40262f5d09f6de82adbee452fd43cdff60830b56a74c5930f7e277/wheel-0.37.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
  Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
      Successfully uninstalled setuptools-41.2.0
Successfully installed pip-21.2.4 setuptools-58.0.4 wheel-0.37.0
(acme) ➜  Development pip install 'dm-acme' 'dm-acme[jax]' 'dm-acme[tensorflow]'
Collecting dm-acme
  Using cached dm_acme-0.2.2-py3-none-any.whl
Collecting dm-tree
  Using cached dm_tree-0.1.6-cp38-cp38-macosx_10_14_x86_64.whl (95 kB)
Collecting numpy
  Using cached numpy-1.21.2-cp38-cp38-macosx_10_9_x86_64.whl (16.9 MB)
Collecting pillow
  Using cached Pillow-8.3.2-cp38-cp38-macosx_10_10_x86_64.whl (3.0 MB)
Collecting dm-env
  Using cached dm_env-1.5-py3-none-any.whl (26 kB)
Collecting absl-py
  Using cached absl_py-0.13.0-py3-none-any.whl (132 kB)
Collecting dm-acme[jax]
  Using cached dm-acme-0.2.1.tar.gz (219 kB)
ERROR: Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
dm-acme depends on rlax@ git+git://github.com/deepmind/rlax.git#egg=rlax

It seems that you are attempting to install dm-acme==0.2.1 but I think the latest release is 0.2.2. Maybe try to install without using the cache?
pip install --no-cache-dir 'dm-acme' 'dm-acme[jax]' 'dm-acme[tensorflow]'

Thanks for the suggestion, it led to some discoveries.
pip install --no-cache-dir 'dm-acme' does in fact work and installs the latest version of 0.2.2.
However pip install --no-cache-dir 'dm-acme[jax]' ends up downloading dm-acme-0.2.1.tar.gz which gets the error above about rlax.
If I request the latest version with pip install --no-cache-dir 'dm-acme[jax]=0.2.2' then I get a different error:
ERROR: Could not find a version that satisfies the requirement dm-reverb; extra == "jax" (from dm-acme[jax]) (from versions: none)
ERROR: No matching distribution found for dm-reverb; extra == "jax"

which led me to see from https://github.com/deepmind/reverb that reverb isn't supported on my platform, OSX, so that error is expected.


Fix crash in equality operator of JavascriptFunction

We observed a crash in the equality operator of JavascriptFunction under highly parallelized load during V8 GC phases. This PR fixes that crash.
This happened for cases where JS objects with functions were created and passed back to C# creating dictionaries with JavascriptFunction objects. Because the GC is involved it only occured during highly parallelized loads with GC pressure. We tried to create a minimal regression test, but couldn't reproduce the crash in simplified cases. If that changes we will send a follow up PR with a regression test.
Analysis:
The call of Contains in the GCCallback function of a JavascriptExternal object here
https://github.com/JavascriptNet/Javascript.Net/blob/db13a0856fbc823535d3ab4d381ef5f9a8dc45d3/Source/Noesis.Javascript/JavascriptExternal.cpp#L76-L77
can lead to the comparison of two JavascriptFunction objects during the GC phase of V8. When this happens JavascriptContext::GetCurrentIsolate()->GetCurrentContext() here
https://github.com/JavascriptNet/Javascript.Net/blob/db13a0856fbc823535d3ab4d381ef5f9a8dc45d3/Source/Noesis.Javascript/JavascriptFunction.cpp#L91
can be nullptr leading to the crash. This happens because of a missing JavascriptScope inside the operator function leaving the isolate's context nullptr. Adding the scope resolves the problem.
Because we can only bind one scope we additionally add a check if the functions are bound to the same JavascriptContext object. If they are not we return false early, because there's no point in comparing them. This way we only have to deal with one isolate and its corresponding context. A HandleScope is added for good measure because we generate Local<Function> instances.
Another slight optimization is to return early if both JavascriptFunction references are the same. The ReferenceEquals method also returns true if both are nullptr eliminating another check.

Is there a way to write a test case for such kind of races?

Unfortunately, I couldn't find a way to force the crash with simplified code in a unit test. The following JS code when run as a function returns a dictionary containing function instances. That code called parallelized 100% reproduces the crash in a complex application setup. But boiling it down to simple calls to Run in a Parallel.For never reproduced the crash. I have a reproducing test that rebuilds the application setup and I simplified that as much as I could, but I can't seem to find something minimal that does not involve a bunch of application code 😥
class Garbage {
	/**
	 * @param {number} mb
	 */
	constructor(mb) {
		const size = mb * 1_000_000 / 64; // 64 bit floating point numbers
		this.garbage = [];
		for (let i = 0; i < size; i++) {
			this.garbage[i] = Math.floor(Math.random() * 256);
		}
	}
}

function Crash() {
	this.foo = 'a';
}

Crash.prototype.hello = function hello () {
	return 'world';
};

const crash = new Crash();
const garbage = new Garbage(10); // force JS to mark objects as weak (i.e. garbage collectable)
const export = { crash };
return export;

Hm... Are multiple AppDomains are involved somehow?

No, same AppDomain


Custom emoji with entirely numeric names cannot be used for reactions

Reproduction steps

Open a desktop version of Zulip (tested versions below):

macOS Zulip Desktop v4.0.3
Web client currently installed on zulipchat.com, using Chrome 80.0.3987.149

Create an emoji with an entirely numeric name, such as :1000:
Highlight a message
Type the colon key (:) to open the emoji selection palette
Type the name of the numeric emoji you created
Click on the emoji as shown in the palette
Press the Return key when the emoji is the only one shown in the palette

Expected behavior

Clicking on any emoji in the reaction palette reacts to the selected message with that emoji
Pressing Return in the reaction palette when there's only one emoji shown reacts to the selected message with that emoji

Actual behavior

Neither clicking the emoji in the palette nor pressing Return results in the selected message being marked with the numerically-named emoji as a reaction
In the JS console, a "Bad emoji name" warning is recorded.

Boundary cases

Built-in fully-numeric emoji, such as :100: may still be used for reactions
Custom emoji that start with a number, but contain at least one letter, such as our :1password: emoji, may still be used for reactions
Does not occur on the iOS mobile client

Speculation

I think this may have something to do with JQuery's .data() method converting things that look like numbers to numbers as long as the representation stays the same.

I think your speculation is correct here, because in all three places we call toggle_reaction we are using .data().  Example: toggle_reaction(first_emoji.data("emoji-name"))
And then we get the error from this code, probably because the first conditional is using a Map:
102     if (emoji.active_realm_emojis.has(emoji_name)) {
103         if (emoji_name === 'zulip') {
104             reaction_info.reaction_type = 'zulip_extra_emoji';
105         } else {
106             reaction_info.reaction_type = 'realm_emoji';
107         }
108         reaction_info.emoji_code = emoji.active_realm_emojis.get(emoji_name).id;
109     } else if (emoji_codes.name_to_codepoint.hasOwnProperty(emoji_name)) {
110         reaction_info.reaction_type = 'unicode_emoji';
111         reaction_info.emoji_code = emoji_codes.name_to_codepoint[emoji_name];
112     } else {
113         blueslip.warn('Bad emoji name: ' + emoji_name);
114         return;
115     }

This should be a pretty quick for somebody.  We should change the data statements to attr, probably, and we should make the code above should either defensively convert emoji_name to a string or complain about ints.  And then just test all three scenarios.

@zulipbot claim

@zulipbot claim

@zulipbot claim

The pull request linked is ready to merge from my side. Could the concerned members kindly review it and let me know if any changes are required to be made :)

Updated the pull request incorporating the changes suggested, kindly review :)

Thanks so much @ankita-2798 and @timabbott!


@DBStore : Add the capability to execute a batch of queries.

When the annotation @DBStore is used, there should be the capability to execute a predefined number of queries all together, instead of executing them one my one.

Resolved via https://github.com/panossot/jboss-automated-metrics/commit/035f496d0b7cfca9091bb4164cee469964e7e46e.
Possibility to parametrize the number of queries to be executed as a batch using :
MetricProperties -> setUpdateRateOfDbQueries(HashMap<String,Integer>)
where key -> userName (String)
value -> number of queries to be executed as a batch
Closing this issue.


[ALLUXIO-2344]Improve error handling in SwiftUnderFileFactory#Improvement

getaddress

Can one of the admins verify this patch?

alluxio-bot, check this please

ok to test

add to whitelist

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/13893/Failed Tests: 1org.alluxio:alluxio-tests: 1alluxio.shell.command.FreeCommandTest.freeWildCardPinnedFile
Test FAILed.

@ifcharming Excuse me, but I do not know what's wrong with my changes and the tests can be passed locally.

Jenkins, test this please

Merged build finished. Test PASSed.

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


get NaN value for standard error during calculating fixed effects

Hello,
Thanks for your econtools, it help me a lot in my work. Today I'm calculating the fixed effects by using OLS regression with robust errors. Yet I confront with warning
c:\program files\python37\lib\site-packages\econtools\metrics\core.py:203: RuntimeWarning: invalid value encountered in sqrt
  se = pd.Series(np.sqrt(np.diagonal(vce)), index=vce.columns)

In addition to the warning, all the se estimators of these fixed effects (dummy) variables become NaN.
                   coeff  se   t  p>t  CI_low  CI_high
dummy_0    96.0 NaN NaN  NaN     NaN      NaN
dummy_1   128.0 NaN NaN  NaN     NaN      NaN
dummy_2   144.0 NaN NaN  NaN     NaN      NaN
dummy_3   128.0 NaN NaN  NaN     NaN      NaN

I wonder whether this is due to the problem of colinearity. I appreciate it if you can help diagnose my problem. Thanks a lot.

Yes, this is likely due to colinearity. Try the check_colinear option.


Datatypes in request payload is being changed

Description
appsmith is changing the datatype of json payload before sending it to server.

have a look at "phone_number": {{phone_number.text}}, in the above screenshot. evaluated value says it will be sent as string. but when actual operation happens it converts it to numbers. I have also tried "phone_number": "{{phone_number.text}}",. I have also tried "phone_number": {{`"${phone_number.text}"`}},
the API which I am calling is facebook's so I don't have control over their code or server.
My Take on this
It should take textbox as string by default. if a developer/user wants to send a value as Number then he/she can always convert it before sending.
Steps to reproduce the behavior:
Add steps to reproduce this behavior, include console / network logs & screenshots

take a Input box in canvas
take the value of that input box and send to an API in body as JSON
Input numbers in input box
Send the request and see what is sending to the server

Expected behavior
Appsmith should send what is being shown in the evaluated value tooltip.
Actual behavior
If a string has a digits in it then appsmith is changing that property's value to Number data type.
Important Details

Version: Cloud
OS: Windows
Browser: chrome
Environment: production

@vasani-arpit great catch here this is indeed strange. @nidhi-nair @trishaanand can you comment here?

Seems like a smart substitution related issue, the values are getting interpretted based on our rules for parsing the data. @trishaanand do we want to disable this for REST APIs?

is there a workaround for this issue?

@rubabuddin If the server is in your control then you edit it to accept datatype which appsmith sends. or you can send everything as string using JSON.stringify() and do a JSON.parse() at the server end.
you can also try adding " before {{ and after }}. maybe convert your variable to string forcefully using .toString() method.

@rubabuddin you can try turning smart substitution off in the query settings

Another user  reported this issue.

Workaround - https://community.appsmith.com/t/passing-only-numbers-into-a-string-field-actually-sends-a-number-to-the-api-instead-of-a-number-string/1315/4?u=pranav


Readonly Generics

Suggestion

🔍 Search Terms

Generics, readonly
✅ Viability Checklist

My suggestion meets these guidelines:

[x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[x] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion

The ability to define contextual, readonly generics for cleaner code and context-specific generics.
📃 Motivating Example
someFunction<T extends object, readonly KEYS = Array<Extract<keyof T, string>>>(obj: T): {
  propsOfNumberType: KEYS;
  propsOfStringType: KEYS;
  propsOfBooleanType: KEYS;
  propsOfObjectType: KEYS;
}{
 //... implementation omitted
}

💻 Use Cases
The use case for this is any time you have a complex generic which is used multiple times, but should never be specified by the user.
The major benefits of this are:

cleaner code -  By being able to give a readonly generic a shorter name, you can avoid duplicating its code without obfuscating the type.. In the example above, you could create a type KEYS<T> = Array[keyof T]>, but most utility generic types have much longer names such as: RequiredKeys, SubpropertyMerge, NullableKeys, UnionToIntersection

more performant - For especially heavy generics (usually involving infer, or recursion), being able to define them once and then re-use their definition would be much more performant than compiling the type for every use.

class wide types - A very useful typescript feature is that in functions you can do:
 function <T>(t: T) {
   type S = SomeComplex<T> & MutationOf<T>
   const eg: { foo: S;  bar: S;  qux: S } = ....
 }

unfortunately, this is not possible in classes, and so you must spell out the same generics over and over again if they are meant to be inferred from other generics

A more elaborate example
export abstract class QueryTools<
	T extends object,
	ARGS extends Partial<T>,
        readonly KEYS =  KeyOf<T>,
        readonly KEY_ARR =  Array<KEYS>,
        readonly PART = Partial<T>
> {
	public abstract query(): Knex.QueryBuilder<T>;

	public abstract get<SEL extends KEY_ARR>(
		id: string,
		select?: SEL
	): Promise<null | QueryResponse<T, SEL>>

	public abstract getByFn<
		KEY extends KEYS
	>(key: KEY): <SEL extends KEY_ARR>(value: T[KEY], select?: SEL) => Promise<null | QueryResponse<T, SEL>>;

	public abstract require<SEL extends KEY_ARR>(
		id: string,
		select?: SEL
	): Promise<QueryResponse<T, SEL>>;

	public abstract requireByFn<
		KEY extends KEYS
	>(key: KEY): <SEL extends KEY_ARR>(value: T[KEY], select?: SEL) => Promise<QueryResponse<T, SEL>>;

	public abstract requireOne<SEL extends KEY_ARR>(
		where: PART,
		select?: SEL
	): Promise<QueryResponse<T, SEL>>;

	public abstract hydrate<
		SEL extends KEY_ARR,
		OBJ extends PART
	>(
		obj: OBJ,
		hydrations: SEL,
		args?: {
			refresh?: boolean;
		}
	): Promise<QueryResponse<T, [Extract<RequiredKeys<OBJ>, KEYS> | SEL[number]]>>;

	public abstract updateWithObject(
		obj: PART,
		updates: PART
	): Promise<PART>;

	public abstract syncObject(obj: PART): Promise<PART>;

	public abstract update(
		where: PART,
		updates: PART,
		args?: { limit: number; }
	): Promise<number>;

	public abstract updateOne(
		where: PART,
		updates: PART
	): Promise<number>;

	public abstract updateById(
		id: string,
		updates: PART
	): Promise<number>;

	public abstract updateByFn<
		KEY extends KEYS
	>(key: KEY): (keyValue: T[KEY], updates: PART) => Promise<number>;

	public abstract findOne<SEL extends KEY_ARR>(
		where: PART,
		select?: SEL
	): Promise<null | (QueryResponse<T, SEL>)>

	public abstract find<SEL extends KEY_ARR>(
		where: PART,
		args?: {
			limit?: number,
			select?: SEL,
			// sort?: {[key in KeyOf<T>]?: number}
		}
	): Promise<Array<QueryResponse<T, SEL>>>;

	public abstract deleteById(id: string, confirm: "BLAME"): Promise<number>;

	public abstract create<BASE extends ARGS>(createMe: BASE): Promise<T & BASE>;
}

Having readonly generics cleans up this code a tremendous amount.  If you'd like to see it without any readonly generics, here's a playground link

Other than syntax, is this different from #7061?

A bit different.  This also works for interfaces, or types.  Eg:
interface Test<T, readonly KEYS = keyof T> {
  a: KEYS;
  b: KEYS;
}

type Test<T, readonly KEYS = keyof T> = { [KEY in KEYS]: number } & { a: KEYS };

Sounds like you want #9889.

@MartinJohns, close but my use case is actually a type:
type SomeFn = <T, KEYS extends keyof T>() => { a: KEYS, b: KEYS, c: KEYS }

And, personally, I have had to convert many of my interfaces to objects before.  Eg:
interface Arg = { a : 1 }

.... some time later

type Arg = { a: 1 } | { b: 2}

Okay, then it sounds like you want #41470.
The keyword readonly really makes no sense to me here, because there's nothing writable in the first place. Type arguments are provided (or additionally have a default). The syntax you propose seems really confusing, because I would expect to use it as SomeFn<TypeA, TypeB>, while you seemingly think of it being used as SomeFn<TypeA>.

@MartinJohns making three different syntaxes for caching a generic seems like a bad suggestion, IMO.  Classes, interfaces, and types can share the same syntax.
Also, totally open to suggestions on readonly syntax.  It doesn't really matter what the word is to me.
But -- as a UX expert -- I would strongly suggest keeping the placement.  Generics evolve as the problem space does, so being able to easily switch between KEYS extends keyof T = keyof T and yourword KEYS = keyof T would very likely give a better user experience than moving it around.
Also, it could be used the same across the board, and it would not inadvertently create a separation of interest.

That being said, if you get some good UX devs into a room together, they could find something better.  Assumably, it would also have the same syntax for classes, interfaces, functions, and types.

What you're describing isn't a type parameter, at all. It has nothing in common with how type parameters work. For example, given how you've defined them, you would expect to be able to use a keyof T to satisfy a KEYS, but that isn't how type parameters are defined since might be instantiated with a more-specific type.
This is #41470 or #23188, because putting a type alias (which is what you're talking about here) in a type parameter list is a) misleading and b) dominated by letting you put it anywhere in a type body, since you might have all kinds of local type expressions you want to capture.

It has nothing in common with how type parameters work

As a user facing dev, I think you should be better at putting yourself in user shoes.
The majority of devs use generics in a way that they are inferred from usage, and largely invisible to users.  They are generally just a means of passing some user supplied typing back to them.
Also, neither of the issues you've listed would cut it for what I was looking for.

On a side note:  Is there anyone above Ryan I can complain to?    And I've never once seen him even acknowledge that he's not the only person who's feelings matter.

Seriously though.  If you're someone who gets paid a very decent living to be a user facing dev, you should at least understand that basics of UX.  And one of the biggest basics of UX is that no matter how important you might think you are, you only count as one user.. It's introductory as far as research and the scientific process are involved.
But there's no sense of science or UX here.  Time and time again I've seen Ryan respond in subjective threads as though his view on the subjective matter outweighs all else; finding one single aspect he doesn't like and -- rather than trying to ideate an improvement or clarify its meaning -- calling it grounds for dismissal.
Most amazing developers aren't great at being user facing -- nor do they enjoy to be -- so I think it might benefit everyone for someone to recognize what's going on here.  And if Ryan really does enjoy shooting things down with zero effort to ideate or understand, that's even worse.
It's worth being said.


files missing in Sources with node 5.2.0

os: ubuntu 14.04
node version: 5.2.0
node-inspector version: 0.12.5
After upgrading to node 5.2.0, when running with --no-preload flag, source files are no longer loaded into Node Inspector at runtime, when modules are required.
I'm running ...$ node-inspector --no-preload and ...$ node --debug ./index.js
index.js:
require('./server');

server.js:
require('http').createServer(function(req, res){
  console.log('received request');
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Ok');
}).listen(3000, function(){
  console.log('app listening on port 3000');
});

only index.js appears in the Sources tab. I also see these errors in the chrome dev tools:
Assertion failed: Unknown experiment canvasInspectionRuntime._assert @ Runtime.js:358Runtime.ExperimentsSupport._checkExperiment @ Runtime.js:953Runtime.ExperimentsSupport.isEnabled @ Runtime.js:894WebInspector.ProfileTypeRegistry @ ProfileTypeRegistry.js:19(anonymous function) @ ProfileTypeRegistry.js:43evaluateScript @ Runtime.js:153scriptSourceLoaded @ Runtime.js:136
Runtime.js:367 TypeError: Cannot read property 'createSetting' of undefined
    at Object.WebInspector.FilterBar.setName (http://<IP_ADDRESS>:8080/ui/FilterBar.js:62:51)
    at Object.WebInspector.NetworkPanel (http://<IP_ADDRESS>:8080/network/NetworkPanel.js:47:21)
    at Function.WebInspector.NetworkPanel._instance (http://<IP_ADDRESS>:8080/network/NetworkPanel.js:408:53)
    at eval (http://<IP_ADDRESS>:8080/node/network/NetworkPanel.js:13:27)
    at eval (native)
    at evaluateScript (http://<IP_ADDRESS>:8080/Runtime.js:153:14)
    at scriptSourceLoaded (http://<IP_ADDRESS>:8080/Runtime.js:136:13)Runtime._reportError @ Runtime.js:367
ConsoleView.js:493 ::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29054753-files-missing-in-sources-with-node-5-2-0?utm_campaign=plugin&utm_content=tracker%2F195817&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F195817&utm_medium=issues&utm_source=github).

I see the same problem on Windows 10 Pro, Nodejs 5.2.0   My work around is to move all javascript files into the project root directory until this is resolved.

There is a lot of problems with 5.2.0 - it breaks 20 tests in node-inspector


HiSuite Compatibility Problem?

It was observed today that a HiSuite TV had trouble connecting
Symptoms:

No WiFI Auth Failure Event
If wrong PSK is set on TV, then it will send an auth failure
Tcpdump on a monitor interface showed the device would Auth but not Associate
Device always goes for a WPA3 connection

Sniffing packets:

Saw commits from both sides in group 19
Saw both sides CONFIRM each other
No AUTH Success

Recent changes:

Hostapd recently had H2E enabled
sae_pw=2

Tried sae_pw=0 to force hunting and pecking, no luck

wpa3 noentry msg:
https://github.com/spr-networks/hostap/blob/main/src/ap/ieee802_11.c#L643
wpa3 mismatch msg:
https://github.com/spr-networks/hostap/blob/119d01b94459766e52e3c36d37fffbaadd2f0146/src/ap/ieee802_11.c#L1607

wifi 7 issue: https://w1.fi/cgit/hostap/commit/?id=63df62c6c0b86221493588f7b9e583a4e45dd75a

uninit memory bug with sae and password identifiers: https://w1.fi/cgit/hostap/commit/?id=761041b18ab243c28467475145f316e10bd649cf

the 0.3.24 release will include a new event type from hostap to know when sae confirms are working


Limiting what namespaces trust bundles are synced to

I notice in the README it states and syncs them to a target in every namespace. - is there any capability to limit which namespaces a particular bundle is synced to? e.g. by label, or explicitly by name?

Not currently. This has come up in conversation before.
I think it would be reasonable to include the option spec.target.namespaceSelector.

/assign


Migrate away from x0

Some of the changes in x0 v5 will make it hard to update with the current structure and a whole lot of stuff that we do is to make x0 behave differently to how it wants to behave.
It seems silly to keep using it when we're fighting against it so much, so it makes sense to move to a different build system. This is also a good excuse to play with a bunch of OSS and maybe write our own if nothing is quite suitable (or because it's fun).

Done in 200d7dd


Siamese networks + improve training with batch normalization

Added two different ways of joining resnet50 features to together.
siamese-concatenation - concatenates resnet features into a super feature, should learn better from this one.
siamese-subtraction - abs(left - right), symmetric trains much faster with less layers.

Codecov Report

Merging #83 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #83   +/-   ##
=======================================
  Coverage   87.86%   87.86%
=======================================
  Files          29       29
  Lines        1615     1615
  Branches      214      214
=======================================
  Hits         1419     1419
  Misses        171      171
  Partials       25       25

Continue to review full report at Codecov.

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


Move the regex declaration outside the function

Hi @sindresorhus, this might be a very little performance improvement, but it makes the code even clearer. Instead of inlining the regex for testing absolute urls inside the body of the function, it would be better to extract it outside and then referencing it:
const ABSOLUTE_URL_REGEX = /^[a-zA-Z][a-zA-Z\d+\-.]*?:/;

export default function isAbsoluteUrl(url) {
  ...
  return ABSOLUTE_URL_REGEX.test(url);
}

I doubt it makes a difference performance-wise, but I agree it's cleaner this way.

Yes this does not make great difference in terms of performance, but now those regexes are created once and reused every time the function is called.


Fix crash when using eslint 1.10.0

Instead of putting the react object on context, this PR creates it as a separate variable and passes it as a 3rd parameter to the fn passed to Components.detect.
fixes #323

Same here. Great job! :+1:

Wow that was fast!

Merged, thanks!


test: add test cases from exiftool

This PR builds on top of #13, #14 and adds all jpg test cases from https://github.com/exiftool/exiftool

Needs rebase :)

Needs rebase :)

Shall start rebasing once the tag value PR is merged.

Thanks! Rebased.


RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling cublasCreate(handle) error in some models

Hi, when I try to test psmathur/orca_mini_v3_13b, I get the following error

2024-04-08:23:27:17,531 INFO     [main.py:251] Verbosity set to INFO
2024-04-08:23:27:21,823 INFO     [main.py:335] Selected Tasks: ['hellaswag']
2024-04-08:23:27:21,825 INFO     [evaluator.py:131] Setting random seed to 0 | Setting numpy seed to 1234 | Setting torch manual seed to 1234
2024-04-08:23:27:21,825 INFO     [evaluator.py:177] Initializing hf model, with arguments: {'pretrained': 'psmathur/orca_mini_v3_13b', 'tokenizer': 'psmathur/orca_mini_v3_13b', 'dtype': 'float16', 'parallelize': True}
Loading checkpoint shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████| 3/3 [00:05<00:00,  1.93s/it]
2024-04-08:23:27:32,157 WARNING  [big_modeling.py:433] Some parameters are on the meta device device because they were offloaded to the cpu.
/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/datasets/load.py:1461: FutureWarning: The repository for hellaswag contains custom code which must be executed to correctly load the dataset. You can inspect the repository content at https://hf.co/datasets/hellaswag
You can avoid this message in future by passing the argument trust_remote_code=True.
Passing trust_remote_code=True will be mandatory to load this dataset from the next major release of datasets.
warnings.warn(
2024-04-08:23:27:39,213 INFO     [task.py:395] Building contexts for hellaswag on rank 0...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10042/10042 [00:03<00:00, 3062.03it/s]
2024-04-08:23:27:43,273 INFO     [evaluator.py:379] Running loglikelihood requests
Running loglikelihood requests:   0%|                                                                                | 0/40168 [00:00<?, ?it/s]Traceback (most recent call last):
File "/local/home/tcelik/miniconda3/envs/dslenv/bin/lm_eval", line 8, in
sys.exit(cli_evaluate())
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/main.py", line 341, in cli_evaluate
results = evaluator.simple_evaluate(
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/utils.py", line 288, in _wrapper
return fn(*args, **kwargs)
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/evaluator.py", line 251, in simple_evaluate
results = evaluate(
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/utils.py", line 288, in _wrapper
return fn(*args, **kwargs)
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/evaluator.py", line 390, in evaluate
resps = getattr(lm, reqtype)(cloned_reqs)
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/api/model.py", line 336, in loglikelihood
return self._loglikelihood_tokens(new_reqs, disable_tqdm=disable_tqdm)
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/models/huggingface.py", line 1049, in _loglikelihood_tokens
self._model_call(batched_inps, **call_kwargs), dim=-1
File "/local/home/tcelik/lm-evaluation-harness/lm_eval/models/huggingface.py", line 764, in _model_call
return self.model(inps).logits
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/accelerate/hooks.py", line 166, in new_forward
output = module._old_forward(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 1176, in forward
outputs = self.model(
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 1019, in forward
layer_outputs = decoder_layer(
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/accelerate/hooks.py", line 166, in new_forward
output = module._old_forward(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 740, in forward
hidden_states, self_attn_weights, present_key_value = self.self_attn(
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/accelerate/hooks.py", line 166, in new_forward
output = module._old_forward(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/transformers/models/llama/modeling_llama.py", line 639, in forward
query_states = self.q_proj(hidden_states)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/accelerate/hooks.py", line 166, in new_forward
output = module._old_forward(*args, **kwargs)
File "/local/home/tcelik/miniconda3/envs/dslenv/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 116, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: CUDA error: CUBLAS_STATUS_NOT_INITIALIZED when calling cublasCreate(handle)
Running loglikelihood requests:   0%|                                                                                | 0/40168 [00:01<?, ?it/s]

The code I am using is:
CUDA_VISIBLE_DEVICES=0,2 taskset -c 0-15,32-47 lm_eval --model hf \     --tasks gsm8k \     --model_args pretrained=psmathur/orca_mini_v3_13b,tokenizer=psmathur/orca_mini_v3_13b,dtype=float16,parallelize=True \     --batch_size 1
The same problem happens for hellaswag dataset. To make sure problem was not about cuda visible devices or task set I ran:
CUDA_VISIBLE_DEVICES=0,2 taskset -c 0-15,32-47 lm_eval --model hf \     --tasks hellaswag \     --model_args pretrained=EleutherAI/gpt-j-6B,dtype=float16,parallelize=True \     --batch_size auto
which works without problem. I have seen that #499 had a similar problem, but there was no followup from ops side. Funny thing is, checking the model card, this model was tested using lm eval harness.

Hi! Did the potential bug causes I listed in that other issue help at all?
Typically this error means either 1) way out-of-memory or 2) more often, tokenizer size is misconfigured somehow so at some point the code is trying to read an out-of-bounds value in the input or output embedding layers.
I’d check what the vocab size supposedly is, and if it matches the tokenizer. maybe a few extra tokens were added to the tokenizer but that’s not reflected anywhere. Also worth trying to load and do a forward pass with the model outside lm_eval to see if it runs

Hi. I did check the vocab size beforehand but it turns out borrowing some more gpus (4 in total) makes it work. I didn't fully understand what you meant by "A really bad out-of-memory error " in previous question and didn't expect memory to not be enough since for some other cases I was correctly getting OOM. Sorry for repeating question and thank you for your help.

Glad it’s working!
See e.g. https://discuss.pytorch.org/t/cuda-error-cublas-status-not-initialized-when-calling-cublascreate-handle/125450 — if happening to run up close enough to the memory limit that cublas cannot initialize a handle then this error instead of the standard OOM will be raised


Add support image post-processing

This is a feature/discussion request to see if it could be
possible to add support for post-processing of thumbnails.
The feature I'm after is the ability to run thumbnails
through an additional image compressor after the initial
scaling of the thumbnail. The process of stripping images
off comments, exif, iptc markers and so forth can further
reduce the image size with no effect on image quality
(lossless compression).
Google recommends the use of jpegtran, jpegoptim, OptiPNG or
PNGOUT in their page speed docs 1.
I've added a naive two-line commit which will compress a
jpeg formatted image with the jpegoptim image program, if
you use the imagemagick engine (yes, i said it was naive).
This is just to get an idea of what I'm after, but I think
the more obvious solution would be to implement this in a
modular fasion.

Where and how should it be implemented?

I am not sure, this means another dependency (for all engines). It's actually pretty easy to implement in your own subclassed engine as you have shown here. Also I don´t think it is an essential feature. Thanks for the input!


Speed up job submission process

When jobs are submitted and an ssh connection isn't needed, jobs are submitted one by one which now takes ~5 s each. This needs to either be changed to how jobs are submitted through an ssh connection (minus the ssh part), or submitted as an array. The -t arg can be used to submit an array of jobs and there should be some variable name that is iterated for each job and can be used as the job_id. I think this should be supported on the basic cores (it wasn't on the virtual cores).
This is all in the function sub_jobs in do_manage2.py https://github.com/Swift-BAT/NITRATES/blob/main/do_manage2.py#L801

Where does the ~5s for each iteration come from?
time

Resolved with #14


TMA counts os code ?

hi there, I am wandering whether the TMA counts the OS code ? Or it can be configured ?

There are specific metrics that report kernel counts such as kernel_utilization and kernel_cpi.

If you are using the Linux perf command (I forget which version we added this ability but it has been there a little while), you can add modifiers to metrics the same way you can events. So :k on an event says you want only kernel cycles (see the event modifiers in the perf-list man page) and for a metric this will be copied onto the events so:
$ sudo perf stat --metric-only -M TopdownL1:k -a sleep 1

 Performance counter stats for 'system wide':

    %  tma_retiring:k %  tma_backend_bound:k %  tma_frontend_bound:k %  tma_bad_speculation:k
                 6.5                    25.6                     40.9                      26.9

       1.002802834 seconds time elapsed

will gather the TopdownL1 metrics only within the kernel. Using :u instead of :k would give you a breakdown of only user slots, etc.

Great, thank you :)


geometry type mixing after geocoding by different type

I had a dataset which was automatically geocoded to points (based on city names) but I needed it to be polygons off of a zip code column, so I re-geocoded by postal code admin areas, and got the following response (partially successful):

Obviously there are mixed types, but the UI sets the MultiPolygon to Point.
Steps to reproduce:

Import this dataset
Make sure 'guess types' is selected
Notice that the_geom is filled with lat/longs (points)
Geocode (orange geo button) by regionid as Postal Code, 'United States' as Country
Select administrative area to get polygons
Get a table of mixed geometry types, and the UI only choosing one

IMO, there should be a warning in the Geocoding that the user is attempting to get back a different geometry than is already in the table. If the user accepts this risk, either:

The old geometries which are not geocoded should go to nulls, or
The old geometries, if lines or polygons, should go to points if the new geometry is points

I'd say the way to go here would be to disable guessing (which will disable geocoding by default) and then geocode your table as you wish.
The code is not restricting different geocoding results that might give different geometric types that the ones available in the dataset, but you probably know already that multigeometry layers are not supported. Interesting issue to take into account for usability improvements. :-)

Gonna close this as we have a previous issue where we can keep working: https://github.com/CartoDB/cartodb/issues/1002

Thanks!


Don't try to unregister events that aren't hooked

Not sure if this is a race condition of a sign of a problem elsewhere but was getting called with events we were not hooked to.

Oops, I accidentally fix the same bug in the latest commit, therefore I'll close this. Thanks for this


Rice is not complete yet

pls fix

I'll update it to the current one i have, as its somewhat different now. I'll try on the night as I'm currently studying 👍

I opened issue as joke, do when you have time

I am opening this issue, and Y E S, I gonna work on these old dotfiles, on my old laptop tho since on my main one I'm working on the Aquarium dotfiles

Intereseting!


Is the gif even showing this plugin?

Is the gif used in the README even showing this plugin?
Because this is not what the gif showed:

Cant resize the columns, nor can i resize the information panel. I just wanted what the gif showed.
Also worth noting, the information panel remains visible even when no commit is selected, its just blocking 70% of the screen for no reason.

It only occupies 30% of my editing area, and you can make it go away by pressing Esc


Differentiate between top and bottom prev/next buttons

If a documentation contains a lot of short pages it looks a little bit weird that we have prev/next buttons at the top and the bottom, e.g.

One solution might be to automatically adjust if we present the buttons at the top depending on the page length.
An easier solution would be to provide different CSS classes for them so a user could write custom CSS code to hide one occurrences of the next/prev buttons. At the moment this is not possible as they are both added to the page with the relbar class. Maybe one could add an additional top and bottom class to them, e.g.
<nav class="relbar top">

The "relbars" can already be activated and deactivated individually using the relbar1 and relbar2 blocks, as shown in https://insipid-sphinx-theme.readthedocs.io/en/0.4.1/customization.html#custom-templates
This affects all pages, but you might be able to get per-page settings with some additional Jinja2 magic?

Thanks, I overlooked this. It is indeed straightforward, the _templates/layout.html file just needs to contain:
{% extends "!layout.html" %}

{% block relbar1 %}{% endblock %}

to disable the top next /prev buttons.

The current solution seems fine to me. You can close this issue if you like as I don't think it is necessary to provide the functionality of automatically adjusting the visibility of the top and/or bottom prev/next buttons.


switch to ContactInfo propagation in PullRequests

Problem

unstaked nodes are having a difficult time catching up and acquiring shreds via repair: https://discord.com/channels/428295358100013066/1282690942616211526/1282691964558643221
tvu_peers set of unstaked nodes is unreliable and keeps changing, causing nodes to appear offline or out of gossip

Cause
In v2.0.8, self.nodes in crds only stores ContactInfo, it does not store LegacyContactInfo , but v1.18.23 stores LegacyContactInfo in crds.nodes.
master: https://github.com/anza-xyz/agave/blob/37671df9fd654e9da453cb094ce32e3ea181c536/gossip/src/crds.rs#L254-L255
v1.18.23: https://github.com/anza-xyz/agave/blob/8c42fa8a3ae3b11c2a223762d368ccfff0d22340/gossip/src/crds.rs#L246-L247
self.nodes aka crds.nodes: https://github.com/anza-xyz/agave/blob/37671df9fd654e9da453cb094ce32e3ea181c536/gossip/src/crds.rs#L74
In both versions, we send our LegacyContactInfo in every PullRequest sent. However, in v2.0.8, this LegacyContactInfo, no longer gets stored in crds.nodes even though it is sent. So when unstaked nodes are sending pull requests, their LegacyContactInfo is not getting propagated.
It seems that unstaked nodes are relying heavily on pull requests to propagated their ContactInfo. But with the update to v2.0.8, receiving nodes are no longer registering LegacyContactInfo in their set of tvu_peers because crds.nodes doesn't hold them anymore.
Summary of Changes
Since mb has upgraded to v1.18.23 and can handle ContactInfo in a PullRequest, we can switch over to propagating ContactInfo in PullRequest. We can also remove the [ignore] on the previously flaky test caused by this same issue.
Data
@steviez applied this patch to tw2NAkBpTwST2c4NDW9xFmWgqSL5ErPy5QYbfYa3KXi, which was previously experiencing repair issues as mentioned above and got the following result:
From Steve:

^ Shred percentages through turbine/recovery/repair over the last hour:
Vertical white line is where process came back online with patch
Orange = turbine
Blue = recovery
Purple = repair
Almost entirely repair previously and now almost no repair / all turbine + recovery (recovery technically under turbine too)
This patch also causes tw2NAkBpTwST2c4NDW9xFmWgqSL5ErPy5QYbfYa3KXi to consistently and immediately appear in tvu_peers.
PR made with @steviez

If the issue is that contact-info is not propagated through gossip, we need to first debug why is that.
I would much rather not rely on shoving contact-info into pull requests because that is not how gossip is supposed to work (i.e. messages need to be propagated through push messages and pull responses).

closing. addressing this overarching problem through PR https://github.com/anza-xyz/agave/pull/3016.


Clarify steps in managing open pull requests

+1
I think we're still a little inconsistent in this doc with combining fragments and sentences in the same list, but not sure if there's an easy way to make it better.

Removed the "do not @mention" note as I feel that's unnecessary.
Added approved PM reviewers
Removed seconders, which is no longer applicable for us


HDDS-7326. Intermittent timeout in TestECContainerRecovery.testContainerRecoveryOverReplicationProcessing

What changes were proposed in this pull request?
Sometimes TestECContainerRecovery.testContainerRecoveryOverReplicationProcessing will timeout, resulting in CI failure. We need to increase the inspection time to avoid this problem.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-7326
How was this patch tested?
fix ut.

Thank you @captainzmc for working on this.

How was this patch tested?
fix ut.

Sorry, but for intermittent tests a single run is not enough to ensure intermittency is gone.  Can you please trigger repeated runs?  @kaijchen can provide example of such run if you need help.
(Also, please search Jira for existing issue before filing one.)

CC @swamirishi for review

Example of repeating test in CI: https://github.com/kaijchen/ozone/blob/repeat/.github/workflows/post-commit.yml#L333

Sure, Let's me trigger 10x10 iterations to test this this.

This might not resolve the intermittency completely. As far as I understand I see a lot of threads in waiting state. The particular test is timing out after 100000 millis. This particular change would reduce the frequency of the test thread which would give other threads more time to perform op. Probably we should look into increasing the priority of the threads we expect to run instead to make the test more robust.

BTW, after looking at the test case I found that issue is not the timeout but the Replication Manager Interval which is driven by this config hdds.scm.replication.thread.interval which defaults to 300s. I have fixed this issue as part of this PR. @captainzmc @adoroszlai @kaijchen Can you confirm if this is root cause for the failure.

@swamirishi hdds.scm.replication.thread.interval setting sounds plausible as root cause.  I suggest extracting that change to a separate commit, running that single test case or class repeatedly in your fork (see example).  If it fixes the issue, then please create a separate PR only for the fix.

Thanks to @swamirishi  @adoroszlai for the reply.  Yes, I go through 10x10 iterations and find that increasing time can only reduce the probability of problems and cannot avoid error reporting. If #3939 could solves this problem, I'll turn off this PR.

Hi @captainzmc, I have just merged #3941.

Thanks @swamirishi @kaijchen @adoroszlai , Let's close this one.


Remove superadmin role

This role is not practically used, since it is never set in our identity provider.
There are still some instances where it's used for testing.

@eleftherias - If I'm correct this should be completed by #2063, so we can close it. Do reopen if needed 👍

@rdimitrov It's not completely removed yet. We still use it for testing in some places, for example: https://github.com/stacklok/minder/blob/65fee552113796b7567ac2e9bd699acadad19c9a/internal/controlplane/handlers_oauth_test.go#L146


cmd/compile: make encoding/binary.LittleEndian.* have negligible inlining cost on amd64

encoding/binary.LittleEndian.* typically compile down to a single instruction on amd64. Their inlining cost is very high. I suggest we add a hack to the inlining budget to consider them to be an intrinsic, for the purposes of cost. Probably the same for other platforms as well.
cc @mdempsky

Are there any other such std APIs that we should teach the inliner about? For example, I imagine many math/bits APIs also compile to one or two amd64 instructions.

Unsafe conversions (see #42739).

Related issue (https://github.com/golang/go/issues/42788)

Most of the math/bits APIs are semantically inlined, so they aren't really in the same bucket.
"semantically inlined" = the compiler treats these APIs specially. It throws away their Go implementation and uses a compiler-provided one. The good part is that it always optimizes (unless you give -N, I think?). The bad part is that if you copy the implementation into your own function, you don't get the optimizations.
encoding/binary is not semantically inlined. They just reduce to good code using standard optimizations. The good part of that is if you copy an encoding/binary body into your own function, the optimization still happens.
Not particularly relevant to this issue, other than to note that math/bits probably doesn't need to be included here.

encoding/binary is not semantically inlined. They just reduce to good code using standard optimizations.

My understanding is that inlining cost is currently based on the function AST. Would it make sense to compute a “compiled inlining cost” and stash that somewhere (maybe in the export data) for more accurate cost estimates? (Is there already a separate issue for that, beyond #17566?)

I don't think there is a separate issue.
Yes, cost estimates based on AST size certainly suck.
We could record with each function the count or bytes of instructions that it compiles to, which would be better.
Within a package this can get tricky because we inline everything before we compile anything, but cross-package that works.

Would it make sense to compute a “compiled inlining cost” and stash that somewhere (maybe in the export data) for more accurate cost estimates?

The long term aspiration is to do inlining after we're in SSA form and have had a chance to apply some initial optimizations. I think that's a ways off still though.
In the mean time, I think some ad-hoc special cases for notable standard library functions seems fine. Or maybe a std-only //go:inlinecost directive that allows use to override the inlining cost.

We could record with each function the count or bytes of instructions that it compiles to, which would be better.

That's an interesting idea.

We could record with each function the count or bytes of instructions that it compiles to, which would be better.

I’ve experimented with this.
It yields fairly drastically different inlining results—appends are suddenly crazy expensive, as is code that can panic, because the cold code paths count too. It’s probably still better, but I didn’t pursue it because of the inconsistency vs intra-package inlining.

Whatever happens, I think we should avoid special casing just encoding/binary.LittleEndian.*. There are a number of equivalent functions that avoid the encoding/binary package as a dependency that may want to benefit from this as well (e.g., "compress/flate".load64)

@dsnet I hear you but special casing is easy and can happen ~immediately. Recognizing equivalent forms is definitely not easy in anything resembling the current inliner. These routines are used heavily in high performance code because it is one way to do something like vectorization. I'd rather not make the perfect to the enemy of the good here.

Random thought: Should little-endian and big-endian functionality be moved to math/bits?
With the acceptance of #395, you could imagine an API that operates on fixed-width arrays rather than pointers:
func LoadUint32LE(v [4]byte) uint32
func StoreUint32LE(v uint32) [4]byte


[Feature] Unsubscribe from subscription in Android

Feature description
On Android you can create a subscription to some attributes, e.g:
 ChipClusters.OperationalCredentialsCluster(chipClient.getConnectedDevicePointer(nodeId), 0).subscribeCommissionedFabricsAttribute(...)

But there is no way of cancelling the subscription in the current API.
Platform
android
Platform Version(s)
No response
Anything else?
No response

Closing this I noticed I was able to unsubscribe using the method shutdownSubscriptions(fabricIndex, nodeId, subscriptionId) in ChipDeviceController class


New rule: disallow fat-arrow when declaring lifecycle functions

See this recent bug in Blueprint: https://github.com/palantir/blueprint/issues/801
Using a fat arrow for componentDidMount broke global hotkeys for the component in question. Would be great to disallow that for each of the React lifecycle functions.
Note; This might be catchable with the tslint no-unbound-method rule.

name suggestion: react-lifecycle-method-context

This is actually fixed by more recent versions of @types/react. When you try to do this, it shows the error message:

Class 'Component<MyProps, {}>' defines instance member function 'componentDidMount', but extended class 'MyComponent' defines it as an instance member property.

@alexwalter88 neat! thanks for the heads up. I think it's safe to close this out in favor of the compiler check.


How to use goToAndStop() method

I'd like to be able to play the animation and stop it on a certain frame.
Apparently the lottie-web library uses the goToAndStop() method to achieve that.
Do you guys know how to use it with react-lottie?
Thank you

I just made a PR (#11) that allows this using a new prop animationRef. @crello take a look and let me know if it looks good to you!

@good-idea sorry for the delay... I just got a look and it looks great to me!

@nicco88 I made a separate branch that you can install directly --- i didn't want to publish my own fork --- you can use it with npm install<EMAIL_ADDRESS>

@good-idea @nicco88 guys, thanks for collaboration 👍 merged in 0.0.8

Thanks!


A 'belongsTo' field should match to a corresponding 'hasMany' or 'hasOne' field

I want to implement this GraphQL code below with Flutter using aws Amplify and when i push it it to the repository by it will push it perfectly but when i but when i pull it, it shows this error:

A 'belongsTo' field should match to a corresponding 'hasMany' or 'hasOne' field Error: A 'belongsTo' field should match to a corresponding 'hasMany' or 'hasOne' field     at Object.processBelongsToConnection (/snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/utils/process-belongs-to.js:23:15)     at Object.processConnectionsV2 (/snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/utils/process-connections-v2.js:97:45)     at /snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/visitors/appsync-visitor.js:488:65     at Array.forEach (<anonymous>)     at /snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/visitors/appsync-visitor.js:487:26     at Array.forEach (<anonymous>)     at AppSyncModelDartVisitor.processConnectionDirectivesV2 (/snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/visitors/appsync-visitor.js:486:38)     at AppSyncModelDartVisitor.processDirectives (/snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/visitors/appsync-visitor.js:119:18)     at AppSyncModelDartVisitor.generate (/snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/visitors/appsync-dart-visitor.js:26:14)     at Object.<anonymous> (/snapshot/repo/build/node_modules/@aws-amplify/appsync-modelgen-plugin/lib/plugin.js:51:24)     at Object.executePlugin (/snapshot/repo/build/node_modules/@graphql-codegen/core/dist/commonjs/execute-plugin.js:32:41)     at /snapshot/repo/build/node_modules/@graphql-codegen/core/dist/commonjs/codegen.js:58:47     at Array.map (<anonymous>)     at Object.codegen (/snapshot/repo/build/node_modules/@graphql-codegen/core/dist/commonjs/codegen.js:48:49)     at /snapshot/repo/build/node_modules/amplify-codegen/src/commands/models.js:133:23     at Array.map (<anonymous>)     at generateModels (/snapshot/repo/build/node_modules/amplify-codegen/src/commands/models.js:132:46)     at async postPullCodegen (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/amplify-service-helper.js:60:9)     at async pullBackend (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/pull-backend.js:32:5)     at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/commands/pull.js:52:17)     at async Object.executeAmplifyCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:292:9)     at async executePluginModuleCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:142:5)     at async executeCommand (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/execution-manager.js:40:9)     at async Object.run (/snapshot/repo/build/node_modules/@aws-amplify/cli-internal/lib/index.js:165:13)

it pushes with no error and i watched the tables in side the amplify studio it was perfect but i want to pull it to create the class models for me, for next use. cause without models there is nothing i could deal with
and this is my graphql code:
type Users @model @auth(rules: [{allow: public}]) {
  userId: ID!
  email: AWSEmail
  phone: AWSPhone
  bio: String
  social_links: AWSJSON
  profile_image: String
  followUsersFollower: [FollowUsers] @hasMany(indexName: "byUser_followUsersFollower", fields: ["userId"])
  followUsersReciever: [FollowUsers] @hasMany(indexName: "byUser_followUsersReciever", fields: ["userId"])
  followClubs: [FollowClubs] @hasMany(indexName: "byUser_followClubs", fields: ["userId"])
  clubs: [Clubs] @hasMany(indexName: "byUser_clubs", fields:["userId"])
  userTopics: [UserTopics] @hasMany(indexName: "byUser_userTopics", fields:["userId"])
  userChatSender: [UserChats] @hasMany(indexName: "byUser_userChatSender", fields:["userId"])
  userChatReciever: [UserChats] @hasMany(indexName: "byUser_userChatReciever", fields:["userId"])
  participants: [Participants] @hasMany(indexName: "byUser_participants", fields:["userId"])
  rooms: [Rooms] @hasMany(indexName: "byUser_rooms", fields:["userId"])
}

type FollowUsers @model @auth(rules: [{allow: public}]) {
  userIdFollower: ID! @index(name: "byUser_followUsersFollower")
  userIdFollowed: ID! @index(name: "byUser_followUsersReciever")
  userIdFollower2: Users @belongsTo(fields: ["userIdFollower"])
  userIdFollowed2: Users @belongsTo(fields: ["userIdFollowed"])
}

type Topics @model @auth(rules: [{allow: public}]) {
  topicId: ID!
  name: String!
  description: String
  clubs: [Clubs]@hasMany(indexName: "byTopic_clubs", fields: ["topicId"])
  userTopics: [UserTopics] @hasMany(indexName: "byTopic_userTopics", fields: ["topicId"])
}

type Clubs @model @auth(rules: [{allow: public}]){
  clubId: ID!
  name: String!
  userIdFounder: ID! @index(name: "byUser_clubs")
  topicId: ID! @index(name: "byTopic_clubs")
  topicId2: Topics @belongsTo(fields: ["topicId"])
  userIdFounder2: Users @belongsTo(fields: ["userIdFounder"])
  follow: [FollowClubs] @hasMany(indexName: "byClub_follow", fields: ["clubId"])
}

type FollowClubs @model @auth(rules: [{allow: public}]){
  clubId: ID! @index(name: "byClub_follow")
  userId: ID! @index(name: "byUser_followClubs")
  clubId2: Clubs @belongsTo(fields: ["clubId"])
  userId2: Users @belongsTo(fields: ["userId"])
}

type UserTopics @model @auth(rules: [{allow: public}]){
  userId: ID! @index(name: "byUser_userTopics")
  topicId: ID! @index(name: "byTopic_userTopics")
  userId2: Users @belongsTo(fields: ["userId"])
  topicId2: Topics @belongsTo(fields: ["topicId"])
}

type UserChats @model @auth(rules: [{allow: public}]){
userChatId: ID!
content: String
userIdSender: ID! @index(name: "byUser_userChatSender")
userIdReciever: ID! @index(name: "byUser_userChatReciever")
userIdSender2: Users @belongsTo(fields: ["userIdSender"])
userIdReciever2: Users @belongsTo(fields: ["userIdReciever"])
}

type Rooms @model @auth(rules: [{allow: public}]){
  roomId: ID!
  name: String!
  description: String
  dateTime: AWSDateTime
  participants: [Participants] @hasMany(indexName: "byRoom_participants", fields: ["roomId"])
  founderId: ID! @index(name: "byUser_rooms")
  founderId2: Users @belongsTo(fields: ["founderId"])
}

type Participants @model @auth(rules: [{allow: public}]){
  participantsId: ID!
  role: String
  joinDate: AWSDateTime
  peeringId: ID! # this must be an auto generated id
  userId: ID! @index(name: "byUser_participants")
  roomId: ID! @index(name: "byRoom_participants")
  userId2: Users @belongsTo(fields: ["userId"])
  roomId2: Rooms @belongsTo(fields: ["roomId"])
  participantIdSender: [RoomChats] @hasMany(indexName: "byParticipants_participantIdSender", fields: ["participantsId"])
}

type RoomChats @model @auth(rules: [{allow: public}]){
  roomChatId: ID!
  content: String
  participantIdSender: ID! @index(name: "byParticipants_participantIdSender")
  participantIdSender2: Participants @belongsTo(fields: ["participantIdSender"])
}

Is this related with GraphiQL or GraphQL language service?

@YawarOsman I wish we could help you - but it seems this issue you are having would be solved by the aws amplify team - whether via support or by searching their knowledgebase for flutter related issues if applicable. This repo is for graphql IDE tooling on web & desktop. Best of luck on your graphql journey!


feat(tests): add test result overrides

Signed-off-by: Felipe Zipitria<EMAIL_ADDRESS>
Allows tests to be overriden by using a map of test_id, text.
Added a new config setting to truncate logs

Closes #25 .


Update 0.4 release branch

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

Project coverage is 92.11%. Comparing base (81913b9) to head (82b11c2).

Additional details and impacted files
@@             Coverage Diff              @@
##           release/0.4     #449   +/-   ##
============================================
  Coverage        92.11%   92.11%
============================================
  Files               49       49
  Lines             3298     3298
============================================
  Hits              3038     3038
  Misses             260      260

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


blog: "What's new in Svelte" June newsletter

Sorry it's a bit last minute, this month! Let me know if I missed anything.

Thanks for the feedback @benmccann! I committed your suggestions and added a mention of Svelte 4.0 in the upper section. I think this is good to merge :)


Add keyboard service

Adds a keyboard service so key events can be registered on elements like document.
Thanks to cradee (@cradee_gitlab on the yew gitter) for making it apparent something like this might be useful and for implementing a prototype.

Edit: a thought related to this feature.
This service is pretty simple, and could be done in someone's own project without too much difficulty. Should there be a bar that must be cleared for service additions? Would it make sense to create another project within yewstack for accessory services - ones that aren't core to most applications, but are common enough to justify sticking them in a library for reuse? Should all services be moved to another crate and be reexported from yew but gated by a default "on" feature flag?

I agree that services should be feature gated, thanks for creating the issue https://github.com/yewstack/yew/issues/648 for it!

Looks good but I think we should add some comments about compatibility. Looks like these events are not supported on some browsers like Safari for example. Please add a note about that and a link to https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers, thanks!

Would it be wise to expand the scope of this PR to include all GlobalEventHandlers as a service instead of just keyboard-specific events?


Update dependencies with bundle update

Addresses vulnerability in rack 2.2.2, as highlighted by this Snykbot PR: https://github.com/alphagov/digitalmarketplace-functional-tests/pull/772

Rubocop is unhappy because of the bump to rubocop-rspec: https://github.com/rubocop-hq/rubocop-rspec/issues/931


Fix SYLT (again)

Hello, first of all - congratulations on 1.0 release! Thanks for the amazing work.
However my fix (#74) just fixed the timestamp format, and didn't actually resolve #70, which you've closed, but there are still 2 issues with it. According to https://id3.org/id3v2.3.0#sec4.10:

Content descriptor  <text string according to encoding> $00 (00)
There is a description field for the SYLT tag which you were missing. I've implemented it.

$01     Unicode character set is used => $00 00 is sync identifier.
They don't specify whether it's UTF-8, or UTF-16. However I've tried Kid3 and it wrote UTF-16 even WITH UTF-8 selected. There were also few real-life examples sent to me by friends, who had UTF-16 in SYLT. Some other libraries write UTF-16 only too. So I do think this is the intended way.

I've also included a test file SYLT.mp3, which is just a copy of silence.mp3 but with a SYLT tag added using Kid3.
Thank you.

Ah, thanks for spotting this!
It's unfortunate that we need to add a new field to the SYLT frame content struct, that counts as a breaking change. But as this truly is a bug I consider breakage like that acceptable. I'll also yank 1.0 and release 1.0.1


Updating hvpa-controller version:v0.3.0->v0.3.1

How to categorize this PR?

/area auto-scaling
/kind impediment
/priority normal
What this PR does / why we need it:
Adding release notes. #2726 does not contain release notes
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note:

Consider hpa scale out limited if hpa is not deployed
Check if OOMKilled pod has latest resource values before overriding stabilisation

@ggaurav10 Isn't this a duplicate of #2726?

@ggaurav10 Isn't this a duplicate of #2726?

Yes. I am unable to add release noted in that, so created a new PR with release notes


Task 2

Created main and search views.
@YauheniyaBasaranovich

Fully reworked frontend
@YauheniyaBasaranovich
Check it out here


Rasterizer Stage: Typo Device -> Context

@alist : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Add header logo and cleanup header layout

Replaces the logo webp with a crisper SVG that Jim made
Adds the missing, large screen only version of the header which includes the logo without text
Cleans up a few instances of buttons being out of position in headers fixes WRAP-401

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket: