Add support for multiple config server addresses

Multiple config server addresses can be set in spring.cloud.config.uri
as a comma separated list. If server discovery is enabled, all provided
service instances are taken.
The result of the first available server is used.
See https://github.com/spring-cloud/spring-cloud-config/issues/342

@fkissel thanks for the submission. It seems quite complex to me. Maybe if we used ribbon via the spring cloud LoadBalancerClient which supports retrying on different servers already. @dsyer thoughts?

@spencergibb thanks for your feedback.
I actually started with an different approach that used the LoadBalancerClient abstraction and ribbon. For a couple of reasons I ended up adding a simple for-loop in ConfigServicePropertySourceLocator:

Of cause, adding an explizit, non-optional dependency of ribbon to spring-cloud-config-client is not an option. As far as I understand autoconfiguation (including the use of spring.factories-files) this would immediately break existing spring boot setups that uses a different LoadBalancerClient.
As an alternative we could require, that an implementation of LoadBalancerClient is added as a dependency to the application. But this would have the following drawbacks:
** If spring.cloud.config.uri would contain a list of uris, fail-fast is enabled and no implementation of LoadBalancerClient is available, an exception could be thrown at startup time. But if service discovery is enabled and multiple config servers are available, only one of them (like today, the first?) could be used.
** In ConfigServicePropertySourceLocator the BasicAuthorizationInterceptor is added only, if no RestTemplate was manually injected via the setRestTemplate method. For consistency reasons we should do it in the same way when adding a LoadBalancerInterceptor. Hence, in setups with manually injected RestTemplate the failover mechanism would not work without some additional changes.

To cut a long story short, this were my must-haves:

The configuration should be as simple as possible: use a comma separated list, that's it. No need to add additional dependency.
No side effects to existing spring boot setups. In particular, there should be no additional dependencies which might break existing setups by adding some beans via autoconfigution. (ribbon, retry)
It should work for service discovery, too.

On the other hand, there are - of cause - some disadvantage:

No use of the existing LoadBalancerClient abstraction and existing implementations like ribbon.
You are not able to configure the load balancing (e.g. IClientConfig).
ConfigServicePropertySourceLocator became more complex (the "single responsibility principle" is violated)

To be honest, it's quite hard for me to weight the arguments against each other. If you say, using LoadBalancerClient should be the way to go (and I should not be to much afraid of breaking any existing setup), that is fine with me.
If you like, I could contribute another solution using the LoadBalancerClient abstraction.

Closing this due to inactivity. Feel free to reopen if you want to go down the LoadBalancerClient route.

Why was that feature not merged to the current version? The spring config server is not really useful in a production environment if there is no clientside failover...

@Syy0n it is explained above why we didn't merge in its current form. Our advice so far is to put it behind a platform load balancer.


stacks blockchain api nav changes

Description
This PR contains individual Stacks Blockchain API product documentation files and an updated sidebar.js file for updated navigation.
Checklist

[ ] Conventional commits were used
[ ] New links to files and images were verified
[ ] For fixes/refactors: all existing references were identified and replaced
[ ] Style guide was reviewed and applied
[ ] Clear code samples were provided
[ ] People were tagged for review

Closing this PR as a duplicate of https://github.com/hirosystems/docs/pull/174


add jump op code spec

we can discuss later , should be something to be clarified .

closing as new one sending out


Bullet points!

Signed-off-by: Eric Windisch<EMAIL_ADDRESS>

Coverage remained the same at 10.891% when pulling 4c93c4a26f37f5c3237e4fff390fb551d645cc44 on ewindisch:readme-aws into 9156f50269076484b7cd820131d4ca3da56b8dff on iopipe:master.


Only search within  if possible

This changes the regex's to only search the data within the  tags if they exist. Without this change the iToolkit was reporting success for SQL queries that fail. We have been running with this change for almost 4 months now without any problems other than those mentioned below.
There are 3 caveats to this fix:

I have only tested this with the REST interface to XMLSERVICE via Apache CGI. I don’t know if this will work using other transports.
It does not handle queries where there are no records in the result correctly. It returns an error for empty result sets.
I have only tested it with SELECTs. I have not tested with UPDATEs, INSERTs or DELETEs.

I will look into adding a fix to handle SQL queries with empty result sets as soon as possible.
This fixes #47

I much prefer we merge #53 and let Xml2Json die.

I much prefer we merge #53 and let xmlToJson die.

Closing in favor of #53


feat: one params per a handler (optimized for RegExpRouter)

After thinking about this issue for a while, I have come to the conclusion that the interface should be almost the same as #1555.
What is different about this PR
Data structure based on array
Result<T> is now defined as an Array.
https://github.com/usualoma/hono/blob/bb0ff1fb680ce88d2fce991552e05eb17f283f01/src/router.ts#L14
This is because an Array is faster to access elements than an Object, and the bundle size is smaller when minified.
However, since the contribution to speed by making it an Array is limited and the code is less readable, some may argue that the format using Objects is better in this regard.
Optimized for RegExpRouter
The following data structures can now be returned from match. This allows the RegExpRouter to work as fast as before.

benchmark
In my environment, the results were about the same as before.
benchmarks/handle-event
Hono - main x 484,819 ops/sec ±6.77% (72 runs sampled)
Hono - params-per-handler-2 x 495,303 ops/sec ±6.74% (75 runs sampled)
itty-router x 217,435 ops/sec ±2.53% (92 runs sampled)
sunder x 258,899 ops/sec ±5.35% (75 runs sampled)
worktop x 188,327 ops/sec ±3.43% (85 runs sampled)
Fastest is Hono - params-per-handler-2,Hono - main

benchmarks/routers (I perceive the same performance because the ranking often changes when the routers are reordered.)
• all together
-------------------------------------------------------------------------------- -----------------------------
Hono TrieRouter                             2.01 µs/iter     (1.99 µs … 2.07 µs)   2.02 µs   2.07 µs   2.07 µs
Hono RegExpRouter - main                  443.81 ns/iter (422.96 ns … 468.42 ns) 446.81 ns 462.18 ns 468.42 ns
Hono RegExpRouter - params-per-handler-2  451.29 ns/iter (431.47 ns … 476.33 ns) 453.57 ns 476.24 ns 476.33 ns
@medley/router                            608.95 ns/iter (591.48 ns … 629.72 ns) 612.27 ns 629.72 ns 629.72 ns
find-my-way                                 1.03 µs/iter     (1.01 µs … 1.11 µs)   1.03 µs   1.11 µs   1.11 µs
koa-tree-router                           659.81 ns/iter (638.36 ns … 724.44 ns) 665.09 ns 724.44 ns 724.44 ns
trek-router                                 1.02 µs/iter   (988.83 ns … 1.05 µs)   1.02 µs   1.05 µs   1.05 µs
express (WARNING: includes handling)        7.83 µs/iter     (7.77 µs … 7.93 µs)   7.86 µs   7.93 µs   7.93 µs
koa-router                                 13.03 µs/iter     (12 µs … 164.54 µs)  12.75 µs  17.46 µs  21.96 µs
radix3                                      1.55 µs/iter      (1.5 µs … 1.59 µs)   1.56 µs   1.59 µs   1.59 µs

summary for all together
  Hono RegExpRouter - main
   1.02x faster than Hono RegExpRouter - params-per-handler-2
   1.37x faster than @medley/router
   1.49x faster than koa-tree-router
   2.29x faster than trek-router
   2.32x faster than find-my-way
   3.5x faster than radix3
   4.53x faster than Hono TrieRouter
   17.64x faster than express (WARNING: includes handling)
   29.35x faster than koa-router

Author should do the followings, if applicable

[x] Add tests
[x] Run tests
[x] yarn denoify to generate files for Deno

Hi @usualoma,
I have taken the time to think about this and I find it to be an interesting approach!

However, since the contribution to speed by making it an Array is limited and the code is less readable, some may argue that the format using Objects is better in this regard.

Indeed, but I don't think it's significantly less readable.
So, how about we go this way!? If so, can you complete the PR? It's a hard task to write the code for other routers, but I'd like you to do it.
Thanks!

@yusukebe OK, I will try to implement this specification in other routers.

@yusukebe
By the way, TrieRouter no longer checks for "Duplicate param name" at all, so it no longer makes an error if multiple cases of the same name exist in a single path.
Before
https://github.com/honojs/hono/blob/main/src/router/trie-router/node.test.ts#L435-L440
After
https://github.com/usualoma/hono/blob/48127094af314dad390907f727d1353ff322c4f1/src/router/trie-router/node.test.ts#L451-L458
What do you think about this point with other routers?
In my opinion, it is better to "not check Duplicate param name at all, even on other routers".
The reason for this is that there is no need for the framework to check it, since it is unlikely that there are multiple instances of the same name in a single path.
Instead, stopping checking and making the code shorter would be more useful.

@yusukebe
Oh, sorry, I didn't explain myself well enough.
RegExpRouter still makes an error for duplicates like /:id/:id in this branch, but I'm talking about whether or not to stop doing that check.
https://github.com/usualoma/hono/blob/48127094af314dad390907f727d1353ff322c4f1/src/router/reg-exp-router/node.ts#L100-L102

@usualoma

What do you think about this point with other routers?
In my opinion, it is better to "not check Duplicate param name at all, even on other routers".

I agree. We don't need to check it. And I've implemented it to make id be 123 not 456 in the test of TrieRouter:
it('self', () => {
  const node = new Node()
  node.insert('get', '/:id/:id', 'foo')
  const [res] = node.search('get', '/123/456')
  expect(res.length).toBe(1)
  expect(res[0][0]).toBe('foo')
  expect(res[0][1]['id']).toBe('123')
})

I think it's sufficient to have a rule that if the path has the same param name, the first value will be used.

Ah, if we could throw an error in the insert phase, that would be best.

Done.
@yusukebe Review, please.
For /:id/:id

LinearRouter, RegExpRouter, TrieRouter : If the path is /123/456, id be 123 not 456.
PatternRouter : throw new UnsupportedPathError() in the insert phase

Hi @usualoma,
Thank you very much for the great work. It looks good!
I've added some tests and merged the next branch. I think there's no problem, so I'll merge it tomorrow morning.

@yusukebe Thanks. LGTM!

Okay!! Let's go!!


CB-5546 Mock integration tests for parent-child environment relation

CB-5546
Mock integration tests for parent-child environment relation

retest this please


Sponsor image seems to big for mobiie view

Description
Adjust its size accordingly for Mobile View
Screenshots

Additional information
No response

Working on it.

@RajKanani1206 Wait for the PRs being reviewed


Mapping the phase distribution to the physical structure of the lens

From your published paper, I can see the lens parameters that you've trained are as follows:
phase_initial = np.array([-0.3494864 , -0.00324192, -1., -1.,-1., -1., -1., -1.], dtype=np.float32)

Plugging these parameters into the phase distribution polynomial yields the phase distribution. However, I'm wondering how to map this phase distribution to the physical structure of the lens. Could you provide some guidance and references on how to proceed with this mapping?

In supplementary you mentioned: "We restrict the parameter range for all phase coefficients to be within [−1000, 1000], and during optimization we normalize the range to be within [−1, 1].", that means the coefficients used to fabricate lens are [-349.4864, -3.24192, -1000.0, -1000.0, -1000.0, -1000.0, -1000.0, -1000.0].
But the phase profile will be very large and Far more than [0,2pi], how do we restrict the phase to [0,2pi]?

I have encountered difficulties when trying to optimize both components together and would appreciate any insights into this aspect of the training process.
Did you succeed in training the entire optimization cycle, with the metasurface coefficients and network simultaneously optimized?

I have encountered difficulties when trying to optimize both components together and would appreciate any insights into this aspect of the training process.
Did you succeed in training the entire optimization cycle, with the metasurface coefficients and network simultaneously optimized?

No，I can't train normally either.


Vet clinic database: query and update animals table

In this pull request, I:

Added a column species of type string to my animals' table.
Inserted the following data:
Animal: His name is Charmander. He was born on Feb 8th, 2020, and currently weighs -11kg. He is not neutered and he has never tried to escape.
Animal: Her name is Plantmon. She was born on Nov 15th, 2022, and currently weighs -5.7kg. She is neutered and she has tried to escape 2 times.
Animal: His name is Squirtle. He was born on Apr 2nd, 1993, and currently weighs -12.13kg. He was not neutered and he has tried to 3 times.
Animal: His name is Angemon. He was born on Jun 12th, 2005, and currently weighs -45kg. He is neutered and he has tried to escape once.
Animal: His name is Boarmon. He was born on Jun 7th, 2005, and currently weighs 20.4kg. He is neutered and he has tried to escape 7 times.
Animal: Her name is Blossom. She was born on Oct 13th, 1998, and currently weighs 17kg. She is neutered and she has tried to escape 3 times.
Updated the animals' table Inside a transaction by setting the species column to unspecified. Verified that change was made. Then rolled back the change and verified that species columns went back to the state before the transaction.
Inside a transaction:
Updated the animals' table by setting the species column to Digimon for all animals that have a name ending with mon.
Updated the animals' table by setting the species column to pokemon for all animals that don't have species already set.
Committed the transaction.
Verified that change was made and persists after commit.
Inside a transaction:
Deleted all animals born after Jan 1st, 2022.
Created a savepoint for the transaction.
Updated all animals' weight to be their weight multiplied by -1.
Rolled back to the savepoint
Updated all animals' weights that are negative to be their weight multiplied by -1.
Committed transaction
Wrote queries to answer the following questions:
How many animals are there?
How many animals have never tried to escape?
What is the average weight of animals?
Who escapes the most, neutered or not neutered animals?
What is the minimum and maximum weight of each type of animal?
What is the average number of escape attempts per animal type of those born between 1990 and 2000?

Thank you, @emmanuellekamwa :pray:


Implement Git Actions to welcome new PR's with a bot message

Is your feature request related to a problem? Please describe.
Related to #89
Describe the solution you'd like
Create a new issue to resolve merge conflicts with main branch
Additional context
Tried to merge into main in #89 but didn't work, hopefully this one will! 🤞

Hi @Bashamega,
Apologies for the delay. Here is the link for testing the bot message. Please let me know if you have any suggestions and I will send the changes to your repo asap.

Hi @Bashamega,
Apologies for the delay. Here is the link for testing the bot message. Please let me know if you have any suggestions and I will send the changes to your repo asap.

Thanks. please open a pr


Host key verification failed.

[   {     "command": "/bin/sh /tmp/r6300v2.sh",     "path": "/",     "exit_status": 255,     "errors": "Host key verification failed.",     "output": ""   } ]
why I'm always get this error by Shell Command Agent.

That sounds like your shell script is trying to make an ssh connection with host key checking enabled and the host key isn't known to the system already.


Upgrade molo.surveys to 6.1.1

https://github.com/praekelt/molo.surveys/compare/6.1.0...6.1.1
This will cause some additional database reads for logged-in users.
This pull request includes a separate unrelated commit to urlpatterns which should have no actual change in behaviour.

👍


Documentation fix: Referencing correct pip in installation examples

The examples are supposed to be for Python2.7 so it makes sense that they refer to the correct pip (pip instead of pip3) to avoid any potential confusion.

Can one of the admins verify this patch?

Jenkins, test this please.


The email field is vulnerable to html injection which leads to xss

Version
2.5.13
Reproduction link
https://app.snov.io/login
Steps to reproduce
I know that snov.io is not your website.I request you to see the framework vulnerability
1)The website https://app.snov.io/login uses the vue.js version 2.5.13 which is vulnerable.
2)login and add new member/profile in the https://app.snov.io/prospects/new-profile/1841654#
3)there is a email field which is vulnerable to html injection
4)Actually these codes execute when i finish the code which can able to produce generic xss
What is expected?
need to sanitize the email field
What is actually happening?
Html injection ,Generic xss,click hijacking

The email field should  accept only the email address not any html codes

This is not related to Vue.js. Please contact the team responsible for supporting that website.


Installation guide

I can't install hansonTable for now even with the installation guide.
So I have few question :

Shouldn't vue be loaded first ?
Why there is no Vue.use command ?

Maybe like this :

import Vue from 'vue';
import HotTable from '@handsontable/vue';
Vue.use(HotTable);

You can use CLI and create an app automatically (check the command on the bottom of https://cli.vuejs.org/) and then proceed with the steps that are written in our Guide.
After you create an app using the command create
you should get something like this

I'm tryying to use HandsonTable inside an application created with Laravel/vueJS all other plugin used so far are working with

import YourPlugin from 'path/your-plugin';
Vue.use(YourPlugin);

And inside the Laravel view I can use the plugin

<\your-plugin><\/your-plugin\>

Why this plugin is different ? And how to use it in this configuration ?

Hm... I see. I thought that you're just starting a project. We'd need to check that. Maybe we're missing some settings in the wrapper.

Handsontable for Vue is not a plugin. It's a component.
The Vue.js documentation is very specific when Vue.use() should be used and Handsontable for Vue doesn't do a single thing from that list.
To use component in Vue you need to import and register it within component that will use it. Just like the Vue docs say: https://vuejs.org/v2/guide/components-registration.html#Local-Registration Or register it globally if you prefer.
Your examples don't mention component registration:
components: {
   HotTable
}

Can you show us the rest of your code?

More code as asked:
1st try - using it in the view | Console error : ReferenceError: HotTable is not defined on line 263
main.blade.php

...

        <HotTable :settings="hotSettings"></HotTable>

...

2nd try in the component | Console error : ReferenceError: HotTable is not defined on line 536

*pannelComponent.vue*
<template>

    ...

            <HotTable :settings="hotSettings"></HotTable>

    ...

</template>

You're missing the import, that's why HotTable is not defined.
<template>
    <HotTable :settings="{ ... }"></HotTable>
</template>

I finally found the problem, it's impossible to import camelCase component. That strange but at least this code works :


code-gen(docs): do more with .docs()

[x] Validate single line and multiline usage on all places where it is printed + print consistently
[x] Print property docs in the type generator, supporting both single + multiline (Done in experimental generators)
[ ] Support {@reference UniqueName} replacements.

If UniqueName is a route, resolve to apiUniqueName execept when in the router or reactQuery generator
Else resolve to the type
Use JSDoc {@link }

Will include the {@reference UniqueName} in ideas for after @compas/code-gen/experimental


Wrapping a reactabular row with an HOC/Context

Hi,
Is possible to wrap a row with a HOC or Context ?
I would like to implement a table row edit (not cell by cell edit) but i'm unable to use informed or Formik to wrap a reactabular row with a form control logic.
Is there a way to manipulate a row or is the API only allows cell manipulation ?
Any ideas ?
Thanks.

Did you notice the components API? Technically you can override anything that's in the structure (the component is headless).
Could you set up a small example of what you have together so far?

Here are the related docs: https://reactabular.js.org/#/table/overriding-default-renderers .

Its looks like using the Table.Provider renders (specifically the  body.row) can help with wrapping the TableRow with a HOC.
const RowWrapper = props => (<tr>...</tr>);

<Table.Provider
  columns={...}
  renderers={{
    body: {
      row: RowWrapper
    }
  }}
>
   ...
<Table.Provider />

The thing is that the RowWrapper only receives children.
If props like property and rowData would pass throughה 'TableRow' then a RowWrapper would have the scope that I need.
The bad thing about passing down extra props will be the additional renders on row rather then only render on cells (From what I understand).
Close, but no cigar (yet).

@dannyhuly I'm working on a small re-design (separate branch) but I haven't gotten around to finishing it yet as I've been too busy with paid work (I do this one for free so it progresses slowly). Likely finishing that might help in this particular case as it makes the library more flexible.


Run bundle install without --quiet when not satisfied

bundle install sometimes takes a lot of time, so I'd like to monitor its progress when dependencies are unsatisfied. To keep the output quiet when satisfied, I added bundle check || before bundle install.

LGTM.
The only ways I can think of this being worse is if Bundler is flaky or we're messing with the Gemfile while yjit-bench runs. And if those happen we have significant problems regardless :-)


Docker mime types contained within OCI image index

According to the image spec, the manifests section describes that the implementation MUST support the OCI image mime type and SHOULD support the nested indexes. It also says that when encountering a mime type that is unknown to the implementation, that an error MUST NOT be generated.
I'm wondering what exactly does the last sentence mean. Specifically, what does it mean that an error should not be generated. Should this manifest be then accepted as it was sent by the client? If it means that, then we might as well put in the specification that the manifest must be accepted regardless of what mime type the client is sending, right? Why are we then specifying the minimum requirements if we should accept all? The reason I'm asking about clarification here is that there are images on the Docker Hub that contain both Docker v2 schema 2 mime types and OCI mime types inside the same index. For instance:
# skopeo inspect --raw  docker://memcached:1.6-alpine | jq '.manifests[].mediaType'
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.docker.distribution.manifest.v2+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"
"application/vnd.oci.image.manifest.v1+json"

This image will fail to be pushed to Quay in this format, because of validation, our implementation does not allow this kind of mixing and images with this kind of an OCI index are rejected:
https://github.com/quay/quay/blob/master/image/oci/__init__.py#L1
Which behaviour is correct?
Thank you for your time!

I don't believe OCI disallows this behavior, so I'd say the Quay behavior is overly restrictive. The fact that a docker media type is a known media type would mean Quay could decide they explicitly don't want to support the Docker media types, but I don't think that's happening here.
In practice, it's uncommon. Tooling that generates one type of manifest tends to be consistent for the entire image. And the reverse may not be permitted (I'm not aware of whether a docker manifest list allows non-docker media types).
In this specific image, it looks a bit weird. The linux/arm/v7 image in that index is rather old compared to the other platforms. This image may be the result of merging an update with the previous state of the image for that one platform. @tianon would have more context there.

Hey @sudo-bmitch ,
Thanks for your reply!

I don't believe OCI disallows this behavior, so I'd say the Quay behavior is overly restrictive. The fact that a docker media type is a known media type would mean Quay could decide they explicitly don't want to support the Docker media types, but I don't think that's happening here.

So, currently, Quay disallows mixing of media types. Depending on what image is the client pushing, we validate the manifest and all child manifests against our current implementation. OCI doesn't strictly disallow this kind of manifest, that's true, but as far as I'm aware, it doesn't also explicitly allow it. You say that the Docker media type is a known media type. I agree, but is it known to OCI or is it known to Docker v2 schema 2? And another question would be, if it's really up to Quay dev team to decide whether we would support this behaviour or not, how would we tell that to the client which is pushing the manifest? OCI spec says that an error should not be raised. Is 400 Bad request considered an error?

In practice, it's uncommon. Tooling that generates one type of manifest tends to be consistent for the entire image. And the reverse may not be permitted (I'm not aware of whether a docker manifest list allows non-docker media types).

As far as I know, it doesn't. But I could be wrong.

In this specific image, it looks a bit weird. The linux/arm/v7 image in that index is rather old compared to the other platforms. This image may be the result of merging an update with the previous state of the image for that one platform. @tianon would have more context there.

That's just the most recent example, I believe there are other examples of images that have the same "problem".

So, should we just clarify the guidance in the spec to say something along the lines of "must accept any mediaType and as result, should support nested indexes" ?

Part of the complication is the spec is written for multiple parties, the content producer, registry, and consumer. I think it makes sense for a registry to allow any descriptor pointing to content it has already accepted (or would accept, if they aren't validating digests). For runtimes, we probably can't say they must accept media types defined outside of the spec. But anyone that writes a tool that supports that scenario shouldn't be blocked by the spec. I doubt we'll find a lot of runtimes that support nested indexes, but a lot of registries and some other tooling do.

Makes sense. Would it be wrong if we get more specific about the expected behaviors of clients vs. registries at this particular point in the spec?

We're using google/go-containerregistry in our tooling to create container images.
Our steps:

Create a new image manifest from empty image base [1] that has DockerManifestSchema2.
Create a new image index from empty image index base [2] that has OCIImageIndex.

When trying to copy it from internal registry to Quay container registry, it fails with an error that it's not supported.
[1] https://github.com/google/go-containerregistry/blob/main/pkg/v1/empty/image.go#L32
[2] https://github.com/google/go-containerregistry/blob/main/pkg/v1/empty/index.go#L31C1-L33C2


Host and git_status not found when just started using theme

This is what i see when i reloaded zsh :
__host:6: = not found
__git_status:5: = not found

Cannot reproduce this bug, but seems like you have problem with %n.
What are you using? Do you have git installed?

git --version
git version 2.7.0

Please update.

If this solved your problem, please let me know.

Yeap, that solved that - thanks :)


refactor: clean up packaging

Proposed updates to packaging. I'm trying Hatch here; I've used it in a few places but not on the cluster yet, but I think it might work well on the cluster. If we pull any conda specifics, we can try pixi. Open to suggestions if others prefer something else. I can move the environment config from pyproject.toml to hatch.toml if people like that better. I generally like fewer files, but am 50:50 on that one. Hatch (and nox and pixi) are 100x faster than other alternatives due to uv support.
I deleted all the stuff that was irrelevant or well out of date, like the coverage stuff (there are no tests), the tox stuff (3.6-3.8 for a 3.10+ project), etc.
I moved the backend from setuptools to hatchling and deleted all the setuptools-specific files.
I setup a spot for tests outside the source dir instead of inside it.

I don't have access to merge, if you mean me. :)

Building the docs on readthdocs went from 2 minutes to about 21 seconds. :)


CClient: sturcture padding issue on ESP32 platfrom

As ESP32 platform, data is forced to be 4 bytes alignment, therefore the member of a structure need to consider paddings.
For instance, the size of get_node_info_res_t is 296, the real size shoulde be 283 using FLEX_TRIT_ENCODING_3_TRITS_PER_BYTE, 13 bytes is padded on it.
We can reduce memory usage and a potential access problem on this structure via changing member order, shown below.
typedef struct get_node_info_res_s {
  char_buffer_t* app_name;
  char_buffer_t* app_version;
  uint32_t latest_milestone_index;
  uint32_t latest_solid_subtangle_milestone_index;
  uint32_t milestone_start_index;
  uint32_t tips;
  uint32_t transactions_to_request;
  uint16_t packets_queue_size;
  uint16_t neighbors;
  uint64_t time;
  flex_trit_t latest_milestone[FLEX_TRIT_SIZE_243];
  flex_trit_t latest_solid_subtangle_milestone[FLEX_TRIT_SIZE_243];
  flex_trit_t coordinator_address[FLEX_TRIT_SIZE_243];
} get_node_info_res_t;

The structure size is 288 bytes which are 5 bytes padded only.
We need to review and make sure structures are all aligned properly.

Closed by #958


Dekker's algorithm for mutual exclusion

These changes add Dekker's algorithm for mutual exclusion to the directory examples/Dekker/, with proofs of the properties of mutual exclusion and starvation freedom.

Thank you for reviewing this pull request and approving the changes, I merged it into branch master.

Thank you for reviewing this pull request and approving the changes, I merged it into branch master.


How to improve the network performance of mtg?

How to improve the network performance of mtg? especially on iOS
My server's performance is sufficient

This is not about server performance per se. I suppose, your complain is about videos or other media. If you use Telegram without proxies, it can access CDNs with these assets. But in case of proxy, these RPC calls are not used and Telegram client fallbacks to an old method of fetching this data that is not that efficient. I do not know what to do here.
You can try other alternatives:

https://github.com/alexbers/mtprotoproxy
https://github.com/seriyps/mtproto_proxy

It could be, they are more efficient in your case 🙏


Add NilCore library as a future replacement for DataTypes

Here instead of SSZ-container approach used in DataTypes we implemented sszpp-serialization directly on types.
This is how to use it:
#include "ssz++.hpp"
#include "zkevm_framework/core/types/block.hpp"

int main() {
    std::vector<std::byte> bytes = read_ssz_file();
    core::types::Block block = ssz::deserialize<core::types::Block>(bytes);
    std::vector<std::byte> new_bytes = ssz::serialize(block);
    // assert(bytes == new_bytes)
}

This is just a first iteration of implementing Nil structures. Other structure implementations and their interfaces are coming.

Also added some helpers to read/write core::Bytes (may be used to read/write core::types::Code e.g.):
core::types::Bytes<100> blob = {{std::byte{0xAA}, std::byte{0xBB}, std::byte{0xCC}}};
std::ofstream f("out.bin");
write_bytes(blob, f);

Also there are some helpers to read/write core::Bytes (may be used to read/write core::types::Code e.g.):
core::types::Bytes<100> blob = {{std::byte{0xAA}, std::byte{0xBB}, std::byte{0xCC}}};
std::ofstream f("out.bin");
write_bytes(blob, f);

I guess it's not so good idea - add extra functionality for this library.
It should be as easy as possible. Better locate helpers in some common utilities.
Actually we have to do these conversion only when parse JSON (file or response) - https://github.com/NilFoundation/zkEVM-framework/blob/ebc73a27fa1415cfae238a44ed322e50a67494fb/libs/json_helpers/json_helpers.cpp#L83

@akokoshn sure, no problem, I will remove these functions.


QA - Site - Product Detail Page - Place Order - Alert message should not be display after click on Add to cart button.

Alert message should not be display after click on Add to cart button.

Click on search button and go to search page.
Click on any product and go tot detail page.
Select Place Order tab and Select product Color.
Enter Qty in Qty box.
Select Shipping Address.
Fill the Data and click on add to cart button.
Observe Success Message display after click on Add to Cart Button.
No Success message should be display if Page is redirect to cart Page.

Still Alert Message is display when user click on Add to cart button from Detail Page.

Done


Saving the report to root

Issue description
When running the plugin in development (using webpack dev server) the report is stored in root, rather than the webpack output folder (/public/webpack/ in my case). This has led to some frustration since it is constantly messes with git.
Technical info

Webpack Bundle Analyzer version: 2.8.1
Webpack version: 2.5.1
Node.js version: 6.9.1
npm/yarn version: 4.4.4
OS: Mac OS 10.12.4

Debug info
How do you use this module? As CLI utility or as plugin?
Plugin
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: false,
reportFilename: 'development_report.html'
})
What other Webpack plugins were used?
StatsPlugin
ExtractTextPlugin
ProvidePlugin
CommonsChunkPlugin
EnvironmentPlugin
LoaderOptionsPlugin

in production
NoEmitOnErrorsPlugin
BabiliPlugin

Does it output the report in the correct place if you are not using webpack-dev-server? If you have set output.path setting in your webpack-dev-server configuration, this plugin should respect that and output the report inside that directory.

Yes. If I build via command line the report is generated in the correct location. I can't seem to find an output.path option for DevServer. Do you mean the general output.path in the webpack config file? That one should be set correctly.
Thank you for the fast reply.

Ah, seems like this is the same issue as #75 and was fixed by #79 that is in version v2.8.2. So just upgrade your version of webpack-bundle-analyzer and it should work :relaxed:

Awesome! That was it!
Thanks for great help for a great tool :)

Great to hear that this got fixed without us having to touch any code :smile:


ART-4052: Add requirements for ART bundle creation

since the presence of image-references in the bundle dir was messing up with CI, I suggest we just create a copy in manifests/ with the structure that makes ART's automation happy, while keeping bundle/ untouched.

/cc @nishant-parekh


Adding a table alias to "Generate SQL" menu item

When I generating SQL (e.g. select) there a window with code appears. I suggest to add some edit box "table alias" (empty by default) and, when the user puts symbols in that field - code should automatically be updated, including "aliased" fields (alias.field) and tables (table as alias).

It could look as in attached picture.
The second question - there are select/update/insert/delete/merge variants. Is it possble to add one template for "PostgreSQL's merge" - "insert ... on conflict do update ... excluded. "
Thank you.

Adding alis would be easy. Move it to the next milestone.
In regards to PG-specific query gen - it is a bit more complicated, please create another FR ticket.
It is also very doable but still different.


Completely broken

Does not work at all.

You have provided no information as to how to even begin to debug this. What is "completely broken"?


Traceback errors and proxy issues

To Reproduce
Steps to reproduce the behavior:
Which Python version are you using?
3.8
Which version of youtube-transcript-api are you using?
0.5
What code / cli command are you executing?
from youtube_transcript_api import YouTubeTranscriptApi
YouTubeTranscriptApi.get_transcript('puTiLuCw8lI')
Expected behavior
Retrieve the transcript
Actual behaviour
I get a bunch of errors:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 700, in urlopen
self._prepare_proxy(conn)
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 994, in _prepare_proxy
conn.connect()
File "/usr/local/lib/python3.8/dist-packages/urllib3/connection.py", line 369, in connect
self._tunnel()
File "/usr/lib/python3.8/http/client.py", line 905, in _tunnel
raise OSError("Tunnel connection failed: %d %s" % (code,
OSError: Tunnel connection failed: 403 Forbidden
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/usr/local/lib/python3.8/dist-packages/urllib3/connectionpool.py", line 785, in urlopen
retries = retries.increment(
File "/usr/local/lib/python3.8/dist-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.youtube.com', port=443): Max retries exceeded with url: /watch?v=puTiLuCw8lI (Caused by ProxyError('Can
not connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "youtube.py", line 3, in
YouTubeTranscriptApi.get_transcript('puTiLuCw8lI')
File "/home/dylanschweitzer/.local/lib/python3.8/site-packages/youtube_transcript_api/_api.py", line 132, in get_transcript
return cls.list_transcripts(video_id, proxies, cookies).find_transcript(languages).fetch()
File "/home/dylanschweitzer/.local/lib/python3.8/site-packages/youtube_transcript_api/_api.py", line 71, in list_transcripts
return TranscriptListFetcher(http_client).fetch(video_id)
File "/home/dylanschweitzer/.local/lib/python3.8/site-packages/youtube_transcript_api/_transcripts.py", line 47, in fetch
self._extract_captions_json(self._fetch_video_html(video_id), video_id)
File "/home/dylanschweitzer/.local/lib/python3.8/site-packages/youtube_transcript_api/_transcripts.py", line 79, in _fetch_video_html
html = self._fetch_html(video_id)
File "/home/dylanschweitzer/.local/lib/python3.8/site-packages/youtube_transcript_api/_transcripts.py", line 88, in _fetch_html
response = self._http_client.get(WATCH_URL.format(video_id=video_id))
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 600, in get
return self.request("GET", url, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.8/dist-packages/requests/adapters.py", line 559, in send
raise ProxyError(e, request=request)
requests.exceptions.ProxyError: HTTPSConnectionPool(host='www.youtube.com', port=443): Max retries exceeded with url: /watch?v=puTiLuCw8lI (Caused by ProxyError('Canno
t connect to proxy.', OSError('Tunnel connection failed: 403 Forbidden')))

Hi @dylanschweitzer,
I can not reproduce this for the video uCbpDW0p0Gs. Does this happen only for this video, or all videos you are trying to get a transcript for? Did this happen after bombarding YouTube with a lot of requests? (you might get temporarly blocked when doing to many requests...)

You're right, I tried it on another IP and it worked. Looks like it wasn't working from the host I used.


Main branch ci linkcheck breaks with parse error

@ahlag , linkcheck ci run breaks in main branch. Here is an example link: https://github.com/linkedin/feathr/runs/8011026910?check_suite_focus=true.
E   IndexError: list index out of range
=========================== short test summary info ============================
ERROR docs/samples/fraud_detection_demo.ipynb - IndexError: list index out of...
ERROR docs/samples/product_recommendation_demo.ipynb - IndexError: list index...
ERROR docs/samples/product_recommendation_demo_advanced.ipynb - IndexError: l...
!!!!!!!!!!!!!!!!!!! Interrupted: 3 errors during collection !!!!!!!!!!!!!!!!!!!!
============================== 3 errors in 2.28s ===============================
Error: Process completed with exit code 2.
This seems a parser error, could you please help take a look?

@blrchen
Please assign to me! Thanks


Healthy Events not being emiited

I'm currently testing an app which needs to know it's it's connection status to our cluster and we're having a difficult time triggering the healthy event from triggering on the poolMaster. We are using iptables to drop either outbound or inbound traffic.
When the application starts without a connection it seems the healthy event never triggers. We do get the Entering Slow Mode and Exiting Slow Mode messages, but the event for the health checks rarely if at all occurs.
I feel like I'm missing something pretty essential as the entire pool has no active connection. Queries are still queued and handled if we drop the iptables rules.

Can you a script where you listen for the event? And the iptables used?
I haven't played with iptables for some time, but if I'm not mistaken, with iptables you can break a connection without getting an event, in which case the connection dies only when it's pinged.

Slow growth doesn't mean that no connection are available. It means that we won't try to open tons of connections at once because we failed to open once.
The other connections are still there.

Sure thing! These firewall rules will drop all traffic in the same manor that a server crashing or losing connection in the wild would. No hangup or rejection - just dropping all packets.
IPTables Rules
iptables -A OUTPUT -d <remote-server-ip> -j DROP
iptables -A INPUT -s <remote-server-ip> -j DROP

Javascript - Nothing overly fancy here
app.r = require('rethinkdbdash')(config);
var master = app.r.getPoolMaster();
master.on('healthy', function(healthy){
	if(healthy){
		app.info('Reconnected to RethinkDB pool');
	}else{
		app.warn('Lost connection with RethinkDB pool');
	}
});

Config
{
	discovery: false,
	pool: true,
	buffer: 50,
	max: 1000,
	timeout: 5,
	timeoutError: 1000,
	silent: true,
	servers: [...],
	db: '...'

TL;DR: Linux needs time to find that a connection is not available if you just block it with iptables. While it's not optimal, it's working as intended.
More information here:
https://github.com/rethinkdb/rethinkdb/issues/4572 and https://github.com/rethinkdb/rethinkdb/issues/4641


support Update() method

closes #9
closes #27
minor clean up so that "Api" related code is in the api file
clean up on error response
refactored tests

closing, as I am going include the circleci 2.0 as part of this

@batmany13

closes #9

#9 is a pull request

it seems to me that this pull request includes several changes that are not mentioned in #27:

moving functions unrelated to Update
altering circleci configuration
adding vendor/vendor.json with no description of its purpose

@martinatsynqfm yes #27 was not descriptive enough, its just a general move to 2.0, and I've created a standardized "circleci" config for Golang microservices, which uses govendor to manage the dependencies, so this is used in hydra as well.
The move is just minor clean up, where "api" related methods were not grouped together and is part of the Update() fix, since other related methods were not in the right file.


K8s IngressRoute error when selecting a named port from a headless & selectorless ClusterIP Service

Welcome!

[X] Yes, I've searched similar issues on GitHub and didn't find any.
[X] Yes, I've searched similar issues on the Traefik community forum and didn't find any.

What did you do?
Create a headless & selectorless ClusterIP Service with a custom Endpoints pointing to an IP outside of the cluster.
apiVersion: v1
kind: Service
metadata:
  name: mikrotik-headless-proxy
  namespace: mikrotik-headless-proxy
spec:
  type: ClusterIP
  clusterIP: None
  ports:
  - protocol: TCP
    name: http
    port: 80
    targetPort: 80
---
apiVersion: v1
kind: Endpoints
metadata:
  name: mikrotik-headless-proxy
  namespace: mikrotik-headless-proxy
subsets:
- addresses:
  - ip: <IP_ADDRESS>
  ports:
  - port: 80

Then, create an IngressRoute:
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
  name: http
  namespace: mikrotik-headless-proxy
spec:
  entryPoints: ["web"]
  routes:
  - match: Host(`mikrotik.homelab.emerconnelly.com`)
    kind: Rule
    services:
    - name: mikrotik-headless-proxy
      port: 80

The route does not work and does not show up in the Traefik dashboard. View DaemonSet logs:
2024-08-28T07:45:27Z ERR error="no servers found for mikrotik-headless-proxy/mikrotik-headless-proxy" ingress=http namespace=mikrotik-headless-proxy providerName=kubernetescrd

Remove port name from ClusterIP:
apiVersion: v1
kind: Service
metadata:
  name: mikrotik-headless-proxy
  namespace: mikrotik-headless-proxy
spec:
  type: ClusterIP
  clusterIP: None
  ports:
  - protocol: TCP
    port: 80
    targetPort: 80
---
apiVersion: v1
kind: Endpoints
metadata:
  name: mikrotik-headless-proxy
  namespace: mikrotik-headless-proxy
subsets:
- addresses:
  - ip: <IP_ADDRESS>
  ports:
  - port: 80

The route now works and shows in the Traefik dashboard. The DaemonSet logs have no errors.
What did you see instead?
Traefik does not create the IngressRoute if the ClusterIP name has name attribute.
Once this attribute is removed, Traefik creates the IngressRoute.
What version of Traefik are you using?
kubectl exec -itn traefik daemonsets/traefik -- traefik version
Version:      3.1.2
Codename:     comte
Go version:   go1.22.5
Built:        2024-08-06T13:37:51Z
OS/Arch:      linux/amd64

What is your environment & configuration?
spec:
  values:
    deployment:
      kind: DaemonSet
    ingressClass:
      name: traefik
      enabled: true
      isDefaultClass: false
    ingressRoute:
      dashboard:
        enabled: true
        matchRule: Host(`traefik.homelab.emerconnelly.com`)
        entryPoints: ["websecure"]
        tls:
          secretName: ingress-tls
      healthcheck:
        enabled: true
        matchRule: Host(`traefik.homelab.emerconnelly.com`) && Path(`/ping`)
        entryPoints: ["websecure", "web"]
        tls:
          secretName: ingress-tls
    service:
      spec:
        loadBalancerIP: <IP_ADDRESS>
    providers:
      kubernetesCRD:
        enabled: true
        allowCrossNamespace: true
      kubernetesIngress:
        enabled: true
      kubernetesGateway:
        enabled: true
    logs:
      access:
        enabled: true
        addInternals: true
    metrics:
      prometheus:
        service:
          enabled: true
        disableAPICheck: false
        serviceMonitor:
          enabled: true
          honorLabels: true
    tracing:
      addInternals: true
      otlp:
        enabled: true
        grpc:
          enabled: true
          endpoint: "openobserve-collector-agent-collector-headless.openobserve-collector.svc.cluster.local:4317"
          insecure: true
    globalArguments:
    - "--global.checknewversion"
    tolerations:
    - operator: "Exists"

Kubernetes 1.30.4
Helm Chart 30.1.0
If applicable, please paste the log output in DEBUG level
No response

Hey @emerconnelly,
Thanks for the additional information.
If any community member can help us to move forward on it, we would love the help.


sagemath8.6 inotebook cannot load jmol

Issue description
in sage interpreter, it can call jmol correctly.
But in inotebook mode, it does not.
Steps to reproduce
open browser inotebook with :
sage -inotebook

Then create new sheet and
copy paste and run :
x,y,z = var('x,y,z')
f = x^3-x*z^2+y^2*z
g = x^2+y^2+z^2-1
implicit_plot3d(g*f,(x,-1,1),(y,-1,1),(z,-1,1))

Technical details
Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

system: "x86_64-linux"
host os: Linux 5.1.5, NixOS, 19.03.172765.55df3fe5f3f (Koi)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.2.2
channels(ghasshee): "nixos-19.03.172765.55df3fe5f3f, nixpkgs-19.03pre161900.61c3169a0e1"
channels(root): "nixos-19.03"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

cc @timokau

Apparently the legacy sage notebook has some special handling for jmol, which probably needs patching (probably tries to run a java applet in the browser? I have no experience with such things).
However since that notebook is deprecated and jmol is out of favor too, I'm not willing to invest much time into fixing this. I'll support you if you try to fix it yourself, but I suggest you try using the ipython notebook and threejs instead.

Thank you for clarification.
Would you give me the way how to install threejs into /nix/store/ as the sage environment?

Its supposed to be included by default, but it didn't work. The interactive parts of sage are a bit under-tested (while everything else is over-tested). https://github.com/NixOS/nixpkgs/pull/63375 will fix that. Backport in https://github.com/NixOS/nixpkgs/pull/63376.

The fix should now be in the 19.03 binary channel. Can you confirm it works for you?

I ran the following code and it showed only frames ;
sage: parametric_plot3d([cos(x),sin(x),x/10], (x,0,4*pi), color='red', viewer='threejs')

Does it mean that it has worked correctly?

I don't know how it should behave. @paulmasson as you know much more about the threejs backend, would you mind commenting? Does this sound like correct behaviour?

@timokau that is not the correct behavior. It sounds like the backward incompatibility introduced in r91 of Three.js. This will be fixed in Sage 8.8 which is due for release in the next couple weeks.
When I wrote the Three.js backend it never occurred to me that distributions would separately download a newer version of the library. One solution is to keep the Sage version up to date, but I'd like to understand why a distribution overrides the Sage default. This is not the first time it's come up and prompted the  upgrade to r100.

Thank you, that is very helpful! I'm backporting the threejs r91 ticket to sage 8.6 (https://github.com/NixOS/nixpkgs/pull/63561, in our latest stable release) and sage 8.7 (https://github.com/NixOS/nixpkgs/pull/63560, our unstable). Seems to be working. While I'm at it I also noticed that the cdn wasn't working properly, so I included a hotfix for that until https://trac.sagemath.org/ticket/26434 is resolved.
So as soon as those two PRs are merged (and built by hydra if you rely on the binary channels) offline and online threejs should work properly.

I'd like to understand why a distribution overrides the Sage default

Distributions usually aren't using sages build system for several reasons. A few of them are:

hard to make the build system work properly and interact with the system packages reliably
would create a very bloated package with lots of duplication (sage having its own version of gcc, python etc. while the user will still have system versions of them installed)
we would rely on sage to keep dependencies up to date and secure

Its the whole point of a package manager to easily install packages and manage dependencies. It shouldn't be sages job to do that. The sage build system is fine as a sort of "reference implementation" / common ground for sage developers, but shouldn't be the default for end users. If it was my decision, I'd even remove it completely and instead use one of the package managers as the common ground.
Since we do not use the sage build system, we need to provide our own threejs version. That version is expected to be usable by other packages too (the reason for https://trac.sagemath.org/ticket/28007) and is kept up to date (for various reasons: security, features and simple practicality since the node package set is updated automatically).
For compatibility with newer dependencies, we usually backport the appropriate sage tickets to older sage versions. Its usually obvious when to do that (since the sage test suite will fail), its just problematic in this case since visual stuff is hard to test automatically.

The fix is in the 19.03 binary channel. Please retest.

Wow, it did! Thank you for the fix and open thought discussion !

Happy I could help :)