co-authors vs git commits

Hello,
The khmer software paper lists (nearly) all of our github contributors; this seems to erase the weighted impact measurement based upon commits & files modified?
http://depsy.org/package/python/khmer
I suggest that where there is both a co-authorship & VCS data that the VCS data is used to split up co-authorship.

:+1:

This is an interesting one. As many people have observed, authorship and credit are super complicated, and deeply embedded in the set of social and political structures that make academia. Making people think harder about how we do that is a big part of Depsy's goal.
The cool thing about software is that we've got these two sources of authorship data (commit logs and authorship lists), and as these two sources collide, they expose the (good and bad) assumptions each system brings with it.
The commit log is measurable, objective, granular. The author list is political, embedded, subjective.
Where we can, we're using the commit log because 1) it's a different and new approach that will spark conversation, we hope and 2) it allows the long-tail of committers to get more much-deserved credit, and 3) we're people who believe that lots of things benefit from objective measurement.
But where we've got authorship information, we're erring pretty hard toward trusting that over the commit log, simply because when it comes time for the reward system to, well, reward--the authorship lists are the ones that matter. The reward system is political and embedded and subjective in the same ways that the negotiated author list is, and the way the authorship list is created is not ignorant of this.
Placing a person with one commit in the authorship list means something. There's signal there. Maybe that was the most important commit. Maybe that person had the idea for the project. Maybe whatever. Point is, the authors say that person is important, and they are in a position to know better than us, so we believe them.

It's too bad there's not a system for people to define contributions in either a numerical or at least relative sense.  There's no way depsy can guess and win - and it shouldn't have to.  Maybe Depsy should say what it wants (a file in some format at the top level of the repo?) and see if developers can/will supply it.

@jasonpriem - you make a bunch of great points about the complexity involved in this decision.
My main concerns with just using authorship as is done for the Python packages are:

Most researchers have the idea that there is some minimum level of contribution that designates authorship. This is an inherent limitation of a binary designation of contribution. Recently, when @ctb's lab included all everyone with at least one commit as authors on a software paper there was some controversy about this decision (see the comments; plus lots of discussion on social media). No one denied that folks with small numbers of minor commits had made a contribution, they questioned whether it was enough to be made an author. Some folks raised a distinction between an author and a contributor. Commit logs allow a more continuous measure of contributorship and I think giving proportional credit to anyone who contributes is a good way for efforts like Depsy to encourage good open source citizenship.
Relying on authorship entirely in these grey areas will end up providing more credit to those who are more aggressive about asking to be added as authors. There will likely be a number of biases in who will be willing to ask for this credit. This is also my concern with @danielskatz's recommendation in that many folks (both contributors and maintainers) won't want to engage in discussions/debates over exactly how much credit each contributor should receive.
As implemented the current approach simply gives equal credit to all authors. This isn't right in most cases but given cultural differences among fields it is probably the only reasonable solution (since some fields sort author lines alphabetically, others by contribution, others by contribution but with last author being a major position of importance, etc.). Using information about relative contributions presumably provides some insight into relative contributions that is closer to reality than assuming equal contributions.
Some projects eschew listing out authors and list an organization as the author (e.g., see https://pypi.python.org/pypi/ipython). This is likely to be more common for bigger more important projects with more contributors and risks none of the credit for these efforts being counted.
My impression of the standing culture for Python code is to only list a single author since the metadata field isn't designed to include multiple authors. This is how we did things for https://pypi.python.org/pypi/retriever until I noticed that only the original lead developer was being picked up by Depsy.

I also have a concern about just using commit logs, which reflect @jasonpriem's point that sometimes people can make very important contributions to a project without generating a lot of commits. E.g., I know folks who do a lot of code review on projects and participate actively in design discussions, but this might not show up in commit logs. These folks will often be included as authors even if they only have a small number of commits (or even none).
So, all that being said, what about some sort of weighted combination of the two approaches when both authorship information and commit logs are available? I don't know exactly what the right answer is (and maybe there isn't one), but what about assigning 50% of the credit evenly across designated authors and 50% of the credit based on relative contributions from commit logs. This probably isn't perfect, but it seems to incorporate the benefits of both approaches and makes weaker assumptions about the intent of the developers in designating authors.

@danielskatz Yup, agreed...we're never going to know exactly given the low signal provided by the present system. I like the idea of a file people can use to specify exactly....it could leverage one of the many taxonomies or controlled vocabularies out there already for specifying effort. Many people have suggested it'd be awesome to have something like the credits at the end of a film...whether you're Best Boy or Director, you get appropriate credit for your contribution.
It's interesting to consider whether it's Depsy's role to encourage folks to include these kinds of files. So far, we've mostly looked at the project as a way of demonstrating how to leverage whatever data is already there. But your suggestion could be a next step...we'll be listening to hear if there are other calls for something like this, for sure.

@ethanwhite thanks for weighing in, there are some great points here that deserve a longer response...will get back in more detail in next few days...

@ethanwhite Academia (and general usage of the term for that matter) views authorship as a boolean, not a float. You don't have an amount of authorship on a book, or a painting, or a song, or a paper....you either are an author or you ain't. And so you get the social or economic rewards of the "author" role, or you don't. (Blaise Cronin has been doing fascinating work for years on how authorship/acknowledgement works in academia. Esp recently, he's done great stuff looking at changes in authorship, and comparisons with other domains like art)
Upshot is, I think we agree that this yay-or-nay conception of authorship is impoverished: it's exceedingly inviting to political manipulation and bias, it's vague, it's often unfair, and it's largely a legacy of print-based thinking.
But Depsy's approach is to say: we don't make the rules. The people with the money do. This accomplishment of inducing (by some combination of begging, cajoling, cheating, leveraging, working, or whatever) people to call you "Author": the money-distributors and prestige-distributors care about that accomplishment. In fact, in practice they generally care about it more than than they care about your actual intellectual contribution to a given product. Because it suggests you will be able to negotiate/earn the label called "Author" in the future as well, and that's the currency.
So, as long as this keeps being the case, I think it's responsible for depsy to keep caring about whatever thing it is that people do to be called "Author," regardless of how they made that happen.
But of course want to push academia further along, not just empower the current system. Hence the fractional accounting powered by commit records (which is of course not without its own inaccuracies), which it sounds like everyone in this thread likes just fine. Yay for that.
Sounds like maybe we just differ a bit on how prominent that approach should be in they app. And our thinking for now is that it's more powerful, in 2016, to honor the Author role with all its attendant meaning but alongside that start to demonstrate to decision makers and working researchers that there could be a more nuanced, more responsive way, a (somewhat) more objective way to look at authorship as well. Hopefully this gives us a better chance to be part of real conversations, while still making our point loud and clear.
More on your specific points:

Agreed, commit logs ftw. See above.
Agreed, this is a weakness of trad authorship accounting and it deserves fixing. We're hoping Depsy will move things in that direction (see above). Although I'd be remiss to not note that the flexibility of politically-mediated Authorship can be an asset as well...for example, non-programmers may be hugely influential in a project, and the ability to collectively assign Author credit can help them get fair recognition. But that said, I agree: we must have more objective, code-based measures as well. See above.
Agreed. We looked into gleaning signal from author list order but was just too discipline-specific. Solveable actually, but outside our scope for now. Lightly informing Author importance with commit records is a good idea, and we tried it out. It becomes hard to decide the weights (how much should "I'm on the Author list" contribute compared to "I made almost no commits" when it's a grad student? A PI who got the funding? A doughty pruner of and responder to bug reports?). So we just decided to keep it clean and simple for now, given that we can't adequately defend any given proportional admixture.
True. In these cases, the listed org-author shares some credit with all the committers. So the committers (who are real people, not just an org) still get credit, and the org gets no more credit that the most prolific committer. iPython is a good example...the "IPython Development Team" only gets 22% of credit, with the rest going to the actual committers.
Darn, this looks like a bug where we were not able to associate the PyPi project with its github repo...so we Depsy doesn't actually know anything about the github committer at all. Alas, we have several of these...when the github page is not explicitly listed on PyPi we have to make a guess by searching GitHub for the name/code for that project, and it's not very precise.

I like your idea of doing a bit of both worlds, I think we're on the same page there. We just think the best way to do that is to keep the Author credit totally separate from the commits-based credit system since there is a real impedance mismatch there. But I think it ends up being pretty similar in effect.
Thanks for the thoughts. These  are super interesting issues with no One Answer for sure, and you are pointing out a lot of great stuff. And may well be totally right :)

Darn, this looks like a bug where we were not able to associate the PyPi project with its github repo...so we Depsy doesn't actually know anything about the github committer at all. Alas, we have several of these...when the github page is not explicitly listed on PyPi we have to make a guess by searching GitHub for the name/code for that project, and it's not very precise.

Ah, a lot of my thinking as being influenced by looking our our project and khmer, which both suffer from this issue. Now that I'm looking at IPython I see that this is actually working in a way that I think is totally fine 😳. I.e., you've balanced how these two different sources of data contribute to "authorship credit". Sorry for the confusion.
In the last release we both added the GitHub link to the Home Page metadata field (hopefully that's the right one) and expanded the author list, so we should be all fixed the next time the index gets rebuilt.


Support for Azure's management APIs

Are there any plans on your roadmap to add support for the endpoints of Azure's management APIs?
This would apply to the existing endpoint constant already in ResourceManagerPublicEndpoint ApiEndpoint = "https://management.azure.com"
We're specifically looking for the ability to list all custom subscriber roles definition list with a {scope} and potentially additional management endpoints in the future.
~ Thank you

Hi @rnickmccandless, thanks for the question! At this time we are not planning any API support outside of MS Graph and the authentication endpoints. This might change in terms of data plane APIs specifically for Azure Active Directory or Microsoft 365 services, but the Service Management API is definitely out of scope as there are existing viable SDKs.
In the meantime I would encourage you to look at the Azure SDK for Go.


fix(core): use join on conditions for populateWhere

Closes #3871

Codecov Report
Base: 99.68% // Head: 99.66% // Decreases project coverage by -0.03% :warning:

Coverage data is based on head (ddb6694) compared to base (1a795e8).
Patch coverage: 87.50% of modified lines in pull request are covered.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##               v6    #4025      +/-   ##
==========================================
- Coverage   99.68%   99.66%   -0.03%
==========================================
  Files         216      216
  Lines       13846    13865      +19
  Branches     3163     3168       +5
==========================================
+ Hits        13803    13819      +16
- Misses         41       43       +2
- Partials        2        3       +1

Impacted Files
Coverage Δ

packages/core/src/typings.ts
100.00% <ø> (ø)

packages/knex/src/query/QueryBuilder.ts
99.50% <87.50%> (-0.50%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


Update xero_accounting.yaml

Added extra undocumented field to Payment schema

Looks good - will test and get merged. Was this from an SDK user?

@SerKnight

Looks good - will test and get merged. Was this from an SDK user?

No specific SDK, they just wanted clarity on what the field was, seeing as it wasn't on here I decided to add it.


What is the difference between the diferent mods of "3d music"

In the readme It's write that this library can support various format of "3d sound".
Spatial sound sources.
HRTF support for excellent positioning and binaural effects.

What are the differences between these two mods of "3d sound" ?
HRTF is related to the head, so how I can choose the best between the HRTF sphere models ?
What is a Spatial sound ? How it work ?
And what is the best ? For what ?

Spatial sound is an audio source which can be positioned in 3d space, sound from such source will be processed using various methods.
In case of spatial sound there are quite few steps:

Apply panning based on listener's position and orientation. This basically creates effect of sound that placed somewhere in space.
Apply distance gain - this step defines how quite sound will be with increasing distance between listener and source.
Simple spatial sound sources are cheapest, it can work on slow CPU's without any problems. However perception quality is bad in this case: you can't really tell if sound is behind you or in front of you, above or below.

To solve this issue there is a special math construct - Head-Related Transfer Function (HRTF). I won't dive deep into math here (if you interested you can check References section in readme), all you need to know that it uses precomputed "head models" to significantly improve perception of sound. It replaces first step of "panning" computation, in case of HRTF sound you can definitely tell from which side sound came from. However there is a pitfall - each HRTF is individual, because there are no two persons with exactly the same ears, so to get ideal results you have to chose HRTF that suits you most. HRTF is much more heavier computation-wise, it uses a lot complex math  (Fourier transform, convolution, etc).
What to choose and when? Use HRTF only if sound perception is crucial for you application, for example if you making horror game most likely that quality of sound will be on first place. If your application has lots of sounds on scene playing at the same time, it is better to use simple spatial sounds to reduce CPU load. To sum everything: use HRTF if you need high-quality sound.

Thanks for your explications
If I'm making a First Person RPG, with lot of sounds, the best is spatial sound. But if I'm making an FPS the best is probably HRTF ?
But, can I implement the two methods and let the user choose the best for him ?

Yes, you can switch renderers on context, check hrtf example: it does this
let hrtf = HrtfSphere::new("examples/data/IRC_1002_C.bin").unwrap();
context.lock()
        .unwrap()
        .set_renderer(Renderer::HrtfRenderer(HrtfRenderer::new(hrtf)));

and you can switch it to default at any time
context.lock()
        .unwrap()
        .set_renderer(Renderer::Default);

Actually this could be an option in settings of game like "Sound quality" or something similar.

Do I need to change a part of the code other than changing the render context ?
Maybe certain things isn't supported by one but supported by the other ?

Just change renderer, it defines how sound is processed but does not affects API.

Thank, can I'm closing the issue.
You've answered all my questions


Feature/citrix adc rewrite policy

Added citrix_adc_rewrite_action ansible module
Added first citrix_adc_rewrite_action ansible module integration tests
Removed state parameter in include:testbed.yaml statements as it seems to have been deprecated by ansible.
Added python CI workflow with pylint error checking of Citrix ADC and Citrix ADM modules
Added missing success_status in citrix_adc_nitro_request count()
Modified scrape.py and compile.py scriptsto match with new nitro api reference website layout
Updated requirements.test.txt to match current project name (renamed netscaler-ansible-modules to citrix-adc-ansible-modules)

I used the pip install nitrosdk-python to install the NITRO Python SDK which I can't find anymore on the Citrix website download area.
I had to import ansible.module_utils.network.netscaler.netscaler instead of the ansible.module_utils.network.citrix_adc.citrix_adc to make the module work and I have the following errors in pylint :
************* Module ansible-modules.citrix_adc_gslb_service
E:271, 0: No name 'citrix_adc' in module 'ansible.module_utils.network' (no-name-in-module)
E:271, 0: Unable to import 'ansible.module_utils.network.citrix_adc.citrix_adc' (import-error)
************* Module ansible-modules.citrix_adc_gslb_site
E:190, 0: No name 'citrix_adc' in module 'ansible.module_utils.network' (no-name-in-module)
E:190, 0: Unable to import 'ansible.module_utils.network.citrix_adc.citrix_adc' (import-error)
************* Module ansible-modules.citrix_adc_gslb_vserver
E:370, 0: No name 'citrix_adc' in module 'ansible.module_utils.network' (no-name-in-module)
E:370, 0: Unable to import 'ansible.module_utils.network.citrix_adc.citrix_adc' (import-error)
************* Module ansible-modules.citrix_adc_lb_monitor
E:807, 0: No name 'citrix_adc' in module 'ansible.module_utils.network' (no-name-in-module)
E:807, 0: Unable to import 'ansible.module_utils.network.citrix_adc.citrix_adc' (import-error)

Where can I download the NITRO Python SDK containing the ansible.module_utils.network.citrix_adc.citrix_adc resource ?

Missing ansible.module_utils.network.citrix_adc.citrix_adc issue has been resolved by using the last ìnstall.py` b2cf0a3d5b63c1eb1e4dc312d0d0c359f23186c5 patch.

Hi @giorgos-nikolopoulos , could you have a look on this PR and tell me if everything is ok or I need to make some changes ?

We are currently reviewing our contributors license agreement.
Once this is cleared up I will let you know.

After consulting with the legal department we were instructed not to accept PRs for the time being.
So this PR will not be accepted any time soon.

What is the legal issue with contributing to citrix open source products ? Is it a code property issue ? A product support issue ? A citrix ADC licensing issue ? (I don't want any property on the contributed code, I just want to share the features I need for a project to the whole Citrix ADC community)

What is the legal issue with contributing to citrix open source products ? Is it a code property issue ? A product support issue ? A citrix ADC licensing issue ? (I don't want any property on the contributed code, I just want to share the features I need for a project to the whole Citrix ADC community)

There is a larger review going on about all GitHub-related activities and we have been asked to not accept contributions until the review is completed. We will try and code up this feature on our own in the meantime.


not able to install pyrealsense2 on jetson agx orin

HI, i am using ubuntu 20.04 and i tried to install pyrealsense2 on jetson agx orin ,but i am getting error
ERROR: Could not find a version that satisfies the requirement pyrealsense2 (from versions: none)
ERROR: No matching distribution found for pyrealsense2

Hi @sidh1603  This error occurs if performing the installation instruction pip install pyrealsense2 on a computer with an Arm architecture, such as Nvidia Jetson.  The pyrealsense2 wrapper can only be installed with pip install on computers with x86 / x64 architecture, such as desktop and laptop PCs.  On Arm devices the wrapper must be built from source code.
Instructions for building librealsense and the wrapper together from source code on Jetson boards can be found at https://github.com/IntelRealSense/librealsense/issues/6964#issuecomment-707501049

hi,i have followed all the steps , but still no module pyrealsense2 , i am using python 3.8 , do i need to upgrade python??  or python3.8 does not support pyrealsense2??Sent from my iPhoneOn Apr 20, 2023, at 5:42 PM, MartyG-RealSense @.***> wrote:
Hi @sidh1603  This error occurs if performing the installation instruction pip install pyrealsense2 on a computer with an Arm architecture, such as Nvidia Jetson.  The pyrealsense2 wrapper can only be installed with pip install on computers with x86 / x64 architecture, such as desktop and laptop PCs.  On Arm devices the wrapper must be built from source code.
Instructions for building librealsense and the wrapper together from source code on Jetson boards can be found at #6964 (comment)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Hi @sidh1603  Do you require further assistance with this case, please?  Thanks!

Hey @sidh1603  I have the same issue.
If you solve the problem please let me know what are the steps to the solution.

Hi @sidh1603  Do you have an update about this case that you can provide, please?  Thanks!

Hi @sidh1603  Do you require further assistance with this case, please?  Thanks!
@ronbitonn  Were you able to solve your own Orin problem, please?  If you still require assistance then please create a new support ticket by visiting the link below to go to the front page of this support forum and clicking the green New Issue button.  Thanks!
https://github.com/IntelRealSense/librealsense/issues

@MartyG-RealSense
Hello, thanks for the guidelines at #6964.
For now, it's working great.
Have a nice weekend.

You are very welcome, @ronbitonn - I'm pleased to hear that you were successful.  :)

Hi @sidh1603  Do you require further assistance with this case, please?  Thanks!

Case closed due to no further comments received.


Reduce ACER's test cases and maximum timesteps

use_lstm=False was tested for t_max=1,2,5. This PR changes it to t_max=1,2 because I think it is sufficient. use_lstm=True=True is tested for t_max=5 as before.
Test cases where n_times_replay=0 and disable_online_update=True were tested twice. This PR skips one of them.
Maximum of timesteps is reduced to avoid consuming too much time on failed tests.

These are terminal outputs of running the ACER tests 10 times before and after the commit 689c83b.
acer_tests_after.txt
acer_tests_before.txt
Before the commit, it took 318-364 seconds. After the commit, it took 211-243 seconds.

imosci test this please


Implement FIPS commands for ROM and invoke SELF-TEST from Runtime.

FIPS in ROM

Enables VERSION, SELF_TEST, SHUTDOWN

This commit also enables Runtime to run FIPS Self Tests as follows : KATs, verification of firmware image in ICCM, and ROM integrity test.

Light refactor to decouple KAT crate from Rom dependency.

Light refactor to decouple Image verification crate from ROM dependency.

Ability for RT to defer execution of self test (basic job control).

Runtime copies image from ICCM to mailbox SRAM , so it needs to fake a send a transaction and hold the mailbox lock while the image is being validated,. It defers the actual self test execution until the mailbox lock can be acquired. SoC must "poll" for self test completion.

SoC must send a FIPS self test command one time to schedule the execution.

Caliptra holds the mailbox lock while the self test is in progress.

Failure of FIPS self test is handled as fatal error.

Upon successful self-test completion the mailbox lock is released and SoC will receive a positive acknowledgement when FIPS Self test Get Results command is re-issued.

nquarton left a comment

I don't have a better solution for the kats_env issue but maybe someone with more rust experience than me can think of something. Overall, it makes sense to me and the response handling looks good.

Yeah, having process_mailbox_commands() return the firmware-download transaction bound to the mailbox lifetime causes a lot of pain. What you've done with kat_env is probably as good as you can do without moving all the mailbox download logic inside process_mailbox_commands().


Audio Tracks Support

Tasks
Design and implement an interface to support retreiving and setting audio tracks across providers.
Notes
Properties

audioTracks: AudioTrack[]
currentAudioTrack: number
canSetAudioTrack: boolean

Methods

setCurrentAudioTrack(trackId: number): Promise<void>

Events

vds-audio-tracks-change
vds-current-audio-track-change
vds-audio-track-change-request

Important

There's no native interface for an AudioTrack, how can this be designed across providers?
How to know if the current provider supports setting audio tracks? The interface designed should account for this via the canSetAudioTrack property. Refer to the canRequestFullscreen property on the MediaContext for a similar implementation.

References

https://github.com/vime-js/vime/blob/master/core/src/components/core/player/PlayerProps.ts#L453-L463
https://github.com/vime-js/vime/blob/master/core/src/components/core/player/PlayerMethods.ts#L129-L137
https://github.com/vime-js/vime/blob/master/core/src/components/core/player/player.tsx#L658-L668
https://github.com/vime-js/vime/blob/master/core/src/components/providers/hls/hls.tsx#L255-L259

I think allowing adding audio tracks from aac or m4a files would be great. If there are, say, 5 audio tracks for a video file and only one is being played at a time, the other 4 tracks would be wasting bandwidth. If the audio tracks are separate then only one would be streamed at a time.


Remove discouraged usages of Constructor Injection

Usage of Project#getService requires IDEA version 193.5233.102 so the minimum version is set to 201.00

Codecov Report

Merging #856 into master will increase coverage by 0.01%.
The diff coverage is 77.27%.

@@             Coverage Diff              @@
##             master     #856      +/-   ##
============================================
+ Coverage     70.35%   70.36%   +0.01%
- Complexity     1826     1831       +5
============================================
  Files           203      203
  Lines          6281     6284       +3
  Branches       1272     1272
============================================
+ Hits           4419     4422       +3
  Misses         1257     1257
  Partials        605      605

Impacted Files
Coverage Δ
Complexity Δ

.../plugin/processor/handler/SuperBuilderHandler.java
89.51% <ø> (-0.05%)
39.00 <0.00> (ø)

.../intellij/plugin/settings/ProjectSettingsPage.java
0.00% <0.00%> (ø)
0.00 <0.00> (ø)

...ellij/plugin/processor/handler/BuilderHandler.java
86.87% <75.00%> (ø)
113.00 <2.00> (+2.00)

...ellij/plugin/provider/LombokProcessorProvider.java
74.28% <80.00%> (+0.75%)
21.00 <2.00> (+1.00)

.../intellij/plugin/lombokconfig/ConfigDiscovery.java
81.70% <100.00%> (+0.22%)
27.00 <1.00> (+1.00)

.../processor/method/BuilderClassMethodProcessor.java
87.50% <100.00%> (-1.39%)
4.00 <1.00> (ø)

...lugin/processor/method/BuilderMethodProcessor.java
93.33% <100.00%> (ø)
5.00 <0.00> (ø)

...ugin/processor/method/DelegateMethodProcessor.java
88.23% <100.00%> (+1.56%)
7.00 <1.00> (+1.00)

Continue to review full report at Codecov.

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

Not sure what the status on this PR is, but there are still a lot of exceptions when trying to use this with 2020.2.
stacktrace.txt
induced.txt

Yeah, I tried to figure out how to fix the psi issues but got nowhere - I did some debug where I forced lombok psi to always be valid but this then caused the index to desync which sounds dangerous!
These changes are just some maintenance tasks I did to get familiar with the code base - functionally the do nothing except remove some platform warnings.

Thank you for your improvement, I'm in vacation and will look on it as soon as I'l be back.

Thank you @GingerGeek , just merged this pr.


Cannot search some tofu modules

Thank you for reporting an issue.
Cannot search modules that are part of the registry, but don't appear in https://search.opentofu.org/
For example: https://github.com/terraform-aws-modules/terraform-aws-eks
If I do tofu init it fetches the module, but I cannot search it on the website.
OpenTofu Version
$ tofu version                                                                                10:59:52
OpenTofu v1.8.2
on darwin_arm64
+ provider registry.opentofu.org/hashicorp/aws v5.74.0
+ provider registry.opentofu.org/hashicorp/cloudinit v2.3.5
+ provider registry.opentofu.org/hashicorp/null v3.2.3
+ provider registry.opentofu.org/hashicorp/time v0.12.1
+ provider registry.opentofu.org/hashicorp/tls v4.0.6

OpenTofu Configuration Files
// Snippet of HCL that can be used to help reproduce this problem

Hi, the registry UI is still in technical preview and is currently being populated.  Please take a look again once the banner of  "beta preview" has been removed.

This technology preview contains documentation for a select few providers, namespaces, and modules in the OpenTofu registry.


No License

Hello, I was interested in working on this project, but noticed there wasn't a license on it.

Yeah, i'm sorry, someone already made the remark a while ago and i forgot to put it there... So here it is,
i just put an apache 2. Note that some parts of the work appear to be protected by patents at least in the US so you should do whatever needs to be done to comply to the US patents law before using the code in the US.

Thanks for putting the license on it.  It would be awesome if you would consider a GPL license.
Do you have any reference to the patent?  I couldn't find a reference to it.

Why would you argue for GPL? I usually put my work in GPL but this repo is quite small and i tought that other libs already did the same thing with permissive licenses (but after looking up it seems most have no license...), Do you know how GPL plays with patents (and how patents work at all)? (for reference, the patents are here, the license for the SDK can be seen there and a noticeable thing they disallow is to build an IAM system with it)...


Add an InvokeIf method to FluentExtensions

Reference version
1.0.93-preview
Background and motivation
We have encountered a number of situations where we want to call FluentExtensions.Invoke only if a certain condition is satisfied.
Currently, this can be achieved either by adding an if or a ternary operator inside the lambda passed to Invoke (ugly!), or via the combined use of FluentExtensions.If and FluentExtensions.Invoke (a bit leaner, but far from optimal).
Proposed enhancement
Ideally we need an extension method with the following signature:
public static T InvokeIf<T>(this T @this, bool condition, Action<T> action);

Furthermore, additional parameters may need to be passed to action:
public static T InvokeIf<T, TArg>(this T @this, bool condition, TArg arg, Action<T, TArg> action);
public static T InvokeIf<T, TArg1, TArg2>(this T @this, bool condition, TArg1 arg1, TArg2 arg2, Action<T, TArg1, TArg2> action);
// ... and so on (currently a maximum of 3 additional parameters is used in existing code)

Implementation proposals
Implementation should be pretty straightforward, especially after (or even during) the implementation of #51.
Usage examples
new StringBuilder()
    .Append("Your account has been ")
    .InvokeIf(amount < 0, amount, (x, n) => x.Append("charged ").AppendFormat(CultureInfo.CurrentCulture, "C", Math.Abs(n))
    .InvokeIf(amount > 0, amount, (x, n) => x.Append("credited ").AppendFormat(CultureInfo.CurrentCulture, "C", n)
    .InvokeIf(amount == 0, x => x.Append("left untouched"));

Risks
No risks that I am aware of.
Additional information
No response

@ric15ni this can be closed in the same PR as #51.

This could be closed in the same PR as #51.


ERROR: YouTube said: The uploader has not made this video available in your country.

Hi,
I can't get this to download some youtube videos. I receive the error:
ERROR: YouTube said: The uploader has not made this video available in your country.
examples:
http://www.youtube.com/watch?v=BrbxWOMpwfs
http://www.youtube.com/watch?v=LrUvu1mlWco

[root@vps scripts]# python2.7 ./youtube-dl http://www.youtube.com/watch?v=LrUvu1mlWco --max-quality 22 -x --audio-format m4a -o '/var/www/html/storage/%(id)s.%(ext)s' -v
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['http://www.youtube.com/watch?v=LrUvu1mlWco', '--max-quality', '22', '-x', '--audio-format', 'm4a', '-o', '/var/www/html/storage/%(id)s.%(ext)s', '-v']
[debug] youtube-dl version 2013.07.19
[debug] Python version 2.7.3 - Linux-2.6.18-348.el5xen-x86_64-with-redhat-5.9-Final
[debug] Proxy map: {}
[youtube] Setting language
[youtube] LrUvu1mlWco: Downloading video webpage
[youtube] LrUvu1mlWco: Downloading video info webpage
ERROR: YouTube said: The uploader has not made this video available in your country.
Traceback (most recent call last):
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 312, in extract_info
ie_result = ie.extract(url)
File "./youtube-dl/youtube_dl/extractor/common.py", line 96, in extract
return self._real_extract(url)
File "./youtube-dl/youtube_dl/extractor/youtube.py", line 462, in _real_extract
raise ExtractorError(u'YouTube said: %s' % video_info['reason'][0], expected=True)
ExtractorError: YouTube said: The uploader has not made this video available in your country.

I have similar issue i have some solution for this YouTube said: This video is available in India only.
simple youtube-dl command
youtube-dl  -F  https://www.youtube.com/watch?v=P4z_NkQDLRI
Solution
use proxy server from india
http_proxy="<IP_ADDRESS>:3128" youtube-dl -F https://www.youtube.com/watch?v=P4z_NkQDLRI
List of india proxy server with speed
http://spys.ru/free-proxy-list/IN/

join our channel
https://t.me/url_uploder_yv


Authentication support with AWS ECR

Hi, we're using Amazon's ECR as a docker repository.  As opposed to the usual username/password approach, it depends on issuing a 'docker login' that is generated from an AWS client command.  And the login is valid for a certain period of time.  such that 'docker push/pull/etc' commands are valid until the login expires.  The plugin appears to expect traditional login/passwords for private repos so it doesn't work right now.

+1

+1

We don't use AWS ECR ourselves but we would be more than happy to review and merge any PRs adding this functionality. With that said though, it would seem challenging to support this from within Maven, at least if you expect the build to be non-interactive.

+1

+1

i've been sending a pull request for supporting the usage of ~/.docker/config.json files. with that, it is now possible to push images to AWS ECR if you logged in with the specific command right before (this can also be done in jenkins, if you execute your login command as pre-build step)
hopefully they merge the changes into their branch... for me it's perfectly working now!

I was very happy to see this pull request get added to the release. However I seem to be having problems getting a publication to work.
I have the following configuration in my module:
           <plugin>                 <groupId>com.spotify</groupId>                 <artifactId>docker-maven-plugin</artifactId>                 <version>0.4.6</version>                 <configuration>                     <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>                     <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>                     <useConfigFile>true</useConfigFile>                     <resources>                         <resource>                             <targetPath>/</targetPath>                             <directory>${project.build.directory}</directory>                             <include>${project.build.finalName}.jar</include>                         </resource>                     </resources>                 </configuration>                 <executions>                     <execution>                         <phase>package</phase>                         <goals>                             <goal>build</goal>                         </goals>                     </execution>                     <execution>                         <id>tag-image</id>                         <phase>package</phase>                         <goals>                             <goal>tag</goal>                         </goals>                         <configuration>                             <forceTags>true</forceTags>                             <image>${docker.image.prefix}/${project.artifactId}:${project.version}</image>                             <newName>${docker.registry.host}/${docker.image.prefix}/${project.artifactId}:${project.version}</newName>                         </configuration>                     </execution>                     <execution>                         <id>push-image</id>                         <phase>deploy</phase>                         <goals>                             <goal>push</goal>                         </goals>                         <configuration>                             <useConfigFile>true</useConfigFile>                             <forceTags>true</forceTags>                             <imageName>${docker.registry.host}/${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>                         </configuration>                     </execution>                 </executions>             </plugin>
After executing an AWS docker login and a  'mvn clean deploy -X' I see 5 retries and the following error:
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.4.6:push (push-image) on project discovery: Exception caught: push or pull <myaccount>.dkr.ecr.us-east-1.amazonaws.com/<myrepo>/<myimage> is already in progress -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.spotify:docker-maven-plugin:0.4.6:push (push-image) on project discovery: Exception caught 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216) 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355) 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155) 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216) 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:160) 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 	at java.lang.reflect.Method.invoke(Method.java:498) 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) Caused by: org.apache.maven.plugin.MojoExecutionException: Exception caught 	at com.spotify.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:126) 	at com.spotify.docker.PushMojo.execute(PushMojo.java:38) 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132) 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208) 	... 19 more Caused by: com.spotify.docker.client.exceptions.DockerException: push or pull <myaccount>.dkr.ecr.us-east-1.amazonaws.com/<myrepo>/<myimage> is already in progress 	at com.spotify.docker.client.AnsiProgressHandler.progress(AnsiProgressHandler.java:52) 	at com.spotify.docker.Utils$DigestExtractingProgressHandler.progress(Utils.java:149) 	at com.spotify.docker.client.ProgressStream.tail(ProgressStream.java:77) 	at com.spotify.docker.client.DefaultDockerClient.push(DefaultDockerClient.java:1015) 	at com.spotify.docker.Utils.pushImage(Utils.java:83) 	at com.spotify.docker.PushMojo.execute(PushMojo.java:47) 	at com.spotify.docker.AbstractDockerMojo.execute(AbstractDockerMojo.java:124) 	... 22 more [ERROR]
Any ideas on what is causing this? A 'docker push' from the command line works fine in this case, even if executing right after the failed maven command.

As the exception says, it seems as two push processes run in parallel. Have you already evaluated that?

By the way: which version are you using? As far as I know, the changes will be available in 0.4.8

0.4.6. It didn't complain about the configuration, and the docs were updated, so I was under the impression that that was the correct version. When is 0.4.8 due?
The docker push already running may be due to an earlier cancelled docker push. It appears to be a docker mac thing. I'm pursuing that avenue as well.

I think the plugin ignores config tags, that it does not know...
Maybe @mattnworb can tell something about release plans.

@mattnworb , any timeframe for the release that includes publishing to AWS ECR?

0.4.9 has been released with the patch in #224.

+1


add detector for SvelteKit

- Summary
Neither the svelte nor sapper detector fit to SvelteKit as discussed here https://github.com/sveltejs/kit/issues/1568 and its PR. That's why I added a new detector.
Unfortunately a small but -- in my opinion -- reasonable workaround is needed to make Netlify Dev useful together with SvelteKit: enforcing a prod build beforehand. But it looks like e.g. the angular detector is doing something similar (for similar reasons?!)
- Test plan
I've run and tested it locally. Both the detection itself and the enforcement of a SvelteKit production build is working fine.
- A picture of a cute animal (not mandatory but encouraged)
🐶 🐕

@kvn-shn it looks like one of the checks on this PR is failing because you need to prefix the PR title with something like fix: or feat:

Thanks for the hint. I just adjusted the commit but forgot to edit the PR too. (Wasn't clear to me what to do solely based on the cryptic "Missing required PR label of type:*" message so I thought someone else has to add a label... ;) )


Gravity (kubelet service) won't recover from failed node

Description
What happened: During longevity testing, one of the nodes in our cluster had a memory pressure and needed to be restarted.
After the node came up again,  it couldn't connect the cluster and was stuck in NotReady/degraded state.
What you expected to happen: node should become Ready after restart
How to reproduce it (as minimally and precisely as possible):
Environment

Gravity version : 7.0.15 (client) / 7.0.15 (server)
OS : Ubuntu 18.04
Platform : On-Prem

Relevant Debug Logs If Applicable
Kubelet logs:
The main log which point the issue is from the node's kubelet:
Mar 25 15:34:08 server15 kubelet[2208]: E0325 15:34:08.586086    2208 kubelet_node_status.go:402] Error updating node status, will retry: error getting node "<IP_ADDRESS>": Get https://leader.telekube.local:6443/api/v1/nodes/<IP_ADDRESS>?timeout=10s: write tcp <IP_ADDRESS>:55104-><IP_ADDRESS>:6443: use of closed network connection
Gravity status output:
Cluster name:		cluster.local
Cluster status:		degraded (one or more of cluster nodes are not healthy)
Cluster image:		gravity-base-k8s, version 7.0.15-11
Gravity version:	7.0.15 (client) / 7.0.15 (server)
Join token:		f755def2ea04deb1d5186f265a3e221d
Last completed operation:
Join node server14 (<IP_ADDRESS>) as node
ID:		eea526da-93e1-4435-ae38-7ffbc8473221
Started:		Mon Mar  1 09:10 UTC (3 weeks ago)
Completed:	Mon Mar  1 09:13 UTC (3 weeks ago)
Cluster endpoints:
Authentication gateway:
<IP_ADDRESS>:32009
<IP_ADDRESS>:32009
Cluster management URL:
https://<IP_ADDRESS>:32009
https://<IP_ADDRESS>:32009
Cluster nodes:
Masters:
rac2-kvm22 / <IP_ADDRESS> / master
Status:		healthy
Remote access:	online
master02 / <IP_ADDRESS> / master
Status:		healthy
Remote access:	online
Nodes:
master03 / <IP_ADDRESS> / node
Status:		healthy
Remote access:	online
server01 / <IP_ADDRESS> / node
Status:		degraded
[×]			versions (checker does not comply with specified context, potential goroutine leak)
[×]			docker (checker does not comply with specified context, potential goroutine leak)
[×]			system-pods-checker (checker does not comply with specified context, potential goroutine leak)
[×]			kubelet (checker does not comply with specified context, potential goroutine leak)
[×]			node-status (checker does not comply with specified context, potential goroutine leak)
[×]			systemd (checker does not comply with specified context, potential goroutine leak)
[×]			nethealth-checker (checker does not comply with specified context, potential goroutine leak)
Remote access:	online
user / <IP_ADDRESS> / node
Status:		offline
Remote access:	online
server05 / <IP_ADDRESS> / node
Status:		degraded
[×]			MemoryPressure/NodeStatusUnknown (Kubelet stopped posting node status.)
[×]			DiskPressure/NodeStatusUnknown (Kubelet stopped posting node status.)
[×]			PIDPressure/NodeStatusUnknown (Kubelet stopped posting node status.)
[×]			Ready/NodeStatusUnknown (Kubelet stopped posting node status.)
Remote access:	online
server5 / <IP_ADDRESS> / node
Status:		healthy
Remote access:	online
server14 / <IP_ADDRESS> / node
Status:		healthy
Remote access:	online
[ERROR]: degraded
restarting kubelet fixed the issue
Attaching kubelet logs, i've also got the gravityreport.tar.gz (800MB) - please let me know if needed
Important to mention - telnet from gravity shell where kubelet failed to the other master <IP_ADDRESS>:55104-><IP_ADDRESS>:6443 worked properly while getting this error.
Some server names and IPs have being white labeled for security reasons.
master: <IP_ADDRESS>
node: 10.1.1
kubelet.log
.80

I'd check if it's an apiserver answering on 6443 from that node. Also check whether it's not some unexpected latency?


Replace click with argparse

In an effort to make it easier to import the application as a library, the argument parsing should be replaced with the built-in argparser library to allow external code to call the various commands directly instead of forcing them to mock the click inputs.
Closes #7
Signed-Off-By: Robert Clark<EMAIL_ADDRESS>

Putting this here for now as it is on the roadmap for 1.1.0, but will wait to merge until #9 is complete and version 1.0.2 is released.

With 1.0.2 being released, this is now ready to be reviewed and merged once approved.


Add Beginner-Friendly Interactive Challenges to Improve Learning Engagement

Adding interactive challenges will enhance the learning experience for beginner and intermediate users. This feature will introduce structured exercises within the repository to reinforce core machine learning and data science concepts. Each challenge will provide immediate feedback, helping users learn from their mistakes and build confidence.
@Niketkumardheeryan

Go for it


Instructions for installation on OSX not complete

I had to install following brew packages to initialize the data folder:
brew install json-c
brew install freexl
brew install geos
brew install libgeotiff

maybe this can be included in the readme or docs...

Done: http://docs.pipelinedb.com/installation.html#os-x

awesome! :+1:


Add Render as easy

Render.com is CDN network to deploy static sites automatically from Git repositories.
I cannot provide url for deletion, because url is not the same for every user (but the interface is).

Thanks for your contribution!


AMR on iOS

Is there a way to support AMR format on iOS?

Yes, would you be up for submitting a PR to add the new codecs listed here that aren't already supported?
https://developer.apple.com/reference/coreaudio/1572096-audio_data_format_identifiers

To be honest, I haven't touched Objective-C in a while, but I will have to :))
I'll fork and try to make something of it, and report back. Since my app deadline is in about a month from now, and I still have to finish the android version, I can start working on it in 10 days or so.

Ok, I'll probably do another small release sooner and can add it for you.

I just saw the notification... You sir are a hero we need, not a one we deserve ;)


Group configurations by a single Yaml file

Many applications require multiple configurations to be created, such as an HttpServer and a PipelineFilter. Management of multiple configurations are grouped together in the same file (separated by --- in YAML) will bring huge simplicity to users.
like Kubernetes [1]
[1] https://kubernetes.io/docs/concepts/cluster-administration/manage-deployment/

I agree this feature can bring huge simplicity for Easegress CLI users. Since we are dealing with manage API framework replacement, I will implement this feature as soon as the replacement completed.


Helper text position should be moved to the bottom of the components

Detailed description

Describe in detail the issue you're having.

Helper Text should be moved under the input components

Is this issue related to a specific component?

Input
Select
Drop down
Combo box
.... All form input components that supports helper text

What did you expect to happen? What happened instead? What would you like to see changed?

Helper Text should be under the form Input components.

What version of the Carbon Design System are you using?

Carbon Angular - 4.19.1
Carbon Components - 10.21.0

Additional information
https://carbondesignsystem.com/components/form/usage
If invalid text is binded (input) the helper text is replaced with the invalid text.

Issue has been fixed and issue can be closed.
Angular storybook dependencies do need to be updated as it still shows the helperText right under the label instead of under the input.

I think the storybook is updated now https://angular.carbondesignsystem.com/?path=/story/components-combobox--basic, I'm gonna close this but feel free to reopen it if I'm missing something.

I think the storybook is updated now https://angular.carbondesignsystem.com/?path=/story/components-combobox--basic, I'm gonna close this but feel free to reopen it if I'm missing something.

Select component still shows the helperText right under the label instead of under the input with your current storybook.

You can try at: https://angular.carbondesignsystem.com/?path=/story/components-select--basic
Locally I have tried with v10.50.0 of carbon components, and "carbon-components-angular" with v4.55.4


Question - Are the Microsoft.Bcl libraries now required?

Hi Stephen, first, thank you for your library, I love it.
I have a question regarding the 4.0.1 release. I just pulled it and noticed that it pulled in the Microsoft.Bcl libraries and build targets. I was under the assumption those were only required older versions of the .NET platform? I do not see any dependencies between your libraries and Microsoft.Bcl. My project is set to build against the .NET 4.6.2 framework.
Questions:

Do I need Microsoft.Bcl.Build.targets?
Are the AsyncEx libraries in anyway dependent on the Microsoft.Bcl and Microsoft.Bcl.Async libraries when running under .NET 4.6.2?

Thank you in advance,
Jonathan

Yes, unfortunately, due to the way the PCLs form the core of this project, they are required. See #13.
v5 will target netstandard and not require Microsoft.Bcl any more.

Thank you for the info Stephen. I will probably wait until v5 before upgrading.

This is somewhat of a show-stopper. There doesn't seem to be a good release of AsyncEx for classic .NET that wouldn't bring extra baggage.

@kyberias Unfortunately, the problem as specified in #13 is outside my control. Classic .NET support requires Microsoft.Bcl for a PCL-based approach; there's simply no getting around that. The netstandard-based v5 does not have that dependency.
You can use the prerelease v5 today; I want to fix #107 before calling it fully production-ready, but a lot of people are already using it in production (#107 only shows up if you mix blocking and asynchronous calls and exhaust your thread pool).

I tried the pre-release v5 but it seems to bring a lot of additional (.NET Standard?) references to my assembly. I'm not sure I want that.

I Have also a problem with the Microsoft.Bcl.Build package. We use Package reference insteed of package.config in full framework 4.7.1 solution. My workaround is actually to ignore the target as follow:
    <PackageReference Include="Microsoft.Bcl.Build">
      <Version>1.0.21</Version>
      <ExcludeAssets>build</ExcludeAssets>
    </PackageReference>
    <PackageReference Include="Nito.AsyncEx">
      <Version>4.0.1</Version>
    </PackageReference>

I Hope this will not has a impact! can you confirm that @StephenCleary

@bqstony That's an interesting approach! I'm not sure what all impact that would have. I expect it would work fine with modern tooling, but I'm not familiar enough with the .targets files to know for sure.

After some days i see actual no bad behavior for my solution. But i will look forward to V5...

Is there any update to this? Are the libraries still required?

@rolandh v5 targets netstandard and does not require Microsoft.Bcl.Async anymore.


Partial mock is not working with $this

Hi,
I am having problem with partial mock and use of $this inside of it.
I will put some code sample to be clearer.
In my test I have something like below:
$serviceMock = Mockery::mock('Service');
$serviceMock->shouldReceive('spam')->andReturn('eggs');

$foobar = Mockery::mock(new Foobar($foo));
$foobar->shouldReceive('getService')
    ->andReturn($serviceMock);

$foobar->useService();

In my real code I have something like this:
class Foobar {
    public function __construct($foo) {
        $this->foo = $foo;
    }

    public function useService() {
        $bacon = $this->foo->bacon();

        $service = $this->getService();
        $eggs = $service->spam();

        return $bacon + $eggs;
    }

    public function getService() {
        return new RealService(); // hits network and I don't want to hit it
    }
}

I was migrating a PHPUnit test to Mockery and I had this problem, I believe one way to do it is using Injection, something like setService($service), but right now I have a huge code base that works with PHPUnit. Is this a bug of Mockery or something expected to happen?
Thanks for your help!

I think I'm having a related issue.  I'm attempting to create a partial mock, and am having trouble with Mockery knowing about methods in the object being 'mocked' (I have that in quotes because in this case it's working with an actual concrete instance of the class).  When the object is created, the constructor is called (as you would expect) but any methods called in the constructor do "not exist on this mock object".  This is the error:
BadMethodCallException: Method ::SetRGBArray() does not exist on this mock object

Does anyone have any suggestions or advice?

With a slightly different code, this works as it should, see https://github.com/robertbasic/mockery/commit/c34710ca1475953ba96416f310e771f9f67861bd
The only difference I did was to mock the object like m::mock('Foobar[baz]') instead of doing m::mock(new Foobar);

Looks like I'm running into this one as well!
$request->setModuleName('foo')
    ->setControllerName('bar');

$mock->shouldReceive('setControllerName')
    ->with('bar')
    ->once();

fails. Will dig into it once again.

Of course an easy workaround is:
$mock->shouldReceive('setModuleName')
    ->andReturn($mock)
    ->shouldReceive('setControllerName')
    // and so on...

Cheers for that, @robertbasic

It works when using the string form, for me this issue is closed. :D

@cabello care to explain how are you using it?

Like you have said: "The only difference I did was to mock the object like m::mock('Foobar[baz]') instead of doing m::mock(new Foobar);"
So instead of letting mockery work on a real object instance, we use the string form 'Foobar[method]' and mockery builds the instance for us with selected methods mocked, that works pretty fine on our project.

VERY SIMPLE CODE:
getData();
    }

    public function getData(){
        return 'Not mocked';
    }

}

PHPUnit Test using string to create the partial mock:

    public function testPartialMockOfObjectWithThis() {
        $utils = \Mockery::mock('TestingUtils[]');
        $utils->shouldReceive('getData')->andReturn('Mocked');
        $this->assertEquals('Mocked', $utils->callGetDataWithThis());
    }

This really needs to be reopened or fixed.  Do I need to upgrade or something?

@jnankin use \Mockery::mock('TestingUtils[getData]'); instead and it'll pass.
I agree that it should be fixed if possible. I have put a lot of hours into trying to find a fix, but failed. Until @padraic can come up with a proper fix, we're left to use these workarounds :)
HTH!

Oh, I see.  I was thinking the [] was some sort of syntax for calling the constructor. not passing in methods to mock.
My bad.

Yup. The [foo,bar] syntax tells mockery to mock only those methods, the others are left untouched. It's explained in more detail in the readme file + have a look at the unit tests :)


Encrypted store for users that passed auth

Hello, I have a use case when I need to create 2 stores. One for regular data and the other for sensitive. The question is that I'm not sure how to correctly initialize them, as in the code for the second one I need to provide an encryption key, right?
But what if I want to encrypt that with a user password/secret key and etc?
I see that there is storage.recrypt(secret) function, but should it be like this, then?
I found some clues in your PR description https://github.com/mrousavy/react-native-mmkv/pull/314
const storage = new MMKV({ id: 'my.test.storage' })

storage.encrypt('my-private-key') // <-- encrypt with key 'my-private-key'
storage.set('test', 'works!')

storage.encrypt(undefined) // <-- remove encryption
storage.set('test', 'still works!')

Does it mean I should use stores like this?
// store.ts
const regularStore = new MMKV({
    id: "regular",
});

const encryptedStore = new MMKV({
    id: "encrypted",
    // no encryption key on start
});

//auth.tsx
const handleSignUp = (email, password) => {
  ...
  encryptedStore.recrypt(password) // then encrypt on sign up?
}

const handleSignIn = (email, password) => {
  ...
  encryptedStore.recrypt(undefined) // then what to do on next app open and sign in?
}

How to use that encrypted store after Signing in next time?
Is that correct that I will need to decrypt the store like this encryptedStore.recrypt(undefined), however it doesn't look correct to leave the store decrypted

Let's say a user is doing sign in
He enters the correct password
But the store was previously encrypted with a password on signup
How to get access to the encrypted store only after the user signin?
const handleSignIn = (email, password) => {
  ...
  encryptedStore.recrypt(password) //???
}

that does look like resetting the encryption key, not "unlocking" with a password?
So I'm trying to understand how this encryption flow should look like with MMKV
When I encrypted the store with a specific user-provided password on signup, how do I access it again on the next login, as I won't know the encryption password until the user enters it?
Please tell me if that all makes sense to you? @mrousavy

So far I can see such behavior:
//-------------
//FIRST APP OPEN
//store.ts
const encryptedStore = new MMKV({
    id: "@encrypted",
});
export { encryptedStore };  // returns a new empty storage

//USER SIGN UP
//signup.ts
encryptedStore.recrypt(password);

//USER USE THE APP
//set_secret.ts
encrypted.set('sercret', 'xyz123');

//-----
//NEXT TIME OPEN
//init.ts
const encryptedStore = new MMKV({
    id: "@encrypted",
    //I guess here suppose to be secret now, but where do I get it
});
export { encryptedStore }; // returns a new empty storage

//USER SIGN IN
//signin.ts
encryptedStore.recrypt(password);

//USER USE THE APP
//get_secret.ts
encrypted.getString('sercret'); // empty
//-------------

But how to use first storage with data inside instead of getting new storage each time
It works as expected only if I hardcode the encryptionKey, but that is depending on user input

I would not initialize the MMKV instance until you have the password, then load it with the PW as encryption key.
let mmkv: MMKV | undefined

function onLogin(user: User) {
  mmkv = new MMKV({
    id: 'encrypted',
    encryptionKey: user.password
  })
}

I would not initialize the MMKV instance until you have the password, then load it with the PW as encryption key.
let mmkv: MMKV | undefined

function onLogin(user: User) {
  mmkv = new MMKV({
    id: 'encrypted',
    encryptionKey: user.password
  })
}

wow, didn't think that way
thanks for the help!


Doesn't support jhipster 7.1.0 to 7.7.0

The current version of jhipster is 7.1.0 Using that produces this error:

jhipster --blueprints primeng-blueprint
INFO! Using JHipster version installed globally
INFO! No custom sharedOptions found within blueprint: generator-jhipster-primeng-blueprint at npm/node_modules/generator-jhipster-primeng-blueprint
INFO! No custom commands found within blueprint: generator-jhipster-primeng-blueprint at npm/node_modules/generator-jhipster-primeng-blueprint

Welcome to JHipster v7.1.0
ERROR! The installed generator-jhipster-primeng-blueprint blueprint targets JHipster v7.0.1 and is not compatible with this JHipster version. Either update the blueprint or JHipster. You can also disable this check using --skip-checks at your own risk
Error: The installed generator-jhipster-primeng-blueprint blueprint targets JHipster v7.0.1 and is not compatible with this JHipster version. Either update the blueprint or JHipster. You can also disable this check using --skip-checks at your own risk
at JHipsterAppGenerator.error (npm\node_modules\generator-jhipster\generators\generator-base.js:1788:11)
at JHipsterAppGenerator._checkJHipsterBlueprintVersion (npm\node_modules\generator-jhipster\generators\generator-base-blueprint.js:424:14)
at npm\node_modules\generator-jhipster\generators\app\index.js:314:18
at Array.forEach ()
at JHipsterAppGenerator.validateBlueprint (npm\node_modules\generator-jhipster\generators\app\index.js:313:42)
at Object. (npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:1024:25)
at npm\node_modules\generator-jhipster\node_modules\run-async\index.js:49:25
at new Promise ()
at npm\node_modules\generator-jhipster\node_modules\run-async\index.js:26:19
at runLoop.add.once.once (npm\node_modules\generator-jhipster\node_modules\yeoman-generator\lib\index.js:1025:11)

Things to copy from the main generator:

New types: with Pick Omit...
test-samples
FormService
Things to fix:
Use AftervIewInit to work on navigation
Remove the not required Date fields from updateForm

This should be released in few days.

upgraded to support latest jhipster, specifically version: https://github.com/jhipster/generator-jhipster/pull/19849

This still has an issue
https://github.com/tailosoft/jhipster-primeng-blueprint/issues/58


Add Event "Wrong code"

Checklist

[x] I checked for similar existing requests (both open and closed) before posting.
[x] My request is generic, other users may benefit from it too.

Proposal
Add the event "Wrong Code" to Alarmo.
This is already in the log, so the event must fire somewhere.
This would be beneficial to know if someone is attempting to disarm the alarm whilst its pending or triggered and making failed attempts.
Had a few instances where the wrong code has been used (ie in an automation) resulting in alarm not disarming and then being triggered. Obviously goes un-noticed as no alert can currently be sent on this failure.
Additional info
Much the same as the other events, allowing a notification can prove very beneficial.

There is an ‘alarmo failed to arm’ event already

Yes it does

Yes it does

Appears to not be working then. As using the incorrect code I do not get a failed to arm alert, nor an event in the log.

This is the event fired when trying to disarm with wrong code. So by looking at the command and reason, you can filter out the scenario you're looking for.
event_type: alarmo_failed_to_arm
data:
  context_id: null
  command: disarm
  area_id: "1623385299"
  reason: invalid_code
origin: LOCAL
time_fired: "2023-01-11T19:43:36.128440+00:00"
context:
  id: 01GPH5QZP0GN7C4HRKQVSF35C8
  parent_id: null
  user_id: null

Hi, I was also interested in triggering an event after an incorrect code has been entered. I can confirm the same findings as @seanmccabe . I get a failed to arm event triggered if a sensor is open and the system cannot arm but not for an incorrect code passed via alarmo lovelace card or event from Ring Keypad. I do get the trigger from both for an open sensor.
Would be nice to give some indication that an incorrect code has been entered. I do get the wrong code warnign i nthe logs
Logger: custom_components.alarmo.alarm_control_panel
Source: custom_components/alarmo/alarm_control_panel.py:361
Integration: Alarmo ([documentation](https://github.com/nielsfaber/alarmo), [issues](https://github.com/nielsfaber/alarmo/issues))
First occurred: 18:02:42 (3 occurrences)
Last logged: 18:03:23

Wrong code provided.

It would be nice to have a seperate event for this if it's possible or to intercept it within HA?
Thanks

To anyone that comes across this looking for the same answers :)
The issue I was having was I was tryign to use the "Failed to Arm" action in Alrmo which triggers during an arming event but not a disarming event. If you create your own automation usign the following trigger it works fine :) mine goes on to send a tone to the Ring Keypad V2
alias: "Alarm: Wrong Code Entered"
description: ""
trigger:
  - platform: event
    event_type: alarmo_failed_to_arm
    event_data:
      reason: invalid_code
condition: []
action:
  - service: zwave_js.set_value
    entity_id: sensor.keypad_v2_battery_level
    data:
      command_class: "135"
      property: "9"
      endpoint: "0"
      property_key: "1"
      wait_for_result: true
      value: 0
mode: single


Silall

Silall created by<EMAIL_ADDRESS>on 2018-05-06 18:24:27

<EMAIL_ADDRESS>replied, Mar says this is an old word equivalent to "kora".Â  Used in the song "Watasi no kot era soak":Â  Â SizukaniÂ  nemure aÂ  kmo dobedebekau / silall mlo meringel er a bedengek el mei era kokoro = Resting in a quiet place, I think about you / it was kind of hard on my body as the feelings come.Â  "Silall" also shows up in an example in tekinged.

<EMAIL_ADDRESS>replied, In the example, silall doesnâ€™t look like â€˜koraâ€™ to me.
Charl read the example and says it is the past tense of SMALL. Which I just realized is missing also. We have â€˜msallâ€™ which is the imperative form.
Jim, in your song, could it mean â€˜waitedâ€™?

<EMAIL_ADDRESS>replied, Kilo ke silall = if only you had waited; you should have waited


cannot revert changes done by MFE

Hello, I Am on W11 22H2 22621.2428
I Have a weird issue, i cannot revert the changes done by mica
What i tried -
uninstalled MicaForEveryone, did a restart of the laptop
Resetting the config file
Ending the MFE Task
Restarting my laptop After setting everything to disabled + turning off run on startup
Running as admin, changing everything to default
Heres what my settings look like

Heres what the explorer looks like

Heres the settings file
https://pastebin.com/324ewtJz

Even control panel.


bugfix meta reader could not load image

Proposed changes
This bug is introduced by PR https://github.com/apache/doris/pull/16009.
Problem summary
Describe your changes.
Checklist(Required)

Does it affect the original behavior:

[ ] Yes
[ ] No
[ ] I don't know

Has unit tests been added:

[ ] Yes
[ ] No
[ ] No Need

Has document been added or modified:

[ ] Yes
[ ] No
[ ] No Need

Does it need to update dependencies:

[ ] Yes
[ ] No

Are there any changes that cannot be rolled back:

[ ] Yes (If Yes, please explain WHY)
[ ] No

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.14 seconds
load time: 508 seconds
storage size:<PHONE_NUMBER>9 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230128061631_clickbench_pr_85378.html


incoporate in other model

do you think this sparse attention can be incorporated with like other model such as GRU

Upvote & Fund

We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.

@sarahsftri yes of course


Disable google play download

Right now there is no way to get it work and it trips new users and wastes time :(

The cause seems to be the update of https://github.com/EFForg/rs-google-play, I created a fork (https://github.com/StarHeartHunt/apkeep) which is still working

Thanks for the fork, and more importantly for the comment :-)


In GedcomX, is there a way to state that the data was assembled by genscrape?

I could be useful to state that the data was assembled by genscrape and even specify which version of genscrape. Does the GedcomX model allow for that?

Note this would be independent of #33 originating repository.

https://github.com/FamilySearch/gedcomx/issues/306


False positives for Added/Changed on first system run

Bevy version
2aed777
What you did
I spawned an entity with a component:
#[derive(Component)]
struct Foo;
let mut world = World::new();
world.spawn(Foo);

Then ran a system that checks whether said component has been added since the last time it ran:
let sys = world.register_system(|query: Query<(), Added<Foo>>| assert!(query.is_empty()));
loop {
    world.run_system(sys).unwrap();
}

What went wrong
From the documentation of Added:

A filter on a component that only retains results added after the system last ran.

(and similarly for Changed: "[…] or mutably dereferenced after the system last ran.")
This never happened, yet the entity did not get filtered out the first time the system ran.
Additional information
SystemMeta::last_run can not represent the case that the system hasn't been run yet and therefore falsely gets initialized to 0.

Definitely a bug. I wonder if we should be storing an Option<NonZero<u64>> or the equivalent inside of our ticks to resolve cases like this correctly.

Oh, I see the problem here. I think the docs are wrong. The actual behavior (and the one that will generally be desired) is "detect added/changed components exactly once". Is there are reason why you want to exclude entities that were added before the system was run?


Blameable and decoupled user entity and userinterface'd class

Hi, I'm using decoupled Entity and security user like it's described here https://stovepipe.systems/post/decoupling-your-security-user
The reason for that is that I want to keep domain separated following DDD principles.
Now my entity looks like:
class Batch {
// ....
    /**
     * @var Employee
     *
     * @Gedmo\Blameable(on="create")
     * @ORM\ManyToOne(targetEntity="Employee")
     */
    private $createdBy;
//...

while class 'App\Security\User\SecurityUser' implements actual UserInterface.
When I try to save the entity, it produces an error:
The class 'App\\Security\\User\\SecurityUser' was not found in the chain configured namespaces App\\Entity

Which is because of this line of code:
        if (null !== $token && $this->authorizationChecker->isGranted('IS_AUTHENTICATED_REMEMBERED')) {
            $this->blameableListener->setUserValue($token->getUser());
        }

$token->getUser() returns an object of class App\\Security\\User\\SecurityUser not the Entity. Is it possible to override this behavior introducing a configuration option?

Hi @danaki, sorry for the lack of attention here.
That code is actually part of StofDoctrineExtensionsBundle, so we can't change that within this library.
You should be able to override the listener class and customize it to suit your setup.

@danaki Since there hasn't been any activity for quite a while, I will assume you have resolved your issue. Please update us or open a new issue if you feel there is a problem with Doctrine Extensions itself. Thank you!

Ok, I'll fill the issue in StofDoctrineExtensionsBundle because it's still actual.

https://github.com/stof/StofDoctrineExtensionsBundle/issues/408


fix(runtime-core): do not fire lifecycle hooks during unmounting

close #9264
the root cause is mounted hook is already queued in pendingPostFlushCbs and isUnmounted is false.
we can't change instance.isUnmounted = true to synchronous perform because it could be a breaking change

Thanks for the pr, I cant test it right now but I assume that also fixes the issue of my reproduction right in #9264 and not only posva's ?

@Disservin Yes, The root cause is the same.

Nice, thanks!

#9617 is probably also related

Any update on this? ^^ There have been 3 issues related to this #9264, #8898 and #9617 and another issue which was opened in pinia.

/ecosystem-ci run

vant's test case failed, it seems related to this commit and they should update those snapshots.

Does this also need to account for KeepAlive?
I've put together a couple of Playground examples that might be relevant here:

Playground 1
Playground 2

I don't know whether these would be considered out of scope for this change, but I thought they were at least worth considering.

The fix is correct, but I refactored the implementation to make it more efficient in 27d9948

Before: iterating hooks, then for each hook there is searching + splicing
After: only iterating hooks once


AST 5.3 bump

Updates #999 with fixes for the remaining issues. I can't update that PR since I'm not the original creator.
Fixes #1014 - the module was being tricked by the PrecastStatus module. I hope there's a better way to detect this than what I've got (see Sect.tsx)

I found an example of a pre-pull sleeve draw, and it's throwing off the card counts. Technically it's already broken on prod because we get the same number (15/12), but unless I figure it out before this lands, I'll have a follow-up PR for that.

#999 has been merged, closing this one. Let's make a separate PR to handle pre-pull sleeve draws, and try to keep code style/structure changes a bit more isolated from features so they're easier to review and PRs don't end up huge.


Question about register_buffer

Hi, may I ask why register_buffer is not selected here? This variable appears to be a constant value.

https://github.com/zoubohao/DenoisingDiffusionProbabilityModel-ddpm-/issues/3

OK, it seems to be a harmless question.


Does goreq supports JSON umarshalling from compressed HTTP body?

First I would like to thank you for a very nice library providing convenient level of abstraction. However I faced with a strange behavior when I tried to convert deflate compressed HTTP body into JSON object. I apologize for a verbose logs and I will very appreciate anyone who can explain how to do such things properly:
JSON input data
You can see that the body is encoded:
$ curl -v http://<IP_ADDRESS>:20000/io
< HTTP/1.1 200 OK
< Content-Type: application/json
< Content-Length: 286
< Content-Encoding: deflate
< Connection: close
<
x�}Q�n�
        |�ʿ�
* Closing connection 0
B^фNh)T�Tꪽ�
              ��v�凹;��qt'�МΠn�����fC/GVel�@��N~V�0:���2�a����ٰ�L�Aq���P�)x�!j��Hm�9,v&ʅl{X��N%s<�1Z�
                                                                                ����AX����\���y��T![u4K�0��s���F6@;�-y-l)�y
                                                                                �L�.so��̓c�+NaMqĲ��$���r��
                                                                                ���gc�qɻ�[����R��ې�X��n��iU7ҿ���҃�1�֣5�~��ו�[�5o��

But both browser and Python's requests are able to decode this HTTP by default:
In [1]: import requests

In [2]: url = "http://<IP_ADDRESS>:20000/commands"

In [3]: requests.get(url).text
Out[3]: u'{"timestamp":{"tv_sec":1428487862,"tv_usec":587520},"string_timestamp":"2015-04-08 10:11:02.587520","monitor_status":"enabled","commands":{"REVERSE_LOOKUP":{"cache":{"outside":{"successes":0,"failures":0,"size":0,"time":0},"internal":{"successes":0,"failures":0,"size":0,"time":0}},"disk":{"outside":{"successes":0,"failures":0,"size":0,"time":0},"internal":{"successes":11200,"failures":0,"size":0,"time":420484}},"total":{"storage":{"successes":0,"failures":0},"proxy":{"successes":11200,"failures":0}}},"clients":{}}}'

So actually we are dealing with this object:
{
    "timestamp": {
        "tv_sec":<PHONE_NUMBER>,
        "tv_usec": 425683
    },
    "commands": {
        "REVERSE_LOOKUP": {
            "disk": {
                "outside": {
                    "successes": 0,
                    "failures": 0,
                    "time": 0,
                    "size": 0
                },
                "internal": {
                    "successes": 11616,
                    "failures": 0,
                    "time": 436248,
                    "size": 0
                }
            },
            "total": {
                "storage": {
                    "successes": 0,
                    "failures": 0
                },
                "proxy": {
                    "successes": 11616,
                    "failures": 0
                }
            },
            "cache": {
                "outside": {
                    "successes": 0,
                    "failures": 0,
                    "time": 0,
                    "size": 0
                },
                "internal": {
                    "successes": 0,
                    "failures": 0,
                    "time": 0,
                    "size": 0
                }
            }
        },
        "clients": {}
    },
    "string_timestamp": "2015-04-08 10:13:42.425683",
    "monitor_status": "enabled"
}

Source code
I wrote a simple program that interacts with a REST API on <IP_ADDRESS>:20000 and prints the requested JSON. Unfortunately it doesn't work:
package main

import (
	"fmt"
	"github.com/franela/goreq"
)

type Timestamp struct {
	Tv_sec  int `json:"tv_sec"`
	Tv_usec int `json:"tv_usec"`
}

type StatsSmall struct {
	Failures  int `json:"failures"`
	Successes int `json:"successes"`
}

type StatsLarge struct {
	Failures  int `json:"failures"`
	Size      int `json:"size"`
	Successes int `json:"successes"`
	Time      int `json:"time"`
}

type DiskCache struct {
	Internal StatsLarge `json:"internal"`
	Outside  StatsLarge `json:"outside"`
}

type Total struct {
	Proxy   StatsSmall `json:"proxy"`
	Storage StatsSmall `json:"storage"`
}

type Empty struct {
}

type ReverseLookup struct {
	Cache DiskCache `json:"cache"`
	Disk  DiskCache `json:"disk"`
	Total Total     `json:"total"`
}

type Commands struct {
	ReverseLookup ReverseLookup `json:"REVERSE_LOOKUP"`
	Clients       Empty         `json:"clients"`
}

type Data struct {
	Commands         Commands  `json:"commands"`
	Timestamp        Timestamp `json:"timestamp"`
	String_timestamp string    `json:"string_timestamp"`
	Monitor_status   string    `json:"monitor_status"`
}

func get_content() {

	url := "http://<IP_ADDRESS>:20000/commands"

	res, err := goreq.Request{Uri: url}.Do()
	if err != nil {
		panic(err.Error())
	}
	fmt.Println("Response:\n", res)

	s, err := res.Body.ToString()
	if err != nil {
		panic(err.Error())
	}
	fmt.Println("Body:\n", s)
	fmt.Println("Body:\n", []byte(s))

	var jsondata Data
	res.Body.FromJsonTo(&jsondata)
	fmt.Println("Resulting JSON:\n", jsondata)
}

func main() {
	get_content()
}

Error
But all i got is just strange object filled with zeroes:
isaev@wks-isaev:~/side-projects/elliptics-manager$ go run main.go
Response:
 &{ 200 235 0xc21004a6e0 map[Content-Type:[application/json] Content-Length:[235] Content-Encoding:[deflate]]}
Body:
 x��PAN�0�
�9E���I�9�TT��8K���ʻF@տc�8q�6;;�3�##�I�돌�F�z�d��v�5U��B��ި�T1�h�~��d��z�Պ�W�������[�*悷��Ŕ0������2�9�',���q����v{�pW��
                                                                                ����@�l�{�vN�<����f���D���:�u����B6���V�沔�@���z�E�bx��5�TN�ق���<~x��>
Body:
 [120 156 181 80 65 78 195 48 16 252 10 242 57 69 182 235 164 73 238 57 129 84 84 4 215 200 56 75 177 136 237 202 187 70 64 213 191 99 135 30 56 21 113 224 54 59 59 179 51 218 35 35 235 0 73 187 3 235 143 140 222 70 4 195 122 161 100 171 218 118 221 53 85 225 210 66 170 166 222 168 238 84 49 164 104 253 126 252 225 100 146 139 122 197 213 138 183 87 130 247 162 235 235 230 250 91 207 42 230 130 183 20 226 152 197 148 48 171 193 235 167 25 166 188 50 193 57 237 39 44 225 187 225 113 216 221 15 227 237 118 123 243 112 87 24 163 205 11 20 16 18 161 157 22 136 201 24 64 132 108 225 21 123 214 118 78 241 60 160 253 132 5 148 102 25 228 170 214 19 68 175 231 191 58 179 117 178 248 250 31 217 66 54 178 185 236 86 27 181 230 178 148 160 64 231 3 249 129 122 127 185 69 214 31 98 120 255 248 53 240 84 78 155 217 130 167 242 249 60 126 1 120 178 167 62]
Resulting JSON:
 {{{{{0 0 0 0} {0 0 0 0}} {{0 0 0 0} {0 0 0 0}} {{0 0} {0 0}}} {}} {0 0}  }

Can anyone clarify this issue? Can such JSON object be unmarshalled with goreq?

@vitalyisaev2 goreq should be able to do that. I'll give it a look tonight and hope to find the reason why it's not working today.
In case you find why it's failing PR's are always welcome :)

maybe @sschepens who did the compression stuff can give us a hand :stuck_out_tongue_winking_eye:

@vitalyisaev2 hey, it should work, but you have to manually specify you want to decompress requests, it's actually bad that a server replies Content-Encoding: deflate when request does not specify Accept-Enconding: deflate.
Check readme for examples on how to use compression :smile:
One thing to note is that 'deflate' hasn't been completely standardized and can happen to be one of deflate or zlib compressions (that's why it's almost always recommended to use gzip instead), so you have to test and see which one of those works for you.
Hope this helps
Cheers

Hello again, thanks for the prompt reply :) I asked almost the same question on SO and got an answer. Probably the reason is improperly configured HTTP server (it's small built-in monitoring server inside Elliptics key-value distributed storage).
I'm not sure if goreq need to be aware of this HTTP compression features... But in case if you want to reproduce the bug, here is the dumped HTTP body. Sorry, my Golang skills are to poor for PR :)

@vitalyisaev2 as stated by @sschepens goreq should be able to handle the request accordingly if you specify the Zlib compression in the GoReq struct. Have you tried that already and it still fails?

@marcosnils, thanks for a clarification... I missed @sschepens's advice. I'll do tests in soon and report here.

@vitalyisaev2 have you tried this?. Can we close the PR.

I apologize for a long delay with my report. When I pointed the encoding explicitly in the request, I was able to get decoded JSON object via the response.Body:
	url := "http://<IP_ADDRESS>:20000/commands"
	res, err := goreq.Request{
		Uri:         url,
		Compression: goreq.Deflate(),
	}.Do()
	if err != nil {
		panic(err.Error())
	}
	fmt.Println("Response:\n", res)

	s, err := res.Body.ToString()
	if err != nil {
		panic(err.Error())
	}
	fmt.Println("Body:\n", s)

[vitaly@thermaltake elliptics-manager]$ go run main.go
Response:
 &{0xc208044120  0xc2080405e0}
Body:
 {"timestamp":{"tv_sec":1428871522,"tv_usec":797591},"string_timestamp":"2015-04-12 20:45:22.797591","monitor_status":"enabled","commands":{"ROUTE_LIST":{"cache":{"outside":{"successes":0,"failures":0,"size":0,"time":0},"internal":{"successes":0,"failures":0,"size":0,"time":0}},"disk":{"outside":{"successes":14,"failures":0,"size":0,"time":796},"internal":{"successes":0,"failures":0,"size":0,"time":0}},"total":{"storage":{"successes":14,"failures":0},"proxy":{"successes":0,"failures":0}}},"BACKEND_CONTROL":{"cache":{"outside":{"successes":0,"failures":0,"size":0,"time":0},"internal":{"successes":0,"failures":0,"size":0,"time":0}},"disk":{"outside":{"successes":1,"failures":0,"size":0,"time":1841},"internal":{"successes":0,"failures":0,"size":0,"time":0}},"total":{"storage":{"successes":1,"failures":0},"proxy":{"successes":0,"failures":0}}},"clients":{}}}

However, I failed again when I tried to bring this string into the whole JSON object with FromJsonTo method:
	var jsondata Data
	res.Body.FromJsonTo(&jsondata)
	fmt.Println("Resulting JSON:\n", jsondata)

Resulting JSON:
 {{{{{0 0 0 0} {0 0 0 0}} {{0 0 0 0} {0 0 0 0}} {{0 0} {0 0}}} {}} {0 0}  }

To be honest, I'm not sure if this is the case for FromJsonTo use and why do I have so many zeroes here? Probably I just make a mistake in the long list of typedefs above. Thank you.

@vitalyisaev2 I still can't reproduce your scenario. Here's a complete test about how I'm doing the request:
package main

import (
	"compress/zlib"
	"fmt"
	"net/http"
	"net/http/httptest"

	"github.com/franela/goreq"
)

var json = `
{
    "timestamp": {
        "tv_sec":<PHONE_NUMBER>,
        "tv_usec": 425683
    },
    "commands": {
        "REVERSE_LOOKUP": {
            "disk": {
                "outside": {
                    "successes": 0,
                    "failures": 0,
                    "time": 0,
                    "size": 0
                },
                "internal": {
                    "successes": 11616,
                    "failures": 0,
                    "time": 436248,
                    "size": 0
                }
            },
            "total": {
                "storage": {
                    "successes": 0,
                    "failures": 0
                },
                "proxy": {
                    "successes": 11616,
                    "failures": 0
                }
            },
            "cache": {
                "outside": {
                    "successes": 0,
                    "failures": 0,
                    "time": 0,
                    "size": 0
                },
                "internal": {
                    "successes": 0,
                    "failures": 0,
                    "time": 0,
                    "size": 0
                }
            }
        },
        "clients": {}
    },
    "string_timestamp": "2015-04-08 10:13:42.425683",
    "monitor_status": "enabled"
}
`

type Timestamp struct {
	Tv_sec  int `json:"tv_sec"`
	Tv_usec int `json:"tv_usec"`
}

type StatsSmall struct {
	Failures  int `json:"failures"`
	Successes int `json:"successes"`
}

type StatsLarge struct {
	Failures  int `json:"failures"`
	Size      int `json:"size"`
	Successes int `json:"successes"`
	Time      int `json:"time"`
}

type DiskCache struct {
	Internal StatsLarge `json:"internal"`
	Outside  StatsLarge `json:"outside"`
}

type Total struct {
	Proxy   StatsSmall `json:"proxy"`
	Storage StatsSmall `json:"storage"`
}

type Empty struct {
}

type ReverseLookup struct {
	Cache DiskCache `json:"cache"`
	Disk  DiskCache `json:"disk"`
	Total Total     `json:"total"`
}

type Commands struct {
	ReverseLookup ReverseLookup `json:"REVERSE_LOOKUP"`
	Clients       Empty         `json:"clients"`
}

type Data struct {
	Commands         Commands  `json:"commands"`
	Timestamp        Timestamp `json:"timestamp"`
	String_timestamp string    `json:"string_timestamp"`
	Monitor_status   string    `json:"monitor_status"`
}

func main() {
	ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		gw := zlib.NewWriter(w)
		defer gw.Close()
		w.Header().Set("content-type", "application/json")
		w.Header().Add("Content-Encoding", "deflate")
		gw.Write([]byte(json))
	}))

	res, err := goreq.Request{Uri: ts.URL, Compression: goreq.Zlib()}.Do()
	fmt.Println(err)

	var data Data

	res.Body.FromJsonTo(&data)

	fmt.Printf("%#v", data)

}

The output I'm getting is:
main.Data{Commands:main.Commands{ReverseLookup:main.ReverseLookup{Cache:main.DiskCache{Internal:main.StatsLarge{Failures:0, Size:0, Successes:0, Time:0}, Outside:main.StatsLarge{Failures:0, Size:0, Successes:0, Time:0}}, Disk:main.DiskCache{Internal:main.StatsLarge{Failures:0, Size:0, Successes:11616, Time:436248}, Outside:main.StatsLarge{Failures:0, Size:0, Successes:0, Time:0}}, Total:main.Total{Proxy:main.StatsSmall{Failures:0, Successes:11616}, Storage:main.StatsSmall{Failures:0, Successes:0}}}, Clients:main.Empty{}}, Timestamp:main.Timestamp{Tv_sec:1428488022, Tv_usec:425683}, String_timestamp:"2015-04-08 10:13:42.425683", Monitor_status:"enabled"}

Please give it a try and let me know your results

@vitalyisaev2 try changing the compression from Deflate() to Zlib() and check if that makes it work.

@marcosnils, thanks for the detailed guide. Unfortunately the results are the same (zero filled json).
Here are the steps to reproduce this bug on your site. I will very appreciate for your help.

Install Docker (if you haven't yet);
Clone https://github.com/vitalyisaev2/docker-elliptics,  follow the instructions and launch the Elliptics node;
Try to execute the file below:

package main

import (
	"fmt"
	"github.com/franela/goreq"
)

type Timestamp struct {
	Tv_sec  int `json:"tv_sec"`
	Tv_usec int `json:"tv_usec"`
}

type StatsSmall struct {
	Failures  int `json:"failures"`
	Successes int `json:"successes"`
}

type StatsLarge struct {
	Failures  int `json:"failures"`
	Size      int `json:"size"`
	Successes int `json:"successes"`
	Time      int `json:"time"`
}

type DiskCache struct {
	Internal StatsLarge `json:"internal"`
	Outside  StatsLarge `json:"outside"`
}

type Total struct {
	Proxy   StatsSmall `json:"proxy"`
	Storage StatsSmall `json:"storage"`
}

type Empty struct {
}

type ReverseLookup struct {
	Cache DiskCache `json:"cache"`
	Disk  DiskCache `json:"disk"`
	Total Total     `json:"total"`
}

type Commands struct {
	ReverseLookup ReverseLookup `json:"REVERSE_LOOKUP"`
	Clients       Empty         `json:"clients"`
}

type Data struct {
	Commands         Commands  `json:"commands"`
	Timestamp        Timestamp `json:"timestamp"`
	String_timestamp string    `json:"string_timestamp"`
	Monitor_status   string    `json:"monitor_status"`
}

func get_content() {

	url := "http://localhost:20000/commands"
	res, err := goreq.Request{
		Uri: url,
		//Compression: goreq.Deflate(),
		Compression: goreq.Zlib(),
	}.Do()

	if err != nil {
		panic(err.Error())
	}
	fmt.Println("Response:\n", res)

	s, err := res.Body.ToString()
	if err != nil {
		panic(err.Error())
	}
	fmt.Println("Body:\n", s)
	fmt.Println("Body:\n", []byte(s))

	var jsondata Data
	res.Body.FromJsonTo(&jsondata)
	fmt.Println("Resulting JSON:\n", jsondata)
}

func main() {
	get_content()
}

My results:
[vitaly@thermaltake elliptics-manager]$ go run main.go
Response:
 &{0xc208044000  0xc2080400c0}
Body:
 {"timestamp":{"tv_sec":1428960145,"tv_usec":277938},"string_timestamp":"2015-04-13 21:22:25.277938","monitor_status":"enabled","commands":{"BACKEND_CONTROL":{"cache":{"outside":{"successes":0,"failures":0,"size":0,"time":0},"internal":{"successes":0,"failures":0,"size":0,"time":0}},"disk":{"outside":{"successes":0,"failures":1,"size":0,"time":372},"internal":{"successes":0,"failures":0,"size":0,"time":0}},"total":{"storage":{"successes":1,"failures":0},"proxy":{"successes":0,"failures":0}}},"clients":{}}}
Body:
 [123 34 116 105 109 101 115 116 97 109 112 34 58 123 34 116 118 95 115 101 99 34 58 49 52 50 56 57 54 48 49 52 53 44 34 116 118 95 117 115 101 99 34 58 50 55 55 57 51 56 125 44 34 115 116 114 105 110 103 95 116 105 109 101 115 116 97 109 112 34 58 34 50 48 49 53 45 48 52 45 49 51 32 50 49 58 50 50 58 50 53 46 50 55 55 57 51 56 34 44 34 109 111 110 105 116 111 114 95 115 116 97 116 117 115 34 58 34 101 110 97 98 108 101 100 34 44 34 99 111 109 109 97 110 100 115 34 58 123 34 66 65 67 75 69 78 68 95 67 79 78 84 82 79 76 34 58 123 34 99 97 99 104 101 34 58 123 34 111 117 116 115 105 100 101 34 58 123 34 115 117 99 99 101 115 115 101 115 34 58 48 44 34 102 97 105 108 117 114 101 115 34 58 48 44 34 115 105 122 101 34 58 48 44 34 116 105 109 101 34 58 48 125 44 34 105 110 116 101 114 110 97 108 34 58 123 34 115 117 99 99 101 115 115 101 115 34 58 48 44 34 102 97 105 108 117 114 101 115 34 58 48 44 34 115 105 122 101 34 58 48 44 34 116 105 109 101 34 58 48 125 125 44 34 100 105 115 107 34 58 123 34 111 117 116 115 105 100 101 34 58 123 34 115 117 99 99 101 115 115 101 115 34 58 48 44 34 102 97 105 108 117 114 101 115 34 58 49 44 34 115 105 122 101 34 58 48 44 34 116 105 109 101 34 58 51 55 50 125 44 34 105 110 116 101 114 110 97 108 34 58 123 34 115 117 99 99 101 115 115 101 115 34 58 48 44 34 102 97 105 108 117 114 101 115 34 58 48 44 34 115 105 122 101 34 58 48 44 34 116 105 109 101 34 58 48 125 125 44 34 116 111 116 97 108 34 58 123 34 115 116 111 114 97 103 101 34 58 123 34 115 117 99 99 101 115 115 101 115 34 58 49 44 34 102 97 105 108 117 114 101 115 34 58 48 125 44 34 112 114 111 120 121 34 58 123 34 115 117 99 99 101 115 115 101 115 34 58 48 44 34 102 97 105 108 117 114 101 115 34 58 48 125 125 125 44 34 99 108 105 101 110 116 115 34 58 123 125 125 125]
Resulting JSON:
 {{{{{0 0 0 0} {0 0 0 0}} {{0 0 0 0} {0 0 0 0}} {{0 0} {0 0}}} {}} {0 0}  }

@vitalyisaev2 the problem is that when you're running the ToString function the body gets read and then FromJsonTo has nothing to read from. Just remove the ToString and you'll see that your structure gets populated. :smile:

@marcosnils, oh I see... That's definitely my fault. I still have some unwanted zeroes, but some part of the structure has been initialized. I'll do it on my own. Thank you!


feat: faster file loading

Analyzer step in the CI action will break until this PR has been merged.
__
  Summary: :hammer_and_wrench: This code needs a fix


fix issues 13035: logic for master-server to handle data-quality result is wrong

fix https://github.com/apache/dolphinscheduler/issues/13035#issue-1467375685

Please submit the PR to dev branch.