Change proxy system to use extension traits instead

How it was
Previously each resource type had its own corresponding proxy class (e.g. src/Proxy/Entry.php). The proxy was used through the client by calling things like
$entry = $client->entry->get($entryId);

These proxies all inherited from a base one which handled things like allowing a resource to be created/deleted/published/archived (plus some extra custom stuff, like processing an asset, or revoking a PAT.
The Problem
The problem with this approach was that the relation between a proxy and a space ID was confusing. For instance, the previous snippet actually makes the assumption that you have set a default space ID in the client, which will be then injected in the proxy. I considered this an acceptable trade-off at the time, but now with environments there would be a lot more implicit stuff happening, and it would be practically impossible to determine whether a resource belongs to a space, an environment, or nothing at all. Last but not least, I've come to realize that the whole syntax felt weird and not very PHP-like, in my opinion.
The changes
The first thing I did was to move all endpoint configuration to src/ApiConfiguration.php. This class provides a method that, given a class name or object, will return the configuration values (API URI, parameter placeholder, ID parameter if present, and possible a custom host, for upload.contentful.com). This method also checks parent classes of a given one, because the SDK support extending the predefines classes. In order to support this mechanism, I've added some methods to the interface implemented by the resource classes, and in turn the concrete method implementations to the actual resources.
Then I decided on an API for the SDK. I wanted the client to have getSomething methods, but I really didn't want to clutter that class with all those methods. Enter traits.
In PHP, traits are basically a runtime copy/paste, which means that everything defined in a trait will be considered as actual code in the class that uses them. In the src/ClientExtension directory I've implemented all necessary traits, so for instance src/ClientExtension/Space/AssetExtension.php will have the getAsset(string $spaceId, string $assetId)/getAssets(string $spaceId, Query $query = null) methods. They are structured in a nested was, so one resource with nested one will be in charge of requiring those (like space with assets and entries etc, or a content type with content type snapshots and editor interfaces).
With this problem solved, I've added methods to resource classes that allow them to access child resources, so a objects of class Contentful\Management\Resource\Space will have getAsset($assetId), getAssets(Query $query = null) and so on. Unfortunately, I couldn't simply include the aforementioned traits, because some parameters would not be necessary:
// Including the client extensions
$asset = $space->getAsset($spaceId, $assetId);

// What would be the desirable API
$asset = $space->getAsset($assetId);

Unfortunately there was no way around duplicating some code, but I made the same decision of splitting this functionality into separate traits (in src/Proxy/Extension) because in my opinion providing access to linked resources should not be something the resource class concerns about.
Finally, I faced a usability problem: I could have a reliable way of using a reference to a space without performing extra queries:
$asset = $client->getSpace($spaceId)->getAsset($assetId);

By calling $client->getSpace(), and API call will be made, but that's almost never the wanted behavior. As a workaround for this, I introduced src/Proxy/SpaceProxy.php (with a mechanism that will be the template for EnvironmentProxy.php too), which holds simply a reference to the space ID. It includes the trait that is include by the space resource (yay, less code duplication), except for some deeply nested resources (something which will be addressed this at a later stage) which need to be duplicated.
Another change I made was to transform some interfaces in src/Resource/Behavior into traits as well, because they can easily implement features "standalone", whereas previously they were relying on proxies for providing the required methods. The only one who remained an interface is Creatable, but that's because a resource has no knowledge of the Client until it is persisted in the API, which happens through the Client::create() method (or the SpaceProxy::create() convenience method).
One final change I had to make was in the code generation classes, mainly because the way of resolving links is now a bit different.
The SDK is still in beta so technically the API is not stable yet, but after this is merged I'll add some text to the changelog.

I know about the changelog (I actually mentioned that somewhere in the PR description), I will use the format I'm using on the CDA SDK ☺ it's not included here because I thought I'd have to write it anyway when adding environments, so it didn't make much sense to do that twice 😁


ubiquity-api-polkadot-integration grant app submission

Grant Application Checklist

[x] The application-template.md has been copied, renamed ( "project_name.md") and updated.
[x] A BTC address for the payment of the milestones is provided inside the application.
[x] The software of the project will be released under the Apache license version 2.0 as specified in the terms and conditions.
[x] The total funding amount of the project is below CHF 30k at the time of submission.

 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.

Closing due to inactivity. Feel free to re-open the application with a more complete proposal.

Closing due to inactivity. Feel free to re-open the application with a more complete proposal.


Invalid email can be made primary and also logged in with.

From account section:
If any user adds an email address to his account, he can't make it primary unless he verifies it. Hence, he can't login with the email address.
But from profile section:
Any user can add any email address and he doesn't need to verify it. Also it automatically becomes primary email and he can login using that email address.

Change email address on profile section needs to be verified according configuration when register required email verify.

I think this has been resolved.


Version of OvS to install to get P4-OvS

Salam
Please I want to know the version of open vswitch to install to get P4-OvS. As mentioned in your project, you install the version v0.2.0 or v0.4.0 and now OvS is available with v2.7.0.
Many thanks for your response.

v0.2.0 or v0.4.0 is the version of P4-OVS (this project). Do not confuse with the version of OVS. This project is based on OVS v2.13.


Weird CasperJS error

i am havnig lots of trouble debugging casper errors.  The URL loads fine in browser, the browser auth works fine, but i keep getting an error, ONLY from CasperJS (not browser)... i don't know why it says it is "downloading"... also it says, "Successfully injected Casper client-side utilities", so you'd think the page would have processed/loaded, but no....
any ideas??

[debug] [phantom] Navigation requested: url=HTTPS://THE_URL.COM, type=LinkClicked, willNavigate=true, isMainFrame=true
[info] [phantom] Step anonymous 10/11: done in 9199ms.
Unable to load resource (#67URL:HTTPS://THE_URL.COM)
Error code: 299. Description: Error downloading HTTPS://THE_URL.COM - server replied: Internal Server Error
[debug] [phantom] url changed to "HTTPS://THE_URL.COM"
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step anonymous 11/11 HTTPS://THE_URL.COM (HTTP 500)

ErrorThe function requested is not supported

how are you running the script, you could try running with --ssl-protocol switch like:
$ casperjs --ssl-protocol=any yourscript.js

As part of a cleanup effort:
Looks to be a stale help request. Assuming you've moved on to better and cooler things. Please feel free to re-open if this is still an active issue for you and we'll try our best to help out.


Report output directory

I am trying show the output source files with coverage in same folder as karma-coverage folder. But I don't see an option to define the destination folder for output. Need suggestion on this. Iam doing this.
coverageReporter: {
       reporters: [
       {
      type: 'json',
      subdir: '.',
      file: 'coverage-final.json'
    },
    { type : 'html' },
    { type : 'text' }
  ],
  dir : 'coverage',
  includeAllSources: true,
  check: {
    global: {
      statements: 50,
      branches: 50,
      functions: 50,
      lines: 50
    },
    each: {
      statements: 50,
      branches: 50,
      functions: 50,
      lines: 50
    }
  }
},
remapIstanbulReporter: {
  src: 'coverage/coverage-final.json',
  reports: {
    html: 'coverage'
  },
  dest : '/coverage-source',
  timeoutNotCreated: 1000,
  timeoutNoMoreFiles: 1000
}

I think this should now be fixed in 0.2.x, the entire coverageReporter block can now be removed and the remapped coverage output directory can be configured like so:
remapIstanbulReporter: {
      reports: {
        html: 'path/to/coverage'
      }
},


Release Parquet Java 1.10

Please link needed issues as blockers.
Reporter: Ryan Blue / @rdblue
Assignee: Ryan Blue / @rdblue
Related issues:

Occasional endless loop in unit test (is blocked by)
Ignore float/double statistics in case of NaN (is blocked by)
Add a size limit for heap allocations when reading (is blocked by)
Add accessor for footer after a file is closed (is blocked by)
Update Javadoc for Java 1.8 (is blocked by)

Note: This issue was originally created as PARQUET-1189. Please see the migration documentation for further details.

Ryan Blue / @rdblue:
We don't typically publish snapshots, but it isn't difficult to build Parquet if you want to test out master. I recommend looking at the .travis.yml file to see how we build on Travis CI. That should get you started.

Nils-Helge Garli:
Are there any maven snapshots available somewhere while waiting for this to be released?


Compartment strength between A and B compartments

Hello! Thank you for your tool. I have a single question: when I'm running quant_strength_trans.py script I get a tsv file with strength of compartments A and B separately. I wonder whether it's possible to calculate compartment strength between A and B compartments?
Thanks in advance!

Hi @katikoshak,
The way compartment strength is defined in both our tool and two papers that introduced this metric originally (https://doi.org/10.1016/j.cell.2017.05.004 and https://doi.org/10.1038/nature24281) is dividing the average interactions in your compartment of interest over the interactions between compartments. So, interactions between A and B are used to define the strength of compartments A and B in denominator. Therefore, it would not be possible to define compartment strength between A and B compartments the same way.
What you can do is take the average of AB interactions as the proxy for their strength.
Best,
Mikhail

Thanks a lot for the explanation!


Transition animation in fragment

I want to have an activity. the activity has 3 tabs. each tab contain a fragment. the fragment contains list. when i click on a list item it will start an activity. how do i animate this and how to do the reverse animation. please do suggest. i dont find examples of transition animation for fragments.

I noticed that there is a similar problem at https://github.com/material-components/material-components-android. Perhaps we can refer to https://github.com/material-components/material-components-android/issues/1161 to find more context about your question. For example, in that issue someone commented with the instance https://github.com/luanmm/MaterialTransitionExample.


Dev-003 Implement alerts on error

Error message needs to be launched when something goes wrong. There isn't much control on the type of messages so we'll use what we have.

Implemented error messages to be added into the DOM


Add positions to events (issue #37)

This is a draft PR to improve the diagnostics message as indicated in  issue 37.
I've managed to add the position of the return to the ReturnedTypeDoesNotMatch error.
If the solution is acceptable, I can do the same for the other variants.

Hey, was away, so checking back in now.
This looks great!

Would be great to add positions to the rest of the Event variants. Unlike the return, they don't have any use in diagnostics/errors right now but will come in very useful in the future.
BTW if the conditional event variant is difficult then you can skip it.

Sure thing. I’ll have a look at the other Event variants as well and see what I can do.
29 Oct 2023 at 17:27 by @.***:

Hey, was away, so checking back in now.
This looks great!
https://user-images.githubusercontent.com/26967284/278861876-ad49cc8a-ae73-4788-b2e3-589b64fcc30b.png
Would be great to add positions to the rest of the > Event>  variants. Unlike the return, they don't have any use in diagnostics/errors right now but will come in very useful in the future.
BTW if the conditional event variant is difficult then you can skip it.
—
Reply to this email directly, > view it on GitHub https://github.com/kaleidawave/ezno/pull/69#issuecomment-1784045829> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZOS3QPJIU7ZPAJ6JBAU6DYBYHPPAVCNFSM6AAAAAA6J7KLRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBUGA2DKOBSHE> .
You are receiving this because you authored the thread.> Message ID: > <kaleidawave/ezno/pull/69/c1784045829> @> github> .> com>

Awesome, lmk the time frame you are thinking of. Also #71 changed a lot of files, so remember to update/fast-forward the branch before any changes

Thanks for the heads up on the change.
At the moment, no concrete time frame I'm afraid.

I'm working on the ReadsReference variant right now and the synthesise_class_fields uses it.
https://github.com/kaleidawave/ezno/blob/511e5e2288e13ad251a70c5989de5e422327756e/checker/src/synthesis/expressions.rs#L857-L861
Should the event store the positions of all the fields?

Ah interesting. Classes aren't fully implemented at the moment, I got 70% through then got stuck so there might be some unused non fully finished functions around. I would put a todo!("get event position") where the position is needed and I can figure out that part when I finish and fix classes.

Oh, got it. I’ll put a todo there then and move on to the next variant.
2 Nov 2023 at 18:07 by @.***:

Ah interesting. Classes aren't fully implemented at the moment, I got 70% through then got stuck so there might be some unused non fully finished functions around. I would put a > todo!("get event position")>  where the position is needed and I can figure out that part when I finish and fix classes.
—
Reply to this email directly, > view it on GitHub https://github.com/kaleidawave/ezno/pull/69#issuecomment-1790428147> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZOS3XUGSIPXZFR7YDVX4TYCNWEXAVCNFSM6AAAAAA6J7KLRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJQGQZDQMJUG4> .
You are receiving this because you authored the thread.> Message ID: > <kaleidawave/ezno/pull/69/c1790428147> @> github> .> com>

Looking great so far. So just Event::Setter left? Left a few minor suggestions around the diagnostic messaging. I have some good ideas for how to use these new getter and setter positions 👀 .

I believe Setter, CallsType, Throw, Conditionally, and CreateObject are left.
Thanks for the suggestions! I'll look into those first before implementing the position for Setter.

ignore the test issue, that is something I broke
Replying to setter position:

For now, because of the existence of some properties with non-obvious (or perhaps absent) positions,
the position in Event::Setter will be optional i.e. Option<SpanWithSource>

Yes that's perfect. The register_property function is a bit WIP and has some problems with it. If it is possible put a comment next to any Nones passed as positions to the setter and I will have a think if positions are even needed in that case.

Noted. I’ll have a look at what I can find and put a comment where there’s a None. I did put comments before some of the Nones, I think, but definitely not all of them.
8 Nov 2023 at 18:33 by @.***:

ignore the test issue, that is something I broke
Replying to setter position:

For now, because of the existence of some properties with non-obvious (or perhaps absent) positions,
the position in Event::Setter will be optional i.e. >> Option

Yes that's perfect. The > register_property>  function is a bit WIP and has some problems with it. If it is possible put a comment next to any > None> s passed as positions to the setter and I will have a think if positions are even needed in that case.
—
Reply to this email directly, > view it on GitHub https://github.com/kaleidawave/ezno/pull/69#issuecomment-1801579512> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZOS3QI4D7OSGHA5RGYCSDYDNNYHAVCNFSM6AAAAAA6J7KLRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGU3TSNJRGI> .
You are receiving this because you authored the thread.> Message ID: > <kaleidawave/ezno/pull/69/c1801579512> @> github> .> com>

I believe all event variants have positions now. Unfortunately, wiring up the positions for Setter, Conditionally, and CreateObject are difficult for me to implement so at the moment, most of them only have None.

Awesome just adjusted to use the new return diagnostics message in the tests https://github.com/kaleidawave/ezno/pull/69/commits/071ce967db0eec0b5183db8c1a705df2b8f4501f
Apart from that all the other tests pass, so you haven't broken anything!!! and have just merged!
Thanks for the informative comments and commit messages. They will be useful for using the new positions on events.

Awesome. You are also the first to PR to the type checker part of Ezno! If you have any feedback on what is messy, difficult or could be made clearer that would be really helpful for me to help future contributors!
Also might post this change on Twitter, let me know if/how you want a shout out :)

I have no particular feedback in mind, unfortunately. Though maybe, I’m not sure if it’s just me being new, but sometimes I was unclear whether certain part of the code is (relatively) complete or a work in progress. There are todo!() and TODO comment to indicate the WIP-ness, but I was oblivious to those so I chalked it up solely to my incompetence when I can’t make things work when in reality, it’s a mix of lack of skill and working on incomplete code.
13 Nov 2023 at 17:42 by @.***:

Awesome. You are also the first to PR to the type checker part of Ezno! If you have any feedback on what is messy, difficult or could be made clearer that would be really helpful for me to help future contributors!
Also might post this change on Twitter, let me know if/how you want a shout out :)
—
Reply to this email directly, > view it on GitHub https://github.com/kaleidawave/ezno/pull/69#issuecomment-1807791572> , or > unsubscribe https://github.com/notifications/unsubscribe-auth/A2ZOS3V3GAFC4KF4F5WHXE3YEHTRDAVCNFSM6AAAAAA6J7KLRGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBXG44TCNJXGI> .
You are receiving this because you authored the thread.> Message ID: > <kaleidawave/ezno/pull/69/c1807791572> @> github> .> com>


Changing BubbleSort Algorithm from only int to Generic.

🐛 Bug Report
The current BubbleSort(InsertionSort) sort array of only Integer type.
Have you spent some time to check if this issue has been raised before?
Not Required
To Reproduce
Not Required
Expected behavior
The algorithm should be generic.
(Write what you thought would happen.)
Actual Behavior
Should be able to sort other data types also.
(Write what happened. Add screenshots, if applicable.)
Your Environment

(Write Environment, Operating system and version etc.)

I would like to take this issue.

@AkMo3 Yes you can go ahead with this!


Why are files executable

Almost all files seem to be executable, seems like a mistake

Hi, this is surely some kind of mistake, just not sure how did it happen... If we wanna fix it, it's gonna be a massive changeset in the Git...

I'm gonna do some pretty invasive changes to the generated code soon, adding the X-Pack APIs, so I'm gonna keep this in mind, and correct the file permission bits as part of that change.


[Error]: temporary error. Code: 159 multiple times

Since yesterday I'm getting this error thousand of times.
It just happen sometimes, but when it appears, is for a while.
I don't know what I should do with this, I'm not overpassing the petitions per second, and I am paying 150 req/second. I have read that error means Parse decides to don't accept that request, but since the service it's not free I don't think that is the case...
It's anything happening in the parse server side?
Regards.

For issues with the parse.com service, please use parse.com/help.


Enhancement: Add Norwegian Nynorsk translation

The following can be put in i18n/nn.toml to add translation to Nynorsk:
[latestPost]
other = "Nye innlegg"
[latestWork]
other = "Nye verk"
[license]
other = "Vilkår"
[toUp]
other = "Til toppen"
[workHomepage]
other = "Heim"
[usedTheme]
other = "Bunad:"
[seeAlso]
other = "Sjå òg"

Make PR please


Reach 100% code coverage \o/

Not many tests are missing to reach 100% code coverage.
https://codecov.io/gh/RasCarlito/axios-cache-adapter/tree/master/src

Fixed in #29


feat[POC]: incremental cooperative rebalance protocol

Incremental Cooperative Protocol POC Proposal
I'm excited to present this Proof of Concept (POC) version that supports the incremental cooperative protocol as outlined in KIP-429. The proposed feature addresses a long-standing community demand (#1858). I've conducted several manual tests, and the results have been promising. (Can run examples for a try)
Motivation and Changes
The existing design in Sarama tightly couples with the EAGER protocol, particularly evident in ConsumerGroupSession. In order to accommodate the new COOPERATIVE rebalance protocol, I've introduced the ConsumerGroupHandlerV2 interface and a new method called ConsumeV2.
Seeking Community Guidance
I'm eager to align this work with the community's future direction. Two possible paths are under consideration:

Major Version Update Plan: If Sarama intends to increment the major version while introducing support for the COOPERATIVE rebalance protocol, it would allow us to streamline our implementation. We could eliminate ConsumerGroupSession-related coded from versions v2.x.x, focusing solely on the new approach.

Maintaining Compatibility: Alternatively, if a major version update isn't planned, I'll take steps to enhance future maintainability. This involves refactoring common logic within the Consume and ConsumerV2 methods, paving the way for smoother maintenance.

Upcoming Work
In the pipeline, I plan to incorporate the following enhancements:

Integration of metrics for the new protocol.
Implementation of unit tests, functional tests, and benchmark tests to ensure reliability.
Validation of Pause and Resume functionality within the new protocol.
[DONE] Verification for customized cooperative balance strategy implementation.

I'm looking forward to the community's insights and feedback as we work towards a more efficient and feature-rich Sarama.

@napallday - I'm exited to see that cooperative re-balancing is making its way into Sarama. I think there's a few places where we could use it. I've had a quick play with the consumergroup_cooperative example and here's what I found:

Multiple co-operative Sarama consumers in the same group work as expected. I tried starting / stopping individual consumers and each time other consumers in the group were revoked/assigned partitions appropriately without a complete re-assignment of all of the topic's partitions. Sometimes Setup(...) is invoked with an empty map of newly assigned partitions, I think corresponding to re-balances where the consumer's set of partitions is unchanged. This appears to be consistent with how the Java client behaves, so I'm not suggesting changing this behavior.
Upgrading Sarama consumers from sticky -> co-operative sticky via rolling restarts worked as expected. E.g. all consumers started out "sticky", then were upgraded to "sticky, sticky-cooperative" , then finally upgraded to "sticky-cooperative" only.
Co-existence with a Java partition.assignment.strategy=org.apache.kafka.clients.consumer.CooperativeStickyAssignor consumer in the same group has mixed results. If a Java consumer was leading the group and then a Sarama consumer joins - this works as expected. If a Sarama consumer was leading the group and a Java consumer joins then the Sarama leader panics: 2023/08/21 20:49:59 Error from consumer: kafka: insufficient data to decode packet, more bytes expected
panic: Error from consumer: kafka: insufficient data to decode packet, more bytes expected

 goroutine 11 [running]:
 log.Panicf({0x100e23868?, 0x100f5b3d8?}, {0x140000affa0?, 0x14000198af0?, 0x1?})
     /usr/local/go/src/log/log.go:395 +0x68
main.main.func1()
    /tmp/sarama/examples/consumergroup_cooperative/main.go:119 +0x114
created by main.main
    /tmp/sarama/examples/consumergroup_cooperative/main.go:110 +0x440

I can grab more debug, if it would be helpful. (This was using Kafka 3.3.1, a Kafka 3.1.2 client, and the consumergroups_cooperative example).

Regarding your Seeking Community Guidance question. IMO it would be great to add cooperative re-balancing support as soon as practical - without necessarily waiting for Sarama v2. For example, Sarama v1 could be extended with  the ConsumerV2 method, which would then be re-factored into a more elegant single consumer approach in Sarama v2.

That seemed to work well for me. I ran sarama, rdkafka and (Java) kafka-console-consumer in the same cooperative balance group and ran some chaos testing restarting each of them randomly and each member was able to join/rejoin/lead without causing issues for the others
In the middle of lots of runs I did trigger one protocol decode failure in deserializeTopicPartitionAssignment where it seemed like UserData for one member was 4 bytes (0xff,0xff,0xff,0xff) but it's not clear what caused that. We may just wish to guard the deserializeTopicPartitionAssignment call by ignoring "InsufficientData" err and continuing in the loop

Big thanks to @prestona and @dnwe for the thorough testing and fix! 😄

In the middle of lots of runs I did trigger one protocol decode failure in deserializeTopicPartitionAssignment where it seemed like UserData for one member was 4 bytes (0xff,0xff,0xff,0xff) but it's not clear what caused that. We may just wish to guard the deserializeTopicPartitionAssignment call by ignoring "InsufficientData" err and continuing in the loop

@dnwe Regarding this issue, could you help provide information about the combination of Kafka clients used during testing? I personally conducted tests using Sarama, without direct interaction with rdkafka or Java clients. So far, I have not come across this particular issue.

@napallday no worries, so I set KAFKA_VERSION=3.3.2 and started up docker-compose as used in the FV with the toxiproxy routes configured and created a six partition topic called cooperative-topic. I setup a sarama producer to continuously write some records to the topic.
Then in three different terminals I ran:
# sarama
./consumergroup_cooperative -version 3.3.2 -brokers <IP_ADDRESS>:29091 -group sarama-coop -topics cooperative-topic

# librdkafka
./kcat -b <IP_ADDRESS>:29091 -G sarama-coop -X partition.assignment.strategy=cooperative-sticky cooperative-topic

# java
./kafka-console-consumer.sh --bootstrap-server <IP_ADDRESS>:29091 --topic cooperative-topic --group sarama-coop --consumer-property partition.assignment.strategy=org.apache.kafka.clients.consumer.CooperativeStickyAssignor

And stopped and started each of them at various points so they all had a turn leading and joining the group

The panic will be reproduced following these steps:
Step 1. Run the Sarama consumer (Leader).
Step 2. Run the Java consumer.
This is due to the following improvements of cooperative-sticky strategy implementations within Java. Specifically, the first 4 bytes represent the generationID (where 4 bytes of 0xff actually translate to -1). This can be observed in the code changes here.
I will address this issue at a later time.

Hi @prestona @dnwe,
FYI, I've submitted a commit to fix the issue mentioned above. 🛠
After extensive testing with different Kafka clients, including librdkafka (v3.3.2), java client (v3.5.0 & v3.3.2), and sarama (v3.3.2), I believe the panic issues have been successfully resolved.
However, during testing with java client (v2.8.1), I observed an occurrence of java.lang.IllegalStateException in this client when the cooperative assignment was being validated by it. It's worth noting that this behavior appears to be specific to the older versions of the Java client. Since this java client is the leader who did the assignments, I believe that the underlying cause might be rooted in these outdated Java client versions rather than sarama.

Interesting. It took me a few attempts, but yes I also managed to trigger that IllegalStateException with a Java 2.8.1 consumer:
[2023-08-23 21:03:16,189] ERROR Error processing message, terminating consumer process:  (kafka.tools.ConsoleConsumer$)
java.lang.IllegalStateException: Assignor supporting the COOPERATIVE protocol violates its requirements
        at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.validateCooperativeAssignment(ConsumerCoordinator.java:668)
        at org.apache.kafka.clients.consumer.internals.ConsumerCoordinator.performAssignment(ConsumerCoordinator.java:592)
        at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.onJoinLeader(AbstractCoordinator.java:693)
        at org.apache.kafka.clients.consumer.internals.AbstractCoordinator.access$1000(AbstractCoordinator.java:111)
        at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$JoinGroupResponseHandler.handle(AbstractCoordinator.java:599)
        at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$JoinGroupResponseHandler.handle(AbstractCoordinator.java:562)
        at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:1182)
        at org.apache.kafka.clients.consumer.internals.AbstractCoordinator$CoordinatorResponseHandler.onSuccess(AbstractCoordinator.java:1157)
        at org.apache.kafka.clients.consumer.internals.RequestFuture$1.onSuccess(RequestFuture.java:206)
        at org.apache.kafka.clients.consumer.internals.RequestFuture.fireSuccess(RequestFuture.java:169)
        at org.apache.kafka.clients.consumer.internals.RequestFuture.complete(RequestFuture.java:129)
        at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient$RequestFutureCompletionHandler.fireCompletion(ConsumerNetworkClient.java:602)
        at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.firePendingCompletedRequests(ConsumerNetworkClient.java:412)
        at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:297)
        at org.apache.kafka.clients.consumer.internals.ConsumerNetworkClient.poll(ConsumerNetworkClient.java:236)
        at org.apache.kafka.clients.consumer.KafkaConsumer.pollForFetches(KafkaConsumer.java:1296)
        at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1237)
        at org.apache.kafka.clients.consumer.KafkaConsumer.poll(KafkaConsumer.java:1210)
        at kafka.tools.ConsoleConsumer$ConsumerWrapper.receive(ConsoleConsumer.scala:443)
        at kafka.tools.ConsoleConsumer$.process(ConsoleConsumer.scala:102)
        at kafka.tools.ConsoleConsumer$.run(ConsoleConsumer.scala:76)
        at kafka.tools.ConsoleConsumer$.main(ConsoleConsumer.scala:53)
        at kafka.tools.ConsoleConsumer.main(ConsoleConsumer.scala)

@napallday OK I looked over apache/kafka and I see that they skipped this validation code in the kafka-client under KAFKA-13406 and PR #11439 due to issues with the verification and that was the Java client behaviour from 2.8.2 onward

Cool! 🎉 Huge thanks to @dnwe for the invetigation.
The explanations provided in the Jira ticket are crystal clear.
By the way, just like this fix in apache/kafka, the official Java clients have some improvements in sticky and cooperative-sticky assignors since the initial introduction of the incremental cooperative balance protocol. In the future, we can integrate these enhancements gradually.

@napallday were you planning to do the follow up work around metrics, pause/resume and additional FV tests under this PR?
I suppose the alternative would be to merge this as-is, but report the feature as experimental in the changelog so people can test it out in their staging environments

@dnwe Thanks for the reminder.
For the pause/resume feature, I've verified that the behaviour is consistent with Java Kafka.

For EAGLE protocol: all paused status will be dropped when rebalance
For COOPERATIVE protocol: paused status of revoked partitions will be dropped when rebalance

Regarding the metrics and FV tests, I may add it at a later time due to some personal matters. Therefore, I concur with releasing it as an experimental feature initially.

@wwwjfy 👋🏻 thanks for getting in touch
The issue with merging to main at the moment is that the PR branch introduces new interfaces of ConsumeV2 and ConsumerGroupHandlerV2, which we'd then be locked into supporting and ideally we want to be exposing cooperative balance strategy as just a config change for users, rather than requiring them to rewrite their app code to make use of it.
Similarly, if we merge to main without more FV coverage, it might not be obvious to users (unless they read notes on GitHub Releases) that it is considered experimental.
Would it help your testing if I pull the commits into a branch on the main repository rather than them being only on a fork?
i.e.,., if I make a cooperative-balance-strategy branch with these commits then you can go get github.com/IBM/sarama@cooperative-balance-strategy, start calling the new interfaces and experiment with the code and provide feedback?

I hope the current ConsumerGroupHandler can still use the cooperative balance stragtegy. If user want to receive the revoke and assign partition, they can provide their own OnAssignPartition and OnRevokePartition method. and the default handler will be provide if user use origin ConsumerGroupHandler without change current code.

Thanks for the quick response :)
It does make sense, if possible, we maintain a single interface than two. (Sorry I didn't read the change and the comments in this PR)
I'm not sure what's the way forward. Using single interfaces will probably break backward compatibility I guess, which means we'll wait until a major version upgrade as well as the consolidation work before that.
For testing, to me alone, I have my forked version anyway, though for others, what you mentioned may be useful :D
Still evaluating using sarama or confluent sdk which already has this feature. will have feedback if I get anything useful

Yes I think the ideal scenario would be if we can rework this PR to keep the Sarama consumer interface consistent, but expose an opt-in similarly to the Java client via an equivalent to the partition.assignment.strategy config variable

I feel it's hard to keep using the ConsumerGroupHandler interface since it's highly coupled with eager rebalance protocol - e.g. ConsumerGroupSession as the function parameter, is generated in every new generation.
As the new implementation ConsumerGroupHandlerV2 also works for the previous one ConsumerGroupHandler, may I know if it's possible to have another major version of Sarama in the future to include this PR?
I can help add fv tests later but it seems to be a huge work...

if we want to keep ConsumerGroupHandler, i think the possible way is to :

call Setup(ConsumerGroupSession) / Cleanup(ConsumerGroupSession)  when new assignment receives / a new rebalance tirggered.
change ConsumerGroupSession's Claims/MemberId/GenerationId functions to be thread safe.

so if user don't care about assignment change in their previous code(or they only do some log print), only enable cooperative in config will be enough.
But user will still need to be aware of the API behaviour change when enable cooperative rebalance.

any ETA for this feature ?


[8.x] Makes the retrieval of Http client transferStats safe

Hello there!
The Http Client returns some really nice details in the handlerStats method. However, when faking a request inside a test, the transferStats object is null. This causes an error when attempting to call the handlerStats method. This PR updates the handlerStats call by wrapping it in an optional call and returning an empty array by default. This makes consuming code much cleaner by no longer requiring a try/catch statement.
Http::fake(['example.com' => Http::response()]);

// Before
try {
    $stats = Http::get('example.com')->handlerStats();
} catch ($e) {
    $stats = [];
}

// After
$stats = Http::get('example.com')->handlerStats()['some_stat'] ?? null;

There is another option, which is that we return a new Fluent from handlerStats, but that would be a breaking change because previous try/catches would now pass but return null, which could cause undesired side-effects. If that is desirable to you, let me know and I'll write a PR for 9.x that will expand on this one.
Thanks for your time guys :-)
Regards,
Luke

I've also added in support for effectiveUri, which was also throwing an error when faking requests. It will now return null when faked.


"Uncaught Error: Cannot find module" when using asar with native modules

I have a require('my-module') in a renderer js file.  It lives in my-app/node_modules (though I've tried putting it in my-app/.)
It works fine when I run electron . from my-app.
However, once packaged for win32 (created on Ubuntu 14.04), on launch of the .exe I see "Uncaught Error: Cannot find module my-module" in the browser/devtools console.
I've tried require('./my-module')
Am I doing something wrong?
This is with electron 0.36.0, npm-packager 5.1.1

It's most likely that your module is not getting found by node/npm. I have some docs on how this works here: https://github.com/maxogden/art-of-node#how-require-works. Keep trying until it works, I don't think anyone has reported this particular issue before so it's likely something with your setup.

Thanks @maxogden.  I'm going to drum up a simple testcase.  I discovered module.paths.push, but it was crunch time and my approach was a lot of spray n' pray.  Back to you soon.

I'm facing the same issue. I have an Electron app which loads a local Express server. The page loads a single Javascript file.
var url = require('url');
var querystring = require('querystring');
var process = require('process');
var path = require('path');

module.paths.push(path.resolve('node_modules'));
module.paths.push(path.resolve('../node_modules'));

var request = require('request');
// ...

On Ubuntu this works fine with electron . and by running the executable. On Windows running the executable fails with "Uncaught Error: Cannot find module 'request'". If I remove the module.paths.push() lines it fails on Ubuntu too.
Other than the Express server everything is pretty standard. I'm only trying to load npm  installed modules from the default node_modules directory.
I should note it fails with and without asar. I'm not sure if this is a bug with Electron, Electron Packager, or I'm just doing something wrong. I'd like to think node_modules would be loaded without having to mess around with module.paths.
Additional info:
Electron version: 0.36.2 (electron-prebuilt)
Electron Packager version: 5.2.0
Node version: 0.10.41
NPM version: 2.14.14
Build command: electron-packager . app --platform=win32 --arch=x64 --version=0.36.2 --overwrite --asar=true

After I package with electron-packager, I run packaged app it tells me "can't find module". But if I run as "electron ." it works perfectly. Without asar, "electron /path/to/packaged/app/source" works but directly run packaged app, it fails. Don't know why...

Same for me. Electron 0.37.2

Could the people who have this problem please do the following:

fork https://github.com/atom/electron-quick-start
make the minimal amount of changes to the fork to get the problem to occur and commit the changes
post the minimal testcase repository link here so someone in the community can see if they can reproduce the issue themselves.

I'm also getting this issue here is a very simple example of the issue:
https://github.com/rodhoward/electron-quick-start
npm -v  = 3.3.12
node -v = v5.4.1
I'm running Linux mint 17.2 64-bit
and I'm trying to install it on a windows 8 vm

same error here, I'm using electron-packager 6.0 and eletron 0.37.5

A solution for me is to install the required node module in the same directory as the electron.js file.

Here's what i did for electron 0.37.7 and electron-builder 3.11.0
  mainWindow.loadURL("file://" + __dirname + "/index.html");

  mainWindow.webContents.executeJavaScript(`
    var path = require('path');
    module.paths.push(path.resolve('node_modules'));
    module.paths.push(path.resolve('../node_modules'));
    module.paths.push(path.resolve(__dirname, '..', '..', 'electron', 'node_modules'));
    module.paths.push(path.resolve(__dirname, '..', '..', 'electron.asar', 'node_modules'));
    module.paths.push(path.resolve(__dirname, '..', '..', 'app', 'node_modules'));
    module.paths.push(path.resolve(__dirname, '..', '..', 'app.asar', 'node_modules'));
    path = undefined;
  `);

A note for potentially confused travellers. Ensure you're not using --ignore="something-that-will-match-a-module-folder-name-as-well-as-what-you-meant-to-ignore".

I had the same issue, none of the suggestions mentioned above worked for me.
The solution was to package my app under a windows virtual machine running on my mac, and everything worked seamlessly.

Rather than argue about if it works or not could the electron-quick-start package be updated to include lodash and/or jquery so that we have at least one working example of imported libraries.

@rodhoward if you'd like to request that, you probably want to do so at that repository - you'll likely get a better answer there.

I now have this issue too. It has only happened with a recent module I've installed: @paulcbetts/system-idle-time. Before I added this everything was fine.
I extracted the created app.asar generated from running electron-packager and there is no folder @paulcbetts in the node_modules directory so I presume it is not being packaged for some reason?
I have checked and I've not got any ignores anywhere. My app runs perfectly fine from the command line before being packaged.

adding a native module, lzma-native has created this issue for me as well.

Same for me with electron-spell-check-provider

for those having this issue with a native module, i've had some help and am making some headway on this issue.
it appears to be (at least, in my case) because of a dll required by the native module not being found after the application is packaged.
I created a folder, dropped the dll in it and added it to my PATH, the asar-packed application loads fine subsequently. This is obviously not a solution that will help redistributing the application, but a step further nonetheless.

Update: including the dll in the base electron app dir was sufficient for electron to find it
app/
       electron.exe
       msvcp120.dll
       libEGL.dll
       ...
      PUT DLL HERE!
       resources/
                        app.asar
                        electron.asar

I have the same issue and not using asar didn't help ..

If https://github.com/electron-userland/electron-packager/issues/217#issuecomment-232376957 does not help your issue, please follow the instructions in https://github.com/electron-userland/electron-packager/issues/217#issuecomment-197969870.

I tried to make a simple project here. I just added ursa native module and it just doesnt wok : A dynamic link library (DLL) initialization routine failed .

@RilRil Are you going to use electron-packager directly or electron-builder, is your project answer to https://github.com/electron-userland/electron-builder/issues/598#issuecomment-233408351 ?
If you still use electron-builder, "and it just doesn't wok" — on Surface or on your machine?

I'm supposed to use electron-builder, but for now even 'electron index.js' doesn't work on the sample project on my machine..

back to my problem, the thing that i dont understand is that the module not found (%userprofile%\AppData\Local\Temp%randomname%.tmp.node) exists ...
and why is it random name ?

Ok I made some progress,
I run the app a first time, I get the error...
then I go to C:\Users<user>\AppData\  and I delete \Local<myapp> and Roaming<myapp>
I try again and it works !
Does this make sens to anyone ?

ok actually i've done another thing for it to work, I've installed Git for windows and I checked the "Use git and optional Unix tools for the windows Command Prompt" option ..
so, it looks like the packager or the builder is using a command which does not exist on Windows ...

Git shouldn't be necessary unless your package.json file has a git reference in dependencies or devDependencies.
If an executable is called from Node and scnnot be found, there should be an ENOENT exception thrown, so I'm confused as to why that didn't happen in your case.

okay actually a .dll was missing that Git adds when installing with the option! It was libeay32.dll (SSL).
So the solution from @leshow works, I just added the missing .dll next to the .exe and it worked.

This sounds like a problem with one of your dependencies - it should be bundling that DLL with a binary Node module, and then any of the solutions from my 7/13 comment should work.

Same problem here...

Please note that adding comments that say "same here" or "+1" or similar are not particularly helpful and just sends unnecessary notifications to everyone subscribed to the issue.
What would be more helpful is providing a minimal testcase to reproduce your problem. Using the electron-quick-start repository as a base,  create a minimal Electron app that illustrates the issue you described, and post a link to it here. This makes it easier for the community to figure out what the specific cause might be.

i have external modules in project, using through require('external modules'), in development mode it works fine, but after electron-builder process, it throw error in module.js 440 Cannot find module.
And yes require is used in render processes.  what i guess is external modules are not being added in electron.asar file, but how to add? and how to use the extraResources option, any doc or tutorial would be helpful.

I'm not sure why you're using nightmare with packaging an Electron app, it looks like something that you'd only use for tests.

and how to use the extraResources option, any doc or tutorial would be helpful.

You mean extra-resource? Like the API docs say, you specify one or more paths to files that you wish to include, e.g., --extra-resource=/path/to/file1 --extra-resource=/path/to/file2. But that's outside the scope of this issue.

i use nightmarejs to scrap the site, and the scraped data is used for calculation.
Algo.

user select which data is required
nightmarejs fetch the data from url.(nightmarejs support click event)
the data i scrap is used for calculation.
Note: data cannot be scrap without click, or change events.
is my approach completely wrong?

It doesn't feel right to have to run another Electron instance just to scrape data from a site. However, there seems to be problems with using a single Electron binary. But again, this is offtopic for this issue.
As I said earlier, a minimal testcase would be greatly appreciated.

I have an Electron app that I want to generate another Electron app. The idea is the user inputs images and text using the master app and then can press a button to generate an exe/app file to distribute.
I've created a test case to illustrate. I've only created this for darwin x64 right now. To recreate the issue clone repo and npm install in both the root folder and the app folder. Test in development mode using command npm start. Press the button in the app and you will see in the console log that the child app has been created successfully.
But if you build the master app using these parameters:
electron-packager app test --platform=darwin --arch=all --version=1.3.3 --overwrite --out=builds
Run that .app and press the generate button, the error Cannot find module 'electron-packager' appears. Any ideas why this is happening?

@pilar1347 this is a different error than the issue this one is about, could you please file a separate issue? (Making sure you read our docs on filing bugs and follow the directions in the GitHub issue template) It would be much appreciated.

I think I'm going to close this particular issue because there's already one major answer in here and there are way too many different kinds of problems to get a coherent answer for all of them.
IF YOU HAVE THIS PROBLEM

Read our docs on filing bugs and see if your specific problem already has another issue created for it (whether it's open or closed)
If you believe you have a different set of problems, file a new issue and follow the directions in the GitHub issue template.

package.json won't work
{
    ...
    "devDependencies": {
        "jsonfile": "^2.4.0"
    }
    ...
}

package.json works
{
    ...
    "dependencies": {
        "jsonfile": "^2.4.0"
    }
    ...
}

it looks like that electron-packager looks up dependencies field to pack rather than devDependencies

@idododu
From the README:

Be careful not to include node_modules you don't want into your final app. If you put them in the devDependencies section of package.json, by default none of the modules related to those dependencies will be copied in the app bundles. (This behavior can be turned off with the --no-prune flag.)

Adding the --no-prune flag to the electron-packager command fixed this issue for me.  Hope it helps!

Strange that this got closed before a solution was posted, but codyborn above hits it:
By default, nothing in your node_modules folder will be copied to your final package. You need to add a "dependencies" section to your package.json that explicitly lists everything in your node_modules folder.  You also need to dig in to each of those dependencies and fish out a version number to add as well.  Like this:
{
	"name": "your-app",
	"version": "0.1.0",
	"main": "main.js",
	"dependencies": {
		"aws-sdk": "2.6.9",
		"electron-json-storage": "2.0.3",
		"ipc": "0.0.1",
		"shell": "0.3.2"
	}
}

I have no idea why this is not mentioned anywhere in the packaging docs, as it seems to me to be the most important piece of information.  As this issue shows, your app simply won't work if you don't do this.

By default, nothing in your node_modules folder will be copied to your final package.

This is not true. I'm not sure how you arrived at this conclusion. You contradict this statement in your next sentence.

I have no idea why this is not mentioned anywhere in the packaging docs, as it seems to me to be the most important piece of information.

It's implied in the example in the README:

Let's assume that you have made an app [...] and that the following is true:
[...]

npm install for the Foo Bar app has been run at least once

If you think this is not explicit enough, I am happy to review pull requests to make it more obvious.

I ran into this issue while rebuilding edge.js for electron. Ended up that I was missing the vcruntime140.dll.
See Error: The specified module could not be found for more details. Thanks for the hint @leshow!

Had to do this to build Hain as well - surprising we don't have a better solution for this...

I figured out the reason for my issue and the solution.
I was installing the module with the --save-dev flag. This was making it a development dependency and it would work when the application was started using electron .. But it wouldn't worked when packaged into an application.
The fix was to install the module without the flag. This would make it a normal dependency.
This automatically configures the package.json correctly.
Hope it helps !

I encountered the same problem.
But I realised I was using gulp browserify and sending my app to dist/main.min.js.... then have electron.js etc on the root folder.
With this bundled, electron cannot find node_modules, because it does not exist. be careful of this.

Following on from codyborn's and jasonkester's comments above,  I think the docs on electron-builder and electron-packager should explicitly advise that things in node_modules that are not added to  the dependencies field in package.json will not necessarily end up in the asar file.

am getting the same err : "can't find module mysql2", am using --ignore=node_modules to ignore node_modules and that's why am getting this err, is there a way to fix this ?


cmd/compile: bad error message when type switch assertion used outside of type switch

Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go version go1.10 linux/amd64
go version devel +5f0a9ba134 Tue Mar 20 22:46:00 2018 +0000 linux/amd64

Does this issue reproduce with the latest release?
Yes, and tip
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/myitcv/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/myitcv/gostuff"
GORACE=""
GOROOT="/home/myitcv/gos"
GOTMPDIR=""
GOTOOLDIR="/home/myitcv/gos/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build631842484=/tmp/go-build -gno-record-gcc-switches"

What did you do?
https://play.golang.org/p/5SSETQWcdrI
I typed something similar to this example by accident. I meant to assert a specific type, but instead used the special type-switch-form of a type assertion by accident.
What did you expect to see?
An error message that clearly identifies the problem on line 10. e.g.
prog.go:10:15: use of .(type) outside type switch

What did you see instead?
A number of error messages, the first of which is, to my mind, a derived/less significant error message:
prog.go:10:5: cannot assign 1 value to 2 variables
prog.go:10:15: use of .(type) outside type switch
prog.go:10:24: undefined: ok
prog.go:11:36: undefined: x

It's early-ish in the morning, but my eyes got fixed on the first error message... and it took longer than is perhaps sensible to get to the meat of the problem which is the second error message.
cc: @griesemer / @mdempsky
Thanks to @mvdan for helping to confirm the issue.

you cannot use (type) outside of switch statement.

go/types gives a better error message:
$ gotype x.go
x.go:10:14: invalid AST: use of .(type) outside type switch

so it's conceivable that the compiler could do as well.
Marking for 1.11 in case we get to it, but definitively not urgent.

go/types gives a better error message:

Sorry, I should have included that result too. Thanks for doing the legwork.

... but definitively not urgent.

Agreed!

This is a cmd/compile/internal/syntax error.
There's also inconsistency. For the following if statement
if x, ok = i.(type); ok {
	fmt.Println("Hello, playground", x)
}

using a = instead of a := the syntax parser reports no error.

Furthermore, the code:
switch x = i.(type) {
case T:
}

reports (in a syntax parser test):
parser_test.go:25: x.go:12:22: syntax error: assignment x = i.(type) used as value

while
switch x, ok := i.(type) {
case T:
}

reports (test case of issue):
parser_test.go:25: x.go:12:9: cannot assign 1 value to 2 variables

The problem is in the asymmetric handling of type switch guards in the syntax parser.


Question about Varifocal loss

In the paper, the negtive weight of BCE loss is alpha*p^gamma. However, in varifocal_loss.py， the loss is implemented by:
focal_weight = target * (target > 0.0).float() +
alpha * (pred_sigmoid - target).abs().pow(gamma) *
(target <= 0.0).float()
The negtive weight is alpha(p-q)^gamma*, why?

This is the initial version of implementation of VFL and I forgot to refine it.
alpha * (pred_sigmoid - target).abs().pow(gamma) * (target <= 0.0).float()   actually equals to alpha * pred_sigmoid.pow(gamma) * (target == 0.0).float(), because there is a multiplier (target <= 0.0).float() in that formula and the target is always >= 0.

This is the initial version of implementation of VFL and I forgot to refine it.
alpha * (pred_sigmoid - target).abs().pow(gamma) * (target <= 0.0).float() actually equals to alpha * pred_sigmoid.pow(gamma) * (target == 0.0).float(), because there is a multiplier (target <= 0.0).float() in that formula and the target is always >= 0.

You means alpha * pred_sigmoid.abs().pow(gamma) * (target <= 0.0).float() equals   alpha * pred_sigmoid.pow(gamma) * (target == 0.0).float()  or   alpha * (pred_sigmoid - target).abs().pow(gamma) * (target <= 0.0).float()  equals to alpha * pred_sigmoid.pow(gamma) * (target == 0.0).float()?  I'd understand the situation if it is the former one.
According to paper, the negtive weight should be alpha * pred_sigmoid.abs().pow(gamma) * (target <= 0.0).float().Is the formular of paper current version?

Hi,  target is the IoU so it is always >= 0, which implies target <= 0 <=> target == 0.
In this way,
alpha * (pred_sigmoid - target).abs().pow(gamma) * (target <= 0.0).float()  <=>
alpha * (pred_sigmoid - target).abs().pow(gamma) * (target == 0.0).float()  <=>
alpha * pred_sigmoid.abs().pow(gamma) * (target == 0.0).float().

Ohhh! Thanks, I understand it now.

Hi @hyz-xmaster ,

I did not find the q in the red circle according to the code.
I can't understand the item above the green line. Since log(1-p) is used to predict negative samples, why it appears in the q>0 case? And anyway, I did not find the related implementation from the code. I just understand the code by the following way:

Looking forward to your reply, thanks.

Hi @hyz-xmaster ,

I did not find the q in the red circle according to the code.
I can't understand the item above the green line. Since log(1-p) is used to predict negative samples, why it appears in the q>0 case? And anyway, I did not find the related implementation from the code. I just understand the code by the following way:

Looking forward to your reply, thanks.

Hi @feiyuhuahuo,

target in the code represents q in that formula.
qlog(p)+(1-q)log(1-p) is the binary cross entropy loss, which is calculated by F.binary_cross_entropy_with_logits. When q  = 0, qlog(p)+(1-q)log(1-p) reduces to log(1-p). When q > 0, it keeps unchanged.

Hi @feiyuhuahuo,

target in the code represents q in that formula.
qlog(p)+(1-q)log(1-p) is the binary cross entropy loss, which is calculated by F.binary_cross_entropy_with_logits. When q  = 0, qlog(p)+(1-q)log(1-p) reduces to log(1-p). When q > 0, it keeps unchanged.

This is the initial version of implementation of VFL and I forgot to refine it.
alpha * (pred_sigmoid - target).abs().pow(gamma) * (target <= 0.0).float() actually equals to alpha * pred_sigmoid.pow(gamma) * (target == 0.0).float(), because there is a multiplier (target <= 0.0).float() in that formula and the target is always >= 0.

You means alpha * pred_sigmoid.abs().pow(gamma) * (target <= 0.0).float() equals alpha * pred_sigmoid.pow(gamma) * (target == 0.0).float() or alpha * (pred_sigmoid - target).abs().pow(gamma) * (target <= 0.0).float() equals to alpha * pred_sigmoid.pow(gamma) * (target == 0.0).float()? I'd understand the situation if it is the former one.
According to paper, the negtive weight should be alpha * pred_sigmoid.abs().pow(gamma) * (target <= 0.0).float().Is the formular of paper current version?

Hello, did you add your loss to yolov5? Judge which place needs to be adjusted?


Intermittent out of order execution of scripts

This  issue only manifests intermittently.  I am not sure if there is a race condition on the signal or the state. This needs further investigation.
I enabled logging of failures when populating patterns in scripts, see https://github.com/Hyperfoil/qDup/pull/51
Whilst this exposed some incorrect script definitions, one behaviour that has become apparent is that sometimes scripts are run out of order when flow is controlled by signals. e.g.

Occasionally, ReadStats appears to try and read the state before CaptureStats signals the state variable has been written to
This results in message logged such as, because the state is not available in the state map ;
11:20:55.554 push-stats@test:SyntaxError: Unnamed:1:23 Expected ; but found .1
RUN.getting-started.jvm.1.started
                       ^

11:20:55.592 push-stats@test:SyntaxError: Unnamed:1:23 Expected ; but found .1
RUN.getting-started.jvm.1.first_request
                       ^

11:20:55.616 push-stats@test:SyntaxError: Unnamed:1:23 Expected ; but found .1
RUN.getting-started.jvm.1.warm
                       ^

11:20:55.647 push-stats@test:SyntaxError: Unnamed:1:23 Expected ; but found .1
RUN.getting-started.jvm.1.throughput
                       ^

11:20:55.665 push-stats@test:SyntaxError: Unnamed:1:23 Expected ; but found .1
RUN.getting-started.jvm.1.latencyAvg
                       ^

11:20:55.681 push-stats@test:SyntaxError: Unnamed:1:23 Expected ; but found .1
RUN.getting-started.jvm.1.latencyStddev
                       ^

11:20:55.698 push-stats@test:SyntaxError: Unnamed:1:23 Expected ; but found .1
RUN.getting-started.jvm.1.latencyMax

Out of date?

I have not seen this issue for a long time, we can close as out of date


Project Structure

There have been a lot of conversation so far relating to the project structure, so I'm going to summarize them all here.

#59: Src and dist structure.
#79: Bower package not found.
#71: Karma Reporter

We have the following criteria we'd like to solve:

Tagged releases on Github and NPM.
Src and dist folders in the project.
Lea would like the latest version for download at any time.
Move website JS files to separate directory?

We also don't want the project to be more work than it already is. So let's take a look at this post-commit hook by Domenic: https://gist.github.com/domenic/ec8b0fc8ab45f39403dd.
I'd like to get SauceLabs or Browserstack set up as well. We can get a free account since this is open source.
Last, we want to consider the possibility of being able to execute the karma tests in-browser, as part of the gh-pages branch. Currently, I only know of QUnit doing this well. Haven't really seen solutions for Karma.

What about introducing a style guide? Perhaps adding jscs to gulp and using Airbnb's Style Guide

we have JShint running as a pre-processor on our test suite
right now its pretty loose, but we may tighten it up in the future
see #64

Wellll, we have tags now :)

@dperrymorrow, I was thinking more along the lines of conformity with such things as quotation style, white-space, named functions etc.. something JSHint isn't designed for.

@softwarespot

I was thinking more along the lines of conformity with such things as quotation style, white-space, named functions etc.. something JSHint isn't designed for.

See issue #37 @LeaVerou is pretty opposed to very opinionated linters.
However if you have a solution feel free to propose it. Im not married to JsHint.


Fix incorrect range in CreateCommonWorld

NumInputs should be (0,1) to account for optional first argument. Fixes MPI tests.

Looks right :)
cc @bwasti for a test on pulling diffs.


Terminal gray box bug is back

Describe the bug
The Terminal gray box bug is back, cant be solved with adding OpenConsole
To Reproduce
Steps to reproduce the behavior:

Open Terminal w MFE enabled
observe gray box top left corner

Windows Version
Windows 11 build 22621.963 (stable)

yes happening with me too , i created the issue on Windowstermnal github  , should i close it ?
i also tried adding OpenConsole and Windows Termial but no help.

Yeah looking at the Windows Terminal repo on Github, it got updated to v1.15.3466.0 (Windows 11) , I'm quite sure this version brought back the grey box.

Can you download the artifacts of the above commit (you can reach there by clicking on the tick icon) and see if it fixes the problem?

Can you download the artifacts (you may need to scroll down to see them) of the above commit and see if it fixes the problem?

Works beautifully, awesome job buddy!
Seems like this fixes #176 as well, probably expected as the fix (as far as I understand) improves the window exclusion check.

This fixed the issue , thank you.

Fix released in 1.3 preview, closing.


fix(web/applications): set proper url to download files page (boas-694)

Describe your changes
Bug fix of the url to download files from the documentation list page
Issue ticket number and link
Type of change 🧩

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation update
[ ] Other (please explain in the description section above)

Checklist before requesting a review

[ ] I have performed a self-review of my own code
[ ] I have double checked this work does not include any hardcoded secrets or passwords
[ ] I have made corresponding changes to the documentation
[ ] I have provided details on how I have tested my code
[ ] I have referenced the ticket number above
[ ] I have provided a description of the ticket
[ ] I have included unit tests to cover any testable code changes

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


RAT-355: Add configuration dump to report

Closes Rat-355.
Adds CLI options.
--list-licenses all|approved|none  (default: none)
--list-families all | approved | none (default: none)
--dry-run
if either of the --list-X  options is not "none" the reporter will add a "rat-config" section to the report XML document.  This section has the same structure as the XML configuration file.
if --dry-run is specified then no files are updated and no files are scanned.

Closing in favor of #227 which has a better solution


agda-stdlib: list as not broken on Darwin

Motivation for this change
The Agda standard library builds on Darwin (Catalina). Remove the broken flag in the meta data of agda-stdlib to reflect this.
Things done

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

[ ] NixOS
[x] macOS
[ ] other Linux distributions

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests) (no tests available)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip". Passed
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Ensured that relevant documentation is up to date (didn't find any about this issue).
[x] Fits CONTRIBUTING.md.

Notify maintainers
cc @jwiegley  @laMudri

I don't have Mac but I'll trust you.


Constant freezes after Updating on 13th November, 2018

Issue Type: Bug
After applying an update on the 13th November, 2018, my VS Code instance is constantly freezing most of the time. I am on Linux Mint 18.3. Most definitely, there is an issue with this update.
VS Code version: Code 1.29.0 (5f24c93878bd4bc645a4a17c620e2487b11005f9, 2018-11-12T07:42:27.562Z)
OS version: Linux x64 4.15.0-38-generic

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz (4 x 2883)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwarevideo_decode: unavailable_softwarevideo_encode: unavailable_softwarewebgl: enabledwebgl2: enabled

Load (avg)
4, 3, 2

Memory (System)
7.68GB (0.87GB free)

Process Argv
--unity-launch

Screen Reader
no

VM
0%

Extensions (30)

Extension
Author (truncated)
Version

html-snippets
abu
0.2.1

django-html
bib
1.2.0

django-snippets
bib
1.1.0

npm-intellisense
chr
1.3.0

bracket-pair-colorizer
Coe
1.0.61

jshint
dba
0.10.20

vscode-eslint
dba
1.7.0

es7-react-js-snippets
dsz
1.9.0

vscode-wasm
dts
1.2.1

prettier-vscode
esb
1.7.2

vscode-optimize-images
fab
1.0.7

auto-close-tag
for
0.5.6

gc-excelviewer
Gra
2.1.26

beautify
Hoo
1.4.7

node-module-intellisense
lei
1.5.0

markdown-converter
man
1.1.2

dotenv
mik
1.0.1

mssql
ms-
1.4.0

python
ms-
2018.10.1

cpptools
ms-
0.20.1

debugger-for-chrome
msj
4.11.0

vscode-extension-auto-import
Nuc
1.4.3

vetur
oct
0.13.0

python-template-snippets
Ric
1.0.0

LiveServer
rit
5.1.1

vscode-icons
rob
7.28.0

vscode-djaneiro
the
1.4.2

cmake
twx
0.0.17

cmake-tools
vec
1.1.2

vscode-react-native
vsm
0.6.18

(1 theme extensions excluded)

I'm facing the same issue with random freezes.
VS Code version: Code 1.29.0 (5f24c93878bd4bc645a4a17c620e2487b11005f9, 2018-11-12T07:42:27.562Z)
OS version: Linux x64 4.15.0-38-generic (Ubuntu 18.04.1 LTS)

System Info

Item
Value

CPUs
AMD Ryzen 5 1400 Quad-Core Processor (8 x 1563)

GPU Status
2d_canvas: enabledchecker_imaging: disabled_offflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwarerasterization: disabled_softwarevideo_decode: unavailable_softwarevideo_encode: unavailable_softwarewebgl: enabledwebgl2: enabled

Load (avg)
2, 1, 1

Memory (System)
7.80GB (0.99GB free)

Process Argv
--unity-launch

Screen Reader
no

VM
0%

Extensions (28)

Extension
Author (truncated)
Version

html-snippets
abu
0.2.1

jslint
ajh
1.2.1

vscode-django
bat
0.17.0

django-html
bib
1.2.0

django-snippets
bib
1.1.0

git-extension-pack
don
0.1.3

jupyter
don
1.1.4

python-extension-pack
don
1.4.0

gitlens
eam
8.5.6

auto-rename-tag
for
0.0.15

code-runner
for
0.9.5

vscode-pull-request-github
Git
0.2.3

vscode-random
jre
1.4.0

restructuredtext
lex
79.0.0

MagicPython
mag
1.1.0

prettify-json
moh
0.0.3

mssql
ms-
1.4.0

python
ms-
2018.10.1

sublime-keybindings
ms-
4.0.0

vsliveshare
ms-
0.3.954

autodocstring
njp
0.2.3

vscode-icons
rob
7.28.0

partial-diff
ryu
1.4.0

code-settings-sync
Sha
3.2.0

vscodeintellicode
Vis
1.0.6

jinja
who
0.0.8

ReactSnippets
xab
2.2.1

vscode-open-in-github
ziy
1.3.6

(1 theme extensions excluded)

Same issue, randomly freezes while also having high CPU usage.
Version: 1.29.0 (system setup)
Commit: 5f24c93878bd4bc645a4a17c620e2487b11005f9
Date: 2018-11-12T07:47:15.448Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Same issue on Ubuntu 16.04 after the last update.
Version: 1.29.0
Commit: 5f24c93878bd4bc645a4a17c620e2487b11005f9
Date: 2018-11-12T07:42:27.562Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

same issue with VSCode 1.29.0 on macOS Mojave 10.14

This issue seems to be a duplicate of https://github.com/Microsoft/vscode/issues/62970. A suggested workaround is to always clear notifications.

Same issue
VS Code: Version 1.29.0 (1.29.0)
OS: macOS Mojave 10.14 (18A391)

I have also had random freezes since updating to Mojave, but the problem hasn't been limited to Mojave. Even something as simple as clicking on the LaunchPad icon in the dock also causes a freeze. The problem is temporarily cleared by a restart and then reoccurs after 1 to 3 days. Five days ago in installed the beta of 10.14.3 and the problem has not reoccured. Apple fixed a bug maybe? I have a 2018 MacBook Pro


TypeError: Cannot read properties of undefined (reading 'message') when chat with Google Palm

Version of Langchain: 0.0.132
Hi there, I'm using ChatGooglePaLM with call method, but if I send the specific message, there will be an error which is Cannot read properties of undefined (reading 'message')
The messages I provide the model is something like:
HumanMessage {     lc_serializable: true,     lc_kwargs: {       content: 'C\n\n## Cr by [A](https://www.google.com) at Google',       additional_kwargs: {}     },     lc_namespace: [ 'langchain', 'schema' ],     content: 'C\n\n## Cr by [A](https://www.google.com) at Google',     name: undefined,     additional_kwargs: {}   }

The underlying issues here are likely:

There are no results that were returned. Which is likely because:
Your API key was invalid

Double-check to make sure the API key you're either passing in or setting via the GOOGLE_PALM_API_KEY is one that you have gotten from the MakerSuite console and that it is valid. You may want to test it using the curl command suggested by the console as well.
It looks like the library isn't properly handling this error message, which is something that we should look at and address.

Hrm. Upon further testing - I think I'm wrong. It does look like an error is getting thrown, or is supposed to be.
But that doesn't explain how you could be getting no results.
Can you provide an illustration of how you're calling it?

Sure, here's how we define the model:
chatModel = new ChatGooglePaLM({
        apiKey: GOOGLE_PALM_API_KEY,
        ...baseChatOpts,
      })

with baseChatOpts like this:
{
  modelName: 'models/chat-bison-001',
  temperature: 0.2,
  streaming: true,
  maxTokens: undefined,
  callbacks: [ { handleLLMNewToken: [Function: handleLLMNewToken] } ]
}

And we use .call method by passing in BaseMessage[] that looks like this:
HumanMessage
 {
    lc_serializable: true,
    lc_kwargs: {
            content: 'C\n\n## Cr by [A](https://www.google.com) at Google',
            additional_kwargs: {}
    },
    lc_namespace: [ 'langchain', 'schema' ],
    content: 'C\n\n## Cr by [A](https://www.google.com) at Google',
    name: undefined,
    additional_kwargs: {}
}


ci(workflows): migrate to shared pull reuqest and scheduled workflows

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

v2.3.1
GitHub release

Your semantic-release bot :package::rocket:


Is there a way to make my mod's commands use a different prefix than '/'?

I have a Fabric Utility mod and would like to have a way to configure options via commands. However, I'd like it to be easier to browse commands by making the prefix ',' but still get suggestions for the commands?
MC 1.20.4, latest Fabric API, etc.
Any help would be appreciated!

@StupidRepo I think you need to create a mixin for these methods in order to change the command prefix (or add an alternative one): CommandManager#executeWithPrefix, CommandManager#execute.


updates to table styles

Looks good to me except for those test failures. And I'm not sure those are legitimate.

👍


bootparameter: add missing gap of 6 sectors

When writing bl2_bp.bin to the SD card, nothing happens at power on.
According to:
https://renesas.info/w/images/2/28/SD_card.png
There must be a 6 sectors gap between the boot parameters and the start of BL2, and BL2 must start at sector 8. Currently, BL2 starts at sector 2.
Add the required gap of 6 sectors of 512 bytes each so that the boot process can work.

I am not sure if this is the best way to fix this. A better way could be to keep bl2_bp.bin and bl2.bin separated, and in the Yocto WKS file, simply add bl2_bp.bin at sector 1, and bl2.bin at sector 8. This would be much cleaner. If desired, I can resubmit an updated patch, altough I am suspecting it may have some impact if using flash writer...

Since the link to the PNG is from the RZ/G2L SMARC board page, can we assume you are using that board?
For the new RZ/G3S, the utility was added to the Trusted Firmware-A code in the tools directory.
Now, you pass on the command line what you want to boot from so it can pick the correct offsets.
https://github.com/renesas-rz/rzg_trusted-firmware-a/blob/v2.7/rzg3s/tools/renesas/rz_boot_param/g3s/bptool.c
I am not sure if the plan is too make this change for all devices (as in, merge the TF-A branches).
If so, that will fix the issue in general.

Hi, I am using a SolidRun hummingboard EVK with a rz-g2lc SOM:
https://www.solid-run.com/embedded-industrial-iot/renesas-rz-family/rz-g2lc-som/
I am assuming that all rz/g2lc CPUs expect the same memory layout configuration as described in my original image? If not, can you provide a link to the correct memory layout?

I am assuming that all rz/g2lc CPUs expect the same memory layout configuration as described in my original image?

Correct.

I am using a SolidRun hummingboard EVK with a rz-g2lc SOM:

OK, I see. There is a pin mux to select between the eMMC and SD card socket for channel 0. There must be some way to change the boot mode too.
Have you ever had it boot from directly from the SD card before using another BSP build? (as in, you know the hardware can do it)

Hi,
I am not really following you about the pinmux...
Just to clarify things, on my board, there is a DIP switch to select eMMC boot versus SD card boot. I have set the switch to "SD card" boot mode.
At first, I downloaded a Debian image that I put on a SD card, and it booted correctly.
Then, I compiled my own yocto image, using the rz-community-bsp layer, and to which I have added support for the SolidRun EVK. I flashed that image to the SD card, but nothing appears on the console when I tried to boot it.
Then, I ONLY applied the bootparameter patch I submitted, recompiled my Yocto, flashed it on the SD card, and it boots perfectly fine.

Then, I ONLY applied the bootparameter patch I submitted, recompiled my Yocto, flashed it on the SD card, and it boots perfectly fine.

OK, now it's clear. Sorry about that.
As for your patch, it would break SPI flash booting and eMMC flash booting. So that won't work.
We might need to think about more flexibility, like what is being done for the RZ/G3S like I mentioned above.

Ah, I see now. In the hardware manual, I can see that the 6 sectors "gap" is not present for eMMC and SPI, and is present only for SD card boot. I will look into it to make it more flexible.

I am not sure if this is the best way to fix this. A better way could be to keep bl2_bp.bin and bl2.bin separated, and in the Yocto WKS file, simply add bl2_bp.bin at sector 1, and bl2.bin at sector 8. This would be much cleaner. If desired, I can resubmit an updated patch, altough I am suspecting it may have some impact if using flash writer...

IMHO this is the way to go: keep the files separated.
You don't use Flash Writer for SD cards, whether it is an image or the SD card itself, so little point in having a bl2 blob for SD boot that includes the boot parameters.

The other idea is that we just always create 3 files:
bl2_bp_spi.bin
bl2_bp_emmc..bin
bl2_bp_sd.bin
This is what I would prefer.
The official Renesas BSP always comes tie a 'bp' version of bl2, so it would be nice to keep some consistency.
Again, we have to keep in mind that the offset address might be different for different parts. For example, RZ/G3 series.

I have decided to simply create a separate bp.bin file, and install the existing bl2.bin file. This has the advantage of having no impact for existing users. I have created a new PR for this.


[BUG] Modal - Margins are stacking and not sitting adjacently

Detailed description

Describe in detail the issue you're having.
In modals the margins are collapsing with the display fallback back to block for <div>s. This is causing the need to overwrite with zeros whenever the parent of collapsed margins contains display: flex;.

Is this issue related to a specific component?
Sage Modal

What did you expect to happen? What happened instead? What would you like to see changed?
margin-tops and margin-bottoms should always affect the element it's tied to and not overlap or collapse one

What browser are you working in?
All

Steps to reproduce
Describe the steps to reproduce the behavior:

Visit the Modal rails page
Inspect the sage-modal__header, sage-modal__content, and sage-modal__footer to verify that their margins are adjacent and not stacked on top each other

Screenshots
Provide screenshots, videos, or gifs of issue.

Moved to Jira: https://kajabi.atlassian.net/browse/SAGE-113


Error on build

Projects with Instapipe can't be build, some editor scripts are added to build process.
Editor scripts are well placed on Editor folder but the leth.instantpipes.Editor.asmdef are targeted for all platforms.

Hello! Have you updated the package / downloaded the latest version? I'm fairly sure this was fixed a fee commits ago.

Hi! I can't see the change needed to work on the latest code
On Let.instantpipes.Editor.asmdef includePlatform need to have "Editor" this exclude all other platforms
{     "name": "leth.instantpipes.Editor",     "rootNamespace": "InstantPipes",     "references": [],     "includePlatforms": ["Editor"],     "excludePlatforms": [],     "allowUnsafeCode": false,     "overrideReferences": false,     "precompiledReferences": [],     "autoReferenced": true,     "defineConstraints": [],     "versionDefines": [],     "noEngineReferences": false }

If I do that, I can't attach the pipe component to the objects anymore, can I? I wrapped the editor code in #if UNITY_EDITOR instead, which is a lazy solution but (supposedly) works fine.

I also tried to make a separate asmdef for the runtime stuff, but then the editor script fails to see the pipe script. There's probably a proper solution with proper assembly definitions somewhere there, but I haven't figured it out.

You have right! I was severing all the references haha
Let me do a proper pull request to fix it on the night


Java linter error: cannot convert nil to string

Description of the problem or steps to reproduce
Create a .java file, and save it.
The following error occurs:
<string>:59: cannot convert nil to string
stack traceback:
	[G]: in function 'JobSpawn'
	<string>:59: in function 'lint'
	<string>:42: in function 'runLinter'
	<string>:50: in main chunk
	[G]: ?

Specifications
Commit hash: 8a27646
OS: Archlinux x86_64
Terminal: Terminator

I'm not experiencing this issue. Can you provide some more details? Also the commit hash you are using technically doesn't exist since that commit was squashed when I merged your PR.

Sorry for the incorrect commit hash. I've tried from master again, and have the same issue. I also have the issue with Release 1.1.3 on Ubuntu 16.04.
On both systems, all I have to do to reproduce the error is to open a .java file, and save it. Even if the file is completely empty. For the record, linter works properly for C++ and Lua.
I'm using openjdk 8. Is there an additional program I need to install for linting?

Sorry, I should have closed this issue long ago when #564 was merged.


inconsistencies between metron_agen spec, doppler spec and readme

On metron_agent part of loggregator v70 there are the following properties listed inside the metron_agent/spec file: metron_agent.etcd.client_{cert,key).
These properties can be found also on the latest README (v79) but if we look inside the spec file for v79 the aforementioned properties are not listed at all.
Is it a problem with the spec file or the readme?
Thanks

On jobs/metron_agent/spec the following props are listed as deprecated:
loggregator.etcd.require_ssl
loggregator.etcd.machines
loggregator.etcd.maxconcurrentrequests
loggregator.etcd.ca_cert

but on jobs/doppler/spec they are still written.

@paolostivanin Doppler still uses etcd for two purposes:

Service Discovery - Doppler announces itself via etcd so TrafficController can find it
Syslog Drains - The SyslogDrainBinder writes the syslog drain locations (from the Cloud Controller) to etcd and Doppler uses them.

That said, the listed doc is invalid saying metron communicates with etcd.

@paolostivanin, we've updated the docs.
Thanks for pointing this out.


Some Projects are not working properly

Describe the bug
Some projects on the site are not working properly due to not proper path mention to its CSS and JS files or some error in HTML code. There are at least 4-to 5 projects which are not working properly. This is under GSSOC'22 contributions.
To Reproduce
Steps to reproduce the behavior:

Go to '...'
Click on '....'
Scroll down to '....'
See error

Expected behavior
It should be working properly by resolving small yet faulty errors.
Screenshots

Desktop (please complete the following information):

OS: [e.g. iOS]
Browser [e.g. chrome, safari]
Version [e.g. 22]

Smartphone (please complete the following information):

Device: [e.g. iPhone6]
OS: [e.g. iOS8.1]
Browser [e.g. stock browser, safari]
Version [e.g. 22]

Additional context
Add any other context about the problem here.
Steps Followed✅
Check the box with [x] If you followed all the steps.

[x] Describe the bug
[ ] To Reproduce
[x] Expected behavior
[x] Screenshots
[ ] Additional context

Code of Conduct✅

[x] I agree to follow this project's Code of Conduct.
[x] I checked the current issues for duplicate problems.
[x] I have gone through project README.

Hey thanks for raising this issue. Ill assign you this issue but please specify the bugs that you'll be working with, like email validator project

Hey thanks for raising this issue. Ill assign you this issue but please specify the bugs that you'll be working with, like email validator project

OK, I will specify the project name in the pr.


Component unit tests enzyme

Related Issue:
#309
Summary:

[x] Added Enzyme setup
[x] Removed flow typing from tests
[x] Added first tests

[x] Progressbar
[x] Sidebar

Tests

Progressbar component
Sidebar component

@idoberko2 would be great if you could review the setup and first tests? If there is nothing against using Enzyme we can merge this to have the setup ready and we can continue to add more tests afterwards.


Nitro crawlLinks option does not exclude external links which is a relative links

Environment

Operating System: Darwin
Node Version:     v20.11.1
Nuxt Version:     3.11.1
CLI Version:      3.11.1
Nitro Version:    2.9.4
Package Manager<EMAIL_ADDRESS>Builder:          -
User Config:      devtools, features, extends, modules, colorMode, ui, runtimeConfig, content, routeRules, nitro, css
Runtime Modules<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Build Modules:    -

Reproduction
Create a NuxtLink with relative URL and add external option <NuxtLink to="/mentions-legales" external></NuxtLink>, generate prerender with this command pnpm run build --prerender
├─ /mentions-legales (63ms)                                                                                nitro 15:16:10
  │ ├── Error: [404] Page not found: /mentions-legales
  │ └── Linked from /

Describe the bug
Nitro crawlLinks option does not exclude external links which is a relative links
Additional context
No response
Logs
No response

I was able to see the behavior you are mentioning. Excluding those routes from prerendering should work for you in the interim.
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  nitro: {
    prerender: {
      ignore: ["/mentions-legales"],
    },
  },
});

I however wasn't getting an error from prerendering. Following the instructions provided doesn't yield an error. Here is my attempt at reproduction for reference.
https://codesandbox.io/p/devbox/nuxt-26552-prerender-external-link-74zqpw
➜  workspace git:(master) pnpm run build --prerender

> nuxt-app@ build /workspaces/workspace
> nuxt build "--prerender"

Nuxt 3.11.2 with Nitro 2.9.6                                                                    10:43:35 PM
ℹ Using Nitro server preset: static                                                            10:43:35 PM

[10:43:37 PM]  WARN  The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.

ℹ Building client...                                                                           10:43:38 PM
ℹ vite v5.2.8 building for production...                                                       10:43:38 PM
ℹ ✓ 105 modules transformed.                                                                   10:43:40 PM
Inspect report generated at /workspaces/workspace/.nuxt/analyze/.vite-inspect
ℹ .nuxt/dist/client/manifest.json                   2.00 kB │ gzip:  0.41 kB                   10:43:40 PM
ℹ .nuxt/dist/client/_nuxt/error-500.BOCRP2Ph.css    1.88 kB │ gzip:  0.72 kB                   10:43:40 PM
ℹ .nuxt/dist/client/_nuxt/error-404.EzKNKnTL.css    3.56 kB │ gzip:  1.10 kB                   10:43:40 PM
ℹ .nuxt/dist/client/_nuxt/vO-QPSK6.js               0.38 kB │ gzip:  0.26 kB                   10:43:40 PM
ℹ .nuxt/dist/client/_nuxt/BcOPaW8l.js               4.64 kB │ gzip:  1.52 kB                   10:43:40 PM
ℹ .nuxt/dist/client/_nuxt/qwW_GcV8.js               5.76 kB │ gzip:  1.77 kB                   10:43:40 PM
ℹ .nuxt/dist/client/_nuxt/maFnRuB5.js             119.31 kB │ gzip: 44.72 kB                   10:43:40 PM
ℹ ✓ built in 2.23s                                                                             10:43:40 PM
✔ Client built in 2252ms                                                                       10:43:40 PM
ℹ Building server...                                                                           10:43:40 PM
ℹ vite v5.2.8 building SSR bundle for production...                                            10:43:40 PM
ℹ ✓ 46 modules transformed.                                                                    10:43:41 PM
Inspect report generated at /workspaces/workspace/.nuxt/analyze/.vite-inspect
ℹ .nuxt/dist/server/_nuxt/error-404-styles.3znUd_qX.mjs        0.08 kB                         10:43:41 PM
ℹ .nuxt/dist/server/_nuxt/error-500-styles.C7yYj8ub.mjs        0.08 kB                         10:43:41 PM
ℹ .nuxt/dist/server/styles.mjs                                 0.91 kB                         10:43:41 PM
ℹ .nuxt/dist/server/_nuxt/index-BabADJUJ.js                    0.98 kB │ map:  5.86 kB         10:43:41 PM
ℹ .nuxt/dist/server/_nuxt/error-500-styles-1.mjs-QaOm1ZgB.js   2.10 kB │ map:  0.12 kB         10:43:41 PM
ℹ .nuxt/dist/server/_nuxt/error-404-styles-1.mjs-DmcWj1Wz.js   3.80 kB │ map:  0.12 kB         10:43:41 PM
ℹ .nuxt/dist/server/_nuxt/error-500-B7PMKwC-.js                3.93 kB │ map:  4.64 kB         10:43:41 PM
ℹ .nuxt/dist/server/_nuxt/error-404-D2C2luLj.js                5.72 kB │ map:  6.47 kB         10:43:41 PM
ℹ .nuxt/dist/server/server.mjs                                41.73 kB │ map: 83.91 kB         10:43:41 PM
ℹ ✓ built in 1.33s                                                                             10:43:41 PM
✔ Server built in 1339ms                                                                       10:43:41 PM
ℹ Initializing prerenderer                                                               nitro 10:43:41 PM
ℹ Prerendering 3 initial routes with crawler                                             nitro 10:43:42 PM
  ├─ /404.html (62ms)                                                                     nitro 10:43:42 PM
  ├─ / (64ms)                                                                             nitro 10:43:42 PM
  ├─ /200.html (61ms)                                                                     nitro 10:43:42 PM
  ├─ /_payload.json?e9ce2d59-eea3-46f6-8b7c-98422a0d9aa0 (5ms) (skipped)                  nitro 10:43:42 PM
  ├─ /_payload.json (2ms)                                                                 nitro 10:43:42 PM
  ├─ /mentions-legales (7ms)                                                              nitro 10:43:42 PM
  ├─ /mentions-legales/_payload.json?e9ce2d59-eea3-46f6-8b7c-98422a0d9aa0 (1ms) (skipped) nitro 10:43:42 PM
  ├─ /mentions-legales/_payload.json (1ms)                                                nitro 10:43:42 PM
ℹ Prerendered 6 routes in 1.029 seconds                                                  nitro 10:43:42 PM
✔ Generated public .output/public                                                        nitro 10:43:42 PM
✔ You can preview this build using npx serve .output/public                              nitro 10:43:42 PM
✔ You can now deploy .output/public to any static hosting!                                     10:43:42 PM

I also attempted with the following config, but couldn't get what you're seeing.
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  devtools: { enabled: true },
  nitro: {
    prerender: {
      crawlLinks: true,
    },
  },
});

Here is an example with the same error that I have on my project. The only difference is that I added the nuxtLink in pages and not in the app.vue https://codesandbox.io/p/sandbox/nuxt-26552-prerender-external-link-forked-wx72v9

Thanks.
It seems that this is expected behavior as the external prop's main function is to use RouterLink or not. They both render an <a /> though which looks the same to the prerenderer.
I'll let a maintainer weigh in though on what should be done here.

@danielroe ?

@danielroe I am facing same issue.

As explained above the crawler looks at all anchor tags with relative links to add them to the prerendering queue recursively.
Unless we start rendering a data-crawler-ignore attribute of sort on links rendered with the external prop I don't really see an easy way to skip those smartly, hence I believe using the prerender.ignore is the best workaround for that edge case for now.
You can also use this options to ignore a set of routes that are not part of the Nuxt application, for example prerender.ignore = ["/blog"] would ignore all routes under /blog


add preliminary API docs

documents relevant Authenticator, Spawner, User signatures for subclass authors.
I'd like to also try an autodoc plugin that catches configurable values.

Lots of good stuff in this PR. I'll give it a more thorough review later today :-)

Merging now, we can iterate in future PRs.

@minrk Sorry I should have pinged you earlier that the review was good. The API docs are a great addition and it looks good.
I think that we need to enable the Webservice for this repo for ReadTheDocs since the docs were not automatically triggered to rebuild after this merge. I did go into RTD and manually build so the latest docs are current. If you want to enable that would be great, I'm happy to do it but would need repo privileges to do so.

Thanks! I turned on the webhook, so hopefully it should be good. You should have permission to do that too, now.

@minrk Thanks. :sunny:  I found a few other little things related to sphinx/markdown and submitted a PR and opened another issue.


Compatibility with Mac M1 (Python 3.10)

Hi,
Any plans or tips on supporting the most recent version of Python (3.10)?
Mac M1 only supports natively Python 3.10, so using this library on it doesn't work.
Any tips or plans on that?
Thanks

@Paulo-Jorge-PM I've had some luck with the apns2-up fork, which installs the versions of the dependencies that are Python 3.10 compatible.

jonesncmega thanks for the feedback, we'll try it fingers crossed. Best regards


1086/partner cypress tests

Closes #issue

Description
Updates the cypress tests for partner's in detroit
How Can This Be Tested/Reviewed?
run a re-seed and run the cypress tests
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have reviewed the changes in a desktop view
[x] I have reviewed the changes in a mobile view
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[x] Any dependent changes have been merged and published in downstream modules
[x] I have assigned reviewers
[ ] I have run yarn generate:client and/or created a migration if I made backend changes that require them
[ ] I have exported any new pieces added to ui-components
[x] My commit message(s) is/are polished, and any breaking changes are indicated in the message and are well-described
[x] Commits made across packages purposefully have the same commit message/version change, else are separated into different commits

Reviewer Notes:
Steps to review a PR:

Read and understand the issue
Review the code itself from a style point of view
Pull the changes down locally and test that the acceptance criteria is met
Also review the acceptance criteria on the Netlify deploy preview (noting that these do not yet include any backend changes made in the PR)
Either explicitly ask a clarifying question, request changes, or approve the PR if there are small remaining changes but the PR is otherwise good to go

On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.

@YazeedLoonat Looks like the tests are still failing in CI, could we get them green pre-review?

@seanmalbert @emilyjablonski this is fully set up and working properly, lemme know what you think


Implement pan & zoom

• Add finger gestures
• Add infinite canvas

i need this function in my project. Please give me a hint to solve this.

You should implement the drawing view inside a container view and add gesture control to move/resize the drawing view inside the container view. Should work.

thanks for your help. Will you still support framework?

Definitely trying to, but at this point I think many have just taken the code and manage their independent forks.


Support overflow='linebreak' even when automatic linebreaks are not enabled.

A feature request from elsewhere. It would be nice to have "opt-in line breaking" this way.

It would also be good to support the other overflow values on the math element.