Export getViteConfig

For issue #123 .

I'd make another commit and in the code sample change the constant name to viteExpressViteConfig instead

The ambiguity I am trying to avoid with that long name may become more clear with the actual complete server.js it will be used in:
import express from "express";
import ViteExpress from "vite-express";
import { handler as apiHandler } from "./api.js";

const listeningPort = 3000;
const listeningHostname = "localhost";

const viteExpressConfig = {};
// see https://github.com/szymmis/vite-express?tab=readme-ov-file#-shipping-to-production
// see https://nodejs.org/en/learn/getting-started/nodejs-the-difference-between-development-and-production
switch (process.env.NODE_ENV) {
  case "development":
  case "production":
    viteExpressConfig.mode = process.env.NODE_ENV;
    break;
  default:
    viteExpressConfig.mode = "development";
}
ViteExpress.config(viteExpressConfig);

const expressApp = express();
expressApp.use(apiHandler);
const expressServer = expressApp.listen(listeningPort, listeningHostname,
  async () => {
    const viteExpressViteConfig = await ViteExpress.getViteConfig();
    const appUrl = `http://${listeningHostname}:${listeningPort}${viteExpressViteConfig.base}`;
    console.log(`Serving app from root ${viteExpressViteConfig.root} in ${viteExpressConfig.mode} mode`);
    console.log(`App server is listening at ${appUrl}`);
  });
ViteExpress.bind(expressApp, expressServer);

But unless you say otherwise I would think that is too long as an example for the main documentation.

And for completeness, that server.js goes with package.json containing:
  "scripts": {
    "dev": "vite",
    "dev-server": "node ./server.js",
    "build": "vite build",
    "preview": "vite preview",
    "preview-server": "vite build && NODE_ENV=production node ./server.js",
  },

I have built a bit more scripting around using this feature for automatic handing of serving.  Too much to list here, but...
Noteworthy is one very short script to run as part of the build process that only uses const viteExpressViteConfig = await ViteExpress.getViteConfig(); and then writes base and outDir into a file, so that if later in viteless mode those values can be used for an inlineViteConfig and thereby avoid the need to actively maintain the same base in two places.

Hi @szymmis, if you approve this PR for the one extra export then I can recommend this package in other discussions.
Or, do you want me to make another change before approving?
It is a good package anyway.  For us here, this extra export makes it nicer to automate.
Thank you.

Hi @srguiwiz2, sorry for taking so long to answer but I'm a little bit swamped lately.
I've written one comment in the review, otherwise that looks great.
Thanks for your contribution and I'm always happy to hear that you guys are having a good time using this tool.

Hey @srguiwiz,
Could we simplify the example in the README a bit? Making it easier to understand and aligning it with the other examples would be great.
import express from "express";
import ViteExpress from "vite-express";

const app = express();

const port = 3000;
const host = "localhost";

const server = app.listen(port, host);

ViteExpress.bind(app, server, async () => {
  const { root, base } = await ViteExpress.getViteConfig();
  console.log(`Serving app from root ${root}`);
  console.log(`Server is listening at http://${host}:${port}${base}`);
});

I really like that what you did @rmhaiderali. There is less code and definitely more clarity in that snippet now. What do you think @srguiwiz2?

@szymmis I can insert as suggested by @rmhaiderali.  I have verified it too by running it.
Shall we instead of ${port} make that ${server.address().port} to cover getting a random port number when passing 0?  You decide, then I can commit.

Committed with plain ${port} for brevity.


Emphasize pricing calculator

Currently it isn't visually separated from the pricing info, and it's something that people will probably want to use.
I think it would also be good to remove text from the calculator, because most things are already written to the left, it would be good if the calculator is only, well, calculator.

Done and done!


Closure Library link in installation wiki page is not correct

Expected Behavior
On wiki page https://github.com/LLK/scratch-blocks/wiki, the link to Closure Library should be https://developers.google.com/closure/library/
Actual Behavior
It is https://developers.google.com/closure/compiler/ currently.
Steps to Reproduce
N/A
Operating System and Browser
N/A

Thanks for catching that! Fixed.


Expense - Workspace chat shows Not here page when it is created from "Pay with Expensify"

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: 9.0.66-0
Reproducible in staging?: Y
Reproducible in production?: N
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail: N/A
Email or phone of affected tester (no customers<EMAIL_ADDRESS>Issue reported by: Applause - Internal Team
Action Performed:
Precondition:

The default currency for individual policy is USD

Go to staging.new.expensify.com
Go to FAB > Submit expense
Submit a manual expense to user B
As user B, go to chat with user A
Click Pay with Expensify
Click Business bank account
Dismiss bank account setup RHP

Expected Result:
Workspace chat will load without issue (production behavior)
Actual Result:
Workspace chat shows Not here page
Workaround:
Unknown
Platforms:

Which of our officially supported platforms is this issue occurring on?

[x] Android: Standalone
[x] Android: HybridApp
[x] Android: mWeb Chrome
[x] iOS: Standalone
[x] iOS: HybridApp
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/df2d97fc-7e31-4ae7-a88c-329d6f4013ef
View all open jobs on GitHub

Production:
https://github.com/user-attachments/assets/f1a37cbf-aea7-4241-8854-b8ca311b8c85


Docs: Add basic skeleton for implementation of add condition feature

Diagrams have not been generated yet. This PR introduces very basic implementation details for the add condition feature, which may be coupled with the delete condition feature. Would be great to review and merge on time before the deadline (Sat, 22 Oct, 1600)

Codecov Report
Base: 66.53% // Head: 66.53% // No change to project coverage :thumbsup:

Coverage data is based on head (9ee4247) compared to base (7f484f7).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #229   +/-   ##
=========================================
  Coverage     66.53%   66.53%
  Complexity      572      572
=========================================
  Files           113      113
  Lines          1960     1960
  Branches        219      219
=========================================
  Hits           1304     1304
  Misses          587      587
  Partials         69       69

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

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


Ability to auto select fit/fill based on resize aspect ratio compared to image aspect ratio

I have a set list of image sizes to scale to, all of which are landscape. When resizing a landscape image it's then fine if bits of the left and right of the image are cropped (if the image's aspect ratio is slightly wider).
However, if resizing a portrait image (say, one taken with a phone held vertically) then the image is much more aggressively cropped since the fill will be a landscape rectangle in the middle of the image.
Would there be a way to have the resizer choose fit over fill if the orientation differs from the resize aspect?

Hi,
v2.3 includes support of resizing_type:auto.

Thank you very much for this!


feat: add fallback site support

When early_data is empty and FALLBACK_SITE is not empty, it will give the content of fallback site for disguising itself as a normal site

Not all clients support early_data, such as Shadowrocket, so this is not a suitable modification.


TP: adds the ability to rearrange delivery service table columns as well as toggle column visibility/searchability

What does this PR (Pull Request) do?

[x] This PR is not related to any Issue

This PR adds checkboxes to toggle the visiblity/searchability of ds table columns as well as adds the ability to reorder the columns.

Which Traffic Control components are affected by this PR?

Traffic Portal

What is the best way to verify this PR?

Run the UI tests

Navigate to https://tp.doman.com/#!/delivery-services and

reorder the columns; refresh the screen to ensure that the new order persists itself across browser sessions.

click on the drop down to toggle the visiblity/searchability of columns; refresh the screen to ensure that the selected columns are visible/hidden across browser sessions. also, ensure that values in hidden columns are not considered in the table search.

The following criteria are ALL met by this PR

[x] This PR includes tests OR I have explained why tests are unnecessary
[x] This PR includes documentation OR I have explained why documentation is unnecessary
[x] This PR includes an update to CHANGELOG.md OR such an update is not necessary
[x] This PR includes any and all required license headers
[x] This PR ensures that database migration sequence is correct OR this PR does not include a database migration
[x] This PR DOES NOT FIX A SERIOUS SECURITY VULNERABILITY (see the Apache Software Foundation's security guidelines for details)

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3988/
Test PASSed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3992/
Test FAILed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3993/
Test PASSed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/3994/
Test PASSed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4042/
Test PASSed.

So you can now add enough columns that the size of the table becomes greater than the size of the page - and there's nothing you can really do to avoid it without removing functionality. But the problem is that the scrolling looks kinda funky. Check this out:

That's not really even close to as long as the table could potentially get, and you can see I'm already leaving alerts, pagination/search/utility controls, and even part of the sidebar behind. But another problem is just how long this menu is. Look at this:

You can see that I've managed to pull the sidebar apart, and left my table behind completely, so that if I want to see the effects of adding/removing a column I have to scroll up a bunch. To fix that, I'd recommend setting a max-height on the column selection menu and just scrolling on that instead of the page.
Fixing the first problem, though, isn't quite as trivial. You could either mess with the theme template to try to get the sidebar pinned (e.g. with position: absolute) so that you don't leave only parts of it behind or make the bottom part go away with the rest of it. If you choose the first option, you're also probably going to want to find a way to pin the breadcrumbs/title along with it. Either way, the menu and pagination controls can either be pinned to always be on the screen, or pinned to the far right side of the table as it grows.
Alternatively, you could set a max-width on the table and just scroll on that instead of the page.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4062/
Test PASSed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4063/
Test PASSed.

I added some overflows @ocket8888 to try to improve things. not perfect...but better imo

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4066/
Test PASSed.

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/trafficcontrol-PR/4079/
Test PASSed.


Comparing two pointers should not nest

Hey!
When comparing two pointers, it seems that pretty.Compare() doesn't satisfy itself by the pointer values being the same. It tries to compare the content of those two pointers. Usually, this works, but sometimes, one pointer can change during iteration. I understand this may be difficult to fix as currently, both values are turned into strings, then compared as strings.

Yep, the stringification is the whole basis for the library.
Pretty.Compare compares the pretty-printed values.  It doesn't even enforce
that the two values are of the same types.  As for the other point, it
can't prevent the objects from changing out from under it, you need to do
that as the caller.
On Wed, Aug 3, 2016, 5:41 AM Vincent Bernat<EMAIL_ADDRESS>wrote:

Hey!
When comparing two pointers, it seems that pretty.Compare() doesn't
satisfy itself by the pointer values being the same. It tries to compare
the content of those two pointers. Usually, this works, but sometimes, one
pointer can change during iteration. I understand this may be difficult to
fix as currently, both values are turned into strings, then compared as
strings.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kylelemons/godebug/issues/7, or mute the thread
https://github.com/notifications/unsubscribe-auth/AATqpV3cEZrjWMZmQ9Kxwlk2NxA3cIHHks5qcIfhgaJpZM4Jbmn1
.


Order is not working w.r.t the required_with and len tag

[x] I have looked at the documentation here first?
[x] I have looked at the examples provided that may showcase my question here?

Package version eg. v9, v10:
v10
Issue, Question or Enhancement:
Question
Code sample, to showcase or reproduce:
package main

import "fmt"
import "github.com/go-playground/validator/v10"
type NomineeChangeInfo struct {
    Name  string `json:"name" validate:"required_with=Dob,max=40"`
    Dob   string `json:"dob" validate:"required_with=Name,len=10"`
}

func main() {
    fmt.Println("Hello, Go in CodeSandbox!")
    validate := validator.New()

    // Define a form with Email provided but Username missing
    formWithEmail := NomineeChangeInfo{
        Dob:"",
        Name:"",
    }

    // Validate the form
    err := validate.Struct(formWithEmail)
    if err != nil {
        fmt.Println("Validation error:", err)
    } else {
        fmt.Println("Validation successful")
    }
}

so in the above example for DOB we are getting the error as Error:Field validation for 'Dob' failed on the 'len' tag but there should have been no errro, if required_with is already in false state.

required_if, required_unless,required_with,required_with_all,required_without,required_without_all,excluded_if,excluded_unless,excluded_with,excluded_with_all,excluded_without,excluded_without_all,skip_unless
if they meet the criteria for skipping, should skip all subsequent validation。

@deankarn Hello, what do you think of this suggestion

Yes that’s the way I expected those tags to work also, but they aren’t documented that way.
gonna have to double check if it ever behaved that way before. Will try to take a look this week, hopefully can find time.

PromotionType          string                `json:"promotion_type" binding:"required,oneof= a b c"`
ApplicablePhase        []ApplicablePhaseItem `json:"applicable_phase" binding:"required_if=PromotionType a,dive,len=4"`

@deankarn
In this example, len tag not working when required_if meets condition

PromotionType          string                `json:"promotion_type" binding:"required,oneof= a b c"`
ApplicablePhase        []ApplicablePhaseItem `json:"applicable_phase" binding:"required_if=PromotionType a,dive,len=4"`

@deankarn In this example, len tag not working when required_if meets condition

it's not conform to the logic of this issues

Any news?

@deankarn any comments would be welcome. Is it even feasible for this to work the way some of us would like?


/scan message stops publishing

I am using the node for a collision avoidance algorithm I'm working on and sometimes while the node is running it stops publishing the /scan message. I am running rostopic hz /scan and sometimes I get the "no new messages" alert for a long period of time. Sometimes the /scan message comes back, other times I have to power cycle the LIDAR a few times.
Has anyone seen a similar issue?

May be you can focus this code ( rplidar_ros/src/node.cpp)  :
ros::Publisher scan_pub = nh.advertise<sensor_msgs::LaserScan>("scan", 1000);
you can try change the value of cache .


Not parsing included nested sections

json.txt
Have added the json file
Please look into this

json.txt
Have added the json file
Please look into this

Closing, this is a duplicate of #27


Post-Cryptographic Research

After we release the draft on the cryptographic primitives, here's a list of ideas on what questions we should research and settle to come up with the final protocol.
Scheduling

phases
blame phase

Input Eligibility

Minimum value of UTXO to be accepted for registration.
Unconfirmed vs Confirmed
Max number of inputs to kick off a round.

Fees

How network fees are paid?

Amounts

How it is the best to organize output values.

Ensuring Integrity of Coordinator Parameters

Ensuring integrity of blind signing key - cashshuffle/spec#22

Discussing Various Attacks

Timing Attacks
DoS Attacks
Sybil Attacks

IMO we could start with the "Ensuring Integrity of Coordinator Parameters" as that can be settled quickly and independently.
Then move on to Amounts as many of the other things depend on that.

general ACK.
However, what about the review process of the crypto magic?

That's why we release the draft.


Added support for placing redstone dust

The placement behavior is just like a block, there's no incorrect faces of a neighboring block to click. It just has to check if the block it would end up is valid (i.e. there is an opaque block underneath it).

Something like this?
coordinates += MathHelper.BlockFaceToCoordinates(face);
IBlockProvider supportingBlock = world.BlockRepository.GetBlockProvider(world.GetBlockID(coordinates));

if (!supportingBlock.Opaque)
{
    world.SetBlockID(coordinates, RedstoneDustBlock.BlockID);
    item.Count--;
    user.Inventory[user.SelectedSlot] = item;
}

No, the supported block would be underneath the redstone, not at those coordinates. Get the supporting block with coordinates + Coordinates3D.Down.

Ok now I have this but its leading to unexpected behavior, when I click on the same block a redstone dust block is placed underneath the one I just placed.
IBlockProvider supportingBlock = world.BlockRepository.GetBlockProvider(world.GetBlockID(coordinates += Coordinates3D.Down));

if (supportingBlock.Opaque)
{
    world.SetBlockID(coordinates, RedstoneDustBlock.BlockID);
    item.Count--;
    user.Inventory[user.SelectedSlot] = item;
}

Oops I think I see the problem

@SirCmpwn I think I figured it out

Also wire it up to BlockProvider's support code (i.e. what torches use) so that when you destroy the block underneath the redstone, the redstone is destroyed.

@SirCmpwn Gah I didn't mean to put the upstream merge commit into this.  Hopefully you can just remove that?

It doesn't really matter.


editorconfig.yml: remove sarcastic tone from promotional error

This kinda removes more than any potential sarcasm, but also a useful reference to find out more about editorconfig.


Unable to configure plugin and set library categories

Hi,
I recently installed the inventree_kicad plugin and have some troubles following the setup guide. When I reach the step where I am supposed to find KicadLibraryPlugin I find Kicad Library Endpoint instead:

In here I don't quite find the right options to proceed with the setup. However, I do find the section here that talks a little about kicad-library-list, for which I get lead to a JSON formatted text file:

I am fairly certain I restarted the container and migrated it correctly, albeit there is naturally room for error.
For reference:
I run inventree_kicad version 1.3.15
And inventree Version Information:
InvenTree-Version: 0.13.5
Django Version: 3.2.23
Commit Hash: 0804ecf
Commit Date: 2024-02-05
Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-6.4.16-linuxkit-x86_64-with
Installer: DOC
Active plugins: [{'name': 'InvenTreeBarcode', 'slug': 'inventreebarcode', 'version': '2.0.0'}, {'name': 'InvenTreeCoreNotificationsPlugin', 'slug': 'inventreecorenotificationsplugin', 'version': '1.0.0'}, {'name': 'InvenTreeCurrencyExchange', 'slug': 'inventreecurrencyexchange', 'version': '1.0.0'}, {'name': 'InvenTreeLabel', 'slug': 'inventreelabel', 'version': '1.0.0'}, {'name': 'InvenTreeLabelSheet', 'slug': 'inventreelabelsheet', 'version': '1.0.0'}, {'name': 'DigiKeyPlugin', 'slug': 'digikeyplugin', 'version': '1.0.0'}, {'name': 'LCSCPlugin', 'slug': 'lcscplugin', 'version': '1.0.0'}, {'name': 'MouserPlugin', 'slug': 'mouserplugin', 'version': '1.0.0'}, {'name': 'TMEPlugin', 'slug': 'tmeplugin', 'version': '1.0.0'}, {'name': 'KiCadLibraryPlugin', 'slug': 'kicad-library-plugin', 'version': '1.3.15'}]

Hi Jacob,You did everything needed to install the plugin so that's done!
Next step is to head to the admin panel and add some categories you'd like to see in KiCad.
The URLs you see under settings are a standard display which comes from InvenTree; you can just ignore those ones.
I'll wirk on the instructions so that there is less confusion.
Please let me know how you go!

I am happy to have a look at that. It just means that I need to find a way to implement that without adding more switches.
Feel free to add a FR issue


Release

Great work!!! Respect !
I cannot wait to the release of your benchmark!

Hi @rolsheng,
Thank you!'
I will come back to work next week and will release the code & dataset soon after, hopefully within a couple of days.
Best,
Orr

Hi @rolsheng,
Code has been released.
Good luck!
Orr


Direction IntraOrg

The -Direction parameter for Get-MailDetailATPReport should include IntraOrg as one of the supported values.
Thank you!

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

ID: 72a47576-e439-efc4-6a22-c9c6a11edbe3
Version Independent ID: bd26162f-3fde-657a-0eb1-c6b49fbdccc7
Content: Get-MailDetailATPReport (ExchangePowerShell)
Content Source: exchange/exchange-ps/exchange/Get-MailDetailATPReport.md
Service: exchange-powershell
GitHub Login: @chrisda
Microsoft Alias: chrisda

@mrkeiths, fixed. It also appears that Direction in Get-MailTrafficATPReport also supports IntraOrg, so I added it there.
In the future, you too can make changes like this yourself directly. Instruction are here.
Thanks for the feedback.
Closing


API bug in synthetic-data example

In the synthetic-data example a value_server_threshold parameter is passed to make_queue_pairs, however, this parameter is not part of the function signature. Should it be updated to proxystore_threshold? In addition, is it necessary to specify the proxystore_name parameter for proxystore_threshold to have an effect? Thanks!
Code:
https://github.com/exalearn/colmena/blob/master/demo_apps/synthetic-data/synthetic.py#L159
client_queues, server_queues = make_queue_pairs(
        args.redis_host,
        args.redis_port,
        topics=["generate"],
        serialization_method="pickle",
        keep_inputs=False,
        value_server_threshold=value_server_threshold,
    )

Hi @braceal! Sorry for the late reply. I reworked the synthetic app in the syn-app-updates branch since, as you pointed out, was no longer up-to-date with Colmena'a features!
It should still work fine, but I'll verify and open a PR for it soon.


Code formatting template for IntelliJ

OSCM code formatting templates are provided for eclipse. They can be imported in other IDEs but behave differently there. Developers are requesting templates for IntelliJ.

Closed due to being in scope of #242


[fix] #303 : Added Payment Confirmation Modal

Changes Made
In this pull request, I have addressed issue #303 by implementing a payment confirmation modal. The modal is displayed to users after they initiate a payment and provides clear feedback on the outcome of the transaction. The modal includes the following features:

A concise message indicating the result of the payment (success or failure).
Details of the transaction, including the amount, bank, and account number.
Action buttons for users to either close the modal or take additional actions.

Benefits

Fixes #303
Improved user experience: Users now receive immediate feedback on the status of their payment, reducing uncertainty.
Increased user trust: Clear communication regarding the payment's outcome enhances user confidence in our application.

How to Test:
To test the payment confirmation modal, follow these steps:

Open the application.
Initiate a payment.
Observe the payment confirmation modal, which will display the result of the transaction.
Verify that the transaction details are accurately presented.
Test the action buttons to ensure they function as expected.

This pull request aims to enhance the user experience and improve our application's trustworthiness by introducing the payment confirmation modal. It aligns with the objectives outlined in issue #303.

@phyleria , is there any update on this PR, i request you to please have a look at this suggestion and let me know if this is relevant

I get this whenever I try to pay out and the status never changes.

I get this whenever I try to pay out and the status never changes.

are you still facing this?

I get this whenever I try to pay out and the status never changes.

are you still facing this?

Yes, I still am

Have a look at it , i guess is should be fixed now

Can you show me what it shows on your end?

Could you please just check it one last time , I have planned it work like this :

User initiates payment.
"Please wait..." is displayed.
After 2 seconds, the confirmation modal appears.
After another 2 seconds, the modal closes, and "Payment Successful" is displayed.


show message when nothing has been inspected yet

closes #1127
Added

[client] Show a message when nothing has been inspected yet, in PR #1290

Pull Request Test Coverage Report for Build 1969

7 of 7 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.08%) to 50.381%

Totals

Change from base Build 1968:
0.08%

Covered Lines:
4511

Relevant Lines:
8353

💛  - Coveralls

@tonyanziano oh nice. I didn't test that but I will.

I just copied your Inspector.tsx changes over and tested it, and it looks like it resolves it. 👍


[FEA] Profiling tool: Suggest parameters to tune

I wish Profiling tool can analyze the eventlog and then print some suggested parameters to tune.
Such as below the most common tunable parameters:

Memory related
spark.executor.memoryOverhead
spark.rapids.memory.pinnedPool.size
spark.rapids.memory.host.spillStorageSize

AQE related
spark.sql.adaptive.enabled

For shuffle stage
spark.sql.shuffle.partitions

For table scan stage
spark.sql.files.maxPartitionBytes

etc....

Close this feature request since after talking with @mattahrens , there is already something similar in 22.10.


#2838 - Bonds between atoms are not centered and not drawn symmetrically

Check list

[x] unit-tests written
[x] e2e-tests written
[ ] documentation updated
[x] PR name follows the pattern #1234 – issue name
[x] branch name doesn't contain '#'
[x] PR is linked with the issue
[x] base branch (master or release/xx) is correct
[x] task status changed to "Code review"

All failed tests in the pipeline are successfully passed locally
AutoTests.docx
report.zip

In two bonds (Aromatic Bond, Single/Aromatic Bond) the pattern is not symmetrical - the right dash is shorter than the left


Replace loader

This allows to actually use .a archive files and to process packages individually.

Has this been tested against the standard library, the sourcegraph repository, and other large Go repositories?

Has this been tested against the standard library, the sourcegraph repository, and other large Go repositories?

We should just get CI/testsuite to do that. A submodule pointing to those repos seems decent.

LGTM
Only change that would be nice is that we aren't deprecating Srcfile, but in fact removing support for it. That may just be me being a bit pedantic though.

Oh yeah, also would be good to test this out on important repos before getting this out into production sourcegraph.


docs(guide/Using $location): update link to HTML5 history API

The old link http://www.w3.org/TR/html5/introduction.html#history-0 points to the history of HTML5. The new link points to the API of the history object. Additionally, this change normalises the upper/lower case of the phrase 'HTML5 history API'.

@googlebot Sorry to not have a Google account. My change is so tiny that it's public domain.
I don't see a way of agreeing without a Google account. If so, that's my first and last contribution. Thanks.

@mkllnk I'm afraid we can't merge PRs without the associated CLA. While it will be sad to not have your change integrated, I can understand your reasons....
Going to close this PR but would be happy to integrate it if you change your mind....

And I can't sign without a Google account?


[Snyk] Upgrade yargs from 17.6.2 to 17.7.2

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade yargs from 17.6.2 to 17.7.2.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 3 versions ahead of your current version.
The recommended version was released a month ago, on 2023-04-27.

Release notes

Package name: yargs

17.7.2 - 2023-04-2717.7.2 (2023-04-27)
Bug Fixes

do not crash completion when having negated options (#2322) (7f42848)

17.7.1 - 2023-02-2117.7.1 (2023-02-21)
Bug Fixes

address display bug with default sub-commands (#2303) (9aa2490)

17.7.0 - 2023-02-1617.7.0 (2023-02-13)
Features

add method to hide option extras (#2156) (2c144c4)
convert line break to whitespace for the description of the option (#2271) (4cb41dc)

Bug Fixes

copy the description of the option to its alias in completion (#2269) (f37ee6f)

17.6.2 - 2022-11-0317.6.2 (2022-11-03)
Bug Fixes

deps: update dependency yargs-parser to v21.1.1 (#2231) (75b4d52)
lang: typo in Finnish unknown argument singular form (#2222) (a6dfd0a)

    from yargs GitHub release notes

Commit messages

Package name: yargs

e1760e4 chore: v17.7.2 release
3566b84 chore(main): release 17.7.2 (#2323)
7f42848 fix: do not crash completion when having negated options (#2322)
2b6ba31 chore(main): release 17.7.1 (#2304)
9aa2490 fix: address display bug with default sub-commands (#2303)
663c1b6 chore(main): release 17.7.0 (#2285)
4cb41dc feat: convert line break to whitespace for the description of the option (#2271)
7dc1086 test: mock additional hasColors method introduced in Node 16 (#2297)
f37ee6f fix: copy the description of the option to its alias in completion (#2269)
1fd530a chore: add en strings for unknown command (#2262)
2c144c4 feat: add method to hide option extras (#2156)
6cb69fb build: pin npm version (#2284)

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Coverage: 98.209%. Remained the same when pulling 50ef4a6863c552f388b2bdd4a3d88b6378292519 on snyk-upgrade-c5b673185a71f58801606292bfb4b983 into ad5a990e21be7062b59ed57600179e21a7064a64 on main.


Port Reuse: Would love some help - unit tests only pass most of the time.

Draft pull request, in hopes that someone else will see something that I am missing. I'd love an extra pair of eyes, because I'm at a bit of a loss here. 😞
Please excuse the mess, work in progress code.
Context
I believe I've implemented the basics of #410, but on my unit tests, it's passing ~90% of the time, but 10% of the time, Quilkin isn't erroring when it says it's receiving UDP packets, but when the test sends them, nothing happens and I'm very confused.
I'm also wondering if I'm missing some kind of low level kernel socket setting or understanding of how this works, and (hopefully) missed something obvious that someone else will see.
I've yet to try the integration tests.
Where to look

net.rs - new net module for creating sockets with SO_REUSEADDRESS and SO_REUSEPORT
server.rs - spawn_downstream_receive_workers - this is where the logic to receive packets is being managed.

How to reproduce
Many of the tests fail in server.rs intermittently, but I've been debugging intests::run_client - since it's the simplest test of the of the proxy with a singular packet only going from local to a single endpoint address.
To run: cargo test --lib run_client
Things I have tried
My original thought was "oh, this is a race condition where we're sending the packet before the proxy comes up and is receiving connections" - there are a few ways we could tackle that, but there are several layers of async coroutines within the system, I ended up going with the tried and true approach of polling until something works. So I implemented retry logic via tryhard (and changing some of test_utils to accommodate that).
So in run_client I have it setup to retry 10 times with a delay of second between each attempt to sending a packet and recieve a response. Unfortunately even with the retries, it seems like intermittently, the proxy is not actively accepting packets -- and I'm not sure where it gets stuck (See logs below to see that packets don't get received by Quilkin).
To make a note - when the test passes, it passes on the first packet that is sent. When it fails, it fails on the first packet and every retry thereafter. I've never seen a retry actually pass the test.
Relevant logs
Passing run_client unit test
You can see each of the workers come up, await for packets, accept them and process them. Working as expected (happens most of the time).
Testing started at 1:58 PM ...
    Finished test [unoptimized + debuginfo] target(s) in 0.11s
     Running unittests (target/debug/deps/quilkin-258efebca14997ce)
  2022-04-19T20:58:52.801777Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:49937, source: <IP_ADDRESS>:37577
    at src/proxy/server.rs:526

  2022-04-19T20:58:52.802458Z  INFO quilkin::proxy::server: Starting, port: 49937, proxy_id: "test"
    at src/proxy/server.rs:103

  2022-04-19T20:58:52.802831Z  INFO quilkin::proxy::server: Quilkin is ready
    at src/proxy/server.rs:131

  2022-04-19T20:58:52.802906Z DEBUG quilkin::proxy::server: Awaiting packet, id: 0, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.802956Z DEBUG quilkin::proxy::server: Awaiting packet, id: 1, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.802991Z DEBUG quilkin::proxy::server: Awaiting packet, id: 2, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.803024Z DEBUG quilkin::proxy::server: Awaiting packet, id: 3, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.803057Z DEBUG quilkin::proxy::server: Awaiting packet, id: 4, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.803090Z DEBUG quilkin::proxy::server: Awaiting packet, id: 5, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.803122Z DEBUG quilkin::proxy::server: Awaiting packet, id: 6, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.803155Z DEBUG quilkin::proxy::server: Awaiting packet, id: 7, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.803305Z DEBUG quilkin::proxy::sessions::session_manager: Pruning Sessions
    at src/proxy/sessions/session_manager.rs:75

  2022-04-19T20:58:52.803385Z DEBUG quilkin::proxy::server: Received packet, id: 3, size: 5, source: <IP_ADDRESS>:37577
    at src/proxy/server.rs:238

  2022-04-19T20:58:52.803506Z DEBUG quilkin::proxy::sessions::session: Session created, source: <IP_ADDRESS>:37577, dest: Endpoint { address: EndpointAddress { host: Ip(<IP_ADDRESS>), port: Some(37577) }, metadata: MetadataView { known: Metadata { tokens: {} }, unknown: {} } }
    at src/proxy/sessions/session.rs:156

  2022-04-19T20:58:52.803607Z DEBUG quilkin::proxy::sessions::session: Awaiting incoming packet, source: <IP_ADDRESS>:37577, dest: Endpoint { address: EndpointAddress { host: Ip(<IP_ADDRESS>), port: Some(37577) }, metadata: MetadataView { known: Metadata { tokens: {} }, unknown: {} } }
    at src/proxy/sessions/session.rs:181

  2022-04-19T20:58:52.803712Z DEBUG quilkin::proxy::server: Awaiting packet, id: 3, addr: Ok(<IP_ADDRESS>:49937)
    at src/proxy/server.rs:228

  2022-04-19T20:58:52.803988Z DEBUG quilkin::proxy::sessions::session: Session closed, source: <IP_ADDRESS>:37577, dest_address: <IP_ADDRESS>:37577
    at src/proxy/sessions/session.rs:341

Process finished with exit code 0

Failing run_client unit test
Here you can see the socket comes up and is awaiting connections, but even with 10 retries (each "Sending Packet" debug log) with a second between, the packets are never recieved. I am very much at a loss as to why.

Testing started at 1:07 PM ...
    Finished test [unoptimized + debuginfo] target(s) in 0.13s
     Running unittests (target/debug/deps/quilkin-258efebca14997ce)
  2022-04-19T20:07:45.643367Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:45.644091Z  INFO quilkin::proxy::server: Starting, port: 37292, proxy_id: "test"
    at src/proxy/server.rs:103

  2022-04-19T20:07:45.644484Z  INFO quilkin::proxy::server: Quilkin is ready
    at src/proxy/server.rs:131

  2022-04-19T20:07:45.644580Z DEBUG quilkin::proxy::server: Awaiting packet, id: 0, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.644631Z DEBUG quilkin::proxy::server: Awaiting packet, id: 1, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.644667Z DEBUG quilkin::proxy::server: Awaiting packet, id: 2, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.644702Z DEBUG quilkin::proxy::server: Awaiting packet, id: 3, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.644736Z DEBUG quilkin::proxy::server: Awaiting packet, id: 4, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.644770Z DEBUG quilkin::proxy::server: Awaiting packet, id: 5, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.644804Z DEBUG quilkin::proxy::server: Awaiting packet, id: 6, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.644838Z DEBUG quilkin::proxy::server: Awaiting packet, id: 7, addr: Ok(<IP_ADDRESS>:37292)
    at src/proxy/server.rs:228

  2022-04-19T20:07:45.645043Z DEBUG quilkin::proxy::sessions::session_manager: Pruning Sessions
    at src/proxy/sessions/session_manager.rs:75

  2022-04-19T20:07:46.747649Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:47.849316Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:48.950998Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:50.053756Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:51.156530Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:52.258570Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:53.360224Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:54.462921Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:55.565932Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:56.669490Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:37292, source: <IP_ADDRESS>:35604
    at src/proxy/server.rs:526

  2022-04-19T20:07:56.770633Z ERROR quilkin::proxy::health: Panic has occurred. Moving to Unhealthy, panic_info: panicked at 'called `Result::unwrap()` on an `Err` value: Elapsed(())', src/proxy/server.rs:534:10
    at src/proxy/health.rs:37

called `Result::unwrap()` on an `Err` value: Elapsed(())
thread 'proxy::server::tests::run_client' panicked at 'called `Result::unwrap()` on an `Err` value: Elapsed(())', src/proxy/server.rs:534:10
...
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: test failed, to rerun pass '-p quilkin --lib'

Process finished with exit code 101

If anyone has any ideas, I would love some input!

Trying something out - I extended the retry delay to 20s, and when I noticed there was a retry (and I had time) I connected using nc. Deliberately sending what would be a failing packet (i.e. I sent "test" doesn't match "hello", so it would fail it's assert_equal!) (although I sent it to <IP_ADDRESS> vs <IP_ADDRESS>) and it was received!
Which now makes me wonder - is the issue with the sending socket, not the receiving 🤔
Logs for postenty
/home/mark/.cargo/bin/cargo test --color=always --package quilkin --lib proxy::server::tests::run_client --no-fail-fast -- --format=json --exact -Z unstable-options --show-output
Testing started at 7:33 PM ...
    Finished test [unoptimized + debuginfo] target(s) in 0.14s
     Running unittests (target/debug/deps/quilkin-258efebca14997ce)
  2022-04-20T02:33:07.157913Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:51418, source: <IP_ADDRESS>:33268
    at src/proxy/server.rs:526

  2022-04-20T02:33:07.159222Z  INFO quilkin::proxy::server: Starting, port: 51418, proxy_id: "test"
    at src/proxy/server.rs:103

  2022-04-20T02:33:07.160074Z  INFO quilkin::proxy::server: Quilkin is ready
    at src/proxy/server.rs:131

  2022-04-20T02:33:07.160284Z DEBUG quilkin::proxy::server: Awaiting packet, id: 0, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160394Z DEBUG quilkin::proxy::server: Awaiting packet, id: 1, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160460Z DEBUG quilkin::proxy::server: Awaiting packet, id: 2, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160517Z DEBUG quilkin::proxy::server: Awaiting packet, id: 3, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160577Z DEBUG quilkin::proxy::server: Awaiting packet, id: 4, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160634Z DEBUG quilkin::proxy::server: Awaiting packet, id: 5, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160690Z DEBUG quilkin::proxy::server: Awaiting packet, id: 6, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160747Z DEBUG quilkin::proxy::server: Awaiting packet, id: 7, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:07.160986Z DEBUG quilkin::proxy::sessions::session_manager: Pruning Sessions
    at src/proxy/sessions/session_manager.rs:75

  2022-04-20T02:33:27.262431Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:51418, source: <IP_ADDRESS>:33268
    at src/proxy/server.rs:526

  2022-04-20T02:33:36.705040Z DEBUG quilkin::proxy::server: Received packet, id: 3, size: 5, source: <IP_ADDRESS>:52584
    at src/proxy/server.rs:238

  2022-04-20T02:33:36.705621Z DEBUG quilkin::proxy::sessions::session: Session created, source: <IP_ADDRESS>:52584, dest: Endpoint { address: EndpointAddress { host: Ip(<IP_ADDRESS>), port: Some(33268) }, metadata: MetadataView { known: Metadata { tokens: {} }, unknown: {} } }
    at src/proxy/sessions/session.rs:156

  2022-04-20T02:33:36.706093Z DEBUG quilkin::proxy::sessions::session: Awaiting incoming packet, source: <IP_ADDRESS>:52584, dest: Endpoint { address: EndpointAddress { host: Ip(<IP_ADDRESS>), port: Some(33268) }, metadata: MetadataView { known: Metadata { tokens: {} }, unknown: {} } }
    at src/proxy/sessions/session.rs:181

  2022-04-20T02:33:36.706553Z DEBUG quilkin::proxy::server: Awaiting packet, id: 3, addr: Ok(<IP_ADDRESS>:51418)
    at src/proxy/server.rs:228

  2022-04-20T02:33:47.364641Z DEBUG quilkin::proxy::server::tests: Sending Packet, dest: <IP_ADDRESS>:51418, source: <IP_ADDRESS>:33268
    at src/proxy/server.rs:526

  2022-04-20T02:33:47.364820Z ERROR quilkin::proxy::health: Panic has occurred. Moving to Unhealthy, panic_info: panicked at 'assertion failed: `(left == right)`
  left: `"hello"`,
 right: `"test\n"`', src/proxy/server.rs:537:9
    at src/proxy/health.rs:37

  2022-04-20T02:33:47.444689Z DEBUG quilkin::proxy::sessions::session: Session closed, source: <IP_ADDRESS>:52584, dest_address: <IP_ADDRESS>:33268
    at src/proxy/sessions/session.rs:341

<Click to see difference>

thread 'proxy::server::tests::run_client' panicked at 'assertion failed: `(left == right)`
  left: `"hello"`,
 right: `"test\n"`', src/proxy/server.rs:537:9
...
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

error: test failed, to rerun pass '-p quilkin --lib'

Process finished with exit code 101

Haven't reviewed the code yet, but I just want to mention that you might want to try debugging with tokio-console it does have some amount of helpful information.

Haven't reviewed the code yet, but I just want to mention that you might want to try debugging with tokio-console it does have some amount of helpful information.

That's an excellent idea - I'll take that for a spin next.

Another debuggind tip that I just ran into. Setting the span_events for the subscriber to include entering and exiting spans as events. This is a lot noisier depending on your log level, but it's much more helpful than just events on their own.
        tracing_subscriber::fmt()
            .with_span_events(tracing_subscriber::fmt::format::FmtSpan::FULL)
            .init();

So unit tests are passing with that weird re-creation of a socket hack thing, but the integration tests are having the same issue and failing sometimes.
This is a very weird one.
I wrote a little bash script to run tests 100 times to make it easier to force a repro of the failure.
#!/usr/bin/env bash

set -e

for i in {1..100}; do
  echo Run "${i}"
  cargo test --test compress client_and_server
done

pub fn available_port() -> u16 {
     let socket = std::net::UdpSocket::bind((std::net::Ipv4Addr::UNSPECIFIED, 0)).unwrap();
     socket.local_addr().unwrap().port()
 }

OOOH! I have an idea. Moving to a different branch to try it out. Wish me luck.

I worked it out! OMG. That ruined me.
https://github.com/googleforgames/quilkin/blob/bac95262211165aa0788f0f5daa96e990adf774e/src/proxy/server.rs#L122
👆🏻 This line right here. I didn't think about it, but I had an extra socket I was binding that wasn't doing any recv_from() work, that I was using to send data back downstream.
I didn't figure that it would still receive packets, but not do anything with them. (also the whole channel/worker system for send packets downstream is no longer needed either).
Refactored it all to pass in one of the several downstream UdpSocket right into the Session so it can send data back downstream, and everything now works as expected again.
I'm going to close this PR, and do a tonne of cleanup on all my experiments, but expect some PRs and updated benchmarks etc next week.


WriteJSON: handle marshaling nil as a top level value

Go's "encoding/json" can successfully marshal a nil value, whether it is typed or not for example https://play.golang.org/p/dZ_N86Onh8 or inlined
package main

import (
	"encoding/json"
	"fmt"
)

func main() {
	b, _ := json.Marshal(nil)
	fmt.Printf("%s\n", b)
}

which gives null
However, our package trips out. The question is: should we allow marshaling nil to null? I realize that most of the usages of this package is with non-nil values but I was just trying to provide test coverage for tendermint/types as per https://github.com/tendermint/tendermint/issues/693 and encountered this. Repro
package main

import (
	"bytes"

	"github.com/tendermint/go-wire"
	"github.com/tendermint/tendermint/types"
)

func main() {
	buf := new(bytes.Buffer)
	var n int
	var err error
	wire.WriteJSON((*types.CanonicalJSONOnceHeartbeat)(nil), buf, &n, &err)
}

which gives
panic: reflect: call of reflect.Value.Field on zero Value

goroutine 1 [running]:
reflect.Value.Field(0x0, 0x0, 0x0, 0x0, 0xc42010c000, 0xc42005df60, 0xc42005df68)
	/Users/emmanuelodeke/go/src/go.googlesource.com/go/src/reflect/value.go:764 +0x12e
github.com/tendermint/go-wire.writeReflectJSON(0x0, 0x0, 0x0, 0x1694d80, 0x149f960, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
	/Users/emmanuelodeke/go/src/github.com/tendermint/go-wire/reflect.go:970 +0x117b
github.com/tendermint/go-wire.WriteJSON(0x14367e0, 0x0, 0x168b640, 0xc42010c000, 0xc42005df60, 0xc42005df68)
	/Users/emmanuelodeke/go/src/github.com/tendermint/go-wire/wire.go:141 +0x121
main.main()
	/Users/emmanuelodeke/Desktop/experiments/tendermint-data/nil-trip.go:14 +0x84
exit status 2

PS: I encountered this while testing https://github.com/tendermint/tendermint/blob/49653d3e31e34a5da83e16e9ffdcd95a68acd9be/types/heartbeat.go#L24-L30

close?


Do not lock issues

I do not like the fact that tickets are locked immediately.
In any case, it makes the impression that feedback is unwanted and I think that should not be the case. I wanted to start a discussion on a topic that would also benefit the reach of this library and my ticket was locked after the first reply. I would have more to say about it and besides, the same question could come up to other developers.
I would love to use this library and would also be willing to contribute.
Thank you and keep up the good work.

I’m sorry I did that. But we still can’t provide the flexibility you’re asking for without compromising the design goals of the library. I would recommend that you fork.

I would have more to say about it and besides, the same question could come up to other developers.

Not only do we not have capacity to support this work, but we don’t have capacity to discuss it further. That’s what the “lock as resolved functionality” is for in Github.
I’ll leave comments open as a courtesy this time, but I will close the issue since it’s resolved.

I don't mind requests being denied or tickets being closed, but I think it is counterproductive in every way when tickets are locked. However, I just see that most tickets are not locked, just some.
Finally, thanks again for making this project available. I will follow your suggestion and fork it if I get stuck.


Bert vectorizer count of max tokens is wrong

https://github.com/wellcometrust/WellcomeML/blob/16754b0a9806b29b942a4ac67ba9b67253ce97fc/wellcomeml/ml/bert_vectorizer.py#L43
This lines tries to ensure that a max of 512 tokens are passed to BERT but tokens are not number of characters but number of words or subwords to be exact. The most accurate way to count them would be to tokenize using the bert tokenizer but we could also approximate by x.split()

I am not sure if that line is even needed. You can set max_position_embeddings on self.model if you want to embed a text with more than 512 words, otherwise, I think we should just cut the tokenised text. i.e., after
tokenized_x = self.tokenizer.tokenize("[CLS] " + x + " [SEP]")

do something like
if len(tokenized_x) > 512:
tokenized_x = tokenized_x[0] + tokenized_x[1:510] + tokenized_x[-1] # Note that we need this to preserve the token for [SEP]

I am sure there must be more elegant ways, but the idea of just cutting the text is what I'd go for.

I am not sure if that line is even needed. You can set max_position_embeddings on self.model ~if you want to embed a text with more than 512 words~ (this only works if you are re-training from scratch). I think we should just cut the tokenised text. i.e., after
tokenized_x = self.tokenizer.tokenize("[CLS] " + x + " [SEP]")

do something like
if len(tokenized_x) > 512:
    tokenized_x = tokenized_x[0] + tokenized_x[1:510] + tokenized_x[-1]
# Note that we need this to preserve the token for [SEP]

I am sure there must be more elegant ways, but the idea of just cutting the text is what I'd go for.

i agree with your solution, i will open a PR to address this

For some reason the BertClassifier does not suffer from that problem


Hyprland placing cursor on wrong screen after mouse ungrab

Hyprland Version
0.28.0.r65.37a211a2
Bug or Regression?
Bug
Description
I just got a new GPU, and by default, hyprland is no longer detecting my screen placement correctly.
I have set it up via the config file, but now something weird is happening: Whenver a fullscreen game grabs the cursor and ungrabs it, the cursor is placed on my other screen.
This is what I use:
monitor=HDMI-A-1, preferred, 240x150, 1
monitor=DP-3, preferred, 1920x0, 1

How to reproduce
open a game which grabs and ungrabs the mouse, like minecraft
Crash reports, logs, images, videos
No response

I am seeing the same issue.
Releasing the right-mouse button from a full-screen game on monitor 1 causes the mouse cursor to jump to monitor 2.
This behavior started when I upgraded to 0.28. I think this is a regression in 0.28. (v0.28.0-70-gfff118fa).

91e28bbe9df85e2e94fbcc0137106362aea14ab5 commit caused this issue for me.

wasnt this fixed yesterday?

Hyprland, built from branch main at commit 37128bfd43a3d86d270c09e34f18fe4df48c6b35 dirty (internal: Wayland Protocol impl improvements (2944)). Tag: v0.28.0-77-g37128bfd
Just tested. Still happens for me.

it's just that I am sitting here playing minecraft for like 8h today and havent seen this happen once lol

Not all xwayland apps/games affected by that. Baldur's gate 3 works fine, DeadByDaylight works also.
World of Warcraft have this problem. Can test other games/apps if needed.

@vaxerski So yeah I wanted to say something about that.-- The issue went away!
I think this has something to do with hyprland not adjusting properly after messing with the screen configuration.

I can confirm that this bug is still happening to me while playing Minecraft.

I can confirm that this bug is still happening to me while playing Minecraft.

any further setup info to repro? fullscreen? which monitor? scaling? version?

I have a Nvidia card with not scaling on the latest version of hyprland-nvidia-git. I am using a 1440p 1444 hz monitor and a 1080p 75hz monitor. I hope this helps!

What minecraft version? Could be a specific lwjgl mechanic.

I have seen that with Guild Wars 2. Moving the camera with the right mouse button will jump the cursor to my 2nd screen. Using negative coordinates
monitor=DP-2, 2560x1440@144, -2560x0, 1
monitor=DP-1, 2560x1440@144, 0x0, 1

fixed it for me, so I didn't take it in mind that it could have been a bug

I try that. I was using Minecraft 1.20 with fabulously optimized if that
helps.
On Mon, Aug 21, 2023, 11:54 PM varris1 @.***> wrote:

I have seen that with Guild Wars 2. Moving the camera with the right mouse
button will jump the cursor to my 2nd screen. Using negative coordinates
monitor=DP-2, @., -2560x0, 1
monitor=DP-1, @., 0x0, 1
fixed it for me, so I didn't take it in mind that it could have been a bug
—
Reply to this email directly, view it on GitHub
https://github.com/hyprwm/Hyprland/issues/3028#issuecomment-1687376569,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR4SALPOBLCOF2VV3VN7AKDXWQUPRANCNFSM6AAAAAA3WTKFQM
.
You are receiving this because you commented.Message ID:
@.***>

I'll try that. I was using Minecraft 1.20 with fabulously optimized if that helps.

I have a Nvidia card with not scaling on the latest version of hyprland-nvidia-git. I am using a 1440p 1444 hz monitor and a 1080p 75hz monitor. I hope this helps!

Did you test different games?
I have same bug as you, but there is other bug for me atleast. For example, i started game on 1440p resolution monitor. Game starts in 1080p resolution. Game graphic settings also offer maximum 1080p. If started/moved on 1080p monitor, i can see in game settings 1440p resolution.
Tried setting negative coordinates and sadly didn't help for me.
My hyprctl monitor output if this can help. I can record video if needed.

I also have been having that same issue with games launching at the wrong resolution when running via proton. Maybe this and the mouse bug are related?

The issue has returned for minecraft for me. Very weird

Same issue for me with minecraft:
> hyprctl monitors
Monitor eDP-1 (ID 0):
<EMAIL_ADDRESS>at 1920x0
	description: AU Optronics 0x80ED (eDP-1)
	make: AU Optronics
	model: 0x80ED
	serial:
	active workspace: 11 (11)
	special workspace: 0 ()
	reserved: 0 0 0 46
	scale: 1.00
	transform: 0
	focused: no
	dpmsStatus: 1
	vrr: 0

Monitor DP-3 (ID 1):
<EMAIL_ADDRESS>at 0x0
	description: AOC 27G2G4 GYGLCHA305056 (DP-3)
	make: AOC
	model: 27G2G4
	serial: GYGLCHA305056
	active workspace: 3 (3)
	special workspace: 0 ()
	reserved: 0 0 0 46
	scale: 1.00
	transform: 0
	focused: yes
	dpmsStatus: 1
	vrr: 0

Playing minecraft on the DP-3 monitor then going to menu (inventory, escape menu) moves cursor to the eDP-1 and shifts it by the movement done in the game.
But playing minecraft on the eDP-1 works just fine.
Tested full screen, floating, F11 all have the same behavior.
Seems to be issue with the monitor the game is on.

should be fixed with 28a90d6055f7b616c611c839967765f6536a7cd9, please check

Is there any other information that I could provide? To ease the debugging process?

Interesting fact (probably not helpful tho) is that the game doesn't lose focus (I have input.follow_mouse set to 1) so it should lose focus since the cursor is moved to different window (workspace), but it will not until I move the mouse a little.

patch.txt
try this

Here is quick video but I think the text speaks for it self
https://cloud.dev-null.me/s/ydqsXMnR9X9bzab

Not really the same behavior, the firefox game is just not  following the constraints at all no meter what monitor it's on.

I don't seem to be able to repro this. Can you give me a hyprland log where this happens? preferably the part of the log when the bug happens

[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1 - Singleplayer)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1 - Singleplayer
[LOG] New mouse constraint at 1bc2150
[LOG] Registered signal for owner 31d65d0: 1bc2258 -> 31d6660 (owner: Constraint)
[LOG] Registered signal for owner 31d65d0: 1bc2248 -> 31d65f8 (owner: Constraint)
[LOG] Registered signal for owner 1c3ed70: 31db1d0 -> 1c3edc8 (owner: Mouse constraint commit)
[LOG] Constrained mouse to 1bc2150
[LOG] Callback 1c3edf0 -> 1c3ede8, Mouse constraint commit removed.
[LOG] Unconstrained mouse from 1bc2150
[LOG] Callback 31d6688 -> 31d6680, Constraint removed.
[LOG] Callback 31d6620 -> 31d6618, Constraint removed.
[LOG] New mouse constraint at 1bcf660
[LOG] Registered signal for owner 31d65d0: 1bcf768 -> 31d6660 (owner: Constraint)
[LOG] Registered signal for owner 31d65d0: 1bcf758 -> 31d65f8 (owner: Constraint)
[LOG] Registered signal for owner 1c3ed70: 31db1d0 -> 1c3edc8 (owner: Mouse constraint commit)
[LOG] Constrained mouse to 1bcf660
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1 - Singleplayer)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1 - Singleplayer
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1 - Singleplayer)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1 - Singleplayer
[LOG] Callback 1c3edf0 -> 1c3ede8, Mouse constraint commit removed.
[LOG] Unconstrained mouse from 1bcf660
[LOG] Callback 31d6688 -> 31d6680, Constraint removed.
[LOG] Callback 31d6620 -> 31d6618, Constraint removed.
[LOG] Searching for matching rules for Minecraft 1.20.1 (title: Minecraft 1.20.1 - Singleplayer)
[LOG] Window 31d9a30 set title to Minecraft 1.20.1 - Singleplayer
[LOG] Set keyboard focus to surface 31cf710, with window name: ~
[LOG] Minimize request for 31d9a30
[LOG] Set keyboard focus to surface 31daf00, with window name: Minecraft 1.20.1 - Singleplayer
[LOG] Keybind triggered, calling dispatcher (64, , 49)
[

patch.txt
try this pach

Combined with the previous? or applied just to main branch?

https://gist.github.com/dev-null-undefined/f4d6a755accb11c19da202305bc65b57
here is better log with both normal behavior and the weird one

patch.txt
try this pach

This patch did fix the issue for me.
Thanks <3

Just to confirm that the current hyprland from AUR works for me. Confirmed fixed.
❯ hyprctl version
Hyprland, built from branch main at commit b10cae3010f5b1d853eb13f8a591ee10d67fe51e dirty (decos: groupbar mouse interaction (3102)).
Tag: v0.29.0-7-gb10cae30

flags: (if any)```

Many thanks @vaxerski !

I do get a weird issue that when the game first runs the window now seems to spawn "off screen". I get a black bar on the edge of one of the monitors, I have to select and then `moveworkspacesilent` to a workspace to see the application. But the right-click defocus mouse issue is gone.


Wrong Number of Arguments When Resolving from Container

Guys,
This is probably a rookie error, but I am trying to implement dry-container with dry-autoinject as per http://icelab.com.au/articles/better-code-with-an-inversion-of-control-container/.
Here's my container:
require "dry-container"
require "dry-auto_inject"
require "easy_json_matcher/node"
require "easy_json_matcher/array_generator"
require "easy_json_matcher/attribute_generator"
require "easy_json_matcher/schema_library"

module EasyJSONMatcher
  class Container
    extend Dry::Container::Mixin
  end

  Container.register "node", -> { Node }
  Container.register "array_generator", -> { ArrayGenerator }
  Container.register "attribute_generator", -> { AttributeGenerator }
  Container.register "schema_library", -> { SchemaLibrary }

  AutoInject = Dry::AutoInject(Container)
end

and here's the injection:
module EasyJSONMatcher
  class NodeGenerator
    include AutoInject["node", "attribute_generator", "array_generator", "schema_library"]
    include AttributeTypeMethods

...which looks right to me (naturally), however when I try to create an instance of the NodeGenerator class by calling #new I get the following error:
ArgumentError: wrong number of arguments (given 4, expected 0)
...don't really know where to start with this. Any input would be appreciated!

This has something to do with the constructor for NodeGenerator. If I remove the #initialize, it works.

That's because dry-auto_inject does something for you behind the scenes. First of all it defines .new method for your class where it extracts values from the container and passes them to #initialize. The second part is defining #initialize, not in your a class but in a mixin so your class now has a constructor with four arguments defined in the mixin. When you want to have your custom constructor along with generated one you just do nothing with arguments and call super like that:
def initialize(*)
  super
  # my custom logic
end

@flash-gordon Thank you very much. Fixed it! There was two things I had to work through: one was that I'm using keyword args and so I had to adapt the call to AutoInject to this, as per the tests:
include AutoInject.kwargs[...]

and the constructor had to be changed as follows:
def initialize(opts: [], global_opts: [], **args)

...and then also pull the master branch since the ruby gems version threw aNoMethodError for kwargs.
Now just to investigate how all this magic happens and I'll be able to move along...


jobber refuses to load jobs due to odd logging file format issue

i suddently happen to notice that no jobber-jobs are running and also jobber list does not list any.
Searching for quiet a while a happen to notice that
jobber reload
fails with
Call to Jobber failed: Invalid log file: /mnt/log/dwcore/cron-history: size is less than entry size
This was a log file before, and even if i do
echo "" > /mnt/log/dwcore/cron-history
to flush the logfile, i get the same error message. Only if rm the file entirely, i can reload the jobs and let them run.
My jobs log config looks like this:
[prefs]
runLog:
  type: file
  path: /mnt/log/dwcore/cron-history
  maxFileLen: 100m
  maxHistories: 2

I am currently not even able to explain what this error message actually mean, but for sure it should not road-block running jobber if the log-file does have an "unexpected EOL" or even "a blank line" or whatever it might actually be
is that actually supposed to happen / is by design?
Version
tried 1.3.2 and 1.3.4
Suggestion
If that is by design, i would at least try to start a discussion if that makes sense.
I suggest, never fail to load or run jobs because of the logfile being missformatted, non existing or even like in this case ( i do not even no ) not being of the "right size"? Always load the jobs, always run them
Workarround
I could ensure this does not happen when remove the runLog configuration entirely, which i did

Any chance we could move this forward? I found out that the reason for this was a copy&paste issue for 2 jobber configurations sharing the same log-path.
I understand that this is a configuration issue, but beside that really can happen, the second point is, that clearing the log ( echo "" > logfile ) makes the file broken too.
I would really love to have this just a little more robust / warning alike. Any chance of a discussion about this?

Yeah. I’ll look into it this weekend.

On Apr 3, 2019, at 1:35 PM, Eugen Mayer<EMAIL_ADDRESS>wrote:
Any chance we could move this forward? I found out that the reason for this was a copy&paste issue for 2 jobber configurations sharing the same log-path.
I understand that this is a configuration issue, but beside that really can happen, the second point is, that clearing the log ( echo "" > logfile ) makes the file broken too.
I would really love to have this just a little more robust / warning alike. Any chance of a discussion about this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@dshearer thank you a lot, let me know if you need anything

I agree with your suggestion.  Unfortunately I'm sick, so I may not make much progress this weekend.

No worries, i wish you to get better soon.

The doctors resuscitated me just so I could work on this bug.

 Thanks for taking your time for that one!

I guess this one died? :)

Lol... Sorry. I’ll get to it.

On Feb 22, 2020, at 11:19 PM, Eugen Mayer<EMAIL_ADDRESS>wrote:

I guess this one died? :)
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub, or unsubscribe.


Lazy Field Definition does not always work

Hey,
i have created the following sample code to prove that the lazy loading feature does not work as desired.
If I query the field Test2, the class TestInvokable is created despite lazy loading. This has the consequence that a lot of dependencies have to be resolved, which are not necessary for the query. In this example this is illustrated by a sleep of 3 seconds.
I have also created an alternative TestCase in which it works. When I set up the Schema as in the linked page: https://webonyx.github.io/graphql-php/schema-definition-language/, the TestInvokable class is not created. Since there are two ways to use the GraphQL, I would like to have this feature also for the scenario described below.
// index.php
$rawInput = file_get_contents('php://input');
$input = json_decode($rawInput, true);
$query = $input['query'] ?? '';
$variableValues = $input['variables'] ?? null;
$operationName = $input['operationName'] ?? null;

$queryType = $container->get(QueryType::class);

$schema = new Schema(['query' => $queryType]);

// execute query
$result = GraphQL::executeQuery(
    $schema,
    $query,
    null,
    null,
    $variableValues,
    $operationName
)->toArray();

echo json_encode($result);

// QueryType.php
class QueryType extends ObjectType
{

    private const TEST1_FIELD = 'Test1';
    private const TEST2_FIELD = 'Test2';

    private ContainerInterface $container;

    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;
        parent::__construct($this->getConfig());
    }

    public function getConfig(): array
    {
        return [
            'fields' => [
                self::TEST1_FIELD => fn() => [
                    'description' => 'My Test Field 1',
                    'type' => self::string(),
                    'resolve' => $this->container->get(TestInvokable::class),
                ],
                self::TEST2_FIELD => fn() => [
                    'description' => 'My Test Field 2',
                    'type' => self::string(),
                    'resolve' => fn() => 'Hello World',
                ]
            ],
        ];
    }
}

// Test Invokable
class TestInvokable
{

    public function __construct()
    {
        // Heavy dependencies
        sleep(3);
    }

    public function __invoke($source, array $args): string
    {
        return 'FooBar';
    }
}

Linked issue is a feature request to create a DI container known to GraphQL to use invokable classes for resolution. https://github.com/webonyx/graphql-php/issues/1088

Got it, I can reproduce the issue in a test case. The problem is that the schema is always loader eagerly when no type loader is present. I am trying to fix this in https://github.com/webonyx/graphql-php/pull/1104


Link validator is not accurate

run make lint
Expected

no errors
all files are validated

Actual

unhandled promise
requirements.md is skipped

Outdated. Fixed in the meantime.


[Chaos] Add support to fileio test

Please describe what you would like to see in this project
Add support to fileio options in the input schema, add related commandline arguments to the plugin, parse the output of the fileio test.
Please describe your use case
Create disk io hog scenario using arcaflow

Addressed with #18


Can't see SQL Databases using ARC box for it Pros

Note: For ease of issues and pull requests management and tracking, we kindly ask you to provide a meaningful and concise title to this issue and answer all questions to the best of your ability.

Is your issue related to a Jumpstart scenario, ArcBox, HCIBox, or Agora?
ArcBox
Describe the issue or the bug
after deploying al the infrastructure, when selecting ARCbox SQL machine, and then select databases the databases available in the sql instance are not showing up.
To Reproduce

Go to Arcbox SQL VM
Click on sql configuration and select Arcbox-sql
Scroll down to Databases
No databases displayed

Expected behavior
get the list of the available databases of the sql instance
Environment summary
I have tried deploying with both Developer and Enterprise edition for the SQL Database Edition. The same error happens
Screenshots

Hi @carloslone ,
Could you share the logs under C:\ArcBox\Logs ?
When we get those we can have a look at what might have happened to the databases.

@carloslone Any updates from your side?

LogsBundle-1rpw0z.zip

Find the information attached. Just redeployed the IT pro Jumpstart ArcBox

@carloslone Thank you. Looking at the log-files I did not see any errors in the section which configured the SQL VM.
Could you logon to the ArcBox-SQL VM, open SQL Management Studio from the desktop and check if you can see these databases?

Based on the outcome, we can check whether to troubleshoot on the SQL- or the Arc-side of things.

Databases are there, the problem is that dbs are not reflecting on the Azure Portal as the image shared previously.

@carloslone Thanks. It turns out there might be issues on the portal-side. Could you try this Azure Resource Graph Query?
resources
| where type =~ 'Microsoft.AzureArcData/sqlServerInstances/databases'
| project name, id

alternatively this Azure PowerShell command:
Get-AzResource -ResourceType "Microsoft.AzureArcData/sqlServerInstances/databases" | Select-Object Name, ResourceGroupName, Location

@carloslone Closing this one after our Teams-conversation where you confirmed the databases is showing via ARG/PowerShell. In addition, they have started to show in the portal - so likely something has changed on the service-side or the portal-side.


Update to beta.3

Blocked by https://github.com/angular/angular/issues/6887

WIP here https://github.com/mgechev/angular2-seed/tree/beta.3. I don't think beta.3 is worth merging because of the above issue.
However, I'd suggest to tag it once beta.4 is out.

I am running the beta.3 in a related project. The workaround for me was to install tsd globally, then run.
Did you run into other issues when updating?

Yes, global tsd solves the issue, however, we don't what to depend on a deprecated tool.

Wendnesday is Angular release day. Let's wait for beta.4 to be released
this Wednesday, then :1:
On Sun, Feb 7, 2016 at 4:10 PM, Minko Gechev<EMAIL_ADDRESS>wrote:

Yes, global tsd solves the issue, however, we don't what to depend on a
deprecated tool.
—
Reply to this email directly or view it on GitHub
https://github.com/mgechev/angular2-seed/issues/434#issuecomment-181028570
.

--
Jesper Rønn-Jensen
Nine A/S
Mobile: +45 2989 1822
Blog http://justaddwater.dk/
<EMAIL_ADDRESS>(Private e-mail and Google Talk IM)

Same here, lot of people already using Typings, but please before tagging remember to check zone.js since it is the root of all evil in this issue. angular/zone.js#240


[dart2wasm] Incorrect bounds/covariance check

import "expect.dart";

class A<T> {
  typeCheck(T x) {}
  boundCheck<X extends T>() {}
}

A<Object?> getA<T>() => int.parse("1") == 1 ? A<T>() : A<Never>();

void checkTypeParameterBound<T, Bound>() {
  getA<Bound>().boundCheck<T>();
}

void main() {
  Expect.throwsTypeError(() => checkTypeParameterBound<Object, String>());
}

checkTypeParameterBound throws a type error in JIT, doesn't throw with dart2wasm.

The problem is we don't generate type checks for type parameters, we only generate them for value parameters. Here's the code for boundCheck in the repro:
 (func $A.boundCheck (type $type$346) (param $0 (ref $type$348)) (param $1 (ref $type$4)) (result (ref null $type$48))
  (ref.null none))

I've added the type check in https://dart-review.googlesource.com/c/sdk/+/282660, but it currently fails with a null deref in runtime when the type parameter bound is something like X extends T<X>, e.g. the type being checked is used in the bound. Example:
class C<T extends Comparable<T>> {}

void main() {
  C<String>();
}

The Wasm field for T in this class is nullable, and it's value is null in the constructor for C when we generate the type check.
@askeksa-google do you know why we generate nullable Wasm fields for class type parameters?

The Wasm field for T in this class is nullable, and it's value is null in the constructor for C when we generate the type check.

This seems to be an ordering/scoping issue. I see two ways we could fix this:

Assign the type arguments to the type parameter fields before performing the type parameter bound checks.
Change the scoping of type variables such that inside a constructor body, the class type parameters refer to the type arguments given to the constructor, rather than the type parameter fields.


custom metric and saved models

Hi,
so working with version 0.4.4 now.
There are a few things which are still unclear to me when using custom metrics and trying to load the saved_models.
def GRU_test(x_train,y_train,x_val,y_val, params):
    neuron=73
    latent_rep_size=73
    def vae_loss(true, pred):
        true = K.flatten(true)
        pred = K.flatten(pred)
        poisson = 1*objectives.poisson(true, pred)
    return poisson

def R2_metric(y_true, y_pred):
    SS_res =  K.sum(K.square(y_true-y_pred))
    SS_tot = K.sum(K.square(y_true - K.mean(y_true)))
    return (1 - SS_res/(SS_tot + K.epsilon()))

inp = Input(shape=(time_steps, neuron))
encode = Bidirectional(GRU(neuron, return_sequences=True, dropout=0.0, name='lstm_1'), merge_mode='concat')(inp)
encode = Bidirectional(GRU(neuron, activation='linear', dropout=0.0, name='lstm_2'), merge_mode='concat')(encode)

z_mean = Dense(neuron, name='z_mean', activation='linear')(encode)
z_log_var = Dense(neuron, name='z_log_var', activation='linear')(encode)
encode=Lambda(sampling, output_shape=(neuron,), name='lambda')([z_mean, z_log_var])

repeated_context = RepeatVector(time_steps)(encode)

decode = GRU(neuron, return_sequences=True,dropout=0.05, name='dec_lstm_12',activation='linear')(repeated_context)

decode=TimeDistributed(Dense(params['size'], activation='linear'), name='get_factors')(decode)
decode=TimeDistributed(Dense(neuron, activation='linear'), name= 'pre_rates')(decode)
decode=TimeDistributed(Dense(neuron, activation= K.exp ),name= 'exp_layer')(decode)

nan=TerminateOnNaN()
callbacklist=[nan]

adam = optimizers.adam(clipvalue=200)
Vae=Model(inputs=inp, outputs=decode)
Vae.compile(optimizer='adam',loss= vae_loss, metrics=[R2_metric])
out=Vae.fit(x_train, y_train,validation_data=[x_val,y_val],epochs=400, callbacks=callbacklist)

return out, Vae

Gru = ta.Scan(ofc_binned, ofc_binned, params=latent_size,dataset_name='GRU_log', model=GRU_test,experiment_no='1')

One thing is the load_model function which is listed as part of the Predict() command in the talos manual. I just couldnt manage to pick a specific model to load and to test. It gives me the error:
<ipython-input-36-26b8b8f6ad51> in <module>()
  1 p = ta.Predict(Gru)
  2 # p.predict(ofc_binned,0)
----> 3 p.load_model(0)

AttributeError: 'Predict' object has no attribute 'load_model'

When just using the p.predict(data,1) line, I get an error for unknown function exp. How do I add a custom object dict at this point?
When trying something like saving the model first and loading it:
settings_dict={'exp': K.exp, 'latent_rep_size':73,'epsilon_std':1 }
one=model_from_json(saved_models[0],custom_objects=settings_dict)
one.save(os.getcwd()+ '/trained/GRU_test/model.hdf5' )
one = load_model(os.getcwd()+'/trained/GRU_test/model.hdf5' ,custom_objects=settings_dict)

When predicting with that model I clearly get the results of an untrained model. Does talos actually save all the models that are tested? If so could you show me a quick way how to load them?
Thanks a lot

Did you check the user guide in the corresponding part? I think the example there will help solve your problem. Also check out the corresponding docstrings for the functions for more.
For the case where for some reason you want to get access to all the models, that is also available through the Scan() object (but I'm guessing that's not what you're looking for now).

Thanks for the fast answer.
I already checked it, and I found it weird that predict is listed as part of the Predict command but the manual shows it's use as part of the Reporting command.  Might be an error?
 How do I declare this custom object here?
p = ta.Predict(Gru)
p.predict(ofc_binned,0)

ValueError                                Traceback (most recent call last)
<ipython-input-30-fadcb4245a59> in <module>()
      1 custom_objects=settings_dict
      2 p = ta.Predict(Gru)
----> 3 p.predict(ofc_binned,0)
      4 # p.load_model()

~/.local/lib/python3.5/site-packages/talos/commands/predict.py in predict(self, x, model_id, metric, asc)
     27             model_id = best_model(self.scan_object, metric, asc)
     28
---> 29         model = activate_model(self.scan_object, model_id)
     30
     31         return model.predict(x)

~/.local/lib/python3.5/site-packages/talos/utils/best_model.py in activate_model(self, model_id)
     18     '''Loads the model from the json that is stored in the Scan object'''
     19
---> 20     model = model_from_json(self.saved_models[model_id])
     21     model.set_weights(self.saved_weights[model_id])
     22

~/.local/lib/python3.5/site-packages/keras/engine/saving.py in model_from_json(json_string, custom_objects)
    366     config = json.loads(json_string)
    367     from ..layers import deserialize
--> 368     return deserialize(config, custom_objects=custom_objects)
    369
    370

~/.local/lib/python3.5/site-packages/keras/layers/__init__.py in deserialize(config, custom_objects)
     53                                     module_objects=globs,
     54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')

~/.local/lib/python3.5/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier,    module_objects, custom_objects, printable_module_name)
    143                     config['config'],
    144                     custom_objects=dict(list(_GLOBAL_CUSTOM_OBJECTS.items()) +
--> 145                                         list(custom_objects.items())))
    146             with CustomObjectScope(custom_objects):
    147                 return cls.from_config(config['config'])

~/.local/lib/python3.5/site-packages/keras/engine/network.py in from_config(cls, config, custom_objects)
   1015         # First, we create all layers and enqueue nodes to be processed
   1016         for layer_data in config['layers']:
-> 1017             process_layer(layer_data)
   1018         # Then we process nodes in order of layer depth.
   1019         # Nodes that cannot yet be processed (if the inbound node

~/.local/lib/python3.5/site-packages/keras/engine/network.py in process_layer(layer_data)
   1001
   1002             layer = deserialize_layer(layer_data,
-> 1003                                       custom_objects=custom_objects)
   1004             created_layers[layer_name] = layer
   1005

~/.local/lib/python3.5/site-packages/keras/layers/__init__.py in deserialize(config, custom_objects)
     53                                     module_objects=globs,
     54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')

~/.local/lib/python3.5/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
    143                     config['config'],
    144                     custom_objects=dict(list(_GLOBAL_CUSTOM_OBJECTS.items()) +
--> 145                                         list(custom_objects.items())))
    146             with CustomObjectScope(custom_objects):
    147                 return cls.from_config(config['config'])

~/.local/lib/python3.5/site-packages/keras/layers/wrappers.py in from_config(cls, config, custom_objects)
    108         from . import deserialize as deserialize_layer
    109         layer = deserialize_layer(config.pop('layer'),
--> 110                                   custom_objects=custom_objects)
    111         return cls(layer, **config)
    112

~/.local/lib/python3.5/site-packages/keras/layers/__init__.py in deserialize(config, custom_objects)
     53                                     module_objects=globs,
     54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')

~/.local/lib/python3.5/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
    145                                         list(custom_objects.items())))
    146             with CustomObjectScope(custom_objects):
--> 147                 return cls.from_config(config['config'])
    148         else:
    149             # Then `cls` may be a function returning a class.

~/.local/lib/python3.5/site-packages/keras/engine/base_layer.py in from_config(cls, config)
   1107             A layer instance.
   1108         """
-> 1109         return cls(**config)
   1110
   1111     def count_params(self):

~/.local/lib/python3.5/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
     89                 warnings.warn('Update your `' + object_name +
    90                               '` call to the Keras 2 API: ' + signature, stacklevel=2)
---> 91             return func(*args, **kwargs)
     92         wrapper._original_function = func
     93         return wrapper

~/.local/lib/python3.5/site-packages/keras/layers/core.py in __init__(self, units, activation, use_bias,         kernel_initializer, bias_initializer, kernel_regularizer, bias_regularizer, activity_regularizer, kernel_constraint, bias_constraint, **kwargs)
   839         super(Dense, self).__init__(**kwargs)
    840         self.units = units
--> 841         self.activation = activations.get(activation)
    842         self.use_bias = use_bias
    843         self.kernel_initializer = initializers.get(kernel_initializer)

~/.local/lib/python3.5/site-packages/keras/activations.py in get(identifier)
    187     if isinstance(identifier, six.string_types):
    188         identifier = str(identifier)
--> 189         return deserialize(identifier)
   190     elif callable(identifier):
    191         if isinstance(identifier, Layer):

~/.local/lib/python3.5/site-packages/keras/activations.py in deserialize(name, custom_objects)
   168         module_objects=globals(),
    169         custom_objects=custom_objects,
--> 170         printable_module_name='activation function')
   171
    172

~/.local/lib/python3.5/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
    163             if fn is None:
    164                 raise ValueError('Unknown ' + printable_module_name +
--> 165                                  ':' + function_name)
    166         return fn
    167     else:

ValueError: Unknown activation function:exp

How about the example here, would that help you to get your head around it?
There might be some inconsistency with the information, so I will check into that. Sorry for inconvenience.
Generally speaking the idea is that in order to actually use the models, there are several different ways in which we can do that within Talos, but the idea is to avoid entirely handling the save / load outside of Talos. The most seamless of these is the Deploy() and then working out of the deploy package (there is a readme included in the deploy package that explains how).
If the above does not help, I can create an example notebook which is just focused on making predictions with models.


[CROSSDATA-686][testsAT]Added tests for count distinct and crossjoin

Description
Added tests for count distinct and crossjoin

Coverage remained the same at 49.238% when pulling ed7150c65289b090847298cea1d6abfb589f61f0 on hdominguez1989:testsAT/CROSSDATA-686 into 246abfb3bf7d48f6b1cb6b90e8545edec186630c on Stratio:master.


Add an LRU cache to the volume manager

See issue #18 Part 1:

[X] Add the cache to the volume manager

[X] Check the cache for the sector root. If the sector does not exist in the cache, read it from disk, and add it.

[X] Add newly written sectors to the

[ ] Write unit tests

It would also be nice to track cache hits and misses. Adding counters to the volume manager and incrementing them with the atomic package should make that very straightforward.

go.sia.tech/hostd/rhp/v3/TestStoreSector is failing due to cache hit. You should be able to fix it with a cache eject rpc_test.go:220: expected error when reading sector

go.sia.tech/hostd/rhp/v3/TestStoreSector is failing due to cache hit. You should be able to fix it with a cache eject rpc_test.go:220: expected error when reading sector

In the updated code, after detecting a cache hit, the sector is returned as expected, but before doing so, the sector is removed from the cache using vm.cache.Remove(root) to simulate a cache miss. I hope the test should pass after making this change, do let me know your thoughts.

Looks like TestRemoveCorrupt also needs to have the cache set to 0

Looks like TestRemoveCorrupt also needs to set the cache to 0. Try running go test -race -tags=testing ./... to see if there are any more.
After running go test -race -tags=testing ./...  no other packages appear to need to resize the cache to 0. The storage package is properly handling that in its tests.

Great job on this!


add gazebo

Tested it on WSL. Seems to run fine
website for reference

Thank you for your contribution!


Introduce support for placement constraints

Resolves #18

How would you suggest to test this against a cluster?  Maybe the deduceConstraints method can be made public and a unit test created to assert correct behavior at the unit level?

Either that or we mock the REST client altogether (which could serve to do other testing). What do you prefer?

This is outdated - has to be re-implemented as part of https://github.com/spring-cloud/spring-cloud-deployer-mesos/issues/38


Guest Charges Incorrect

There is some issue when people are checking in guests where the system charges them for one more guest than they actually have.  I think it is on the add visitor screen when they choose a shooter count other than 1, they then put in the first guest and then subsequent guests and it seems to charge them for the number they entered and then additionally for each subsequent guest separately even though it only registers the correct number of guests in the guest count.  It would probably be easiest to have them just enter each guest individually which is the work around we've been using.  If we did away with the shooter count field as an option on that screen they would just be forced to do one at a time.

guest checkout will only let you but 2 guests??

Fixed and pushed


How to calculate the average rank?

In the leaderboard, [LLaVA-InternLM2-20B (QLoRA)] get higher average score than Monkey-Chat, but Monkey-Chat rank higher. So how to calculate the Avg.Rank as the leaderboard shows?

Hi, @liuheng0111 ,
Avg. Rank means the average ranks of an VLM on different benchmarks. For example, if there exist two benchmarks: MMBench and MMBench_CN, if GPT-4v ranked 1st on MMBench and ranked 3rd on MMBench_CN, it's Avg. Rank would be (1+3) / 2 = 2.
According to the definition, the Avg. Rank and Avg. Score may not have exactly the same partial order.


Bug: LexicalClipboard pasting over mention crashes Chrome

Lexical version: 0.14.5
Steps To Reproduce

Open Lexical Playground in Chrome and add an @-mention
Copy some any text to your clipboard
Create a selection that starts at the beginning of the @-mention (it can end within, at the end or after the mention)
Now paste from clipboard

The current behavior
In most cases this crashes Chrome, in rare cases it only takes very long and produces a warning [Violation] 'paste' handler took 95275ms. This affects up-to-date Chrome on macOS and Windows. Safari on macOS is not affected.
In a case where Chrome wasn't entirely crashing I was able to take this performance trace (sorry, I only took a screenshot instead of exporting the trace)

I reproduced. Wow!

Closed by #5956


Fix "weave ps" output when weave is not running

The #2418 has changed a behaviour of weave ps cmd when weave is not running: instead of outputting an empty line, the cmd returns Link not found error.
To fix that, we check (in an ugly way, because the netlink package does not export sentinel errors) whether the "weave" bridge can be found, as it has been done before through bunch of indirections.

Maybe return your own sentinel error from ConnectedToBridgePredicate that could be tested?

Thanks for the suggestion. PTAL.


Integration/Energy Sensors suddenly gone

** Versions **

Home Assistant version (for instance 2023.9): 2024.07
This integration version (for instance 1.1.0): 1.9.1

Describe the bug
Hi,
I just noticed that all the total-energy sensors have suddenly become unavailable, and HA's statistics repair tool says their unit changed from kWh to ''.
During startup, I can see this message in the log, which seems to be the reason for this. I think this was caused by the HA 2024.07 update.
2024-07-05 08:25:36.191 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up aquarea platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 364, in _async_setup_platform
    await asyncio.shield(awaitable)
  File "/config/custom_components/aquarea/sensor.py", line 188, in async_setup_entry
    integration_sensors.append(EnergyIntegrationEntity(
                               ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: IntegrationSensor.__init__() missing 1 required keyword-only argument: 'max_sub_interval'

Screenshots
Sorry, renamed the entities a bit, it's just the ones created by the integration.

See also:
https://github.com/nathanmarlor/foxess_modbus/discussions/635
https://github.com/home-assistant/core/pull/110685

Good catch, thanks for the report. It affects only HA 2024.7 and I've fixed this in 1.9.2

Thanks for the fix.
Although I am running HA 2024.7.0, trying to update results in an error stating my HA version is incompatible.

Looks like a bit of an unfortunate string comparison mismatch..


[WIP] Grammar support for way names (for Russian instructions as example)

New feature for OSRM Text Instructions - grammatical cases support for way names. This is quite important for many languages (Russian, Ukrainian, Polish, Bulgarian, Finnish, Estonian and many others) - otherwise translated strings with inserted way names (in nominative case as in OSM) look grammatically incorrect in most cases.
This feature extends {way_name} and {rotary_name} in instructions with optional grammar case label and so requires  update of other applications used OSRM Text Instructions data (Ruby #26 and Swift #53).
Unfortunately this proposal is incompatible with Transifex (see #101) and so can't be easily merged. This PR is supposed mostly for proposed changes review in details and to illustrate this problem for public.

Thanks @yuryleb. As mentioned before, we need to do some more thinking here.
Blockers seem to be:

Re-think localization file format https://github.com/Project-OSRM/osrm-text-instructions/issues/19
Fix workflow with transifex to allow for different tokens

@freenerd, @1ec5, @oxidase, finally I solved to add grammatical case labels in new languages\overrides\ru.js script to post-process Transifex localization data - translated strings parsing seems quite simple and could be easily patched for new context phrases or even re-used for other languages if it will be necessary.
I don't think Transifex or any other localization service will allow arbitrary keywords expansion. Actually languages\overrides post-processing used by OSRMTI for final customization looks the better idea.
So let's meet the first route instructions with proper grammatical cases at least in Russian :tada:

BTW other OSRMTI-related projects (osrm-text-instructions.swift, osrm-text-instructions.java, etc?) should also be updated to expect {way_name:*} and {rotary_name:*} variables at least or completely support grammatical cases (with way described in Grammar.md) at last.

Thanks @yuryleb! I’m going to merge this PR now, but feel free to iterate on the feature in separate PRs if you have any additional changes to make.