Upgrade oauthlib to ~= 1.0

Upgrade oauthlib dependency to 1.0, because everyone likes an up-to-date auth library
Use getattr to fetch attributes from the oauthlib request object, which imitates the pre-1.0 behavior and fixes failing tests (and use cases -- see also idan/oauthlib#364)
Return True in client_authentication_required if grant_type is None (Because of
idan/oauthlib@8b0c466)

I'm not super sure about that last one, but the tests fail without it and I couldn't come up with a more sensible way to only target revocation requests.

@adambard Thanks for your feedback. I'd keep request.client.  In the meanwhile, I am fixing oauthlib now https://github.com/idan/oauthlib/pull/368

1.0.2 is released which should fix this issue.


--tenant-name needs to be added to list of flags

https://github.com/IBM/FHIR/blob/main/fhir-persistence-schema/docs/SchemaToolUsageGuide.md
"tenant-name" needs to be added to the "List of IBM FHIR Server Persistence Schema Tool Flags" table

Confirmed table update.


Put UTXOs Rust error: Network type mismatch

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

Describe the solution you'd like

[ ] Add a new check on the network type into the related Rust method
[x] Turn SDK proguard off for the next release to test its behavior
[x] Add a new line with Network Type to the email template so we’re 100% sure that the Zashi built-in network type is correct
[x] Test sending from Kraken account for us to test sending from them to Zashi

Alternatives you've considered

Additional context
java.lang.RuntimeException: Error while inserting UTXO: Data DB is corrupted: Network type mismatch
at cash.z.ecc.android.sdk.internal.jni.RustBackend.putUtxo(Native Method)
at cash.z.ecc.android.sdk.internal.jni.RustBackend.access$putUtxo(Unknown Source:0)
at cash.z.ecc.android.sdk.internal.jni.RustBackend$putUtxo$2.invokeSuspend(Unknown Source:30)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:112)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:920)

Internal resources:

https://linear.app/zcash/issue/PRO-278/[bug]-a-user-experiences-a-syncing-error-due-to-unsupported-address
https://zcash.slack.com/archives/C02C1GZ0R6F/p1729702935021489

Sending transparent funds from a Kraken account to a Zashi wallet did not cause problems and worked as expected.

Closing this this is waits for the latest Rust crates bump in SDK.


Migrate from Netlify to Cloudflare Pages

While Netlify has some more features like forms, Cloudflare Pages has unlimited bandwidth and free privacy-first analytics. Analytics is a paid feature for Netlify. Both support previews in PRs. The domain is also already on Cloudflare, so this makes everything manageable with a single provider.

This migration implies getting rid of the Contact me form at https://blog.dmarcoux.com/contact-me/. Nobody ever did, so I guess it's not really needed. I also need to rephrase blog posts which mention this form.

I started the migration, I need to wait for the DNS records to update. I also have to cleanup the Netlify site.

I got rid of the Contact Me page for now... and the weird issue with the trailing slash isn't solved, but it's so minor that I prefer to focus my time on other things.


Added documentation needed for compilation

This should help fix #6 a bit, more work will need to be done though...

it appears that the new maven workflow was missing some permissions, hopefully this fixes it...

decided to just add the rest of the documentation, this should fix the underlying issue


bosh deploy --no-redact does not work

x@jumpbox1:~/workspace/x-prod-azure$ bosh deploy --no-redact
invalid option: --no-redact
Usage: bosh        deploy [--recreate]
       --recreate            recreate all VMs in deployment
x@jumpbox1:~/workspace/x-prod-azure$ sudo gem uninstall bosh-workspace
Successfully uninstalled bosh-workspace-0.9.10
x@jumpbox1:~/workspace/x-prod-azure$ bosh deploy --no-redact
RSA 1024 bit CA certificates are loaded due to old openssl compatibility
Acting as user 'admin' on deployment 'logsearch-x-prod' on 'bosh'
Getting deployment properties from director...

Detecting deployment changes
----------------------------
properties:
  cloudfoundry:
    firehose_port:
  elasticsearch:
    exec:
Please review all changes carefully

Deploying
---------
Are you sure you want to deploy? (type 'yes' to continue):

@jim80net the no-redact option is missing here, the options have became out of sync with upstream. I would accept a PR to add those options.

Fixed in https://github.com/cloudfoundry-incubator/bosh-workspace/pull/121


Quick_any and find_any

quick_any gives any video from content basically
url = await self.bot.db.fetchrow("SELECT * from content where content_type = $1 ORDER BY RANDOM()")

Find_any:
allows you to search through
content_type (will likely link to the enum that exists)
service
user
(Service and user are both normal lookup)
And possibly may need updating the format to support quick_any and finding a way to support the find methods.
which would require the translation project to be restarted and re-contact translators.

What's the difference? Just accept topic argument on find_any

What's the difference? Just accept topic argument on find_any

Find also you the choice to choose.
quick just gives it you regardless no need for setup.
There's an important difference.


Commanding motors to stop should clear homing flags

@kanta
If I command the controller to stop the motors while they are homing (via /hardHiz, for example), I am unable to restart their homing processes.
Output from /getHiZ and /getHomingStatus when trying to restart their homing:
HiZ(address='/HiZ', motorID=2, state=True)
HomingStatus(address='/homingStatus', motorID=2, homingStatus=1)
Due to the large nature of my project, waiting for timeout from GoUntil or ReleaseSw is not practical.
Thanks,
Jules

@JulianOrteil Thank you for pointing this out, obviously this is a problem of the firmware. I will update it.
Thanks!

@kanta Apologies. I believe this is also the case when homing is interrupted by any command like /goto.

@JulianOrteil Ah you are right, I've never tried it but it should be happen. I will check the behavior with a physical machine in Monday. Thank you!
By the way, I am trying to combine the firmware of STEP400 and STEP800.
https://github.com/ponoor/step-series-universal-firmware
I should work same as original firmware but I have not tested whole commands. I believe your test code from the Python library  will be the perfect tool for that purpose. I still have a problem for basic usage so let me have a question about it at the library's issue in next week!

Sure!
And no problem! I haven't finished documentation on how to properly run tests on the library and need to change a couple things, but let me know any questions you have.
I'll close this ticket once you have updated the firmware.
Thanks :)
Jules

From: Kanta HORIO @.>
Sent: Saturday, February 12, 2022 11:11:33 PM
To: ponoor/step-series-support @.>
Cc: Julian_Orteil @.>; Mention @.>
Subject: Re: [ponoor/step-series-support] Commanding motors to stop should clear homing flags (Issue #11)
@JulianOrteilhttps://github.com/JulianOrteil Ah you are right, I've never tried it but it should be happen. I will check the behavior with a physical machine in Monday. Thank you!
By the way, I am trying to combine the firmware of STEP400 and STEP800.
https://github.com/ponoor/step-series-universal-firmware
I should work same as original firmware but I have not tested whole commands. I believe your test code from the Python library will be the perfect tool for that purpose. I still have a problem for basic usage so let me have a question about it at the library's issue in next week!
—
Reply to this email directly, view it on GitHubhttps://github.com/ponoor/step-series-support/issues/11#issuecomment-1037784386, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFQDSNPOBS6XVP4BHDHPJSLU244QLANCNFSM5OEWRXAA.
You are receiving this because you were mentioned.Message ID: @.***>

Thank you, it will be great help to me!
About homing status, I have updated the firmware for both STEPP400 and 800.
https://github.com/ponoor/STEP400
https://github.com/ponoor/STEP800
I realize that only /run can interrupt a homing, and other motion commands (/goTo, /move, etc...) will be ignored and cause the error CommandIgnored. This behavior is inherited from the motor driver chip.
So following commands will interrupt to homing.

/run
/hardHiZ
/hardStop
/softHiZ
/softStop

If the electromagnetic brake is enabled,

/activate
/free

activate is bit complicated. /activate (int)motorID (bool)state switches motor energize and release(HiZ). Homing will be interrupted when the motor is released. You can not start homing before energize the motor so there is no condition to send enable message during homing.
Anyway lots of overlooked bugs found, thanks!!

@kanta Thank you very much for your work. I was wondering though, for /goTo and /move, could you send a /run command internally before executing /goTo and /move as a work around? Consider the following logic plan:
user calls /goTo -> /goTo checks if we are homing -> if yes, /goTo calls '/run 0' -> /goTo executes normally
That plan would then apply to /move or other motion commands.
Just a thought :)

That's a brilliant idea! It should work for the homing, also cascading some /goTo should be possible with this technique.
/move is executable when the motor is stopped, so probably only /goTo will work.
I will try them out and come back.
BTW I found a mistake in the doc, /goTo and /goToDir are executable when not in BUSY state but they were described as "Always". I have fixed it.
https://ponoor.com/en/docs/step-series/osc-command-reference/motor-control/#goto_intmotorid_intposition

Oh, I also thought. To work around the issues still imposed by /move, perhaps sending /softStop or /softHiZ would be better than /run 0? I would think all three are essentially the same?
Your testing will tell us though!

@kanta I was able to successfully test the changes you made. They appear to work! Thanks!

@JulianOrteil Thanks for the test!
Some follow ups.
Sending /run internally before /goTo works! This works for a homing and positioning commands as well. For example, /goTo can be sent during executing another /goTo. /goToDir, /goHome, and /goMark work same. If the new command specifies the same direction of the current command, the motion will be connected seamlessly. For the opposite direction, the motion will be stopped once then start the new motion again.
For /move, the motion have to stop once even the same direction command. I think it's not natural and not useful so I haven't implemented this overwrite function.
These new functionalities are implemented only in the "universal version" so far.
https://github.com/ponoor/step-series-universal-firmware
I couldn't find a time to work for a validating environment for the new firmware in these days but will start soon!

@kanta Glad to hear it! These are definitely beneficial improvements and changes, and I will definitely be taking advantage of them.
On a personal note, the company I work for has taken an interest to your controllers and may be looking at ordering some in the future. I'll let you know if and when they make that decision :)
Jules

@JulianOrteil That's awesome, thanks Julien!
And thank you too for your great idea!


Support importing private keys functionality

Type
Feature Request
Description
After running the generate command of pivy-tool worked well as expected and I was able to create a CSR as well as import a certificate that I got from the CSR I wanted to check whether it is also possible to import keys that have been previously created using the import functionality of pivy-tool and ran
cat <path to private key> | pivy-tool import 9A

The response I got was the following:
pivy-tool: error occurred while executing 'import'
  Caused by cmd_import: failed to import key
    in cmd_import() at pivy-tool.c:1492
  Caused by NotSupportedError: Importing private keys not supported by PIV device 'Nitrokey Nitrokey 3'
    in ykpiv_import() at piv.c:3345
  Caused by APDUError: Card replied with SW=6a81 (FUNC_NOT_SUPPORTED) to INS_IMPORT_ASYM(9a)
    in ykpiv_import() at piv.c:3345

Therefore I wanted to open this feature request for implementing this functionality.
Further Info

pivy Version: 0.11.2
Firmware version: v1.5.0-test.20231030

Indeed that feature is not  yes implemented. I transferred the issue to the relevant repo.


Aggiunto EliaDS.ipynb

Hi, I have never used GitHub before so I'm not sure that I correctly put the file EliaDS.ipynb here. Please let me know if there is something wrong.

The file you uploaded needs to be inside the folder 2023_22/lab1/solutions

Hi, did you receive my new upload inside the folder of solutions?
Il giorno lunedì 11 dicembre 2023, Bardh Prenkaj @.***>
ha scritto:

The file you uploaded needs to be inside the folder
2023_22/lab1/solutions
—
Reply to this email directly, view it on GitHub
https://github.com/bardhprenkaj/ML_labs/pull/1#issuecomment-1850415882,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BESUV5USHO6EJUH2ZAEK2ZDYI4XLPAVCNFSM6AAAAABAOT47WGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNJQGQYTKOBYGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

No. it's still in the parent folder. Open a new one again. I'm closing this pull request as for now.

sorry to bother you, do you see it now in the right folder?
Il giorno mar 12 dic 2023 alle ore 11:41 Bardh Prenkaj <
@.***> ha scritto:

Closed #1 https://github.com/bardhprenkaj/ML_labs/pull/1.
—
Reply to this email directly, view it on GitHub
https://github.com/bardhprenkaj/ML_labs/pull/1#event-11221695076, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BESUV5RPYBRGZXNNEZ3TCXTYJAYHBAVCNFSM6AAAAABAOT47WGVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJRGIZDCNRZGUYDONQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


Some times the Project Manager window will apear instead of the game developed when pressing F5 or using the Play button

Operating system or device, Godot version, GPU Model and driver (if graphics related):
Windows 10
v3.0.beta.build1
Issue description:

Sometimes, after pressing the play button or F5 Godot will launch the project manager. Instead I want to see my game being develop.
Steps to reproduce:
start a new project and do something, then try to play it from the editor with F5.
Link to minimal example project:

TODO, will link my project's source code in a couple of minutes.

Duplicate of #11391 which was already fixed in master.


Fix, enable PWR clock before accessing the PWR_CR

dbp can't be written to unless PWRen has been set.

Add to changelog, please

bors r+


adds a devcontainer.json

Another “quality of life” thing for getting people started with HEIR quickly.
This adds a .devcontainer json, so that code spaces created from HEIR have (almost) everything set-up already, basically saving people the working of going through the getting-started setup.
Currently, this still requires running a full bazel build + hedron_compile_commands after the container is created, as adding that to the container creation would make launching a codespace really slow. If we enable pre-built containers, this would not be an issue, so we could have it come pre-built + clangd-ready, too.
If someone wants to contribute back, they’d of course still need to manually create a fork and add it as a new remote, but I think that’s inevitable.

pre-built containers

I'm guessing this would incur a hosting cost? Do you know of any services that provide this? I could see about getting Google to pay for it.

I'm guessing this would incur a hosting cost? Do you know of any services that provide this? I could see about getting Google to pay for it.

Yep, I think this is down to the repo owner/org. Afaik, the "pre-building" itself is a github action so would incur normal CI costs/CI runner usage (we could sync this to the nightly release rather than every main update, I think), but there's also a "storage" fee for the pre-built codespace. Not sure if it's standard pricing for everyone, or if enterprise accounts have a different setup.
Who actually pays for running codespaces is a (org-level) configurable thing, and can be set to either the user who creates it or the org, and I'm guessing it's set to the former.

Ah, so this is a GitHub owned thing end to end. Makes sense.

Reading more about it, I think this is something we can do pretty straightforwardly. @AlexanderViand-Intel  Can you update this config to do the full bazel build + hedron_compile_commands, and I can set up the pre-build to run on a schedule (say, once per change to the LLVM commit?)

@AlexanderViand-Intel Can you update this config to do the full bazel build + hedron_compile_commands

Done & running a test-build of the container on my fork right now

I played with this a bit more, but unfortunately, the default codespaces machines that GH makes available to all users only have 32GB of storage, and bazel build @heir//... runs out of space near the end. Any ideas on how to reduce the disk space taken up by the build? IIRC, for MLIR there's a huge difference between building with SHARED_LIBRARIES on or not - which is bazel doing?

Just a diagnostic: when I do a build on my machine and run:
 du -sh $(bazel info output_base)
25G     /home/j2kun/.cache/bazel/_bazel_j2kun/b07a48cf9da8c73a462d3608e5c508dd

I suppose the remaining 7G is the OS and other installed libraries.

@AlexanderViand-Intel if you increase the disk space as you did in one of your commits, what happens? Does it warn you it will charge you?

@AlexanderViand-Intel if you increase the disk space as you did in one of your commits, what happens? Does it warn you it will charge you?

Unfortunately, it will just not let you create a codespace if the requirements are more than what the 2/4 core machines (both have 32GB of storage) provide and your account does not have access to the 8/16/32 core machines (which most accounts do not).

When I just build @heir//tools:heir-opt, I get only 6 GiB of disk space. One thing we could do is run a bazel query to get all targets that do not depend on mlir-cpu-runner, and build those.
This should look like this:
bazel build $(bazel query<EMAIL_ADDRESS>except rdeps(//..., @llvm-project//mlir:mlir-cpu-runner)')
But the query fails because apparently there are some projects loaded that we don't have defined
preloading transitive closure failed: no such package '@libpfm//': The repository '@libpfm' could not be resolved: Repository '@libpfm' is not defined

Oh, nice @heir-opt! I guess for an initial playground, having heir-opt and heir-lsp (that also reminds me to add the setting to make the MLIR extension use it!) should be a good start, then we can revisit switching to @heir//... once the build has been "slimmed down" (#847)

From the GitHub docs:

For organizations on a GitHub Team or GitHub Enterprise Cloud plan, when a user creates a codespace from a repository in the organization, either the user or the organization can pay for the codespace. The user who creates a codespace can't choose who pays for it, but the organization can choose to pay for certain users. In an organization's settings, you can choose for codespaces to be user-owned or organization-owned.
If an organization chooses for codespaces to be user-owned, a user who creates a codespace from a repository in the organization always pays for the codespace. The user's access to create codespaces depends on the visibility of the repository and your organization's access settings.
If an organization chooses for codespaces to be organization-owned, the organization will pay for a codespace if all the following things are true:
The organization has set a non-zero spending limit for GitHub Codespaces.
The codespace is created from one of the organization's repositories, or from a fork of one of the organization's repositories. This includes both public and private repositories.
The user creating the codespace is a member or collaborator of the organization, and the organization has enabled GitHub Codespaces for this user. This can include all members and collaborators if the organization has chosen to enable Codespaces for all users. If Codespaces isn't enabled for a user, they can still create codespaces from public repositories in the organization, but the user will pay for these codespaces.

Based on this, I think our best bet is lowering the disk usage, the main reason being that I don't think we should let anyone be a collaborator on the project just to get access to codespaces. That would be necessary even if Google generously enables and pays for org-owned codespaces by default.

I've swapped the base image from the "universal" GH kitchen sink image to a more basic ubuntu 24.04 LTS image, as this gets us (a) much newer cmake, clang, lld, etc and (b) less unrelated stuff that's just taking up space. This does mean the initial code space setup is a bit slower as it's installing python/etc, but that overhead will disappear once we have prebuilds.


Smooth Animation Problem

Hi @MrToph,
I'm impressed with your library and I'd like to add it to my project. The problem is that I'm having troubles with reproducing this example:

I copied your code:
import CountdownCircle from 'react-native-countdown-circle'

render() {
    return (
        <CountdownCircle
            seconds={10}
            radius={30}
            borderWidth={8}
            color="#ff003f"
            bgColor="#fff"
            textStyle={{ fontSize: 20 }}
            onTimeElapsed={() => console.log('Elapsed!')}
        />
    )
}

I'm getting the 10 sec count down itself, however I don't have this nice effect of the circle changing the color as the time goes.
I have a red circle first @ 10, then the color changes to gray instantly at 9 and it stays gray until 0 time, which looks like this:
 ->  -> ... ->
My environment:
React Native version: RN 0.51.0
Platform: Android 6.0 device (Moto G 2nd Generation)

Hi,
problem is solved thanks to this thread. I disabled chrome debugger and the animation started to work as it is supposed to work


Cudnn frontend sdpa wrong assertion in attention module with d_bias

Describe the bug
A clear and concise description of what the bug is.
Cudnn_frontend asserts on d_bias, even when the d_bias isn't used. See this PyTorch issue: https://github.com/pytorch/pytorch/issues/137347 When upgrading the CUDNN_Frontend, code that used to work fine no longer works, and the assertion does not seem appropiate:
RuntimeError: cuDNN Frontend error: For cuDNN version below 9.5.0, dBias not support s_q/s_kv which aren't multiple of 64

https://github.com/pytorch/pytorch/issues/137347
Expected behavior
A clear and concise description of what you expected to happen.
Previously working code would remain working. The assertion appears to be incorrect as the dbias isn't used:
System Environment (please complete the following information):

cudnn_frontend 1.7.0

To Reproduce
Steps to reproduce the behavior:

Update PyTorch and update the submodule to 1.7.0
Run the example in https://github.com/pytorch/pytorch/issues/137347
Watch the cudnn error propogate

Additional context
Add any other context about the problem here.

Ping @eqy

IIUC cuDNN is targeting a fix in a few days-week in an upcoming release

This should be fixed by 9.5.0


Generator Listings Returns Error & Invalid Generator

ISSUE

When I try to list the generator types with /mv gen it throws an error in-game and refers to the console. After reviewing the console it shows this error,
https://pastebin.com/WkveyRJm
VERSIONS

Spigot:  1.12.2
Minecraft: 1.12.2
Multiverse: 2.5.0-b751

Need a bit more information. A faster response can be found on the Multiverse Discord. If you could go there and explain more, we could likely find a solution or find the culprit.


Added aliases support for custom models

Replaces #2610
Todo:

[x] Resolve ruff errors
[x] Resolve MyPy errors
[x] Check code coverage, must be 100%
[x] Have a look at _is_custom_directory, do we still use it.
[x] Clean up logic for _is_custom_directory
[ ] Prevent listing same model twice in get_model_listing(). Only actual models needs to be returned there, not the alias ones. Aliases only need to be used for model matching / autodiscovery. Then it would work the same as for the remote loader.
[x] @dagobert seems some directories are missing. i.e. light20, hs400 etc, which cause the test to fail.
Could you commit them to your original branch / PR please?

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

69 of 77 (89.61%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 99.788%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

custom_components/powercalc/power_profile/loader/local.py
66
74
89.19%

Totals

Change from base Build<PHONE_NUMBER>6:
-0.2%

Covered Lines:
4699

Relevant Lines:
4709

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>4
Details

78 of 86 (90.7%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 99.788%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

custom_components/powercalc/power_profile/loader/local.py
75
83
90.36%

Totals

Change from base Build<PHONE_NUMBER>6:
-0.2%

Covered Lines:
4699

Relevant Lines:
4709

💛  - Coveralls

If I understand your changes correctly, You changed the content of the library in the way that the keys manufacturer and model are always lower case but the values are the power_profile and within there the model is not, correct?

btw. which linter do you use?

I am fixing local loader tests and functions. Found some problem. Will commit later this evening.

If I understand your changes correctly, You changed the content of the library in the way that the keys manufacturer and model are always lower case but the values are the power_profile and within there the model is not, correct?
This way, find_model and other returns of model data will return the mixed case version?! I will change the tests to reflect this.

Yes that's totally correct.
The lookup library dictionary keys on initialize will all be lowercased, but also have the actual not lowercased information onPowerProfile object.
When trying to find the profile the search keys are lowercased as well, so they can find matches in the library.
On return the actual model will be returned.
We need to verify same model is not returned twice whenever there are aliases in get_model_listing(). I did not check that yet. We can also add a test for that.

btw. which linter do you use?

Linters used are ruff and for type checking also MyPy.
They should automatically run with pre-commit as well. Not sure why the commit checks were not running locally for you.
You could also run locally as follows:
poetry run ruff check . --fix
poetry run mypy custom_components/powercalc

I am fixing local loader tests and functions. Found some problem. Will commit later this evening.

That's great!

Think you'll need to run precommit install to install the pre commit hooks.
Than all commits will be checked and aborted when they are not passing through ruff and mypy and some other checks.
https://pre-commit.com/
pre commit config for powercalc is in .pre-commit-config.yaml

There is still one problem left:
If a within a manufacturer a model name and an alias or two aliases in different model.json are the same only one of them can be found in the generated library. This is due to the implementation of python dict.
To circumvent this we would need to check if a model within a manufacturer is already there before inserting it. Should we raise an error or only write an error to log?
Are you handling it in your remote library or check this before accepting a PR?

Created new PR #2629 for last comment. Please have a look. If you agree we can merge it.

We need to verify same model is not returned twice whenever there are aliases in get_model_listing(). I did not check that yet. We can also add a test for that. I don't think they are unified / deduplicated.

Can you roughly explain to me why an alias is not treated as it's own model? I thought of it as a way to reduce the number of power profiles in the library in the code logic. That it is the same device by a different name is more or less irrelevant.
Why do you make a distinction between model and alias?

We need to verify same model is not returned twice whenever there are aliases in get_model_listing(). I did not check that yet. We can also add a test for that. I don't think they are unified / deduplicated.

Can you roughly explain to me why an alias is not treated as it's own model? I thought of it as a way to reduce the number of power profiles in the library in the code logic. That it is the same device by a different name is more or less irrelevant. Why do you make a distinction between model and alias?

When we would list all the possible aliases the model dropdown will get overwhelmed.
For example this model:
https://github.com/bramstroker/homeassistant-powercalc/blob/c37c83196faf5188cdd8636be16384e03f069440/profile_library/signify/LCG002/model.json
And there are multiple more examples of this.
It's a decision I made in the past, and I think it makes sense to have the same consistent behaviour in the local loader as opposed to the remote loader.
There are models which share measurements and are a separate entry and model in the database.
There is a linked_lut option for that. Just search linked_lut in the codebase and you'll find some.

Full code coverage achieve again with https://github.com/bramstroker/homeassistant-powercalc/pull/2625/commits/b8000a1a40abf4ab5d6bb6fab85e790ae3514419
Als I changed the raising on LibraryLoadingError to just log error and continue with next profile.
As a small mistake in the local model definitions will otherwise stop the complete library loading, also the remote one, and make powercalc setup break.

I noticed some use case was not working correctly, I don't think it worked before our refactors as well.
So I've added a test for this scenario.
entity_id: switch.test
custom_model_directory: profiles/my_custom_model

Essentially it should not be mandatory to pass a manufacturer and model, and the virtual power sensor must be created correctly in this case, and load the model.json etc from config/profiles/my_custom_model directory.
Now the test is working we can see if the custom model directory code can be cleaned up some more.
Also on initialize there is code for the _is_custom_directory, but seems that wont work as manufacturer/model structure subdirectories are expected later. So I think we need to either remove this, or somehow incoorporate the custom directory logic in this code.

I check the model-alias thing later. I have a full plate today and will not be able to code.

When we would list all the possible aliases the model dropdown will get overwhelmed. For example this model: https://github.com/bramstroker/homeassistant-powercalc/blob/c37c83196faf5188cdd8636be16384e03f069440/profile_library/signify/LCG002/model.json And there are multiple more examples of this. It's a decision I made in the past, and I think it makes sense to have the same consistent behaviour in the local loader as opposed to the remote loader.

I understand your decision at that time. I guess there are two issues with it that should make you think it over again:

The list of manufacturers is already (too) long and will even grow over time much more as your user base grows, which I hope for. Also the number of models will grow and I don't think it is exadurated to estimate SONOFF or Shelly models to easily reach the number of 50+ each.
If I am adding an entry from the library manually and only see the (original) models someone had first when adding it to the library I will not know which one to choose from unless searching on your webpage first and look for it and the aliases.

To address 1.: You already cannot reduce the list of manufacturers and the list of models (without aliases) is growing steady. You already run into the problem you tried to avoid or will in time. Hence, you need to find a solution anyway. IMHO we could enhance the dropdown already to invalidate this problem. In most selector forms one can type in the text field and the "dropdown" list will reduce according to the letters one typed. You already use this in the config flow when selecting a source entity. I think it is the selector.EntitySelector part. This renders the problem obsolete.
To address 2.: This only needs to be addressed if you do not want to go for the "typing-filter" solution of 1. I would prefer. I think, if you only want to continue only listing the models you should at least show all aliases of the model as a subtext to each dropdown entry. I don't think it is realistic that a user needs to switch to your online library to search for the model to choose by looking at the aliases.
IMHO: Homeassistant has the endless-dropdown-list problem everywhere and their solution is the "type-filter". This should be what you should adapt.

Did think about my post?
How do we want to continue?
If you insist to implement the "no aliases" in get_model_listing I will implement it even I don't think it is the best way forward.
Just let me know, so we can merge soon.

Will come back on it this weekend. Too busy with other tasks and work atm.

Type ahead is unfortunately not implemented / supported for selectSelector. Core changes and changes to HA frontend code needs to happen to make this possible.
I don't think it's on the roadmap for the HA core devs, and I have no plans to undertake that task as it seems a lot of effort.
So I will not add aliases to the dropdowns currently for the remote loader. I have built the library application specifcally to easily find models, because the HA GUI forms are quite limited in that sense (no fuzzy search etc). So I think this perfectly fits the bill. Also there were never any complaints from users unable to configure/find there model, and 95% times of the time profiles will just be auto discovered.
Regarding the current PR for the local loader I'm fine with keeping the aliases listed there, as that won't be huge amounts anyway. So let's get this merged.

Did some final changes with https://github.com/bramstroker/homeassistant-powercalc/pull/2625/commits/3cf1a7d10be6326e7f48a4d220534b8099ae5a7d.

extract duplicated logic to add profile to lookup dict and check for duplications to separate method. Will make the _load_custom_library method more concise, less complex and easier to read
directly mutate instance property self._manufacturer_model_listing inside _load_custom_library.
Don't call _load_custom_library when is_custom_directory is true, because it won't be used anyway in that case.
move _load_json to class method, as it was defined on two places.
Return early in get_manufacturer_listing instead of if/else.

Thanks for helping out on getting this done @dagobert

Did some final changes with 3cf1a7d.
* extract duplicated logic to add profile to lookup dict and check for duplications to separate method. Will make the `_load_custom_library` method more concise, less complex and easier to read

* directly mutate instance property `self._manufacturer_model_listing` inside `_load_custom_library`.

* Don't call `_load_custom_library` when `is_custom_directory` is true, because it won't be used anyway in that case.

* move `_load_json` to class method, as it was defined on two places.

* Return early in `get_manufacturer_listing` instead of `if/else`.

The cleanup is great as a final step after all decisions were made! Your changes make sense even though with my python skill just at the beginning I would not have been able to do them that clean :)
It was a great experience to work with you on this and I am happy to have finally started programming python.
If the new version with these changes are out and I was able to get my HS powercalc custom models finalized I will start submitting them.
Cheers


FineTune Full Model (Mistral-7B) on 2xA100(80Gx2 = 160GB) give me OOM error.

Hi
I am trying to finetune Mistral-7B (instruct v0.2) on 2xA100, each A100 has 80GB so a total of 160GB using your script.
https://github.com/huggingface/trl/blob/main/examples/research_projects/stack_llama_2/scripts/dpo_llama2.py
Some changes that I make:

    model = AutoModelForCausalLM.from_pretrained(
        script_args.model_name_or_path,
        torch_dtype=torch.float16,
        device_map = 0,
    )
    model.config.use_cache = False
    model_ref = AutoModelForCausalLM.from_pretrained(
        script_args.model_name_or_path,
        torch_dtype=torch.float16,
        device_map  = 1,
    )

If I change the model to 1B model (TinyLlama/TinyLlama-1.1B-step-50K-105b), then my training script runs. However, using Mistral-7B,
I am getting this error:
[2024-01-05 17:45:01,718] torch.distributed.elastic.multiprocessing.api: [WARNING] Sending process 4112887 closing signal SIGTERM
[2024-01-05 17:45:02,823] torch.distributed.elastic.multiprocessing.api: [ERROR] failed (exitcode: -9) local_rank: 1 (pid: 4112888) of binary: /home/gpu_user/miniconda3/envs/myenv/bin/python
Traceback (most recent call last):
  File "/home/gpu_user/miniconda3/envs/myenv/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/home/gpu_user/miniconda3/envs/myenv/lib/python3.9/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
    args.func(args)
  File "/home/gpu_user/miniconda3/envs/myenv/lib/python3.9/site-packages/accelerate/commands/launch.py", line 1008, in launch_command
    multi_gpu_launcher(args)
  File "/home/gpu_user/miniconda3/envs/myenv/lib/python3.9/site-packages/accelerate/commands/launch.py", line 666, in multi_gpu_launcher
    distrib_run.run(args)
  File "/home/gpu_user/miniconda3/envs/myenv/lib/python3.9/site-packages/torch/distributed/run.py", line 797, in run
    elastic_launch(
  File "/home/gpu_user/miniconda3/envs/myenv/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 134, in __call__
    return launch_agent(self._config, self._entrypoint, list(args))
  File "/home/gpu_user/miniconda3/envs/myenv/lib/python3.9/site-packages/torch/distributed/launcher/api.py", line 264, in launch_agent
    raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:
============================================================
examples/research_projects/stack_llama_2/scripts/dpo_llama2_test.py FAILED

========
Here is my complete training script: code
My command:
accelerate launch examples/research_projects/stack_llama_2/scripts/dpo_llama2_test.py     --output_dir="./sft"     --max_steps=500     --logging_steps=10     --save_steps=10     --per_device_train_batch_size=1     --per_device_eval_batch_size=1     --gradient_accumulation_steps=1     --gradient_checkpointing=True     --learning_rate=1e-4     --lr_scheduler_type="cosine"     --warmup_steps=100     --weight_decay=0.05     --optim="paged_adamw_32bit"     --model_name_or_path=mistralai/Mistral-7B-Instruct-v0.2  --max_length 100
Any help?

Hi @candygocandy
can you replace device_map  = 1,  and device_map  = 0, respectively with device_map  = {"":1}, and device_map  = {"": 0}, ? Also make sure to use gradient_checkpointing by passing gradient_checkpointing=True. Also are you using LoRA?


input any task return error below

I switched over the gpt4 turbo and rewrote the dom parsing. It should be smarter now

Going to close this issue for now.


libcalico-go internal logging is disabled

Fixes https://github.com/projectcalico/libnetwork-plugin/issues/73

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@dmitry-yakutkin I think the code is OK here but it's hard for me to review. Can you rebase and squash your commits? I would like to see just a single commit with the code I need to review in it? Feel free to open another PR if you need to.


VIRUS

Windows Defender detect a  virus
https://i.ibb.co/MCDbjcw/virus.jpg

If you scan the file on VirusTotal, you will see that it is clearly labeled by the vast majority of virus scanners as "Not a Virus". Ex:
Not-a-virus:RemoteAdmin.Win64.RDPWrap.m
This is simply indicating that the virus scanning software has recognized it as a tool that CAN be used for malicious purposes. There are a great many remote networking tools that are labeled as such. One such example off the top of my head would be netcat.


[Enhancement]: Update to MelonLoader 0.6.1

Describe the new feature or enhancement
There are many issues in this current version, for example most of the patched Unity apps crash instantly after load, and the last message in the logs is:
[17:52:37.120] [DEBUG] Return Value = 0
An update to MelonLoader 0.6.1 should fix most of the issues, and, according to developer's responses on this kind of issue, it will also fix crashing.
https://github.com/LavaGang/MelonLoader/releases/tag/v0.6.1

Will not be done in this fork, Lemon 0.6.1 will be developed in the main ML repo


Added react components for households and subitems.

Added generic progress bar component and utilized it in the households and impact
Added font-awesome so at least the icons would show
Added bootstrap so the dropdown would work
Had issue with being unable to import bootstrap... had to require it for some unknown reason.

Nice! LGTM! Any objections, @browniefed?

Some minor comments, but looks good.

Thanks so much for all of the feedback. Node and React aren't exactly my specialities so I'm running on however far my Google-Fu and can carry me.


RRTGMP 0.13.3 breaks Atmos

See here for example: https://github.com/CliMA/ClimaAtmos.jl/actions/runs/9116346700/job/25064749944?pr=3021

Fixed in 0.13.4


[question] validation list of elements

Hello!
I trying to validate list like this:
---
- id: FIRST_EL
  queries:
    - sql: "select 1 from database1"
      name: first_query
    - sql: "select 2 from database1"
      name: second_query
      intrval: 4
      tim: 5
- id: SECOND_EL
  queries:
    - sql: "select 3 from database2"
      name: first_query1
    - sql: "select 4 from database2"
      name: second_query1

I was try Schema like:
#query: {
	name: string
	sql: string
	interval?: *1 | int
        timeout?: *5 | int
}

#ids: {
    id: string
	queries: [...#query]
}

[...#ids]

and try validating my yaml:
 cue vet -c -E -s -v config.yaml rules.cue

Validating was successful.
I was try to use only one element, like:
#query: {
	name: string
	sql: string
	interval?: *1 | int
        timeout?: *5 | int
}

#ids: {
    id: string
	queries: [...#query]
}

[#ids]

and only first item in config:
---
- id: FIRST_EL
  queries:
    - sql: "select 1 from database1"
      name: first_query
    - sql: "select 2 from database1"
      name: second_query
      intrval: 4
      tim: 5

after this validating was failed:
0.queries.1: field not allowed: intrval:
    ./config.yaml:3:2
    ./config.yaml:8:8
    ./rules.cue:1:1
    ./rules.cue:1:9
    ./rules.cue:10:15
    ./rules.cue:13:1
    ./rules.cue:13:2

What wrong with using list of items? Why validating of lists is not working?
Maybe I wring with my schema?

I'm not sure we should close this, there is ambiguity as to whether your original example should work. My intuition is that it should

I checked my code with you solution. And its work.

Yes, my solution works.
What I am saying is that I think your original code should probably work too.

I think should too. But this issue just question. And i think for bug needed new issue?
If needed, I can open this issue.

Apologies, I completely missed the point!
As a couple of additional data points, it seems like this is only an issue with open-ended lists, closed lists seem to work fine, as suggested by the example of using single element, but also a closed list of multiple elements:
// rules.cue
#query: {
        name:      string
        sql:       string
        interval?: *1 | int
        timeout?:  *5 | int
}

#ids: {
        id: string
        queries: [...#query]
}

[#ids, #ids]

# config.yaml
---
- id: FIRST_EL
  queries:
    - sql: "select 1 from database1"
      name: first_query
    - sql: "select 2 from database1"
      name: second_query
- id: SECOND_EL
  queries:
    - sql: "select 3 from database2"
      name: first_query1
    - sql: "select 4 from database2"
      name: second_query1
      intrval: 4
      tim: 5

$ cue vet config.yaml rules.cue
1.queries.1: field not allowed: intrval:
    ./config.yaml:2:2
    ./config.yaml:14:8
    ./rules.cue:1:1
    ./rules.cue:1:9
    ./rules.cue:10:15
    ./rules.cue:13:1
    ./rules.cue:13:8

This also causes cue vet to (incorrectly) succeed:
// rules.cue
#query: {
        name:      string
        sql:       string
        interval?: *1 | int
        timeout?:  *5 | int
}

#ids: {
        id: string
        queries: [...#query]
}

[#ids, #ids, ...#ids]

However, removing [...#ids] from the rules.cue and then using the same expression via -d validates correctly:
$ cue vet config.yaml rules.cue -d '[...#ids]'
1.queries.1: field not allowed: intrval:
    --schema:1:5
    ./config.yaml:2:2
    ./config.yaml:14:8
    ./rules.cue:1:9
    ./rules.cue:10:15

@slewiskelly Thank you for suggesting!


Revamp onboarding and review existing rules and guidance for new or upstream projects

The Vale at Red Hat Style has grown to the point where many of the suggestion rules are not helpful and actively discourage new users and projects from using Vale in their projects.
The Vale at Red Hat Style should be useful for all projects, it should not discourage new users.
We should fix or update Rules and/or guidance to make the onboarding process better for new projects.  For example, Quarkus have developed a cut down version of the VRH rules for their project.

@aireilly did you have any PRs open for this? Is help required? One for hacktoberfest? Is it a good first issue?

I have a few recent PRs to update and streamline current rule sets. Always more to do!

If there are any discrete pieces of work that you could break into a separate issue please do so and perhaps it could be a "good first issue" for hacktoberfest. Thanks!


URL is not defined issue on SSR components

I have a component that constructs links like so:
export function LinkButton(props) {
  const params = { ... }
  const url = new URL('http://example.org')
  url.search = new URLSearchParams(params).toString()

  return (
    <a href={url.toString()}>
      Link
    </a>
  )
}

I would link to for it to be server-side rendered, but when I do I get the follow error: ReferenceError: URL is not defined on the above code snippet. This makes sense – URL is a web api – but it has also been present in Node since v10.
I'm running Node v16.4.2 which does have URL on the global object (I checked in the repl), so I'm at a loss for why react_on_rails is giving this error. I'm not sure if this is a bug or by design, but I'd appreciate any help on how I can use URL in SSR components!

Hi @justin808 – sorry I totally missed your notification on this as well! I resolved it by just writing my own URL param parser. Thanks for the insight on the Node vs ExecJS renderers, I didn't realize the Node renderer was a pro feature! Will close this out now since it is resolved.


Can't hear the audio on the Tooltips video

I turned up the audio volume on both my laptop and in the video itself and still could not hear the voice well enough to understand it.
I could hear a very faint female voice, and I have been using the audio on this system, but on this page and this video, very, very quiet.

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

ID: dace85eb-ccbf-ce99-1204-297fc32a3048
Version Independent ID: 6f3d0901-604f-9841-b4bc-e7e532df2edb
Content: Create modern visual tooltips (preview) - Power BI
Content Source: powerbi-docs/create-reports/desktop-visual-tooltips.md
Service: powerbi
Sub-service: pbi-reports-dashboards
GitHub Login: @maggiesMSFT
Microsoft Alias: maggies

Thanks for your comment, @Cornan. This issue has been assigned to the doc author for review.

Hi @Cornan,
I just tested this video on both Edge and Chrome, and it worked well with a good volume level.
Perhaps the problem is elsewhere? It could be your browser's settings for example. You can also try to download the video and open it in another application.
Hope this helps.
Kesem


Add a DNS-based EndpointGroup

Many service discovery systems support returning a list of endpoints as records in a DNS response, and since DNS resolution is built into netty, it makes sense for armeria to add support out of the box. Some methods use A records with IP addresses and others use SRV records with CNAMEs - so armeria should ideally support at least both of these.
I dug through netty's DNS resolver package and found a lot of useful logic, but am not sure if there is a good integration point for it.
The biggest problem is I don't see a way to support SRV records - the API only exposes knobs for address family, e.g. IPV4 and IPV6, which correspond to A and AAAA only.
https://github.com/netty/netty/blob/1767814a466f9fc6a51c87a84bd73d93eb0ca1d7/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolver.java
I think we also need a way to always be able to know the most recent result for the DNS query for monitoring - it's very important to be able to present the mapping from service name -> resolved endpoints, and it's not clear this can be accomplished with the default DnsNameResolver (maybe by showing the state of the dns cache?).
That said, there's much logic in DnsNameResolver, DnsNameResolverContext, and RoundRobinDnsAddressResolverGroup that I don't think we want to duplicate into an endpoint group implementation.

@trustin any thoughts on a clean DNS-based EndpointGroup implementation? I think I need some pointers (including whether we should edit APIs in netty) but with some pointers, can do the implementation.

Very cool! DnsNameResolverBuilder should be a good starting point for you:

https://netty.io/4.1/api/io/netty/resolver/dns/DnsNameResolverBuilder.html

You'll need to use DnsNameResolver.resolveAll() or query() depending on how much information you need.

With query(), you can send an arbitrary DNS question. (I guess this is what you're looking for.)

I think we also need a way to always be able to know the most recent result for the DNS query for monitoring - it's very important to be able to present the mapping from service name -> resolved endpoints, and it's not clear this can be accomplished with the default DnsNameResolver (maybe by showing the state of the dns cache?).

I guess you're gonna need to read the TTL value of the answer record you received and re-query when it's expired. You could implement this by sending an initial query and then scheduling a follow-up one after <TTL> seconds.

Yeah - I found query and am able to get DNS responses - but found there's tons and tons of logic dealing with correctly handling the response. It would be quite sad to have to duplicate it
https://github.com/netty/netty/blob/4.1/resolver-dns/src/main/java/io/netty/resolver/dns/DnsNameResolverContext.java#L336
It's why using resolve would be much nicer, but has the limitation of no SRV support. Any thoughts on a cleaner way to avoid duplicating what looks like pretty hairy (i.e. easily buggy) code?

Just to follow up, I've mostly completed an implementation that manually handles the query response. While a good amount of copy-paste, by removing some of the more esoteric features that probably don't apply in service discovery, I could simplify it quite a bit.
https://github.com/anuraaga/armeria/blob/dev_rag/core/src/main/java/com/linecorp/armeria/client/endpoint/dns/DnsEndpointGroup.java


pyproject.toml file sometimes observes non-0.0.0 versions

I feel like this loves to constantly change lol I can't remember if this is correct so I will highlight this section for you to double check.

Originally posted by @jenna-tomkinson in https://github.com/WayScience/coSMicQC/pull/102#discussion_r1781463496

Saw this again during the CytoDataFrame migration in wayscience/cytodataframe#4 . I couldn't reproduce the issue but it seemed like a race condition between Poetry and Poetry Dynamic Versioning (one finishes or sneaks through where it shouldn't).


Discuss binding execution of initAll to the DOMContentLoaded event

What
Discuss binding execution of initAll to the DOMContentLoaded event
Why
This would ensure that initAll always runs after the DOM is completely constructed and document.body is available, regardless of where the <script> tag loading GOV.UK Frontend is added (for ex. if it's added in a classic <script> tag in the <head>).
Who needs to work on this
Developers
Who needs to review this
Developers
Done when

[ ] We've discussed this option and decided whether we want to implement it or not.

We'll leave it out for now in favour of explaining more our use of type=module. We can revisit if support requess come in and people are unable to use type="module" in places.


Update README.md

Updated README to reflect new changes to config including configurable options sendBatchSize and sendInterval

Thanks @challett :+1:


net/http: nginx seems to require that entire request be read before writing response

go version go1.6.2 linux/amd64

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/data01/home/xiangchao01/code"
GORACE=""
GOROOT="/data01/home/xiangchao01/bin/go"
GOTOOLDIR="/data01/home/xiangchao01/bin/go/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

Sorry i can't provide runnable program, but I think this is a common problem, I find this error in many projects。
Nginx  -> (My Go HTTP server)

Nginx use upstream, total QPS is about 3000，and about 1 second, I see an error log in my nginx error log, the log like this:
 2016/05/22 18:54:27 [error] 192493#0: *23511789339 readv() failed (104: Connection reset by peer) while reading upstream,.....

if I use go1.3.3 to build this project , there is no error log.
I catch  the TCP pocket

I doubt there is anything we can do if we don't have a way to recreate the problem.  You will need to do some more debugging yourself to understand why and when the connection is being closed on the client side.
If this is a common problem, as you suggest, then I hope that somebody can provide a program that demonstrates it.

OK，I will try to provide a program.

I can provide program now.
The client code
package main

import (
        "bytes"
        "encoding/json"
        "fmt"
        "net/http"
)

func main() {
        for {
                req()
        }
}

func ret() string {
        s := "k"
        for i := 0; i < 12; i++ {
                s = s + s
        }
        return s
}

func req() {
        fmt.Println("start req")
        val := struct {
                Data string `json:"data"`
        }{Data: ret()}
        data, _ := json.Marshal(val)
        r, err := http.Post("http://<IP_ADDRESS>:9989", "application/json", bytes.NewBuffer(data))
        if err != nil {
                fmt.Println(err)
        } else {
                fmt.Println("Status Code: ", r.Status)
        }
        r.Body.Close()
}

The server code
package main

import (
        "compress/gzip"
        "encoding/json"
        "io"
        "io/ioutil"
        "net/http"
)

func main() {
        mux := http.NewServeMux()
        mux.HandleFunc("/", HelloHandler)
        server := &http.Server{Addr: ":8998", Handler: mux}
        server.ListenAndServe()
}

func HelloHandler(w http.ResponseWriter, r *http.Request) {
        reader, err := gzip.NewReader(r.Body) // I make this mistake Purposely.
        if err == nil {
                io.Copy(ioutil.Discard, reader)
        }
        w.Header().Set("Content-Type", "application/json")
        w.WriteHeader(http.StatusOK)
        val := struct {
                Message string `json:"message"`
        }{
                Message: "Hello World!",
        }
        body, _ := json.Marshal(val)
        w.Write(body)
}

The nginx config
worker_processes  1;

events {
    worker_connections  111024;
}

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;

    upstream myapp {
        server <IP_ADDRESS>:8998;
    }

    server {
        listen       9989;
        server_name  localhost;

        location / {
            proxy_pass http://myapp;
        }

        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
}

The nginx error log
2016/05/24 15:50:53 [error] 53509#0: *394941 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *394955 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395009 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395029 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395049 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395069 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395077 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395129 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395169 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395319 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"

when I build server code with go1.3.3 version, there is no "reset by peer" error in nginx error log,
but I build server code with go1.6.2 version, the "reset by peer" error appear in nginx error log.
In the server code, I use gzip reader to read body,  I know this will return error, I just want to make this case.
@ianlancetaylor

Does the error occur if you remove nginx from the scenario ?
On Tue, May 24, 2016 at 6:06 PM, 项超<EMAIL_ADDRESS>wrote:

I can provide program now.
The client code
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
for {
req()
}
}
func ret() string {
s := "k"
for i := 0; i < 12; i++ {
s = s + s
}
return s
}
func req() {
fmt.Println("start req")
val := struct {
Data string json:"data"
}{Data: ret()}
data, _ := json.Marshal(val)
r, err := http.Post("http://<IP_ADDRESS>:9989", "application/json", bytes.NewBuffer(data))
if err != nil {
fmt.Println(err)
} else {
fmt.Println("Status Code: ", r.Status)
}
r.Body.Close()
}
The server code
package main
import (
"compress/gzip"
"encoding/json"
"io"
"io/ioutil"
"net/http"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/", HelloHandler)
server := &http.Server{Addr: ":8998", Handler: mux}
server.ListenAndServe()
}
func HelloHandler(w http.ResponseWriter, r *http.Request) {
reader, err := gzip.NewReader(r.Body) // I make this mistake Purposely.
if err == nil {
io.Copy(ioutil.Discard, reader)
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
val := struct {
Message string json:"message"
}{
Message: "Hello World!",
}
body, _ := json.Marshal(val)
w.Write(body)
}
The nginx config
worker_processes  1;
events {
worker_connections  111024;
}
http {
include       mime.types;
default_type  application/octet-stream;
sendfile        on;
upstream myapp {
    server <IP_ADDRESS>:8998;
}

server {
    listen       9989;
    server_name  localhost;

    location / {
        proxy_pass http://myapp;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }
}

}
The nginx error log
2016/05/24 15:50:53 [error] 53509#0: *394941 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *394955 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395009 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395029 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395049 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395069 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395077 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395129 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395169 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
2016/05/24 15:50:53 [error] 53509#0: *395319 readv() failed (104: Connection reset by peer) while reading upstream, client: <IP_ADDRESS>, server: localhost, request: "POST / HTTP/1.1", upstream: "http://<IP_ADDRESS>:8998/", host: "<IP_ADDRESS>:9989"
when I build server code with go1.3.3 version, there is no "reset by peer"
error in nginx error log,
but I build server code with go1.6.2 version, the "reset by peer" error
appear in nginx error log.
In the server code, I use gzip reader to read body, I know this will
return error, I just want to make this case.
@ianlancetaylor https://github.com/ianlancetaylor
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://github.com/golang/go/issues/15789#issuecomment-221195841

If I remove nginx,  there is no error .

I update the service code like this
package main

import (
        "compress/gzip"
        "encoding/json"
        "io"
        "io/ioutil"
        "net/http"
)

func main() {
        mux := http.NewServeMux()
        mux.HandleFunc("/", HelloHandler)
        server := &http.Server{Addr: ":8998", Handler: mux}
        server.ListenAndServe()
}

func HelloHandler(w http.ResponseWriter, r *http.Request) {
        reader, err := gzip.NewReader(r.Body)
        if err == nil {
                io.Copy(ioutil.Discard, reader)
        } else {
                io.Copy(ioutil.Discard, r.Body) // this is diffrent
        }
        w.Header().Set("Content-Type", "application/json")
        w.WriteHeader(http.StatusOK)
        val := struct {
                Message string `json:"message"`
        }{
                Message: "Hello World!",
        }
        body, _ := json.Marshal(val)
        w.Write(body)
}

There is no errors when I use the follow code
        if err == nil {
                io.Copy(ioutil.Discard, reader)
        } else {
                io.Copy(ioutil.Discard, r.Body) // this is diffrent
        }

It seems that I should read all of request data in body before  write response.

So it sounds like the problem is that when using nginx, the entire request must be read before the response is written.  I'll leave this for analysis during the 1.8 release.

Yeah, this is a common situation with HTTP/1 implementations. I wouldn't even say "problem" because it's extremely ill-defined on whether you can read & write at the same time.
https://golang.org/pkg/net/http/#ResponseWriter does already say:
        // Depending on the HTTP protocol version and the client, calling
        // Write or WriteHeader may prevent future reads on the
        // Request.Body. For HTTP/1.x requests, handlers should read any
        // needed request body data before writing the response. Once the
        // headers have been flushed (due to either an explicit Flusher.Flush
        // call or writing enough data to trigger a flush), the request body
        // may be unavailable. For HTTP/2 requests, the Go HTTP server permits
        // handlers to continue to read the request body while concurrently
        // writing the response. However, such behavior may not be supported
        // by all HTTP/2 clients. Handlers should read before writing if
        // possible to maximize compatibility.
        Write([]byte) (int, error)

Unless there's some code in the standard library that writes before reading, I'm not sure there's anything for us to do here. Closing, but feel free to reopen if you disagree and I'm not understanding what this bug is about.

It seems golang should ensure that a FIN packet is sent before any RST packet.
https://trac.nginx.org/nginx/ticket/1037
And gunicorn seems fixed this issue.
https://github.com/benoitc/gunicorn/pull/874


Snapshots

What does this PR do?
During a test run on the master branch, if the tests pass, then we continue to this stage which pushes a snapshot to the artifact repository.
Checklist

[x] My code follows the style guidelines of this project
[x] I have rebased my changes on top of the latest master branch

[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes

[ ] I have updated CHANGELOG.asciidoc
[ ] I have updated supported-technologies.asciidoc
[ ] Added an API method or config option? Document in which version this will be introduced
[ ] Added an instrumentation plugin? How did you make sure that old, non-supported versions are not instrumented by accident?

Author's Checklist

Related issues

Closes https://github.com/elastic/apm-agent-java/issues/1056
Points to consider
I modified the Maven command so that it includes a -DskipTests because we've already run them in this case but I just want to make sure that's OK with the team since it's a change from how snapshots are currently deployed.
I am submitting this as a draft because I think there's still some discussion surrounding this. I will fill in more details over at https://github.com/elastic/apm-agent-java/issues/1056

:broken_heart: Build Failed

Expand to view the summary

Build stats

Build Cause: [Pull request #1167 opened]

Start Time: 2020-04-30T13:55:13.561+0000

Duration: 15 min 39 sec (879272)

Commit: 9c8be77be88d23cbffe81d4ab8dcce2a38f08088

Test stats :test_tube:

Test
Results

Failed
1

Passed
723

Skipped
1

Total
725

Test errors
Expand to view the tests failures

Name: Tests / Unit Tests / testHttpCallWithIpv4 – co.elastic.apm.agent.okhttp.OkHttp3ClientAsyncInstrumentationTest

Status: FAILED
Age: 1
Duration: 1.679
Error Details: null

Steps errors
Expand to view the steps failures

Name: Shell Script

Description: #!/bin/bash                set -euxo pipefail                ./mvnw test

Result: FAILURE

Duration: 4 min 51 sec<

Start Time: 2020-04-30T14:05:11.063+0000

Log output
Expand to view the last 100 lines of log output

[2020-04-30T14:09:37.745Z] [INFO] co.elastic.apm:spring-boot-1-5 ..................... SKIPPED
[2020-04-30T14:09:37.745Z] [INFO] co.elastic.apm:spring-boot-2 ....................... SKIPPED
[2020-04-30T14:09:37.745Z] [INFO] co.elastic.apm:spring-boot-2-base .................. SKIPPED
[2020-04-30T14:09:37.745Z] [INFO] co.elastic.apm:spring-boot-2-jetty ................. SKIPPED
[2020-04-30T14:09:37.746Z] [INFO] co.elastic.apm:spring-boot-2-tomcat ................ SKIPPED
[2020-04-30T14:09:37.746Z] [INFO] co.elastic.apm:spring-boot-2-undertow .............. SKIPPED
[2020-04-30T14:09:37.746Z] [INFO] ------------------------------------------------------------------------
[2020-04-30T14:09:37.746Z] [INFO] BUILD FAILURE
[2020-04-30T14:09:37.746Z] [INFO] ------------------------------------------------------------------------
[2020-04-30T14:09:37.746Z] [INFO] Total time: 43.686 s
[2020-04-30T14:09:37.746Z] [INFO] Finished at: 2020-04-30T14:09:37Z
[2020-04-30T14:09:37.746Z] [INFO] Final Memory: 54M/187M
[2020-04-30T14:09:37.746Z] [INFO] ------------------------------------------------------------------------
[2020-04-30T14:09:37.746Z] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.1:javadoc (default-cli) on project apm-redisson-plugin: An error has occurred in Javadoc report generation:
[2020-04-30T14:09:37.746Z] [ERROR] Exit code: 143
[2020-04-30T14:09:37.746Z] [ERROR] Command line was: /var/lib/jenkins/.java/java10/bin/javadoc @options @packages
[2020-04-30T14:09:37.746Z] [ERROR]
[2020-04-30T14:09:37.746Z] [ERROR] Refer to the generated Javadoc files in '/var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1167/src/github.com/elastic/apm-agent-java/apm-agent-plugins/apm-redis-plugin/apm-redisson-plugin/target/site/apidocs' dir.
[2020-04-30T14:09:37.746Z] [ERROR] -> [Help 1]
[2020-04-30T14:09:37.746Z] [ERROR]
[2020-04-30T14:09:37.746Z] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[2020-04-30T14:09:37.746Z] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[2020-04-30T14:09:37.746Z] [ERROR]
[2020-04-30T14:09:37.746Z] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[2020-04-30T14:09:37.746Z] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[2020-04-30T14:09:37.746Z] [ERROR]
[2020-04-30T14:09:37.746Z] [ERROR] After correcting the problems, you can resume the build with the command
[2020-04-30T14:09:37.746Z] [ERROR]   mvn <goals> -rf :apm-redisson-plugin
[2020-04-30T14:09:39.031Z] script returned exit code 143
[2020-04-30T14:09:42.516Z] Post stage
[2020-04-30T14:09:42.528Z] Post stage
[2020-04-30T14:09:43.046Z] Recording test results
[2020-04-30T14:09:43.066Z] Recording test results
[2020-04-30T14:09:43.230Z] Failed in branch Javadoc
[2020-04-30T14:09:44.462Z] Running in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1167/src/github.com/elastic/apm-agent-java
[2020-04-30T14:09:44.475Z] Running in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1167/src/github.com/elastic/apm-agent-java
[2020-04-30T14:09:44.508Z] [INFO] Codecov: Getting branch ref...
[2020-04-30T14:09:44.519Z] [INFO] Codecov: Getting branch ref...
[2020-04-30T14:09:44.559Z] Masking supported pattern matches of $GITHUB_TOKEN
[2020-04-30T14:09:44.587Z] Masking supported pattern matches of $GITHUB_TOKEN
[2020-04-30T14:09:45.028Z] [INFO] Codecov: Sending data...
[2020-04-30T14:09:45.501Z] [INFO] Codecov: Sending data...
[2020-04-30T14:09:46.364Z] + curl -s -o codecov.sh https://codecov.io/bash
[2020-04-30T14:09:46.364Z] + bash codecov.sh
[2020-04-30T14:09:46.364Z]
[2020-04-30T14:09:46.364Z]   _____          _
[2020-04-30T14:09:46.364Z]  / ____|        | |
[2020-04-30T14:09:46.364Z] | |     ___   __| | ___  ___ _____   __
[2020-04-30T14:09:46.364Z] | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
[2020-04-30T14:09:46.364Z] | |___| (_) | (_| |  __/ (_| (_) \ V /
[2020-04-30T14:09:46.364Z]  \_____\___/ \__,_|\___|\___\___/ \_/
[2020-04-30T14:09:46.364Z]                               Bash-tbd
[2020-04-30T14:09:46.364Z]
[2020-04-30T14:09:46.364Z]
[2020-04-30T14:09:46.364Z] ==> Jenkins CI detected.
[2020-04-30T14:09:46.365Z]     project root: .
[2020-04-30T14:09:46.480Z] + curl -s -o codecov.sh https://codecov.io/bash
[2020-04-30T14:09:46.481Z] + bash codecov.sh
[2020-04-30T14:09:46.481Z]
[2020-04-30T14:09:46.481Z]   _____          _
[2020-04-30T14:09:46.481Z]  / ____|        | |
[2020-04-30T14:09:46.481Z] | |     ___   __| | ___  ___ _____   __
[2020-04-30T14:09:46.481Z] | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
[2020-04-30T14:09:46.481Z] | |___| (_) | (_| |  __/ (_| (_) \ V /
[2020-04-30T14:09:46.481Z]  \_____\___/ \__,_|\___|\___\___/ \_/
[2020-04-30T14:09:46.481Z]                               Bash-tbd
[2020-04-30T14:09:46.481Z]
[2020-04-30T14:09:46.481Z]
[2020-04-30T14:09:46.481Z] ==> Jenkins CI detected.
[2020-04-30T14:09:46.481Z]     project root: .
[2020-04-30T14:09:46.481Z] --> token set from env
[2020-04-30T14:09:46.829Z] --> token set from env
[2020-04-30T14:09:46.829Z]     Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
[2020-04-30T14:09:46.829Z] ==> Running gcov in . (disable via -X gcov)
[2020-04-30T14:09:46.829Z] ==> Python coveragepy not found
[2020-04-30T14:09:46.829Z] ==> Searching for coverage reports in:
[2020-04-30T14:09:46.829Z]     + .
[2020-04-30T14:09:47.083Z]     Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
[2020-04-30T14:09:47.083Z] ==> Running gcov in . (disable via -X gcov)
[2020-04-30T14:09:47.083Z] ==> Python coveragepy not found
[2020-04-30T14:09:47.083Z] ==> Searching for coverage reports in:
[2020-04-30T14:09:47.083Z]     + .
[2020-04-30T14:09:47.092Z] --> No coverage report found.
[2020-04-30T14:09:47.092Z]     Please visit http://docs.codecov.io/docs/supported-languages
[2020-04-30T14:09:47.109Z] --> No coverage report found.
[2020-04-30T14:09:47.109Z]     Please visit http://docs.codecov.io/docs/supported-languages
[2020-04-30T14:09:48.738Z] Failed in branch Smoke Tests 02
[2020-04-30T14:09:48.807Z] Failed in branch Smoke Tests 01
[2020-04-30T14:09:49.157Z] Stage "Integration Tests" skipped due to earlier failure(s)
[2020-04-30T14:09:49.466Z] Stage "Snapshots" skipped due to earlier failure(s)
[2020-04-30T14:09:49.572Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-04-30T14:09:49.614Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-04-30T14:09:49.735Z] Stage "AfterRelease" skipped due to earlier failure(s)
[2020-04-30T14:09:50.302Z] Running on Jenkins in /var/lib/jenkins/workspace/_java_apm-agent-java-mbp_PR-1167
[2020-04-30T14:09:51.706Z] [INFO] getVaultSecret: Getting secrets
[2020-04-30T14:09:51.798Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-04-30T14:09:53.156Z] + chmod 755 generate-build-data.sh
[2020-04-30T14:09:53.156Z] + ./generate-build-data.sh https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1167/ https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1167/runs/1 FAILURE 879272
[2020-04-30T14:09:53.719Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1167/runs/1/steps/?limit=10000 -o steps-info.json
[2020-04-30T14:09:53.719Z] INFO: curl https://apm-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/apm-agent-java/apm-agent-java-mbp/PR-1167/runs/1/tests/?status=FAILED -o tests-errors.json

Codecov Report

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

@@             Coverage Diff             @@
##             master    #1167     +/-   ##
===========================================
  Coverage     59.37%   59.37%
+ Complexity     2862       85   -2777
===========================================
  Files           331      331
  Lines         15017    15017
  Branches       2087     2087
===========================================
  Hits           8917     8917
- Misses         5489     5490      +1
+ Partials        611      610      -1

Impacted Files
Coverage Δ
Complexity Δ

...va/co/elastic/apm/agent/report/ReportingEvent.java
86.66% <0.00%> (-10.00%)
0.00% <0.00%> (-12.00%)

...co/elastic/apm/agent/report/ApmServerReporter.java
56.07% <0.00%> (-3.74%)
0.00% <0.00%> (-13.00%)

...o/elastic/apm/agent/profiler/SamplingProfiler.java
77.93% <0.00%> (-0.84%)
0.00% <0.00%> (-45.00%)

...java/co/elastic/apm/agent/bci/ElasticApmAgent.java
73.75% <0.00%> (+1.06%)
0.00% <0.00%> (-42.00%)
:arrow_up:

...c/apm/agent/bci/MatcherTimerLifecycleListener.java
93.33% <0.00%> (+20.00%)
0.00% <0.00%> (-3.00%)
:arrow_up:

.../elastic/apm/agent/bci/bytebuddy/MatcherTimer.java
93.33% <0.00%> (+26.66%)
0.00% <0.00%> (-4.00%)
:arrow_up:

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 f49486c...d0c6db9. Read the comment docs.

:green_heart: Build Succeeded

Expand to view the summary

Build stats

Build Cause: [Branch indexing]

Start Time: 2020-05-08T21:50:47.667+0000

Duration: 36 min 22 sec (2181681)

Commit: 2c18630a430d948a642156ab433451b9c881ae39

Test stats :test_tube:

Test
Results

Failed
0

Passed
1232

Skipped
12

Total
1244

Hi @SylvainJuge . In case you missed it, we're just waiting for a review on this change. Not urgent at all though. :) Thanks!

Why are the nightly snapshots plus the snapshot builds for PR artifacts not good enough?
I'm not sure it's worth the additional risk of exposing credentials. I think it's also important that the snapshot build is performed in a very similar way than the actual release (see also https://github.com/elastic/apm-agent-java/issues/1056#issuecomment-600636664).

Codecov Report

Merging #1167 into master will decrease coverage by 1.87%.
The diff coverage is 55.53%.

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

After discussing this a bit with @felixbarny and @eyalkoren , we don't think this is a good idea to move this forward as-is.
The initial idea (https://github.com/elastic/apm-agent-java/issues/1056) was to cut down build time and avoid duplicate build executions, which made sense if everything was executed in a single CI system.
For now, we think that keeping things as-is (with snapshots executed daily on internal CI), is a better option for the following reasons:

using maven repository credentials on the public CI is dangerous and could lead to a credentials leak
while close, both CIs aren't 100% identical and it often happens that something fails on one, but not on the other. Because we want to prevent discovering issues at release time, having a snapshot build daily is a good proxy to detecting potential issues early.
When an ad-hoc snapshot is needed, for example to help diagnose a customer issue, using PR artifacts links to the public CI can be used.

Hi @SylvainJuge . Thanks for taking the time to write this summary. I'm totally fine with this and agree with all of your conclusions. I'll go ahead and close this unmerged.


BUG: RecursionError on init

cite_item = CiteItem(answer=answer, context=context)
inference = Inference()
Both of them make this error:
RecursionError: maximum recursion depth exceeded while calling a Python object
This happens in the example file as well as your test file.

I'm using python 3.12.

I try to create the error but it is working for me.
please paste the complete error.

Could you please create a new environment and install rag_citation? I suspect there’s a conflict between sklearn, numpy, and rag_citation.

I tried to clone the git, I gave me a different error:
OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory.

use this command to download spacy model
python -m spacy download en_core_web_sm
or
python3 -m spacy download en_core_web_sm
for your  reference:
https://spacy.io/usage/models

It works for me now.
I'll try to figure out what caused the issue. I'll update it here so don't close it just yet.

okay
Thanks a lot 🙏


[move-prover][refactoring] Use Boogie {:msg} and {:print} for diagnosis.

This PR uses the assert {:msg ..} feature in Boogie to generate a verification failure message instead of the indirect, fragile mapping <boogie_source_location> -> <move_source_location> -> <verification_infos>. Besides that the code significantly simplifies, it also removes some restrictions around the problem of having multiple verification conditions and messages generated from the same Move source location.
The PR also uses the assume {:print ..} feature to track program counter location, instead of Boogie's builtin execution trace. Now each execution generates an augemented trace as such:
assert_failed(2,1796,1905): abort code not covered by any of the `aborts_if` or `aborts_with` clauses
Augmented execution trace:
$at(2,1630,1791)                                // file id, start position, end position
$track_local(0,1,0):($Integer 2)          // module id, function id, temporary index: value
$at(2,1695,1696)
$at(2,1766,1774)
$track_abort(0,1):2                             // module id, function id: code value
$at(2,1796,1905)
*** MODEL
..

This removes a ton of complicated code in the BoogieWrapper to analyze a verification failure. We can directly transform the augemented trace sequentially into the expected diagnosis output. The traces are now more accurate and reliable as well, as the heuristics to associate variable bindings with source locations are gone.
Finally, this PR removes support of the v1 translation scheme from the Prover's main code. The files are still there for reference in move-prover/src/v1_for_ref but not connected to the code base any longer.

Motivation
Prover Simplification
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
Baseline tests. Many baselines files have updates because the diagnosis quality improved.
Related PRs
NA

release binaries dependency change summary:
target packages:
  M rand 0.7.3 (direct third-party, crates.io) (other versions: 0.4.6, 0.6.5, 0.8.3)
    * status changed from transitive third-party
    * (unchanged features: alloc, default, getrandom, getrandom_package, libc, std)

/land


Running API requests through backend server

Hi guys,
I would like to run the API requests through my backend server that handles user authentication because I don't want to expose my API key to the public. Is there any way to change the API request URL without breaking the app?
Thanks!

What does this have to do with this module ?

I'm asking if there is a way to modify this module to make the calls through a custom URL instead of having to provide the API key in the app settings

The module uses the (google) sdk so it just follows their implementation.


Add Italian language for intro-to-coding.md

@MichaelCurrin
Description
Add Italian language for intro-to-coding.md
Issues
@MichaelCurrin please also delete or move to appropriate folder language-guides.md, I found out that isn't anymore in learn-to-code/en/
<!--  Please also add labels to the PR using Github's labelling e.g. enhancement, bug, translation

Thanks.
I deleted language-guides.md
The same content is already under topics bu more up to date therehttps://github.com/MichaelCurrin/learn-to-code/tree/master/it/topics#-argomenti


Add generation of CGMES profile class

Add generation of CGMESProfile class (including profile URIs) for python
Improve generation of CGMESProfile class for javascript
Add cim namespace to the generated CGMESProfile class
Add method Profile.uris() to CGMESProfile.py to get the list of profile URIs
Add recommended class profile to all generated classes (currently only used for python: https://github.com/sogno-platform/cimpy/pull/39)

Ready for review.

@tom-hg57 Thanks! Can you please add some context in the PR description?

I cant really comment on the details. But overall the code looks fine to me.


Update AccessMask Values

Please define the AccessMask values.  Currently the document only shows:
"AccessMask | Defines the access."

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

ID: 2f726f6d-c90b-7ebd-41a9-1394461e70d8
Version Independent ID: 2f726f6d-c90b-7ebd-41a9-1394461e70d8
Content: Printer Protection Overview
Content Source: microsoft-365/security/defender-endpoint/printer-protection-overview.md
Service: microsoft-365-security
Sub-service: mde
GitHub Login: @nimishasatapathy
Microsoft Alias: dansimp

To make it easier for you to submit feedback on articles on learn.microsoft.com, we're transitioning our feedback system from GitHub Issues to a new experience.
As part of the transition, this GitHub Issue will be moved to a private repository. We're moving Issues to another repository so we can continue working on Issues that were open at the time of the transition. When this Issue is moved, you'll no longer be able to access it.
If you want to provide additional information before this Issue is moved, please update this Issue before December 15th, 2023.
With the new experience, you no longer need to sign in to GitHub to enter and submit your feedback. Instead, you can choose directly on each article's page whether the article was helpful. Then you can then choose one or more reasons for your feedback and optionally provide additional context before you select Submit.
Here's what the new experience looks like.
Note: The new experience is being rolled out across learn.microsoft.com in phases. If you don't see the new experience on an article, please check back later.
First, select whether the article was helpful:

Then, choose at least one reason for your feedback and optionally provide additional details about your feedback:

Article was helpful
Article was unhelpful

Finally, select Submit and you're done!


Complex Tensors Bugs

GS

[x] #3617
[x] #3607
[x] #3557
[x] #3554
[x] #3553
[x] #3559
[x] #3560
[x] #3562

WH

[ ] #3614
[ ] #3613
[ ] #3616
[ ] #3611
[ ] #3610
[ ] #3609
[ ] #3608

tensor conversion

[] #3682

@boris-drazic @muthutt For WHB0 Logical core bound error is not yet resolved. Is there any way to pass the x,y position of core for kernel? Except this rest of the low PCC issue are done

@umadevimcw can this be closed, anything outstanding ?

Can be closed.


How to avoid printting warnings automatically?

When using the validate method, there are a lot of warnings printed on the console, how to avoid that?
let validator = new schema(descriptor);       validator.validate(curObj, (errors, errorfields) => {})

I came here exactly for this, currently I am testing some validation rules using Jest in my React components and the console is full of unwanted warning messages. I looked at the source code and found this bit:
https://github.com/yiminghe/async-validator/blob/e782748f0345b462d84e96a582c0dd38db2de666/src/util.js#L6-L17
So basically they are not supposed to show if it's running in a node environment, however, since most front-end testing tools now days use JSDOM, checking for the definition of window and document is not really conclusive.
I thought about submitting a pull request adding a check for a test NODE_ENV, how do the owners / maintainers feel about this? Although I think the optimal solution would be to add a parameter so the user can decide for himself whether he wants them or not.

@yangdm2015 In the mean time, I am doing this to prevent them from appearing:
// Before running my tests
const warn = console.warn
console.warn = () => {}

// Run my tests ...

// After running my tests, restore
console.warn = warn

Thanks, it works

Any change in this? I would like to turn off those warnings in test environment...

Any news on this?

For anyone who doesn't necessarily have access to the raw Schema object (such as if you're using ElementUI like me), the following hack works just fine:
const warn = console.warn
console.warn = (...args: any[]) => {
  if(typeof args[0] === 'string' && args[0].startsWith('async-validator:')) return

  warn(...args)
}

Pop that in your entrypoint (main.js for me) and Bob's yer uncle.

 Why is console warning implemented in the first place?

Seriously. Please delete this warning.

Mutating built-in globals is absolutely not a real fix for this. It needs to be an opt-in feature.

option added: https://github.com/yiminghe/async-validator/commit/e5dba0e927b580d079f88f5ce3b77396bf703e31

option added: e5dba0e

I think the warning should be disabled by default...

@yiminghe Still no way to disable it globally in antd?

@yiminghe Still no way to disable it globally in antd?

https://github.com/yiminghe/async-validator/commit/2a1ba5a7067e1447a4d18e1b0c843321bd55720e


Wrapper for set.seed()

Wrapper for set.seed(); if the user specifies NULL, no action is taken. This is to help with users who'd like to specify their seed outside of celda for whatever purpose. Fixes #37

@zhewa Please merge when you have a chance, or let me know if there's any style things that need to be changed first.


Add Free Form ILE RPG filetype files

It seems like vim doesn't ship with syntax / filetype files for the ILE RPG programming language:
https://en.wikipedia.org/wiki/IBM_RPG and
https://www.ibm.com/docs/en/i/7.5?topic=rpg-ile-reference
This PR contains ftdetect, syntax, indent and ftplugin files for Free Form ILE RPG files.
The files *.rpgle and *.rpgleinc will be detected as being the filetype=rpgle.
 RPG was on my todo list of creating treesitter grammars for to then add (really good) syntax highliighting support in neovim treesitter

It seems like vim doesn't ship with syntax / filetype files for the
ILE RPG programming language:
https://en.wikipedia.org/wiki/IBM_RPG and
https://www.ibm.com/docs/en/i/7.5?topic=rpg-ile-programmers-guide
This PR contains ftdetect, syntax, indent and ftplugin files for Free
Form ILE RPG files.
The files *.rpgle and *.rpgleinc will be detected as being the
filetype=rpgle.

I can include the filetype detection part.  If there is something in
common with other RPG filetypes that can be handled in the plugins.
You should not use "function!" in plugins.  If the script is loaded
again, a function can be redefined once, also without the exclamation
mark.  The exclamation mark allows for redefining multiple times, which
can hide making the mistake of using the same function name twice.
In the syntax file please use "hi def link" instead of "highlight link".
There is no need to include an update for doc/tags, it's generated.
--
A cow comes flying over the battlements,  lowing aggressively.  The cow
lands on GALAHAD'S PAGE, squashing him completely.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- @.*** -- http://www.Moolenaar.net   \
///                                                                      \
\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

I can include the filetype detection part.  If there is something in
common with other RPG filetypes that can be handled in the plugins.

The way I read this is that the ftplugin, syntax, indent etc, should be handled by an external plugin, I guess that makes sense.
I can see that you already included the filetype detection part, so I'll close up this PR then.

There is no need to include an update for doc/tags, it's generated.

Good to know.

You should not use "function!" in plugins. [...]
In the syntax file please use "hi def link" instead of "highlight link".

and

It would be better to use the standard mechanism to disable plugin mappings. See :help no_plugin_maps.
[...]
This file should also set b:undo_ftplugin.

Thanks for the valuable feedback, I'll bring it upstream in the previous linked plugin.


feat: add delete payment option prop

Description
Adds a showDeleteButton prop (false by default) that controls the visibility of the new delete payment method functionality. Also removes the remove-stored-options-enabled feature flag.
Ticket: https://gr4vy.atlassian.net/browse/TA-3042
NOTE: wait for embed-ui work to be done first, before merging (https://github.com/gr4vy/embed-ui/pull/588)
Checklist

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own changes
[x] I have run yarn lint to make sure my changes pass all tests
[x] I have run yarn test to make sure my changes pass all linters
[x] I have pulled the latest changes from the upstream main branch
[x] I have tested both the react and the CDN versions on local and integration environments
[x] I have added the necessary labels to this PR in case a new release needs to be published after merging into main (e.g. release and patch)

Contribution guidelines
For contribution guidelines, styleguide, and other helpful information please
see the CONTRIBUTING.md file in the root of this project.

:rocket: PR was released in v2.19.0 :rocket:


Add argument to open logs folder

[x] Have you signed the Contributor License Agreement?
[x] Are you working against an Issue?

https://github.com/microsoft/winget-cli/issues/2355#issuecomment-1191937273

Microsoft Reviewers: Open in CodeFlow

Does this argument work with any command? Does it display the help across all commands? Maybe a quick spec would make sense for this one. I'm expecting we need to think about how it would interact with the PowerShell cmdlets as well.

Does this argument work with any command?

Yes

Does it display the help across all commands?

Yes

Maybe a quick spec would make sense for this one. I'm expecting we need to think about how it would interact with the PowerShell cmdlets as well.

I think it would be a good consideration, but I would suggest instead speccing out all common arguments; How does verbose logs interact with the cmdlets? How does wait interact?
I also think this could be refined more in the future (hence only mentioning the linked issue, not marking it for closure) as how users interact with logs is a complex subject. I was thinking build in some minimal functionality first, then spec out a larger feature around it?

Maybe it should be an experimental argument initially then. It allows us to get feedback before releasing it with the GA client if we need to iterate.

Yes, I agree we should cover the other types of arguments as well as they relate to PowerShell.

Maybe it should be an experimental argument initially then. It allows us to get feedback before releasing it with the GA client if we need to iterate.

Made it experimental

/azp run


neon-cli: Relocate script resources to Ubuntu-20.04

We're no longer supporting Ubuntu 18.04 so we should rename this folder and update ResourceFiles.cs to match.
I'll do this after we get cluster setup otherwise stabilized or after we finish messing with these scripts.

FIXED for v2.2.0


[Parse] Fix crash in conditional compilation parsing

Cleans up some diagnostics and fixes a crasher reported by @practicalswift in https://twitter.com/practicalswift/status/829066902869786625.
Also, this is now disallowed (it seemed to be allowed only unintentionally):
#if x &&
y
#endif

@swift-ci please smoke test

@swift-ci please smoke test

This is technically a source breaking change. 😢
In Xcode8.2:
#if true && true &&
    print("ok")
#endif

does compile, and prints "ok". (since it's no-assert build)
related https://bugs.swift.org/browse/SR-3663

That's true. It might be pretty easy to keep the old behavior in Swift 3 mode. I would be interested to hear what @DougGregor thinks about whether it's important...

I don't consider that source-break important. The likelihood of this affecting real-world code is small, and that code is obviously invalid. PR LGTM, thanks!

@swift-ci please smoke test