Add metrics provider/consumer uts

What is the purpose of the change
Provide unit tests about service provider and consumer metrics.
Brief changelog

add test for metric dubbo_provider/consumer_qps_total
add test for metric dubbo_provider/consumer_requests_total
add test for metric dubbo_provider/consumer_requests_processing
add test for metric dubbo_provider/consumer_requests_succeed_total
add test for metric dubbo_provider/consumer_rt_milliseconds_p95
add test for metric dubbo_provider/consumer_rt_milliseconds_p99

Verifying this change

Checklist

[x] Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
[ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
[ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
[ ] Add some description to dubbo-website project if you are requesting to add a feature.
[ ] GitHub Actions works fine on your own branch.
[ ] If this contribution is large, please follow the Software Donation Guide.

The naming of the class is meant to indicate that it is intended for use in white box testing, and some third-party libraries also use this name.
It indeed not very intuitive. Maybe I could rename it to "TestUtils".

Codecov Report

Merging #12120 (cc8f294) into 3.2 (0b62b40) will decrease coverage by 0.19%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.2   #12120      +/-   ##
============================================
- Coverage     69.77%   69.58%   -0.19%
+ Complexity      129        2     -127
============================================
  Files          3397     1590    -1807
  Lines        159184    65356   -93828
  Branches      26291     9519   -16772
============================================
- Hits         111070    45478   -65592
+ Misses        38437    15497   -22940
+ Partials       9677     4381    -5296

see 1841 files with indirect coverage changes
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


graph order not stable on index page

This is unintended behaviour introduced by 1.3.0
Graph order on the index page will be random after each restart

This was never stable even before 1.3.0, the only way to make it stable is to provide a custom layout with sources specified - i still think it should be stable and follow order of definition in the config, re-classifying this as enhancement


generate operation does not take model package parameter

Problem statement
Given the (incomplete) definition below:
We generate our models as such:
swagger generate model -f api/swagger.yaml \
	-t api -m types -C api/swagger-gen.yaml \
	-n ErrorResponse \
	-n User \

Then we generate our oeprations
swagger generate operation -f api/swagger.yaml \
	-t api -a types -C api/swagger-gen.yaml \
	-T api/templates --skip-responses --skip-url-builder \
	-n UserCreate \

From the first command our model package is types. Since generate operation doesnt take a model package we end up with
// UserCreateParams contains all the bound params for the user create operation
// typically these are obtained from a http.Request
//
// swagger:parameters UserCreate
type UserCreateParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*The user to create
	  Required: true
	  In: body
	*/
	User *models.User  // <--- ??? ¯\_(ツ)_/¯
}

Swagger specification
paths:
  /users:
    post:
      description: |
        Create a \]user.
      operationId: "UserCreate"
      tags: ["Admin"]
      parameters:
        - name: "user"
          description: "The user to create"
          in: body
          schema:
            $ref: "#/definitions/User"
          required: true
      responses:
        200:
          description: "ok"
          schema:
            $ref: "#/definitions/User"
        400:
          description: "bad parameter"
          schema:
            $ref: "#/definitions/ErrorResponse"
        401:
          description: "unauthorized"
          schema:
            $ref: "#/definitions/ErrorResponse"
        500:
          description: "internal server error"
          schema:
            $ref: "#/definitions/ErrorResponse"

definitions:
  User:
    description: "A user"
    type: "object"
       properties:
          id:
            type: "string"
            description: "The user id"
          metadata:
            type: "object"
            description: "User metadata"
            additionalProperties:
              type: "object"
          created_at:
            type: "string"
            description: "The user creation date"
            format: "date-time"
          updated_at:
            type: "string"
            description: "The last update date"
            format: "date-time"

   ErrorResponse:
    description: "A common error response"
    type: "object"
    required: ["message"]
    properties:
      message:
        type: "string"
        description: "The error message"
        x-nullable: false

Steps to reproduce
See Above
Environment
swagger version: 0.24.0
go version: 1.14.4
OS:   Windows

Closed with
https://github.com/go-swagger/go-swagger/pull/2356


Smoothing?

Great app! Thanks for sharing.
Any suggestions on how I could implement smoothing to the lines that are drawn?

I imagine you can play around with the strokeJoin, strokeMiterLimit or other properties of the Paint class to try and achieve better smoothing.
I couldn't get much better than the standard settings with the strokeCap set to Round (as it currently is) but let me know if you manage to get something better!


Localization remap doesn't work for Ogg Vorbis sounds, when language is changed at run-time

Godot version:
v3.2.3
OS/device including version:
Windows 10
Issue description:

When language is changed real-time, remapping the sounds doesn't work.
Same bug is when trying to play from AudioStream or AudioStream2D.
Works fine is specific language is selected as default (project settings->locale).
The problem occurs with .ogg files
System works when using .wav files.

Steps to reproduce:
Test 1:

Open the test project.
Open VOTEst.tscn
Run the scene
Placeholder voiceover will be looping (golden ball is in the game). Default language is english.
Use keys 1-3 to dynamically change the locale (1 = french, 2 = deutch, 3 = english)
As soon as language is changed, there will be a silence instead of voiceover in different language
Notice that the golden letter switches correctly, meaning remap works fine for textures.

Test 2:

Change the default language in Project setting/General/Locale to "de" or "fr"
Run the scene
Appropriate sounds are playing

Expected results :
Based on the locale, sounds should be remaped to appropriate ogg, even realtime
Minimal reproduction project:
TestVO.zip

problem is real!
There was a problem during localization.
50MB of voice acting in wav weighs too much.
Sometimes a detected problem leads to a crash or random sound. (My project has ~60 sound files in each language)
What exactly is the problem with switching? I would edit the source myself.

Can you test this with MP3 sounds instead of Ogg Vorbis?

Can you test this with MP3 sounds instead of Ogg Vorbis?

yes I checked.
Mp3 doesn't work either.
Mp3 sometimes distorts the original file after changing the localization.

I remember having a look at this at the time, and I think it had something to do with files having different bitrates (some were 44.1 KHz and others 48KHz), and Godot not updating that information and playing files at a wrong bitrate.
@Valeryn4 can you check if your audio files are all at the same bitrate? And check if there's no issues when switching from files at the same bitrates?
You can use file to quickly check:
$ file **/*.mp3
assets/file_example_MP3_1MG.mp3: Audio file with ID3 version...320 kbps, 44.1 kHz, Stereo
                                                                         ^^^^^^^^
...

 for i in *.wav; do ffmpeg -i "$i" -vn -ar 44100 -ac 2 -b:a 192k "${i%.*}.mp3"; done
$ file ./*.mp3
./donuts.mp3:  Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo
./eight.mp3:   Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo
./fishes.mp3:  Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo
./five.mp3:    Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo
./flowers.mp3: Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo
./four.mp3:    Audio file with ID3 version 2.4.0, contains:MPEG ADTS, layer III, v1, 192 kbps, 44.1 kHz, Stereo

In this test set, it works correctly. But later one of the localizations will stop working.
test_AUDIO.zip
Just press various buttons and press the play button.
mp3 starts chewing sound.

Error in editors 3.5, 3.5.1rc2
The editor closes when working with AudioStreamPlayer. If a file with the *.ogg extension of several megabytes in size is specified in the stream field. And then rename this file, then the import operation will occur and the editor will close either when trying to start a melody (set playing to true), or clear the stream field, it may hang.

Create an empty project.
Add a file of several megabytes with the extension *.ogg to the project.
Add the AudioStreamPlayer node.
Save the scene.
Specify in the stream field the file with the extension *.ogg, downloaded earlier.
Rename the file (add, for example, 1).
The editor closes.


ReadOnly registers incorrectly generate setter functions

Context:
According to the documentation, field access modifiers should generate getters and setters based on their read/write capabilities. Specifically:

Read access should generate a getter with the field name
Write access should generate a setter with the set_ prefix

However, I've observed that fields marked as RO/ReadOnly are incorrectly generating setter functions, despite being read-only fields that should only have getters.
Expected behavior:

RO/ReadOnly fields should only generate getter functions
No setter functions should be generated for read-only fields

Actual behavior:

RO/ReadOnly fields generate both getter and setter functions
Setter functions are being generated when they shouldn't be

Example
On the S2LP driver, MC_STATE1 is declared as a RO register. But setters get generated:

Hi, thanks for the report!
The system is working as intended though. (Maybe the intend is wrong, that's possible!)
There are two access specifiers: For the register and for the fields.
The one you see in S2-LP is a register access specifier. And since the default access for fields is RW, the setters are still generated.
Now maybe the fields should be influenced by the access of their register?
I guess that'd be logical. However, that could break 'ref' objects who share the same fields but might have a different register access specified.
So not sure how to improve that.

Understood. I can't think of an easy fix for this.
Maybe just document it for now?
Do you want me to open a PR to add this to the fields section of the book:

Registers and fields have independent access specifiers.
By default, fields are set to RW (Read-Write) access, so setter functions are generated automatically.
Register access settings do not affect field access, but changing this could make the system more consistent. However, doing so might break ref objects, which often share fields but may have different access requirements at the register level.

Perfect, thanks!


[RFC] Internal Model Proposal

What kind of business use case are you trying to solve? What are your requirements?
Existing preppers consume and emit serialized JSON strings. This wastes CPU cycles when chaining preppers due to excessive de/serialization. Users of the DP have encountered runtime exceptions due to conflicting data requirements of their preppers. Model definitions are duplicated throughout prepper plugins. (e.g. otel-trace-group-prepper TraceGroup and otel-trace-raw-prepper)
Requirements:

Extendable - the model should scale beyond the existing trace analytics support.
Type Safety - the model should be prescriptive enough to enable type safety checks throughout the pipelines in the future.
Eliminate need to duplicate code between plugins
Allow preppers to operate on internal data in a generic way
Remove excessing serialization

What is the problem? What is preventing you from meeting the requirements?
Currently, data flows through Data Prepper as a Collection<Records>. Records are generic types that allow for any type to flow through. Trace events have been been defined as a Collection of Records as type String. The strings are serialized representations of JSON objects conforming to the OTEL Spec.
What are you proposing? What do you suggest we do to solve the problem or improve the existing situation?
We will deprecate Records and define explicit object models for Traces and Logs. Traces and Logs will implement a new interface called Event. Events will be the new data type flowing through Data Prepper.
Source plugins will be responsible for translating the external requests into Events. Sink plugins will be responsible for transforming the Events into the correct output schema. Preppers will only accept Events as inputs and outputs or subtypes. This will effectively create internal boundaries for our model between sources and sinks.
Event
Events will be managed through public putting, deleting and fetching methods. An additional method for generating a JSON String is included to support the sinks.
/**
* Add or update the key with a the given value in the Event
*/
void put(String key, Object value) {...}

/**
* Retrieves the given key from the Event
*/
<T> get(String key, Class<T> type);

/**
* Deletes the given key from the Event
*/
void delete(String key);

/**
* Generates a Json representation of the Event
*/
JsonNode toJsonNode();

/**
* Get Metadata
*/
Metadata getMetadata();

EventMetadata
Will be a class with a slight refactor of the RecordMetadata Class. Currently, RecordMetadata maintains a map of attributes and has one required recordType attribute. However, the recordType has been historically ignored. The new model will have required attributes recategorized as POJO fields. The eventType will help preserve the type (i.e log, span), for casting and type validation. The EventMetadata class will still maintain a mapping for custom metadata defined in attributes.
public class EventMetadata {
private String eventType;
private long timeReceived;
private Map<String, Object> attributes;

Span
Span will be a new model to support the traces. It will implement the Event interface and maintain the same attributes as the current RawSpan Object. This will ensure backwards compatibility with our existing preppers.
Phased Approach
This design includes breaking changes and will be broken into two phases. One phase allows us to build support for the new model and onboard log ingestion and trace analytics. The second phase will deprecate the old model and will be a part of the 2.0 release
What are your assumptions or prerequisites?
The design and changes to the pipelines to enforce type safety are out of scope and should addressed in a separate review. However, the output of this design should not hinder but enable type safety enforcement.
This aligns with the proposal for Log Ingestion RFC
What are remaining open questions?

Which library should we use to support the underlying interfaces? (JsonPath or Jackson) JsonPath is a library for reading and updating JSON documents. It natively supports the dot notation. Jackson is fast JSON library for parsing json objects and supports Json Pointers for managing objects. Both libraries will work. Jackson will be ideal to reduce dependencies.

I built a small POC locally to demonstrate using Jackson over JsonPath. This will reduce our dependencies while supporting the functionality we need. Here is the example code:
public class Events {

    private JsonNode jsonNode;
    private ObjectMapper mapper;

    // Constructors ...

    public <T> T get(String key, Class<T> type) {
        JsonNode node = jsonNode.at(key);
        if (node == null) {
            return null;
        }
        try {
            return mapper.treeToValue(node, type);
        } catch (JsonProcessingException e) {
            return null;
        }
    }

    public void put(String key, Object value) {

        LinkedList<String> keys = new LinkedList<>(Arrays.asList(key.split("\\.")));
        putKeys(jsonNode, keys, value);
    }

    private void putKeys(JsonNode node, LinkedList<String> keys, Object value) {
        if (keys.size() == 1) {
            JsonNode valueNode = mapper.valueToTree(value);
            ((ObjectNode) node).set(keys.get(0), valueNode);
        } else {
            JsonNode newNode = node.get(keys.get(0));
            if (newNode == null) {
                newNode = mapper.createObjectNode();
                ((ObjectNode) node).set(keys.get(0), newNode);
            }
            keys.remove(0);
            putKeys(newNode,  keys, value);
        }
    }

I don't foresee any issues following this appraoch at this time.

Steps for implementation:

Build Interfaces
Build implementations for Events
Build Log and Trace implementations
Extend Prepper, Sink, etc interfaces to support new model
Begin plugin implementation with new model...

Moving forward with option 2 to leverage Record<Event>. Records will still be deprecated in 2.0.


Remove guide link metadata from unlisted extensions

FYI @holly-cummins.

Ok - didn't know we had a script that validates the guide link is present. Guess I'll fix that up too.

Ok - didn't know we had a script that validates the guide link is present. Guess I'll fix that up too.

What would be awesome is if the script validated the guide link was valid.
Although, actually, it's non-trivial since the codebase and the website are not in sync, so sometimes extensions are in code but nothing is on the web ... and sometimes the docs are removed from the web but the old extensions are still there, so the link needs to mapped from a latest link to an older version. I try and do all that before publishing a guide link on http://quarkus.io/extensions, but it would be a lot for the script to do. If the script did want to try and do that deeper validation, happy to share my logic. :)

Latest commit tweaks things to just target the camel-k extension.


alternate theme rendering - mass build pipeline

Pre-Flight checklist

[ ] Testing

[ ] Code is tested
[ ] Changes have been manually tested

What are the relevant tickets?
Closes https://github.com/mitodl/ocw-studio/issues/1428
What's this PR do?
This PR adds 3 optional arugments to the upsert_mass_build_pipeline management command:

--prefix - Adds an optional prefix to the path of sites deployed by the mass build pipeline
--themes-branch - Adds an optional override for the branch of ocw-hugo-themes to be used when building sites in the mass build pipeline
--projects-branch - Adds an optional override for the branch of ocw-hugo-projects to be used when building sites in the mass build pipeline

Each unique configuration will create a new set of pipelines for draft and live in the Concourse mass-build-sites group.  The only set of pipelines with automatic triggering enabled, however, will be the pipeline with the default branches of ocw-hugo-themes and ocw-hugo-projects matching settings.GITHUB_WEBHOOK_BRANCH.  Other mass build pipelines will need to be triggered manually.
How should this be manually tested?

Testing this PR will require setting up Concourse and Minio containers locally as well as a Github test organization, which only requires that you set some environment variables before running docker-compose up.  Check the readme for details.  You will also want to probably have a recent backup of the production database restored to your local instance by doing the following (replace PROD_DB_URL with the URL of the production database, TODAY_DATE with today's date):

pg_dump PROD_DB_URL > ./dumps/prod_TODAY_DATE.sql
docker-compose rm -sv db
docker-compose up -d db
docker-compose exec -T -e PGPASSWORD=postgres db psql -h db -U postgres < ./dumps/prod_TODAY_DATE.sql
docker-compose exec web ./manage.py createsuperuser

Once your instance of ocw-studio is running, run the following to push up the theme assets pipeline and ocw-www pipeline:

docker-compose exec web ./manage.py upsert_theme_assets_pipeline
docker-compose exec web ./manage.py backpopulate_pipelines --filter ocw-www

Once this is complete, browse to http://concourse:8080, login with test / test and go to the theme assets pipeline and trigger a build
Once the theme assets build is complete, go to the live ocw-www pipeline and trigger a build
Once both of these are complete, verify that you see the OCW home page at http://localhost:8045
Make a temporary edit for testing to the mass-build-sites.yml template file (line 152) for this testing procedure to artifically limit the mass build to 10 sites:

            index=0
            jq -c '.sites[]' publishable_sites/sites.json | while read i; do
              if [[ $index < 10 ]]
              then
                result=$(process_site $i) || result=1
                echo "RESULT IS $result"
                if [[ $result == 1 ]]
                then
                  fail_site $i
                fi
                ((index=index+1))
              fi
            done

Upsert the default mass build pipeline by simply running: docker-compose exec web ./manage.py upsert_mass_build_pipeline
Upsert a test pipeline for building course-v2 by running: docker-compose exec web ./manage.py upsert_mass_build_pipeline --prefix /course-v2 --themes-branch main --projects-branch cg/course-v2-testing
Visit http://concourse:8080/?search=team%3A"main" group%3A"mass-build-sites" and verify that you see 4 pipelines like this (yours will all be paused and grey):

Unpause the live versions of the pipelines and start the one on the main branch (or whatever you have GITHUB_WEBHOOK_BRANCH set to)
Once the pipeline completes, verify that you have a site at http://localhost:8045/courses/10-01-ethics-for-engineers-artificial-intelligence-spring-2020/ that is using the current version of the course theme:

Run the mass build pipeline with projects_branch: cg/course-v2-testing
Visit http://localhost:8045/course-v2/courses/10-01-ethics-for-engineers-artificial-intelligence-spring-2020/and verify that you have a site rendered with the course-v2 theme like this:

Where should the reviewer start?
upsert_mass_build_pipeline.py, concourse.py, concourse_test.py, mass-build-sites.yml
Any background context you want to provide?
This will be used to build alternate versions of the site in RC for testing new themes

@gumaerc Posting a reminder here to update the concourse container instructions for running on an M1 processor.


Rancher 2.0 Monitoring Support

We will support a monitoring tools in Rancher 2.0. The detail design doc is here. Following features will be needed:

[x] Deploy Prometheus(&node exporter) as The Cluster Monitoring Tools  https://github.com/rancher/rancher/issues/15702 https://github.com/rancher/rancher/issues/15703
[ ] Deploy Prometheus Metrics Server Adapter to Support HPA in Cluster (https://github.com/rancher/rancher/issues/14159)
[x] Real-time Metrics Graph for Pods in Rancher UI, Shows CPU/Memory/Network IO/Disk IO metrics https://github.com/rancher/rancher/issues/15704 https://github.com/rancher/rancher/issues/15705
[x] Real-time Metrics Graph for Nodes in Rancher UI, Shows CPU/Memory/Network IO/Disk IO metrics https://github.com/rancher/rancher/issues/15704 https://github.com/rancher/rancher/issues/15705
[ ] HPA Management in Rancher UI (https://github.com/rancher/rancher/issues/14159)
[x] Support More Alert Rules(such as CPU/Memory usage alert) when Monitoring Tools is Enabled https://github.com/rancher/rancher/issues/15706 https://github.com/rancher/rancher/issues/15707

https://github.com/rancher/rancher/issues/13916

@orangedeng with the monitoring support, let's make sure it includes the following
Monitoring at project level, cluster level, global level
Monitor health of RKE clusters from Rancher server – etcd key space, API server load and responsiveness, etcd load and responsiveness, basically etcd dashboard in Prometheus - Please follow up with @cloudnautique @jgreat on how this would be used
Turning on metrics on Rancher server, currently it's turned off due to previous issues

About metrics on Rancher Server, our deployment already enabled few of metrics and make rancher-server expose metrics data for prometheus by introducing following commits (this is based on v2.0.8) to make it easy to debug/troubleshoot.

https://github.com/ukinau/rancher/commit/eebd6ae8b158a3c2fd348d6415c8c5bb619c72fa
https://github.com/rancher/norman/pull/202/files
https://github.com/rancher/norman/pull/201/files

To be honest, it's difficult to debug/troubleshoot rancher with just log and resource status, so definitely we needed more internal state about established web socket session, which handler failed with which key and so on. These information direct to the place operator need to look at.
I want to know if there is possibility that these solution(not exact this implementation) will be merged into upstream in the future or not.
If there is, I'm very willing to adjust current solution to current master basis. How about it?

Remove the releases/alpha1 label as this epic contains HAP support in Rancher.


CLI HTTP Client Should Return HTTP Body to Commands

@dubeejw commented on Wed Mar 22 2017
As values returned from Whisk backend can get out of sync with the CLI, the HTTP body of a response should be returned to each command. This way the HTTP body can be directly printed. This allows fields to be added/removed from the backend responses without the CLI needing to be updated unless the modified fields are critical to the functionality of the CLI.

@dubeejw commented on Wed Mar 22 2017
@csantanapr, @mdeuser, this is technical debt, and should be fixed ASAP.

@dubeejw commented on Thu Mar 23 2017
All of the commands currently receive the HTTP response from each request, but the response body is not accessible as the connection has already been closed.

@dubee @mdeuser is this still an issue?

The response body is available to the calling cli functions.  If the -v parameter was used to dump the response body, the body is restored into the response by the client code to ensure the caller has access to the full response
https://github.com/apache/incubator-openwhisk-client-go/blob/67f06bc4f26816140cc7a7b8deeb6ad2cad4b133/whisk/client.go#L523


Working Tree is not showing (the editor could not be opened because the file was not found)

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version: VS Code 1.73.1 (system setup)
OS Version: windows 10

Steps to Reproduce:

Source control is showing changes
As I try to open working tree file it says the editor could not be opened because the file was not found.
As i press Try Again

/gifPlease

Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, .gif files are preferred as they are displayed inline on GitHub. You may find https://gifcap.dev helpful as a browser-based gif recording tool.
If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording (Developer: Toggle Screencast Mode in the command palette). Lastly, please attach this file via the GitHub web interface as emailed responses will strip files out from the issue.
Happy coding!

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


【ts-sdk】makeMoveVec not support empty vector

the dependencies is :
"@mysten/bcs":  "0.7.0",
<EMAIL_ADDRESS>"0.30.0",
the contract code is:

the ts code  is:

ruselt:
when coin_object_ids_bhas is empty vector, get an error:

this transactions input is :
coin_object_ids_a:
{
kind: 'MakeMoveVec',
type: { None: null },
objects: [
{
kind: 'Input',
value: '0x1432019716ecf2d328abc8d4662356c35832d084e31ccafd9add6e96215e1b4a',
index: 2,
type: 'object'
}
]
}
coin_object_ids_b:
{ kind: 'MakeMoveVec', type: { None: null }, objects: [] }
this all args
{
kind: 'MoveCall',
target: '0xa5b7b10130081fcfab08b8751da7a320265e4211deac23f44c256e0f5c03f045::pool_script::swap',
arguments: [
{
kind: 'Input',
value: '0x39140f2facfc5e709c152f1d1448c1c87a21b8bdb18945b9077da996d9b791fa',
index: 0,
type: 'pure'
},
{
kind: 'Input',
value: '0xda5b27566e4442d8f1047921f802c6d5fd116369b145211221884df57255fa94',
index: 1,
type: 'pure'
},
{ kind: 'Result', index: 0 },
{ kind: 'Result', index: 1 },
{ kind: 'Input', value: true, index: 3, type: 'pure' },
{ kind: 'Input', value: true, index: 4, type: 'pure' },
{ kind: 'Input', value: '100', index: 5, type: 'pure' },
{ kind: 'Input', value: '0', index: 6, type: 'pure' },
{ kind: 'Input', value: '4295048016', index: 7, type: 'pure' },
{
kind: 'Input',
value: '0x0000000000000000000000000000000000000000000000000000000000000006',
index: 8,
type: 'pure'
}
],
typeArguments: [
'0xd099999e160c756a9e67da62f8eea05fc131006a4a73c96e0fd4baa56692a3f9::usdc::USDC',
'0xd099999e160c756a9e67da62f8eea05fc131006a4a73c96e0fd4baa56692a3f9::usdt::USDT'
]
}

How to use makeMoveVec, is there an example?

@devlb1024 Is there any reason you couldn't just take in a single coin and avoid the move vec all together? With Programmable Transaction Blocks, you should be able to use mergeCoin and splitCoin transactions to manage the coin objects into a single object.
@tnowacki I'm curious what the expected behavior is here for empty move vecs.

@Jordan-Mysten, the issue is that with a MakeMoveVec that has no elements, a type needs to be supplied (in the case where it's initialised non-empty, the type is inferred), and that doesn't seem to be happening here.

@Jordan-Mysten   when swap the direction is a2b,  在b方向需要传空vector

the type is inferred

Noe the type is only inferred for objects. So the type needs to be provided for pure and empty

the type is inferred

Noe the type is only inferred for objects. So the type needs to be provided for pure and empty

how to set the type   when the vector is  empty,  has typescript code example?

@devlb1024 It should be builder.makeMoveVec({ type: 'some_type_here', objects: [] })


Typescript definition

Hi, the library looks great, thanks for it :)
I'm trying to create a d.ts file, to make this library TypeScript compatible.
Here is what I have so far: https://gist.github.com/bali182/3f3cd855cd435e4add90a9f3e776be79#file-react-responsive-grid-d-ts
However, I have no clue, how to reference react properly (the way it is now, is not really robust). Does anyone know how to do this? Here for example in https://github.com/react-toolbox/react-toolbox/blob/dev/react-toolbox.d.ts#L27 it isn't even imported properly

Interesting idea! I have no idea how to create types like this for Typescripts but if you figure it out, would be happy to add it. Would love to convert everything to JS + add Flow support as well. If anyone wants to take that on, just raise your hand.

Created a PR, but we seriously need reviewers, because I just did what I've seen in the examples

Yeah, let's get a LGTM and I'll merge it.


How to show color in js file?

I wrote color value in js file using with JSX syntax, and How can I see the color in the editor like in css file?
Colors.js
const colors = {
  background: '#1F0808',
}

Looks similar to #36485

Thanks, yes this is a duplicate of #36485


Make multi-level topics the only implementation

🚀 Tech Debt
Relevant Package [REQUIRED]

 This feature request is for handling data from external MQTT
Description [REQUIRED]
 Currently to original JSON wrapper is use as the payload sent via MQTT is  the default and the new approach of multi-level topics is optional and must be enabled.
Describe the solution you'd like
 Make multi-level topics the only option. Remove the JSON wrapper implementation
Describe alternatives you've considered
 Have you considered any alternative solutions or workarounds? Make multi-level topics the default, but leave JSON wrapper implementation as an option. This doesn't clean-up the code and we still have both approaches to maintain.

@cloudxxx8 , @iain-anderson , thoughts on removing the old JSON wrapper implementation in favor of the new multi-level topics implementation?

I am fine with this change

OK with me


Add support for early / experimental Linky (G1 pilote)

Following my experience, it seams that there is early Linky (G1 pilote 90A, ADS type 67) with protocol deviation in standard mode. May also concern G1 pilote 60A, ADS type 68.
Not tested in historic mode.
Not tested in producer mode.
SINSTS is replaced by SINST1
SMAXSN is replaced by SMAXN
SMAXSN-1 is replaced by SMAXN-1
This PR add detection of early Linky models and a way to handle automatically protocol variation  based on ADS code.

Based in the wrong branch on my github, limiting possibke work without creating a mess.. l’ll create another PR.


PWA support

Is Your Feature Request Related to a Problem? Please Describe
I'd like to make an installable web application using P2P storage.
For example, I want some kind of P2P-Steam, which will be able to sync game saves to user personal cloud storage (like google drive), but in order to not make users choose the location of where game saves are stored every single time, I'd like that all users would place this kind of info into a shared P2P storage, so when a new user installs the same game, - the app will automatically check if there are some known places where saves are stored, and setup syncing automatically using these paths. So in the end it will be an entirely server-independent solution for game saves (ofc, it's just one of examples of potential features).
Solution You'd Like
Beaker to support PWA, and extends functionality of PWA, so it can also:

Access such a P2P storage (hyper://...)
Run a daemon which shares this P2P storage

Something similar to File System Access, but with Hyperdrive API.
Alternatives You've Considered
Create a whole independent executable, likely an Electron app, which will include both a classic PWA, and a NodeJS server running this daemon for sharing P2P storage (kind of, separate Beaker browser??? but with more narrow purpose).
Additional Context

There's just a single mention of PWA in this repository currently: https://github.com/beakerbrowser/beaker/issues/1744#issuecomment-645057997, - but at least some people agree that PWA is the future of cross platform applications among Beaker community
In Hyperdrive repository, there's also a guy who's curious about this: https://github.com/hypercore-protocol/hyperdrive/issues/305#issue-761171964, - question #8 in his list
Also, here's just some random guys wanting P2P storage too, on stackoverflow: [1], [2], [3], [4], [5] (less related to PWA exactly, but supposedly they would've been interested in this solution too... if they alive... because one of those questions is 10 years old)

hi, are there any updates on this issue / would you know of a timeline to supporting PWAs in Beaker?


Remember & recall chat interactions [WIP]

Some mods made to the script that save bot and user interactions to localStorage to be recalled later.
TODO's:

record final interactions: clicked button rather than button selection

written text rather than button selections

if the above works, remove sanitation function from button bubbles
figure out the right place for save points
finalize design
test with all chat-bubble examples, including closed-source NLC version

test with Archie.AI Chrome extension
test with Archie.AI production web app

There's still an issue that two bubbles appear at once, with no delay.


Feature/header

Your branch has some issues below:

Too many files change
Naming of feature is not good
Too many font types
The action in a branch should be exactly with the branch name


Create an accessor to singleLineGradientColors in Line Chart

We need an accessor to singleLineGradientColors
Expected Behavior

singleLineGradientColors is configurable
Current Behavior

It is not
Possible Solution

Add accessor

This confused me a lot. I was expecting single line graphs to honor the .colorSchema setting, alas it doesn't. Was just about to write an issue about it when I found this one.
So one idea would be to run the gradient through the colors passed to .colorSchema. What do you think about that?

I'm working on a PR that implements my idea

Hi @Tobbe , thanks for the comment!
We already have a set of gradients, the only problem is that they are not configurable. Let us open this option and see if that solves your requirements.

This is the code I have now:
function buildGradient() {
    const data = colorSchema.map(function (color, index) {
        return {
            offset: `${index * 100 / (colorSchema.length - 1)}%`,
            color: color,
        };
    });

    console.log('data', data);

    svg.select('.metadata-group')
        .append('linearGradient')
        .attr('id', lineGradientId)
        .attr('x1', '0%')
        .attr('y1', '0%')
        .attr('x2', '100%')
        .attr('y2', '0%')
        .selectAll('stop')
        .data(data)
        .enter()
        .append('stop')
        .attr('offset', ({offset}) => offset)
        .attr('stop-color', ({color}) => color)
}

Seems to work 😄
This way you don't need two different settings/variables for the colors. singleLineGradientColors isn't needed any more

I'll create a proper PR tomorrow

Hi @Tobbe, thanks for the suggestion!
I have added the accessor on https://github.com/eventbrite/britecharts/pull/241, so that you could use one of our already made gradient colors or specify your own gradient.
I talked with our designer @evb-sun , and she doesn't want us to use the regular color schemas for gradients, as they weren't supposed to be used for that and the contrast/colors won't be right.
Thanks a lot anyways!

With my patch, and no further configuration, this is what the demo line chart with a single data source looks like:

But of course you can configure it to use your predefined gradient colors as well:
.colorSchema(colorHelper.colorGradients.greenBlueGradient)

With that the graph looks like this:


Add a way to group DPRINTs on device so they come out all at once

Currently the only way to order dprints on between cores is to use RAISE/WAIT, which can stall the program if the print buffer is full. If you don't use these then there's no guarantee of ordering in prints coming out from the device. We could add a way to group dprints from a core so they are all printed at once on the host side.
Per Paul, could have something like this:
DRPINT_ALL << “this” << ” and ” << “this” << ENDL() << DPRINT_DONE();
Essentially this entails adding a separate function call for DPRINT_ALL and DPRINT_DONE, and support for holding partial results server-side.

naming could be better, maybe DPRINT_BEGIN and DPRINT_DONE

We can also investigate prepending "{device}:{core}:{risc}" to these print groups, so they can be read while interleaved in the log. Workaround for this for now is using TT_METAL_DPRINT_ONE_FILE_PER_RISC to separate things on a per-risc basis

This is creeping up in priority, assigned Samarth.  Instead of the proposal above, I think we just make it such that:

Host buffers data read from the device
Host flushes on "\n"
Host flushes at end of a dprint line, eg, "DPRINT << abc << xyz;" will print after xyz but will buffer if it just sees abc


Inline formsets missing

The documentation shows here how the user can use fields like ModelFormField to nest forms. Unfortunately, I can't find this feature in the current version. Was this feature removed for some reason, or moved so I can't find it or is the documentation wrong?

Inline form sets is one of the feature of the pro version http://viewflow.io/pro/


fix(cicd): fix timing

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Model.fit(..., **kwargs) unexpected behaviour

Hello,
I have a big dictionary with several parameters for my model implementation, including parameters for for the Model.fit() method but not only.
Since the Model.fit() signature has the **kwargs key, I would expect that passing a dict with more parameters than the ones request by Model.fit(), it should simply infer which parameters take.
Here a dummy example:
class  Model(Container):
   ...
   def fit(a, b, **kwargs)

my_parameters = {
   "a": 1,
   "b": 2,
   "c": 3
}

model = Model(...)
model.fit(**my_parameters)

This should simply works. Instead, at line 1619 of training.py, in the Model.fit() implementation there is
if kwargs:
raise TypeError('Unrecognized keyword arguments: ' + str(kwargs))

that throws the exception
TypeError('Unrecognized keyword arguments: 'c')
Commenting those two line, everything works perfectly.
The question is: is there any reason for that if clause? Why is it present and can it be removed?

This close is for other arguments listed in the documentation but not in the function signature. What would you like to put in this dictionary?

Hi @gabrieldemarmiesse,
Let's say that I have a class in which there are several methods, each one with its own parameters, including the fit method, other keras methods and more.
I would like to initialize the class with just one big dict containing all the parameters for all the methods, i.e. the learning rate, number of epochs etc, but also parameters used in some custom methods (size of the dataset, number of hidden nodes and so on).
In this way I can tune all in once, just modifying the dictionary.
Thanks to the python paradigm of the **kargs keyword, it would be nice if I can just pass the dict to every method without specifying the parameters one by one for each single method of the class, but letting the method decide which parameter it needs.
Since the fit method already has the magic keyword in the signature, I don't understand why there is this restriction.
It is only for brevity of the code, nothing more.

I see what you mean. Indeed, it would be helpful in your case. Keras is very careful about user inputs. Always checking that there is no unexpected behaviour (like checking you don't pass arguments that are going to be ignored). So your only option, sadly, is splitting the dictionary before putting it in the fit function.

Ok, thanks.


e2e: test: introduce workarounds

formalize workarounds we need to add to unblock CI.
We should strive to keep this list short, but a sad
reality is that we need workarounds from time to time.

/cc @Tal-or

counterproof this is still required: https://github.com/openshift-kni/numaresources-operator/pull/1098#issuecomment-2520551032

/hold
Got comments from other reviewers

I'll be honest, I think we're going too far with this one. There are too many questions here:

thing is: you are right, full stop, no "if" "but" or "however". I don't like this idea any more than you do (even though, I must say, the impl turned out quite nice!). But we're past time and we have urgent matters to cover. So this is a necessary evil.

 1. How we're going to decide when an external issue deserves a workaround? every time CI failed? which lanes?

Never. We are out of options at this particular point in time, and I wanted some structure to convey the key details. I maybe went overboard so I'm fine with narrowing down, even though that won't solve the fundamental issue that we should not have any code at all to workaround issues.

2. When issues like these reoccur (and they will)  are we going to spent hours and days understanding the issue and workaround it? why overriding the issue and testing locally is not enough?

The first part yes, unfortunately: we will need to painfully spend hours and days to be able to report the core issue to the relevant team (like we are doing here). Workarounding is a necessary evil. Testing locally is not enough: things degrade fast and hard without any form of automated CI, and our CI is already bare bones (serial suite can't run here :\ )

3. How do we know when issue get solved and we don't need the workaround anymore? what if the workaround will break?

We will need to keep going the right route and file issues to get the root cause addressed. In parallel we need to unblock ourselves as we are out of time. The workaround can (and will) very much break, and at that point we will be back at square one.

I can understand the rational here, but this is a rabbit hole of maintenance and extra work that IMVHO is too costly.

While I do agree, the problem is that just waiting (vs workarounding and waiting for the fix in parallel) is even costlier.

EDIT: I approved the changes because I understand we're on the edge here.

Yes, it's a necessary evil. I'm not happier than you are, likely less happy.

The implementation looks good and I understand the raised concerns, I am willing to maintain if needed
/lgtm
feel free to unhold as you see fit

turns out the actual culprit can be crun 1.18.z (vs previous 1.17) but the investigation is still ongoing and we don't have a repro (yet alone a fix) yet.
I'm taking the responsability to unhold, because we need to move forward with other issues and tasks

/unhold

https://issues.redhat.com/browse/OCPBUGS-45394


Pause timers when not using them

Probably a big battery drain thing.

We should probably install whatever observer AVPlayer wants us to. SFBAudioPlayer is trickier.


Setup dependabot for automating notifications on dependencies updates

Is your feature request related to a problem? Please describe.

Dependencies might be update very often, and keep them up to date is hard, a way to be notified mainly for security fixes will be very helpful.
Describe the solution you'd like

Setting up dependabot on this repo will ensure we're notified through pull requests (that we can decide do merge or close) every time a dependency releases a new version on npm.
Additional context

Article on how to set up dependabot:
https://github.com/marketplace/dependabot-preview

dependabot is setup and PRs are being automatically generated on this repo.


Update Finish to read all of the messages in the stream channel befor…

…e Finishing it.Make P4RuntimeSession thread-safe.

Closing / canceling this PR now. Will fix and rasie a new request


Added new ip address blocks

Hi,
We need new IP address blocks to address below PRs, Hence updated contributing.mb and check ip addresses with new ip address blocks.
We need below blocks to address pull req   https://github.com/openconfig/featureprofiles/pull/1756 .

<IP_ADDRESS>/15: data plane source network addresses used for scale testing. (500k ipv4 routes)
<IP_ADDRESS>/15: data plane source network addresses used for scale testing.
<IP_ADDRESS>/12: data plane source network addresses used for scale testing.

We need below blocks to address pull req https://github.com/openconfig/featureprofiles/pull/2217

<IP_ADDRESS>/24: data plane source network addresses used for traffic testing; split as needed.
<IP_ADDRESS>/24: data plane source network addresses used for traffic testing; split as needed.
<IP_ADDRESS>/22: data plane source network addresses used for traffic testing; split as needed.
<IP_ADDRESS>/32: data plane source network addresses used for traffic testing; split as needed.
<IP_ADDRESS>/24: data plane source network addresses used for traffic testing; split as needed.

Pull Request Functional Test Report for #2404 / 45bdce2f9b01e1e262af57312cd9fa0730b24cfe
No tests identified for validation.
Help


route parameter of authenticate can be null but is not marked as @Nullable

Here is a test proving that route can be null (I'm using 3.11.0):
import org.junit.Test;

import okhttp3.Authenticator;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
import okhttp3.Route;

public class AuthenticatorTest {
    @Test
    public void routeCanBeNull() throws Exception {
        Authenticator authenticator = new Authenticator() {
            @Override
            public Request authenticate(Route route, Response response) {
                if (route == null) {
                    throw new NullPointerException("route is null");
                }
                return null;
            }
        };

        OkHttpClient client = new OkHttpClient.Builder()
                .authenticator(authenticator)
                .build();

        Request request = new Request.Builder()
                .url("https://httpbin.org/status/401")
                .build();

        client.newCall(request).execute(); // route is not null
        client.newCall(request).execute(); // route is null
    }
}

I'm not sure if it is a correct behaviour. If it is actually correct I'll make a PR adding @Nullable to route.

Yep, please submit a PR.  I've also hit this using another auth library, in my case also because Interceptor.Chain.connection is null, so an interceptor calling a Authenticator will never have a route.

Related to https://github.com/square/okhttp/issues/3809

I think we could get a route if our internal APIs were a little better organized. The reason the HTTP bin one doesn’t have a route is because the response body is empty and we’ve gotten rid of things by the time we’re ready to authenticate.
My preference on this is to fix RetryAndFollowUpInterceptor, possibly with support from StreamAllocation, so that we have a route when we call into the Authenticator. That feels like a better fix than changing the type to be nullable.

It still makes it awkward if you want to reuse an Authenticator from an Interceptor for premptive auth.  Making route non @Nullable means it always need to be a network interceptor.  So I still think it's worth making route @Nullable

Good point!

It's less of a good point, because you can't use it prior to sending the first request, but you can use it when implementing a app level interceptor.  I hit that this week with a JIRA server returning a 400 when an anonymous query request fails, and I'd like to reuse the authenticator.

@yschimke  Is this still open? Can I work on this?

Sorry, the PR closed this out.  Let me look for good PR candidates.

@MONIKA-KUMAR-JETHANI Some good PR candidates if you are looking to contribute
https://github.com/square/okhttp/issues/4085
https://github.com/square/okhttp/issues/4049
https://github.com/square/okhttp/issues/3826
https://github.com/square/okhttp/issues/4250
https://github.com/square/okhttp/issues/4245
https://github.com/square/okhttp/issues/4145
https://github.com/square/okhttp/issues/4134

Is there already an estimate when this will be included in a new release?
We get this very reliable every second request 😉.

@hardysim in Kotlin you can just replace route Route with route: Route?.

@technoir42 hmm, it seems to actually not work 😞
My implementation of Authenticator now has set route: Route? but I still get the error.
override fun authenticate(route: Route?, response: Response): Request? { [...] }

I'm not sure why because even if the interface does not mark the parameter as nullable, my implementation does and therefor this error should not exist?!
Logcat continue to show the same error with my class at the top of the stack (which I just set to Route?).

java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.e.b.i.b, parameter route
at [my-class].authenticate(Unknown Source:2)

@hardysim you sure you've updated all Authenticator implementations?
Compare the decompiled bytecode with Route and Route?. In the latter case it should contain:
@Nullable
public Request authenticate(@Nullable Route route, @NotNull Response response) {
    Intrinsics.checkParameterIsNotNull(response, "response");

Yep, my fault. It's in a library my project uses and I messed up the release / import of the new version.
TL;DR:
it works by setting Route?


feat: Add prometheus endpoint

Issue #13 ,
Description of changes:
I’m currently missing a metrics endpoint in the pod-identity-agent, which is essential for creating alerts and dashboards. I was wondering if you would consider supporting a Prometheus endpoint for this purpose.
I started working on implementing in eks-pod-identity-code but I would like to ask you for your opinion, before I will start implementing more metrics and logic :)
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Thanks @pkruk for the contribution. The approach looks good and i can take a look once you have the changes ready.

thanks! I will then continue my work and let you know!

@pkruk thanks for the contribution

thank you :)!

Hi @kmala, @pkruk.
Taking into account that EKS Pod Identity Agent running as DaemonSet, wouldn't PodMonitor be better fit than ServiceMonitor?


macOS install instructions on foxy

After going through the tutorial on installing ros2 foxy for macOS, you then stumble upon an error in the tinyxml2 library due to incompatibility.
libc++abi: terminating with uncaught exception of type rclcpp::exceptions::RCLError: failed to initialize rcl init options: failed to load shared library '/Users/Karax/ros2_foxy/ros2-osx/lib/librmw_fastrtps_cpp.dylib' due to LoadLibrary error: dlopen(/Users/Karax/ros2_foxy/ros2-osx/lib/librmw_fastrtps_cpp.dylib, 0x0001): Library not loaded: /usr/local/opt/tinyxml2/lib/libtinyxml2.8.dylib   Referenced from: /Users/Karax/ros2_foxy/ros2-osx/lib/librmw_fastrtps_cpp.dylib   Reason: tried: '/Users/Karax/ros2_foxy/ros2-osx/opt/yaml_cpp_vendor/lib/libtinyxml2.8.dylib' (no such file), '/Users/Karax/ros2_foxy/ros2-osx/opt/rviz_ogre_vendor/lib/libtinyxml2.8.dylib' (no such file), '/Users/Karax/ros2_foxy/ros2-osx/lib/libtinyxml2.8.dylib' (no such file), '/usr/local/opt/tinyxml2/lib/libtinyxml2.8.dylib' (no such file), '/usr/local/lib/lib, at /Users/osrf/jenkins-agent/workspace/ci_packaging_osx/ws/src/ros2/rcl/rcl/src/rcl/init_options.c:61
This error can be avoided by installing version 2.8 instead of the latest version.
The problem has already been discussed and solved in this thread.

Given that this is for Foxy, which is EOL, I'm going to go ahead and close this one.  If you are still having issues on the latest version, please feel free to reopen.


Fix test fail when there is a service with 'Next' in the name.

Being explicit with which links we want to click on, because of some services having the word 'next' in their name (!)
https://trello.com/c/5t96gz0Z/400-functional-tests

I'm not convinced because I don't think even in this case the link says
exactly "Next" (it also includes the page number and count?) Happy to try
though and see how many existing tests break :) ..
On 10 Jul 2017 7:48 p.m., "Samuel Williams"<EMAIL_ADDRESS>wrote:

@samuelhwilliams requested changes on this pull request.
It looks like the click_link_or_button method may accept an exact: true
parameter that restricts it to matching the selector exactly. This would
probably be a better option to use, as I expect we always want to match the
text exactly. Would need to validate this assumption though... And check
that the exact parameter works as specified here: http://www.rubydoc.info/
github/jnicklas/capybara/#Exactness
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/alphagov/digitalmarketplace-functional-tests/pull/302#pullrequestreview-48995939,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AALpbLHSLLD5GuHeARdqaW8TbBt9UtnIks5sMnHhgaJpZM4OTHHM
.

Ah duh yeah. Ok. Don't know why you've used klass rather than - I assume - class - but if this works then looks good.


Don't rewrite keypair on open when aren't new

My first PR! Addresses #108.

huzzah!

Tweaks: standard doesn't like my human-readable formatting on the missing list.

Would be cool to add a test for that but I can do that for you :)

If the storage key isn't the same as the generated or constructor key, it looks like an error case. I'm not sure I understand the case where the constructor offers a secret key but a fresh public key is generated -- aren't keypairs codependent?

@noffle i meant the case where you are creating a fresh hypercore but providing both key+secretKey in the constructor. Then generated will be false but it needs to write them to storage still.

@noffle could be that your code already works for that. thats why we need a test for that case :)

here is an example of an existing storage test, https://github.com/mafintosh/hypercore/blob/master/test/basic.js#L70

I think I understand now. Thanks for explaining @mafintosh. :heart:

I think this fella is ready to :ship:!

\o/ 6.6.7


Not available

This cmdlet is not available in Exchange Online

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

ID: 5afe8f19-b64e-354f-b363-e040db2a1e8c
Version Independent ID: 0d5fde8a-2882-c935-1af4-e9c31c216fd4
Content: Get-GlobalAddressList (ExchangePowerShell)
Content Source: exchange/exchange-ps/exchange/Get-GlobalAddressList.md
Service: exchange-powershell
GitHub Login: @chrisda
Microsoft Alias: chrisda

@danmyhre, are you sure? It's available to me in my tenant. From the topic:

In Exchange Online, this cmdlet is available only in the Address Lists role, and by default, the role isn't assigned to any role groups. To use this cmdlet, you need to add the Address Lists role to a role group (for example, to the Organization Management role group).

Try running the following commands and see what you get:
$Perms = Get-ManagementRole -Cmdlet Get-GlobalAddressList
$Perms | foreach {Get-ManagementRoleAssignment -Role $_.Name -Delegating $false | Format-Table -Auto Role,RoleAssigneeType,RoleAssigneeName}

good call, sorry, the tenant I was connected to didn't have this modification yet. I should have verified that. Tested on a different one and it is there.  Thanks!


Embeds aren't displayed along tweets

Checklist

[X] I am able to reproduce the bug with the latest version.
[X] I made sure that there are no existing issues - open or closed - which I could contribute my information to.
[X] I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
[X] This issue contains only one bug, that only occurs in Squawker

Affected version
3.1.7
Steps to reproduce the bug

Go to any tweets with embed media.

Expected behavior
No response
Actual behavior
No response
Screenshots/Screen recordings
No response
Logs
No response
Affected Android/Custom ROM version
No response
Affected device model
No response
Additional information
No response

Please give a specific example.

Please give a specific example.

When a tweet has an embed, for example, a GIF, squacker omits it entirely.

Not for me, I see images and videos in tweets.
Again, you have to provide a specific example if you want me to fix the issue.

Not for me, I see images and videos in tweets.
Again, you have to provide a specific example to me. It will allow me to test your specific example and then be able to fix the issue.

Sure, but I wasn't talking about attachments like videos or images, sorry if that was difficult to understand, what I'm referring to is in the case of GIFS, neither the post nor the replies seem to be showing them.
Example: https://twitter.com/Supertoast824/status/1680641742259798016

This happened to me today:

Tweet link:
https://twitter.com/albus114/status/1684302221658161153


Allow to dismiss default error overlay

Feature request
Allow user to dismiss white error overlay or do not show it all and fallback to html from server.
Is your feature request related to a problem? Please describe.
This is how  https://nextjs.org looks on webos tv browser:

But before that I can see content from server for some time. video
Describe the solution you'd like

Do not show error overlay at all.
Add dismiss (ok) button to overlay

Additional context

browser - latest webos tv default browser.
simple nextjs app works

Moved here: https://github.com/zeit/next-site/issues/68
As it seems like an issue with the website.


How should class instances be handled

Sometimes class instances could be encountered. So how do they behave and what should we do with them?

I think this is an important enhancement

Here da is a DataArray
So i'd expect

da to link to https://docs.xarray.dev/en/latest/generated/xarray.DataArray.html
.resample to link to https://docs.xarray.dev/en/latest/generated/xarray.DataArray.resample.html, (similarly for .isel, .plot)
and the .mean to https://docs.xarray.dev/en/latest/generated/xarray.core.resample.DataArrayResample.mean.html


The length of audio

I read the source code, maybe the max length of input text is 256. But my length of input text is 90, the output audio is shorter than my input text, some last texts are cut out, why? Or any parameters should be set?

You mean a smart chunk algoroth could be implented to manage input text ?


Feature/parallel upload

Parallel set and get items from storage providers

since this branch is based on your compression branch, can you create a pull request to merge it into the compression branch instead of release/2.0? there's a ton of extra stuff in the diffs.


Get Last Pirep

Not sure if I am not calling it properly within profile/index.blade.php, but I am trying to display the pilots last pirep. I went ahead and tried to insert:
$user->last_priep
This does not seem to get any information. However my work around for this is:
                Latest Flight

                pireps->where('state','2')->first()->id}}
                ">

                  {{$user->pireps->where('state','2')->first()->airline->icao}}
                  {{$user->pireps->where('state','2')->first()->flight_number}}

That should work as the last pirep is grabbed based on the last_pirep_id column of the users table. Have you tried this?
Latest Flight

last_pirep->id }}
">

	{{ $user->last_pirep->airline->icao }}
	{{ $user->last_pirep->flight_number }}

If that doesn't work then potentially the pirep isn't being loaded automatically by Auth. So in the ProfileController you may have to lazy load it:
'user' => Auth::user()->load('last_pirep')

I would also change the href attribute to use route instead:
href="{{ route('frontend.pireps.show', [
                      $user->last_pirep->id]) }}"

@web541 Thanks for the input, I did try that piece of code and it was still empty. I will wait for @nabeelio to see if this is a bug.

$user->last_pirep should work, I just tested it in the unit tests with:
$pilot = User::find($user->id);
$last_pirep = $pilot->last_pirep;
$this->assertEquals($pilot->last_pirep_id, $last_pirep->id);

How are you using it? Just to get the ID or are the fields also empty? I don't think it does a load unless you try to access a property.
I'm not sure there's a way to eager-load with Auth::user(). Looking through the code, I've been doing (for example, DashboardController):
$last_pirep = $this->pirepRepo->find($user->last_pirep_id);

In the unit tests, I do:
$pilot = User::find($user->id);
$last_pirep = Pirep::where('id', $pilot->last_pirep_id)->first();

Which btw, the tests are a good spot to look for the different usages. However, what you're doing seems fine, since you're filtering by a state. I would just change this:
$user->pireps->where('state', PirepState::ACCEPTED)->first()->id;

I am using the {{$user->last_pirep}} in the profile blade. But it doesn't display any information. If I continue to display it the way I have it, I needed to check for an empty array. Final code I used:
                Latest Flight

                  @if ($user->pireps->isEmpty())
                  None
                  @else
                pireps->where('state','2')->first()->id}}">
                  {{$user->pireps->where('state', PirepState::ACCEPTED)->first()->airline->icao}}
                  {{$user->pireps->where('state','2')->first()->flight_number}}

                @endif

I would change that to be:
@php
$pirep = $user->pireps->where('state', PirepState::ACCEPTED)->first();
@endphp
{{ $pirep->id}}
{{ $pirep->airline_id }}

That way you're not doing multiple queries (I think the tag is @php, check the Laravel docs). How are you setting $user to the template?

Yeah @php is the blade tag. I think he's using the ProfileController for the $user.
As for eager loading Auth::user(), I think because it's already fetched you'd be better off lazy loading it but if you use the $with property on the User model I would think that it would eager load it (if Auth::user() has a User instance on it). But I see merit in keeping the User small too for when you don't need the last_pirep.

@web541 Is correct I am using the ProfileController and this also displays awards which is super helpful!
@nabeelio Great idea I didn't think to call it just once. I also got creative with display latest flights by using the following:
    @foreach ($user->pireps->whereIn('state',['1','2','6'])->take(10) as $pirep)

      id}}">{{$pirep->airline->icao}}{{$pirep->flight_number}}
      {{$pirep->dpt_airport_id}}
      {{$pirep->arr_airport_id}}
      {{$pirep->aircraft->name}}
      {{$pirep->flight_time}}
      {{ date('m/d/Y', strtotime($pirep->created_at)) }}
      {{ PirepState::label($pirep->state) }}

  @endforeach

@nickkecooper Cool, looks good. I'd just stick to using the constants from PirepState instead of individual numbers. I don't think they'd ever change, but it's much clearer when looking at it later what they might be. You can also use $user->pireps->with(['aircraft'])->whereIn(...) (I think that's the right syntax) so it will eager-load that relationship, instead of doing it at runtime. You'll end up doing only 10 queries, vs 10 initial and then another 10 (one for each in the loop).
There is awards display code... check the tests, I believe it's in there. Maybe in the profile too.
@web541 Using with() there is good idea b/c of the above query issue.  I got a bunch in the API but it makes a HUGE difference in load time (I think the user profile load went from 1s under 100ms)

@nabeelio Thanks for the tip! I did not know I could use the PirepState within a where statement!

Awesome!


Allow authentication with client credentials.

Auth with client credentials supported since https://github.com/cloudfoundry/cli/releases/tag/v6.35.0.

@jmcarp looks like a great improvement compared to using personal accounts with 2FA disabled. I wasn't able to find documentation on how to create such a user? Using the uuac client? Would be nice to have that info added somewhere (here or the cf-resource docs).

thanks!


Issue #131 Add KVM-based SOLVCON on Ubuntu

In issue #131 we want to port this proof of concept repository to enable a KVM-based SOLVCON environment on Ubuntu. This PR is the result of porting.
Usage and Test
Execute contrib/ubuntu-kvm.
There are many prerequisites. Please refer to this README to make sure that your system is ready to use this script.

Regarding copying the README, do you mean docstring or a part of SOLVCON README? I am ok to both of them.

You provide useful information in https://github.com/tai271828/ubuntu-setup-automation/blob/master/README.md, but I don't see it in you PR.  I wonder if it helps to copy the content to contrib/kvm/.  I don't think it matters whether the destination is docstring or a standalone file.

Migrated to Xenial by default. It is ready to review. Thanks.


feat(livekit): add sip invite message to sip participant attributes

 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.


Setting image directly does not update UIImageView.image after kf.setImage

I have a view controller with an image picker. I set the image view image first with kf and following selection of the image, I want to set it directly while waiting for the url to be returned from my user service.
ImageView.image set in viewWillAppear:
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)

        profileImageView.kf.setImage(with: user?.profileImageUrl, placeholder: #imageLiteral(resourceName: "ProfileImagePlaceholder"), options: nil, progressBlock: nil, completionHandler: nil)
    }

Setting image set directly with  profileImageView.image = pickedImage does not work:
    func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
        if let pickedImage = info[UIImagePickerControllerEditedImage] as? UIImage {
            profileImageView.contentMode = .scaleAspectFill
            profileImageView.image = pickedImage // *** Not working ***

            if let userId = UserDefaults.user?.id,
                let imageData = UIImageJPEGRepresentation(pickedImage, 1.0) {
                userService.setProfileImage(userId: userId, imageData: imageData, completion: { (error, url) in
                    guard url != nil else { return }
                    self.profileImageView.kf.setImage(with: url, placeholder: nil, options: [.keepCurrentImageWhileLoading], progressBlock: nil, completionHandler: nil)
                })
            }
        }

        dismiss(animated: true, completion: nil)
    }

po profileImageView.image! is equal to po pickedImage after profileImageView.image = pickedImage when stepping through but the UI is not updating.
For info, the ImageView is a custom class:
@IBDesignable class RoundImageView: UIImageView {

    @IBInspectable var cornerRadius: CGFloat = 0.0 {
        didSet{
            setNeedsLayout()
        }
    }

    @IBInspectable var borderWidth: CGFloat = 0.0 {
        didSet{
            setNeedsLayout()
        }
    }

    @IBInspectable var borderColor: UIColor = UIColor.clear {
        didSet{
            setNeedsLayout()
        }
    }

    override func layoutSubviews() {
        super.layoutSubviews()

        layer.cornerRadius = cornerRadius
        layer.borderWidth = borderWidth
        layer.borderColor = borderColor.cgColor
        layer.backgroundColor = UIColor.clear.cgColor
        clipsToBounds = true

        drawMask()
    }

    private func drawMask() {
        // Draw a mask on top of the border to avoid the thin black border line when the border is on top of a view with the same color as the border.
        let path = UIBezierPath(roundedRect: bounds.insetBy(dx: 0.5, dy: 0.5), cornerRadius: cornerRadius)
        let mask = CAShapeLayer()
        mask.path = path.cgPath
        layer.mask = mask
    }

}

Kingfisher should have nothing to do with the original image setting method in UIKit. It only adds an extension to set image from a URL. Maybe it worths to confirm that your image setting method is called in UI thread.

Doh! What a rookie error I can't believe I missed that! Thanks for the help.

Same problem, and the "imageView.image = pickedImage" runs in the UI thread.
If comment out the "profileImageView.kf.setImage" in viewWillAppear, the image changes as normal.
xcode 10 & swift 4.2


The reasons of high fbar values in Profiler

Hello, dear colleagues!
I have two kernels which implement the same algorithm, but the first kernel does its work in the LDS, and the second kernel distributes the data between the LDS and registers in half. The performance of the second kernel is ~2.5 times low as the first kernel. I've found that the fbar counter of the second kernel is more higher.
Please, if anybody knows, how can I understand the reasons for the higher value of fbar?
Thanks!

@vasslavich Sorry for the lack of response.  Do you still need assistance with this ticket? Thanks

@ppanchad-amd, hi! No, thank you, it has already dismissed.


pdclient: return leader from GetRegion api

Add leader peer as return value for GetRegion  and GetRegionByID

@coocood @bobotu  PTAL


Get-DBASqlBuildReference, added latest build infos

Just an update to include 2014SP2CU5 and 2014SP1CU12

Thank you both!


Typo fix

We are talking about const here, not var.
We've already spent much time talking about why var isn't a good idea

The use of var here is intentional.. let and var is shorter than const, and that is what this statement is saying.

The statement (as-is) is saying that many people prefer writing var because its shorter to write the const which was suggested by the previous paragraph.
Its pretty ambiguous sentence though, and could just be removed as it doesn't really add any value

I am fine removing the whole sentence.


Static binaries for the engine

I (@W95Psp) investiguated that:

the JS build is quite slow, e.g. on libcrux node overflows, bun doesn't help
I tried a few hours to compile the engine statically, with no success
we can try is build under alpine with docker, but this will not help for MacOS

Other solutions:

arx (with nix bundle)
docker
find wether there is a big bottleneck when extracted in JS
...

Here is a small report on trying to produce distributable binaries for the hax-engine.
OCaml static binaries
After reading https://ocamlpro.com/blog/2021_09_02_generating_static_and_portable_executables_with_ocaml/, I tried this approach but got some issues on linux.
Was not able to try anything on mac.
Js_of_ocaml
Ended up being either too slow or crashing because of stack overflow. There is no tail call optimization on node, I tried with bun wich has some, but got over performance issues.
I also had a issue about caml performances working on strings: parsing JSON was extremely slow, so I had to use JS's own JSON.parse and pipe that into the engine.
This solution works for running hax on small crates but performance is really really limiting.
nix bundle
The Nix build of the engine was shipping Rustc and was huge, https://github.com/hacspec/hax/pull/724 solves that.
With that PR, nix bundle --bundler github:ralismark/nix-appimage ".#hax-engine.bin" is building a small-ish portable AppImage linux binary. I think that's exactly what we need -- for linux!
Just ship dynamic binaries
On Mac, the only dynamic library we rely on is gmp, we can probably stop relying on zarith and thus get rid of that dependency.
Action items:

[ ] use nix bundle in the CI to release binaries
[ ] try to kill the dependency to gmp or copy the dylib over in case of MacOS

With #734 merged we should be good to go here?

Yes, indeed! We should make a release and finish the small bit that downloads the engine from GH!

Shall I just increment the version in Cargo.toml, push on crates.io, and push a git ref to the repo?

Yeah, just make it a pre.2.


Remove babel-polyfill

Remove deprecated babel-polyfill dependency from find a housing counselor and analytics-gtm apps. This allows us to remove two package.json files as there were no other dependencies.
Removals

Remove deprecated babel-polyfill dependency and package.json from find a housing counselor and analytics-gtm apps.

How to test this PR

I don't actually see how this package was used, but http://localhost:8000/find-a-housing-counselor/ should be unchanged.

This is broken on staging, where we're seeing a 500 on find-a-housing-counselor.
It looks like we still need the package.json to exist in order for the apps to be discovered and built.


github.com/ysde/grafana-backup-tool/pull/134

Hey I thought I'd PR against your branch in hopes that you can push this up so that it gets merged :smile:

rebased
updated changelog
switched to format() for string formatting as requested by ysde.

In case you're wondering I went ahead and merged your code in https://github.com/ysde/grafana-backup-tool/pull/141 :smiley:


webpack 2.3.2 and external AMD Modules

Bug report -  external AMD modules don't load webpack 2.3.2

Current behavior
I have an external amd module mylogger, I load into my pages using requirejs.
I've added externals to my webpack config:
    externals: {
        mylogger: true, // b is external (require("b"))
    },

when I try to use the module in my code:
Cannot find module "mylogger" at webpackMissingModule

the module is defined as this:
mylogger.js
define("mylogger", [], function () {  ...

it's included in my page via require js config
require.config({
    baseUrl: '/Applications/',
    paths: {
        'mylogger': 'mylogger'
    }
});

Other notes:
a test in the page confirms the module loads correctly:
require(["mylogger"], function (mylogger) { console.log('mylogger loaded'); });
prints 'mylogger loaded'

Expected behavior
The module loads correctly (e.g no errors) when called:
import mylogger= require("mylogger");   //typescript

which roughly translates to
var mylogger = _webpack_require("mylogger")

If this is a feature request, what is motivation or use case for changing the behavior?
I consider this a bug.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
I'm working with Windows 2012 r2, node 7.5, webpack 2.2

Did you set output.libraryTarget = "amd"?

Hi @sokra, I don't want my calling module to be amd.  I want to call an AMD (mylogger) but not make my code amd.  thanks

Could you create a test repo with a minimal test repro case?

@sokra  before I do that, I have more details:
It turns out that using externals: ["mylogger"] generates:
eval("module.exports = mylogger; });//# sourceMappingURL...");
after hacking the bundle and changing it to
eval("define(function (require, exports, module) { module.exports = istats1; });//# sourceMappingURL...");
it works!!   I tried the output.libraryTarget but this puts everything in the bundle within a define block which is not desirable.  It's needed only for specific external libraries.

@sokra  see attached sample with the detailed problem:
the page index.html tries to load the module both ways:

inside dist/bundle.js  created with webpack  this doesn't work!
outside via MyloggerTest.js      this works!

For simplicity Mylogger.log  just logs to the console any message.
webpackissue.zip
](url)

I see two ways here:

libraryTarget: "amd" this wrapps the whole bundle in a define block. This is needed because require.js need to delay module execution until mylogger is loaded. (remember loading the mylogger file is async)
use requirejs(["mylogger"], ...) to load the mylogger lib async via require.js.

There is no way to replace the ... in module.exports = ... with code which loads any module via require.js because require.js wants to load the module async and this code fragment is sync. The only option is to wrap it in a define block, so require.js is able to delay the execution until all dependencies are loaded.

@sokra  I'm trying to do number two in the attached sample but still doesn't work.
    require(["Mylogger"], function (logger: Mylogger) {
        console.log("inside");
        logger.log("hello");
    });

I get a:
 Uncaught (in promise) ReferenceError: Mylogger is not defined

require -> requirejs
require is handled by webpack, but it ignores requirejs.

@sokra  many thanks happy to close :)


Use of -static flags

Hi,
When troubleshooting compliation of vg, I got this comment from out HPC IT staff:

I'm a bit puzzled by the use of -static flags here. In particular, if
you use -static, there is imho no need for -static-libstdc++ and
-static-libgcc (this is done in alternative path of the if statement).
Those are only needed if you want to force those two libraries to be
linked statically, while all other libraries being linked preferably shared.

On our system, I had to run this to get vg to compile:
make STATICFLAGS="-static-libstdc++ -static-libgcc"

Otherwise I would get /usr/bin/ld: cannot find -lpthread

I believe I was unable to get full static compilation on my system without
them.
Probably make static should build a static binary and otherwise we go for a
dynamically linked one.
On Oct 27, 2015 1:39 PM, "Lex Nederbragt"<EMAIL_ADDRESS>wrote:

Hi,
When troubleshooting compliation of vg, I got this comment from out HPC IT
staff:
I'm a bit puzzled by the use of -static flags here. In particular, if
you use -static, there is imho no need for -static-libstdc++ and
-static-libgcc (this is done in alternative path of the if statement).
Those are only needed if you want to force those two libraries to be
linked statically, while all other libraries being linked preferably
shared.
On our system, I had to run this to get vg to compile:
make STATICFLAGS="-static-libstdc++ -static-libgcc"
Otherwise I would get /usr/bin/ld: cannot find -lpthread
—
Reply to this email directly or view it on GitHub
https://github.com/ekg/vg/issues/132.

You don't need to build it statically. That's just to make it a little easier to get started with.

@lexnederbragt Did you ever get this to build in a more normal way? Should we try and solve the mystery of the missing -lpthread?


@onready raise Error

The code is:
  @onready("..")
  parent: godot.Node;

and some errors were printed in console:
ERROR: object_method: Parameter "bind" is null.     At: modules/ECMAScript/quickjs/quickjs_binder.cpp:146
ERROR: object_method: Parameter "bind" is null.     At: modules/ECMAScript/quickjs/quickjs_binder.cpp:146
ERROR: object_method: Parameter "bind" is null.     At: modules/ECMAScript/quickjs/quickjs_binder.cpp:146

What's wrong?

I get the same error.
As a minimal example, replace paintings.jsx with compiled form of this file:
https://gist.github.com/averagehat/55a96c33149b4702dac17a2c9acd2161
this.get_node works but @onready doesn't.

I think only default class and classes with '@gdclass' decorator can using this kind of decorators

要怎么使用这个@onready呢？会爆bind错误。现在暂时如下使用。

  //   @onready("scoreLabel")
  scoreLabel: godot.Label;
  //   @onready("message")
  message: godot.Label;
  //   @onready("startButton")
  startButton: godot.Button;
  //   @onready("messageTimer")
  messageTimer: godot.Timer;

  _ready() {
    this.scoreLabel = this.$("scoreLabel") as godot.Label;
    this.message = this.$("message") as godot.Label;
    this.startButton = this.$("startButton") as godot.Button;
    this.messageTimer = this.$("messageTimer") as godot.Timer;
    this.showGameOver();
  }

按照Typescript官方文档的说法，propertyDecorator只接收两个参数，忽略了返回值，建议只用于观察属性
property-decorators

NOTE  A Property Descriptor is not provided as an argument to a property decorator due to how property decorators are initialized in TypeScript. This is because there is currently no mechanism to describe an instance property when defining members of a prototype, and no way to observe or modify the initializer for a property. The return value is ignored too. As such, a property decorator can only be used to observe that a property of a specific name has been declared for a class.

目前版本@onready的实现，返回一个descriptor，不是太符合文档中定义。
/**
 * Return the node with `path` if the `_onready` is called
 * @param path The path or the type to get the node
 */
export function onready<T extends godot.Node>(path: string | (new()=>godot.Node)) {
	return function (target: T, property: string, descriptor?: any) {
		const key = `$onready:${property}`;
		descriptor = descriptor || {};
		descriptor.set = function(v) { this[key] = v; };
		descriptor.get = function() {
			let v = this[key];
			if (!v) {
				v = (this as godot.Node).get_node(path as (new()=>godot.Node));
				this[key] = v;
			}
			return v;
		};
		return descriptor;
	}
}

一个workaround，使用Reflect.defineProperty在实例的prototype上设置getter，在运行时，this指向实例
/**
 *
 * Return the node with `path` if the `_onready` is called
 * @param path The path or the type to get the node
 */
export function onready<T extends godot.Node>(
	path: string | (new () => godot.Node)
) {
	return function (target: T, property: string) {
		const key = `$onready:${property}`
		Reflect.defineProperty(target, property, {
			set: function (v: unknown) {
				this[key] = v
			},
			get: function () {
				let v = this[key]
				if (!v) {
					v = (this as godot.Node).get_node(path as new () => godot.Node)
					this[key] = v
				}
				return v
			},
		})
	}
}

之后能够在代码中使用@onready，且没有bind错误

Hi! Any fix regarding this ? It works but still error messages

Are you missing @gdclass decorator on your class?

Tried it but still displays the error, but the error doesn't prevent things from working, so I guess I will just ignore it.


adblock function

Is that possible blocking the pictures from ads url?
I'm using ublock origin, but all the pictures from BWH can't be blocked.

I'm not sure how ublock works, but shouldn't it prevent ad-images to load?
I wouldn't want to implement ad-blocking in this extension.


chore: fix a few flaky CSOT tests

Description
What is changing?
I've noticed a number of flaky CSOT tests.  This PR attempts to fix the flakiness.
Is there new documentation needed for these changes?
What is the motivation for this change?

Release Highlight

Fill in title or leave empty for no highlight

Double check the following

[ ] Ran npm run check:lint script
[ ] Self-review completed using the steps outlined here
[ ] PR title follows the correct format: type(NODE-xxxx)[!]: description

Example: feat(NODE-1234)!: rewriting everything in coffeescript

[ ] Changes are covered by tests
[ ] New TODOs have a related JIRA ticket

                             Client Bulk Write
[2024/10/15 16:20:50.617]        CSOT enabled
[2024/10/15 16:20:50.617]          acknowledged writes
[2024/10/15 16:20:50.617]            when the timeout is reached while iterating the result cursor
[2024/10/15 16:20:50.617]              the bulk write operation times out:
[2024/10/15 16:20:50.617]      AssertionError: expected 1499 to be within 1500..2300

off by 1! should we expand the range?

evergreen retry

https://github.com/mongodb/node-mongodb-native/pull/4278#issuecomment-2417167872
That's not behavior I'd ever expect - the killCursors is so slow that it usually takes an extra 5-7 hundred ms.  I think we should leave this as-is, and if it continues to flake we should look into why it runs so much more quickly sometimes.  That might be a bug in our CSOT logic.


Query cloning

Since we are going to recommend creating plenty of queries and uses it locally, we need to provide some way to clone Query.
Proposed API
Let any Query has a method __.clone that will create a clone of the Query, but we won't allow using directly, because of AST-awared tools and problems with methods. We can add operator clone that will accept any Query and call its internal clone method.
API can changes 🤗

In my case, I need to create clones for mutation. And it seems like for mutation is it better to have behavior similar to attach from effector itself.
For example, I can have a single file that contains API for some entity i.e. someEntityQuery, updateEntityMutation.
But I want to call updateEntityMutation from different places. For example, I can have 2 different features, each can call updateEntityMutation. But I need some way to differentiate these calls:
// features.a.ts
sample({
  clock: updateClicked,
  target: updateEntityMutation.start,
})

sample({
  clock: updateEntityMutation.finished.failure.
  target: showError,
})

// features.b.ts
sample({
  clock: otherUpdateClicked,
  target: updateEntityMutation.start,
})

sample({
  clock: updateEntityMutation.finished.failure.
  target: showToast,
})

Without clone\attach, whenever I call mutation, both sample will trigger. But if there was an ability to attach a query I could do something like that:
const localEntityMutation = attach(updateEntityMutation);

sample({
  clock: updateClicked,
  target: localEntityMutation.start,
})

sample({
  clock: localEntityMutation.start.
  target: showError,
})

// features.b.ts
const localEntityMutation = attach(updateEntityMutation);
sample({
  clock: otherUpdateClicked,
  target: localEntityMutation.start,
})

sample({
  clock: localEntityMutation.finished.failure.
  target: showToast,
})

And if I use update operator I want that events from the original mutation will be called so my query will receive the update from mutation calls — this is the reason why I think that for mutations it is better to have attach instead of clone.


Route model binding

Hello,
Is route model binding supported? https://laravel.com/docs/5.4/routing#route-model-binding
It sort of work when using SportTranslation model as bind class. But, there is no way to query back to main Sport class without creating relation. Therefore I think this isn't the proper approach.
Is there a way to define getRouteKeyName method of Sport class, which would work? Or do I have to try with approach mentioned above / Explicit Binding?
namespace App;

use Dimsav\Translatable\Translatable;

class Sport extends UnguardedModel
{
    use Translatable;

    /**
     * @var array
     */
    public $translatedAttributes = ['name', 'slug'];

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function categories()
    {
        return $this->hasMany(Category::class);
    }
}

namespace App;

use Dimsav\Translatable\Translatable;

class Category extends UnguardedModel
{
    use Translatable;

    /**
     * @var array
     */
    public $translatedAttributes = ['name', 'slug'];

    /**
     * @return string
     */
    public function getRouteKeyName()
    {
        return 'slug';
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
     */
    public function sport()
    {
        return $this->belongsTo(Sport::class);
    }

    /**
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function tournaments()
    {
        return $this->hasMany(Tournament::class);
    }
}

// controller class
    public function tournaments(Category $category, Tournament $tournament)
    {
        dd($tournament);
    }

// route
Route::get('tournaments/{category?}_{tournament?}', 'TournamentsController@tournaments')->name('tournaments');

This approach results with:

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'slug' in 'where clause' (SQL: select * from categories where slug = italy limit 1)

I don't recommend to use translatable texts as url fragments. They are more than not unique. :/
But if you rly want to do it and know what it means: I don't know a direct way. This package is based on a trait and simple relation methods.
So yes, you have to add the relation and load it indirect. The only way I can imagin is to hook into the auto-find process (from route element to model). What you have to do, everywhere/time, you have to find the translation record and after this find the main record with the id from translation.

Thanks @Gummibeer, I've made my records unique so no worries :)
For anyone interested, my final solution is explicit binding:
class TranslatableServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        Route::bind('category', function ($value) {
            return Category::whereHas('translations', function ($query) use ($value) {
                $query->where('locale', App::getLocale())->where('slug', $value);
            })->first();
        });

        Route::bind('tournament', function ($value) {
            return Tournament::whereHas('translations', function ($query) use ($value) {
                $query->where('locale', App::getLocale())->where('slug', $value);
            })->first();
        });
    }
}

I have the same issue and I can see hee that @lchachurski has a  solution.
Please help where should I put that class TranslatableServiceProvider?

app\providers\TranslatableServiceProvider.php
https://laravel.com/docs/5.5/providers

Awesome! Thank you very much!

first() or firstOrFail() dont trigger the 404 error, what can I do?

This is unexpected in case of firstOrFail(). Do you type hint variables in action method like I did in the example? If nothing helps, as a last thing to do, which is generally ugly-ish solution, is to handle this in the controller and throw an error when binded value is not what you expect.

Forget it, it's my mistake, App:: getLocale () gave me back the default locale but not the current locale in the sesión.
Sorry


Update Gradle Wrapper to 6.6

Summary
Gradle Wrapper to 6.6
https://docs.gradle.org/6.6/release-notes.html
Changelog
[Android] [Changed] - Update Gradle Wrapper to 6.6
Test Plan
Build project
Closes #28914

CC @kgozali

we upgraded to 6.5 not too long ago, any specific benefit for this upgrade to 6.6?

@friederbluemle @dulmandakh, thoughts on my question?

we upgraded to 6.5 not too long ago, any specific benefit for this upgrade to 6.6?

@fkgozali - Thanks for the review/question.
There's no "specific benefit" for this update (i.e. it does not fix any major/blocking issue). However, the same question can be asked for the previous update to 6.5 (or other updates before that). I'm only following what seems to have been standard practice in this repo to always update Gradle Wrapper to the latest version.
Gradle 6.6 comes with some potential performance improvements (hard to measure those, and maybe negligible/non-existent in the React Native repo). Perhaps more importantly, Gradle 6.6 fixes a whitespace error in the gradlew script on line 133 that was introduced with Gradle 6.5 - Because this whitespace error is also present in the template/ folder, it would be carried over into every single new React Native app created with react-native init.
All that said, if it was me, we should simply keep the version of the Gradle Wrapper aligned with the version of the Android Gradle plugin (update less often), unless there are specific reasons for a newer, out-of-sync version. Thoughts?

Rebased onto latest master branch.

OK. The reason I asked is that, each upgrade is not as simple as just landing this PR.  I wasn't involved in the upgrades pre-6.5 so I wasn't sure what the thoughts back then was, but moving forward we do want to be intentional when upgrading the build system, not just because it's the latest and the greatest.
That said, we may just take in this 6.6 soon (maybe in a week or so). Though further upgrades should probably be discussed briefly in the future.

@fkgozali - Sounds good, and makes sense! Thanks for the additional explanation :+1:
Like I said, in the future we could also consider simply keeping the version of Gradle Wrapper aligned with the default version used by the Android Gradle plugin, unless there is a specific reason to upgrade.
Yes, this might involve a one-time downgrade of Gradle Wrapper, since it will probably be quite a while until AGP defaults to Gradle 6.6+. In order to avoid a major version downgrade, a good potential opportunity would be once we move from AGP 3 to AGP 4 (#29013), since AGP 4.0.1 uses Gradle Wrapper 6.1.1.

Hi @fkgozali - Quick question: I noticed the rewritten commit from this PR that ended up on the master branch (5bc67b658e581e0176deb7ed95b51a5c1cbe65c2) has the -bin variant of Gradle Wrapper. This PR has -all (like before, and also what's the default for Android Studio). Do you happen to know why?

Hi @fkgozali - Quick question: I noticed the rewritten commit from this PR that ended up on the master branch (5bc67b6) has the -bin variant of Gradle Wrapper. This PR has -all (like before, and also what's the default for Android Studio). Do you happen to know why?

I'm not too sure, I think I needed to run gradlew wrapper (to upgrade other scripts) and it might have produced the change. Regardless, it seems reasonable to use -bin (for less build-time download)? I noticed some gradlew used -all, some used -bin.

According to https://docs.gradle.org/current/userguide/gradle_wrapper.html:

The type of Gradle distribution. By default that’s the -bin distribution containing only the runtime but no sample code and documentation.

So it seems ok to rely on -bin?

Ooh, okay, so I guess you ran ./gradlew wrapper without the --distribution-type all flag. It also happened to me before, which is why I defined an alias in my shell to make this easier to update Gradle Wrapper across many repositories that involve Android.
-all is actually the default as generated by Android Studio, and it also provides additional sources helpful for debugging. It's also much more likely to already exist on a developer's machine (which has built other Android projects), avoiding additional downloads and saving disk space. Therefore, the -all variant is preferred.
I opened a PR here: #29793

I see, I'll merge that tomorrow/early next week
On Aug 27, 2020, at 5:04 PM, Frieder Bluemle<EMAIL_ADDRESS>wrote:

Ooh, okay, so I guess you ran ./gradlew wrapper without the --distribution-type all flag. It also happened to me before, which is why I defined an alias in my shell to make this easier to update Gradle Wrapper across many repositories that involve Android.
-all is actually the default as generated by Android Studio, and it also provides additional sources helpful for debugging. It's also much more likely to already exist on a developer's machine (which has built other Android projects), avoiding additional downloads and saving disk space. Therefore, the -all variant is preferred.
I opened a PR here: #29793https://github.com/facebook/react-native/pull/29793
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/facebook/react-native/pull/29613#issuecomment-682251062, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAILROTLKVFIEYQ3CGYSZLDSC3YBTANCNFSM4P2VKDKA.

Sounds good, thanks for the fast replies @fkgozali :+1:

When my clone of react-native includes this PR, I have a persistent line ending issue with one of the gradlew.bat files, it's resistant to all my attempts to fix so far, on ubuntu 20

Hi @mikehardy - Yeah, unfortunately that is a problem for me as well (I'm surprised not more people have pointed this out)..
I've already opened a PR with a brief description more than a week ago: #29792
Hopefully it can get merged soon.